[Piglit] [PATCH] Fix clearbuffer-display-lists test case

Anuj Phogat anuj.phogat at gmail.com
Mon Feb 6 14:10:40 PST 2012


Do glClear(GL_COLOR_BUFFER_BIT) before probing the color buffer.
Test occasionally fails without this call.

Reported-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
Eric, this test was failing on my system once in 10-20 times. 

 tests/spec/gl-3.0/api/clearbuffer-display-lists.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
index 8595076..8685af1 100644
--- a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
+++ b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
@@ -44,6 +44,8 @@ void piglit_init(int argc, char **argv)
 	bool pass = true;
 
 	piglit_require_gl_version(30);
+	glClear(GL_COLOR_BUFFER_BIT);
+
 	/* Probe the color buffer before creating display list. color buffers
 	 * are by default cleared to (0.0, 0.0, 0.0, 1.0)
 	 */
-- 
1.7.7.4



More information about the Piglit mailing list