aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/loader.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:36:25 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:36:25 -0400
commitd4707880104224e73d665a976882cb51bfc13a6a (patch)
treedac848f073f0a162b8173543b163a90a32c6b23e /src/core/loader/loader.cpp
parent9a5a1fbdf68859db978b0082f2bd257e6faa60c4 (diff)
textures: (un)swizzle large images in bands on the transcode workers
Texture uploads and the software 2D blitter convert between block-linear and linear layouts on the GPU thread, one row at a time on one core (~1.4 GB/s). In Mario Kart World's first minute that held the GPU thread for up to 340 ms at a time (an 8192x8192 BC7 texture of 341 MiB), and for 15-80 ms per blit through dozens of RGBA32F 2D blits into its terrain layers while a course loads. Swizzle and the subrect copies now split images of 4 MiB or more into bands of whole block rows (about 1 MiB each), which read and write bytes of their own on both sides, and run them with ParallelFor: the calling thread and whichever transcode workers are free take bands until none are left, so a pool busy with asynchronous decodes never makes a copy slower than before. Mario Kart World, first 45 s: the 341 MiB upload 340 -> 187 ms, the 144 MiB one 106 -> 75 ms, 37 software blits 857 -> 623 ms in all; frames render as before.
Diffstat (limited to 'src/core/loader/loader.cpp')
0 files changed, 0 insertions, 0 deletions