asahi: Forbid 2D Linear with images
There's no known use case, so forbidding this reduces the combinatorics required in the texture atomic lowering. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
This commit is contained in:
committed by
Marge Bot
parent
4e53da7265
commit
42fbbd2a73
@@ -355,17 +355,23 @@ agx_linear_allowed(const struct agx_resource *pres)
|
||||
return false;
|
||||
|
||||
switch (pres->base.target) {
|
||||
/* 1D is always linear */
|
||||
/* 1D is 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.
|
||||
*
|
||||
* However, we don't want to support this case in the image atomic
|
||||
* implementation, so linear shader images are specially forbidden.
|
||||
*/
|
||||
case PIPE_TEXTURE_2D:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
case PIPE_TEXTURE_RECT:
|
||||
if (pres->base.bind & PIPE_BIND_SHADER_IMAGE)
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
/* No other texture type can specify a stride */
|
||||
|
||||
Reference in New Issue
Block a user