diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-14 13:04:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-14 13:04:50 +0100 |
commit | 6ee9969f0e99975a24e113af9591909d9023d8af (patch) | |
tree | b7425dba57f2f55a99925c57f96e654ecdb44e04 | |
parent | d2dbb991384f2b820a714eba262691ed97a6a22a (diff) |
sna/dri: Update AsyncSwap for recent changes in tracking DRI drawables
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index de0f84da..2296ab65 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -1417,7 +1417,9 @@ static void sna_dri_flip_event(struct sna *sna, __FUNCTION__, flip->pipe, sna->dri.flip_pending != NULL, flip->front->name != flip->old_front.name)); - assert(sna->dri.flip_pending == flip); + + if (sna->dri.flip_pending) + goto finish_async_flip; if (flip->front->name != flip->next_front.name) { DBG(("%s: async flip continuing\n", __FUNCTION__)); @@ -1435,6 +1437,8 @@ static void sna_dri_flip_event(struct sna *sna, flip->next_front.bo = get_private(flip->front)->bo; flip->next_front.name = flip->front->name; flip->off_delay = 5; + + sna->dri.flip_pending = flip; } else if (--flip->off_delay) { DBG(("%s: queuing no-flip [delay=%d]\n", __FUNCTION__, flip->off_delay)); @@ -1444,12 +1448,13 @@ static void sna_dri_flip_event(struct sna *sna, flip, flip->pipe); if (flip->count == 0) goto finish_async_flip; + + sna->dri.flip_pending = flip; } else { finish_async_flip: flip->next_front.bo = NULL; DBG(("%s: async flip completed\n", __FUNCTION__)); - sna->dri.flip_pending = NULL; sna_dri_frame_event_info_free(sna, draw, flip); } break; @@ -1992,6 +1997,7 @@ blit: goto blit; info->client = client; + info->draw = draw; info->type = DRI2_ASYNC_FLIP; info->pipe = pipe; info->front = front; |