From 0d082390d903e0a6908e1d444e762a23de14174a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Fri, 15 Jul 2011 17:54:06 +0200 Subject: [PATCH] g3dvl: no need for flushing inside the compositor any more Move that also inside the state tracker where needed. --- src/gallium/auxiliary/vl/vl_compositor.c | 5 +---- src/gallium/auxiliary/vl/vl_compositor.h | 3 +-- src/gallium/state_trackers/vdpau/mixer.c | 2 +- src/gallium/state_trackers/vdpau/presentation.c | 2 +- src/gallium/state_trackers/xorg/xvmc/surface.c | 5 +++-- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 8018d06..3bd4af2 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -651,8 +651,7 @@ vl_compositor_render(struct vl_compositor *c, enum pipe_mpeg12_picture_type picture_type, struct pipe_surface *dst_surface, struct pipe_video_rect *dst_area, - struct pipe_video_rect *dst_clip, - struct pipe_fence_handle **fence) + struct pipe_video_rect *dst_clip) { struct pipe_scissor_state scissor; @@ -706,8 +705,6 @@ vl_compositor_render(struct vl_compositor *c, c->pipe->bind_rasterizer_state(c->pipe, c->rast); draw_layers(c); - - c->pipe->flush(c->pipe, fence); } bool diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h index 08ddc67..87ad39b 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.h +++ b/src/gallium/auxiliary/vl/vl_compositor.h @@ -158,8 +158,7 @@ vl_compositor_render(struct vl_compositor *compositor, enum pipe_mpeg12_picture_type picture_type, struct pipe_surface *dst_surface, struct pipe_video_rect *dst_area, - struct pipe_video_rect *dst_clip, - struct pipe_fence_handle **fence); + struct pipe_video_rect *dst_clip); /** * destroy this compositor diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index b85b1f2..d518700 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -158,7 +158,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, vl_compositor_clear_layers(&vmixer->compositor); vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer, NULL, NULL); vl_compositor_render(&vmixer->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME, - dst->surface, NULL, NULL, NULL); + dst->surface, NULL, NULL); return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index fe93741..1176c7a 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -170,7 +170,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vl_compositor_clear_layers(&pq->compositor); vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, NULL, NULL); vl_compositor_render(&pq->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME, - drawable_surface, NULL, NULL, NULL); + drawable_surface, NULL, NULL); pq->device->context->pipe->screen->flush_frontbuffer ( diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c index 0e8b4f8..0c53b73 100644 --- a/src/gallium/state_trackers/xorg/xvmc/surface.c +++ b/src/gallium/state_trackers/xorg/xvmc/surface.c @@ -567,8 +567,9 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable, // Workaround for r600g, there seems to be a bug in the fence refcounting code pipe->screen->fence_reference(pipe->screen, &surface_priv->fence, NULL); - vl_compositor_render(compositor, PictureToPipe(flags), context_priv->drawable_surface, - &dst_rect, NULL, &surface_priv->fence); + vl_compositor_render(compositor, PictureToPipe(flags), context_priv->drawable_surface, &dst_rect, NULL); + + pipe->flush(pipe, &surface_priv->fence); XVMC_MSG(XVMC_TRACE, "[XvMC] Submitted surface %p for display. Pushing to front buffer.\n", surface); -- 2.7.4