diff options
author | Paul Berry <[email protected]> | 2013-07-26 11:55:52 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-15 11:34:30 -0700 |
commit | 2910a82eb43bafc73d542336c21f415f5f4a3bed (patch) | |
tree | ceea5f66f6fd2f0506edff19ca75b3df67e1529d /src/glsl/glsl_parser_extras.cpp | |
parent | 705a90e30435490c2de84f4f6741cab335fa7608 (diff) |
glsl: Add new GLSL 1.50 constants.
This patch populates the following built-in GLSL 1.50 variables based
on constants stored in ctx->Const:
- gl_MaxVertexOutputComponents
- gl_MaxGeometryInputComponents
- gl_MaxGeometryOutputComponents
- gl_MaxFragmentInputComponents
- gl_MaxGeometryTextureImageUnits
- gl_MaxGeometryOutputVertices
- gl_MaxGeometryTotalOutputComponents
- gl_MaxGeometryUniformComponents
- gl_MaxGeometryVaryingComponents
On i965/gen7, fixes all Piglit tests in "spec/glsl-1.50/built-in
constants/*" except for gl_MaxCombinedTextureImageUnits and
gl_MaxGeometryUniformComponents.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index f1cabf4be4c..be17109e134 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -108,6 +108,16 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers; + /* 1.50 constants */ + this->Const.MaxVertexOutputComponents = ctx->Const.VertexProgram.MaxOutputComponents; + this->Const.MaxGeometryInputComponents = ctx->Const.GeometryProgram.MaxInputComponents; + this->Const.MaxGeometryOutputComponents = ctx->Const.GeometryProgram.MaxOutputComponents; + this->Const.MaxFragmentInputComponents = ctx->Const.FragmentProgram.MaxInputComponents; + this->Const.MaxGeometryTextureImageUnits = ctx->Const.GeometryProgram.MaxTextureImageUnits; + this->Const.MaxGeometryOutputVertices = ctx->Const.MaxGeometryOutputVertices; + this->Const.MaxGeometryTotalOutputComponents = ctx->Const.MaxGeometryTotalOutputComponents; + this->Const.MaxGeometryUniformComponents = ctx->Const.GeometryProgram.MaxUniformComponents; + this->current_function = NULL; this->toplevel_ir = NULL; this->found_return = false; |