i965/vec4: Add ability to reswizzle arbitrary swizzles.
authorMatt Turner <mattst88@gmail.com>
Sun, 31 Aug 2014 18:27:40 +0000 (11:27 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 5 Sep 2014 17:22:06 +0000 (10:22 -0700)
commite8df6a6b32aae7695ce010f18588c51cb7d18978
tree12eb645c98713922cac2f0438d633d39123cba3d
parent1ee1d8ab468cafd25cfcc513319f3f046492947f
i965/vec4: Add ability to reswizzle arbitrary swizzles.

Before commit 04895f5c we would only reswizzle dot product instructions
(since they wrote the same value into all channels, and we didn't have
to think about anything else). That commit extended reswizzling to cases
when the swizzle was single valued -- i.e., writing the same result into
all channels.

But allowing reswizzling of arbitrary things is actually really easy and
is even less code. (Why didn't we do this in the first place?!)

total instructions in shared programs: 4266079 -> 4261000 (-0.12%)
instructions in affected programs:     351933 -> 346854 (-1.44%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4.cpp