[Piglit] [PATCH 01/16] fbo-clear-formats: fix the stencil clear test

Marek Olšák maraeo at gmail.com
Sun Nov 24 15:52:20 PST 2013


From: Marek Olšák <marek.olsak at amd.com>

glBlitFramebuffer generates a GL error, good old glCopyPixels doesn't.
---
 tests/fbo/fbo-clear-formats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
index 7a68f23..884f147 100644
--- a/tests/fbo/fbo-clear-formats.c
+++ b/tests/fbo/fbo-clear-formats.c
@@ -329,8 +329,8 @@ draw_stencil_mipmap(int x, int y, int dim, GLuint tex, GLuint level)
 	glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
 			       GL_TEXTURE_2D, tex, level);
 	glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
-	glBlitFramebuffer(0, 0, dim, dim, x, y, x+dim, y+dim,
-			  GL_STENCIL_BUFFER_BIT, GL_NEAREST);
+        glWindowPos2i(x, y);
+        glCopyPixels(0, 0, dim, dim, GL_STENCIL);
         if (!piglit_check_gl_error(GL_NO_ERROR)) {
 		/* The blit shouldn't generate an error.  If it does, report failure */
 		piglit_report_result(PIGLIT_FAIL);
-- 
1.8.3.2



More information about the Piglit mailing list