summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2019-08-20 12:47:39 +0200
committerConnor Abbott <cwabbott0@gmail.com>2019-08-23 11:05:31 +0200
commit87cca891c39da2282f122139c9514c43a14f98bb (patch)
tree075a79c3f34c177be8f56eeeceb8f26aa3f79988
parent82589d3ffd71f3d4b1dee08b058cd89702a3d7cd (diff)
radeonsi/nir: Add const_index when loading GS inputs
This fixes loading GS inputs in structures or arrays. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 8f6719bd35e9..9492fb7deef3 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -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);
}