Repository navigation
Conversation
…GPURT node answer Port the portable pieces of fxceless/victory-fork commits 17533c5, 1170216, 1320dfd, and 9a9091d onto trustno1 main (f3534e6): - victory-shader: enable USER_DISPATCH_THREADS_X guarding for spilled 1D compute programs on 32-lane waves and programs with barriers by adding partial_active/effect_guard instead of early return when threads must stay for s_barrier or two-wave exchanges (after 1320dfd). - victory-shader: check exact operand dwords in lane_uniform (full dwords on scalars, exact VGPR dwords except v_movrel/v_swap), widen ordered/stable uniform ds_read checks beyond ds_read_b32, and mask v_readfirstlane_b32 with partial_active when halves are alike or guarded (after 1170216, 1320dfd). - victory-shader: return [u32::MAX; 4] (-1 per AMD GPURT) for instance and procedural BVH nodes (kinds 6 and 7) in bvh::intersect and emit::intersect, and use effect_guard for BVH intersection loads (after 9a9091d). - victory-gpu: extract Location (words 4-5) for placed as well as shader acceleration-structure views in view_address, returning None when zero (after 9a9091d). Adaptations for main: 17533c5 (VICTORY_WAVE_PAIRS_SPILLED) is inapplicable because main uses halves/exchange/pairs without paired.rs; 9a9091d memory sync/written-page tracking is omitted because main already uses arena Shadow::by_address sync (preserving PR trustno1-coder#88 and PR trustno1-coder#58) and VICTORY_BVH_BUILDER remains opt-in (=1).
|
i'm on it for testing |
|
#388 + #403 merged on In game (RTX 5060 8 GB, 15 GB RAM, below the README's 32 GB): |
|
A/B in game: with this PR, 1,626 of 1,635 static structures with header Setup: two builds that differ only by this PR's 5 files (
Each arm was one run with
Two earlier dumps, from different builds and runs, split the same way: with this PR 1,845 of 1,912 sound (2,222,662 triangle nodes); without it 140 of 1,437 (294). This is one run per arm. Still open with this PR (measured, not attributed to it):
🤖 Generated with Claude Code |
|
I added a two-line regression check on |
…artial groups with barriers, ray-box test answers) From trustno1-coder#403 (Kikoarl; ports of fxceless/victory-fork 1170216, 1320dfd). Its core (threads past a DispatchX count kept under partial_active) was already here from avatarmanz 06fe22a (9f9eff4); what was missing: - counted_in_threads no longer leaves out programs with s_barrier: their lanes past the count used to run everything, stores included. Where a barrier, a two-wave exchange, a ticket, split LDS or a loop back to the entry keeps the group's threads together they stay under partial_active; otherwise they leave at entry. - image_bvh64_intersect_ray takes memory_guard: those threads no longer read (and note faults on) stray pages. - Kinds 6 and 7 (instance, procedural) answer [u32::MAX; 4] as the hardware does (AMD GPURT IntersectCommon.hlsl), in the CPU reference and the DXIL lowering. - lane_uniform reads only an operand's own registers (not an old destination value kept for guards), every dword of a scalar operand, and any ordered ds_read from a uniform address (not _d16 or addtid). - view_address reads the structure's location from placed views too. Tests (PR trustno1-coder#403's, appended): the_builders_prefix_sum_lowers_exactly_on_32_lane_waves, ..._as_a_spilled_dispatch_x_program, threads_past_a_dispatch_x_count_do_nothing, the first-lane LDS read tests, structure_views_report_their_location_as_view_address, instances_and_procedural_nodes_return_all_ones. cargo test -p victory-shader --release: 297 passed, 4 ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Measured on an RTX 4070 Ti SUPER (32-lane waves), with the title's own ray tracing ( Without it, the gate in With a fix for that part alone, a card dump of the ray-tracing memory read with
In the prison-cell scene at the start, the room is no longer lit evenly by rays that pass through missing walls. Light now comes only through the window. If it helps review, the fix for that one part is a single commit on top of |
Summary
Ports the portable 32-lane BVH builder lowering fixes, placed acceleration-structure
view_address(Location), and GPURT[u32::MAX; 4]node answer fromfxceless/victory-forkcommits17533c5,1170216,1320dfd, and9a9091d(GPL-3.0-or-later), rebased ontomain(df2daaf).VICTORY_BVH_BUILDERremains opt-in (=1, off by default).Changes
crates/victory-shader/src/emit/lower.rs,emit/wave64_tests.rs: EnablesUSER_DISPATCH_THREADS_Xguarding (partial_active,effect_guard) for spilled 1D compute programs on 32-lane waves and programs with barriers instead of returning early; refineslane_uniformdword tracking, uniformds_readchecks, andv_readfirstlane_b32masking when halves match or are guarded.crates/victory-shader/src/bvh.rs,emit/intersect.rs: Returns[u32::MAX; 4](-1per AMD GPURT) for instance and procedural BVH nodes (kinds 6 and 7), and applieseffect_guardto BVH intersection loads.crates/victory-gpu/src/descriptor/host.rs: ExtractsLocation(words 4–5) for placed as well as shader acceleration-structure views inview_address, returningNonewhen zero.main: Omits17533c5(VICTORY_WAVE_PAIRS_SPILLED,paired.rsis absent onmain) and omits9a9091dwritten-page tracking becausemainusesShadow::by_addresssync (preserving PR Ray tracing: no arena storm when the low range is full (the 30 s watchdog crash); reserve the arenas' room at the start #88 and PR descriptor: placed views ignore padding words (views leak, confetti on faces) #58).Verification
Verified on Windows (
x86_64-pc-windows-msvc) againstmain(df2daaf):git diff --check main..HEAD— cleancargo test -p xtask --locked— 6 passed, 0 failed (asset policy: 287 files ok)cargo clippy -p victory-shader -p victory-gpu --all-targets --locked— exit 0, 0 warnings in changed files (mainhas pre-existing clippy warnings in untouched files)cargo test -p victory-shader --locked emit::wave64_tests— 17 passed, 0 failedcargo test -p victory-gpu --locked descriptor::— 62 passed, 0 failed