feat(startup): implement bounded compute pipelines and native gfx1013… #1954

Open
github-bot wants to merge 1 commit from github-bot/gh-1954 into main AGit
Owner

@⁠ArnabSaga on GitHub · 2026-11-24 22:06 UTC · original
ArnabSaga:1412-startup-run_compute_pipelines → main · +11509 −38 · 24 files · 1 commits · draft

… execution fixtures

Implement and validate source-built compute execution through the existing Xbox2Windows startup D3D12 wrapper.

Compute pipeline support

  • Implement bounded Scarlett DXIL compute pipeline creation for device slot 62.
  • Enable command-list Dispatch through the existing slot 14 execution path.
  • Support compute root SRV, UAV and 32-bit constant bindings.
  • Enforce root-argument completeness, resource bounds and pipeline compatibility.
  • Preserve graphics pipeline isolation and existing startup behavior.

Native gfx1013 translation and cache

  • Reuse the existing compute_store_aot translator for native compute programs.
  • Add source-built 1-D and 2-D gfx1013 compute fixtures.
  • Implement deterministic revision-2 native compute cache records and manifests.
  • Enforce SHA-256 integrity, dependency identity and strict cache acceptance.
  • Add token-owned writer locking, atomic publication and corrupt-request quarantine.
  • Validate and sign generated desktop DXIL using the existing DXC infrastructure.

C++ runtime integration

  • Implement bounded native cache parsing and Python/C++ hash parity.
  • Create desktop root signatures and compute PSOs from verified shader bytes.
  • Introduce explicitly gated native compute fixture integration.
  • Reuse the existing compute Dispatch infrastructure.
  • Enforce fixture activation, resource extents and supported execution profiles.
  • Preserve production slot 67 placeholder behavior.

GPU execution and verification

  • Verify exact fenced GPU readback on WARP and Intel Iris Xe.
  • Cover full, partial and zero-active guards, split constants, clipping and repeated Dispatch.
  • Add runtime refusal, cache corruption and comparison-sensitivity controls.
  • Preserve independent per-adapter and per-mode verification artifacts.
  • Verify fresh-cache regeneration directly from source-built native programs.

Test results

  • Offline native cache: 156/156 checks passed.
  • C++ cache controls: 195/195 passed.
  • Python/C++ acceptance parity: 92/92 matched.
  • Native CTest: 8/8 passed.
  • Normal GPU execution: 74/74 checks per adapter.
  • Debug GPU execution: 78/78 checks per adapter.
  • Independent readback verification: 96/96 comparisons matched.
  • Frozen regression suite: 29 passed, 0 failed, 1 documented capability skip.
  • Graphics and shader regressions: 8/8 passed.
  • Zero reported debug-layer warnings, errors, corruption or device removals.
  • Documentation, bidi and diff checks passed.

Documentation and scope

  • Document native compute architecture, cache regeneration and reproduction procedures.
  • Document fixture activation, supported profiles and known limitations.
  • Keep production slot 67 descriptor parsing, ExecuteIndirect and general title compatibility outside this implementation.

Related to #1412.

Change

Describe the observable change and the task or milestone it advances, or the
independent problem it solves. Link related issues with Refs #123 or
Fixes #123. If the change touches a shared interface, name it and link any
overlapping work or PR that must land first. For a documentation patch,
identify the contributor task the edit helps someone complete.

Verification

Give the commit or build, command and result. For GPU changes include the
adapter, backend, first mismatch if any, and capability skips. If you could not
run a check, say so and identify the missing prerequisite.

Evidence and follow-up

For new fixtures, describe their source or generation method and license.
Identify assumptions that affect the result and link any work another
contributor can pick up.

If this changes what contributors can run, link the updated README entry or
build step and the reproduction command. For a local-data result, identify the
part the public fixture verifies.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

If this change was AI-assisted, say so in the description. Recent contributions
follow this practice.

**@⁠ArnabSaga** on GitHub · 2026-11-24 22:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1954) `ArnabSaga:1412-startup-run_compute_pipelines` → `main` · +11509 −38 · 24 files · 1 commits · draft … execution fixtures Implement and validate source-built compute execution through the existing Xbox2Windows startup D3D12 wrapper. ### Compute pipeline support - Implement bounded Scarlett DXIL compute pipeline creation for device slot 62. - Enable command-list Dispatch through the existing slot 14 execution path. - Support compute root SRV, UAV and 32-bit constant bindings. - Enforce root-argument completeness, resource bounds and pipeline compatibility. - Preserve graphics pipeline isolation and existing startup behavior. ### Native gfx1013 translation and cache - Reuse the existing compute_store_aot translator for native compute programs. - Add source-built 1-D and 2-D gfx1013 compute fixtures. - Implement deterministic revision-2 native compute cache records and manifests. - Enforce SHA-256 integrity, dependency identity and strict cache acceptance. - Add token-owned writer locking, atomic publication and corrupt-request quarantine. - Validate and sign generated desktop DXIL using the existing DXC infrastructure. ### C++ runtime integration - Implement bounded native cache parsing and Python/C++ hash parity. - Create desktop root signatures and compute PSOs from verified shader bytes. - Introduce explicitly gated native compute fixture integration. - Reuse the existing compute Dispatch infrastructure. - Enforce fixture activation, resource extents and supported execution profiles. - Preserve production slot 67 placeholder behavior. ### GPU execution and verification - Verify exact fenced GPU readback on WARP and Intel Iris Xe. - Cover full, partial and zero-active guards, split constants, clipping and repeated Dispatch. - Add runtime refusal, cache corruption and comparison-sensitivity controls. - Preserve independent per-adapter and per-mode verification artifacts. - Verify fresh-cache regeneration directly from source-built native programs. ### Test results - Offline native cache: 156/156 checks passed. - C++ cache controls: 195/195 passed. - Python/C++ acceptance parity: 92/92 matched. - Native CTest: 8/8 passed. - Normal GPU execution: 74/74 checks per adapter. - Debug GPU execution: 78/78 checks per adapter. - Independent readback verification: 96/96 comparisons matched. - Frozen regression suite: 29 passed, 0 failed, 1 documented capability skip. - Graphics and shader regressions: 8/8 passed. - Zero reported debug-layer warnings, errors, corruption or device removals. - Documentation, bidi and diff checks passed. ### Documentation and scope - Document native compute architecture, cache regeneration and reproduction procedures. - Document fixture activation, supported profiles and known limitations. - Keep production slot 67 descriptor parsing, ExecuteIndirect and general title compatibility outside this implementation. Related to #1412. ## Change Describe the observable change and the task or milestone it advances, or the independent problem it solves. Link related issues with `Refs #123` or `Fixes #123`. If the change touches a shared interface, name it and link any overlapping work or PR that must land first. For a documentation patch, identify the contributor task the edit helps someone complete. ## Verification Give the commit or build, command and result. For GPU changes include the adapter, backend, first mismatch if any, and capability skips. If you could not run a check, say so and identify the missing prerequisite. ## Evidence and follow-up For new fixtures, describe their source or generation method and license. Identify assumptions that affect the result and link any work another contributor can pick up. If this changes what contributors can run, link the updated README entry or build step and the reproduction command. For a local-data result, identify the part the public fixture verifies. ## Checklist - [ ] This pull request covers one reviewable behavior. - [ ] I included the exact command and result for every check I ran. - [ ] I considered a negative control or failure case for a new fixture. - [ ] I updated README/docs when a capability or build requirement changed. - [ ] I did not include game files, dumps, distribution links or secrets. If this change was AI-assisted, say so in the description. Recent contributions follow this practice.
Implement and validate source-built compute execution through the existing Xbox2Windows startup D3D12 wrapper.

### Compute pipeline support
- Implement bounded Scarlett DXIL compute pipeline creation for device slot 62.
- Enable command-list Dispatch through the existing slot 14 execution path.
- Support compute root SRV, UAV and 32-bit constant bindings.
- Enforce root-argument completeness, resource bounds and pipeline compatibility.
- Preserve graphics pipeline isolation and existing startup behavior.

### Native gfx1013 translation and cache
- Reuse the existing compute_store_aot translator for native compute programs.
- Add source-built 1-D and 2-D gfx1013 compute fixtures.
- Implement deterministic revision-2 native compute cache records and manifests.
- Enforce SHA-256 integrity, dependency identity and strict cache acceptance.
- Add token-owned writer locking, atomic publication and corrupt-request quarantine.
- Validate and sign generated desktop DXIL using the existing DXC infrastructure.

### C++ runtime integration
- Implement bounded native cache parsing and Python/C++ hash parity.
- Create desktop root signatures and compute PSOs from verified shader bytes.
- Introduce explicitly gated native compute fixture integration.
- Reuse the existing compute Dispatch infrastructure.
- Enforce fixture activation, resource extents and supported execution profiles.
- Preserve production slot 67 placeholder behavior.

### GPU execution and verification
- Verify exact fenced GPU readback on WARP and Intel Iris Xe.
- Cover full, partial and zero-active guards, split constants, clipping and repeated Dispatch.
- Add runtime refusal, cache corruption and comparison-sensitivity controls.
- Preserve independent per-adapter and per-mode verification artifacts.
- Verify fresh-cache regeneration directly from source-built native programs.

### Test results
- Offline native cache: 156/156 checks passed.
- C++ cache controls: 195/195 passed.
- Python/C++ acceptance parity: 92/92 matched.
- Native CTest: 8/8 passed.
- Normal GPU execution: 74/74 checks per adapter.
- Debug GPU execution: 78/78 checks per adapter.
- Independent readback verification: 96/96 comparisons matched.
- Frozen regression suite: 29 passed, 0 failed, 1 documented capability skip.
- Graphics and shader regressions: 8/8 passed.
- Zero reported debug-layer warnings, errors, corruption or device removals.
- Documentation, bidi and diff checks passed.

### Documentation and scope
- Document native compute architecture, cache regeneration and reproduction procedures.
- Document fixture activation, supported profiles and known limitations.
- Keep production slot 67 descriptor parsing, ExecuteIndirect and general title compatibility outside this implementation.

Related to #1412.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:45:03 +00:00
Author
Owner

@⁠ArnabSaga on GitHub · 2026-11-24 22:17 UTC · original

I've completed an initial upstream compatibility review. Since this implementation was developed against an earlier baseline, the current upstream compute infrastructure has evolved significantly.

I'm keeping this PR as a draft/reference while evaluating a smaller, independently reviewable native compute translation and cache contribution. The existing implementation and its local verification evidence are preserved.

I'd appreciate guidance on the preferred integration boundary, particularly regarding the overlapping slot 62 work in #1441.

The reported verification results apply to my original local implementation, not a merged current-upstream snapshot.

AI-assisted implementation and review.

**@⁠ArnabSaga** on GitHub · 2026-11-24 22:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1954#issuecomment-7146054586) I've completed an initial upstream compatibility review. Since this implementation was developed against an earlier baseline, the current upstream compute infrastructure has evolved significantly. I'm keeping this PR as a draft/reference while evaluating a smaller, independently reviewable native compute translation and cache contribution. The existing implementation and its local verification evidence are preserved. I'd appreciate guidance on the preferred integration boundary, particularly regarding the overlapping slot 62 work in #1441. The reported verification results apply to my original local implementation, not a merged current-upstream snapshot. AI-assisted implementation and review.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 22:27 UTC · original

Thanks for preserving the broader work as a draft. For the first independent slice, target one source-built compute shader and the existing upstream request/cache and slot 62 path. Please coordinate with #1441 on that path and use #1974/#1975 for their dispatch/root-binding work. A focused translation/cache contribution should show one native compute PSO and an exact fenced UAV readback, with a different shader or incompatible root binding proving cache lookup cannot reuse the wrong PSO. Avoid a second slot 62 implementation. The original local results can stay attached to this draft as reference.

**@⁠R0Y00** on GitHub · 2026-11-24 22:27 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1954#issuecomment-7146255159) Thanks for preserving the broader work as a draft. For the first independent slice, target one source-built compute shader and the existing upstream request/cache and slot 62 path. Please coordinate with #1441 on that path and use #1974/#1975 for their dispatch/root-binding work. A focused translation/cache contribution should show one native compute PSO and an exact fenced UAV readback, with a different shader or incompatible root binding proving cache lookup cannot reuse the wrong PSO. Avoid a second slot 62 implementation. The original local results can stay attached to this draft as reference.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-27 09:37 UTC · original

This PR now conflicts with main. Conflicting files:

  • docs/experiments.md
  • docs/startup-runtime.md
  • src/d3d12_xs_shim.def
  • src/startup_stubs/d3d12_capture.inl
  • src/startup_stubs/d3d12_xs_device.cpp
  • tools/dxil_retarget.py

Could you merge main into your branch (a merge commit, no force push needed) and resolve these? Thank you.

AI-assisted; commands listed were executed locally. (git merge-tree origin/main <head>)

**@⁠tedin7** on GitHub · 2026-11-27 09:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1954#issuecomment-7214892333) This PR now conflicts with `main`. Conflicting files: - `docs/experiments.md` - `docs/startup-runtime.md` - `src/d3d12_xs_shim.def` - `src/startup_stubs/d3d12_capture.inl` - `src/startup_stubs/d3d12_xs_device.cpp` - `tools/dxil_retarget.py` Could you merge `main` into your branch (a merge commit, no force push needed) and resolve these? Thank you. AI-assisted; commands listed were executed locally. (`git merge-tree origin/main <head>`)
This pull request has changes conflicting with the target branch.
  • README.md
  • docs/experiments.md
  • docs/startup-runtime.md
  • src/d3d12_xs_shim.def
  • src/startup_stubs/d3d12_capture.inl
  • src/startup_stubs/d3d12_draw.inl
  • src/startup_stubs/d3d12_xs_device.cpp
  • tools/dxil_retarget.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1954/head:github-bot/gh-1954'
git switch 'github-bot/gh-1954'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1954'
git switch 'github-bot/gh-1954'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1954'
git switch 'github-bot/gh-1954'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1954'
git switch 'main'
git merge --squash 'github-bot/gh-1954'
git switch 'main'
git merge --ff-only 'github-bot/gh-1954'
git switch 'main'
git merge 'github-bot/gh-1954'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.