summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-02-29 11:15:02 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-02-29 11:16:21 +0800
commitde1e9880f8b239768293f7f434a9117dfab20162 (patch)
tree3ce4afb917c39795b0593f3d164802585680cb52 /src/mesa/drivers/dri/i965/brw_context.c
parentb39f15b88f4ef585f260db689294c12b1aee41f2 (diff)
i965: use _Current pointer instead of Current pointer.
fix double free issue(bug#14710). It also corrects glsl/bitmap demo behavior.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 349b8be49b..1601f6dd24 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -54,25 +54,7 @@
static void brwUseProgram(GLcontext *ctx, GLuint program)
{
- struct brw_context *brw = brw_context(ctx);
- struct gl_shader_program *sh_prog;
- _mesa_use_program(ctx, program);
- sh_prog = ctx->Shader.CurrentProgram;
- if (sh_prog) {
- if (sh_prog->VertexProgram) {
- brw->attribs.VertexProgram->Current = sh_prog->VertexProgram;
- sh_prog->VertexProgram->Base.RefCount++;
- ctx->VertexProgram.Enabled = GL_TRUE;
- }else
- ctx->VertexProgram.Enabled = GL_FALSE;
-
- if (sh_prog->FragmentProgram) {
- brw->attribs.FragmentProgram->Current = sh_prog->FragmentProgram;
- sh_prog->FragmentProgram->Base.RefCount++;
- ctx->FragmentProgram.Enabled = GL_TRUE;
- } else
- ctx->FragmentProgram.Enabled = GL_FALSE;
- }
+ _mesa_use_program(ctx, program);
}
static void brwInitProgFuncs( struct dd_function_table *functions )