asahi: Lower 1D to 2D
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 18 Mar 2023 20:42:35 +0000 (16:42 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Apr 2023 03:23:03 +0000 (03:23 +0000)
commit23880daa8dd7c12b6599b0c4f5ba7291a34120d5
tree228272947eae08f7cdeb6333a43fe1c8c358946e
parent098295f1a00dc27379779662b136725de0bec690
asahi: Lower 1D to 2D

Khronos APIs require that we support mipmapping even for 1D textures. However,
it isn't clear if this is supported in the hardware, and how it would work even
if it is. But 1D textures are pretty useless, so we just lower 1D textures to 2D
textures instead of worrying about that.

Fixes piles of Piglits relating to 1D textures.

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