From 42f84a588633a11e991bb2856468145df30771ac Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 11 Mar 2022 09:10:41 +0100 Subject: [PATCH] radv: update inputs_read when lowering the view index 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 Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 7611c3acbe3..66929492461 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -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; }