[Mesa-dev] [PATCH] mesa: Fix save/restore of ActiveProgram in meta-ops
Chad Versace
chad at chad-versace.us
Tue Sep 20 12:01:56 PDT 2011
The mismatch below caused ActiveProgram to be incorrectly saved/restored:
_meas_meta_begin:
line 465) ActiveShader := gl_shader_state::CurrentFragmentProgram
_mesa_meta_end:
line 741) gl_shader_state::ActiveProgram := ActiveShader
This patch fixes it to be:
_meas_meta_begin:
line 465) ActiveShader := gl_shader_state::ActiveProgram
_mesa_meta_end:
line 741) gl_shader_state::ActiveProgram := ActiveShader
I discovered this bug by inspection.
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
src/mesa/drivers/common/meta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1b71aa1..2ac81ac 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -463,7 +463,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);
}
--
1.7.6
More information about the mesa-dev
mailing list