mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
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:
parent
cf9ee6d432
commit
836470d433
1 changed files with 1 additions and 0 deletions
|
|
@ -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); \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue