aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r--mesalib/src/glsl/ir.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index 404d4cffa..5878c051b 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -356,14 +356,6 @@ public:
/*@}*/
/**
- * \brief Layout qualifier for gl_FragDepth.
- *
- * This is not equal to \c ir_depth_layout_none if and only if this
- * variable is \c gl_FragDepth and a layout qualifier is specified.
- */
- ir_depth_layout depth_layout;
-
- /**
* Was the location explicitly set in the shader?
*
* If the location is explicitly set in the shader, it \b cannot be changed
@@ -373,6 +365,22 @@ public:
unsigned explicit_location:1;
/**
+ * Does this variable have an initializer?
+ *
+ * This is used by the linker to cross-validiate initializers of global
+ * variables.
+ */
+ unsigned has_initializer:1;
+
+ /**
+ * \brief Layout qualifier for gl_FragDepth.
+ *
+ * This is not equal to \c ir_depth_layout_none if and only if this
+ * variable is \c gl_FragDepth and a layout qualifier is specified.
+ */
+ ir_depth_layout depth_layout;
+
+ /**
* Storage location of the base of this variable
*
* The precise meaning of this field depends on the nature of the variable.
@@ -414,6 +422,16 @@ public:
* Value assigned in the initializer of a variable declared "const"
*/
ir_constant *constant_value;
+
+ /**
+ * Constant expression assigned in the initializer of the variable
+ *
+ * \warning
+ * This field and \c ::constant_value are distinct. Even if the two fields
+ * refer to constants with the same value, they must point to separate
+ * objects.
+ */
+ ir_constant *constant_initializer;
};