mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
util/format: Use correct pipe format for VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM.
NV12 is UVUVUV (https://wiki.videolan.org/YUV#NV12) and in Vulkan is
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM. So U=B and V=R. So plane order in
VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM is YUV, which is PIPE_FORMAT_IYUV.
Further confirmation: https://fourcc.org/yuv.php U=Cb V=Cr. From the nir
ycbcr conversion, B=Cb and R=Cr.
Fixes: 75d7ee8029 "util/format: translate 422_UNORM and 420_UNORM vulkan formats"
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
This commit is contained in:
parent
273ead81f1
commit
d491b0dfd9
1 changed files with 1 additions and 1 deletions
|
|
@ -251,7 +251,7 @@ vk_format_to_pipe_format(enum VkFormat vkformat)
|
|||
case VK_FORMAT_B8G8R8G8_422_UNORM:
|
||||
return PIPE_FORMAT_UYVY;
|
||||
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
|
||||
return PIPE_FORMAT_YV12;
|
||||
return PIPE_FORMAT_IYUV;
|
||||
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
|
||||
return PIPE_FORMAT_NV12;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue