Repository navigation
shader: lower gfx1013 D16 image stores to RGBA16 FLOAT - #2106
Merged
Merged
Conversation
2 tasks done
Jess-Doit
added a commit
to Jess-Doit/Xbox2Windows
that referenced
this pull request
Nov 25, 2026
Conflicts with R0Y00#2106 (D16 image stores): * tools/compute_store_aot.py: the image pattern takes both the dimension group and d16; RGBA16 FLOAT setup precedes the view-dimension checks; the UAV type uses float_image with the dimension table. A d16 store to an array or volume keeps R0Y00#2106's "Unsupported compute instruction" refusal. * tests/compute_check.cpp: both flags (bit 22 RGBA16 FLOAT, bits 31/30 array and volume), main's per-format texel size, and the per-subresource readback with main's 16-bit half comparison. * README, docs, CMake and workflow keep both entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jess-Doit
added a commit
to Jess-Doit/Xbox2Windows
that referenced
this pull request
Nov 25, 2026
…e-1d With R0Y00#2106 (D16 stores) now in the base: the image pattern takes 1D, the layered dimensions and d16; a d16 store to any dimension other than 2D, 1D included, keeps R0Y00#2106's 'Unsupported compute instruction' refusal; the harness keeps the 1D flag (bit 23) and the RGBA16 FLOAT flag (bit 22) with main's per-format texel size and this branch's 1D height. README, docs, CMake and workflow keep both entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #1545.
Overlap: #1649 and #2056 (open) change the same gfx1013 image rules in
tools/compute_store_aot.pyand the texture-case flags intests/compute_check.cpp. This PR uses flag bit 22, #2056 uses bit 23 and #1649 adds bit 31, so they do not collide. Whichever lands later rebases.Change
Lower gfx1013 full-mask 2D D16
image_storetoRWTexture2D<float4>atu0when the caller declares anR16G16B16A16_FLOATUAV at mip zero. Widen the low and high halves of VDATA followed by the low and high halves of VDATA+1 withf16tof32. The typed UAV narrows the four components back to binary16. RDNA 2 ISA §§8.2.1 and 8.2.5An independent LLVM 15 AMDGPU codegen probe with halves
3c01 c002 4003 b004placedc0023c01andb0044003in the two consecutive store VGPRs. LLVM 15.0.7llvm-mcrejected one-, three- and four-register full-mask D16 stores withimage data size does not match dmask, d16 and tfe.Tests
The source-built compute fixture writes 16 unique texels at mip zero. It compares all 1,344 raw binary16 halves across all three destination mips, including 1,280 untouched sentinels. The written values include positive and negative normals, subnormals of both signs, and both signed zeros. The translation checks pin the view, register, four half conversions and store index. The binary checks reassemble the recorded bytes and verify the synthetic container CLI output for the new and existing float-store fixtures.
3c00, actualc000.3c00, actual0000.D16 image_store requires full DMASK 0xf.D16 image_store requires exactly two consecutive data VGPRs.D16 requires a 2D image_store with full-width coordinates and implicit mip zero.Unsupported compute instructionwith the rejected form.D16 image_store requires a gfx1013 RGBA16 FLOAT UAV.RGBA16 FLOAT image UAV requires a D16 image_store.RGBA16 FLOAT requires a gfx1013 D16 image store UAV.Image store mip does not match the UAV view.Verification
Tested commit
c3ce6f66f59ff87b34eaf81aeee1a4a2574f8870on Windows 10 22H2, build 19045.6456, with DXC 1.9.2602.17. The GTX 1060 6GB used driver 32.0.15.6094. In-box WARP used Microsoft Basic Render Driver 10.0.19041.5794. The D3D12 debug layer was enabled on both adapters and reported zero warnings and errors for the D16 fixture and both controls in Debug and Release.dev)release)Set
VULKAN_SDKto the Vulkan SDK 1.4.363.0 installation. Use a Python environment withrequirements-dev.txtinstalled.The local binary checks used LLVM 15.0.7 for assembly, llvm-objcopy for
.textextraction, and libLLVM 15.0.0 for disassembly and the independent codegen probe. The Windows DLL can be extracted toout/libLLVM-15.dll. LLVMSharp Windows runtime packageLimits
The profile is restricted to full-mask 2D stores at mip zero with full-width coordinates and an RGBA16 FLOAT UAV. The measurements cover selected finite binary16 values and in-bounds addresses on desktop D3D12. NaN payloads, infinities and native console execution are outside the measurement.
I reran it at
c3ce6f66on the same machine: 31/31 in dev and 31/31 in release (GTX 1060 and WARP, debug layer on, no skips), plus the LLVM 15--binarychecks of the D16, 2D and image atomics fixtures.AI-assisted (Codex, driven with Claude Code; Claude Code reviewed the change and reran the checks).