[Piglit] [PATCH 4/4] arb_shader_image_size/builtin: test a simple size before testing max sizes

Martin Peres martin.peres at linux.intel.com
Mon Aug 24 03:12:40 PDT 2015


The normal mode will run the small tests on the interesting stages and formats
while the slow mode will test every stage and every format.

Disable all the max-size tests in quick mode since they are redundant with the
smaller tests anyway which run faster.

Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
 tests/spec/arb_shader_image_size/builtin.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/tests/spec/arb_shader_image_size/builtin.c b/tests/spec/arb_shader_image_size/builtin.c
index 854e2b3..dd240e6 100755
--- a/tests/spec/arb_shader_image_size/builtin.c
+++ b/tests/spec/arb_shader_image_size/builtin.c
@@ -255,7 +255,8 @@ test_max_dimensions(const struct image_format_info *format,
 					get_test_extent(target, d);
 
 			subtest(status,
-				is_test_reasonable(quick, size) &&
+				!quick &&
+				is_test_reasonable(!slow, size) &&
 				is_format_interesting(format, slow) &&
 				is_stage_interesting(stage, slow),
 				run_test(format, target, size),
@@ -285,6 +286,19 @@ piglit_init(int argc, char **argv)
 	for (format = image_formats_load_store; format->format; ++format) {
 		for (stage = image_stages(); stage->stage; ++stage) {
 			for (target = image_targets(); target->name; ++target) {
+				const struct image_extent size =
+						image_extent_for_target(target,
+									16, 96);
+
+				subtest(&status,
+					is_format_interesting(format, slow) &&
+					is_stage_interesting(stage, slow),
+					run_test(format, target, size),
+					"%s/%s/image%s size test/%dx%dx%dx%d",
+					format->name, stage->name, target->name,
+					size.x, size.y, size.z,	size.w);
+
+
 				test_max_dimensions(format, target,
 						    stage, &status,
 						    quick, slow);
-- 
2.5.0



More information about the Piglit mailing list