Commit 5a6dec50 by Austin Kinross Committed by Jamie Madill

Ensure FencSyncTests::BasicOperations can't get stuck in an infinite loop

BUG=angleproject:1053 Change-Id: If6661ce3d87cdf44b1d45911418ecf78b5e6175a Reviewed-on: https://chromium-review.googlesource.com/277370Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 476682e6
......@@ -247,12 +247,21 @@ TEST_P(FenceSyncTest, BasicOperations)
GLsizei length = 0;
GLint value = 0;
while (value != GL_SIGNALED)
unsigned int loopCount = 0;
glFlush();
// Use 'loopCount' to make sure the test doesn't get stuck in an infinite loop
while (value != GL_SIGNALED && loopCount <= 1000000)
{
loopCount++;
glGetSynciv(sync, GL_SYNC_STATUS, 1, &length, &value);
ASSERT_GL_NO_ERROR();
}
ASSERT_GLENUM_EQ(GL_SIGNALED, value);
for (size_t i = 0; i < 20; i++)
{
glClear(GL_COLOR_BUFFER_BIT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment