Translate mesa vertex/fragment programs to TGSI programs at same time to do proper...
authorBrian <brian.paul@tungstengraphics.com>
Tue, 25 Sep 2007 20:29:11 +0000 (14:29 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 25 Sep 2007 20:29:11 +0000 (14:29 -0600)
commit40c543eb71368c646259afb87d5c76551f6b45b7
tree1e0c89610cc347607580fb4044e08bb0a060739e
parentf9ed2fdaace0d4d7f091a4423a8638945e920b0d
Translate mesa vertex/fragment programs to TGSI programs at same time to do proper linking.

Previously, programs were translated independently during validation.
The problem is the translation to TGSI format, which packs shader
input/outputs into continuous slots, depends on which vertex program is
being paired with which fragment shader.  Now, we look at the outputs
of the vertex program in conjunction with the inputs of the fragment shader
to be sure the attributes match up correctly.

The new 'linked_program_pair' class keeps track of the associations
between vertex and fragment shaders.  It's also the place where the TGSI
tokens are kept since they're no longer per-program state but per-linkage.

Still a few loose ends, like implementing some kind of hash/lookup table
for linked_program_pairs.
14 files changed:
src/mesa/pipe/draw/draw_feedback.c
src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
src/mesa/sources
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom.h
src/mesa/state_tracker/st_atom_fs.c
src/mesa/state_tracker/st_atom_vs.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_feedback.c
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_cb_rasterpos.c
src/mesa/state_tracker/st_context.h
src/mesa/state_tracker/st_program.h