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 <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
This commit is contained in:
David Rosca 2024-12-12 10:01:50 +01:00 committed by Marge Bot
parent 2ed862c2fe
commit 8a20e634ce

View file

@ -93,9 +93,11 @@ vl_video_buffer_plane_order(enum pipe_format format)
case PIPE_FORMAT_P010: case PIPE_FORMAT_P010:
case PIPE_FORMAT_P012: case PIPE_FORMAT_P012:
case PIPE_FORMAT_P016: case PIPE_FORMAT_P016:
case PIPE_FORMAT_Y8_400_UNORM:
return const_resource_plane_order_YUV; return const_resource_plane_order_YUV;
default: default:
assert(0);
return NULL; return NULL;
} }
} }
@ -324,7 +326,6 @@ vl_video_buffer_sampler_view_components(struct pipe_video_buffer *buffer)
goto error; goto error;
} }
} }
assert(component == VL_NUM_COMPONENTS);
return buf->sampler_view_components; return buf->sampler_view_components;