tgsi: remove unused tgsi_shader_info.colors_read
authorThomas H.P. Andersen <phomes@gmail.com>
Tue, 11 Jul 2023 16:22:25 +0000 (18:22 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Jul 2023 12:41:27 +0000 (12:41 +0000)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

src/gallium/auxiliary/nir/nir_to_tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index fdb576a..f55ce1c 100644 (file)
@@ -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;
       }
index fe442bf..2d0e861 100644 (file)
@@ -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
index ae9da02..95100a6 100644 (file)
@@ -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? */