From 7fc882643ce1c57fb8f60d8c5edd761eff404749 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 8 Sep 2010 16:03:33 -0700 Subject: glsl/builtins: Set the API in the fake context. Otherwise it gets used uninitialized. --- src/glsl/builtin_function.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/glsl/builtin_function.cpp') diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index 944265ca945..d897fa65ec5 100644 --- a/src/glsl/builtin_function.cpp +++ b/src/glsl/builtin_function.cpp @@ -36,6 +36,7 @@ gl_shader * read_builtins(GLenum target, const char *protos, const char **functions, unsigned count) { GLcontext 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); -- cgit v1.2.3