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.
This commit is contained in:
Keith Whitwell
2009-11-15 11:15:25 -08:00
parent 1454f20a99
commit 07fafc7c93
12 changed files with 281 additions and 474 deletions

View File

@@ -169,11 +169,6 @@ make_bitmap_fragment_program(GLcontext *ctx, GLuint samplerIndex)
stfp = (struct st_fragment_program *) p;
stfp->Base.UsesKill = GL_TRUE;
/* No need to send this incomplete program down to hardware:
*
* st_translate_fragment_program(ctx->st, stfp, NULL);
*/
return stfp;
}