ARB prog parser: use _mesa_add_unnamed_constant() to use fewer constant slots
authorBrian Paul <brianp@vmware.com>
Tue, 29 Dec 2009 16:06:00 +0000 (09:06 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 29 Dec 2009 16:08:02 +0000 (09:08 -0700)
commit639e7a140e430aa8839c652459eddc9a4b79f9c6
treedb2cd77e1ff5324c7eac4bc98ba2081664fa1d11
parentb4658dbf04003418a1aadc7647ce8c7211f58413
ARB prog parser: use _mesa_add_unnamed_constant() to use fewer constant slots

This function will search the constant parameters in an effort to re-use
constant slots.  For example, {1,2,3,4} and {4,1,1,2} can be stored in
one constant slot and accessed with different swizzles.  The swizzle info
must be propogated though the parsing code in a few places.

Fixes Piglit "vpfp-generic tests/shaders/generic/big-param.vpfp" failure.
src/mesa/shader/program_parse.tab.c
src/mesa/shader/program_parse.tab.h
src/mesa/shader/program_parse.y
src/mesa/shader/program_parser.h