Opt-in copy-pipeline, second-queue and staging experiments for the title-memory path (Radeon) #32
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/32"
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 DexNom/VIctory. Originally posted by Amaz1ny on 2026-11-25T19:40:32Z.
What
A set of opt-in experiments on the title-memory copy pipeline. The
environment variables are off by default; the baseline path is
unchanged. Plus a fix for typed SRV component types. Developed and measured
on a Ryzen 7 5700X3D + Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010,
Windows 11).
VICTORY_COPY_PLAIN=1VICTORY_QUEUE2=1/2/3VICTORY_MATERIAL_TEXTURE_DEMAND=1VICTORY_STAGING_POOL=0VICTORY_INDIRECT_CARD_BUDGET=0WriteBufferImmediate) instead of a CPU-mapped bufferVICTORY_FILL_WAIT=1VICTORY_TEXTURE_SWEEP=0Also:
crates/victory-shader/src/emit/typed_views.rs— host SRV componenttypes and declared ranges for tracked guest descriptors. The tiled-lighting
UINT view table is kept test-only pending further validation on Navi 32.
Why
ZwReadVirtualMemory(~100 MB/frame, run 225's profile); the in-place copy moves that to the
processor's own copy speed.
of the landing thread's 176–229 (run 118). The second queue pair runs it
on the card's copy engine beside the engine that draws.
frame);
VICTORY_WIDE_REFRESH/VICTORY_WIDE_MERGEspread both overworker threads.
4x the pixels.
Result
One measurement on one machine, with the switches above enabled.
cargo test --workspace --locked: all suites pass (incl. 212victory-shader, 237 victory-gpu; BVH intersection tests run on the GPU,
bit-exact).
cargo build --locked --release -p victory --features diagnostics --bins:clean.
Imported from DexNom/VIctory. Originally posted by j-fuxa on 2026-11-26T01:41:16Z.
Hardware-driver data for opening title memory as a host heap in place
The header of
inplace.rssays its figures come from the software adapter and that what the card's driver adds is what the probe is for. These are measurements from a hardware driver: an RTX 4060 Laptop 8 GB, Windows 11, 32 GB RAM, in our own fork's in-place path. They are NVIDIA numbers from a different code base.OpenExistingHeapFromFileMappingreturnsE_INVALIDARGforSEC_RESERVEsections.ID3D12Device13::OpenExistingHeapFromAddress1(addr, size)opens committed, 64 KiB-aligned sub-ranges as custom write-back L0 heaps. Placed resources needD3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER, and textures only row-major. While a heap is open,VirtualProtect,VirtualFreeandUnmapViewOfFileon its pages fail with error 87.A pitfall, in case a read-modify-write is ever used to dirty pages for
GetWriteWatch.AtomicU8::fetch_add(0)is idempotent, and release builds lower it to a plain load. The page then stays clean, and dev-profile tests pass while release fails.lock add byte ptr [p], 0does dirty it.watch.rsin this repo useswrite_volatile, so it is not affected today.Caveats. One GPU, one A/B run, and the GPU-time increase was not isolated. We have not measured Radeon.
Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-26T23:06:20Z.
Independent physical RTX 5070 check at
44cf836: I switched only the fixture's WARP selection to the NVIDIA adapter and made the fixture fail instead of silently skipping. Four of five secondary-queue tests passed. In the landing-buffer test,queue2.rs:988readscardasCOPY_SOURCEon the same direct list immediately after writing it asCOPY_DEST; all 12 direct readbacks returned the old0xDEAD0000+kvalues rather than0xC000+k. In a scratch control, adding aCOPY_DEST→COPY_SOURCEtransition between those copies made all five tests pass, including both direct and down-readback assertions. This identifies a fixture issue; the game path was not tested.A coverage caveat:
value + (h & 0u)in the slow shader atqueue2.rs:629lets FXC eliminate the loop. SDKcs_5_1disassembly contains onlystore_rawandretregardless of the spin count, so the conditional in-flight-list test may never exercise contention. An initially unsignaled fence could enforce it.Verification was AI-assisted with GPT-6.2 Astra.
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.