radeonsi/nir: Add const_index when loading GS inputs
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 20 Aug 2019 10:47:39 +0000 (12:47 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 23 Aug 2019 09:05:31 +0000 (11:05 +0200)
This fixes loading GS inputs in structures or arrays.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 8f6719bd35e9817375575ebfc4ef3d30712896ac..9492fb7deef3189d04aa4bcb767f19d321178a3c 100644 (file)
@@ -1611,7 +1611,7 @@ static LLVMValueRef si_nir_load_input_gs(struct ac_shader_abi *abi,
                        offset *= 2;
 
                offset += component;
-               value[i + component] = si_llvm_load_input_gs(&ctx->abi, driver_location  / 4,
+               value[i + component] = si_llvm_load_input_gs(&ctx->abi, driver_location  / 4 + const_index,
                                                             vertex_index, type, offset);
        }