Skip draws with zero vertex count (#5149)

This commit is contained in:
gdkchan 2023-05-31 17:51:11 -03:00 committed by Matt Heins
parent b5f133cfb5
commit 07d8db2f1c

View file

@ -358,7 +358,7 @@ namespace Ryujinx.Graphics.Vulkan
public void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance)
{
if (!_program.IsLinked)
if (!_program.IsLinked || vertexCount == 0)
{
return;
}
@ -422,7 +422,7 @@ namespace Ryujinx.Graphics.Vulkan
public void DrawIndexed(int indexCount, int instanceCount, int firstIndex, int firstVertex, int firstInstance)
{
if (!_program.IsLinked)
if (!_program.IsLinked || indexCount == 0)
{
return;
}