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>
This commit is contained in:
Georg Lehmann 2024-11-22 21:20:00 +01:00 committed by Marge Bot
parent 74f76f8df2
commit 5edae68966

View file

@ -226,6 +226,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: