diff options
author | Christian König <[email protected]> | 2011-07-08 12:03:13 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-08 12:03:13 +0200 |
commit | 2ec350ff1d9f13ec95d7b9d46f57ad9b9efcc8ea (patch) | |
tree | 64c473beacf39929a013d728b3639bdd98407f91 /src/gallium/winsys/g3dvl/xlib | |
parent | 7eca76952b6726be9459375dde7478a01789577e (diff) |
[g3dvl] make pipe_context mandatory for creation pipe_video_context
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); } |