mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 06:20:09 +01:00
iris: Use IRIS_DOMAIN_DEPTH_WRITE for read only depth/stencil.
We were using IRIS_DOMAIN_OTHER_READ for read-only depth/stencil access in an attempt to avoid unnecessary flushing; IRIS_DOMAIN_DEPTH_WRITE could indicate read-write access. However, IRIS_DOMAIN_OTHER_READ is clearly the wrong domain. Depth and stencil data is read via the depth cache, while IRIS_DOMAIN_OTHER_READ currently corresponds to the sampler cache and constant cache together (although this will change in future patches). It's unclear whether this hack was useful. For now, just drop it and use the correct depth cache domain, even if it's marked as read-write. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15275>
This commit is contained in:
parent
6a264e7024
commit
8e0ff0275d
1 changed files with 4 additions and 7 deletions
|
|
@ -5195,21 +5195,18 @@ pin_depth_and_stencil_buffers(struct iris_batch *batch,
|
|||
iris_get_depth_stencil_resources(zsbuf->texture, &zres, &sres);
|
||||
|
||||
if (zres) {
|
||||
const enum iris_domain access = cso_zsa->depth_writes_enabled ?
|
||||
IRIS_DOMAIN_DEPTH_WRITE : IRIS_DOMAIN_OTHER_READ;
|
||||
iris_use_pinned_bo(batch, zres->bo, cso_zsa->depth_writes_enabled,
|
||||
access);
|
||||
IRIS_DOMAIN_DEPTH_WRITE);
|
||||
if (zres->aux.bo) {
|
||||
iris_use_pinned_bo(batch, zres->aux.bo,
|
||||
cso_zsa->depth_writes_enabled, access);
|
||||
cso_zsa->depth_writes_enabled,
|
||||
IRIS_DOMAIN_DEPTH_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
if (sres) {
|
||||
const enum iris_domain access = cso_zsa->stencil_writes_enabled ?
|
||||
IRIS_DOMAIN_DEPTH_WRITE : IRIS_DOMAIN_OTHER_READ;
|
||||
iris_use_pinned_bo(batch, sres->bo, cso_zsa->stencil_writes_enabled,
|
||||
access);
|
||||
IRIS_DOMAIN_DEPTH_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue