From 3d20245f43bcc34afbfc62b4be1c59529ae438cb Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 7 May 2024 11:04:17 +1000 Subject: [PATCH] glsl: wrap nir_opt_loop in NIR_PASS() Otherwise we miss the debugging benefits. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/glsl/gl_nir_linker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index e12296c67c9..c75aefc52d2 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -79,7 +79,10 @@ gl_nir_opts(nir_shader *nir) NIR_PASS(progress, nir, nir_copy_prop); NIR_PASS(progress, nir, nir_opt_remove_phis); NIR_PASS(progress, nir, nir_opt_dce); - if (nir_opt_loop(nir)) { + + bool opt_loop_progress = false; + NIR_PASS(opt_loop_progress, nir, nir_opt_loop); + if (opt_loop_progress) { progress = true; NIR_PASS(progress, nir, nir_copy_prop); NIR_PASS(progress, nir, nir_opt_dce);