summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_variable_refcount.cpp9
-rw-r--r--src/glsl/link_uniform_block_active_visitor.cpp6
-rw-r--r--src/glsl/link_uniform_blocks.cpp3
3 files changed, 8 insertions, 10 deletions
diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp
index f67fe678443..e4d825c454b 100644
--- a/src/glsl/ir_variable_refcount.cpp
+++ b/src/glsl/ir_variable_refcount.cpp
@@ -38,7 +38,8 @@
ir_variable_refcount_visitor::ir_variable_refcount_visitor()
{
this->mem_ctx = ralloc_context(NULL);
- this->ht = _mesa_hash_table_create(NULL, _mesa_key_pointer_equal);
+ this->ht = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
+ _mesa_key_pointer_equal);
}
static void
@@ -70,15 +71,13 @@ ir_variable_refcount_visitor::get_variable_entry(ir_variable *var)
{
assert(var);
- struct hash_entry *e = _mesa_hash_table_search(this->ht,
- _mesa_hash_pointer(var),
- var);
+ struct hash_entry *e = _mesa_hash_table_search(this->ht, var);
if (e)
return (ir_variable_refcount_entry *)e->data;
ir_variable_refcount_entry *entry = new ir_variable_refcount_entry(var);
assert(entry->referenced_count == 0);
- _mesa_hash_table_insert(this->ht, _mesa_hash_pointer(var), var, entry);
+ _mesa_hash_table_insert(this->ht, var, entry);
return entry;
}
diff --git a/src/glsl/link_uniform_block_active_visitor.cpp b/src/glsl/link_uniform_block_active_visitor.cpp
index 9da6a4bba48..292cde343f9 100644
--- a/src/glsl/link_uniform_block_active_visitor.cpp
+++ b/src/glsl/link_uniform_block_active_visitor.cpp
@@ -27,9 +27,8 @@
link_uniform_block_active *
process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
{
- const uint32_t h = _mesa_hash_string(var->get_interface_type()->name);
const hash_entry *const existing_block =
- _mesa_hash_table_search(ht, h, var->get_interface_type()->name);
+ _mesa_hash_table_search(ht, var->get_interface_type()->name);
const glsl_type *const block_type = var->is_interface_instance()
? var->type : var->get_interface_type();
@@ -54,8 +53,7 @@ process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
b->binding = 0;
}
- _mesa_hash_table_insert(ht, h, var->get_interface_type()->name,
- (void *) b);
+ _mesa_hash_table_insert(ht, var->get_interface_type()->name, (void *) b);
return b;
} else {
link_uniform_block_active *const b =
diff --git a/src/glsl/link_uniform_blocks.cpp b/src/glsl/link_uniform_blocks.cpp
index 536fcd45878..f5fc5022e18 100644
--- a/src/glsl/link_uniform_blocks.cpp
+++ b/src/glsl/link_uniform_blocks.cpp
@@ -182,7 +182,8 @@ link_uniform_blocks(void *mem_ctx,
* the hash is organized by block-name.
*/
struct hash_table *block_hash =
- _mesa_hash_table_create(mem_ctx, _mesa_key_string_equal);
+ _mesa_hash_table_create(mem_ctx, _mesa_key_hash_string,
+ _mesa_key_string_equal);
if (block_hash == NULL) {
_mesa_error_no_memory(__func__);