Repository navigation
Conversation
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
|
A data point for the buffer-lookup cache in this PR: on main + #1978 + #2821 + #3258 + #3274 + #3275, a rough thread-local stand-in for it in front of AI use: Claude Code (Claude Opus 5.5) ran the measurement and drafted this comment. |
|
@wbkepler I rebased this PR onto current Branch:
To take it: Or from a fresh How the conflicts were resolved
Tests (
Your four tests pass on all three. Measured with the list bench (fork branch
¹ main + #1978 + #2821 + #3258 + #3274 + #3275. On that stack, this PR overlaps #2821 (both turn The 1-thread cost doesn't change. The gain is in contention on 5 threads, as in the thread-local experiment (−24% there). Hardware: RTX 4060 Laptop, i7-14650HX, Windows 11. Foreign CPU load: about six unrelated Python jobs (four CPU-bound) ran throughout, so absolute numbers are higher than in my earlier comments. Builds were interleaved run by run. Not measured: the title in game. AI use: Claude Code (Claude Opus 5.5) did the rebase and conflict resolution, ran the tests and measurements and drafted this comment. |
Summary
Reduces multi-thread CPU recording contention and repeated lookup overhead in
victory-gpu:Mutextables queried on per-draw/dispatch/bind hot paths tostd::sync::RwLockwith shared.read()hit paths (shadow::{BUFFERS, LOOSE},descriptor::{SHADER_HEAPS, VIEWS},HostHeap::made,texture::{STAGING, HOST_WRITTEN},resource::PLACED_TEXTURES,draw::host_signature::MADE,pipeline::SHADERS), using.iter().rev().findindescriptor::shader_slot.HostListinlineShadowCache(with nested-buffer-safeCachedRange::Subrange/Exactinterval bounds) andViewCache, cleared onHostList::reset()and invalidated viaAcquire/ReleaseAtomicU64generation counters bumped under write locks inshadow::{register, unregister}anddescriptor::forget.draw.rsper-draw VB/IB/root-view/indirect/table/readable lookups throughHostList::{find_shadow, lookup_view}andHostHeap::mirror_cached.Verification
cargo clippy --workspace --all-targets&-p victory --features diagnostics --all-targets— passed (0 new warnings)cargo test --workspace— passedVICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib --features diagnostics host::tests— passed (6/6)cargo xtask policy— passed (151 files ok)