asahi: Compress more texture targets
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 18 Mar 2023 22:16:40 +0000 (18:16 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 7 May 2023 13:00:59 +0000 (09:00 -0400)
commit7090b34ca574950bdaa1db3b2569e6a1ee067b4b
treee307ea58060e4d2ac929e129bfd2c0b173460122
parent9f39bbdee9bf802aa37684943830a1659055d1b7
asahi: Compress more texture targets

They should already work, we just need it enabled. The comment here claimed
(incorrectly) that there is no hardware support for linear 2D arrays. In fact,
there is support, it's just not advertised in the public Metal API. With some
awful tricks, I managed to reverse-engineer the hardware interface and hooked it
up, so we can take advantage of it now.

In fact, we can stop checking the target explicitly at all. The only case where
we can't compress is 1D/buffer textures, which are necessarily less than 16
height so will be dropped in the next check.

When I originally wrote this cuhange, dolphin's MeltyMoltenGalaxy trace with
specialized shaders at 4K was helped from 28fps to 43fps, which is massive :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
src/gallium/drivers/asahi/agx_pipe.c