st/nine: Declare constants only up to the maximum needed.
authorAxel Davy <axel.davy@ens.fr>
Wed, 7 Jan 2015 10:12:56 +0000 (11:12 +0100)
committerAxel Davy <axel.davy@ens.fr>
Thu, 5 Feb 2015 23:07:18 +0000 (00:07 +0100)
commit70a523818f08f97b6d51f156dca383cfcab8efab
treea4ed73db87b5b844b8e2d36174de6b1fb5c14d19
parenta249c7a161cdbb995b17195f1af88ed14f69f8b6
st/nine: Declare constants only up to the maximum needed.

Previously 276 constants were declared everytime.

This patch makes shaders declare constants up to the maximum
constant needed and moves the moment we print the TGSI
shader after the moment we declare the constants.

This is needed for r500, since when indirect addressing is used,
it cannot reduce the amount of constants needed, and that it is
restricted to 256 constant slots.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_shader.c