summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-12-12 12:57:57 +0200
committerTapani Pälli <[email protected]>2013-12-12 17:28:06 +0200
commitc1d3080ee86cd3d914712ffe0bb533c5d6a6b271 (patch)
treea890afb0ab7df128e3dc9ed5936e927141d8c60a /src/glsl/ir.h
parentcbe7431cdb57edb87e53e61ff97db54831cc00b7 (diff)
glsl: introduce data section to ir_variable
Data section helps serialization and cloning of a ir_variable. This patch includes the helper bits used for read only ir_variables. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 7a939a236b8..cdede59d864 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -522,16 +522,20 @@ public:
*/
unsigned *max_ifc_array_access;
- /**
- * Is the variable read-only?
- *
- * This is set for variables declared as \c const, shader inputs,
- * and uniforms.
- */
- unsigned read_only:1;
- unsigned centroid:1;
- unsigned sample:1;
- unsigned invariant:1;
+ struct ir_variable_data {
+
+ /**
+ * Is the variable read-only?
+ *
+ * This is set for variables declared as \c const, shader inputs,
+ * and uniforms.
+ */
+ unsigned read_only:1;
+ unsigned centroid:1;
+ unsigned sample:1;
+ unsigned invariant:1;
+
+ } data;
/**
* Has this variable been used for reading or writing?