From 9a26d96c9827e753a5700bc7d37437944e074815 Mon Sep 17 00:00:00 2001 From: Fernando S Date: Tue, 20 Jul 2021 10:05:28 +0200 Subject: vk_buffer_cache: Fix quad index array with 0 vertices (#6627) --- src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 79876dfd0..7d4e6ea7b 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -161,6 +161,13 @@ void BufferCacheRuntime::BindIndexBuffer(PrimitiveTopology topology, IndexFormat } void BufferCacheRuntime::BindQuadArrayIndexBuffer(u32 first, u32 count) { + if (count == 0) { + ReserveNullBuffer(); + scheduler.Record([this](vk::CommandBuffer cmdbuf) { + cmdbuf.BindIndexBuffer(*null_buffer, 0, VK_INDEX_TYPE_UINT32); + }); + return; + } ReserveQuadArrayLUT(first + count, true); // The LUT has the indices 0, 1, 2, and 3 copied as an array -- cgit v1.2.3