From def03f6589007026572816baed73f762818f05bb Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 29 May 2026 03:28:47 +0200 Subject: [video_core] fix redundant resize-copy overload and just use default-init resize, to reduce stutter on Mario BP (#3874) before vs. after Mario Brothership kept remaking vectors of sizes 256 AND 4095 (TIC) and 1215 AND 524287 (TSC) every single frame, which resulted in a noticeable overhead the main cause was because of using `resize(n, c)` instead of `resize(n)` (also to aggressively resize for more room beforehand), the copy overload of resize does a copy of... well.. the value over the entire vector, additionally __append() keeps getting called because the capacity goes bonkers and all over the place ![image](/attachments/e3ba07fb-1c85-4d56-9b81-bb16a8150c15) ![image](/attachments/5c4eba26-015a-4c95-9b24-b41695a62e51) Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3874 Reviewed-by: crueter Reviewed-by: CamilleLaVey Reviewed-by: MaranBr --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp') diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3c3367cfd8..d99a650acc 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -351,7 +351,7 @@ void RasterizerVulkan::DrawTexture() { FlushWork(); std::scoped_lock l{texture_cache.mutex}; - texture_cache.SynchronizeGraphicsDescriptors(); + texture_cache.SynchronizeDescriptors(false); texture_cache.UpdateRenderTargets(false); UpdateDynamicStates(); @@ -359,7 +359,7 @@ void RasterizerVulkan::DrawTexture() { query_cache.NotifySegment(true); query_cache.CounterEnable(VideoCommon::QueryType::ZPassPixelCount64, maxwell3d->regs.zpass_pixel_count_enable); const auto& draw_texture_state = maxwell3d->draw_manager.draw_texture_state; - const auto& sampler = texture_cache.GetGraphicsSampler(draw_texture_state.src_sampler); + const auto& sampler = texture_cache.GetSampler(draw_texture_state.src_sampler, true); const auto& texture = texture_cache.GetImageView(draw_texture_state.src_texture); const auto* framebuffer = texture_cache.GetFramebuffer(); -- cgit v1.2.3