Commit 73410e42 by Geoff Lang

Add a flush before looping to get the sync status.

Intel GPUs enter an infinite loop unless told to flush. BUG=angleproject:1038 Change-Id: I7c3d9dd08bf1ee09cb163dd859f817379a72cd65 Reviewed-on: https://chromium-review.googlesource.com/274942Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 27359ff7
...@@ -230,13 +230,6 @@ TEST_P(FenceSyncTest, BasicQueries) ...@@ -230,13 +230,6 @@ TEST_P(FenceSyncTest, BasicQueries)
// Test that basic usage works and doesn't generate errors or crash // Test that basic usage works and doesn't generate errors or crash
TEST_P(FenceSyncTest, BasicOperations) TEST_P(FenceSyncTest, BasicOperations)
{ {
// TODO(geofflang): Figure out why this is broken on Intel OpenGL
if (isIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
{
std::cout << "Test skipped on Intel OpenGL." << std::endl;
return;
}
glClearColor(1.0f, 0.0f, 1.0f, 1.0f); glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
...@@ -245,6 +238,10 @@ TEST_P(FenceSyncTest, BasicOperations) ...@@ -245,6 +238,10 @@ TEST_P(FenceSyncTest, BasicOperations)
glWaitSync(sync, 0, GL_TIMEOUT_IGNORED); glWaitSync(sync, 0, GL_TIMEOUT_IGNORED);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
// Some drivers don't automatically flush and can enter into an infinite loop
// while waiting for the fence to complete.
glFlush();
GLsizei length = 0; GLsizei length = 0;
GLint value = 0; GLint value = 0;
while (value != GL_SIGNALED) while (value != GL_SIGNALED)
......
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