summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-12-17 19:01:34 -0700
committerBrian Paul <[email protected]>2008-12-17 19:05:26 -0700
commitf9c76750a7687e9902f2efd91d5551ae0128003c (patch)
tree3befe541b2835792d2cc4e6c837881e11326b2f2 /src/mesa/main
parentb890fffbf4ad435ef533988d288e98b0bfe4d17b (diff)
mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
This is a work-around the for the fact that we do fragment shader state validation before vertex shader validation (see comments in state.c) so in get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to date yet. This fixes a glean glsl1 test failure.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texenvprogram.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 75f5baa3e18..64b2ab6c135 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -258,7 +258,19 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
}
else {
/* calculate from vp->outputs */
- GLbitfield vp_outputs = ctx->VertexProgram._Current->Base.OutputsWritten;
+ struct gl_vertex_program *vprog;
+ GLbitfield vp_outputs;
+
+ /* Choose GLSL vertex shader over ARB vertex program. Need this
+ * since vertex shader state validation comes after fragment state
+ * validation (see additional comments in state.c).
+ */
+ if (vertexShader)
+ vprog = ctx->Shader.CurrentProgram->VertexProgram;
+ else
+ vprog = ctx->VertexProgram._Current;
+
+ vp_outputs = vprog->Base.OutputsWritten;
/* These get generated in the setup routine regardless of the
* vertex program: