summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-05-21 18:38:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-05-21 18:56:13 +0100
commit66e14c96d0ddede90e36084a80a97c3f16c2b386 (patch)
treea99d558b0d8de8953d5e04bf34b172ca59320983 /src/sna/sna_dri2.c
parentbf4475d29de589a0d0e71dfb895d19a635f8cc3e (diff)
sna/dri2: Limit pending swaps to 1 when queueing a future blit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e7cb26ee..86ce0dd8 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1365,7 +1365,7 @@ static void chain_swap(struct sna *sna,
chain->event_complete, chain->event_data);
sna_dri2_frame_event_info_free(sna, draw, chain);
} else {
- if (!swap_limit(draw, 2)) {
+ if (chain->type == SWAP_THROTTLE && !swap_limit(draw, 2)) {
DBG(("%s: fake triple buffering, unblocking client\n", __FUNCTION__));
DRI2SwapComplete(chain->client, draw,
frame, tv_sec, tv_usec,
@@ -2324,6 +2324,7 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
if (sna_wait_vblank(sna, &vbl, info->pipe))
goto blit;
+ swap_limit(draw, 1 + (info->type == SWAP_WAIT));
return TRUE;
blit: