From 9b2ef88b7d0942ba3babb29e0c2fd086f96cd03a Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 13 Jul 2021 01:23:44 +0200 Subject: [PATCH] early-access version 1871 --- README.md | 2 +- src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 11 ++++++++++- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ddb1dc26..eb09f1d15 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1870. +This is the source code for early-access 1871. ## Legal Notice diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index ed57753c2..6738106e1 100755 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -197,7 +197,16 @@ void BufferCacheRuntime::BindIndexBuffer(PrimitiveTopology topology, IndexFormat } void BufferCacheRuntime::BindQuadArrayIndexBuffer(u32 first, u32 count) { - ReserveQuadArrayLUT(first + count, true); + const u32 total_indices = first + count; + if (total_indices == 0) { + ReserveNullIndexBuffer(); + scheduler.Record([buffer = *null_index_buffer, + index_type = quad_array_lut_index_type](vk::CommandBuffer cmdbuf) { + cmdbuf.BindIndexBuffer(buffer, 0, index_type); + }); + return; + } + ReserveQuadArrayLUT(total_indices, true); // The LUT has the indices 0, 1, 2, and 3 copied as an array // To apply these 'first' offsets we can apply an offset based on the modulus. diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 51b8336ec..96d56473a 100755 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -141,7 +141,7 @@ RasterizerVulkan::RasterizerVulkan(Core::Frontend::EmuWindow& emu_window_, Tegra pipeline_cache(*this, maxwell3d, kepler_compute, gpu_memory, device, scheduler, descriptor_pool, update_descriptor_queue, render_pass_cache, buffer_cache, texture_cache, gpu.ShaderNotify()), - query_cache{*this, maxwell3d, gpu_memory, device, scheduler}, accelerate_dma{ buffer_cache }, + query_cache{*this, maxwell3d, gpu_memory, device, scheduler}, accelerate_dma{buffer_cache}, fence_manager(*this, gpu, texture_cache, buffer_cache, query_cache, device, scheduler), wfi_event(device.GetLogical().CreateEvent()) { scheduler.SetQueryCache(query_cache);