mesa/st: refactor vertex and fragment shader translation
authorKeith Whitwell <keithw@vmware.com>
Sun, 15 Nov 2009 19:15:25 +0000 (11:15 -0800)
committerKeith Whitwell <keithw@vmware.com>
Sun, 15 Nov 2009 19:23:30 +0000 (11:23 -0800)
commit07fafc7c9346aa260829603bf3188596481e9e62
treed0b4d9730b63db91b9f52f537c4e2f80ddc980da
parent1454f20a991ddda35f1a2ffda953012078b407ba
mesa/st: refactor vertex and fragment shader translation

Translate vertex shaders independently of fragment shaders.

Previously tried to make fragment shader semantic indexes always start
at zero and exclude holes.  This was unnecessary but meant that vertex
shader translation had to be adjusted to take this into account.

Now use a fixed scheme for labelling special FS input semantics
(color, etc), and another fixed scheme for the generics.

With this, vertex shaders can be translated independently of the bound
fragment shader, assuming mesa has done its own job and ensured that
the vertex shader provides at least the inputs the fragment shader is
looking for.  The state-tracker didn't attempt to do anything about
this previously, so it shouldn't be needed now.
12 files changed:
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom.h
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_context.h
src/mesa/state_tracker/st_debug.c
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_draw_feedback.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h