From 8c80894fb32134129a4b6a9632d66bab126a4848 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Mon, 4 Feb 2013 17:55:32 +0100 Subject: [PATCH] radeonsi: remove constant index limitation v3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With the llvm patches, fixing 14 piglit tests in total. v2: increase the const limit v3: document the const limit Signed-off-by: Christian König Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/radeonsi_pipe.c | 2 +- src/gallium/drivers/radeonsi/radeonsi_shader.c | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 744dac4be0c..acf3e2d77a1 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -456,7 +456,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e /* FIXME Isn't this equal to TEMPS? */ return 1; /* Max native address registers */ case PIPE_SHADER_CAP_MAX_CONSTS: - return 64; + return 4096; /* actually only memory limits this */ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 1; case PIPE_SHADER_CAP_MAX_PREDS: diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 1556a0768b1..7e61560369d 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -455,12 +455,6 @@ static LLVMValueRef fetch_constant( * CONST[0].x will have an offset of 0 and CONST[1].x will have an * offset of 4. */ idx = (reg->Register.Index * 4) + swizzle; - - /* index loads above 255 are currently not supported */ - if (idx > 255) { - assert(0); - idx = 0; - } offset = lp_build_const_int32(base->gallivm, idx); load = build_indexed_load(base->gallivm, const_ptr, offset); -- 2.30.2