glsl2: Make sure _mesa_glsl_parse_state constructor gets a context
Fix an major regression in dc754586. Too bad that change was
obviously never tested.
This commit is contained in:
@@ -35,9 +35,10 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
|
||||
gl_shader *
|
||||
read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
|
||||
{
|
||||
GLcontext fakeCtx;
|
||||
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
|
||||
struct _mesa_glsl_parse_state *st =
|
||||
new(sh) _mesa_glsl_parse_state(NULL, target, sh);
|
||||
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
|
||||
|
||||
st->language_version = 130;
|
||||
st->symbols->language_version = 130;
|
||||
|
||||
@@ -128,9 +128,10 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
|
||||
gl_shader *
|
||||
read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
|
||||
{
|
||||
GLcontext fakeCtx;
|
||||
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
|
||||
struct _mesa_glsl_parse_state *st =
|
||||
new(sh) _mesa_glsl_parse_state(NULL, target, sh);
|
||||
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
|
||||
|
||||
st->language_version = 130;
|
||||
st->symbols->language_version = 130;
|
||||
|
||||
Reference in New Issue
Block a user