perf(victory-gpu): reuse capped thread-local scratch buffer in texback::land_tiled #418
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!418
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-418"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Lewandox on GitHub · 2026-11-26 18:01 UTC · original
Lewandox:perf/texback-reuse-tile-scratch→main· +69 −15 · 2 files · 2 commits · merged 2026-11-26 18:41 UTCSummary
Reuses a capped thread-local scratch buffer for tiled texture readbacks in
third_party/victory/crates/victory-gpu/src/texback.rs:land_tiled:land_tiledallocated and zeroed a freshvec![0u8; back.size]on every non-packed texture readback (e.g. padded linear or swizzled ocean readbacks).TILED_SCRATCHbuffer (TILED_SCRATCH_CAP = 4 MiB), dropping oversized buffers immediately on return so idle threads never retain large allocations.padded_linear_readback_reuses_capped_cpu_scratchverifying consecutive padded readbacks preserve row padding and reuse the same thread-local scratch allocation.Verification
cargo test -p victory-gpu --lib texback::tests(default and--features diagnostics)cargo xtask policyinsidethird_party/victory