[Piglit] [PATCH] fbo-clear-formats: Do one of the 4 clears unscissored.

Eric Anholt eric at anholt.net
Fri Oct 14 23:36:40 UTC 2016


I was surprised to find through DEQP that 565 clearing was broken on
vc4, but that was because fbo-clear-formats never hit the hardware
clear path.  This gives us a little exposure for that path (enough to
catch the bug) without changing our clear colors have unique values in
each channel.
---
 tests/fbo/fbo-clear-formats.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
index 4c9a391fe87e..8289182d6628 100644
--- a/tests/fbo/fbo-clear-formats.c
+++ b/tests/fbo/fbo-clear-formats.c
@@ -102,12 +102,14 @@ do_rgba_clear(GLenum format, GLuint tex, int level, int size)
 		return true;
 	}
 
-	glEnable(GL_SCISSOR_TEST);
-
-	glScissor(0, 0, size / 2, size / 2);
+	/* Do the first clear unscissored, to give a bit of exposure
+	 * to hardware fast-clearing paths on tiled renderers that
+	 * require unscissored clears.
+	 */
 	glClearColor(red[0], red[1], red[2], red[3]);
 	glClear(GL_COLOR_BUFFER_BIT);
 
+	glEnable(GL_SCISSOR_TEST);
 	glScissor(size / 2, 0, size / 2, size / 2);
 	glClearColor(green[0], green[1], green[2], green[3]);
 	glClear(GL_COLOR_BUFFER_BIT);
-- 
2.9.3



More information about the Piglit mailing list