From 697f071e3dcd3b01dba050d6c5316f2a23ee82f8 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Nov 2013 08:50:11 +0100 Subject: libxtrans mesa git update 22 nov 2013 libxtrans commit 8b2c8aabe27bcaa4de6432b53c4a1296010ea823 mesa commit bb354c6c279031dafc08029a62cd3e76a6c1ca71 --- mesalib/src/glsl/ir.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'mesalib/src/glsl/ir.h') diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index 7859702ed..4f775da4b 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -293,6 +293,34 @@ enum ir_variable_mode { ir_var_mode_count /**< Number of variable modes */ }; +/** + * Enum keeping track of how a variable was declared. For error checking of + * the gl_PerVertex redeclaration rules. + */ +enum ir_var_declaration_type { + /** + * Normal declaration (for most variables, this means an explicit + * declaration. Exception: temporaries are always implicitly declared, but + * they still use ir_var_declared_normally). + * + * Note: an ir_variable that represents a named interface block uses + * ir_var_declared_normally. + */ + ir_var_declared_normally = 0, + + /** + * Variable was explicitly declared (or re-declared) in an unnamed + * interface block. + */ + ir_var_declared_in_block, + + /** + * Variable is an implicitly declared built-in that has not been explicitly + * re-declared by the shader. + */ + ir_var_declared_implicitly, +}; + /** * \brief Layout qualifiers for gl_FragDepth. * @@ -525,6 +553,14 @@ public: */ unsigned assigned:1; + /** + * Enum indicating how the variable was declared. See + * ir_var_declaration_type. + * + * This is used to detect certain kinds of illegal variable redeclarations. + */ + unsigned how_declared:2; + /** * Storage class of the variable. * -- cgit v1.2.3