Iter 22: Support ResourceHeap view addresses via SLOT_VIEW_ADDRESSES (4/5 TraceShadowRays) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T01:53:47Z.
Summary
Implements
SLOT_VIEW_ADDRESSES(t251inROOT_CBV_SPACE), allowing shaders that read a buffer or ray-tracing acceleration structure descriptor fromRootType::ResourceHeapdynamically solely for its 64-bit title base address (s_load_dwordx4-> title address extraction ->SLOT_MEMORYray traversal) to translate and execute instead of failing witha descriptor read only as data.This unlocks 4 of the 5 remaining
shadowmask:CS_TraceShadowRays_*ray-traced shadow shaders end-to-end (emit,dxil.dllvalidation, and D3D12 compute pipeline creation on RTX 4060 Ti) and gets the 5th pasts_load_dwordx4to an unrelated downstream error (0xae80:MASK_ELSEWHERE), eliminating all remaining"a descriptor read only as data"errors across the shader corpus:shadowmask:CS_TraceShadowRays_Eighth_db2f6be8_Wrapped(#96ccb14ef981fd85)shadowmask:CS_TraceShadowRays_Quarter_2d98e5c6_Wrapped(#0e64f14fae060d04)shadowmask:CS_TraceShadowRays_Half_8988d8a5_Wrapped(#002e93a6cc2aa355)shadowmask:CS_TraceShadowRays_Full_457a0336_Wrapped(#07c93bfb77fecebb)shadowmask:CS_TraceShadowRays_FullAdaptive_ae7b9cf0_Wrapped(#dbdbf36298727135) cleareds_load_dwordx4at0x1dc0and reached0xae80: emit: a lane mask holding lanes elsewhere read as data(deferred to a follow-up PR).Changes
crates/victory-shader/src/emit/{shader,mod}.rs: Added and re-exportedSLOT_VIEW_ADDRESSES: u8 = 251.crates/victory-shader/src/emit/lower.rs: ExtendedLower::view_addressto handleRootType::ResourceHeaploads by emitting a clampedheap_index << 3load of(lo, hi)fromSLOT_VIEW_ADDRESSES, keeping dwords2..3markedVal::Missing(OTHER).crates/victory-gpu/src/pipeline/host.rs: AddedSLOT_VIEW_ADDRESSESto the host-owned root SRV list (ours) alongsideSLOT_STRIDES,SLOT_TABLE_STRIDES, andSLOT_MEMORY.crates/victory-gpu/src/descriptor/host.rs: Added a 16 MiB system-uploadaddressestable (SLOT_STRIDES_COUNT * 8bytes, zero VRAM) per non-samplerHostHeap, updated viawrite_addressacrossnote_buffer,unmake,make_at,make_listed(ListView),make_null,raw_at,null_raw_at,raw_uav_at,null_raw_uav_at, andconstant_at.crates/victory-gpu/src/draw.rs: BoundSLOT_VIEW_ADDRESSESviaheap_addresseswithout triggering a full bindless buffer/texture sweep.emit::valu_tests::resource_heap_view_address_roundtrip(hardware + WARP) anddescriptor::host::tests::note_buffer_populates_and_clears_view_address_table.Rig Specs Tested On
33,304,932KiB)10.0.26300/ NVIDIA Driver32.0.16.2124Run Settings & Profile
diag&release(RUSTFLAGS='-C link-self-contained=yes') @ branchfeat/iter22-resource-heap-view-addressesseries-s(unattended launch smoke test viaverify-live.ps1)VICTORY_HOST_MAX_WAVE=32; live unattended smoke test uses standard preset (VICTORY_EARLY_DEPTH=1, no RT structure builder in open-world gameplay tested here)DLSS quality(VICTORY_DLSS=1,VICTORY_DLSS_MODE=quality,Streamlineloaded)offVICTORY_*Overrides: Offline corpus check viavictory.exe translate ... --validate --pipelines --listwithVICTORY_HOST_MAX_WAVE=32andVICTORY_TRANSLATE_ONLY=002e93a6cc2aa355,0e64f14fae060d04,dbdbf36298727135,96ccb14ef981fd85,07c93bfb77fecebb; live smoke test viaverify-live.ps1(menu/intro telemetry only — interactive RT shadow gameplay has NOT been playtested on this branch).11 draws/frame, 3 active windows) + offline shader translation/pipeline verification.Measurements & Verification
30.0 fps(33.3 ms/frame) in unattended menu smoke test (11 draws/frame,0 dropped)off)182 MBindexed textures uploaded, 0 unmapped)0(verify-live.ps17/7[PASS],non_system_mingw_dlls=0on bothdiagandrelease)4 emitted, 4 validated (dxil.dll 10.0.22000.0), 4 pipelines createdof 5 (Eighth,Quarter,Half,Full),FullAdaptivecleareds_load_dwordx4and hit0xae80: a lane mask holding lanes elsewhere read as data.cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader -- valu_tests::resource_heap_view_address_roundtrip(1 passed; 0 failed, hardware + WARP; note full localvictory-shaderrun had287 passed; 3 faileddue to pre-existing local Windows SDK10.0.22000.0\x64\dxil.dllPSV0 rejections in untouchedbarycentric_tests/rect::tests)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu -- --test-threads=1(449 passed; 0 failed; 36 ignored, including newnote_buffer_populates_and_clears_view_address_table)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T01:59:14Z.
Verification complete for PR #7 (a0e88f):
elease binaries (RUSTFLAGS='-C link-self-contained=yes'):
on_system_mingw_dlls=0 on both
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T02:03:46Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Logic, memory safety, and test coverage look solid. The implementation cleanly mirrors the existing
SLOT_STRIDES/SLOT_TABLE_STRIDESpattern without triggering the full bindless heap sweep:crates/victory-shader/src/emit/{shader,mod,lower}.rs): AddsSLOT_VIEW_ADDRESSES(t251) and extendsLower::view_addressforRootType::ResourceHeapto clampheap_index(site, 0, false)againstSLOT_STRIDES_COUNT - 1(matchingLower::memory), shift by 3, and load(lo, hi)viarawBufferLoad.f32. Verified byvalu_tests::resource_heap_view_address_roundtrip(including assertingSLOT_STRIDESis not requested).crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/pipeline/host.rs,crates/victory-gpu/src/draw.rs):SLOT_STRIDES_COUNT * 8(16 MiB) upload buffer per non-samplerHostHeapand keeps it in sync viaHostHeap::write_addressacrossnote_buffer,unmake,make_at,make_listed(ListView),make_null,raw_at,null_raw_at,raw_uav_at,null_raw_uav_at, andconstant_at.view_address(view)inmake_ateven whenmake_twinnedreturnsNone(e.g., TLAS views that fall back to null host SRVs while still providing their 64-bit title address forSLOT_MEMORYtraversal), covered bynote_buffer_populates_and_clears_view_address_table.SLOT_VIEW_ADDRESSESinHostPipeline'sourslist and binds it inState::heap_addresseswithlist.first_use(gpu as usize | 1)+list.keep(buffer)(distinct GPU VA fromstrides, so no key collision withheap_buffers/heap_strides).Verdict:
needs-gpu-testCI is passing and no code defects were found, but because this PR modifies DXIL shader lowering, D3D12 root signature/SRV binding, and per-heap upload tables for RT shadow shaders (
shadowmask:CS_TraceShadowRays_*)—and the PR notes interactive RT shadow gameplay has not yet been playtested—a local real-GPU test with active RT shadows is recommended before merging. (This is an automated triage review, not formal maintainer approval.)Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:11:19Z.
Real-GPU Playtest Report (Combined Build 1 Stack — RT ON)
Tested in combined Build 1 (
origin/main+ Build 1 PRs including#3, #4, #7, #10) on NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (quality-720p, DLSS Quality,-RayTracing):1c-build1-rt.log) — 0 crashes, 0 DRED resets, clean exit.7.6 fps(132.2 ms/frame,4,022draws/frame).12,653pages /790 MBacross13arenas,98build dispatches/frame).0"a shader reads view addresses without a view heap set"warnings.1,374DLSS upscalings (0failed); VRAM stayed bounded (6,460 MBin use,554 MBfree across27texture blocks).