glsl: Unify ir_constant::const_elements and ::components
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 8 Sep 2017 02:23:51 +0000 (19:23 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 19 Sep 2017 17:02:43 +0000 (12:02 -0500)
commit9ac8fece63a9e980971b0cc894c60a9d8db4037d
tree6c4c0a85722e769c3711f1c217abe339d8581d6d
parent0e88153e998b5ba97dee2b143915ba2509217281
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>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/ir_clone.cpp
src/compiler/glsl/ir_print_visitor.cpp
src/compiler/glsl/link_uniform_initializers.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp