AGC: comparison sampling of a 1D T# creates a 1D depth image, which RADV does not support #7923
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 DavidAmsellem on 2026-10-19T14:11:38Z.
What
For comparison sampling,
Textureturns anR16_UNORMorR32_SFLOATT# into aD16_UNORM/D32_SFLOATimage (core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:308-310). It refuses 3D textures, but it does not check 1D ones.ImageTypeFormaps bothk1Dandk1DArraytoVK_IMAGE_TYPE_1D. RADV does not support 1D images with a depth format, so a 1D or 1D-array T# sampled withimage_sample_c*creates an image the device reports as unsupported.lavapipe supports them, so CI never sees it.
agc_driver_image_plane_compare_on_line(added in0851c08b6) takes this path. Its log showsdim=0 … format=7 vk=124: ak1DT# created asVK_FORMAT_D16_UNORMby thevkCreateImageatTexture.cpp:330-343. The test passes on RADV anyway, so this is undefined behaviour that happens to work here. Not checked on AMD's Windows driver or NVIDIA.Evidence
With
VK_LAYER_KHRONOS_validation, the test logs only on RADV:To rule out the validation layer, I asked the drivers directly with a standalone program, outside AnyPS5. I used the same parameters as
Texture.cpp: optimal tiling,TRANSFER_DST | SAMPLED, no flags.vkGetPhysicalDeviceImageFormatPropertiesandvkGetPhysicalDeviceImageFormatProperties2give the same answer.D16_UNORMD32_SFLOATPossible direction
Back a 1D or 1D-array compare texture with a 2D image of height 1 (and a 2D view) when the device rejects the 1D depth image, as the 3D case already refuses explicitly. Alternatively, refuse it the same way until that exists. I have not changed anything.
Environment
main85029a00f(code unchanged atc4708fa20). AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8; llvmpipe (LLVM 20.1.2). Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Validation layer 1.3.275.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T01:52:33Z.
Fixed by #7966 (
1faa800f08): 1D and 1D-array depth comparison textures are now backed by 2D images of height 1, so RADV no longer gets a 1D depth image. The focused test passes on RADV with the validation layer and the VUID-02251 errors are gone. Closing.