aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/vertexdeclaration9.h
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-11-26 22:32:57 +0100
committerAxel Davy <[email protected]>2014-12-03 16:39:24 +0100
commit712a4c5438d0ce257344b5196c20ad7929b54a0e (patch)
tree32417a5c9f3fdb10182c7cd5264fb40ce1123b2d /src/gallium/state_trackers/nine/vertexdeclaration9.h
parent5d6d260833e374404f80d1c36bc0e1854369a069 (diff)
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" <[email protected]> Tested-by: Yaroslav Andrusyak <[email protected]> Acked-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/vertexdeclaration9.h')
-rw-r--r--src/gallium/state_trackers/nine/vertexdeclaration9.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.h b/src/gallium/state_trackers/nine/vertexdeclaration9.h
index 6590f460f67..a4d4a0445d5 100644
--- a/src/gallium/state_trackers/nine/vertexdeclaration9.h
+++ b/src/gallium/state_trackers/nine/vertexdeclaration9.h
@@ -40,9 +40,9 @@ struct NineVertexDeclaration9
struct pipe_vertex_element *elems;
unsigned nelems;
- /* DECLUSAGE -> element index, for selecting the vertex element
+ /* index -> DECLUSAGE, for selecting the vertex element
* for each VS input */
- uint8_t usage_map[NINE_DECLUSAGE_COUNT];
+ uint16_t *usage_map;
D3DVERTEXELEMENT9 *decls;
DWORD fvf;