From 6d9da5a8d73e39b300b150601eb9fcd8963a44d5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 19 May 2021 19:18:51 +0200 Subject: [PATCH] [d3d11] Don't use MAP_MODE_DIRECT for multi-plane images --- src/d3d11/d3d11_texture.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 6f31b1996..79513e8e7 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -507,7 +507,11 @@ namespace dxvk { // packing rules, so we need to copy that data into a buffer first if (GetPackedDepthStencilFormat(m_desc.Format)) return D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER; - + + // Multi-plane images have a sepcial memory layout in D3D11 + if (imageFormatInfo(pImageInfo->format)->flags.test(DxvkFormatFlag::MultiPlane)) + return D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER; + // Images that can be read by the host should be mapped directly in // order to avoid expensive synchronization with the GPU. This does // however require linear tiling, which may not be supported for all