fix(agc): bind a 2D storage access to a 2D array surface as its first layer #131
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/131"
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 oneandonlydean on 2026-09-29T00:33:13Z.
What
A compute shader that addresses an image with MIMG DIM 2D over a T# of type 2D array was refused with "guest storage texture dimension disagrees with the shader's declared image shape". That access has no slice coordinate, so the hardware reads and writes slice 0 of the resource view, which is the surface's BASE_ARRAY layer.
The storage element is now bound through a 2D view of that one layer of the surface's shared storage image.
StorageTexture::FirstLayerViewcreates it on demand for each mip, caches it, and releases it with the image. The storage image cache key already includes BASE_ARRAY and the dimension, so the layer is always the descriptor's own. Every other shape/dimension mismatch, sampled or storage, still throws. Both messages now name the shape and the dimension.The recorder test device now sets
formatProperties, which aStorageTextureneeds to pick its Vulkan format. No test on main had built one yet.This PR and the MIN_LOD PR (feat/agc-texture-min-lod) add the same
SampleLod.comptest shader, the same CMake rule and the sameSampleProgramtest helper. Whichever merges second hits a small conflict intests/Recorder.cppnext to the helper, where the two test functions sit side by side.Tested
agc_driver_recorder_testsgetsfirstLayerViewTests. It fills three layers of a linear 2D array surface with different values, builds its storage image with BASE_ARRAY 1, samplesFirstLayerView(0)and checks it reads layer 1. It also checks the view is reused. Main has no such view, so the test doesn't build there.ctest: 57/57 pass.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 repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-09-30T16:12:49Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/tests/shaders/SampleLod.comp