From 0558a3b2c507e404ae4b9840573348f2b00dde1a Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 21 Apr 2018 14:14:42 +0200 Subject: [PATCH] [d3d11] Fix incorrect cube face count calculation --- src/d3d11/d3d11_view_srv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_view_srv.cpp b/src/d3d11/d3d11_view_srv.cpp index 1c51024d..bf028777 100644 --- a/src/d3d11/d3d11_view_srv.cpp +++ b/src/d3d11/d3d11_view_srv.cpp @@ -259,8 +259,8 @@ namespace dxvk { case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: if (pDesc->TextureCubeArray.MipLevels > mipLevels - pDesc->TextureCubeArray.MostDetailedMip) pDesc->TextureCubeArray.MipLevels = mipLevels - pDesc->TextureCubeArray.MostDetailedMip; - if (pDesc->TextureCubeArray.NumCubes > (numLayers - pDesc->TextureCubeArray.First2DArrayFace / 6)) - pDesc->TextureCubeArray.NumCubes = (numLayers - pDesc->TextureCubeArray.First2DArrayFace / 6); + if (pDesc->TextureCubeArray.NumCubes > (numLayers - pDesc->TextureCubeArray.First2DArrayFace) / 6) + pDesc->TextureCubeArray.NumCubes = (numLayers - pDesc->TextureCubeArray.First2DArrayFace) / 6; break; case D3D11_SRV_DIMENSION_TEXTURE3D: