From 127e037627783b099474558dd9f273b2a9645383 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 11 Oct 2019 17:11:01 +0200 Subject: [PATCH] [d3d11] Validate texture array size Fixes a wine test failure and possibly prevents invalid Vulkan API usage. --- src/d3d11/d3d11_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index ed74e0fc9..19d3fbe35 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -274,7 +274,7 @@ namespace dxvk { HRESULT D3D11CommonTexture::NormalizeTextureProperties(D3D11_COMMON_TEXTURE_DESC* pDesc) { - if (pDesc->Width == 0 || pDesc->Height == 0 || pDesc->Depth == 0) + if (pDesc->Width == 0 || pDesc->Height == 0 || pDesc->Depth == 0 || pDesc->ArraySize == 0) return E_INVALIDARG; if (FAILED(DecodeSampleCount(pDesc->SampleDesc.Count, nullptr)))