From fd0b20e8e857a888deddcc33b54cc5415daaf70e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 18 Oct 2024 09:03:00 -0400 Subject: [PATCH] va: fail context create if driver does not support video not all drivers support this, and forcing them to implement stubs is not how gallium works cc: mesa-stable Reviewed-by: David Rosca Part-of: --- src/gallium/frontends/va/context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/va/context.c b/src/gallium/frontends/va/context.c index 40138bdf2d2..f56ddb98a99 100644 --- a/src/gallium/frontends/va/context.c +++ b/src/gallium/frontends/va/context.c @@ -204,6 +204,10 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) if (!drv->vscreen) goto error_screen; + /* video cannot work if these are not supported */ + if (!drv->vscreen->pscreen->get_video_param || !drv->vscreen->pscreen->is_video_format_supported) + goto error_pipe; + drv->pipe = pipe_create_multimedia_context(drv->vscreen->pscreen); if (!drv->pipe) goto error_pipe;