mesa: rework vertex shader output / fragment shader input attribute matching
authorBrian Paul <brianp@vmware.com>
Thu, 11 Jun 2009 20:55:25 +0000 (14:55 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 11 Jun 2009 20:58:25 +0000 (14:58 -0600)
commit3754c4135cb29e23bd81d573af458742e9a624b2
tree6ccfe766e6519659d2907368c058728c6f4ef15b
parent322e8556b91ceb80d4a53129cbb5db99087085f1
mesa: rework vertex shader output / fragment shader input attribute matching

Before, if a vertex shader's outputs didn't exactly match a fragment
shader's inputs we could wind up with invalid TGSI shader declarations.
For example:

Before patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[0] <- note duplicate [0]
DCL OUT[4], GENERIC[2]

After patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[1]
DCL OUT[4], GENERIC[2]
src/mesa/state_tracker/st_atom_shader.c