experimental: derived slot 57 mesh walk with multiple/zero render targets and an opt-in group stride (draft, do not merge) #3660

Open
SimSalabimse wants to merge 31 commits from upstream-pr/3660 into main
SimSalabimse commented 2026-11-30 22:10:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-30T22:10:27Z.


DRAFT, not for merge. This is here so others can see what is being worked on in the derived slot 57 mesh path and avoid duplicating it. Pieces will be split into small, proven PRs.

Related: #3541, #2413, #3413, #3659.

Current status (1 December 2026)

Still experimental and unproven. Do not merge. The group stride is opt-in and unproven (X2W_MESH57_EXPERIMENT_STRIDE=128).

The branch now also has:

  • the mesh integer sub ops (also in #3659; Windows result there still pending)
  • a merge of main at d5970858
  • the #3413 block A fix, so state_block_blend gets the whole block A and reads tag-6 blend words at +0x124 like #3503
  • bounds checks that refuse instead of indexing out of range on the forwarded DispatchMesh root constant, the mesh root mapping/lowerer parameter index, and the empty SCC liveness vector, with Linux tests mesh57_block_a and mesh57_root_bounds

Windows game run on this branch: no crash. The derived walk now reaches native compute +0x374 and refuses at v_readfirstlane_b32. Before this, it stopped at v_add_co_ci_u32 +0x148. Still nothing drawn.

What this branch contains

It builds on #3413. The first 12 commits on this branch, from runtime: opt-in immediate slot 57 mesh for indirect DispatchMesh through Merge origin/main into derived-mesh slice (slot 57), are an earlier state of #3413. #3413 has moved on since, and this branch has not been updated to its latest head or to current main yet, so GitHub shows conflicts. Review #3413 for those commits.

The 10 commits on top:

  • startup: copy measured slot 57 spans when shader dump is enabled
  • startup: opt-in slot 57 mesh bounds from the record allocation
  • startup: carry decoded depth and stencil for derived slot 57 meshes
  • startup: accept the derived mesh record multiply chain
  • startup: record a raw buffer load as the derived mesh record word
  • startup: include the mesh exchange header at file scope
  • startup: accept one to eight color targets on a derived mesh: multiple render targets (1..8) in the derived Mesh57 path.
  • startup: accept a depth-only derived mesh when depth or stencil is used: depth-only passes (0 color targets).
  • startup: add an opt-in unproven stride for the derived record group: see below.
  • mesh: lower v_sub_nc_u32 and sibling integer ALU ops: the integer op change, now proposed on its own against current main in #3659. The no-carry subtracts were already accepted on main by #3537.

The experimental group stride

Opt-in only: X2W_MESH57_EXPERIMENT_STRIDE=N. When it is set, the derived record path uses N as the group stride and logs experimental stride, unproven stride=N. When it is unset, behaviour is unchanged and the path still refuses with "group stride is zero".

The stride value is not measured or proven. 128 is used only because the exchange shift (>>7) yields groupId at a stride of 128, per the discussion in #2413 and #3541. This waits on a capture or a confirmation from R0Y00 before any of it is proposed for real.

Current Windows test PC status

  • Multiple targets and depth-only: the derived attempts are no longer refused for the color or depth setup. No device loss and no asserts.
  • With stride 128 set: the derived attempts get past the stride check. They then stopped in native compute translation at an unsupported v_sub_nc_u32. On current main that op is accepted (#3537), and #3659 adds the remaining siblings.
  • Nothing renders yet.

AI-assisted (Cursor)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5574682384 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3660). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-30T22:10:27Z. --- **DRAFT, not for merge.** This is here so others can see what is being worked on in the derived slot 57 mesh path and avoid duplicating it. Pieces will be split into small, proven PRs. Related: #3541, #2413, #3413, #3659. ## Current status (1 December 2026) Still experimental and unproven. Do not merge. The group stride is opt-in and unproven (`X2W_MESH57_EXPERIMENT_STRIDE=128`). The branch now also has: - the mesh integer sub ops (also in #3659; Windows result there still pending) - a merge of `main` at `d5970858` - the #3413 block A fix, so `state_block_blend` gets the whole block A and reads tag-6 blend words at +0x124 like #3503 - bounds checks that refuse instead of indexing out of range on the forwarded `DispatchMesh` root constant, the mesh root mapping/lowerer parameter index, and the empty SCC liveness vector, with Linux tests `mesh57_block_a` and `mesh57_root_bounds` Windows game run on this branch: no crash. The derived walk now reaches native compute +0x374 and refuses at `v_readfirstlane_b32`. Before this, it stopped at `v_add_co_ci_u32` +0x148. Still nothing drawn. ## What this branch contains It builds on #3413. The first 12 commits on this branch, from `runtime: opt-in immediate slot 57 mesh for indirect DispatchMesh` through `Merge origin/main into derived-mesh slice (slot 57)`, are an earlier state of #3413. #3413 has moved on since, and this branch has not been updated to its latest head or to current main yet, so GitHub shows conflicts. Review #3413 for those commits. The 10 commits on top: - `startup: copy measured slot 57 spans when shader dump is enabled` - `startup: opt-in slot 57 mesh bounds from the record allocation` - `startup: carry decoded depth and stencil for derived slot 57 meshes` - `startup: accept the derived mesh record multiply chain` - `startup: record a raw buffer load as the derived mesh record word` - `startup: include the mesh exchange header at file scope` - `startup: accept one to eight color targets on a derived mesh`: multiple render targets (1..8) in the derived Mesh57 path. - `startup: accept a depth-only derived mesh when depth or stencil is used`: depth-only passes (0 color targets). - `startup: add an opt-in unproven stride for the derived record group`: see below. - `mesh: lower v_sub_nc_u32 and sibling integer ALU ops`: the integer op change, now proposed on its own against current main in #3659. The no-carry subtracts were already accepted on main by #3537. ## The experimental group stride Opt-in only: `X2W_MESH57_EXPERIMENT_STRIDE=N`. When it is set, the derived record path uses N as the group stride and logs `experimental stride, unproven stride=N`. When it is unset, behaviour is unchanged and the path still refuses with "group stride is zero". **The stride value is not measured or proven.** 128 is used only because the exchange shift (`>>7`) yields groupId at a stride of 128, per the discussion in #2413 and #3541. This waits on a capture or a confirmation from R0Y00 before any of it is proposed for real. ## Current Windows test PC status - Multiple targets and depth-only: the derived attempts are no longer refused for the color or depth setup. No device loss and no asserts. - With stride 128 set: the derived attempts get past the stride check. They then stopped in native compute translation at an unsupported `v_sub_nc_u32`. On current main that op is accepted (#3537), and #3659 adds the remaining siblings. - Nothing renders yet. AI-assisted (Cursor)
SimSalabimse commented 2026-12-01 09:35:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T09:35:25Z.


I'm pausing slot 57 (Deserialize pipeline) work. The next derived-walk wall is v_cmpx_lt_u32, which is now covered in draft #3713.

A game run shows the title also creating mesh pipelines through slot 86 CreatePipelineState, which currently goes to the placeholder path. Mesh effort is moving to that route (#3639/#3640 belong to others; the shared lowering work lands in #3659/#3713). I'm leaving #3660 open as experimental.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7306919260 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3660#issuecomment-7306919260). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T09:35:25Z. --- I'm pausing slot 57 (Deserialize pipeline) work. The next derived-walk wall is `v_cmpx_lt_u32`, which is now covered in draft #3713. A game run shows the title also creating mesh pipelines through slot 86 `CreatePipelineState`, which currently goes to the placeholder path. Mesh effort is moving to that route (#3639/#3640 belong to others; the shared lowering work lands in #3659/#3713). I'm leaving #3660 open as experimental. AI-Assisted
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/3660:upstream-pr/3660'
git switch 'upstream-pr/3660'

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