From 226afa96c909339f370d72267185509b89554a08 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 23 Jan 2018 14:19:52 +0100 Subject: [PATCH] Revert "[dxvk] Use VK_IMAGE_LAYOUT_GENERAL for all render targets" Actually this did not fix Homefront entirely and causes severe performance degradation if textures are SHADER_READ_ONLY_OPTIMAL. --- src/dxvk/dxvk_renderpass.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/dxvk/dxvk_renderpass.cpp b/src/dxvk/dxvk_renderpass.cpp index 3ce202b3b..be2a44533 100644 --- a/src/dxvk/dxvk_renderpass.cpp +++ b/src/dxvk/dxvk_renderpass.cpp @@ -78,10 +78,8 @@ namespace dxvk { desc.initialLayout = depthFmt.initialLayout; desc.finalLayout = depthFmt.finalLayout; - // TODO Using GENERAL is a workaround for bugs in either dxvk or - // RADV. Revert to VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL. depthRef.attachment = attachments.size(); - depthRef.layout = VK_IMAGE_LAYOUT_GENERAL; + depthRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachments.push_back(desc); } @@ -104,10 +102,8 @@ namespace dxvk { desc.initialLayout = colorFmt.initialLayout; desc.finalLayout = colorFmt.finalLayout; - // TODO Using GENERAL is a workaround for bugs in either dxvk - // or RADV. Revert to VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. colorRef[i].attachment = attachments.size(); - colorRef[i].layout = VK_IMAGE_LAYOUT_GENERAL; + colorRef[i].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; attachments.push_back(desc); }