[Mesa-dev] [PATCH 2/2] st/mesa: set MaxUnrollIterations = 64

Jose Fonseca jfonseca at vmware.com
Wed Mar 21 04:42:47 PDT 2012


The increase sounds good to me.

But 64 seems small. SM3 allows loops up to 255 iterations, and Microsoft HLSL compiler will unroll loops that big.

Although I wonder why we don't simply unroll everything until we hit PIPE_SHADER_CAP_MAX_INSTRUCTIONS too, when options->EmitNoLoops is false.

Jose

----- Original Message -----
> The default was 32 for the EmitNoLoops=0 case.  This allows the
> oZone3D
> soft shadows test to work properly with the vmware driver.
> ---
>  src/mesa/state_tracker/st_extensions.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_extensions.c
> b/src/mesa/state_tracker/st_extensions.c
> index 33bc6ed..73a59fc 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -216,6 +216,8 @@ void st_init_limits(struct st_context *st)
>  
>        if (options->EmitNoLoops)
>           options->MaxUnrollIterations =
>           MIN2(screen->get_shader_param(screen, sh,
>           PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
> +      else
> +         options->MaxUnrollIterations = 64;
>     }
>  
>     /* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum
>     number
> --
> 1.7.3.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list