aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/atifragshader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index a9356ae95b1..71c8ce5efdf 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -411,7 +411,10 @@ _mesa_EndFragmentShaderATI(void)
if (ctx->Driver.NewATIfs) {
struct gl_program *prog = ctx->Driver.NewATIfs(ctx,
ctx->ATIFragmentShader.Current);
- _mesa_reference_program(ctx, &ctx->ATIFragmentShader.Current->Program, prog);
+ _mesa_reference_program(ctx, &ctx->ATIFragmentShader.Current->Program,
+ NULL);
+ /* Don't use _mesa_reference_program(), just take ownership */
+ ctx->ATIFragmentShader.Current->Program = prog;
}
if (!ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_SHADER_ATI,