summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-08 16:56:11 +0200
committerChristian König <[email protected]>2011-07-08 16:56:11 +0200
commit4e837f557bf5f5afb286e1f2244ed69c0092c2d6 (patch)
tree5ac1fe3a1f58d5819428577f4daa447741f00eae /src/gallium/state_trackers
parent3bb33c911b895819fde5e179b2466c08f88164cf (diff)
[g3dvl] move video buffer creation out of video context
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c4
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c12
2 files changed, 10 insertions, 6 deletions
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);