diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-21 18:38:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-21 18:56:13 +0100 |
commit | 66e14c96d0ddede90e36084a80a97c3f16c2b386 (patch) | |
tree | a99d558b0d8de8953d5e04bf34b172ca59320983 /src/sna/sna_dri2.c | |
parent | bf4475d29de589a0d0e71dfb895d19a635f8cc3e (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.c | 3 |
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: |