aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-11-01 04:29:44 -0500
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-11-01 08:40:04 -0500
commitab943ab4f32a0b394badc5c753a75ad8a43fb937 (patch)
tree1a983ec97b6dbff41aceb36a0bd15c5c0a37fe9d /src
parentb096fbea66468bc30c7608a7c1ef2a6bb15cafee (diff)
sw_blitter: keep scratch buffers of up to 2 MiB between blits
With 16 MiB, title 1's boot-time mip blits (64/16/4/1 MiB levels) left 16 buffers of 16 MiB, 256 MiB, in its 2D engines for the session. Larger buffers are now freed after the blit. (cherry picked from commit 0aba89fbb4337d1f3f915a19a9e279596c6c67f1)
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/sw_blitter/blitter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/engines/sw_blitter/blitter.cpp b/src/video_core/engines/sw_blitter/blitter.cpp
index 5f066254e9..78363bed11 100644
--- a/src/video_core/engines/sw_blitter/blitter.cpp
+++ b/src/video_core/engines/sw_blitter/blitter.cpp
@@ -177,10 +177,11 @@ struct SoftwareBlitEngine::BlitEngineImpl {
Common::ScratchBuffer<f32> intermediate_src;
Common::ScratchBuffer<f32> intermediate_dst;
- // Buffers grown for one huge surface (64-256 MiB) are freed after the blit rather than kept
- // for the rest of the session; the usual sizes stay.
+ // Buffers grown for one large surface are freed after the blit rather than kept for the rest
+ // of the session; small ones stay. 16 MiB kept title 1's boot mip blits (64/16/4/1 MiB levels)
+ // in 16 such buffers, 256 MiB, across its 2D engines.
void ReleaseLargeBuffers() {
- constexpr size_t LargeCapacity = 16_MiB;
+ constexpr size_t LargeCapacity = 2_MiB;
for (auto* const buffer : {&tmp_buffer, &src_buffer, &dst_buffer}) {
if (buffer->capacity() > LargeCapacity) {
buffer->release();