d3d12: pair a depth-only stream's vertex stage with the pipeline root #597

Merged
NickStallman merged 2 commits from upstream-pr/597 into main 2026-12-01 20:57:29 +00:00
NickStallman commented 2026-11-30 19:33:33 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T19:33:33Z.


Refs #533. Not yet run in a title.

The block that translates a raster stream against its pipeline root only runs when the stream has both a vertex and a pixel stage. A depth-only stream has no pixel stage, so its vertex shader keeps the root-less translation, whose registers come from the program's own reflection. Where the root names them differently the host refuses the pipeline (dxil-spirv: Failed to remap SRV 3:9) and the title gets a stand-in that draws nothing. In ProjectScarlett that is 11 of the 32 rejected pipelines our log names (it stops at 32), in every run, including the two cascade-shadow depth programs.

The pairing now also takes a vertex stage alone. With no pixel stage there are no pixel bindings, samplers, stencil export or heap stores to account for, and the reflected root carries the vertex stage's bindings, including a root SRV under the register the program names. A stream with no pixel stage takes the root only when its vertex stage has a translation against it; otherwise it is built exactly as before.

Evidence so far

  • New Lanes scenario raster-depth-only (in lanes-raster-tables): a stream with a console vertex program and no pixel program under a two-table root; the vertex program reads one value through table 1 and draws at that depth into a D32 target cleared to 1.0 (0.25 from the right view, 0.75 from any other). With this change it passes on both cards (RTX 5090 10de:2b85, AMD iGPU 1002:13c0, lanes-raster-tables 14 of 14). The control (main plus only the scenario) fails exactly that gate on both cards.

  • Rebased onto 9a19c767 (7a26e22a). Full python tuxbox.py check (GE-Proton11-15): RTX 5090 (10de:2b85) 210 pass and AMD iGPU (1002:13c0) 210 pass; the one failure on each is lanes-selftest-texture-publication (#625). A lanes-raster-tables timeout in the first 5090 run did not repeat when run alone (13 of 13).

  • Translation: the 11 rejected vertex-only shaders against their captured pipeline roots, with this commit's translator: 10 translate, including both cascade-shadow programs. The eleventh is refused ("constant-buffer MUBUF form unsupported") and keeps today's stand-in. The roots were captured from one run (three roots cover the 11 streams).

  • Unit tests: a vertex stage alone names its root SRV as register 9, space 3 under a root that calls it t4, space 3 (dxbc test). Two d3d12 tests (the rename, and the bindings of a stream without a pixel stage): they typecheck in the crate; they ran only in a native copy of the two functions, so CI's own run is the test.

  • Full python tuxbox.py check of b222a24e (on bbc26254, GE-Proton11-14): RTX 5090 (10de:2b85, 620.70.10) 203 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 202 pass, 0 fail. That is the previous head. The branch is now rebased onto 717a74c4 as a85b24ac (conflicts with #585 and #610 in stream.rs and graphics.rs; its raster root trace moved to root_trace.rs for the line limit): check --no-gpu 13 pass, 0 fail; its own full checks are queued on both cards.

Evidence (previous head): TuxBox check of b222a24e4d, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run
Evidence (previous head): TuxBox check of b222a24e4d, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run

What isn't covered

  • The joined path on a device: reflected root built, vertex shader translated against it, pipeline created, depth drawn. A Lanes depth-only scenario and a device test are specified and not written.
  • Risk to check in a run: a vertex-only stream that works today with a prepared rooted translation now takes the rooted path and gets a raster table. The list of vertex-only pipelines that succeed should be compared before and after.
  • No claim about the picture. Mesh-shader cascade programs exist too, so this may cover only some casters.
  • #585 records the root a raster pipeline is created with inside the same block; expect a small textual conflict at the stage loop.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5572346037 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/597). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T19:33:33Z. --- Refs #533. Not yet run in a title. The block that translates a raster stream against its pipeline root only runs when the stream has both a vertex and a pixel stage. A depth-only stream has no pixel stage, so its vertex shader keeps the root-less translation, whose registers come from the program's own reflection. Where the root names them differently the host refuses the pipeline (`dxil-spirv: Failed to remap SRV 3:9`) and the title gets a stand-in that draws nothing. In ProjectScarlett that is 11 of the 32 rejected pipelines our log names (it stops at 32), in every run, including the two cascade-shadow depth programs. The pairing now also takes a vertex stage alone. With no pixel stage there are no pixel bindings, samplers, stencil export or heap stores to account for, and the reflected root carries the vertex stage's bindings, including a root SRV under the register the program names. **A stream with no pixel stage takes the root only when its vertex stage has a translation against it; otherwise it is built exactly as before.** ## Evidence so far - New Lanes scenario `raster-depth-only` (in `lanes-raster-tables`): a stream with a console vertex program and no pixel program under a two-table root; the vertex program reads one value through table 1 and draws at that depth into a D32 target cleared to 1.0 (0.25 from the right view, 0.75 from any other). With this change it passes on both cards (RTX 5090 `10de:2b85`, AMD iGPU `1002:13c0`, `lanes-raster-tables` 14 of 14). The control (main plus only the scenario) fails exactly that gate on both cards. - Rebased onto 9a19c767 (7a26e22a). Full `python tuxbox.py check` (GE-Proton11-15): RTX 5090 (`10de:2b85`) 210 pass and AMD iGPU (`1002:13c0`) 210 pass; the one failure on each is `lanes-selftest-texture-publication` (#625). A `lanes-raster-tables` timeout in the first 5090 run did not repeat when run alone (13 of 13). - **Translation:** the 11 rejected vertex-only shaders against their captured pipeline roots, with this commit's translator: 10 translate, including both cascade-shadow programs. The eleventh is refused ("constant-buffer MUBUF form unsupported") and keeps today's stand-in. The roots were captured from one run (three roots cover the 11 streams). - **Unit tests:** a vertex stage alone names its root SRV as register 9, space 3 under a root that calls it t4, space 3 (dxbc test). Two d3d12 tests (the rename, and the bindings of a stream without a pixel stage): they typecheck in the crate; they ran only in a native copy of the two functions, so CI's own run is the test. - Full `python tuxbox.py check` of b222a24e (on bbc26254, GE-Proton11-14): RTX 5090 (`10de:2b85`, 620.70.10) 203 pass, 0 fail; AMD iGPU (`1002:13c0`, RADV) 202 pass, 0 fail. **That is the previous head.** The branch is now rebased onto 717a74c4 as a85b24ac (conflicts with #585 and #610 in `stream.rs` and `graphics.rs`; its raster root trace moved to `root_trace.rs` for the line limit): `check --no-gpu` 13 pass, 0 fail; its own full checks are queued on both cards. Evidence (previous head): TuxBox check of b222a24e4db8, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run Evidence (previous head): TuxBox check of b222a24e4db8, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run ## What isn't covered - **The joined path on a device:** reflected root built, vertex shader translated against it, pipeline created, depth drawn. A Lanes depth-only scenario and a device test are specified and not written. - **Risk to check in a run:** a vertex-only stream that works today with a prepared rooted translation now takes the rooted path and gets a raster table. The list of vertex-only pipelines that succeed should be compared before and after. - **No claim about the picture.** Mesh-shader cascade programs exist too, so this may cover only some casters. - #585 records the root a raster pipeline is created with inside the same block; expect a small textual conflict at the stage loop. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!597
No description provided.