1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[d3d9] Handle zero-sized draws

These return S_OK, because ofc they do.
This commit is contained in:
Joshua Ashton 2021-05-01 10:00:53 +01:00 committed by Joshie
parent 0f52c85d21
commit f0c1e89443

View File

@ -2333,6 +2333,9 @@ namespace dxvk {
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
UINT PrimitiveCount) {
if (unlikely(!PrimitiveCount))
return S_OK;
D3D9DeviceLock lock = LockDevice();
PrepareDraw(PrimitiveType);
@ -2363,6 +2366,9 @@ namespace dxvk {
UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCount) {
if (unlikely(!PrimitiveCount))
return S_OK;
D3D9DeviceLock lock = LockDevice();
PrepareDraw(PrimitiveType);
@ -2393,6 +2399,9 @@ namespace dxvk {
UINT PrimitiveCount,
const void* pVertexStreamZeroData,
UINT VertexStreamZeroStride) {
if (unlikely(!PrimitiveCount))
return S_OK;
D3D9DeviceLock lock = LockDevice();
PrepareDraw(PrimitiveType);
@ -2440,6 +2449,9 @@ namespace dxvk {
D3DFORMAT IndexDataFormat,
const void* pVertexStreamZeroData,
UINT VertexStreamZeroStride) {
if (unlikely(!PrimitiveCount))
return S_OK;
D3D9DeviceLock lock = LockDevice();
PrepareDraw(PrimitiveType);