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 2031d556c1b5199983c7019782d439b8af9eb281..9266e73570a1454ba554f62e106d2f96d50b834a 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 72b54b27d9a6a61d2c42adc1b74a1ce3031717a4..126a9e1179d0ee74b4c37d96c68b01e8f078a72a 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);