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:
@@ -4347,7 +4347,7 @@ static inline bool should_print_nir(UNUSED nir_shader *shader) { return false; }
|
|||||||
if (should_print_nir(nir)) \
|
if (should_print_nir(nir)) \
|
||||||
printf("%s\n", #pass); \
|
printf("%s\n", #pass); \
|
||||||
if (pass(nir, ##__VA_ARGS__)) { \
|
if (pass(nir, ##__VA_ARGS__)) { \
|
||||||
nir_validate_shader(nir, "after " #pass); \
|
nir_validate_shader(nir, "after " #pass " in " __FILE__); \
|
||||||
UNUSED bool _; \
|
UNUSED bool _; \
|
||||||
progress = true; \
|
progress = true; \
|
||||||
if (should_print_nir(nir)) \
|
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)) \
|
if (should_print_nir(nir)) \
|
||||||
printf("%s\n", #pass); \
|
printf("%s\n", #pass); \
|
||||||
pass(nir, ##__VA_ARGS__); \
|
pass(nir, ##__VA_ARGS__); \
|
||||||
nir_validate_shader(nir, "after " #pass); \
|
nir_validate_shader(nir, "after " #pass " in " __FILE__); \
|
||||||
if (should_print_nir(nir)) \
|
if (should_print_nir(nir)) \
|
||||||
nir_print_shader(nir, stdout); \
|
nir_print_shader(nir, stdout); \
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user