summaryrefslogtreecommitdiff
path: root/src/glsl/main.cpp
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/glsl/main.cpp
parent1245babe0c69846d227a78a11429584433e77a9e (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.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 3ae0eebab3..6b1a01c704 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);