Repository navigation
fix(agc): accept 2D-array image loads and stores on 3D T#s - #5555
Conversation
A 2D-array image_load or image_store bound to a 3D T# addresses the slice as z. Add a 3D runtime mode for these accesses and drop loads and stores whose slice is past the volume depth.
|
The current conventions run fails on the PR body: it reports the AI-assisted: yes; reviewed by MarcZX100. |
Thanks, moved everything under the template headings and filled in the checklist. Also rebased onto current main. |
|
Thanks for updating the body. I confirm the new conventions run passes on the published head. AI-assisted: yes; reviewed by MarcZX100. |
|
Title evidence for this PR (Windows 10, NVIDIA GeForce RTX 4080 SUPER, one run each, no picture checked): Kena: Bridge of Spirits (PPSA01746). On AI-assisted (Claude Code). |
|
Windows test of #5555: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, AI-assisted (Claude Code). |
|
AMD and NVIDIA runs for this PR at head
No title run. AI-assisted: yes (Claude Code ran the builds and tests). |
|
This also unblocks Onimusha: Way of the Sword (PPSA27836, #5769). After its checkerboard draws (#5861, #5907), a program read a 3D T# ( AI-assisted (Claude Code). |
What
A 2D-array
image_loadorimage_storebound to a 3D T# addresses the slice as z on the hardware, but the recompiler refused it with "image descriptor is incompatible with the static runtime image interface". This adds a 3D runtime mode for 2D-array loads (as Dim2D loads already have) and for plain 2D-array stores (no atomics, no dynamic storage mips). Loads and stores whose slice is at or past the volume depth return zero / are dropped, since robust image access is not enabled.Touches the same
RuntimeImageModescondition as #5461 (biased 2D sampling of single-level volumes), which is a different access; whichever lands second needs a trivial rebase.Tested
Windows 11 Pro (build 26200), MinGW-w64 GCC 16.2.0, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1074), on
main8d98e88.Passing:
agc_shader_memory_tests(newverifyVolumeArrayLoadMode, using the title's T#s),agc_driver_image_address_dimension_tests(new 2D-array load on a 2-slice volume),agc_driver_image_store_array_through_volume_tests(new: 2D-array store into a 4x4x2 volume plus a dropped out-of-range slice),agc_driver_image_store_line_through_plane_tests,agc_driver_image_volume_address_on_plane_tests,agc_driver_image_volume_address_planar_texture_tests,agc_driver_image_plane_address_on_line_tests.MARVEL Cosmic Invasion (PPSA29629) aborted on its first presentation with
[videoout] presentation failed: compute shader ...: image descriptor is incompatible with the static runtime image interface: descriptor format 20 decodes to {class 2, dim 4, ...}; T# 02466600 01400000 00000000 a0500204 00000001 00700000 00000000 00000000(and a second store T# 02466300 ...). With this PR it gets past that point and stops later on an unrelated direct memory error.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)