mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 22:54:16 +01:00
[d3d11] Don't allow the creation of buffers with a size of zero
This commit is contained in:
parent
f5cec978c8
commit
00cf2a20a3
@ -200,6 +200,10 @@ namespace dxvk {
|
||||
|
||||
HRESULT D3D11Buffer::ValidateBufferProperties(
|
||||
const D3D11_BUFFER_DESC* pDesc) {
|
||||
// Zero-sized buffers are illegal
|
||||
if (!pDesc->ByteWidth)
|
||||
return E_INVALIDARG;
|
||||
|
||||
// Basic validation for structured buffers
|
||||
if ((pDesc->MiscFlags & D3D11_RESOURCE_MISC_BUFFER_STRUCTURED)
|
||||
&& ((pDesc->StructureByteStride == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user