gallivm: Use a more compact approach for lp_build_broadcast_scalar().
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 9 May 2010 21:31:18 +0000 (22:31 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 12 May 2010 19:40:31 +0000 (20:40 +0100)
commita09e46c72461183c879d8472b44fe740ecc79b9f
treefd3d9e01ba34dcd26173bc801fb2e9574ce80c51
parent648c9d52477e410da374dbc97e3d68f599b2771f
gallivm: Use a more compact approach for lp_build_broadcast_scalar().

It produces exactly the same machine code, but it cuts 5% of the
number of instructions generated for a typical shader.

Also, preserve the scalar when length is 1.
src/gallium/auxiliary/gallivm/lp_bld_swizzle.c