From 6697e42c3c3488bc8aec811398f21e7cec2a557a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 23 Jul 2019 18:00:50 -0400 Subject: [PATCH] radeonsi/nir: clean up gather_intrinsic_load_deref_input_info --- src/gallium/drivers/radeonsi/si_shader_nir.c | 14 ++++++-------- 1 file 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 23728a7..5c23ea5 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:; } } -- 2.7.4