radeonsi: remove constant index limitation v3
authorChristian König <christian.koenig@amd.com>
Mon, 4 Feb 2013 16:55:32 +0000 (17:55 +0100)
committerChristian König <christian.koenig@amd.com>
Tue, 12 Feb 2013 17:57:12 +0000 (18:57 +0100)
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 <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/radeonsi_pipe.c
src/gallium/drivers/radeonsi/radeonsi_shader.c

index 744dac4be0ce3a589596620d2837fe4b8fb0197a..acf3e2d77a15d4638f6ed5dfa8e0e95adc1e1e11 100644 (file)
@@ -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:
index 1556a0768b1dadad0841e42a111a0207e7d3f6d6..7e61560369d673c1922b4c23d1840fdf44f675a0 100644 (file)
@@ -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);