[Mesa-dev] [PATCH 06/12] mesa: make _mesa_init_extensions context-independent

Ian Romanick idr at freedesktop.org
Tue Aug 5 11:04:22 PDT 2014


This patch is

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

On 08/03/2014 08:18 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/mesa/main/context.c    | 2 +-
>  src/mesa/main/extensions.c | 8 ++++----
>  src/mesa/main/extensions.h | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index 0f28dbf..e08f728 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -793,7 +793,7 @@ init_attrib_groups(struct gl_context *ctx)
>     _mesa_init_constants( ctx );
>  
>     /* Extensions */
> -   _mesa_init_extensions( ctx );
> +   _mesa_init_extensions(&ctx->Extensions);
>  
>     /* Attribute Groups */
>     _mesa_init_accum( ctx );
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 9ac8377..50d528a 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -666,9 +666,9 @@ _mesa_one_time_init_extension_overrides(void)
>   * Note: Sets gl_extensions.dummy_true to true.
>   */
>  void
> -_mesa_init_extensions( struct gl_context *ctx )
> +_mesa_init_extensions(struct gl_extensions *extensions)
>  {
> -   GLboolean *base = (GLboolean *) &ctx->Extensions;
> +   GLboolean *base = (GLboolean *) extensions;
>     GLboolean *sentinel = base + o(extension_sentinel);
>     GLboolean *i;
>  
> @@ -677,8 +677,8 @@ _mesa_init_extensions( struct gl_context *ctx )
>        *i = GL_FALSE;
>  
>     /* Then, selectively turn default extensions on. */
> -   ctx->Extensions.dummy_true = GL_TRUE;
> -   ctx->Extensions.EXT_texture3D = GL_TRUE;
> +   extensions->dummy_true = GL_TRUE;
> +   extensions->EXT_texture3D = GL_TRUE;
>  }
>  
>  
> diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
> index 3a404d2..595512a 100644
> --- a/src/mesa/main/extensions.h
> +++ b/src/mesa/main/extensions.h
> @@ -45,7 +45,7 @@ extern void _mesa_enable_sw_extensions(struct gl_context *ctx);
>  
>  extern void _mesa_one_time_init_extension_overrides(void);
>  
> -extern void _mesa_init_extensions(struct gl_context *ctx);
> +extern void _mesa_init_extensions(struct gl_extensions *extentions);
>  
>  extern GLubyte *_mesa_make_extension_string(struct gl_context *ctx);
>  
> 



More information about the mesa-dev mailing list