Skip draws with zero vertex count (#5149)

This commit is contained in:
gdkchan 2023-05-31 17:51:11 -03:00 committed by GitHub
parent c27e453fd3
commit 232237bf28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}