Commit 08a8438f by Geoff Lang

Remove un-needed swapBuffers calls in the tests.

If a glReadPixels is done after a swapBuffers, it's results are often undefined. bug=angleproject:967 Change-Id: I4a99ca47624347ecbc0a5c084e93b997c92e1b31 Reviewed-on: https://chromium-review.googlesource.com/272423Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent bd0d6b93
...@@ -497,7 +497,6 @@ TEST_P(GLSLTest, ElseIfRewriting) ...@@ -497,7 +497,6 @@ TEST_P(GLSLTest, ElseIfRewriting)
ASSERT_NE(0u, program); ASSERT_NE(0u, program);
drawQuad(program, "a_position", 0.5f); drawQuad(program, "a_position", 0.5f);
swapBuffers();
EXPECT_PIXEL_EQ(0, 0, 255, 0, 0, 255); EXPECT_PIXEL_EQ(0, 0, 255, 0, 0, 255);
EXPECT_PIXEL_EQ(getWindowWidth()-1, 0, 0, 255, 0, 255); EXPECT_PIXEL_EQ(getWindowWidth()-1, 0, 0, 255, 0, 255);
......
...@@ -160,8 +160,6 @@ class InstancingTest : public ANGLETest ...@@ -160,8 +160,6 @@ class InstancingTest : public ANGLETest
mDrawArraysInstancedANGLE(GL_TRIANGLES, first, count, instanceCount); mDrawArraysInstancedANGLE(GL_TRIANGLES, first, count, instanceCount);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
swapBuffers();
} }
virtual void runDrawElementsTest(std::string vs, bool shouldAttribZeroBeInstanced) virtual void runDrawElementsTest(std::string vs, bool shouldAttribZeroBeInstanced)
...@@ -208,7 +206,6 @@ class InstancingTest : public ANGLETest ...@@ -208,7 +206,6 @@ class InstancingTest : public ANGLETest
// Do the instanced draw // Do the instanced draw
mDrawElementsInstancedANGLE(GL_TRIANGLES, mIndices.size(), GL_UNSIGNED_SHORT, mIndices.data(), mInstances.size() / 3); mDrawElementsInstancedANGLE(GL_TRIANGLES, mIndices.size(), GL_UNSIGNED_SHORT, mIndices.data(), mInstances.size() / 3);
swapBuffers();
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
checkQuads(); checkQuads();
......
...@@ -219,7 +219,6 @@ class TextureTest : public ANGLETest ...@@ -219,7 +219,6 @@ class TextureTest : public ANGLETest
glBindFramebuffer(GL_FRAMEBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0);
drawQuad(m2DProgram, "position", 0.5f); drawQuad(m2DProgram, "position", 0.5f);
swapBuffers();
int testImageChannels = std::min(sourceImageChannels, destImageChannels); int testImageChannels = std::min(sourceImageChannels, destImageChannels);
......
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