From 6feeb4bbba7e0a3155da9af619ee8b23d1367fb2 Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 2 Jan 2019 10:32:43 -0600 Subject: [PATCH] Only set 2D_ARRAY_COMPATIBLE on 3D textures that will be rendered to. It is impossible to create a 2D or 2D array SRV or UAV from a 3D texture. Nor is it possible to create a DSV from a 3D texture. Therefore, the only time we ever need to create a 2D array view from a 3D texture is when we're going to render to it. --- src/d3d11/d3d11_texture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 33af055e6..b27d7b8c0 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -101,7 +101,8 @@ namespace dxvk { if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE) imageInfo.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; - if (Dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D) + if (Dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D && + (m_desc.BindFlags & D3D11_BIND_RENDER_TARGET)) imageInfo.flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR; // Some image formats (i.e. the R32G32B32 ones) are