From 0d9ead8ca24f38966490c51dfc57e237e40c7af3 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 18 Aug 2021 14:18:15 +0100 Subject: [PATCH] nir: print file when validation fails This should make it clear whether a validation failure happens in RADV or zink. Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/compiler/nir/nir.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 1d70f7f66f2..93b6b39065a 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4347,7 +4347,7 @@ static inline bool should_print_nir(UNUSED nir_shader *shader) { return false; } if (should_print_nir(nir)) \ printf("%s\n", #pass); \ if (pass(nir, ##__VA_ARGS__)) { \ - nir_validate_shader(nir, "after " #pass); \ + nir_validate_shader(nir, "after " #pass " in " __FILE__); \ UNUSED bool _; \ progress = true; \ if (should_print_nir(nir)) \ @@ -4360,7 +4360,7 @@ static inline bool should_print_nir(UNUSED nir_shader *shader) { return false; } if (should_print_nir(nir)) \ printf("%s\n", #pass); \ pass(nir, ##__VA_ARGS__); \ - nir_validate_shader(nir, "after " #pass); \ + nir_validate_shader(nir, "after " #pass " in " __FILE__); \ if (should_print_nir(nir)) \ nir_print_shader(nir, stdout); \ )