From d8fcb504a4d88dc1c4d63fb572fdb7393b8a33aa Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 28 Nov 2007 09:46:43 +0800 Subject: [PATCH] i965: update RefCount when using Vertex/Fragment program. It makes quake4-demo works well on 965. --- src/mesa/drivers/dri/i965/brw_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index bdfdfd17043..4654ab1ddfe 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -70,12 +70,14 @@ static void brwUseProgram(GLcontext *ctx, GLuint program) 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; -- 2.30.2