summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-03-26 15:58:12 -0700
committerMatt Turner <mattst88@gmail.com>2014-04-05 09:44:54 -0700
commit63d57f3b086db1e403df5d8f61a368df5e2f5afc (patch)
tree852607e608ed6e771f657f30a972e879ecf226b4 /src/mesa/drivers/dri/i965/brw_fs_cse.cpp
parent26012c16737a8542316062ef17fa9a0b34e274b7 (diff)
i965/fs: Name temporary ralloc contexts something other than mem_ctx.
Or else poor programmers might mistakenly use the temporary mem_ctx, instead of the fs_visitor's mem_ctx and wonder why their code is crashing. Also remove the parenting. These contexts are local to the optimization passes they're in and are freed at the end.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_cse.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index d8a54346a0..ea610bd554 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -121,7 +121,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
{
bool progress = false;
- void *mem_ctx = ralloc_context(this->mem_ctx);
+ void *cse_ctx = ralloc_context(NULL);
int ip = block->start_ip;
for (fs_inst *inst = (fs_inst *)block->start;
@@ -148,7 +148,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
if (!found) {
/* Our first sighting of this expression. Create an entry. */
- aeb_entry *entry = ralloc(mem_ctx, aeb_entry);
+ aeb_entry *entry = ralloc(cse_ctx, aeb_entry);
entry->tmp = reg_undef;
entry->generator = inst;
aeb->push_tail(entry);
@@ -254,7 +254,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
ip++;
}
- ralloc_free(mem_ctx);
+ ralloc_free(cse_ctx);
if (progress)
invalidate_live_intervals();