glsl: Set up generated builtin functions handling for GLSL 1.40.
authorEric Anholt <eric@anholt.net>
Mon, 12 Mar 2012 23:08:44 +0000 (16:08 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 15 Mar 2012 23:24:50 +0000 (16:24 -0700)
Otherwise, when we go to use ir_reader on the generated code, we won't
have the types present.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/builtins/tools/generate_builtins.py

index 9ab6edd226f68047b5b6c4a5f1b615c77d73f5b5..9c1aeb562424b933fd862276b7fab46ae8a83dc1 100755 (executable)
@@ -162,14 +162,14 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
 {
    struct gl_context fakeCtx;
    fakeCtx.API = API_OPENGL;
-   fakeCtx.Const.GLSLVersion = 130;
+   fakeCtx.Const.GLSLVersion = 140;
    fakeCtx.Extensions.ARB_ES2_compatibility = true;
    gl_shader *sh = _mesa_new_shader(NULL, 0, target);
    struct _mesa_glsl_parse_state *st =
       new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
 
-   st->language_version = 130;
-   st->symbols->language_version = 130;
+   st->language_version = 140;
+   st->symbols->language_version = 140;
    st->ARB_texture_rectangle_enable = true;
    st->EXT_texture_array_enable = true;
    st->OES_EGL_image_external_enable = true;