Skip to content

Commit

Permalink
[d3d11] Don't allow creation of 0x0-sized textures
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Sep 18, 2018
1 parent bf54769 commit 837a3f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/d3d11/d3d11_texture.cpp
Expand Up @@ -256,6 +256,9 @@ namespace dxvk {


HRESULT D3D11CommonTexture::NormalizeTextureProperties(D3D11_COMMON_TEXTURE_DESC* pDesc) {
if (pDesc->Width == 0 || pDesc->Height == 0 || pDesc->Depth == 0)
return E_INVALIDARG;

if (FAILED(DecodeSampleCount(pDesc->SampleDesc.Count, nullptr)))
return E_INVALIDARG;

Expand Down

0 comments on commit 837a3f5

Please sign in to comment.