mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
tu: Fix passthrough D24S8 attachments
We need to make sure that we don't trash a passthrough depth/stencil
aspect if we need to store the whole attachment by loading it
beforehand.
Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154>
This commit is contained in:
parent
d7f7aede15
commit
5377219ca0
1 changed files with 9 additions and 0 deletions
|
|
@ -733,6 +733,15 @@ attachment_set_ops(struct tu_device *device,
|
|||
att->load = true;
|
||||
if (stencil_store)
|
||||
att->store = true;
|
||||
/* If depth or stencil is passthrough (STORE_OP_NONE), then we need to
|
||||
* preserve the contents when storing by loading even if neither
|
||||
* component needs to be loaded.
|
||||
*/
|
||||
if ((store_op == VK_ATTACHMENT_STORE_OP_NONE_EXT ||
|
||||
stencil_store_op == VK_ATTACHMENT_STORE_OP_NONE_EXT) &&
|
||||
att->store) {
|
||||
att->load = true;
|
||||
}
|
||||
break;
|
||||
case VK_FORMAT_S8_UINT: /* replace load/store with stencil load/store */
|
||||
att->clear_mask = stencil_clear ? VK_IMAGE_ASPECT_COLOR_BIT : 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue