summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-23 18:00:50 -0400
committerMarek Olšák <[email protected]>2019-07-30 22:06:23 -0400
commit6697e42c3c3488bc8aec811398f21e7cec2a557a (patch)
treeab4b33541afefc80a5d21c0cba30c1f850a3aa1c /src
parent5f16fdefdfd3a52cca4cc885c0bcc472a4c03816 (diff)
radeonsi/nir: clean up gather_intrinsic_load_deref_input_info
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 23728a72375..5c23ea50bee 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -75,17 +75,15 @@ static void gather_intrinsic_load_deref_input_info(const nir_shader *nir,
}
break;
}
- default: {
- unsigned semantic_name, semantic_index;
- tgsi_get_gl_varying_semantic(var->data.location, true,
- &semantic_name, &semantic_index);
-
- if (semantic_name == TGSI_SEMANTIC_COLOR) {
+ case MESA_SHADER_FRAGMENT:
+ if (var->data.location == VARYING_SLOT_COL0 ||
+ var->data.location == VARYING_SLOT_COL1) {
+ unsigned index = var->data.location == VARYING_SLOT_COL1;
uint8_t mask = nir_ssa_def_components_read(&instr->dest.ssa);
- info->colors_read |= mask << (semantic_index * 4);
+ info->colors_read |= mask << (index * 4);
}
break;
- }
+ default:;
}
}