xshader: translate most ProjectScarlett programs #101

Manually merged
github merged 3 commits from gh-pr/101/head into gh-pr/101/base 2026-11-26 06:31:13 +00:00
Owner

@⁠Jerkin42 on GitHub · 2026-11-24 22:23 UTC · original
Jerkin42:feat/xshader-coverage → main · +2038 −247 · 23 files · 3 commits · merged 2026-11-24 22:29 UTC

Translates most of the programs ProjectScarlett 1.0.2.1 asks for on the way into the world.

Accepted, of 20,059 requests recorded on one machine (both sides on f057e9b):

stage requests main this branch
pixel 8,077 2,391 7,565
mesh 6,266 1,555 6,189
compute 4,416 1,692 2,146
vertex 1,187 654 1,168
all, with linked 20,059 6,304 17,177

Nothing main accepts is refused. Before the rebase, DXC compiled all but 45 of 16,257 accepted programs; main refuses those 45. The HLSL of 1,278 programs main accepts changes, mainly root constants and the group id after them, SCC ballots in mesh programs, and half-float interpolants.

Accepted does not mean drawn correctly. Tested on an RX 9060 XT (RADV) with an earlier build plus runtime changes not in this PR; the world is not drawn yet there. No other GPU was measured.

  • Pixel: descriptor-heap indexing (each pixel is its own wave), per-pixel samplers, integer loads, stores, gathers.
  • Interpolants: packed half-float layouts.
  • Mesh: more operations, waterfalls, lane spills, typed buffers in the root.
  • Compute: append/reduce programs run one lane per wave; anything that could observe the wave is refused.
  • Bindings: one register in two spaces, descriptors past an embedded root's table.

CONTRIBUTING.md checks pass. Half-float positions and some root findings follow NathansDomainSolutions' public work. XCL and VIctory helped point at causes; no code from either.

🤖 Generated with Claude Code

**@⁠Jerkin42** on GitHub · 2026-11-24 22:23 UTC · [original](https://github.com/brcly/TuxBox/pull/101) `Jerkin42:feat/xshader-coverage` → `main` · +2038 −247 · 23 files · 3 commits · merged 2026-11-24 22:29 UTC Translates most of the programs ProjectScarlett 1.0.2.1 asks for on the way into the world. Accepted, of 20,059 requests recorded on one machine (both sides on f057e9b): | stage | requests | main | this branch | |---|---:|---:|---:| | pixel | 8,077 | 2,391 | 7,565 | | mesh | 6,266 | 1,555 | 6,189 | | compute | 4,416 | 1,692 | 2,146 | | vertex | 1,187 | 654 | 1,168 | | all, with linked | 20,059 | 6,304 | 17,177 | Nothing `main` accepts is refused. Before the rebase, DXC compiled all but 45 of 16,257 accepted programs; `main` refuses those 45. The HLSL of 1,278 programs `main` accepts changes, mainly root constants and the group id after them, SCC ballots in mesh programs, and half-float interpolants. Accepted does not mean drawn correctly. Tested on an RX 9060 XT (RADV) with an earlier build plus runtime changes not in this PR; the world is not drawn yet there. No other GPU was measured. - Pixel: descriptor-heap indexing (each pixel is its own wave), per-pixel samplers, integer loads, stores, gathers. - Interpolants: packed half-float layouts. - Mesh: more operations, waterfalls, lane spills, typed buffers in the root. - Compute: append/reduce programs run one lane per wave; anything that could observe the wave is refused. - Bindings: one register in two spaces, descriptors past an embedded root's table. CONTRIBUTING.md checks pass. Half-float positions and some root findings follow NathansDomainSolutions' public work. XCL and VIctory helped point at causes; no code from either. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Pixel programs that index the descriptor heaps: each pixel is a wave of its own, so a
waterfall over heap indices runs once with that pixel's index. Textures and samplers
picked per pixel, integer texel loads, texel stores and gathers through the heap.

Interpolated half-float registers share a parameter two components per channel. The
interpolant count in the program's hardware state and the components it reads tell
which of the possible layouts it uses.

Mesh programs: more operations, waterfall loops, samplers chosen per lane, lane spills,
typed buffers and textures in the root, and ballots hoisted outside branches.

Compute programs that only append or reduce over their wave run with each lane as a
wave of its own. Anything that could observe the wave is refused.

Also one register number in two spaces, descriptors past an embedded root's table whose
register that root already uses, wave32 compare masks, and inline samplers in programs
with indirect jumps.

Co-Authored-By: NathansDomainSolutions <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:31:11 +00:00
github manually merged commit bd7108c546 into gh-pr/101/base 2026-11-26 06:31:13 +00:00
Author
Owner

@⁠JohnVonWells on GitHub · 2026-11-24 22:30 UTC · original

The Rust CI failure is the ShaderExtract literal in tools/shader-compiler/src/hlsl/float64.rs:156 (from #99, merged just before this CI run). Adding flat_inputs: Vec::new(), flat_outputs: Vec::new() there, as in the other test files, should fix it.

**@⁠JohnVonWells** on GitHub · 2026-11-24 22:30 UTC · [original](https://github.com/brcly/TuxBox/pull/101#issuecomment-7146321522) The Rust CI failure is the ShaderExtract literal in tools/shader-compiler/src/hlsl/float64.rs:156 (from #99, merged just before this CI run). Adding flat_inputs: Vec::new(), flat_outputs: Vec::new() there, as in the other test files, should fix it.
This discussion has been locked. Commenting is limited to contributors.
No description provided.