fix(recompiler): read image address components the instruction omits as 0 #1379
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1379"
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 boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-08T01:11:56Z.
What
An image load or store whose
DIMfield encodes fewer coordinates than the bound resource was refused at SPIR-V emission ("has an image address with too few coordinate components"). A title runs a compute shader during start-up that doesimage_loadwith a 2D address on a 3D texture.CoordU32takes the coordinates the instruction provides (as many as both the instruction'sDIMand the resource have) and fills the rest with 0, so such a load reads the first slice (or face or layer).DIMstill throws, and so does a sampled access with too few coordinates (CoordF32).Tested
agc_driver_image_address_dimensionpasses with a new case:image_load2d on a two-slice linear 3D texture returns slice 0's texels for 32 threads. The existing refusal ofimage_sample_l1d on a 2D texture still holds.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T12:42:07Z.
Checked on the HW oracle (gfx1035): with fewer address components than the T# (
image_load/image_storedim 2D/1D on a 3D T#, dim 2D on 2D-array/cube, dim 1D on 1D-array), the hardware uses 0 for the missing ones (3D: slice 0, BASE_ARRAY ignored; arrays/cube: layer BASE_ARRAY, same as an explicit layer 0), and ignores the next VGPR. That matches whatCoordU32now emits. Build + ctest green on RADV, and the new case fails with the fix reverted. Merging.