[Piglit] [PATCH 09/16] all.tests: make fbo-depth and fbo-stencil tests concurrent

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


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

---
 tests/all.tests             | 22 +++++++++++-----------
 tests/fbo/fbo-depth-tex1d.c |  3 ++-
 tests/fbo/fbo-depth.c       |  3 ++-
 tests/fbo/fbo-stencil.c     |  3 ++-
 4 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index 34f1705..be4864d 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -476,19 +476,19 @@ def add_texwrap_format_tests(group, ext = '', suffix = ''):
     group['texwrap formats' + suffix + ' bordercolor-swizzled'] = texwrap_test(args + ['bordercolor', 'swizzled'])
 
 def add_fbo_depth_tests(group, format):
-    group['fbo-depth-' + format + '-tex1d'] = PlainExecTest(['fbo-depth-tex1d', '-auto', format])
-    group['fbo-depth-' + format + '-clear'] = PlainExecTest(['fbo-depth', '-auto', 'clear', format])
-    group['fbo-depth-' + format + '-readpixels'] = PlainExecTest(['fbo-depth', '-auto', 'readpixels', format])
-    group['fbo-depth-' + format + '-drawpixels'] = PlainExecTest(['fbo-depth', '-auto', 'drawpixels', format])
-    group['fbo-depth-' + format + '-copypixels'] = PlainExecTest(['fbo-depth', '-auto', 'copypixels', format])
-    group['fbo-depth-' + format + '-blit'] = PlainExecTest(['fbo-depth', '-auto', 'blit', format])
+    group['fbo-depth-' + format + '-tex1d'] = concurrent_test('fbo-depth-tex1d ' + format)
+    group['fbo-depth-' + format + '-clear'] = concurrent_test('fbo-depth clear ' + format)
+    group['fbo-depth-' + format + '-readpixels'] = concurrent_test('fbo-depth readpixels ' + format)
+    group['fbo-depth-' + format + '-drawpixels'] = concurrent_test('fbo-depth drawpixels ' + format)
+    group['fbo-depth-' + format + '-copypixels'] = concurrent_test('fbo-depth copypixels ' + format)
+    group['fbo-depth-' + format + '-blit'] = concurrent_test('fbo-depth blit ' + format)
 
 def add_fbo_stencil_tests(group, format):
-    group['fbo-stencil-' + format + '-clear'] = PlainExecTest(['fbo-stencil', '-auto', 'clear', format])
-    group['fbo-stencil-' + format + '-readpixels'] = PlainExecTest(['fbo-stencil', '-auto', 'readpixels', format])
-    group['fbo-stencil-' + format + '-drawpixels'] = PlainExecTest(['fbo-stencil', '-auto', 'drawpixels', format])
-    group['fbo-stencil-' + format + '-copypixels'] = PlainExecTest(['fbo-stencil', '-auto', 'copypixels', format])
-    group['fbo-stencil-' + format + '-blit'] = PlainExecTest(['fbo-stencil', '-auto', 'blit', format])
+    group['fbo-stencil-' + format + '-clear'] = concurrent_test('fbo-stencil clear ' + format)
+    group['fbo-stencil-' + format + '-readpixels'] = concurrent_test('fbo-stencil readpixels ' + format)
+    group['fbo-stencil-' + format + '-drawpixels'] = concurrent_test('fbo-stencil drawpixels ' + format)
+    group['fbo-stencil-' + format + '-copypixels'] = concurrent_test('fbo-stencil copypixels ' + format)
+    group['fbo-stencil-' + format + '-blit'] = concurrent_test('fbo-stencil blit ' + format)
 
 spec = Group()
 
diff --git a/tests/fbo/fbo-depth-tex1d.c b/tests/fbo/fbo-depth-tex1d.c
index f381ef6..0e43de6 100644
--- a/tests/fbo/fbo-depth-tex1d.c
+++ b/tests/fbo/fbo-depth-tex1d.c
@@ -136,6 +136,7 @@ static void create_1d_fbo(GLuint *out_tex, GLuint *out_ds)
 	glColor4f(0.0, 1.0, 0.0, 0.0);
 	piglit_draw_rect(0, 0, BUF_WIDTH, 1);
 
+	glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
 	glDeleteFramebuffersEXT(1, &fb);
 
 	*out_tex = tex;
@@ -147,7 +148,7 @@ static void draw_fbo_1d(int x, int y)
 	glViewport(0, 0, piglit_width, piglit_height);
 	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
-	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
 
 	glEnable(GL_TEXTURE_1D);
 	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-depth.c b/tests/fbo/fbo-depth.c
index a98d447..42df741 100644
--- a/tests/fbo/fbo-depth.c
+++ b/tests/fbo/fbo-depth.c
@@ -110,7 +110,7 @@ static enum piglit_result test_clear(void)
 
 	/* Display the colorbuffer. */
 	if (!piglit_automatic) {
-		glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+		glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
 		glBlitFramebufferEXT(0, 0, BUF_SIZE, BUF_SIZE, 0, 0, BUF_SIZE, BUF_SIZE,
 				     GL_COLOR_BUFFER_BIT, GL_NEAREST);
 	}
@@ -304,6 +304,7 @@ enum piglit_result piglit_display(void)
 	}
 
 	/* Cleanup. */
+	glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
 	glDeleteFramebuffersEXT(1, &fb);
 	glDeleteRenderbuffersEXT(1, &rb);
 
diff --git a/tests/fbo/fbo-stencil.c b/tests/fbo/fbo-stencil.c
index ac3ea89..ccd46b2 100644
--- a/tests/fbo/fbo-stencil.c
+++ b/tests/fbo/fbo-stencil.c
@@ -111,7 +111,7 @@ static enum piglit_result test_clear(void)
 
 	/* Display the colorbuffer. */
 	if (!piglit_automatic) {
-		glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+		glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
 		glBlitFramebufferEXT(0, 0, BUF_SIZE, BUF_SIZE, 0, 0, BUF_SIZE, BUF_SIZE,
 				     GL_COLOR_BUFFER_BIT, GL_NEAREST);
 	}
@@ -322,6 +322,7 @@ enum piglit_result piglit_display(void)
 	}
 
 	/* Cleanup. */
+	glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
 	glDeleteFramebuffersEXT(1, &fb);
 	glDeleteRenderbuffersEXT(1, &rb);
 
-- 
1.8.3.2



More information about the Piglit mailing list