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 <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448>
This commit is contained in:
Rhys Perry
2021-08-18 14:18:15 +01:00
committed by Marge Bot
parent 836470d433
commit 0d9ead8ca2

View File

@@ -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); \
)