vl_mpeg12_decoder_flush_buffer(struct pipe_video_decode_buffer *buffer,
unsigned num_ycbcr_blocks[3],
struct pipe_video_buffer *refs[2],
- struct pipe_video_buffer *dst,
- struct pipe_fence_handle **fence)
+ struct pipe_video_buffer *dst)
{
struct vl_mpeg12_buffer *buf = (struct vl_mpeg12_buffer *)buffer;
struct vl_mpeg12_decoder *dec;
vl_mc_render_ycbcr(&buf->mc[i], mc_source_sv[component], j, num_ycbcr_blocks[component]);
}
}
-
- dec->pipe->flush(dec->pipe, fence);
}
static bool
void (*flush_buffer)(struct pipe_video_decode_buffer *decbuf,
unsigned num_ycbcr_blocks[3],
struct pipe_video_buffer *ref_frames[2],
- struct pipe_video_buffer *dst,
- struct pipe_fence_handle **fence);
+ struct pipe_video_buffer *dst);
};
/**
context_priv->decoder->flush_buffer(surface->decode_buffer,
num_ycbcr_blocks,
ref_frames,
- surface->video_buffer,
- &surface->flush_fence);
+ surface->video_buffer);
surface->mapped = 0;
}
}
subpicture_priv->surface = NULL;
}
- compositor->render_picture(compositor, PictureToPipe(flags), drawable_surface, &dst_rect, &surface_priv->disp_fence);
+ // Workaround for r600g, there seems to be a bug in the fence refcounting code
+ vpipe->screen->fence_reference(vpipe->screen, &surface_priv->fence, NULL);
+
+ compositor->render_picture(compositor, PictureToPipe(flags), drawable_surface, &dst_rect, &surface_priv->fence);
XVMC_MSG(XVMC_TRACE, "[XvMC] Submitted surface %p for display. Pushing to front buffer.\n", surface);
PUBLIC
Status XvMCGetSurfaceStatus(Display *dpy, XvMCSurface *surface, int *status)
{
+ struct pipe_video_context *vpipe;
+ XvMCSurfacePrivate *surface_priv;
+ XvMCContextPrivate *context_priv;
+
assert(dpy);
if (!surface)
assert(status);
+ surface_priv = surface->privData;
+ context_priv = surface_priv->context->privData;
+ vpipe = context_priv->vctx->vpipe;
+
*status = 0;
+ if (surface_priv->fence)
+ if (!vpipe->screen->fence_signalled(vpipe->screen, surface_priv->fence))
+ *status |= XVMC_RENDERING;
+
return Success;
}
struct pipe_motionvector *mv;
} ref[2];
- struct pipe_fence_handle *flush_fence;
- struct pipe_fence_handle *render_fence;
- struct pipe_fence_handle *disp_fence;
+ struct pipe_fence_handle *fence;
/* The subpicture associated with this surface, if any. */
XvMCSubpicture *subpicture;