Merge remote branch 'origin/master' into lp-setup-llvm
[mesa.git] / src / glsl / builtins / tools / generate_builtins.py
index f96a5f7b8bb4dc5ac17b6478a2116a8167f51067..e8191ee9fdc9d786568b4eb3510a24432304297f 100755 (executable)
@@ -123,12 +123,13 @@ if __name__ == "__main__":
 #include "ast.h"
 
 extern "C" struct gl_shader *
-_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
+_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
 
 gl_shader *
 read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
 {
-   GLcontext fakeCtx;
+   struct gl_context fakeCtx;
+   fakeCtx.API = API_OPENGL;
    gl_shader *sh = _mesa_new_shader(NULL, 0, target);
    struct _mesa_glsl_parse_state *st =
       new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);