From 9684fbc87d595ef921d4bc102eabfdc1bf6f1a2a Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Tue, 11 Jul 2023 18:22:25 +0200 Subject: [PATCH] tgsi: remove unused tgsi_shader_info.colors_read Reviewed-by: Charmaine Lee Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi_info.c | 4 ---- src/gallium/auxiliary/tgsi/tgsi_scan.c | 6 +----- src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c index fdb576a..f55ce1c 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c @@ -149,10 +149,6 @@ static void gather_intrinsic_load_deref_info(const nir_shader *nir, tgsi_get_gl_varying_semantic(var->data.location, need_texcoord, &semantic_name, &semantic_index); - if (semantic_name == TGSI_SEMANTIC_COLOR) { - uint8_t mask = nir_ssa_def_components_read(&instr->dest.ssa); - info->colors_read |= mask << (semantic_index * 4); - } if (semantic_name == TGSI_SEMANTIC_FACE) { info->uses_frontface = true; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index fe442bf..2d0e861 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -157,7 +157,7 @@ scan_src_operand(struct tgsi_shader_info *info, } if (info->processor == PIPE_SHADER_FRAGMENT) { - unsigned name, index, input; + unsigned name, input; if (src->Register.Indirect && src->Indirect.ArrayID) input = info->input_array_first[src->Indirect.ArrayID]; @@ -165,15 +165,11 @@ scan_src_operand(struct tgsi_shader_info *info, input = src->Register.Index; name = info->input_semantic_name[input]; - index = info->input_semantic_index[input]; if (name == TGSI_SEMANTIC_POSITION && usage_mask_after_swizzle & TGSI_WRITEMASK_Z) info->reads_z = true; - if (name == TGSI_SEMANTIC_COLOR) - info->colors_read |= usage_mask_after_swizzle << (index * 4); - /* Process only interpolated varyings. Don't include POSITION. * Don't include integer varyings, because they are not * interpolated. Don't process inputs interpolated by INTERP diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index ae9da02..95100a6 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -84,7 +84,6 @@ struct tgsi_shader_info bool reads_perpatch_outputs; bool reads_tessfactor_outputs; - uint8_t colors_read; /**< which color components are read by the FS */ uint8_t colors_written; bool reads_position; /**< does fragment shader read position? */ bool reads_z; /**< does fragment shader read depth? */ -- 2.7.4