[Mesa-dev] [PATCH 3/3] glsl/lower_output_reads: remove unused mem_ctx
Nicolai Hähnle
nhaehnle at gmail.com
Thu Nov 17 22:00:10 UTC 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/compiler/glsl/lower_output_reads.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp
index b0045f0..851078b 100644
--- a/src/compiler/glsl/lower_output_reads.cpp
+++ b/src/compiler/glsl/lower_output_reads.cpp
@@ -40,22 +40,20 @@
namespace {
class output_read_remover : public ir_hierarchical_visitor {
protected:
/**
* A hash table mapping from the original ir_variable shader outputs
* (ir_var_shader_out mode) to the new temporaries to be used instead.
*/
hash_table *replacements;
- void *mem_ctx;
-
unsigned stage;
public:
output_read_remover(unsigned stage);
~output_read_remover();
virtual ir_visitor_status visit(class ir_dereference_variable *);
virtual ir_visitor_status visit_leave(class ir_emit_vertex *);
virtual ir_visitor_status visit_leave(class ir_return *);
virtual ir_visitor_status visit_leave(class ir_function_signature *);
};
@@ -73,29 +71,27 @@ public:
static unsigned
hash_table_var_hash(const void *key)
{
const ir_variable * var = static_cast<const ir_variable *>(key);
return _mesa_key_hash_string(var->name);
}
output_read_remover::output_read_remover(unsigned stage)
{
this->stage = stage;
- mem_ctx = ralloc_context(NULL);
replacements = _mesa_hash_table_create(NULL, hash_table_var_hash,
_mesa_key_pointer_equal);
}
output_read_remover::~output_read_remover()
{
_mesa_hash_table_destroy(replacements, NULL);
- ralloc_free(mem_ctx);
}
ir_visitor_status
output_read_remover::visit(ir_dereference_variable *ir)
{
if (ir->var->data.mode != ir_var_shader_out)
return visit_continue;
hash_entry *entry = _mesa_hash_table_search(replacements, ir->var);
ir_variable *temp = entry ? (ir_variable *) entry->data : NULL;
--
2.7.4
More information about the mesa-dev
mailing list