summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-10-18 18:42:51 +0100
committerChad Versace <chad@chad-versace.us>2011-10-18 11:15:05 -0700
commit986319cd20cfb39e0e3b37eb093f127063264dca (patch)
tree6253b83945c4f4e082f944a58a4131b009c60791
parentc3fd76ce092a0c6aa6b5c466f61619511dbb2349 (diff)
meta: Fix saving the active program
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> (cherry picked from commit 5625f78cd7e69aa90495d34088a47aa71d076fd2)
-rw-r--r--src/mesa/drivers/common/meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 95044d21eb7..a578797955f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -471,7 +471,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);
}