summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-01-12 12:51:34 -0800
committerEric Anholt <[email protected]>2012-01-18 09:59:11 -0800
commitb972744c78e45928876ea781b9eeef09b3baf083 (patch)
tree0c1b8358937df391ae0f28d7f253195409b29999 /src/mesa/drivers
parenta9eda41539bd63ed1835556ad3afc77ee01f6a6a (diff)
mesa: Make the register allocator allocation take a ralloc context.
This fixes a memory leak on i965 context destruction. NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index 3f875cc63d9..d4dd1240b70 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -88,7 +88,7 @@ brw_alloc_reg_set_for_classes(struct brw_context *brw,
ralloc_free(brw->wm.ra_reg_to_grf);
brw->wm.ra_reg_to_grf = ralloc_array(brw, uint8_t, ra_reg_count);
ralloc_free(brw->wm.regs);
- brw->wm.regs = ra_alloc_reg_set(ra_reg_count);
+ brw->wm.regs = ra_alloc_reg_set(brw, ra_reg_count);
ralloc_free(brw->wm.classes);
brw->wm.classes = ralloc_array(brw, int, class_count + 1);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index 1ace91fafef..2efe235bff9 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -108,7 +108,7 @@ brw_alloc_reg_set_for_classes(struct brw_context *brw,
ralloc_free(brw->vs.ra_reg_to_grf);
brw->vs.ra_reg_to_grf = ralloc_array(brw, uint8_t, ra_reg_count);
ralloc_free(brw->vs.regs);
- brw->vs.regs = ra_alloc_reg_set(ra_reg_count);
+ brw->vs.regs = ra_alloc_reg_set(brw, ra_reg_count);
ralloc_free(brw->vs.classes);
brw->vs.classes = ralloc_array(brw, int, class_count + 1);