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/glsl/main.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/glsl/main.cpp')
-rw-r--r-- | src/glsl/main.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index 3ae0eebab3c..6b1a01c7046 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -148,9 +148,26 @@ compile_shader(struct gl_shader *shader) memset(&ext, 0, sizeof(ext)); state->extensions = &ext; - state->Const.MaxDrawBuffers = 2; + /* 1.10 minimums. */ + state->Const.MaxLights = 8; + state->Const.MaxClipPlanes = 8; + state->Const.MaxTextureUnits = 2; + + /* More than the 1.10 minimum to appease parser tests taken from + * apps that (hopefully) already checked the number of coords. + */ state->Const.MaxTextureCoords = 4; + state->Const.MaxVertexAttribs = 16; + state->Const.MaxVertexUniformComponents = 512; + state->Const.MaxVaryingFloats = 32; + state->Const.MaxVertexTextureImageUnits = 0; + state->Const.MaxCombinedTextureImageUnits = 2; + state->Const.MaxTextureImageUnits = 2; + state->Const.MaxFragmentUniformComponents = 64; + + state->Const.MaxDrawBuffers = 2; + const char *source = shader->Source; state->error = preprocess(state, &source, &state->info_log, &ext); |