summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-20 14:03:35 -0700
committerEric Anholt <eric@anholt.net>2010-07-20 14:03:35 -0700
commitf8946699ecfa5bc6566821fb855072bbdbd716b2 (patch)
tree891821c44e113f52f5c36bcf7e1af24d452afb0a /src/mesa
parent1245babe0c69846d227a78a11429584433e77a9e (diff)
glsl2: Add definitions of the builtin constants present in GLSL 1.10.
Fixes: glsl1-built-in constants
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 848fb0fb6c..5803960d44 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -2170,8 +2170,20 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
state->ARB_texture_rectangle_enable = true;
state->extensions = &ctx->Extensions;
- state->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
+
+ state->Const.MaxLights = ctx->Const.MaxLights;
+ state->Const.MaxClipPlanes = ctx->Const.MaxClipPlanes;
+ state->Const.MaxTextureUnits = ctx->Const.MaxTextureUnits;
state->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits;
+ state->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs;
+ state->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents;
+ state->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4;
+ state->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits;
+ state->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
+ state->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
+ state->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
+
+ state->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
const char *source = shader->Source;
state->error = preprocess(state, &source, &state->info_log,