util/format: fix some missing cases in util_format_get_plane_format

We were missing some of the emulated YUV formats (like R8_G8B8_420_UNORM)
in util_format_get_plane_format; add those.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
This commit is contained in:
Eric R. Smith
2025-04-14 15:11:48 -03:00
committed by Marge Bot
parent aceabab18f
commit 6b54547a0e
+4
View File
@@ -1312,8 +1312,12 @@ util_format_get_plane_format(enum pipe_format format, unsigned plane)
return PIPE_FORMAT_R8_UNORM;
case PIPE_FORMAT_NV12:
case PIPE_FORMAT_NV16:
case PIPE_FORMAT_R8_G8B8_420_UNORM:
case PIPE_FORMAT_R8_G8B8_422_UNORM:
return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_RG88_UNORM;
case PIPE_FORMAT_NV21:
case PIPE_FORMAT_R8_B8G8_420_UNORM:
case PIPE_FORMAT_R8_B8G8_422_UNORM:
return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_GR88_UNORM;
case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
case PIPE_FORMAT_Y16_U16_V16_422_UNORM: