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>
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: