summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-11-28 09:46:43 +0800
committerXiang, Haihao <[email protected]>2007-11-28 09:46:43 +0800
commitd8fcb504a4d88dc1c4d63fb572fdb7393b8a33aa (patch)
treeba34e988052374f8fd05ef45e2113a6b6a1c71af /src
parent16099c15f5495f22252c6bed655f7f598ebf8001 (diff)
i965: update RefCount when using Vertex/Fragment program.
It makes quake4-demo works well on 965.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
1 files changed, 2 insertions, 0 deletions
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;