From 870dd18f92157f3d9fd041fb2b695c7b24c93f01 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 16 Aug 2022 08:43:52 +0000 Subject: [PATCH] [d3d9] Set VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT for render targets Closes: #2825 --- src/d3d9/d3d9_common_texture.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index 74100dfc8..8983a6f64 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -299,6 +299,13 @@ namespace dxvk { | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; } + const bool hasAttachmentFeedbackLoops = + m_device->GetDXVKDevice()->features().extAttachmentFeedbackLoopLayout.attachmentFeedbackLoopLayout; + const bool isRT = m_desc.Usage & D3DUSAGE_RENDERTARGET; + + if (isRT && hasAttachmentFeedbackLoops) + imageInfo.usage |= VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT; + if (ResourceType == D3DRTYPE_CUBETEXTURE) imageInfo.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;