diff options
author | Sunny <sunny.sun@arm.com> | 2014-09-15 13:58:24 +0800 |
---|---|---|
committer | Sunny <sunny.sun@arm.com> | 2014-09-15 13:58:24 +0800 |
commit | 0594f7b67dbdbdd18db91f1c866fbbc2f07a3c90 (patch) | |
tree | 4ac2b11701722b26221b7fa961a660fa3e3a6a96 | |
parent | 9702414f69428913f25bac78051f310b9ecb483d (diff) |
Replace two asserts with warning message
With some high frame rate benchmarks which disable swap interval, SwapBuffers
may be called before swap complete event arrives.
Change-Id: I4dbb027fa5027858e3134712d5d02f28688ac366
-rw-r--r-- | src/armsoc_dri2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c index 7d74734..2e8571a 100644 --- a/src/armsoc_dri2.c +++ b/src/armsoc_dri2.c @@ -688,7 +688,8 @@ ARMSOCDRI2SwapComplete(struct ARMSOCDRISwapCmd *cmd) pARMSOC->pending_flips--; /* Free the swap cmd and remove it from the swap chain. */ idx = cmd->swap_id % pARMSOC->swap_chain_size; - assert(pARMSOC->swap_chain[idx] == cmd); + if (pARMSOC->swap_chain[idx] != cmd) + WARNING_MSG("Flip isn't in order\n"); pARMSOC->swap_chain[idx] = NULL; } free(cmd); @@ -816,7 +817,8 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw, /* Add swap operation to the swap chain */ cmd->swap_id = pARMSOC->swap_chain_count++; idx = cmd->swap_id % pARMSOC->swap_chain_size; - assert(NULL == pARMSOC->swap_chain[idx]); + if (NULL != pARMSOC->swap_chain[idx]) + WARNING_MSG("Flip is called too fast\n"); pARMSOC->swap_chain[idx] = cmd; /* TODO: MIDEGL-1461: Handle rollback if multiple CRTC flip is * only partially successful |