Only vertex program fix, bypass tnl vertex program
authorZou Nan hai <nanhai.zou@intel.com>
Mon, 8 Oct 2007 07:34:03 +0000 (15:34 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Mon, 8 Oct 2007 07:34:03 +0000 (15:34 +0800)
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/main/texenvprogram.c

index 2031d55..9266e73 100644 (file)
@@ -79,7 +79,7 @@ static void brwUseProgram(GLcontext *ctx, GLuint program)
                brw->attribs.FragmentProgram->Current = sh_prog->FragmentProgram;
                ctx->FragmentProgram.Enabled = GL_TRUE;
            } else
-               ctx->VertexProgram.Enabled = GL_FALSE;
+               ctx->FragmentProgram.Enabled = GL_FALSE;
        }
 }
 
index 72b54b2..126a9e1 100644 (file)
@@ -1239,7 +1239,7 @@ _mesa_UpdateTexEnvProgram( GLcontext *ctx )
 
    /* If a conventional fragment program/shader isn't in effect... */
    if (!ctx->FragmentProgram._Enabled &&
-       !ctx->Shader.CurrentProgram) {
+       (!ctx->Shader.CurrentProgram || !ctx->Shader.CurrentProgram->FragmentProgram)) {
       make_state_key(ctx, &key);
       hash = hash_key(&key);