Clear the image with color {1.0, 0.0, 0.0, 0.0} using vkCmdClearColorImage
(Optional) Render something on the image created above
Create an image view with swizzle (VkImageViewCreateInfo.components) equals to {VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_R}. That is, the R channel is being used as Alpha when being sampled.
Create an image with B8G8R8A8_UNORM format as framebuffer
Render onto the framebuffer by sampling from the image view created in step 3
The result is either complete black or contains many small black blocks (image corruption), and sometimes the driver even freezes.
Note:
RADV driver does not have the issue.
It only happens with R8_UNORM format. Use RGBA format with the same swizzle pattern does not have the issue.
Tested on RX6700XT but it is likely an issue with the RX5xxx gen as well.
Steps to reproduce:
The result is either complete black or contains many small black blocks (image corruption), and sometimes the driver even freezes.
Note:
Tested on RX6700XT but it is likely an issue with the RX5xxx gen as well.