From 56267ec14d058db689ba43c581c8d558c0c231b7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 3 Sep 2023 15:22:22 -0400 Subject: [PATCH] asahi: Forbid linear 1D Array images Porbably a theoretical case, but these fall down the 2D path so better not allow it at any rate. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 84e7b87..95f3b71 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -379,17 +379,20 @@ agx_linear_allowed(const struct agx_resource *pres) return false; switch (pres->base.target) { - /* 1D is always linear, even with image atomics */ + /* Buffers are always linear, even with image atomics */ case PIPE_BUFFER: - case PIPE_TEXTURE_1D: - case PIPE_TEXTURE_1D_ARRAY: /* Linear textures require specifying their strides explicitly, which only * works for 2D textures. Rectangle textures are a special case of 2D. * + * 1D textures only exist in GLES and are lowered to 2D to bypass hardware + * limitations. + * * However, we don't want to support this case in the image atomic * implementation, so linear shader images are specially forbidden. */ + case PIPE_TEXTURE_1D: + case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_2D: case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_RECT: -- 2.7.4