diff options
author | Brian <[email protected]> | 2007-10-09 14:12:26 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-09 14:12:26 -0600 |
commit | 94490f63c8294efbce8822cf2be6da9be67c8789 (patch) | |
tree | 4c2ee27bca764fcd38240ced2325a5810ab99543 /src/mesa/tnl | |
parent | 1a69db9d2dfae16df5aa606ada7d631d98944449 (diff) |
Use linked fragment shader inputs (if present) to determine which outputs are needed.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vp_build.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index f923b8e1326..b28102b1b91 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -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); |