[Piglit] [PATCH 1/2] msaa: Refactor all.tests so that sample counts to test are specified once.

Paul Berry stereotype441 at gmail.com
Tue Jun 12 15:14:05 PDT 2012


---
 tests/all.tests |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index a004323..6d9e0ce 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -64,6 +64,9 @@ try:
 except SystemExit:
 	pass
 
+# List of all of the MSAA sample counts we wish to test
+MSAA_SAMPLE_COUNTS = (2, 4, 8, 16, 32)
+
 def add_fbo_depthstencil_tests(group, format):
 	if format == 'default_fb':
 		prefix = ''
@@ -1321,7 +1324,7 @@ ext_framebuffer_multisample['renderbufferstorage-samples'] = concurrent_test('ex
 ext_framebuffer_multisample['renderbuffer-samples'] = concurrent_test('ext_framebuffer_multisample-renderbuffer-samples')
 ext_framebuffer_multisample['samples'] = concurrent_test('ext_framebuffer_multisample-samples')
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         for test_type in ('color', 'stencil_draw', 'stencil_resolve',
                           'depth_draw', 'depth_resolve'):
                 for options in power_set(('small', 'depthstencil')):
@@ -1331,26 +1334,26 @@ for num_samples in (2, 4, 8, 16, 32):
                                 test_name)
                         ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         test_name = ' '.join(['turn-on-off', str(num_samples)])
         executable = 'ext_framebuffer_multisample-{0} -auto'.format(test_name)
         ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         for buffer_type in ('color', 'depth', 'stencil'):
                 test_name = ' '.join(['upsample', str(num_samples), buffer_type])
                 executable = 'ext_framebuffer_multisample-{0} -auto'.format(
                         test_name)
                 ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         for buffer_type in ('color', 'depth', 'stencil'):
                 test_name = ' ' .join(['multisample-blit', str(num_samples), buffer_type])
                 executable = 'ext_framebuffer_multisample-{0} -auto'.format(
                         test_name)
                 ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         for buffer_type in ('color', 'depth', 'stencil'):
                 for blit_type in ('msaa', 'upsample', 'downsample'):
                         test_name = ' '.join(['unaligned-blit', str(num_samples), buffer_type, blit_type])
@@ -1358,25 +1361,25 @@ for num_samples in (2, 4, 8, 16, 32):
                                 test_name)
                         ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
 	test_name = ' ' .join(['line-smooth', str(num_samples)])
 	executable = 'ext_framebuffer_multisample-{0} -auto'.format(
 	        test_name)
 	ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
 	test_name = ' ' .join(['point-smooth', str(num_samples)])
 	executable = 'ext_framebuffer_multisample-{0} -auto'.format(
 	        test_name)
 	ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
 	test_name = ' ' .join(['polygon-smooth', str(num_samples)])
 	executable = 'ext_framebuffer_multisample-{0} -auto'.format(
 	        test_name)
 	ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
 
-for num_samples in (2, 4, 8, 16, 32):
+for num_samples in MSAA_SAMPLE_COUNTS:
         test_name = ' '.join(['formats', str(num_samples)])
         executable = 'ext_framebuffer_multisample-{0} -auto'.format(
                 test_name)
-- 
1.7.7.6



More information about the Piglit mailing list