glsl: Unify ir_constant::const_elements and ::components

There was no reason to treat array types and record types differently.
Unifying them saves a bunch of code and saves a few bytes in every
ir_constant.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
This commit is contained in:
Ian Romanick
2017-09-07 19:23:51 -07:00
parent 0e88153e99
commit 9ac8fece63
8 changed files with 28 additions and 115 deletions

View File

@@ -2262,12 +2262,9 @@ public:
*/
union ir_constant_data value;
/* Array elements */
/* Array elements and structure fields */
ir_constant **const_elements;
/* Structure fields */
exec_list components;
private:
/**
* Parameterless constructor only used by the clone method