Repository navigation
shader: expand packed D16 XY stores into FLOAT2 heap views - #2361
Merged
Merged
Conversation
Contributor
Author
|
The Windows Server 2025 WARP run pinned to 85e0453 passed both selected CTests without skips. It then repeated the FLOAT2 fixture with the D3D12 debug layer enabled and checked the child output for each of the 17 positive dispatches: zero debug warnings and errors. All 11 shader mutations produced the expected readback failures. |
tedin7
reviewed
Nov 25, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 85e0453 (files: docs/experiments.md, tests/compute_heap_store_check.py, tools/compute_store_aot.py).
Findings: 0 P1, 0 P2.
- Semantics: buffer_store_format_d16_xy takes one VGPR, low half = X, high half = Y. The lowering uses f16tof32(uint2(lo, hi)) and writes one Store2 into an identity BUF_FMT_32_32_FLOAT view (format 64, 0x01040fac). Format, alignment, extent and slot-limit guards are shared with the existing D16_X path; an 8-byte width is used for the bound.
- heap_store_components is set from the lowered store and drives the helper emitted, so xyzw (4) and x (1) are unchanged. d16_xyz and a two-VGPR d16_xy source are still refused (control added).
- Test: new D16_XY draw program with 12 cases plus payload checks (-0, smallest subnormal, -2.0 in Y) and wrong-format rejection (FLOAT4, UINT2). Docs heading keeps the old anchor. No competing open PR covers d16_xy heap stores.
Commands executed locally (Linux):
- python3 tests/compute_heap_store_check.py controls -> "heap-store controls passed"
- python3 tests/docs_links_check.py -> 19 files, 457 links OK
- python3 tests/bidi_controls_check.py -> OK
- git diff --check origin/main...HEAD -> clean
- Mutation: components in (1, 2) -> (1,) in tools/compute_store_aot.py makes controls FAIL (AssertionError on the Store2 check). Reverted with git checkout.
- CI: Build and test on Windows = pass, Linux checks = pass, fixtures = pass.
- Windows WARP draw fixture is covered by the pure-Python fast path (only .py/.md changed).
AI-assisted; commands listed were executed locally.
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2022 (item B). Extends the stand-alone compute translator after the four-component and scalar packed-half stores in #2230 and #2340.
buffer_store_format_d16_xyconsumes one VGPR and requires an identityBUF_FMT_32_32_FLOATdescriptor (format 64). Its low and high halves become two binary32 words in X/Y order. Both words must fit in the stride and declared output extent. A stopped or out-of-range view leaves every guard intact. The compiler uses the decoded component count to select the HLSL helper. The changed CLI help lists the supported view widths.Validation on Windows 11 build 26100.9711 with DXC 1.9.2609 and Agility SDK 1.620.2:
python -B tests/compute_heap_store_check.py draw <dxc> <offscreen_check> <warp|hardware>on WARP 10.0.26100.9711, RTX 4060 (32.0.15.9579) and Intel UHD 770 (32.0.101.5973). Each adapter passed 17 FLOAT2 dispatches comparing all 320 words, including negative zero, a binary16 subnormal, the final complete pair, a partial pair and wrong formats. Each rejected 11 compiled shader mutations. Swapped halves first failed at word 4 (3f800000→40400000), duplicated X at word 5 (40400000→3f800000), and the weakened extent at guard word 127 (c5c5c5c5→3f800000). The existing UINT4, FLOAT4 and FLOAT1 fixtures passed on all three. Local D3D12 debug layer unavailable.python -B tests/compute_heap_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM>passed for all four programs, using LLVM 15.0.7's Clang integrated assembler as the gfx1013 object writer, llvm-objcopy and LLVM-C. Each goes through disassembly, a source-built container and the public CLI. The native FLOAT2 fixture SHA-256 isa5562f3c4650969c26bee9cde075c8eb83251f7912fa03c030725d11006e0447.python -B tests/compute_heap_store_check.py controls,python -B tests/compute_heap_view_check.py controls, the existing compute-store host controls, docs links, bidirectional controls andgit diff --checkpassed.Agent environment: Codex + GPT-6.2 Astra xhigh.