meta: Fix saving the active program
authorNeil Roberts <neil@linux.intel.com>
Tue, 18 Oct 2011 17:42:51 +0000 (18:42 +0100)
committerChad Versace <chad@chad-versace.us>
Tue, 18 Oct 2011 18:12:58 +0000 (11:12 -0700)
When saving the active program in _mesa_meta_begin, it was actually
saving the fragment program instead. This means that if the
application binds a program that only has a vertex shader then when
the meta saved state is restored it will forget the bound program.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41969
Reviewed-by: Chad Versace <chad@chad-versace.us>
src/mesa/drivers/common/meta.c

index a9c7f9aa967131aaa9f618ba510077235e771b52..36bd295ec3ff30085b110a0b453fb70a678c1f92 100644 (file)
@@ -464,7 +464,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
         _mesa_reference_shader_program(ctx, &save->FragmentShader,
                                        ctx->Shader.CurrentFragmentProgram);
         _mesa_reference_shader_program(ctx, &save->ActiveShader,
-                                       ctx->Shader.CurrentFragmentProgram);
+                                       ctx->Shader.ActiveProgram);
 
          _mesa_UseProgramObjectARB(0);
       }