Rtx4060 verified #289

Closed
github-bot wants to merge 6 commits from gh-pr/289/head into gh-pr/289/base
Owner

@⁠WhiteDragonul on GitHub · 2026-11-24 23:18 UTC · original
rtx4060-verified → main · +627 −58 · 10 files · 6 commits · closed without merging

No description provided.

**@⁠WhiteDragonul** on GitHub · 2026-11-24 23:18 UTC · [original](https://github.com/fxceless/victory-fork/pull/289) `rtx4060-verified` → `main` · +627 −58 · 10 files · 6 commits · closed without merging *No description provided.*
Two gaps kept the ray-tracing programs off on a host whose waves are 32 lanes.

1. Buffer views picked from the view heap at a computed index. The shadow-ray
   trace programs read the address of their structure out of a heap descriptor
   they choose with a per-wave index, and walk the memory behind it. The
   translator could only take such an address from a fixed table position.
   The host now keeps, after the strides of `SLOT_STRIDES`, two more dwords
   per heap slot (low and high of the title address of the buffer view
   there), written where the strides are written, and the shader reads them
   by heap slot (`SLOT_ADDRESSES`). No new root parameter; the table grows
   from 8 MB to 24 MB per view heap.

2. `lane_uniform` proves three more things where no lane of a wave can part
   from the others: `tid >> 6` of the entry thread number (in a group whose x
   size is a multiple of 64) is the same in all lanes of a console wave; an
   `ds_read_b32` at such an address is; and a value joined by a phi, also at
   a loop header, is when its arguments are and every predecessor is entered
   by all the arriving lanes or none (a greatest fixed point over the loop's
   carried values and lane masks). The structure builder's block-scan
   programs fetch a wave-uniform running total with `v_readfirstlane` in
   such a loop; without the proof they asked for an exchange between the two
   host waves where not every lane runs.

Effect, with `VICTORY_HOST_WAVE=32` on a 32-lane card:
- 4 of the 5 shadow-ray trace programs (and their screen-space variants) now
  translate and validate; the adaptive one still stops at a lane mask read
  as data.
- 52 of the 52 structure-builder programs now translate, validate and
  create a host pipeline (3 did not).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The node test's reference (bvh.rs) and its emitter (emit/intersect.rs)
took a child whose pointer is 0xffff_ffff for a hit whenever the ray
entered its box. Its result dword was "none" either way, but sorted it
came with a finite distance, so it could stand before a child that is
there; a traversal that stops at the first "none" would then miss that
child.

Both now test the pointer too: a child that is not there is a miss, as
the reference's description of the result already said. The box test's
emitted code grows by two integer instructions per child (a compare and
an and): the parity tests' program (the 64-bit form) goes from 519 to
527 instructions.

The reference's new test is the reproducer of #173: a child that is not
there whose box is entered first, one child behind it, and two that are
not there with their boxes at the ray's origin, in both node widths. The
card tests run the same node and ray. With the reference corrected and
the emitter not, the four parity tests fail on the card; corrected, they
pass on the card and on WARP.

Not known: what the console returns for such a child, and whether the
title's builder ever leaves a box under one. The cases of #173 are
synthetic. docs/fork-ray-tracing.md lists it with the other assumptions.

Reproducer and patch: @Bennet0k, #173.

Co-Authored-By: GLM <[email protected]>
A synthetic wave64 program run on the card: a lane write inside a per-lane
branch whose target lane is not in EXEC is lost in every form, although the
instruction ignores EXEC. The test is ignored until the lowering is fixed;
docs/fork-writelane-outside-exec.md says how to reproduce it and what a fix
must do.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
v_writelane_b32 and v_readlane_b32 ignore EXEC on the console. The write was
lowered as the lane's own, so it was lost when the lane named was outside
EXEC or had left the block, and a later read gave the old value.

In this title's pack 40 compute programs keep lane writes after unspill, all
32-lane ray-tracing trace programs: a small array of scalars in the lanes of
one VGPR, written by constant lane and read by a computed one. Every such
write stands in a block only some lanes run.

A lane write, or a lane read of a VGPR that lane writes fill, in such a block
is now refused there, and emit has the wave take the branches around it
together (widen), so every lane is present; where the host's waves are the
console's that costs no barrier. Under a guard the lane takes the scalar when
some lane of the console wave is in EXEC; two host waves of 32 exchange their
answers. A program whose branches cannot be taken together is translated as
before, so none stops translating.

On the pack for a 32-lane host: 2,669 of 2,682 compute programs emitted and
validated before and after. Of the 40, 36 translate either way and get a
pipeline on an RTX 5080: 25 with their branches wave-wide, 11 as before.

The known-failure test is no longer ignored, and a second one covers the
32-lane pattern. Not checked in the game.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:39:59 +00:00
github-bot closed this pull request 2026-11-26 03:39:59 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.