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 <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:
@@ -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); \
|
||||
|
Reference in New Issue
Block a user