From a79409ad02b92e772fd505109394eb2eadda4507 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 22 Jan 2019 14:52:35 +0100 Subject: [PATCH] Revert "[dxvk] Don't put rendering stage/access masks into image info" This reverts commit ce3642edd0924e2323638390f3655a650228b70f. We're actually going to need these when optimizing render pass barriers. --- src/d3d11/d3d11_texture.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 058dbef2..79af62e5 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -78,11 +78,20 @@ namespace dxvk { imageInfo.access |= VK_ACCESS_SHADER_READ_BIT; } - if (m_desc.BindFlags & D3D11_BIND_RENDER_TARGET) + if (m_desc.BindFlags & D3D11_BIND_RENDER_TARGET) { imageInfo.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + imageInfo.stages |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + imageInfo.access |= VK_ACCESS_COLOR_ATTACHMENT_READ_BIT + | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; + } - if (m_desc.BindFlags & D3D11_BIND_DEPTH_STENCIL) + if (m_desc.BindFlags & D3D11_BIND_DEPTH_STENCIL) { imageInfo.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; + imageInfo.stages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT + | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT; + imageInfo.access |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT + | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; + } if (m_desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS && !noUav) { imageInfo.usage |= VK_IMAGE_USAGE_STORAGE_BIT;