glsl: parser changes for GL_ARB_explicit_uniform_location

Patch adds a preprocessor define for the extension and stores explicit
location data for uniforms during AST->HIR conversion. It also sets
layout token to be available when having the extension in place.

v2: change parser check to require GLSL 330 or enabling
    GL_ARB_explicit_attrib_location (Ian)
v3: fix the check and comment in AST->HIR (Petri)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
Tapani Pälli
2014-03-05 12:35:03 +02:00
parent 8381f0f0c3
commit e8fb8b1bb3
4 changed files with 54 additions and 0 deletions
+3
View File
@@ -2089,6 +2089,9 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
if (extensions->ARB_explicit_attrib_location)
add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
if (extensions->ARB_explicit_uniform_location)
add_builtin_define(parser, "GL_ARB_explicit_uniform_location", 1);
if (extensions->ARB_shader_texture_lod)
add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);