Repository navigation
Conversation
Dukestar69
left a comment
There was a problem hiding this comment.
Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090 + WARP):
- Batching contiguous descriptor copies in
mirror_copyunder oneSHADER_HEAPSlookup (with 256-slotsync_slotschunks and a clean fallback for cross-heap/mismatched-stride ranges) and making the test hookWHILE_PREPARINGthread-local are clean and sound. cargo test -p victory-gpu --lib descriptor:: -- --test-threads=1 --skip dynamic_slots_are_held_until_released(RTX 5090): 22 passed, 0 failed (includingdescriptor_copies_mirror_batched_slots_before_and_after_host_creation).VICTORY_FORCE_WARP=1 cargo test -p victory-gpu --lib descriptor::tests::descriptor_copies_mirror_batched_slots_before_and_after_host_creation -- --test-threads=1(WARP): 1 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Port upstream Marvisak#3265: batch contiguous shader-visible descriptor mirroring with a single heap lookup, bounded sync batches, and the original per-handle fallback for cross-heap or incompatible ranges. Preserve overlapping-copy and self-copy semantics. Isolate the descriptor preparation test hook per thread.
|
WARP verification report (test report only, no code changes)
AI-assisted: verification by Claude Code (Claude Sonnet 5.5) |
|
This PR and #3055 merge cleanly but don't compile together. On #3055 replaces the runtime use of AI-assisted (Claude Code) |
CopyDescriptorsSimple currently looks up the shader-visible destination heap and locks its pending queue separately for every descriptor. A contiguous, aligned copy into one heap now looks it up once. Pending indices are appended together. Initialized heaps use the existing sync_slots path in bounded batches to skip host slots whose record is already current. Ranges crossing heap boundaries or using a different stride retain the existing per-slot lookup.
An exact self-copy skips the guest byte write and still mirrors the destination, so records written directly into the heap can still become visible. Overlapping ranges with different starts still use memmove semantics. The change is shared across D3D12 adapters and adds no driver-specific defaults.
A synthetic 304-descriptor copy goes from 304 registry lookups to one on this path. The regression covers lazy heap initialization and verifies that a self-copy mirrors a new slot, clears a stale slot, and retains an occupied slot beyond the first batch. The full WARP GPU suite passed twice (247 passed, one ignored); strict Clippy passed. Scoped the existing test-only preparation hook to its own test thread after observing an unrelated test consume the hook during a parallel run. The new regression also passed on a physical NVIDIA RTX 5080 Laptop GPU with both PRs applied. AMD hardware validation remains open. No title files were used.
Inspired by reducing descriptor-store work and batching heap-record work in cool_fox.