From 232237bf287c4cd29b3d1032b61286af0f7fffef Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 31 May 2023 17:51:11 -0300 Subject: [PATCH] Skip draws with zero vertex count (#5149) --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index dcffa247..1ee03536 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -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; }