glsl: Add a new ast_type_qualifier::has_storage() method. 68/7568/1
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 13 Jul 2013 05:36:31 +0000 (22:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:57:22 +0000 (16:57 -0700)
commiteb30af51d68e3cc137dd640e57c81bdda1aae527
treeec22202e69456987f359c353dd8b6f63fe9a2c1f
parent7cef2b22b84aecf9cddf65a3a054fd39e2e9b369
glsl: Add a new ast_type_qualifier::has_storage() method.

This makes it easy to check if any storage qualifiers are set.

"centroid" is not considered a storage qualifier.  In the old language
rules, you can't specify "centroid" by itself; it's always "centroid
in", "centroid out", or "centroid varying."  So one of the other storage
qualifiers will always be set; there's no need to specifically check for
centroid.

In the new 4.20 rules, centroid is an auxiliary storage qualifier, not a
storage qualifier.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ast.h
src/glsl/ast_type.cpp