Mesa (main): nir: fix an uninitialized variable valgrind warning in nir_group_loads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 22 18:43:50 UTC 2022
Module: Mesa
Branch: main
Commit: f7a77ff9005fdb1af7678d80dac6dcf16b328c21
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7a77ff9005fdb1af7678d80dac6dcf16b328c21
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Apr 22 01:35:45 2022 -0400
nir: fix an uninitialized variable valgrind warning in nir_group_loads
pass_flags is only initialized for grouped loads, so change the order
Fixes: 33b4eb149ea - nir: add new SSA instruction scheduler grouping loads into indirection groups
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16090>
---
src/compiler/nir/nir_group_loads.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_group_loads.c b/src/compiler/nir/nir_group_loads.c
index e290012437c..b9da5c325fb 100644
--- a/src/compiler/nir/nir_group_loads.c
+++ b/src/compiler/nir/nir_group_loads.c
@@ -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) {
More information about the mesa-commit
mailing list