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>
This commit is contained in:
Marek Olšák 2022-04-22 01:35:45 -04:00 committed by Marge Bot
parent fcc499d5e1
commit f7a77ff900

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) {