From c7b9a2e38a3e471562b50dab8be65db8ac6819f8 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Wed, 26 Nov 2014 22:32:57 +0100 Subject: 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" Tested-by: Yaroslav Andrusyak Acked-by: Ilia Mirkin Signed-off-by: Axel Davy (cherry picked from commit 712a4c5438d0ce257344b5196c20ad7929b54a0e) --- src/gallium/state_trackers/nine/vertexshader9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/nine/vertexshader9.h') diff --git a/src/gallium/state_trackers/nine/vertexshader9.h b/src/gallium/state_trackers/nine/vertexshader9.h index a7d750d3efb..3495c9f9c55 100644 --- a/src/gallium/state_trackers/nine/vertexshader9.h +++ b/src/gallium/state_trackers/nine/vertexshader9.h @@ -32,7 +32,7 @@ struct NineVertexShader9 struct nine_shader_variant variant; struct { - uint8_t ndecl; /* NINE_DECLUSAGE_x */ + uint16_t ndecl; /* NINE_DECLUSAGE_x */ } input_map[PIPE_MAX_ATTRIBS]; unsigned num_inputs; -- cgit v1.2.3