asahi: Handle RECT textures as 2D

Rectangle textures are just 2D textures with unnormalized coordinates,
but we already handle unnormalized coordinates in the sampler state. So
we just need to alias RECT and 2D.

Fixes GALLIUM_HUD.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
This commit is contained in:
Alyssa Rosenzweig
2022-05-21 21:44:27 -04:00
parent 689be69681
commit ac09dcd358

View File

@@ -425,6 +425,7 @@ static enum agx_texture_dimension
agx_translate_texture_dimension(enum pipe_texture_target dim)
{
switch (dim) {
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_2D: return AGX_TEXTURE_DIMENSION_2D;
case PIPE_TEXTURE_2D_ARRAY: return AGX_TEXTURE_DIMENSION_2D_ARRAY;
case PIPE_TEXTURE_3D: return AGX_TEXTURE_DIMENSION_3D;