diff options
Diffstat (limited to 'src/gallium/winsys/g3dvl/xlib')
-rw-r--r-- | src/gallium/winsys/g3dvl/xlib/xsp_winsys.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c index 1a67e2436e4..3caf6603243 100644 --- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c +++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c @@ -172,18 +172,26 @@ void vl_screen_destroy(struct vl_screen *vscreen) struct vl_context* vl_video_create(struct vl_screen *vscreen) { + struct pipe_video_context *pipe; struct pipe_video_context *vpipe; struct vl_context *vctx; assert(vscreen); assert(vscreen->pscreen->video_context_create); - vpipe = vscreen->pscreen->video_context_create(vscreen->pscreen, NULL); - if (!vpipe) + pipe = vscreen->pscreen->context_create(vscreen->pscreen, NULL); + if (!pipe) return NULL; + vpipe = vscreen->pscreen->video_context_create(vscreen->pscreen, pipe, NULL); + if (!vpipe) { + pipe->destroy(pipe); + return NULL; + } + vctx = CALLOC_STRUCT(vl_context); if (!vctx) { + pipe->destroy(pipe); vpipe->destroy(vpipe); return NULL; } @@ -199,6 +207,7 @@ void vl_video_destroy(struct vl_context *vctx) { assert(vctx); + vctx->pipe->destroy(vctx->pipe); vctx->vpipe->destroy(vctx->vpipe); FREE(vctx); } |