From bc853d0e48925c78293d4fd4229b8ada798da2a5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 18 Sep 2019 13:15:22 +0200 Subject: [PATCH] [d3d11] Only use mapped buffer for images if bind flags are non-zero We really shouldn't use the intermediate buffer for DYNAMIC images that can only ever be used for copy commands, since the copies will be redundant. --- src/d3d11/d3d11_texture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index d588ccf8..45839c6c 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -415,6 +415,7 @@ namespace dxvk { // writing the image to device-local image may be more efficient than // reading its contents from host-visible memory. if (m_desc.Usage == D3D11_USAGE_DYNAMIC + && m_desc.BindFlags != 0 && m_desc.TextureLayout != D3D11_TEXTURE_LAYOUT_ROW_MAJOR) return D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER;