glsl: Make {Min,Max}ProgramTexelOffset available to compiler.
authorPaul Berry <stereotype441@gmail.com>
Sat, 4 Aug 2012 17:00:20 +0000 (10:00 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 20:13:22 +0000 (12:13 -0800)
These constants need to be made available to shaders in GLSL 3.00 ES.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Carl Worth <cworth@cworth.org>
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h

index 19518f166d4b3be6450220ab7d1832a8ec2a874b..1cf4571e5a9e869fa5ff04665004fcf7f7df46a5 100644 (file)
@@ -92,6 +92,8 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
    this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
    this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
    this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
+   this->Const.MinProgramTexelOffset = ctx->Const.MinProgramTexelOffset;
+   this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset;
 
    this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
 
index 8cda92784153bb48d277d38706776e511a9f8eb0..46e0784ba3685a07aff00cf34ec70e25e75a5ab4 100644 (file)
@@ -190,6 +190,10 @@ struct _mesa_glsl_parse_state {
 
       /* ARB_draw_buffers */
       unsigned MaxDrawBuffers;
+
+      /* 3.00 ES */
+      int MinProgramTexelOffset;
+      int MaxProgramTexelOffset;
    } Const;
 
    /**