shader: validate ACCC parts through DXIL retarget #3953

Open
github-bot wants to merge 2 commits from github-bot/gh-3951 into main AGit
Owner

@⁠lambirou on GitHub · 2026-12-03 16:52 UTC · original
lambirou:codex/aco-container-support → main · +644 −47 · 6 files · 2 commits · open

Problem

The GDK xdxc compiler can append an ACCC compute part to an otherwise normal
DXIL container. The existing retarget path treats unknown parts as malformed or
passes them to desktop validation, which rejects the custom FourCC. This prevents
source-built ACO containers from being inspected and retargeted reproducibly.

Change

  • Validate the bounded ACCC/FSPX version-1 compute layout: header, section
    count, declared size, ranges, overlaps and the single tag-6 code section.
  • Preserve the complete ACCC payload byte for byte while retargeting the DXIL
    program and rewriting its triple.
  • Validate, sign and create the compute PSO through a temporary container view
    with ACCC omitted, recording aco_parts_omitted: ["ACCC"].
  • Keep the preserved ACCC archive separate from that signed DXIL view. The
    archive retains its original payload with a zero digest and reports signed: false; the signed view reports signed_view: true and signing_scope: "dxil-view".
  • Expose the saved-artifact scope in CLI and PE reports, keep the no-ACCC path
    unchanged, and omit ACCC explicitly from the desktop compute-catalogue export.
  • Add synthetic positive, malformed and payload-preservation controls.

Refs #3678.

Validation

Windows development environment:

python -B tests/dxil_retarget_check.py
python -B tests/gdk_shader_corpus_check.py
python -B tests/dxcontainer_part_offsets_check.py
python -B tests/ffx_dispatch_profile_check.py
python -B tests/docs_links_check.py
  • DXIL retarget controls: passed, including malformed ACCC controls and the mock signer boundary.
  • GDK corpus: layout, payload equality and manifest-mismatch controls passed.
  • DX container offsets: 8/8 passed.
  • FFX dispatch profile: 10/10 passed.
  • Links: 285 Markdown files and 1,010 links checked.
  • A synthetic xdxc -noprecompile compute container retained a 672-byte ACCC payload after retarget. Its saved archive has a zero digest and is not desktop-ready; the separate 3,684-byte signed DXIL view validated and created a WARP PSO with 0x00000000.
  • The no-ACCC path still returns the same signed container and reports signing_scope: "container".

Limits

  • Only the observed version-1 compute ACCC/FSPX form is supported.
  • Graphics ACGS parts are not parsed.
  • The parser checks framing and preserves bytes. It does not execute the ACO ISA.
  • The WARP PSO result covers pipeline creation, not shader execution or console hardware.
**@⁠lambirou** on GitHub · 2026-12-03 16:52 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3951) `lambirou:codex/aco-container-support` → `main` · +644 −47 · 6 files · 2 commits · open ## Problem The GDK `xdxc` compiler can append an `ACCC` compute part to an otherwise normal DXIL container. The existing retarget path treats unknown parts as malformed or passes them to desktop validation, which rejects the custom FourCC. This prevents source-built ACO containers from being inspected and retargeted reproducibly. ## Change - Validate the bounded `ACCC/FSPX` version-1 compute layout: header, section count, declared size, ranges, overlaps and the single tag-6 code section. - Preserve the complete `ACCC` payload byte for byte while retargeting the DXIL program and rewriting its triple. - Validate, sign and create the compute PSO through a temporary container view with `ACCC` omitted, recording `aco_parts_omitted: ["ACCC"]`. - Keep the preserved `ACCC` archive separate from that signed DXIL view. The archive retains its original payload with a zero digest and reports `signed: false`; the signed view reports `signed_view: true` and `signing_scope: "dxil-view"`. - Expose the saved-artifact scope in CLI and PE reports, keep the no-ACCC path unchanged, and omit `ACCC` explicitly from the desktop compute-catalogue export. - Add synthetic positive, malformed and payload-preservation controls. Refs #3678. ## Validation Windows development environment: ```text python -B tests/dxil_retarget_check.py python -B tests/gdk_shader_corpus_check.py python -B tests/dxcontainer_part_offsets_check.py python -B tests/ffx_dispatch_profile_check.py python -B tests/docs_links_check.py ``` - DXIL retarget controls: passed, including malformed `ACCC` controls and the mock signer boundary. - GDK corpus: layout, payload equality and manifest-mismatch controls passed. - DX container offsets: 8/8 passed. - FFX dispatch profile: 10/10 passed. - Links: 285 Markdown files and 1,010 links checked. - A synthetic `xdxc -noprecompile` compute container retained a 672-byte `ACCC` payload after retarget. Its saved archive has a zero digest and is not desktop-ready; the separate 3,684-byte signed DXIL view validated and created a WARP PSO with `0x00000000`. - The no-ACCC path still returns the same signed container and reports `signing_scope: "container"`. ## Limits - Only the observed version-1 compute `ACCC/FSPX` form is supported. - Graphics `ACGS` parts are not parsed. - The parser checks framing and preserves bytes. It does not execute the ACO ISA. - The WARP PSO result covers pipeline creation, not shader execution or console hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 16:58:33 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 17:22 UTC · original · requested changes

The pure-Python DXIL retarget and GDK corpus controls passed, as did the eight DXBC offset and ten FFX profile cases. The remaining issue is the saved artifact's signing status. sign_container sends only the ACCC-free bytes to root_probe, then rebuilds the larger container and copies that digest into it. Both CLI and PE-mode reports mark the larger saved file signed, although the full container was never signed by the probe and the PR documents that WARP rejects the full file.

Please report the signing scope at the saved-artifact boundary. A preserved ACCC archive can have a separate signed DXIL view, but the archive itself should not be marked signed or be reported as the validated desktop file. Keep the existing no-ACCC output behavior and add a control that distinguishes the signed view from the preserved archive.

**@⁠R0Y00** on GitHub · 2026-12-03 17:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3951#pullrequestreview-6174864831) · **requested changes** The pure-Python DXIL retarget and GDK corpus controls passed, as did the eight DXBC offset and ten FFX profile cases. The remaining issue is the saved artifact's signing status. sign_container sends only the ACCC-free bytes to root_probe, then rebuilds the larger container and copies that digest into it. Both CLI and PE-mode reports mark the larger saved file signed, although the full container was never signed by the probe and the PR documents that WARP rejects the full file. Please report the signing scope at the saved-artifact boundary. A preserved ACCC archive can have a separate signed DXIL view, but the archive itself should not be marked signed or be reported as the validated desktop file. Keep the existing no-ACCC output behavior and add a control that distinguishes the signed view from the preserved archive.
github-bot force-pushed github-bot/gh-3951 from 2999c7204a to 1ba8b0326b 2026-12-03 17:49:54 +00:00 Compare
Author
Owner

@⁠lambirou on GitHub · 2026-12-03 17:40 UTC · original

Review feedback addressed in 1ba8b0326. The saved ACCC archive now has a zero digest and signed: false; the separate signed DXIL view carries signed_view: true and signing_scope: "dxil-view". CLI and PE reports expose the saved-artifact fields, and controls cover both the ACO archive and the unchanged no-ACCC path. Tests: DXIL retarget, GDK corpus, 8 DXBC offsets, 10 FFX profiles and 287/1,012 Markdown links all pass.

**@⁠lambirou** on GitHub · 2026-12-03 17:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3951#issuecomment-7386883906) Review feedback addressed in `1ba8b0326`. The saved ACCC archive now has a zero digest and `signed: false`; the separate signed DXIL view carries `signed_view: true` and `signing_scope: "dxil-view"`. CLI and PE reports expose the saved-artifact fields, and controls cover both the ACO archive and the unchanged no-ACCC path. Tests: DXIL retarget, GDK corpus, 8 DXBC offsets, 10 FFX profiles and 287/1,012 Markdown links all pass.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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