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 <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
Alyssa Rosenzweig
2023-09-03 15:22:22 -04:00
committed by Marge Bot
parent fb60626260
commit 56267ec14d
+6 -3
View File
@@ -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: