From: Xiang, Haihao Date: Wed, 28 Nov 2007 01:46:43 +0000 (+0800) Subject: i965: update RefCount when using Vertex/Fragment program. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8fcb504a4d88dc1c4d63fb572fdb7393b8a33aa;p=mesa.git i965: update RefCount when using Vertex/Fragment program. It makes quake4-demo works well on 965. --- 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;