aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-10-04 17:40:39 +0200
committerMarek Olšák <[email protected]>2014-10-12 23:53:51 +0200
commite23fec14450e36f2584373a9980e9eb25bcc7438 (patch)
treed890cea42c1f2e570211de3a61e3505d53bfdef9 /src/gallium
parent7a645c53664abf669e36c823949d6c5d08ca94e8 (diff)
radeonsi: use tgsi_shader_info in fetch_input_gs
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 203e5056e01..692d2a9967e 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -354,10 +354,11 @@ static LLVMValueRef fetch_input_gs(
LLVMValueRef t_list;
LLVMValueRef args[9];
unsigned vtx_offset_param;
- struct si_shader_input *input = &shader->input[reg->Register.Index];
+ struct tgsi_shader_info *info = &shader->selector->info;
+ unsigned semantic_name = info->input_semantic_name[reg->Register.Index];
+ unsigned semantic_index = info->input_semantic_index[reg->Register.Index];
- if (swizzle != ~0 &&
- shader->input[reg->Register.Index].name == TGSI_SEMANTIC_PRIMID) {
+ if (swizzle != ~0 && semantic_name == TGSI_SEMANTIC_PRIMID) {
if (swizzle == 0)
return LLVMGetParam(si_shader_ctx->radeon_bld.main_fn,
SI_PARAM_PRIMITIVE_ID);
@@ -400,7 +401,7 @@ static LLVMValueRef fetch_input_gs(
args[0] = t_list;
args[1] = vtx_offset;
args[2] = lp_build_const_int32(gallivm,
- (get_param_index(input->name, input->sid,
+ (get_param_index(semantic_name, semantic_index,
shader->selector->gs_used_inputs) * 4 +
swizzle) * 256);
args[3] = uint->zero;