diff options
author | Emil Velikov <[email protected]> | 2016-12-07 14:04:03 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-19 19:46:46 +0100 |
commit | 28703d605dbf660964c19edb719ea403aafb8b61 (patch) | |
tree | 06243c75081f751f427b7f3fcc5cf84148ea2ccc /src/gallium/state_trackers/va | |
parent | aaea53c2c02e4d5352ce3d08dfd43b2676d32000 (diff) |
st/va: check if vl_*_screen_create has failed only once
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Nayan Deshmukh <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va')
-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) |