Repository navigation
Conversation
A ray tracing acceleration structure's shader view has no resource: its description holds the structure's address (D3D12's `Location`, dwords 4 and 5 of the title's view words). The view addresses only knew buffer views, so such a slot's entry was 0, and a program that takes its BVH's address from that view (the world's ray traced pass, `f607780aa8e502d0`, Marvisak#1968) walked whatever lies at address 0 instead of the BVH the title built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):
cargo test -p victory-gpu --lib an_acceleration_structures_view_address_is_its_location— passedcargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean view_address handling returning an acceleration structure's GPU location with targeted unit test coverage. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Acceleration structure view address = its location — BLAS/TLAS address fix; correctness for ray-tracing descriptor paths.
…, D16S8/R16 UAV views, audit defects & Stage 2 device fixes - Placed texture Map()/Unmap() return va_ directly with xmem page disarm (LEONIDA_LINEAR_MAP_FIRST=1 opt-out) and pre-draw per-frame xs_refresh_placed_textures on first direct ExecuteCommandLists after PresentX (ubiquitarianism/leonida@545e8d51, five-star-recomp@38a8436, GPL-3.0). - Preserve xbox_d16s8 (118) view formats 118/119/120 in proxy SRV/DSV/placed-view paths; create depth16 UAV plane 0 as R16_TYPELESS and allow R16_UNORM (56) on R16_TYPELESS/118 depth UAVs. - Fix cc4553c review defects: lock-held arena_release_locked + had_retired retry in arena_allocate_reclaiming; slot 127 depth fallback unconditional clear/castable sanitization; view-flag-agnostic slot 62 copy lookup + richer skip diagnostics. - Force integer RT blendEnable=VK_FALSE (Marvisak/VIctory#2042, GPL-3.0); off-element placed structured buffer V# + PC RAW fallback (five-star-recomp@955a679, GPL-3.0); console typeless-on-typeless view fallback (Marvisak/VIctory#2190, GPL-3.0) + CBV ring tail zeroing (Marvisak/VIctory#1629, GPL-3.0); refuse MEM_MAPPED in create_host_buffer with LEONIDA_IMPORT_REMAPPABLE=1 opt-out (Neonbridge@838c433, GPL-3.0); AS SRV Location resolution (Marvisak/VIctory#2098, GPL-3.0); 3D R9G9B9E5 RT+UAV RGBA16F view format fix; true placed-texture upload totals telemetry + boot_bench parser.
|
Automated triage for the maintainers.
Generated by Claude Code |
What
A ray tracing acceleration structure's shader view has no resource. The title creates it with
pResource = NULL, and its description holds the structure's address: D3D12'sLocation, dwords 4 and 5 of the title's view words.HostHeap's view addresses only knew buffer views, throughbuffer_range. For such a slot the entry was 0.The world's ray traced pass,
f607780aa8e502d0(program A of #1968), takes its BVH's address from exactly this view. It loads the descriptor at table offset 0x80 and masks dwords 0-1 into a 40-bit base (s_and_b32 s4, s20, 0xffffff00,s_and_b32 s5, s21, 0xff), whichLower::view_addressesserves from the view addresses. It then walks the BVH withimage_bvh64_intersect_ray, in a loop the title bounds at 65,535 iterations per wave (s_cmpk_lt_u32 s27, 0xffff). With an entry of 0 it walks whatever lies at address 0, not the BVH the title built.In the logs, A's view at
s1+32isbuffer None words [0, 11, 5768, 0, 1595719680, 13, ...]: dimension 11 (D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE), location0xd_5f1c_0000.Change
descriptor/host.rs:view_address(view). An acceleration structure's shader view gives its location; any other view its buffer's first byte, as before, or 0.write_addressuses it.descriptor::host::tests::an_acceleration_structures_view_address_is_its_location: the entry for such a view is its location, a placed buffer view keeps its own address, and no view gives zeros. It fails onmain(left: [.., 0, 0]) and passes with the change.Relation to #1906
#1906 gives a table made afresh in the dynamic slots its view-address entries. Without it, A's table on a capped heap reads past the end of the buffer, which is the hang several testers confirmed it removes. #1906 writes those entries through the same
write_address, so with #1906 alone A's BVH base is 0. This PR is the other half: the entry is the structure's location. The two touch neighbouring lines: merged together, they conflict only inwrite_address's doc comment, where both sentences belong.Tested
Windows 11 26300, RTX 4070 SUPER 12 GB, driver 32.0.16.1742, Ryzen 7 7700X. Title 1.0.2.1, Series X profile, diag build. Scripted Enter presses to the intro cutscene at about 90 s, 6-minute runs. Base:
main940d32f+ #1775 + #1762 + #1906 (astrosteveo's rebase01ba70d). #1968's program C was not reached in these runs (never bound).What this does not show on this card: a difference in the picture. In a third run with this PR, a local log read the two acceleration structures A binds (
0xd_5f1c_0000,0xd_6016_0000, taken from an earlier run's log; the title's addresses have been the same in every run so far) every time A was dispatched: 553 times over 3.5 minutes. They held only zeros, in the host copy A reads and in title memory. The world's BVH is never built here. Five of the BVH builder's programs (XboxBvhBuilder.dll:14394a322f6dd5c2,28918b7150a7aad5,caa78b8ca62bc3d6,e63d22c4def9ba6a,f6eb6498409ca974) are 64-lane programs this card refuses.So on NVIDIA this change gives A the right address, and its effect waits for the builder to run there. On a GPU that runs the builder (64-lane hosts), A should now walk the BVH the title built instead of address 0. I have no such GPU to check that.
cargo test -p victory-gpu --locked: 142 passed, 2 failed, 2 ignored. The two failures (descriptor::host::tests::dynamic_slots_are_held_until_released,memory::tests::lists_share_a_table_and_copies_keep_their_views) fail the same way onmainon this card (the 1,000,000 view heap cap).cargo clippy --workspace --all-targets --locked -- -D warnings, also with--all-features: clean.cargo xtask policy: 182 files ok.AI-assisted (Claude Code). Runs done on my machine.
🤖 Generated with Claude Code