shader: expand packed D16 XYZ stores into FLOAT3 heap views #2364

Merged
RavenCurseBurg merged 1 commit from upstream-pr/2372 into main 2026-11-25 14:20:21 +00:00
RavenCurseBurg commented 2026-11-25 14:03:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T14:03:38Z.


Refs #2022, item B. This completes the packed D16 component widths in the stand-alone heap-store experiment after #2230, #2340 and #2361.

A gfx1013 buffer_store_format_d16_xyz draws X/Y from the first VGPR and Z from the low half of the second. The identity format-74 view (BUF_FMT_32_32_32_FLOAT) expands the three binary16 components into twelve output bytes. The emitted Store3 leaves the next dword alone. The same record-count, alignment, lifetime, stride and output-extent checks apply. AMD RDNA 2 format table · LLVM 15 buffer formats

Validation at fa712d56 on Windows 11 build 26100.9711:

  • python -B tests/compute_heap_store_check.py draw <dxc> <offscreen_check> <warp|hardware> passed for all five programs on WARP (10.0.26100.9711), RTX 4060 (32.0.15.9579), and Intel UHD 770 (32.0.101.5973). DXC 1.9.2609 and Agility SDK 1.620.2. For FLOAT3 each backend compared 320 words in 17 cases, including signed zero, a subnormal, two independent poisons for the unused half, the last complete triplet, partial output and incorrect view formats. All 11 compiled shader mutations failed readback. Reading the unused half failed at word 6, overwriting a fourth word at guard 7, and permitting an eight-byte tail at guard 126. Local debug layer unavailable. The pinned Windows Server WARP job passed both focused CTests without skips, then confirmed an enabled D3D12 debug layer and zero debug warnings/errors for each of the 17 positive FLOAT3 dispatches. Job log
  • python -B tests/compute_heap_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM> passed for all five inputs using LLVM 15.0.7 (Clang integrated assembler as the object writer, llvm-objcopy and LLVM-C). Disassembled instructions and source-built DXBC containers through the public CLI produced the expected HLSL. Native FLOAT3 fixture SHA-256: 035a58e1833030efd8c3e2e0da41bf6666975906695230d4d467f0a6e0219725.
  • The heap-store and heap-load host controls, compute-store host controls, docs link scan (459 links), bidirectional controls scan and git diff --check passed.

Agent environment: Codex + GPT-6.2 Astra xhigh.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6606272864 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2372). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T14:03:38Z. --- Refs #2022, item B. This completes the packed D16 component widths in the stand-alone heap-store experiment after #2230, #2340 and #2361. A gfx1013 `buffer_store_format_d16_xyz` draws X/Y from the first VGPR and Z from the low half of the second. The identity format-74 view (`BUF_FMT_32_32_32_FLOAT`) expands the three binary16 components into twelve output bytes. The emitted `Store3` leaves the next dword alone. The same record-count, alignment, lifetime, stride and output-extent checks apply. [AMD RDNA 2 format table](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content) · [LLVM 15 buffer formats](https://releases.llvm.org/15.0.0/docs/AMDGPUModifierSyntax.html#ufmt) Validation at fa712d56 on Windows 11 build 26100.9711: - `python -B tests/compute_heap_store_check.py draw <dxc> <offscreen_check> <warp|hardware>` passed for all five programs on WARP (10.0.26100.9711), RTX 4060 (32.0.15.9579), and Intel UHD 770 (32.0.101.5973). DXC 1.9.2609 and Agility SDK 1.620.2. For FLOAT3 each backend compared 320 words in 17 cases, including signed zero, a subnormal, two independent poisons for the unused half, the last complete triplet, partial output and incorrect view formats. All 11 compiled shader mutations failed readback. Reading the unused half failed at word 6, overwriting a fourth word at guard 7, and permitting an eight-byte tail at guard 126. Local debug layer unavailable. The pinned Windows Server WARP job passed both focused CTests without skips, then confirmed an enabled D3D12 debug layer and zero debug warnings/errors for each of the 17 positive FLOAT3 dispatches. [Job log](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45629728319) - `python -B tests/compute_heap_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM>` passed for all five inputs using LLVM 15.0.7 (Clang integrated assembler as the object writer, llvm-objcopy and LLVM-C). Disassembled instructions and source-built DXBC containers through the public CLI produced the expected HLSL. Native FLOAT3 fixture SHA-256: `035a58e1833030efd8c3e2e0da41bf6666975906695230d4d467f0a6e0219725`. - The heap-store and heap-load host controls, compute-store host controls, docs link scan (459 links), bidirectional controls scan and `git diff --check` passed. Agent environment: Codex + GPT-6.2 Astra xhigh.
upstream-sync closed this pull request 2026-11-25 15:01:49 +00:00
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!2364
No description provided.