From 1abd205216f56756e8020f781d7d817e2b40f241 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 29 Nov 2021 16:55:35 +0100 Subject: [PATCH] [d3d11] Compute image data layout for unmapped textures We sometimes need this information when uploading image data. Fixes #2380. --- src/d3d11/d3d11_texture.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 9faaae6e58a..69d75602dda 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -270,6 +270,7 @@ namespace dxvk { layout.DepthPitch = vkLayout.depthPitch; } break; + case D3D11_COMMON_TEXTURE_MAP_MODE_NONE: case D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER: case D3D11_COMMON_TEXTURE_MAP_MODE_STAGING: { auto packedFormatInfo = imageFormatInfo(m_packedFormat); @@ -304,9 +305,6 @@ namespace dxvk { layout.Offset += size; } } break; - - case D3D11_COMMON_TEXTURE_MAP_MODE_NONE: - break; /* no op */ } // D3D wants us to return the total subresource size in some instances