nir,zink: Make lower_discard_if a common pass
This pass (lowering discard_if to control flow and unconditional discard) was originally written for Zink, but is useful for hardware that lacks conditional discard instructions like AGX. In theory AGX could implement a conditional discard with CSEL, but the vendor compiler uses a lowering like this one. Since I like not writing code, I'd like to use the pass that's already in tree. v2: Don't preserve dominance (Jason). Assert we don't see demotes or terminates (Jason). Add Mike's ack. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14217>
This commit is contained in:

committed by
Marge Bot

parent
538356e3e6
commit
aaf00a1b4d
@@ -143,6 +143,7 @@ files_libnir = files(
|
||||
'nir_lower_clip_halfz.c',
|
||||
'nir_lower_convert_alu_types.c',
|
||||
'nir_lower_variable_initializers.c',
|
||||
'nir_lower_discard_if.c',
|
||||
'nir_lower_discard_or_demote.c',
|
||||
'nir_lower_double_ops.c',
|
||||
'nir_lower_drawpixels.c',
|
||||
|
Reference in New Issue
Block a user