diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-05-29 03:28:47 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-05-29 03:28:47 +0200 |
| commit | def03f6589007026572816baed73f762818f05bb (patch) | |
| tree | 100949ba575fe2eb66492d10a7c7cc0b825bf3f6 /src/video_core/texture_cache/texture_cache.cpp | |
| parent | 5ea24621cf8e75fe20ff35c4e41a05baf9497be8 (diff) | |
[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


Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3874
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.cpp')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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<VideoCommon::TextureCacheChannelInfo>; |
