mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
asahi: Don't allow linear depth/stencil buffers
We don't have a way to tell the ZLS hardware to use linear buffers, so if a buffer could be used for depth/stencil, we have to twiddle. This isn't a problem in practice, since depth/stencil buffers can't be shared across processes or mapped directly as linear. Fixes faults in depthstencil-render-miplevels, which was picking linear for one buffer because of a STAGING bind flag. But that won't work :-) Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21753>
This commit is contained in:
parent
e61d022313
commit
e61d6540e6
1 changed files with 4 additions and 0 deletions
|
|
@ -289,6 +289,10 @@ agx_linear_allowed(const struct agx_resource *pres)
|
|||
if (pres->base.last_level != 0)
|
||||
return false;
|
||||
|
||||
/* Depth/stencil buffers must not be linear */
|
||||
if (pres->base.bind & PIPE_BIND_DEPTH_STENCIL)
|
||||
return false;
|
||||
|
||||
switch (pres->base.target) {
|
||||
/* 1D is always linear */
|
||||
case PIPE_BUFFER:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue