From 8543f964132ddb347d1eeeb91e05a107c21a298b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 9 Feb 2019 01:00:40 +0100 Subject: [PATCH] [dxvk] Don't create flat 2D views for cube maps Fixes a rendering issue in Heroes of the Storm, where the game binds a cube map array to a resource slot which expects a 2D view. Refs #777. --- src/dxvk/dxvk_image.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_image.cpp b/src/dxvk/dxvk_image.cpp index ecab78de..ceb6b0ce 100644 --- a/src/dxvk/dxvk_image.cpp +++ b/src/dxvk/dxvk_image.cpp @@ -145,9 +145,11 @@ namespace dxvk { case VK_IMAGE_VIEW_TYPE_2D: case VK_IMAGE_VIEW_TYPE_2D_ARRAY: + this->createView(VK_IMAGE_VIEW_TYPE_2D, 1); + /* fall through */ + case VK_IMAGE_VIEW_TYPE_CUBE: case VK_IMAGE_VIEW_TYPE_CUBE_ARRAY: { - this->createView(VK_IMAGE_VIEW_TYPE_2D, 1); this->createView(VK_IMAGE_VIEW_TYPE_2D_ARRAY, info.numLayers); if (m_image->info().flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) {