summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xorg
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-01-02 14:22:33 +0100
committerChristian König <[email protected]>2012-01-15 12:40:44 +0100
commite027759336bf49e3f568bd73b9e5f26d56ef6f83 (patch)
treeb82a3cd8c9f0ca6ce718567aa1ec128b14c7c0b3 /src/gallium/state_trackers/xorg
parent39491d1d31d9f03437816fbb4f2872761ae1157c (diff)
vl/video_buffer: use template style create params
Just like in the rest of gallium, this reduces the number of parameters significantly. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index b4447c44609..ddc937c64c1 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -167,6 +167,7 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
XvMCContextPrivate *context_priv;
struct pipe_context *pipe;
XvMCSurfacePrivate *surface_priv;
+ struct pipe_video_buffer tmpl;
XVMC_MSG(XVMC_TRACE, "[XvMC] Creating surface %p.\n", surface);
@@ -184,12 +185,13 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
if (!surface_priv)
return BadAlloc;
- 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
- );
-
+ memset(&tmpl, 0, sizeof(tmpl));
+ tmpl.buffer_format = PIPE_FORMAT_NV12;
+ tmpl.chroma_format = context_priv->decoder->chroma_format;
+ tmpl.width = context_priv->decoder->width;
+ tmpl.height = context_priv->decoder->height;
+
+ surface_priv->video_buffer = pipe->create_video_buffer(pipe, &tmpl);
surface_priv->context = context;
surface->surface_id = XAllocID(dpy);