[Piglit] [PATCH v2 3/5] fbo-storage-formats:minor improvements to error detection.

Kenney Phillis kphillisjr at gmail.com
Fri Aug 23 09:51:03 PDT 2013


sometimes errors can sneak in when generating the context and
interfere with the test. This clears out all errors before the
actual test begins.
---
 tests/fbo/fbo-storage-formats.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index e66d4f0..564f7dc 100644
--- a/tests/fbo/fbo-storage-formats.c
+++ b/tests/fbo/fbo-storage-formats.c
@@ -165,6 +165,9 @@ test(void)
 	int i;
 	GLboolean pass = GL_TRUE;
 
+	/* clear out any errors */
+	while (glGetError())
+		;
 	glGenFramebuffersEXT(1, &fbo);
 	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
 	if (!piglit_check_gl_error(GL_NO_ERROR))
-- 
1.7.9.5



More information about the Piglit mailing list