g3dvl: no need for flushing inside the compositor any more
authorChristian König <deathsimple@vodafone.de>
Fri, 15 Jul 2011 15:54:06 +0000 (17:54 +0200)
committerChristian König <deathsimple@vodafone.de>
Fri, 15 Jul 2011 15:54:06 +0000 (17:54 +0200)
Move that also inside the state tracker where needed.

src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/auxiliary/vl/vl_compositor.h
src/gallium/state_trackers/vdpau/mixer.c
src/gallium/state_trackers/vdpau/presentation.c
src/gallium/state_trackers/xorg/xvmc/surface.c

index 8018d061d54ece1da9719ca1e937dbc2c20d627f..3bd4af2e3e0ed3d418e785af5f988e2285409625 100644 (file)
@@ -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
index 08ddc672b3bbffff6b6db83d703bf898d161a877..87ad39be1bec6b0720b89445db9aeb0bc70bc0ef 100644 (file)
@@ -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
index b85b1f287afab1fb0930f04ec8039a3ae9743afb..d5187006bfc1da5b9dd3318426c11d3960fd130e 100644 (file)
@@ -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;
 }
index fe93741ed0d795f0de51e6da6f75deceb4b8c248..1176c7a30b764487d4ab2833ada0cf0130511790 100644 (file)
@@ -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
    (
index 0e8b4f8f2be18e6b17e183af6a47f44c8c419d1f..0c53b730287542395b8dfaf7a909e00dd132565b 100644 (file)
@@ -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);