radv: Initialize nir_lower_io_to_scalar progress variable

The NIR_PASS macro only overwrites this when the pass actually makes
progress. If the pass doesn't make progress, the variable stays
uninitialized.

Clang correctly spots this and warns about it.

Cc: mesa-stable
(cherry picked from commit 47e4a68a83)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
This commit is contained in:
Natalie Vock 2026-02-18 18:22:21 +01:00 committed by Eric Engestrom
parent 641a3ea0d9
commit 6f88b07e5d
2 changed files with 2 additions and 2 deletions

View file

@ -2804,7 +2804,7 @@
"description": "radv: Initialize nir_lower_io_to_scalar progress variable",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1662,7 +1662,7 @@ radv_graphics_shaders_link_varyings(struct radv_shader_stage *stages, enum amd_g
/* Scalarize all I/O, because nir_opt_varyings and nir_opt_vectorize_io expect all I/O to be scalarized. */
nir_variable_mode sca_mode = nir_var_shader_in;
bool sca_progress;
bool sca_progress = false;
if (s != MESA_SHADER_FRAGMENT)
sca_mode |= nir_var_shader_out;