GPU: a listed view is looked up once a slot, not three times #268
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/268"
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?
Imported from PastiiJay/klbf-lab. Originally posted by Joly0 on 2026-11-29T17:03:27Z.
HostHeap::make_listed_inasked its per-recording map of made views three times for every slot it fills (contains_key,get,get_mut). It runs for about 110,000 slots a frame on the title's recording threads, so this changes it to oneentrylookup. The slots are worked out from the thread heap's start and step, so the entry's borrow doesn't get in the way. The heap field stays (as_heap) to keep that range alive. Nothing else changes: the same views are made, copied and kept.Measured on v26.11.14 (the commit applies cleanly there and on
stable-amd): RX 7800 XT, Ryzen 9 7945HX, 32 GB, Profile S with FSR and frame generation, 2-minute bench,VICTORY_LIST_CALLS=1, two runs of each in the order base, change, change, base:make_listed)The slot copy part is 4 % cheaper in both runs. The whole call is about 1 % cheaper, which is too small to show in fps.
Checks:
cargo clippy -p victory-gpu --all-targets -- -D warningswith and without--features diagnostics.cargo test -p victory-gpu --features diagnosticson WARP passes, apart frompipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws, which fails on WARP on unchangedstable-amdtoo.🤖 Generated with Claude Code
Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-29T17:06:18Z.
thanks @Joly0, a small one with a clear win on the hot path, nice. it's passed on for the next round.
View 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.