diff options
Diffstat (limited to 'src/gallium/state_trackers/va/context.c')
-rw-r--r-- | src/gallium/state_trackers/va/context.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 44d25aed8dc..ae9154a332a 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -120,8 +120,6 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) drv->vscreen = vl_dri3_screen_create(ctx->native_dpy, ctx->x11_screen); if (!drv->vscreen) drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen); - if (!drv->vscreen) - goto error_screen; break; case VA_DISPLAY_WAYLAND: case VA_DISPLAY_DRM: @@ -134,8 +132,6 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) } drv->vscreen = vl_drm_screen_create(drm_info->fd); - if (!drv->vscreen) - goto error_screen; break; } default: @@ -143,6 +139,9 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) return VA_STATUS_ERROR_INVALID_DISPLAY; } + if (!drv->vscreen) + goto error_screen; + drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen, drv->vscreen, 0); if (!drv->pipe) |