nir/move_discards_to_top: don't move across is_helper_invocation

This was obviously broken because demote results in more helper invocations.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b447f5049b ("nir: Add a discard optimization pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32310>
(cherry picked from commit 5edae68966)
This commit is contained in:
Georg Lehmann
2024-11-22 21:20:00 +01:00
committed by Dylan Baker
parent e497a5ef40
commit e27ac0d686
2 changed files with 3 additions and 1 deletions

View File

@@ -284,7 +284,7 @@
"description": "nir/move_discards_to_top: don't move across is_helper_invocation",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "b447f5049b6d68fd80b7337bc1f7c79b1b1a4765",
"notes": null

View File

@@ -187,6 +187,8 @@ opt_move_discards_to_top_impl(nir_function_impl *impl)
case nir_intrinsic_shuffle_down:
case nir_intrinsic_rotate:
case nir_intrinsic_masked_swizzle_amd:
case nir_intrinsic_is_helper_invocation:
case nir_intrinsic_load_helper_invocation:
instr->pass_flags = STOP_PROCESSING_INSTR_FLAG;
goto break_all;
case nir_intrinsic_terminate_if: