[Mesa-dev] [PATCH 1/3] swrast: initialize program native limits

Ian Romanick idr at freedesktop.org
Wed Aug 31 11:39:29 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/30/2011 01:26 PM, Brian Paul wrote:
> From: Brian Paul <brianp at vmware.com>

1/3 and 2/3 are

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>  src/mesa/swrast/s_context.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
> index 792b528..df21335 100644
> --- a/src/mesa/swrast/s_context.c
> +++ b/src/mesa/swrast/s_context.c
> @@ -688,6 +688,24 @@ _swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value )
>  }
>  
>  
> +/**
> + * Initialize native program limits by copying the logical limits.
> + * See comments in init_program_limits() in context.c
> + */
> +static void
> +init_program_native_limits(struct gl_program_constants *prog)
> +{
> +   prog->MaxNativeInstructions = prog->MaxInstructions;
> +   prog->MaxNativeAluInstructions = prog->MaxAluInstructions;
> +   prog->MaxNativeTexInstructions = prog->MaxTexInstructions;
> +   prog->MaxNativeTexIndirections = prog->MaxTexIndirections;
> +   prog->MaxNativeAttribs = prog->MaxAttribs;
> +   prog->MaxNativeTemps = prog->MaxTemps;
> +   prog->MaxNativeAddressRegs = prog->MaxAddressRegs;
> +   prog->MaxNativeParameters = prog->MaxParameters;
> +}
> +
> +
>  GLboolean
>  _swrast_CreateContext( struct gl_context *ctx )
>  {
> @@ -769,6 +787,10 @@ _swrast_CreateContext( struct gl_context *ctx )
>        return GL_FALSE;
>     }
>  
> +   init_program_native_limits(&ctx->Const.VertexProgram);
> +   init_program_native_limits(&ctx->Const.GeometryProgram);
> +   init_program_native_limits(&ctx->Const.FragmentProgram);
> +
>     ctx->swrast_context = swrast;
>  
>     return GL_TRUE;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5ef+EACgkQX1gOwKyEAw8J8ACdEO+hfb4uYDFiQjVZIj1HPUu0
94MAn22V5Zke7k+k+mrll3MoH7qMMG5y
=rYCR
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list