st/nine: Fix vertex declarations for non-standard (usage/index)
authorAxel Davy <axel.davy@ens.fr>
Wed, 26 Nov 2014 21:32:57 +0000 (22:32 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 3 Dec 2014 15:39:24 +0000 (16:39 +0100)
commit712a4c5438d0ce257344b5196c20ad7929b54a0e
tree32417a5c9f3fdb10182c7cd5264fb40ce1123b2d
parent5d6d260833e374404f80d1c36bc0e1854369a069
st/nine: Fix vertex declarations for non-standard (usage/index)

Nine code to match vertex declaration to vs inputs was limiting
the number of possible combinations.

Some sm3 games have issues with that, because arbitrary (usage/index)
can be used.

This patch does the following changes to fix the problem:
. Change the numbers given to (usage/index) combinations to uint16
. Do not put limits on the indices when it doesn't make sense
. change the conversion rule (usage/index) -> number to fit all combinations
. Instead of having a table usage_map mapping a (usage/index) number to
an input index, usage_map maps input indices to their (usage/index)

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Tested-by: Yaroslav Andrusyak <pontostroy@gmail.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_defines.h
src/gallium/state_trackers/nine/nine_ff.c
src/gallium/state_trackers/nine/nine_shader.h
src/gallium/state_trackers/nine/nine_state.c
src/gallium/state_trackers/nine/vertexdeclaration9.c
src/gallium/state_trackers/nine/vertexdeclaration9.h
src/gallium/state_trackers/nine/vertexshader9.h