1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 04:08:52 +01:00

[d3d11] Only use cube arrays for regular cubemap views when enabled

This commit is contained in:
Robin Kertels 2021-09-24 19:48:48 +02:00 committed by Philip Rebohle
parent 86148ec070
commit 2735988fa2

View File

@ -144,13 +144,14 @@ namespace dxvk {
viewInfo.numLayers = 1;
break;
case D3D11_SRV_DIMENSION_TEXTURECUBE:
viewInfo.type = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
case D3D11_SRV_DIMENSION_TEXTURECUBE: {
const bool cubeArraysEnabled = pDevice->GetDXVKDevice()->features().core.features.imageCubeArray;
viewInfo.type = cubeArraysEnabled ? VK_IMAGE_VIEW_TYPE_CUBE_ARRAY : VK_IMAGE_VIEW_TYPE_CUBE;
viewInfo.minLevel = pDesc->TextureCube.MostDetailedMip;
viewInfo.numLevels = pDesc->TextureCube.MipLevels;
viewInfo.minLayer = 0;
viewInfo.numLayers = 6;
break;
} break;
case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY:
viewInfo.type = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;