renderer-gl: Add YUV format descriptors for P010/P012/P016

For drivers not supporting importing them directly. We use the equivalent
values to NV12 but with 16bit. The lowest 6 or 4 bits for P010/P012 are
padding and set to zero, so we can use the same subformats like for P016
and share the shader with NV12.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
This commit is contained in:
Robert Mader 2023-09-04 23:58:53 +02:00
parent 3c9e9d721e
commit 12744bcbee
1 changed files with 33 additions and 0 deletions

View File

@ -281,6 +281,39 @@ struct yuv_format_descriptor yuv_formats[] = {
.format = DRM_FORMAT_GR88,
.plane_index = 1
}}
}, {
.format = DRM_FORMAT_P010,
.output_planes = 2,
.shader_variant = SHADER_VARIANT_Y_UV,
{{
.format = DRM_FORMAT_R16,
.plane_index = 0
}, {
.format = DRM_FORMAT_GR1616,
.plane_index = 1
}}
}, {
.format = DRM_FORMAT_P012,
.output_planes = 2,
.shader_variant = SHADER_VARIANT_Y_UV,
{{
.format = DRM_FORMAT_R16,
.plane_index = 0
}, {
.format = DRM_FORMAT_GR1616,
.plane_index = 1
}}
}, {
.format = DRM_FORMAT_P016,
.output_planes = 2,
.shader_variant = SHADER_VARIANT_Y_UV,
{{
.format = DRM_FORMAT_R16,
.plane_index = 0
}, {
.format = DRM_FORMAT_GR1616,
.plane_index = 1
}}
}, {
.format = DRM_FORMAT_YUV420,
.output_planes = 3,