[Piglit] [PATCH 3/4] fp-indirections2: limit max_samples to 256

Roland Scheidegger rscheidegger_lists at hispeed.ch
Fri Sep 19 13:25:46 PDT 2014


Am 19.09.2014 17:12, schrieb Brian Paul:
> So that llvmpipe can run in a reasonable amount of time.
> ---
>  tests/shaders/fp-indirections2.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/shaders/fp-indirections2.c b/tests/shaders/fp-indirections2.c
> index 0b1ee28..5cf09eb 100644
> --- a/tests/shaders/fp-indirections2.c
> +++ b/tests/shaders/fp-indirections2.c
> @@ -216,6 +216,7 @@ piglit_display(void)
>  	for(dim = 1; dim <= 3; ++dim) {
>  		samples = 0;
>  		for(;;) {
> +                   printf("Test dim %d samples %d\n", dim, samples);
>  			result = test(dim, samples);
>  			if (result != PIGLIT_PASS)
>  				return result;
> @@ -265,8 +266,8 @@ void piglit_init(int argc, char ** argv)
>  		max_samples = max_native_tex_instructions;
>  	}
>  
> -	if (max_samples > 1024)
> -		max_samples = 1024;
> +	if (max_samples > 256)
> +		max_samples = 256;
>  
>  	texture_init();
>  }
> 

This looks good to me. Though 1024 is not an unreasonably high number,
so it could be classified as a llvmpipe bug.
(llvm spends all its time in DominatorTree::dominates, something which
happens with other complex shaders too - not entirely sure if there's
something we could do to easily fix it, though it probably would help if
we'd use real functions for texture sampling at least if the same
sampler/texture combo is used multiple times.)

Roland



More information about the Piglit mailing list