compute: lower 2D a16 image_store with 32-bit data in direct compute #3372
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3372"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T15:24:41Z.
Refs #3224.
Change
The direct compute path refused
a16image stores unless the data wasd16(store && !halfinimage_io). A16 selects 16-bit addresses independently of the data width (RDNA 2 ISA, MIMGA16). A 2D store with 32-bit data now uses the same packed coordinates as an a16 load: x is the low half and y the high half of the first address VGPR. Graphics stages keep the refusal for 32-bit data.Test
tests/native_image_store_a16_check.py(new):native_image_store_a16_controls: onetextureStore.f32whose coordinates areand ..., 65535andlshr ..., 16of the same value. An a16image_load_mipand an a16 3Dimage_storestill refuse withpacked image addressing.native_image_store_a16_hardware/_warp: a 32-lane source-built program with EXEC0x55555555, read back from an RGBA32_FLOAT texture (1,344 words).ctest --test-dir out/build/release -R native_image_store_a16, Windows 11 build 26300, RTX 5080 driver 32.0.16.2101 (debug layer unavailable):mainf5a6f6ba_controlspacked image addressing)_hardware_warpSwapping x and y in the unpacking fails both
_controlsand_hardware.Broad selection (
ctest -R "native_|startup_compute|compile_dxil|salu"): 560/566. The same 6 tests fail onmainf5a6f6ba.Measurement
On the 873 compute requests of the run in my #3224 census, 3 shaders (1,017 dispatches) move from
packed image addressingto compiled, and none is lost. One publishes a runtime manifest; two stop atSRV kind typed_buffer_srv.Not covered: write masks other than 15; a16 stores with LOD, on 1D, 3D or array images, or in graphics stages (the graphics refusal is not tested).
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T20:46:27Z.
Review: APPROVED
LGTM — clean A16 image_store lowering for the direct compute path.
Changes the A16 guard from
graphics_input && store && !halftographics_input && store && !half(relaxed to allow compute-only A16 stores), with a clear ISA comment. The test fixture verifies coordinate packing, both refusal diagnostics, and hardware readback of RGBA32 texture words.Ready to land.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:09:29Z.
Review: APPROVED
LGTM — clean fix with thorough tests.
Adds graphics_input guard to the A16 image addressing refusal so graphics input A16 stores are properly rejected. Test fixture covers packed coordinate extraction, valid RGBA32 store, and both refusal diagnostics.
Ready to land.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:57:56Z.
Review: APPROVED
LGTM — clean fix with thorough tests.
Adds graphics_input guard to the A16 image addressing refusal so graphics input A16 stores are properly rejected. Test fixture covers packed coordinate extraction, valid RGBA32 store, and both refusal diagnostics.
Ready to land.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T17:24:26Z.
Thanks, Leyukaka. This is in
mainnow. The RTX 5080 readback matched all 1,344 words, and the swapped-coordinate control caught the X/Y regression. WARP reported a wave32 capability skip. The two shaders that still stop atSRV kind typed_buffer_srvare a separate follow-up under #3224.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T06:19:23Z.
One follow-up on the two shaders that compiled after this change but stopped at
SRV kind typed_buffer_srv: #3386 added published typed-buffer SRV bindings for 32-bit components, and #3460 added the corresponding in-process binding used by the default launch path. Those changes were verified with source-built fixtures. The remaining check under #3224 is to rerun the same two requests on currentmainand record whether each reaches a translated dispatch or hits another refusal.