From ac09dcd358bcbf9a87b489c4b98469d7e5f07ee9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 21 May 2022 21:44:27 -0400 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/asahi/agx_state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 117a8248cbe..e10a5843fd1 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -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;