diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-01-11 11:50:53 -0800 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-01-14 10:49:28 -0800 |
commit | 9fdded0cc34b4bdb87923707c05b8ceffb2f174c (patch) | |
tree | b742e0cd4e33cd4766ed9f0b03c5c3eda2470556 /src/compiler/nir | |
parent | ee23e8b17c77fa94320168427fb8a10a84b50e94 (diff) |
src/compiler: use new hash table and set creation helpers
Replace calls to create hash tables and sets that use
_mesa_hash_pointer/_mesa_key_pointer_equal with the helpers
_mesa_pointer_hash_table_create() and _mesa_pointer_set_create().
Reviewed-by: Jason Ekstrand <[email protected]>
Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.c | 6 | ||||
-rw-r--r-- | src/compiler/nir/nir_clone.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_deref.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_from_ssa.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_inline_functions.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_linking_helpers.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_global_vars_to_local.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_io_arrays_to_elements.c | 16 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_io_to_scalar.c | 8 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_phis_to_scalar.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_vars_to_ssa.c | 13 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_copy_prop_vars.c | 6 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_loop_unroll.c | 8 | ||||
-rw-r--r-- | src/compiler/nir/nir_print.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_propagate_invariant.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_remove_dead_variables.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_serialize.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_split_per_member_structs.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_split_vars.c | 17 | ||||
-rw-r--r-- | src/compiler/nir/nir_validate.c | 27 |
20 files changed, 42 insertions, 97 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 3345266fa69..1fc09d9c250 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -330,8 +330,7 @@ nir_block_create(nir_shader *shader) cf_init(&block->cf_node, nir_cf_node_block); block->successors[0] = block->successors[1] = NULL; - block->predecessors = _mesa_set_create(block, _mesa_hash_pointer, - _mesa_key_pointer_equal); + block->predecessors = _mesa_pointer_set_create(block); block->imm_dom = NULL; /* XXX maybe it would be worth it to defer allocation? This * way it doesn't get allocated for shader refs that never run @@ -341,8 +340,7 @@ nir_block_create(nir_shader *shader) * which is later used to do state specific lowering and futher * opt. Do any of the references not need dominance metadata? */ - block->dom_frontier = _mesa_set_create(block, _mesa_hash_pointer, - _mesa_key_pointer_equal); + block->dom_frontier = _mesa_pointer_set_create(block); exec_list_make_empty(&block->instr_list); diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index c7c41ef5c6b..557c7d29f53 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -62,8 +62,7 @@ init_clone_state(clone_state *state, struct hash_table *remap_table, if (remap_table) { state->remap_table = remap_table; } else { - state->remap_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state->remap_table = _mesa_pointer_hash_table_create(NULL); } list_inithead(&state->phi_srcs); diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index 26de64c5140..513e8242d7c 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -474,8 +474,7 @@ rematerialize_deref_in_block(nir_deref_instr *deref, return deref; if (!state->cache) { - state->cache = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state->cache = _mesa_pointer_hash_table_create(NULL); } struct hash_entry *cached = _mesa_hash_table_search(state->cache, deref); diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index 8419b28576b..99cfe757477 100644 --- a/src/compiler/nir/nir_from_ssa.c +++ b/src/compiler/nir/nir_from_ssa.c @@ -768,8 +768,7 @@ nir_convert_from_ssa_impl(nir_function_impl *impl, bool phi_webs_only) nir_builder_init(&state.builder, impl); state.dead_ctx = ralloc_context(NULL); state.phi_webs_only = phi_webs_only; - state.merge_node_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state.merge_node_table = _mesa_pointer_hash_table_create(NULL); state.progress = false; nir_foreach_block(block, impl) { diff --git a/src/compiler/nir/nir_inline_functions.c b/src/compiler/nir/nir_inline_functions.c index 74d39db7ab2..4e0bb8fcba1 100644 --- a/src/compiler/nir/nir_inline_functions.c +++ b/src/compiler/nir/nir_inline_functions.c @@ -209,8 +209,7 @@ inline_function_impl(nir_function_impl *impl, struct set *inlined) bool nir_inline_functions(nir_shader *shader) { - struct set *inlined = _mesa_set_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct set *inlined = _mesa_pointer_set_create(NULL); bool progress = false; nir_foreach_function(function, shader) { diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c index 2e89aa7dd19..b85e1295da3 100644 --- a/src/compiler/nir/nir_linking_helpers.c +++ b/src/compiler/nir/nir_linking_helpers.c @@ -712,9 +712,7 @@ nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer) nir_function_impl *impl = nir_shader_get_entrypoint(producer); - struct hash_table *varying_values = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *varying_values = _mesa_pointer_hash_table_create(NULL); /* If we find a store in the last block of the producer we can be sure this * is the only possible value for this output. diff --git a/src/compiler/nir/nir_lower_global_vars_to_local.c b/src/compiler/nir/nir_lower_global_vars_to_local.c index 1ca7c1996a3..9eb76c7ed6c 100644 --- a/src/compiler/nir/nir_lower_global_vars_to_local.c +++ b/src/compiler/nir/nir_lower_global_vars_to_local.c @@ -74,9 +74,7 @@ nir_lower_global_vars_to_local(nir_shader *shader) * nir_function_impl that uses the given variable. If a variable is * used in multiple functions, the data for the given key will be NULL. */ - struct hash_table *var_func_table = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *var_func_table = _mesa_pointer_hash_table_create(NULL); nir_foreach_function(function, shader) { if (function->impl) { diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c index 34020249199..9051d397fbc 100644 --- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c +++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c @@ -343,12 +343,8 @@ void nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader, bool outputs_only) { - struct hash_table *split_inputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); - struct hash_table *split_outputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *split_inputs = _mesa_pointer_hash_table_create(NULL); + struct hash_table *split_outputs = _mesa_pointer_hash_table_create(NULL); uint64_t indirects[4] = {0}, patch_indirects[4] = {0}; @@ -385,12 +381,8 @@ nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader, void nir_lower_io_arrays_to_elements(nir_shader *producer, nir_shader *consumer) { - struct hash_table *split_inputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); - struct hash_table *split_outputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *split_inputs = _mesa_pointer_hash_table_create(NULL); + struct hash_table *split_outputs = _mesa_pointer_hash_table_create(NULL); uint64_t indirects[4] = {0}, patch_indirects[4] = {0}; create_indirects_mask(producer, indirects, patch_indirects, diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c index d58805294b5..e9135b56ffd 100644 --- a/src/compiler/nir/nir_lower_io_to_scalar.c +++ b/src/compiler/nir/nir_lower_io_to_scalar.c @@ -279,12 +279,8 @@ lower_store_output_to_scalar_early(nir_builder *b, nir_intrinsic_instr *intr, void nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask) { - struct hash_table *split_inputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); - struct hash_table *split_outputs = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *split_inputs = _mesa_pointer_hash_table_create(NULL); + struct hash_table *split_outputs = _mesa_pointer_hash_table_create(NULL); nir_foreach_function(function, shader) { if (function->impl) { diff --git a/src/compiler/nir/nir_lower_phis_to_scalar.c b/src/compiler/nir/nir_lower_phis_to_scalar.c index 904eff0d828..3d7155c04f6 100644 --- a/src/compiler/nir/nir_lower_phis_to_scalar.c +++ b/src/compiler/nir/nir_lower_phis_to_scalar.c @@ -275,8 +275,7 @@ lower_phis_to_scalar_impl(nir_function_impl *impl) state.mem_ctx = ralloc_parent(impl); state.dead_ctx = ralloc_context(NULL); - state.phi_table = _mesa_hash_table_create(state.dead_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state.phi_table = _mesa_pointer_hash_table_create(state.dead_ctx); nir_foreach_block(block, impl) { progress = lower_phis_to_scalar_block(block, &state) || progress; diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index 9c8f75f1083..62f9ad8bcca 100644 --- a/src/compiler/nir/nir_lower_vars_to_ssa.c +++ b/src/compiler/nir/nir_lower_vars_to_ssa.c @@ -376,8 +376,7 @@ register_load_instr(nir_intrinsic_instr *load_instr, return; if (node->loads == NULL) - node->loads = _mesa_set_create(state->dead_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + node->loads = _mesa_pointer_set_create(state->dead_ctx); _mesa_set_add(node->loads, load_instr); } @@ -392,8 +391,7 @@ register_store_instr(nir_intrinsic_instr *store_instr, return; if (node->stores == NULL) - node->stores = _mesa_set_create(state->dead_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + node->stores = _mesa_pointer_set_create(state->dead_ctx); _mesa_set_add(node->stores, store_instr); } @@ -409,8 +407,7 @@ register_copy_instr(nir_intrinsic_instr *copy_instr, continue; if (node->copies == NULL) - node->copies = _mesa_set_create(state->dead_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + node->copies = _mesa_pointer_set_create(state->dead_ctx); _mesa_set_add(node->copies, copy_instr); } @@ -661,9 +658,7 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl) state.dead_ctx = ralloc_context(state.shader); state.impl = impl; - state.deref_var_nodes = _mesa_hash_table_create(state.dead_ctx, - _mesa_hash_pointer, - _mesa_key_pointer_equal); + state.deref_var_nodes = _mesa_pointer_hash_table_create(state.dead_ctx); exec_list_make_empty(&state.direct_deref_nodes); /* Build the initial deref structures and direct_deref_nodes table */ diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index 069fcad7199..3dc0ad80573 100644 --- a/src/compiler/nir/nir_opt_copy_prop_vars.c +++ b/src/compiler/nir/nir_opt_copy_prop_vars.c @@ -106,8 +106,7 @@ create_vars_written(struct copy_prop_var_state *state) { struct vars_written *written = linear_zalloc_child(state->lin_ctx, sizeof(struct vars_written)); - written->derefs = _mesa_hash_table_create(state->mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + written->derefs = _mesa_pointer_hash_table_create(state->mem_ctx); return written; } @@ -865,8 +864,7 @@ nir_copy_prop_vars_impl(nir_function_impl *impl) .mem_ctx = mem_ctx, .lin_ctx = linear_zalloc_parent(mem_ctx, 0), - .vars_written_map = _mesa_hash_table_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal), + .vars_written_map = _mesa_pointer_hash_table_create(mem_ctx), }; gather_vars_written(&state, NULL, &impl->cf_node); diff --git a/src/compiler/nir/nir_opt_loop_unroll.c b/src/compiler/nir/nir_opt_loop_unroll.c index 8406880204a..e599005083b 100644 --- a/src/compiler/nir/nir_opt_loop_unroll.c +++ b/src/compiler/nir/nir_opt_loop_unroll.c @@ -165,9 +165,7 @@ simple_unroll(nir_loop *loop) nir_cf_extract(&loop_body, nir_after_cf_node(&limiting_term->nif->cf_node), nir_after_block(nir_loop_last_block(loop))); - struct hash_table *remap_table = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *remap_table = _mesa_pointer_hash_table_create(NULL); /* Clone the loop header and insert before the loop */ nir_cf_list_clone_and_reinsert(&lp_header, loop->cf_node.parent, @@ -417,9 +415,7 @@ complex_unroll(nir_loop *loop, nir_loop_terminator *unlimit_term, num_times_to_clone = loop->info->max_trip_count; } - struct hash_table *remap_table = - _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *remap_table = _mesa_pointer_hash_table_create(NULL); nir_cf_list lp_body; nir_cf_node *unroll_loc = diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index cfbc8be7a2c..88a82b1ef17 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1318,8 +1318,7 @@ init_print_state(print_state *state, nir_shader *shader, FILE *fp) { state->fp = fp; state->shader = shader; - state->ht = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state->ht = _mesa_pointer_hash_table_create(NULL); state->syms = _mesa_set_create(NULL, _mesa_key_hash_string, _mesa_key_string_equal); state->index = 0; diff --git a/src/compiler/nir/nir_propagate_invariant.c b/src/compiler/nir/nir_propagate_invariant.c index 7e253492ba8..103b2422b83 100644 --- a/src/compiler/nir/nir_propagate_invariant.c +++ b/src/compiler/nir/nir_propagate_invariant.c @@ -182,8 +182,7 @@ bool nir_propagate_invariant(nir_shader *shader) { /* Hash set of invariant things */ - struct set *invariants = _mesa_set_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct set *invariants = _mesa_pointer_set_create(NULL); bool progress = false; nir_foreach_function(function, shader) { diff --git a/src/compiler/nir/nir_remove_dead_variables.c b/src/compiler/nir/nir_remove_dead_variables.c index a8a347b6a67..5c345bdb854 100644 --- a/src/compiler/nir/nir_remove_dead_variables.c +++ b/src/compiler/nir/nir_remove_dead_variables.c @@ -164,8 +164,7 @@ bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes) { bool progress = false; - struct set *live = - _mesa_set_create(NULL, _mesa_hash_pointer, _mesa_key_pointer_equal); + struct set *live = _mesa_pointer_set_create(NULL); add_var_use_shader(shader, live, modes); diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c index 808df193754..743eeaed3d5 100644 --- a/src/compiler/nir/nir_serialize.c +++ b/src/compiler/nir/nir_serialize.c @@ -1082,8 +1082,7 @@ void nir_serialize(struct blob *blob, const nir_shader *nir) { write_ctx ctx; - ctx.remap_table = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + ctx.remap_table = _mesa_pointer_hash_table_create(NULL); ctx.next_idx = 0; ctx.blob = blob; ctx.nir = nir; diff --git a/src/compiler/nir/nir_split_per_member_structs.c b/src/compiler/nir/nir_split_per_member_structs.c index c1234c2e92a..1c148d3d63e 100644 --- a/src/compiler/nir/nir_split_per_member_structs.c +++ b/src/compiler/nir/nir_split_per_member_structs.c @@ -175,8 +175,7 @@ nir_split_per_member_structs(nir_shader *shader) bool progress = false; void *dead_ctx = ralloc_context(NULL); struct hash_table *var_to_member_map = - _mesa_hash_table_create(dead_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + _mesa_pointer_hash_table_create(dead_ctx); progress |= split_variables_in_list(&shader->inputs, shader, var_to_member_map, dead_ctx); diff --git a/src/compiler/nir/nir_split_vars.c b/src/compiler/nir/nir_split_vars.c index 5044d29f146..0cf3e517f85 100644 --- a/src/compiler/nir/nir_split_vars.c +++ b/src/compiler/nir/nir_split_vars.c @@ -257,8 +257,7 @@ nir_split_struct_vars(nir_shader *shader, nir_variable_mode modes) { void *mem_ctx = ralloc_context(NULL); struct hash_table *var_field_map = - _mesa_hash_table_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + _mesa_pointer_hash_table_create(mem_ctx); assert((modes & (nir_var_private | nir_var_function)) == modes); @@ -793,9 +792,7 @@ bool nir_split_array_vars(nir_shader *shader, nir_variable_mode modes) { void *mem_ctx = ralloc_context(NULL); - struct hash_table *var_info_map = - _mesa_hash_table_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + struct hash_table *var_info_map = _mesa_pointer_hash_table_create(mem_ctx); assert((modes & (nir_var_private | nir_var_function)) == modes); @@ -973,8 +970,7 @@ mark_deref_used(nir_deref_instr *deref, true, mem_ctx); if (copy_usage) { if (usage->vars_copied == NULL) { - usage->vars_copied = _mesa_set_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + usage->vars_copied = _mesa_pointer_set_create(mem_ctx); } _mesa_set_add(usage->vars_copied, copy_usage); } else { @@ -1016,9 +1012,7 @@ mark_deref_used(nir_deref_instr *deref, ©_usage->levels[copy_i++]; if (level->levels_copied == NULL) { - level->levels_copied = - _mesa_set_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + level->levels_copied = _mesa_pointer_set_create(mem_ctx); } _mesa_set_add(level->levels_copied, copy_level); } else { @@ -1523,8 +1517,7 @@ nir_shrink_vec_array_vars(nir_shader *shader, nir_variable_mode modes) void *mem_ctx = ralloc_context(NULL); struct hash_table *var_usage_map = - _mesa_hash_table_create(mem_ctx, _mesa_hash_pointer, - _mesa_key_pointer_equal); + _mesa_pointer_hash_table_create(mem_ctx); bool has_vars_to_shrink = false; nir_foreach_function(function, shader) { diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index f506b54d3b5..c9732edda14 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -300,10 +300,8 @@ validate_ssa_def(nir_ssa_def *def, validate_state *state) ssa_def_validate_state *def_state = ralloc(state->ssa_defs, ssa_def_validate_state); def_state->where_defined = state->impl; - def_state->uses = _mesa_set_create(def_state, _mesa_hash_pointer, - _mesa_key_pointer_equal); - def_state->if_uses = _mesa_set_create(def_state, _mesa_hash_pointer, - _mesa_key_pointer_equal); + def_state->uses = _mesa_pointer_set_create(def_state); + def_state->if_uses = _mesa_pointer_set_create(def_state); _mesa_hash_table_insert(state->ssa_defs, def, def_state); } @@ -927,12 +925,9 @@ prevalidate_reg_decl(nir_register *reg, bool is_global, validate_state *state) list_validate(®->if_uses); reg_validate_state *reg_state = ralloc(state->regs, reg_validate_state); - reg_state->uses = _mesa_set_create(reg_state, _mesa_hash_pointer, - _mesa_key_pointer_equal); - reg_state->if_uses = _mesa_set_create(reg_state, _mesa_hash_pointer, - _mesa_key_pointer_equal); - reg_state->defs = _mesa_set_create(reg_state, _mesa_hash_pointer, - _mesa_key_pointer_equal); + reg_state->uses = _mesa_pointer_set_create(reg_state); + reg_state->if_uses = _mesa_pointer_set_create(reg_state); + reg_state->defs = _mesa_pointer_set_create(reg_state); reg_state->where_defined = is_global ? NULL : state->impl; @@ -1132,16 +1127,12 @@ validate_function(nir_function *func, validate_state *state) static void init_validate_state(validate_state *state) { - state->regs = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); - state->ssa_defs = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state->regs = _mesa_pointer_hash_table_create(NULL); + state->ssa_defs = _mesa_pointer_hash_table_create(NULL); state->ssa_defs_found = NULL; state->regs_found = NULL; - state->var_defs = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); - state->errors = _mesa_hash_table_create(NULL, _mesa_hash_pointer, - _mesa_key_pointer_equal); + state->var_defs = _mesa_pointer_hash_table_create(NULL); + state->errors = _mesa_pointer_hash_table_create(NULL); state->loop = NULL; state->instr = NULL; |