experimental: shader: accept vertex scalar-tail joins, proved raw-store descriptors and dead EXEC saves (draft, do not merge) #3896

Open
SimSalabimse wants to merge 19 commits from upstream-pr/3896 into main
SimSalabimse commented 2026-12-02 23:21:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-02T23:21:12Z.


Draft, do not merge. Experimental piece of the native graphics path work (getting the native shader path to draw real frames). Do not merge until it has been tested on the Windows test PC.

What it changes

Vertex EXEC regions in the native lowering (src/gfx1013_direct_graphics.inl):

  • A forward uniform s_cbranch_scc0, s_cbranch_scc1 or s_cbranch_vccz may land on a join that reaches a vertex EXEC scalar tail, when the skipped region leaves no side effect still visible.
  • A masked vertex raw store may use a byte-address descriptor, or a descriptor recovered after a join, when a load already proved that user-SGPR slot.
  • A write of the saved EXEC is refused with the opcode and registers named, and is kept when the saved value is restored before any read.

tests/native_vertex_walls_check.py is extended for these shapes, and two of its controls are fixed so they run against the real dump format.

Dependencies

This branch is stacked. It is 19 commits ahead of main: the 17 below the two new commits are the staged native path work that is not on main yet (diagnostics, fixed pixel entry layouts, pixel EXEC arms, vertex fetch before a scalar branch, and an earlier proved raw store in a masked vertex arm). Only the top two commits, "Accept vertex scalar-tail joins, proved raw-store descriptors, and dead EXEC saves" and "Fix two vertex-walls controls so they run against the real dump format", are new in this PR, so review those alone. It overlaps in intent with #3880 (a second vertex EXECZ into a scalar-tail join); the two will need to be reconciled. The branch does not merge cleanly into current main (conflict in src/direct_compute_cache.cpp from the stack) and will be rebased once the stack below it has landed.

Tests

None yet. This has not been built or run through ctest, DXC, WARP or hardware. Planned: native_vertex_walls*, then native_direct_container, native_execz_join_mask_*, native_graphics_vertex_vcc_join_*, native_pixel_exec_arms, native_pixel_entry_* and startup_ngg_slice, one GPU test at a time.

Not measured: whether any title shader reaches the newly accepted shapes in a real run.

AI-assisted (Cursor)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5616504350 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3896). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-02T23:21:12Z. --- Draft, do not merge. Experimental piece of the native graphics path work (getting the native shader path to draw real frames). Do not merge until it has been tested on the Windows test PC. ## What it changes Vertex EXEC regions in the native lowering (`src/gfx1013_direct_graphics.inl`): - A forward uniform `s_cbranch_scc0`, `s_cbranch_scc1` or `s_cbranch_vccz` may land on a join that reaches a vertex EXEC scalar tail, when the skipped region leaves no side effect still visible. - A masked vertex raw store may use a byte-address descriptor, or a descriptor recovered after a join, when a load already proved that user-SGPR slot. - A write of the saved EXEC is refused with the opcode and registers named, and is kept when the saved value is restored before any read. `tests/native_vertex_walls_check.py` is extended for these shapes, and two of its controls are fixed so they run against the real dump format. ## Dependencies This branch is stacked. It is 19 commits ahead of `main`: the 17 below the two new commits are the staged native path work that is not on `main` yet (diagnostics, fixed pixel entry layouts, pixel EXEC arms, vertex fetch before a scalar branch, and an earlier proved raw store in a masked vertex arm). Only the top two commits, "Accept vertex scalar-tail joins, proved raw-store descriptors, and dead EXEC saves" and "Fix two vertex-walls controls so they run against the real dump format", are new in this PR, so review those alone. It overlaps in intent with #3880 (a second vertex EXECZ into a scalar-tail join); the two will need to be reconciled. The branch does not merge cleanly into current `main` (conflict in `src/direct_compute_cache.cpp` from the stack) and will be rebased once the stack below it has landed. ## Tests None yet. This has not been built or run through ctest, DXC, WARP or hardware. Planned: `native_vertex_walls*`, then `native_direct_container`, `native_execz_join_mask_*`, `native_graphics_vertex_vcc_join_*`, `native_pixel_exec_arms`, `native_pixel_entry_*` and `startup_ngg_slice`, one GPU test at a time. Not measured: whether any title shader reaches the newly accepted shapes in a real run. AI-assisted (Cursor)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3896:upstream-pr/3896'
git switch 'upstream-pr/3896'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3896'
git switch 'upstream-pr/3896'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3896'
git switch 'upstream-pr/3896'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3896'
git switch 'main'
git merge --squash 'upstream-pr/3896'
git switch 'main'
git merge --ff-only 'upstream-pr/3896'
git switch 'main'
git merge 'upstream-pr/3896'
git push origin 'main'
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
R0Y00/Xbox2Windows!3896
No description provided.