summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-10-04 12:41:56 +0100
committerKeith Whitwell <[email protected]>2008-10-04 12:41:56 +0100
commit0370d6b359016790c6b879c2a4b6661adac20dea (patch)
tree65aabb57917312586d320b6b7a3da9a649c38aee /src/mesa/main
parent1680ef869625dc1fe9cf481b180382a34e0738e7 (diff)
mesa: handle vertex program enabled case also in texenvprogram.c
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texenvprogram.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 7cd82f98b0d..ea2ee160e4f 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -204,7 +204,7 @@ static GLuint get_fp_input_mask( GLcontext *ctx )
{
GLuint fp_inputs = 0;
- if (1) {
+ if (!ctx->VertexProgram._Enabled) {
GLuint varying_inputs = ctx->varying_vp_inputs;
/* First look at what values may be computed by the generated
@@ -232,14 +232,13 @@ static GLuint get_fp_input_mask( GLcontext *ctx )
}
else {
/* calculate from vp->outputs */
- GLuint vp_outputs = 0;
+ GLuint vp_outputs = ctx->VertexProgram._Current->Base.OutputsWritten;
if (vp_outputs & (1 << VERT_RESULT_COL0)) fp_inputs |= FRAG_BIT_COL0;
if (vp_outputs & (1 << VERT_RESULT_COL1)) fp_inputs |= FRAG_BIT_COL1;
- fp_inputs |= (((vp_outputs & VERT_RESULT_TEX_ANY)
- << VERT_RESULT_TEX0)
- >> FRAG_ATTRIB_TEX0);
+ fp_inputs |= (((vp_outputs & VERT_RESULT_TEX_ANY) >> VERT_RESULT_TEX0)
+ << FRAG_ATTRIB_TEX0);
}
return fp_inputs;