From f9c2e43ffcec66964332fb56b0bc1b11055609ab Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 24 Oct 2019 16:57:06 +0200 Subject: [PATCH] [d3d11] Don't set HOST pipeline stage and access flags for resources The backend does not and will not use that information at all. --- src/d3d11/d3d11_buffer.cpp | 10 ---------- src/d3d11/d3d11_shader.cpp | 6 ++---- src/d3d11/d3d11_texture.cpp | 7 ------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/d3d11/d3d11_buffer.cpp b/src/d3d11/d3d11_buffer.cpp index d523332cf..5fe8621f6 100644 --- a/src/d3d11/d3d11_buffer.cpp +++ b/src/d3d11/d3d11_buffer.cpp @@ -58,16 +58,6 @@ namespace dxvk { | VK_ACCESS_SHADER_WRITE_BIT; } - if (pDesc->CPUAccessFlags & D3D11_CPU_ACCESS_WRITE) { - info.stages |= VK_PIPELINE_STAGE_HOST_BIT; - info.access |= VK_ACCESS_HOST_WRITE_BIT; - } - - if (pDesc->CPUAccessFlags & D3D11_CPU_ACCESS_READ) { - info.stages |= VK_PIPELINE_STAGE_HOST_BIT; - info.access |= VK_ACCESS_HOST_READ_BIT; - } - if (pDesc->MiscFlags & D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS) { info.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT; info.stages |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT; diff --git a/src/d3d11/d3d11_shader.cpp b/src/d3d11/d3d11_shader.cpp index ddb3d62e3..a5ab47b12 100644 --- a/src/d3d11/d3d11_shader.cpp +++ b/src/d3d11/d3d11_shader.cpp @@ -54,10 +54,8 @@ namespace dxvk { DxvkBufferCreateInfo info; info.size = m_shader->shaderConstants().sizeInBytes(); info.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; - info.stages = util::pipelineStages(m_shader->stage()) - | VK_PIPELINE_STAGE_HOST_BIT; - info.access = VK_ACCESS_UNIFORM_READ_BIT - | VK_ACCESS_HOST_WRITE_BIT; + info.stages = util::pipelineStages(m_shader->stage()); + info.access = VK_ACCESS_UNIFORM_READ_BIT; VkMemoryPropertyFlags memFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 19d3fbe35..d5c3b92c5 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -128,15 +128,8 @@ namespace dxvk { // to enable linear tiling, and DXVK needs to be aware that // the image can be accessed by the host. if (m_mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_DIRECT) { - imageInfo.stages |= VK_PIPELINE_STAGE_HOST_BIT; imageInfo.tiling = VK_IMAGE_TILING_LINEAR; imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; - - if (m_desc.CPUAccessFlags & D3D11_CPU_ACCESS_WRITE) - imageInfo.access |= VK_ACCESS_HOST_WRITE_BIT; - - if (m_desc.CPUAccessFlags & D3D11_CPU_ACCESS_READ) - imageInfo.access |= VK_ACCESS_HOST_READ_BIT; } // We must keep LINEAR images in GENERAL layout, but we