diff options
author | Eric Anholt <[email protected]> | 2012-06-22 13:36:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-07-31 12:06:20 -0700 |
commit | 551bdf25bc4e57bea51c54da7e31c44c507e6c9f (patch) | |
tree | 30fe843355b1f850c0ce0772b605b65f1e03dd46 /src/glsl/glsl_parser_extras.cpp | |
parent | 7b77c64254109ff1d59a8937f8f15216c10c8cb7 (diff) |
glsl: Add support for default layout qualifiers for uniforms.
I ended up having to add rallocing of the ast_type_qualifier in order
to avoid pulling in ast.h for glsl_parser_extras.h, because I wanted
to track an ast_type_qualifier in the state.
Fixes piglit ARB_uniform_buffer_object/row-major.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 4e1f3324011..09e1e590db6 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -107,6 +107,10 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, if (ctx->Const.ForceGLSLExtensionsWarn) _mesa_glsl_process_extension("all", NULL, "warn", NULL, this); + + this->default_uniform_qualifier = new(this) ast_type_qualifier(); + this->default_uniform_qualifier->flags.q.shared = 1; + this->default_uniform_qualifier->flags.q.column_major = 1; } const char * |