Use linked fragment shader inputs (if present) to determine which outputs are needed.

This commit is contained in:
Brian 2007-10-09 14:12:26 -06:00
parent 1a69db9d2d
commit 94490f63c8

View file

@ -118,10 +118,17 @@ static struct state_key *make_state_key( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
const struct gl_fragment_program *fp;
struct state_key *key = CALLOC_STRUCT(state_key);
GLuint i;
if (ctx->Shader.CurrentProgram &&
ctx->Shader.CurrentProgram->LinkStatus &&
ctx->Shader.CurrentProgram->FragmentProgram)
fp = ctx->Shader.CurrentProgram->FragmentProgram;
else
fp = ctx->FragmentProgram._Current;
/* This now relies on texenvprogram.c being active:
*/
assert(fp);