fix(agc): sample a 2D instruction over a 2D array texture through its first layer #181
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/181"
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-30T11:47:46Z.
What
Follow-up to #131 (merged); rebased onto current
main, so this branch is now the one commit on top of it.#131 binds a 2D storage access to a 2D array surface as the surface's first layer. The sampled path had the same gap: a shader sampling with MIMG DIM 2D over a T# of type 2D array was refused with "guest texture dimension disagrees with the shader's declared image shape (shape 1, dimension 2)". The access carries no slice coordinate, so the hardware samples slice 0 of the resource view, the BASE_ARRAY layer.
A 2D array
Texturenow also makes a 2D view of that layer (Texture::FirstLayerView), both for a texture that holds its own snapshot and for one that views the surface's storage image. The view is created with the full view and released with it.resolveImageBindingaccepts exactly this case (2D shape over a 2D array dimension) and binds the first-layer view; every other shape/dimension mismatch still throws.In PPSA21564 a compute shader samples a 2D array texture this way from the intro's warp effect on; the dispatch was skipped every time.
If #130 (MIN_LOD) merges first, the first-layer view picks up its
VkImageViewMinLodCreateInfoEXTthrough the copied create info, since it is created while the full view's chain is still alive.Tested
firstLayerViewTestsinagc_driver_recorder_tests(from #131) now also samples a 2D array snapshot texture and a sampled view of a 2D array storage image throughFirstLayerView()and checks both read the BASE_ARRAY layer, and checks that a 2D texture has no first-layer view. Without the view creation the test fails with "a sampled 2D array texture has no first-layer view"; on #131 alone it does not build (noTexture::FirstLayerView).ctest: 85/85 pass on current main with this branch.agc_driver_recorder_testsandagc_driver_graphics_testspass.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