AMD Vega (Windows, driver 23.19): clears of multisampled B8G8R8A8 color targets swap red and blue; agc_driver_msaa_dcc_srgb_clear_2/_4/_8 fail #25521
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 cryst4lpepsi on 2026-11-22T07:10:33Z.
What happens
agc_driver_msaa_dcc_srgb_clear_2,_4and_8fail on an AMD Vega iGPU with AMD's Windows driver 23.19:AGC graphics: an sRGB DCC import or resolve changed an undrawn sample endpoint. They pass on an NVIDIA GPU in the same laptop.With the expected and actual bytes printed (a local test-only change), only
B8G8R8A8_SRGBfails, and only for the DCC clear keys0x40(Clear0001) and0x80(Clear1110), withdccAlphaOnMsbfalse. Red and blue are swapped in the resolved texels:B8G8R8A8_SRGB0x4000 00 ff 00ff 00 00 00B8G8R8A8_SRGB0x80ff ff 00 ff00 ff ff ffR8G8B8A8_SRGBpasses for every key. Keys0x00and0xc0clear red and blue to the same value, so a swap cannot show for them.What was checked
Both GPUs take the same AnyPS5 path. With temporary prints in
MultisampleTarget.cppand in theColorMetadataPass::Mode::Resolvebranch ofRunColorMetadataPass:format 50(B8G8R8A8_SRGB),storageFormat 44(B8G8R8A8_UNORM),storageImageMultisample 1, sampleable, on both GPUs.format 50, host storage44, source50, on both GPUs.So the same Vulkan route gives swapped red and blue only on the AMD driver.
Two local experiments (not proposed) isolate the step:
mainB8G8R8A8_UNORMtwin views instead ofB8G8R8A8_SRGBVkClearColorValueof the threevkCmdClearColorImagecalls inMultisampleTarget.cpp, forB8G8R8A8targets onlySo the resolve is not involved: AMD's 23.19 driver clears the multisampled
B8G8R8A8image with red and blue swapped.Three more local experiments show the swap does not depend on how the clear is issued or how the image is created:
VK_ATTACHMENT_LOAD_OP_CLEARover the target's view (Khronos validation: noVUID-messages)twinFormatundefined)storageFormatundefined), so the image is created withoutVK_IMAGE_CREATE_MUTABLE_FORMAT_BITNot tried: another AMD driver, a single-sample
B8G8R8A8clear, and a clear written by a draw instead of a clear operation.Title, test or build step
agc_driver_msaa_dcc_srgb_clear_2,agc_driver_msaa_dcc_srgb_clear_4,agc_driver_msaa_dcc_srgb_clear_8(agc_driver_alpha_to_coverage_tests --dcc-srgb-clear <samples>).AnyPS5 commit
maina1b89f35e2, nothing merged on top.System
Windows 11 Home 22621, WinLibs GCC 15.2.0 r7, Release. AMD Radeon(TM) Graphics (Vega iGPU,
1002:1638, subgroup 64), AMD proprietary driver 23.19.10.08. Control: NVIDIA GeForce RTX 3050 Ti Laptop GPU (10de:25a0), driver 596.36, all three pass.Steps to reproduce
Log
AI-assisted: yes