mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Don't allow creation of 0x0-sized textures
This commit is contained in:
parent
bf5476900a
commit
837a3f5787
@ -256,6 +256,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
HRESULT D3D11CommonTexture::NormalizeTextureProperties(D3D11_COMMON_TEXTURE_DESC* pDesc) {
|
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)))
|
if (FAILED(DecodeSampleCount(pDesc->SampleDesc.Count, nullptr)))
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user