vdpau: 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 <david.rosca@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
This commit is contained in:

committed by
Marge Bot

parent
fd0b20e8e8
commit
b4e18fb188
@@ -76,6 +76,12 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
|
||||
}
|
||||
|
||||
pscreen = dev->vscreen->pscreen;
|
||||
/* video cannot work if these are not supported */
|
||||
if (!pscreen->get_video_param || !pscreen->is_video_format_supported) {
|
||||
ret = VDP_STATUS_RESOURCES;
|
||||
goto no_vscreen;
|
||||
}
|
||||
|
||||
dev->context = pipe_create_multimedia_context(pscreen);
|
||||
if (!dev->context) {
|
||||
ret = VDP_STATUS_RESOURCES;
|
||||
|
Reference in New Issue
Block a user