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.
This commit is contained in:
Chad Versace
2011-01-11 17:21:18 -08:00
parent 0e2f8936c8
commit 605aacc67d
3 changed files with 38 additions and 0 deletions

View File

@@ -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.
*