diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-15 22:20:03 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-18 16:57:23 -0700 |
commit | 0418846a07b02d39e129987580e7ea50fb422ee0 (patch) | |
tree | d55b179c77f58bfd17addbbaf3015d4d78213329 /src/glsl/ast_type.cpp | |
parent | 7f6a2d6937e837e06d9e22d173d996397ff4cacf (diff) |
glsl: Parse the "binding" keyword and store it in ast_type_qualifier.
Nothing actually uses this yet.
v2: Remove >= 0 checks. They'll be handled in later validation.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/ast_type.cpp')
-rw-r--r-- | src/glsl/ast_type.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp index 4cbb835ee1e..275b2a1d0ac 100644 --- a/src/glsl/ast_type.cpp +++ b/src/glsl/ast_type.cpp @@ -71,7 +71,8 @@ ast_type_qualifier::has_layout() const || this->flags.q.row_major || this->flags.q.packed || this->flags.q.explicit_location - || this->flags.q.explicit_index; + || this->flags.q.explicit_index + || this->flags.q.explicit_binding; } bool @@ -145,6 +146,9 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, if (q.flags.q.explicit_index) this->index = q.index; + if (q.flags.q.explicit_binding) + this->binding = q.binding; + return true; } |