[Mesa-dev] [PATCH 3/4 resend] glsl: add gl_context member

Brian Paul brianp at vmware.com
Wed May 2 08:01:55 PDT 2012


On 05/01/2012 05:04 PM, nobled wrote:
> ---
>   src/glsl/glsl_parser_extras.cpp |    3 ++-
>   src/glsl/glsl_parser_extras.h   |    3 ++-
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
> index 6a4ab4a..3d99cc5 100644
> --- a/src/glsl/glsl_parser_extras.cpp
> +++ b/src/glsl/glsl_parser_extras.cpp
> @@ -36,8 +36,9 @@ extern "C" {
>   #include "ir_optimization.h"
>   #include "loop_analysis.h"
>
> -_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
> +_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
>   					       GLenum target, void *mem_ctx)
> + : ctx(_ctx)
>   {
>      switch (target) {
>      case GL_VERTEX_SHADER:   this->target = vertex_shader; break;
> diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
> index 55676f5..1a909c6 100644
> --- a/src/glsl/glsl_parser_extras.h
> +++ b/src/glsl/glsl_parser_extras.h
> @@ -57,7 +57,7 @@ struct glsl_switch_state {
>   };
>
>   struct _mesa_glsl_parse_state {
> -   _mesa_glsl_parse_state(struct gl_context *ctx, GLenum target,
> +   _mesa_glsl_parse_state(struct gl_context *_ctx, GLenum target,
>   			  void *mem_ctx);
>
>      /* Callers of this ralloc-based new need not call delete. It's
> @@ -77,6 +77,7 @@ struct _mesa_glsl_parse_state {
>         ralloc_free(mem);
>      }
>
> +   struct gl_context *const ctx;
>      void *scanner;
>      exec_list translation_unit;
>      glsl_symbol_table *symbols;


patches 3 and 4 look OK to me.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list