From 4e837f557bf5f5afb286e1f2244ed69c0092c2d6 Mon Sep 17 00:00:00 2001 From: Christian König Date: Fri, 8 Jul 2011 16:56:11 +0200 Subject: [g3dvl] move video buffer creation out of video context --- src/gallium/state_trackers/vdpau/surface.c | 4 ++-- src/gallium/state_trackers/xorg/xvmc/surface.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index f20087f3fca..b8c4d2cd150 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -70,9 +70,9 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, } p_surf->device = dev; - p_surf->video_buffer = dev->context->vpipe->create_buffer + p_surf->video_buffer = dev->context->pipe->create_video_buffer ( - dev->context->vpipe, + dev->context->pipe, PIPE_FORMAT_YV12, // most common used ChromaToPipe(chroma_type), width, height diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c index 292610be631..0370a6e858f 100644 --- a/src/gallium/state_trackers/xorg/xvmc/surface.c +++ b/src/gallium/state_trackers/xorg/xvmc/surface.c @@ -303,6 +303,7 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac }; XvMCContextPrivate *context_priv; + struct pipe_context *pipe; struct pipe_video_context *vpipe; XvMCSurfacePrivate *surface_priv; @@ -316,6 +317,7 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac return XvMCBadSurface; context_priv = context->privData; + pipe = context_priv->vctx->pipe; vpipe = context_priv->vctx->vpipe; surface_priv = CALLOC(1, sizeof(XvMCSurfacePrivate)); @@ -326,10 +328,12 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac surface_priv->decode_buffer->set_quant_matrix(surface_priv->decode_buffer, dummy_quant, dummy_quant); surface_priv->mv_stride = surface_priv->decode_buffer->get_mv_stream_stride(surface_priv->decode_buffer); - surface_priv->video_buffer = vpipe->create_buffer(vpipe, PIPE_FORMAT_NV12, - context_priv->decoder->chroma_format, - context_priv->decoder->width, - context_priv->decoder->height); + surface_priv->video_buffer = pipe->create_video_buffer + ( + pipe, PIPE_FORMAT_NV12, context_priv->decoder->chroma_format, + context_priv->decoder->width, context_priv->decoder->height + ); + surface_priv->context = context; surface->surface_id = XAllocID(dpy); -- cgit v1.2.3