st/nine: Use ff vertex shader when position_t is used
authorAxel Davy <axel.davy@ens.fr>
Sat, 7 Nov 2015 16:47:06 +0000 (17:47 +0100)
committerAxel Davy <axel.davy@ens.fr>
Thu, 4 Feb 2016 21:12:17 +0000 (22:12 +0100)
commitb5876e47623a20c9a123d33927f97bada7c95f3c
tree4fb7e026bd16e39ce2576d822417afe4b8c25e0f
parent531acbc56b987a1ea288b95046e4181e34b611e8
st/nine: Use ff vertex shader when position_t is used

When an application sets a vertex shader, we are supposed
to use it, and when no vertex shader are set, we are supposed
to revert to fixed function vertex shader.

It seems there is an exception: when the vertex declaration
has a position_t index, we should revert to fixed function
vertex shader.

Up to know we were checking if device->state.vs is set
to know whether to use programmable shader or not.

With this commit we determine whether we use programmable shader
or not when vertex shader/declaration are set, but
stateblocks do complicate things a bit.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/nine_ff.c
src/gallium/state_trackers/nine/nine_state.c
src/gallium/state_trackers/nine/nine_state.h
src/gallium/state_trackers/nine/stateblock9.c
src/gallium/state_trackers/nine/vertexdeclaration9.c
src/gallium/state_trackers/nine/vertexdeclaration9.h