radv: update inputs_read when lowering the view index
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 11 Mar 2022 08:10:41 +0000 (09:10 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 14 Mar 2022 10:26:41 +0000 (10:26 +0000)
Otherwise inputs_read doesn't contain the information. This shouldn't
fix anything in practice because radv_shader_info gathers this from
the variable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15337>

src/amd/vulkan/radv_shader.c

index 7611c3a..6692949 100644 (file)
@@ -935,6 +935,9 @@ lower_view_index(nir_shader *nir)
          nir_ssa_def *def = nir_load_var(&b, layer);
          nir_ssa_def_rewrite_uses(&load->dest.ssa, def);
 
+         /* Update inputs_read to reflect that the pass added a new input. */
+         nir->info.inputs_read |= VARYING_BIT_LAYER;
+
          nir_instr_remove(instr);
          progress = true;
       }