summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-26 21:54:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-26 21:56:31 +0100
commitbef73cd9279be3438e467981db39c67bc13104f5 (patch)
treefb2d9ebc0d976d87bf9f9cdaddd5000eb3f9bc43
parent1ced4f1ddcf30b518e1760c7aa4a5ed4f934b9f5 (diff)
sna/dri: Select the engine before emitting the wait
So that if we have a flexible WAIT_FOR_EVENT that can go on either pipeline, we can choose our preferred pipeline for DRI. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 1daf1c47..8d6c305a 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -546,6 +546,14 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
}
}
+ if (!wedged(sna)) {
+ if (sync)
+ sync = sna_pixmap_is_scanout(sna, pixmap);
+
+ sna_dri_select_mode(sna, src_bo, sync);
+ } else
+ sync = false;
+
dx = dy = 0;
if (draw->type != DRAWABLE_PIXMAP) {
WindowPtr win = (WindowPtr)draw;
@@ -569,7 +577,7 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
region = &clip;
}
- if (sync && sna_pixmap_is_scanout(sna, pixmap)) {
+ if (sync) {
crtc = sna_covering_crtc(sna->scrn, &clip.extents, NULL);
if (crtc)
flush = sna_wait_for_scanline(sna, pixmap, crtc,
@@ -595,8 +603,6 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
dst_bo, dx, dy,
boxes, n);
} else {
- sna_dri_select_mode(sna, src_bo, flush);
-
sna->render.copy_boxes(sna, GXcopy,
(PixmapPtr)draw, src_bo, -draw->x, -draw->y,
pixmap, dst_bo, dx, dy,