mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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:
parent
fd0b20e8e8
commit
b4e18fb188
1 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,12 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
pscreen = dev->vscreen->pscreen;
|
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);
|
dev->context = pipe_create_multimedia_context(pscreen);
|
||||||
if (!dev->context) {
|
if (!dev->context) {
|
||||||
ret = VDP_STATUS_RESOURCES;
|
ret = VDP_STATUS_RESOURCES;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue