mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 03:18:08 +02:00
agx: Fuse (unmasked) extr_agx
This will clean up genxml unpack code and is needed for parity with the assembly we write by hand. This way we get the win for all shaders. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498>
This commit is contained in:
parent
0cde7b794c
commit
5500e02a61
1 changed files with 8 additions and 1 deletions
|
|
@ -83,6 +83,13 @@ lower_pack = [
|
|||
('isub', 32, 'bits'))),
|
||||
]
|
||||
|
||||
fuse_extr = []
|
||||
for start in range(32):
|
||||
fuse_extr.extend([
|
||||
(('ior', ('ushr', 'a@32', start), ('ishl', 'b@32', 32 - start)),
|
||||
('extr_agx', a, b, start, 0)),
|
||||
])
|
||||
|
||||
# (x * y) + s = (x * y) + (s << 0)
|
||||
def imad(x, y, z):
|
||||
return ('imadshl_agx', x, y, z, 0)
|
||||
|
|
@ -158,7 +165,7 @@ def run():
|
|||
print(nir_algebraic.AlgebraicPass("agx_nir_lower_algebraic_late",
|
||||
lower_sm5_shift + lower_pack).render())
|
||||
print(nir_algebraic.AlgebraicPass("agx_nir_fuse_algebraic_late",
|
||||
fuse_imad).render())
|
||||
fuse_extr + fuse_imad).render())
|
||||
print(nir_algebraic.AlgebraicPass("agx_nir_opt_ixor_bcsel",
|
||||
ixor_bcsel).render())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue