From 836470d433164b274a881bbcd4835f5784766bce Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 18 Aug 2021 13:50:58 +0100 Subject: [PATCH] nir: allow NIR_PASS(_, ) If a user wants to skip printing the shader if no changes were made without declaring a dummy variable for the progress. Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/compiler/nir/nir.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 329d642300e..1d70f7f66f2 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4348,6 +4348,7 @@ static inline bool should_print_nir(UNUSED nir_shader *shader) { return false; } printf("%s\n", #pass); \ if (pass(nir, ##__VA_ARGS__)) { \ nir_validate_shader(nir, "after " #pass); \ + UNUSED bool _; \ progress = true; \ if (should_print_nir(nir)) \ nir_print_shader(nir, stdout); \