diff options
author | Eric Anholt <[email protected]> | 2010-07-20 14:03:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-07-20 14:03:35 -0700 |
commit | f8946699ecfa5bc6566821fb855072bbdbd716b2 (patch) | |
tree | 891821c44e113f52f5c36bcf7e1af24d452afb0a /src/mesa/shader/ir_to_mesa.cpp | |
parent | 1245babe0c69846d227a78a11429584433e77a9e (diff) |
glsl2: Add definitions of the builtin constants present in GLSL 1.10.
Fixes:
glsl1-built-in constants
Diffstat (limited to 'src/mesa/shader/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/shader/ir_to_mesa.cpp | 14 |
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 848fb0fb6c2..5803960d444 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, |