From 85db84a1b3c90e578402b76fcf3666c8523d790d Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 2 May 2020 18:48:46 +0200 Subject: [PATCH] [dxvk] Fix access mask in clearImageViewFb VK_ATTACHMENT_LOAD_OP_LOAD requires the read flags to be set. --- src/dxvk/dxvk_context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 7f8df7f9..4d1af093 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -2652,7 +2652,8 @@ namespace dxvk { if (imageView->info().aspect & VK_IMAGE_ASPECT_COLOR_BIT) { clearStages |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; - clearAccess |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; + clearAccess |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT + | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT; attachments.color[0].view = imageView; attachments.color[0].layout = imageView->pickLayout(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL); @@ -2663,7 +2664,8 @@ namespace dxvk { } else { clearStages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT; - clearAccess |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; + clearAccess |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT + | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT; attachments.depth.view = imageView; attachments.depth.layout = imageView->pickLayout(VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);