Repository navigation
Shaders: the ray-tracing structure builder's three wave64 programs on 32-lane hosts (exact, no write-only shortcut) - #1700
Conversation
… 32-lane hosts
Three of the builder's 53 compute programs were refused on NVIDIA ("no wave32
lowering for this wave64 program"), so the builder stayed off (missing=3).
- 28918b7150a7aad5 and caa78b8ca62bc3d6: groups of 64 whose per-lane loops write
LDS inside execz skips. Only widen() translates them; they join the programs
widened by default (now `wide_by_default`, keyed by group size).
- e63d22c4def9ba6a: groups of 512 (eight console waves). A 4-bit ballot is counted
by each console wave's first lane inside a skip, so the mask halves must be
exchanged at the tail of a block already lowered, which pair meetings refused.
Where that block is one every thread of the group runs exactly once
(post-dominates the entry, on no cycle: `once_per_thread`), the exchange now
uses the group-barrier path; everywhere else it stays refused.
Synthetic tests: an LDS exchange in a loop inside a lane skip needs the skip
wave-wide; a ballot before a first-lane skip in a group of two console waves
is exchanged with the whole group (matches the console on the card); the same
ballot inside a wave-wide branch stays refused; the default widening policy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On an RTX 4070 Ti SUPER (32 lanes) this PR gets the builder running. The runs that died ran out of memory; nothing points at this change. Setup: Ryzen 7 9800X3D, 16 GB RAM, Windows 11 build 26300. Native 1440p,
So on 16 GB the builder fits only briefly. Trying the windows-in-card-memory / texture-room trade next. |
…1, VIctory Play On trustno1-coder/VIctory-NVIDIA's main: - RT CORES (VICTORY_HW_RT): native DXR 1.1 structures for the title's builder, Rockstar's compressed geometry decoded, BVH walks lifted to inline RayQuery (from dakisback2/VIctory-Nvidia-Linux, ported). - Release build with thin LTO, one codegen unit, x86-64-v3 and mimalloc (from KyleS98/VIctory-Neo); SPEED tab: card kept awake off, stores beside the guards on (their measurements). - The structure builder's wave64 programs on 32-lane cards (pull request trustno1-coder#1700); VICTORY_LDS_WRITE_ONLY_OK on by default (issue trustno1-coder#1435). - F1 menu in tabs (IMAGE, CONTROLS, LIGHT/RT, SPEED, EXPERT); SPEED: streaming and texture ports, texture room at low render sizes. - VIctory Play (apps/victory-play): a launcher that follows the game through its warm-up and F1 restarts, prepares shaders with progress, edits F1's settings by the same tabs, purges caches. - RT capture diagnostics (VICTORY_RT_CAPTURE) and the ray-tracing research notes (docs/hardware-ray-tracing.md). README rewritten for this build; the base's README is kept in docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
RTX 5070 Ti / Series X: on a cumulative descendant with the reflection fold scoped separately, asking for RT left the builder off, missing 1 of 53 stages (the 512-thread ballot). With the shader changes from this PR integrated, both ballot tests passed and the real game explicitly activated all 53 stages. In an exact-executable warmed release with #1878 and BVH_SIZE_COPY also enabled, six settled heavy reports ranged from 0.5 to 15.1 rendered FPS. This verifies builder activation, not visual parity or sustained performance. Static-sampler and GPU wait safeguards retained. |
Fixes #1475
What it changes
On a 32-lane host (NVIDIA), three of the ray-tracing structure builder's 53 compute programs are refused ("no wave32 lowering for this wave64 program"). The builder's stages run all or none, so the builder stays off (
missing=3 of=53). This PR translates the three with exact forms. It does not use the LDS write-only shortcut, so no approximation is involved.28918b7150a7aad5,caa78b8ca62bc3d6(groups of 64): their per-lane loops write LDS that other lanes read, inside per-lane skips (s_cbranch_execz). Onlywiden()translates them, with 3 branches taken wave-wide in each. Each group is a single console wave, so the group barriers meet exactly its two host waves. Both shaders join the programs that are widened by default.wide_by_default(digest, threads), keyed by group size: 64, 128 or 512.CS_CollisionRaytraced.water_portalsand the DefragHeapwith_half_meetspath are untouched.e63d22c4def9ba6a(groups of 512, eight console waves): 8 rounds of a 4-bit ballot. Each console wave's first lane counts the ballot withs_bcnt1inside a skip.once_per_threadmarks the blocks that every thread of the group runs exactly once: blocks that post-dominate the entry and are on no cycle. They are combined withall_lane_blocks_of(st, true).Synthetic regression tests (
wave64_tests.rs, no game code):lds_exchange_in_a_loop_inside_a_lane_skip_needs_the_skip_wave_wide: the 28918b71/caa78b8c shape. Run on the card, the result matches the console model.a_ballot_before_a_first_lane_skip_is_exchanged_with_the_whole_group: the e63d shape, in a group of 128 (two console waves).[min(s0,64), min(s0-64,64)], the console's counts.a_ballot_inside_a_wave_wide_branch_of_several_console_waves_stays_refused: the same code inside a branch that console waves may take differently is still refused, with the exact message.the_structure_builders_programs_are_widened_by_default: each digest is enabled only at its own group size.How it was tested
VICTORY_BVH_BUILDER=1, cold shader cache.cargo test: yes.victory-shader --lib352 passed, 0 failed, 9 ignored;victory-gpu --lib550 passed, 43 ignored;cargo build --release -p victorysucceeds.cargo clippy --workspace --all-targets -- -D warnings: fails on two findings that are already on main and not in this diff:lower.rsspare / per(manual checked division) and the unusedcolour. It reports nothing for this diff.Not verified, and help is welcome
once_per_thread, and the exchange inexchange_halves) is welcome.Checked for overlap
emit/lower.rs.AI assistance: written and tested with Claude (Anthropic); the in-game run was done by hand on the card above.
🤖 Generated with Claude Code