diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-09-08 12:57:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-09-08 13:02:48 +0100 |
commit | e179e7d3a436631c434b26fafb0304e777a6b24b (patch) | |
tree | 50b7ad6b05cf0d317cdc2cf134f831a49f9d9b63 /src/sna/sna_dri2.c | |
parent | 300319e2044cb1050e9cbc49c9985b995eaca5fe (diff) |
sna/dri2: Update the swap_limit on each ScheduleSwap
In order to catch transitions between SwapInterval 0 and 1 in the middle
of a flip sequence, we need to reset our swap_limit every time.
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 500355cd..bff6516c 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -2716,7 +2716,7 @@ sna_dri2_immediate_blit(struct sna *sna, assert(chain->event_data == info->event_data); assert(chain->queued); - if (!sync && chain->pending.bo) { + if ((!sync || !chain->sync) && chain->pending.bo) { bool signal = chain->signal; DBG(("%s: swap elision, unblocking client\n", __FUNCTION__)); @@ -2735,7 +2735,7 @@ sna_dri2_immediate_blit(struct sna *sna, chain->pending.bo = NULL; } - if (chain->pending.bo == NULL) { + if (chain->pending.bo == NULL && swap_limit(draw, 2 + !sync)) { DBG(("%s: setting handle=%d as pending blit (current event front=%d, back=%d)\n", __FUNCTION__, get_private(info->back)->bo->handle, get_private(chain->front)->bo->handle, @@ -2744,6 +2744,7 @@ sna_dri2_immediate_blit(struct sna *sna, chain->pending.size = get_private(info->back)->size; chain->pending.name = info->back->name; chain->pending.flags = info->back->flags; + chain->sync = sync; info->signal = false; /* transfer signal to pending */ /* Prevent us from handing it back on next GetBuffers */ |