shader: lower startup compute formatted buffer reads #2390

Merged
R0Y00 merged 1 commit from upstream-pr/2398 into main 2026-11-25 16:23:48 +00:00
R0Y00 commented 2026-11-25 15:12:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T15:12:56Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6607654411 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2398). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T15:12:56Z. --- 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.
upstream-sync closed this pull request 2026-11-25 17:01:24 +00:00
KelboLive commented 2026-11-25 17:01:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T16:08:09Z.


APPROVED. Lowers startup compute formatted buffer reads.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167623884 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2398#issuecomment-7167623884). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-25T16:08:09Z. --- APPROVED. Lowers startup compute formatted buffer reads.
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!2390
No description provided.