nir: fix an uninitialized variable valgrind warning in nir_group_loads

pass_flags is only initialized for grouped loads, so change the order

Fixes: 33b4eb149e - nir: add new SSA instruction scheduler grouping loads into indirection groups

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16090>
(cherry picked from commit f7a77ff900)
This commit is contained in:
Marek Olšák 2022-04-22 01:35:45 -04:00 committed by Dylan Baker
parent e8ba43c8f8
commit 1fddd2dbeb
2 changed files with 2 additions and 2 deletions

View file

@ -562,7 +562,7 @@
"description": "nir: fix an uninitialized variable valgrind warning in nir_group_loads",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "33b4eb149ea79d9dd4b80ddda079ad027e5a40bf"
},

View file

@ -428,7 +428,7 @@ process_block(nir_block *block, nir_load_grouping grouping,
}
/* Only group load instructions with the same indirection level. */
if (current->pass_flags == level && is_grouped_load(current)) {
if (is_grouped_load(current) && current->pass_flags == level) {
nir_instr *current_resource;
switch (grouping) {