summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-11 10:15:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-12 10:44:18 +0100
commitff262aca9c46b7616c59d8e8f04d33a5bbc6e324 (patch)
tree0f77136a1b116aa20971383940994b5c56c5c665 /src/sna/sna_video_textured.c
parentb199bc2b415fd0f06e456e0b1f44dd25ba8dbe02 (diff)
sna/dri: Fix tripple-buffering for vblank_mode=0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 66c70d4a..a10c6769 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -238,6 +238,7 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
BoxRec dstBox;
xf86CrtcPtr crtc;
int top, left, npixels, nlines;
+ Bool flush = false;
if (!sna_video_clip_helper(scrn, video, &crtc, &dstBox,
src_x, src_y, drw_x, drw_y,
@@ -267,7 +268,8 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
}
if (crtc && video->SyncToVblank != 0)
- sna_wait_for_scanline(sna, pixmap, crtc, clip);
+ flush = sna_wait_for_scanline(sna, pixmap, crtc,
+ &clip->extents);
sna->render.video(sna, video, &frame, clip,
src_w, src_h,
@@ -281,7 +283,8 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
/* Push the frame to the GPU as soon as possible so
* we can hit the next vsync.
*/
- kgem_submit(&sna->kgem);
+ if (flush)
+ kgem_submit(&sna->kgem);
return Success;
}