glsl2: Extend ir_constant to store constant arrays, and generate them.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Jul 2010 08:06:33 +0000 (01:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 21 Jul 2010 23:38:33 +0000 (16:38 -0700)
commit74e1802f5dd8921750851abc6128e4073602d405
tree40e3e5f055b164a0af9993de18b7bc432775bbc1
parent13a19745d46d383fa7fc148ce129150ebde151b7
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.
src/glsl/ast_function.cpp
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_clone.cpp