You've actually fixed a much more important compiler bug than you might
think. The 0.5 swizzle is really being used even without constant folding,
specifically in reducing the number of shader immediates (r300_tgsi_to_rc.c
: handle_immediate)
Thanks.
All Nicolai's compiler work in his repo is now
Attached is a patch to fix constant folding in the r300 compiler
implemented in commit c704933 of Nicolai's r300g-glsl branch
(git://anongit.freedesktop.org/~nh/mesa).
With this patch, the constant folding implementation can be cherry-picked
to master without breaking any piglit tests.
-Tom
>From