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/texture_cache/texture_cache.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/video_core/texture_cache/texture_cache.cpp') diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 8a9a32f44a..d1728603bf 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later @@ -7,8 +10,8 @@ namespace VideoCommon { TextureCacheChannelInfo::TextureCacheChannelInfo(Tegra::Control::ChannelState& state) noexcept - : ChannelInfo(state), graphics_image_table{gpu_memory}, graphics_sampler_table{gpu_memory}, - compute_image_table{gpu_memory}, compute_sampler_table{gpu_memory} {} + : ChannelInfo(state) +{} template class VideoCommon::ChannelSetupCaches; -- cgit v1.2.3