[Piglit] [PATCH 02/16] all.tests: make fbo-depthstencil tests concurrent

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


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

---
 tests/all.tests              | 24 +++++++++++++-----------
 tests/fbo/fbo-depthstencil.c |  1 +
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index c4ebfa7..9f0971e 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -73,23 +73,25 @@ MSAA_SAMPLE_COUNTS = (2, 4, 6, 8, 16, 32)
 def add_fbo_depthstencil_tests(group, format, num_samples):
     if format == 'default_fb':
         prefix = ''
+        create_test = plain_test
     else:
         prefix = 'fbo-'
+        create_test = concurrent_test
     if num_samples > 1:
         suffix = ' samples=' + str(num_samples)
-        psamples = ['-samples=' + str(num_samples)]
+        psamples = ' -samples=' + str(num_samples)
     else:
         suffix = ''
-        psamples = []
-    group[prefix + 'depthstencil-' + format + '-clear' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'clear', format] + psamples)
-    group[prefix + 'depthstencil-' + format + '-readpixels-FLOAT-and-USHORT' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'readpixels', format, 'FLOAT-and-USHORT'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-readpixels-24_8' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'readpixels', format, '24_8'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-readpixels-32F_24_8_REV' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'readpixels', format, '32F_24_8_REV'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-drawpixels-FLOAT-and-USHORT' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'drawpixels', format, 'FLOAT-and-USHORT'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-drawpixels-24_8' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'drawpixels', format, '24_8'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-drawpixels-32F_24_8_REV' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'drawpixels', format, '32F_24_8_REV'] + psamples)
-    group[prefix + 'depthstencil-' + format + '-copypixels' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'copypixels', format] + psamples)
-    group[prefix + 'depthstencil-' + format + '-blit' + suffix] = PlainExecTest(['fbo-depthstencil', '-auto', 'blit', format] + psamples)
+        psamples = ''
+    group[prefix + 'depthstencil-' + format + '-clear' + suffix] = create_test('fbo-depthstencil clear ' + format + psamples)
+    group[prefix + 'depthstencil-' + format + '-readpixels-FLOAT-and-USHORT' + suffix] = create_test('fbo-depthstencil readpixels ' + format + ' FLOAT-and-USHORT' + psamples)
+    group[prefix + 'depthstencil-' + format + '-readpixels-24_8' + suffix] = create_test('fbo-depthstencil readpixels ' + format + ' 24_8' + psamples)
+    group[prefix + 'depthstencil-' + format + '-readpixels-32F_24_8_REV' + suffix] = create_test('fbo-depthstencil readpixels ' + format + ' 32F_24_8_REV' + psamples)
+    group[prefix + 'depthstencil-' + format + '-drawpixels-FLOAT-and-USHORT' + suffix] = create_test('fbo-depthstencil drawpixels ' + format + ' FLOAT-and-USHORT' + psamples)
+    group[prefix + 'depthstencil-' + format + '-drawpixels-24_8' + suffix] = create_test('fbo-depthstencil drawpixels ' + format + ' 24_8' + psamples)
+    group[prefix + 'depthstencil-' + format + '-drawpixels-32F_24_8_REV' + suffix] = create_test('fbo-depthstencil drawpixels ' + format + ' 32F_24_8_REV' + psamples)
+    group[prefix + 'depthstencil-' + format + '-copypixels' + suffix] = create_test('fbo-depthstencil copypixels ' + format + psamples)
+    group[prefix + 'depthstencil-' + format + '-blit' + suffix] = create_test('fbo-depthstencil blit ' + format + psamples)
 
 def add_fbo_depthstencil_msaa_visual_tests(group, format):
     add_fbo_depthstencil_tests(group, format, 0)
diff --git a/tests/fbo/fbo-depthstencil.c b/tests/fbo/fbo-depthstencil.c
index f23114a..e4a8e00 100644
--- a/tests/fbo/fbo-depthstencil.c
+++ b/tests/fbo/fbo-depthstencil.c
@@ -472,6 +472,7 @@ enum piglit_result piglit_display(void)
 
 	/* Cleanup. */
 	if (f.iformat) {
+		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
 		glDeleteFramebuffersEXT(1, &fb);
 		glDeleteRenderbuffersEXT(1, &rb);
 	}
-- 
1.8.3.2



More information about the Piglit mailing list