[formats] bcpack: reuse thread-local history rings across decodes #661
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!661
Loading…
Reference in a new issue
No description provided.
Delete branch "nyutt/merge-bcpack-tls-rings"
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?
Contributor role (optional)
What it changes
Merge: read fromcrates/darner-formats/src/bcpack.rs.plain(),bc7(), andbc6()allocate a fresh 256-entryVec(vec![...; HISTORY]) on the heap on every decoded BCPack block stream during DirectStorage texture streaming.Reuse
thread_local!RefCell<Vec<_>>rings (PLAIN_HISTORY,BC7_HISTORY,BC6_HISTORY) per decoder thread instead of allocating per call.pick()only reads slotsi - rwhere1 <= r <= i(already written during the current stream), so reusing the ring buffer is exact.How it was tested
d143979(based onorigin/Merge28a9b42)Merge.Merge.cargo test -p darner-formats --lib --locked-> 19 passed, 0 failedcargo clippy -p darner-formats --all-targets --locked-> 0 warningsdarner-formats --libcurrently has tests ingfx; in-game texture decode run needed to confirm streaming speedup.Checklist
Merge.Checked for overlap
[pr-performance][formats] bcpack: reuse thread-local history rings across decodesto [formats] bcpack: reuse thread-local history rings across decodesView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.