mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 15:50:19 +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> (cherry picked from commit5377219ca0)
This commit is contained in:
parent
df2cf27bdb
commit
61d6cbf7aa
2 changed files with 10 additions and 1 deletions
|
|
@ -1184,7 +1184,7 @@
|
|||
"description": "tu: Fix passthrough D24S8 attachments",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "cb0f414b2aed88f48b2593dad833844be2f5f42b",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -726,6 +726,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