summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-12-17 14:04:03 -0700
committerBrian Paul <[email protected]>2008-12-17 14:04:03 -0700
commitf0b0794b3885a2fdfb168ec4521c7b5e942d3228 (patch)
tree3cba7a8e4d3fa965480e9d1da9a05272ff880276
parent1519b93b7bc519e187d98f99715a01ba866286b1 (diff)
mesa: fix fixed-function test in get_fp_input_mask() - again.
The problem we're solving only occured when there was a user-defined vertex shader but no fragment shader. Check for that case now. Fixes glean api2 vertex array failure.
-rw-r--r--src/mesa/main/texenvprogram.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 1560e97c26d..865ef8f9f89 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -219,6 +219,9 @@ static GLuint translate_tex_src_bit( GLbitfield bit )
*/
static GLbitfield get_fp_input_mask( GLcontext *ctx )
{
+ const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
+ ctx->Shader.CurrentProgram->VertexProgram);
+ const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
GLbitfield fp_inputs = 0x0;
if (ctx->VertexProgram._Overriden) {
@@ -231,10 +234,9 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
else if (ctx->RenderMode == GL_FEEDBACK) {
fp_inputs = (FRAG_BIT_COL0 | FRAG_BIT_TEX0);
}
- else if (!ctx->VertexProgram._Enabled ||
+ else if (!(vertexProgram || vertexShader) ||
!ctx->VertexProgram._Current) {
-
- /* Fixed function logic */
+ /* Fixed function vertex logic */
GLbitfield varying_inputs = ctx->varying_vp_inputs;
/* These get generated in the setup routine regardless of the