summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-01-12 12:55:06 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-01-24 15:39:46 -0800
commit812a8eade5f8e25bdbea95d7c1e6e8b42af07d79 (patch)
tree3f56a6c10fbdf10b4726e2912a07993ceaa29457
parent230f6e7ddc643e3c1aade95bf6e1934e3dff9061 (diff)
i965: Fix refcount leak of the gl_program structure.
Fixes a leak of almost 200kb on a minimal shader_runner program (algebraic-add-add-1). NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit b2be4869624443cd9769bd696b11dd587494b62a)
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index ef0f09d9ebb..aa1bfdbd230 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -229,6 +229,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
* program constant) has to happen before creating this linkage.
*/
_mesa_associate_uniform_storage(ctx, shProg, prog->Parameters);
+
+ _mesa_reference_program(ctx, &prog, NULL);
}
if (!brw_shader_precompile(ctx, shProg))