From 8a20e634ce536cf028c725d647ab7c1e0b4cd0ed Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 12 Dec 2024 10:01:50 +0100 Subject: [PATCH] gallium/vl: Add plane order for Y8_400 format Also add assert for unhandled format and remove assert for number of components. Cc: mesa-stable Reviewed-by: Ruijing Dong Part-of: --- src/gallium/auxiliary/vl/vl_video_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 359a9dbe405..b78c6b920b6 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -93,9 +93,11 @@ vl_video_buffer_plane_order(enum pipe_format format) case PIPE_FORMAT_P010: case PIPE_FORMAT_P012: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y8_400_UNORM: return const_resource_plane_order_YUV; default: + assert(0); return NULL; } } @@ -324,7 +326,6 @@ vl_video_buffer_sampler_view_components(struct pipe_video_buffer *buffer) goto error; } } - assert(component == VL_NUM_COMPONENTS); return buf->sampler_view_components;