From eb8ae5cc82c318b67f76b3b1f729f4e0ac72a100 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 14 Mar 2018 20:40:11 +0100 Subject: [PATCH] [d3d11] Allow 2D array view creation for 3D textures Fixes a regression that was introduced with the texture class refactor. Fixes validation issues in Hellblade. --- src/d3d11/d3d11_texture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 61ad2768a..22a1e3f1f 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -63,6 +63,9 @@ namespace dxvk { if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE) imageInfo.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; + if (Dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D) + imageInfo.flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR; + // Test whether the combination of image parameters is supported if (!CheckImageSupport(&imageInfo, VK_IMAGE_TILING_OPTIMAL)) { throw DxvkError(str::format(