ast_function: Fix non-float constructors with matrix arguments.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Jul 2010 01:15:32 +0000 (18:15 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Jul 2010 16:46:29 +0000 (09:46 -0700)
commit284d821206d74fddb346cd0d892d2dcec463e2a5
tree25710ffdc3dd47da4522f7c927e1f62fdb7d0d85
parentf58bbd134e921b14f50ecd1e76b2943753ba194c
ast_function: Fix non-float constructors with matrix arguments.

Previously, code like ivec4(mat2(...)) would fail because the compiler
would naively try to convert a mat2 to an imat2...which doesn't exist.
Now, a separate pass breaks such matrices down to their columns, which
can be converted from vec2 to ivec2.

Fixes piglit tests constructor-11.vert, constructor-14.vert,
constructor-15.vert, and CorrectConstFolding2.frag.
src/glsl/ast_function.cpp