diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index f9aacc317..9ba60418d 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -1037,6 +1037,9 @@ namespace dxvk { UINT StartVertexLocation) { D3D10DeviceLock lock = LockContext(); + if (unlikely(!VertexCount)) + return; + VkDrawIndirectCommand draw = { }; draw.vertexCount = VertexCount; draw.instanceCount = 1u; @@ -1054,6 +1057,9 @@ namespace dxvk { INT BaseVertexLocation) { D3D10DeviceLock lock = LockContext(); + if (unlikely(!IndexCount)) + return; + VkDrawIndexedIndirectCommand draw = { }; draw.indexCount = IndexCount; draw.instanceCount = 1u; @@ -1073,6 +1079,9 @@ namespace dxvk { UINT StartInstanceLocation) { D3D10DeviceLock lock = LockContext(); + if (unlikely(!VertexCountPerInstance || !InstanceCount)) + return; + VkDrawIndirectCommand draw = { }; draw.vertexCount = VertexCountPerInstance; draw.instanceCount = InstanceCount; @@ -1092,6 +1101,9 @@ namespace dxvk { UINT StartInstanceLocation) { D3D10DeviceLock lock = LockContext(); + if (unlikely(!IndexCountPerInstance || !InstanceCount)) + return; + VkDrawIndexedIndirectCommand draw = { }; draw.indexCount = IndexCountPerInstance; draw.instanceCount = InstanceCount; @@ -1186,6 +1198,9 @@ namespace dxvk { UINT ThreadGroupCountZ) { D3D10DeviceLock lock = LockContext(); + if (unlikely(!ThreadGroupCountX || !ThreadGroupCountY || !ThreadGroupCountZ)) + return; + if (unlikely(HasDirtyComputeBindings())) ApplyDirtyComputeBindings();