agx: Optimize lower_resinfo for cube maps
authorHampus Linander <hampus.linander@gmail.com>
Sun, 8 Jan 2023 00:18:55 +0000 (01:18 +0100)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 4 Feb 2023 16:13:37 +0000 (11:13 -0500)
commitb73b5cc71a70e06885aae672fcd4a30d8cc3507e
treebade46561a25182cd82f3301b3bf07b822f6ca76
parent9ab1c0d83b819371df2fa8e90fa62a1542cefa38
agx: Optimize lower_resinfo for cube maps

We can avoid reading both width and height when the texture is a cube map, and
we do so more simply by relying on CSE+DCE (Alyssa).

Closes: #7541
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20628>
src/asahi/compiler/agx_nir_lower_texture.c