upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/xma2_decoder.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-27 16:12:49 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-27 16:12:49 -0500
commit46f0ef36d464375b21a2e7cbd841bf2bcad35ac0 (patch)
tree3aa83802eae688c76f82d7bc39e17eb40099ae43 /runtime/src/xma2_decoder.cpp
parent77e4e85ff4bfc9b7a111510102f4e9d00eef18c5 (diff)
Lists: the tables asked at every draw that still used the standard hash are keyed by AddressHash
A list's texture states, its depth twins, the textures it brings up to date, their aliases, its root SRV and root UAV slots, and the submitting thread's set of staging buffers refreshed are keyed by addresses of ours or other integers and asked at every draw (`ensure_state` and `twin_use` for every texture a draw reads or writes, its targets and its depth; `defer_texture`; `root_srv_table`, `root_uav`). They were the last of the list's per-draw tables on the standard library's SipHash; the others (`refreshed`, `filled`, `gpu_written`, `bound`, `fresh_tables`, the list views) already use the repository's AddressHash. Same contents and results: nothing reads these tables in an order that matters, and the order was random per table before. What it is aimed at (CPU profile of 2026-11-27, Series X profile, about 9,500 draws a frame): `draw::readable` (18 % of `State::bind` on the threads that record lists) and the states `prepare_for` asks for after it, which take a list's `states` and `twins` at each texture; and `Batch::refresh_textures` on the submitting thread. New test `host::address_hash_tests`: the keys these tables hold (host copies 16 bytes to 64 KiB apart, root views with and without the bit for a view that begins early, fills) hash apart and spread. Measured there, for 4,096 keys in as many places: 1.1 to 2.1 keys looked at to find one (chance: 1.5), the fullest place 22 keys for copies 16 bytes apart. Not as even as SipHash for keys a few bytes apart; the tables are a list's own and small. From DoubleGhosty/cool_fox 74eda3b ("Lists: the per-draw maps keyed by address use AddressHash, not SipHash"), GPL-3.0-or-later. Beyond the source: the list's `texture_aliases` and the submission batch's `textures`, which this tree has and are keyed the same way. Checked: `cargo check --profile diag -p leonida --features diagnostics,mimalloc` (the 10 warnings of leonida-gpu from before, none new); `cargo test -p leonida-gpu --features diagnostics --lib address_hash_tests`: 1 passed. Not run in the game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions