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

Francisco Jerez currojerez at riseup.net
Fri Aug 28 03:46:22 PDT 2015


Martin Peres <martin.peres at linux.intel.com> writes:

> 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);
> +
> +

I think it would nice if you factored this into a separate function just
like you did with test_max_dimensions for the sake of symmetry
(e.g. test_small_dimensions? :P).

With that fixed:
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

>  				test_max_dimensions(format, target,
>  						    stage, &status,
>  						    quick, slow);
> -- 
> 2.5.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150828/d7bf7acd/attachment.sig>


More information about the Piglit mailing list