nir: include __LINE__ in NIR_PASS validation results
useful when validation blows up in a file containing many intrinsic passes, to figure out which one is borked. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
This commit is contained in:
committed by
Marge Bot
parent
3b1d8796fb
commit
72bd3a6004
+15
-12
@@ -5406,18 +5406,21 @@ should_print_nir(UNUSED nir_shader *shader)
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define NIR_PASS(progress, nir, pass, ...) _PASS(pass, nir, { \
|
||||
nir_metadata_set_validation_flag(nir); \
|
||||
if (should_print_nir(nir)) \
|
||||
printf("%s\n", #pass); \
|
||||
if (pass(nir, ##__VA_ARGS__)) { \
|
||||
nir_validate_shader(nir, "after " #pass " in " __FILE__); \
|
||||
UNUSED bool _; \
|
||||
progress = true; \
|
||||
if (should_print_nir(nir)) \
|
||||
nir_print_shader(nir, stdout); \
|
||||
nir_metadata_check_validation_flag(nir); \
|
||||
} \
|
||||
#define NIR_STRINGIZE_INNER(x) #x
|
||||
#define NIR_STRINGIZE(x) NIR_STRINGIZE_INNER(x)
|
||||
|
||||
#define NIR_PASS(progress, nir, pass, ...) _PASS(pass, nir, { \
|
||||
nir_metadata_set_validation_flag(nir); \
|
||||
if (should_print_nir(nir)) \
|
||||
printf("%s\n", #pass); \
|
||||
if (pass(nir, ##__VA_ARGS__)) { \
|
||||
nir_validate_shader(nir, "after " #pass " in " __FILE__ ":" NIR_STRINGIZE(__LINE__)); \
|
||||
UNUSED bool _; \
|
||||
progress = true; \
|
||||
if (should_print_nir(nir)) \
|
||||
nir_print_shader(nir, stdout); \
|
||||
nir_metadata_check_validation_flag(nir); \
|
||||
} \
|
||||
})
|
||||
|
||||
#define NIR_PASS_V(nir, pass, ...) _PASS(pass, nir, { \
|
||||
|
||||
Reference in New Issue
Block a user