summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-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 bdfdfd1704..4654ab1ddf 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;