Repository navigation
compute: lower 2D a16 image_store with 32-bit data in direct compute - #3372
Conversation
The direct path refused a16 image stores unless the data was d16. A16 selects 16-bit addresses independently of the data width, so a 2D store with 32-bit data uses the same packed coordinates as an a16 load: x in the low half of the address VGPR and y in the high half. Graphics keeps its refusal.
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean A16 image_store lowering for the direct compute path.
Changes the A16 guard from graphics_input && store && !half to graphics_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.
KelboLive
left a comment
There was a problem hiding this comment.
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.
KelboLive
left a comment
There was a problem hiding this comment.
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.
|
Thanks, Leyukaka. This is in |
|
One follow-up on the two shaders that compiled after this change but stopped at |
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).