1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-23 10:54:14 +01:00

[dxvk] Ignore deferred discards that we can't fold into load ops

This commit is contained in:
Philip Rebohle 2025-02-07 22:49:19 +01:00
parent fcabffc1e5
commit 9b5499caf2

View File

@ -1912,6 +1912,11 @@ namespace dxvk {
attachmentIndex = -1; attachmentIndex = -1;
} }
// Completely ignore pure discards here if we can't fold them into the next
// render pass, since all we'd do is add an extra barrier for no reason.
if (attachmentIndex < 0 && !clearAspects)
return;
bool is3D = imageView->image()->info().type == VK_IMAGE_TYPE_3D; bool is3D = imageView->image()->info().type == VK_IMAGE_TYPE_3D;
if ((clearAspects | discardAspects) == imageView->info().aspects && !is3D) { if ((clearAspects | discardAspects) == imageView->info().aspects && !is3D) {
@ -1995,7 +2000,7 @@ namespace dxvk {
m_cmd->cmdBeginRendering(&renderingInfo); m_cmd->cmdBeginRendering(&renderingInfo);
if (useLateClear && clearAspects) { if (useLateClear) {
VkClearAttachment clearInfo = { }; VkClearAttachment clearInfo = { };
clearInfo.aspectMask = clearAspects; clearInfo.aspectMask = clearAspects;
clearInfo.clearValue = clearValue; clearInfo.clearValue = clearValue;