From 605aacc67d73db0926e0046a90a07fcd93a2d613 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 11 Jan 2011 17:21:18 -0800 Subject: glsl: Check that interpolation qualifiers do not precede 'varying' ... and 'centroid varying'. The check is performed only in GLSL versions >= 1.30. From page 29 (page 35 of the PDF) of the GLSL 1.30 spec: "interpolation qualifiers may only precede the qualifiers in, centroid in, out, or centroid out in a declaration. They do not apply to the deprecated storage qualifiers varying or centroid varying." Fixes Piglit test spec/glsl-1.30/compiler/interpolation-qualifiers/smooth-varying-01.frag. --- src/glsl/ast.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/glsl/ast.h') diff --git a/src/glsl/ast.h b/src/glsl/ast.h index c096f9aa87..523a38937a 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -365,6 +365,11 @@ struct ast_type_qualifier { */ unsigned location; + /** + * Return true if and only if an interpolation qualifier is present. + */ + bool has_interpolation() const; + /** * \brief Return string representation of interpolation qualifier. * -- cgit v1.2.3