turnip, freedreno/fdl: Retire tu_vk_format_to_pipe_format helper function + vulkan/format: Translate two formats properly
What does this MR do and why?
vk_format_to_pipe_format
currently returns non-colorspace-converted YUV PIPE_FORMATs for several VK_FORMATs, notably VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
and VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM
. This behavior is incorrect because, in PIPE_FORMAT terminology, YUV formats are auto-converted formats, whereas Vulkan requires explicit client-specified conversion for everything. Some drivers, like Turnip, had to override these formats due to hardware limitations in supporting colorspace correction.
This MR switches these two VK formats to the RGB pipe formats, which should work on all drivers thanks to a fix from @KonstantinSeurer. These formats are used by most drivers, including ANV, V3DV and RADV but a quick CI run showed no changes there.
The other patches make use of the now common formats in Turnip including two 1-plane YCbCr formats that were added earlier, dropping the tu_vk_format_to_pipe_format
helper function. Turnip's behavior is already aligned with the new PIPE_FORMATs of these single planar formats, not what the old ones would suggest. There were no functional changes in my testing on Turnip.
Closes: #11548 (closed)