fix(agc): view 4_4_4_4 textures as B4G4R4A4, which every Vulkan device can sample #3208
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3208"
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 adriadam10 on 2026-10-11T01:14:07Z.
What
agc_driver_image_packed16_loadhas failed on every Linux CI run ofmainsince #2386 (main run 38097151664):Cause: #2386 views the guest
4_4_4_4format asVK_FORMAT_R4G4B4A4_UNORM_PACK16. That format has no required support in Vulkan, and CI's lavapipe (Mesa 25.2.8, LLVM 20) has none at all. Under the validation layer, the image view failsVUID-VkImageViewCreateInfo-None-02273("The format features of the resultant image view must contain at least one bit"), and the upload failsVUID-vkCmdCopyBufferToImage-dstImage-01997. RADV supports the format, so the test passed locally.Fix: use
VK_FORMAT_B4G4R4A4_UNORM_PACK16, the 4-bit format Vulkan requires every device to support for sampling. The swizzle reads the same bits as before: guest X from bits 0-3 (A), Y from 4-7 (R), Z from 8-11 (G), W from 12-15 (B). It's still the low-bits-first order #2386 measured on gfx1035.The unit test's channel table and the TechnicalDebt line now name the new format.
Tested
Linux (CachyOS), GCC 16, Release.
/dev/udmabufdenied as on CIagc_driver_image_packed16_loadpasses, 0 validation errorsagc_driver_graphics_tests(theTextureComponentChannelunit table) passes.A,B,G,Rswizzle on the new format fails both the RADV execution test and the unit table;tools/check_conventions.pypasses.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 Silverash-i8 on 2026-10-11T01:22:50Z.
Windows run on the two GPUs the PR didn't cover: Windows 11, WinLibs GCC 15.2.0 r7, Release, head
bbe26912.agc_driver_image_packed16_loadagc_driver_graphicstexture_format_lookupANYPS5_GPU=Intel)The texture log confirms the new view is what ran: guest format 136 is created as
vk=3(VK_FORMAT_B4G4R4A4_UNORM_PACK16) on both. Onmain06da1176this test also passed on both GPUs in my last full runs, so the old R4G4B4A4 view is supported by these two drivers, and nothing regresses with the change.AI-assisted (Claude Code); I ran this on my machine.