Skip to content

Commit 3a29a4e

Browse files
committed
[dxvk] Ignore deferred discards that we can't fold into load ops
1 parent 80047db commit 3a29a4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/dxvk/dxvk_context.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,11 @@ namespace dxvk {
19121912
attachmentIndex = -1;
19131913
}
19141914

1915+
// Completely ignore pure discards here if we can't fold them into the next
1916+
// render pass, since all we'd do is add an extra barrier for no reason.
1917+
if (attachmentIndex < 0 && !clearAspects)
1918+
return;
1919+
19151920
bool is3D = imageView->image()->info().type == VK_IMAGE_TYPE_3D;
19161921

19171922
if ((clearAspects | discardAspects) == imageView->info().aspects && !is3D) {
@@ -1995,7 +2000,7 @@ namespace dxvk {
19952000

19962001
m_cmd->cmdBeginRendering(&renderingInfo);
19972002

1998-
if (useLateClear && clearAspects) {
2003+
if (useLateClear) {
19992004
VkClearAttachment clearInfo = { };
20002005
clearInfo.aspectMask = clearAspects;
20012006
clearInfo.clearValue = clearValue;

0 commit comments

Comments
 (0)