shader: lower startup compute formatted buffer reads #2398

Manually merged
github merged 1 commit from gh-pr/2398/head into gh-pr/2398/base 2026-11-27 00:48:30 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-25 15:12 UTC · original
R0Y00:codex/startup-compute-formatted-load → main · +135 −18 · 3 files · 1 commits · merged 2026-11-25 16:23 UTC

Refs #870.

The offline startup compute translator lowers all four MUBUF buffer_load_format_* widths using the existing FORMAT and DST_SEL decode. The manifest identifies the source SRV for descriptor word 3 and any indexed byte stride. The dispatch caller must bind and validate those values from the same native table descriptor. The shared decode also returns integer 1 for selector 1 in format 27 (16_16_UINT).

On Windows build 26200.9974 with the debug layer enabled, the new UINT16 and UNORM8 cases matched all 320 words each on WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The byte-offset, selector and integer-one mutants mismatched 32, 8 and 16 words respectively on both adapters. Both reported zero debug-layer errors and warnings.

ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_compute_(controls|warp|hardware)$' --output-on-failure
python -B tests/startup_vertex_fetch_formats_check.py controls
python -B tests/startup_gfx2hlsl_handler_arity_check.py

All three CTest entries passed at 1e4e1451 with no skips. The existing graphics format regressions also passed on both adapters. LLVM 15 reassembled the source-built compute fixtures byte for byte.

In a separate local A/B replay on the same five requests, all five advanced past the formatted-load refusal. Two then refused an EXEC save inside an execz block, two refused a readfirstlane without a uniform source, and one refused a lane write inside an execz block. Neither side produced a complete shader.

AI-assisted. Tests listed above ran locally.

**@⁠R0Y00** on GitHub · 2026-11-25 15:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2398) `R0Y00:codex/startup-compute-formatted-load` → `main` · +135 −18 · 3 files · 1 commits · merged 2026-11-25 16:23 UTC Refs #870. The offline startup compute translator lowers all four MUBUF `buffer_load_format_*` widths using the existing FORMAT and DST_SEL decode. The manifest identifies the source SRV for descriptor word 3 and any indexed byte stride. The dispatch caller must bind and validate those values from the same native table descriptor. The shared decode also returns integer 1 for selector 1 in format 27 (16_16_UINT). On Windows build 26200.9974 with the debug layer enabled, the new UINT16 and UNORM8 cases matched all 320 words each on WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The byte-offset, selector and integer-one mutants mismatched 32, 8 and 16 words respectively on both adapters. Both reported zero debug-layer errors and warnings. ```powershell ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_compute_(controls|warp|hardware)$' --output-on-failure python -B tests/startup_vertex_fetch_formats_check.py controls python -B tests/startup_gfx2hlsl_handler_arity_check.py ``` All three CTest entries passed at 1e4e1451 with no skips. The existing graphics format regressions also passed on both adapters. LLVM 15 reassembled the source-built compute fixtures byte for byte. In a separate local A/B replay on the same five requests, all five advanced past the formatted-load refusal. Two then refused an EXEC save inside an execz block, two refused a readfirstlane without a uniform source, and one refused a lane write inside an execz block. Neither side produced a complete shader. AI-assisted. Tests listed above ran locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:48:28 +00:00
github manually merged commit 1e4e1451e5 into gh-pr/2398/base 2026-11-27 00:48:29 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-11-25 16:08 UTC · original

APPROVED. Lowers startup compute formatted buffer reads.

**@⁠KelboLive** on GitHub · 2026-11-25 16:08 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2398#issuecomment-7167623884) APPROVED. Lowers startup compute formatted buffer reads.
This discussion has been locked. Commenting is limited to contributors.
No description provided.