[Mesa-dev] [PATCH 01/11] glsl: Use has_layout() rather than open coding it.
Kenneth Graunke
kenneth at whitecape.org
Wed Jul 17 18:24:01 PDT 2013
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/ast_to_hir.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 3ed6f01..e8ed77a 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2080,12 +2080,6 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
"explicit index requires explicit location\n");
}
- /* Does the declaration use the 'layout' keyword?
- */
- const bool uses_layout = qual->flags.q.pixel_center_integer
- || qual->flags.q.origin_upper_left
- || qual->flags.q.explicit_location; /* no need for index since it relies on location */
-
/* Does the declaration use the deprecated 'attribute' or 'varying'
* keywords?
*/
@@ -2115,7 +2109,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
const bool relaxed_layout_qualifier_checking =
state->ARB_fragment_coord_conventions_enable;
- if (uses_layout && uses_deprecated_qualifier) {
+ if (qual->has_layout() && uses_deprecated_qualifier) {
if (relaxed_layout_qualifier_checking) {
_mesa_glsl_warning(loc, state,
"`layout' qualifier may not be used with "
--
1.8.3.2
More information about the mesa-dev
mailing list