From f8946699ecfa5bc6566821fb855072bbdbd716b2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 20 Jul 2010 14:03:35 -0700 Subject: glsl2: Add definitions of the builtin constants present in GLSL 1.10. Fixes: glsl1-built-in constants --- src/glsl/main.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/glsl/main.cpp') 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); -- cgit v1.2.3