summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-07-20 01:06:33 -0700
committerKenneth Graunke <[email protected]>2010-07-21 16:38:33 -0700
commit74e1802f5dd8921750851abc6128e4073602d405 (patch)
tree40e3e5f055b164a0af9993de18b7bc432775bbc1 /src/glsl/ir.h
parent13a19745d46d383fa7fc148ce129150ebde151b7 (diff)
glsl2: Extend ir_constant to store constant arrays, and generate them.
Since GLSL permits arrays of structures, we need to store each element as an ir_constant*, not just ir_constant_data. Fixes parser tests const-array-01.frag, const-array-03.frag, const-array-04.frag, const-array-05.frag, though 03 and 04 generate the wrong code.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 3a643fc5807..c73bf4ce8b2 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1268,6 +1268,8 @@ public:
unsigned get_uint_component(unsigned i) const;
/*@}*/
+ ir_constant *get_array_element(unsigned i) const;
+
ir_constant *get_record_field(const char *name);
/**
@@ -1284,6 +1286,10 @@ public:
*/
union ir_constant_data value;
+ /* Array elements */
+ ir_constant **array_elements;
+
+ /* Structure fields */
exec_list components;
private: