radeonsi: fixup sizes of shader resource and sampler arrays
authorMarek Olšák <marek.olsak@amd.com>
Sat, 14 Jun 2014 00:46:04 +0000 (02:46 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 16 Jun 2014 14:55:57 +0000 (16:55 +0200)
This was wrong for a very long time. I wonder if the array size has any
effect on anything.

Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index c540414..58a2725 100644 (file)
@@ -2165,9 +2165,9 @@ static void create_function(struct si_shader_context *si_shader_ctx)
        /* We assume at most 16 textures per program at the moment.
         * This need probably need to be changed to support bindless textures */
        params[SI_PARAM_SAMPLER] = LLVMPointerType(
-               LLVMArrayType(LLVMVectorType(i8, 16), NUM_SAMPLER_VIEWS), CONST_ADDR_SPACE);
+               LLVMArrayType(LLVMVectorType(i8, 16), NUM_SAMPLER_STATES), CONST_ADDR_SPACE);
        params[SI_PARAM_RESOURCE] = LLVMPointerType(
-               LLVMArrayType(LLVMVectorType(i8, 32), NUM_SAMPLER_STATES), CONST_ADDR_SPACE);
+               LLVMArrayType(LLVMVectorType(i8, 32), NUM_SAMPLER_VIEWS), CONST_ADDR_SPACE);
 
        switch (si_shader_ctx->type) {
        case TGSI_PROCESSOR_VERTEX: