static void phi_post_pass(struct ac_nir_context *ctx)
{
- struct hash_entry *entry;
hash_table_foreach(ctx->phis, entry) {
visit_post_phi(ctx, (nir_phi_instr*)entry->key,
(LLVMValueRef)entry->data);
static void
sf_state_clear(struct hash_table *partial_update_ht)
{
- struct hash_entry *entry;
-
hash_table_foreach(partial_update_ht, entry) {
struct partial_update_state *state = entry->data;
*/
uint32_t max_count = 0;
uint32_t max_index = 0;
- struct hash_entry *entry;
hash_table_foreach(ht, entry) {
uint32_t count = (uintptr_t)entry->data;
uint32_t index = (uintptr_t)entry->key - 1;
* if default should be chosen or not.
*/
if (!default_case.is_empty()) {
- struct hash_entry *entry;
ir_factory body(instructions, state);
ir_expression *cmp = NULL;
ctx->Const.UseSTD430AsDefaultPacking);
unsigned i = 0;
- struct hash_entry *entry;
hash_table_foreach (block_hash, entry) {
const struct link_uniform_block_active *const b =
(const struct link_uniform_block_active *) entry->data;
unsigned num_ubo_variables = 0;
unsigned num_ssbo_variables = 0;
count_block_size block_size;
- struct hash_entry *entry;
hash_table_foreach (block_hash, entry) {
struct link_uniform_block_active *const b =
acp->make_empty();
killed_all = true;
} else {
- hash_entry *htk;
hash_table_foreach(new_kills, htk)
kill((ir_variable *) htk->key, (uintptr_t) htk->data);
}
this->acp = orig_acp;
this->killed_all = this->killed_all || orig_killed_all;
- hash_entry *htk;
hash_table_foreach(new_kills, htk) {
kill((ir_variable *) htk->key, (uintptr_t) htk->data);
}
_mesa_key_pointer_equal);
v.run(instructions);
- struct hash_entry *hte;
hash_table_foreach(v.ht, hte) {
struct assignment_entry *entry = (struct assignment_entry *) hte->data;
v.run(instructions);
- struct hash_entry *e;
hash_table_foreach(v.ht, e) {
ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)e->data;
va_end(args);
- struct hash_entry *entry;
hash_table_foreach(ht, entry) {
const ir_instruction *const ir = (ir_instruction *) entry->key;
const ir_variable *const v = ir->as_variable();
}
}
- struct hash_entry *entry;
hash_table_foreach(var_func_table, entry) {
nir_variable *var = (void *)entry->key;
nir_function_impl *impl = entry->data;
patch_indirects, split_inputs, true);
/* Remove old input from the shaders inputs list */
- struct hash_entry *entry;
hash_table_foreach(split_inputs, entry) {
nir_variable *var = (nir_variable *) entry->key;
exec_node_remove(&var->node);
}
/* Remove old output from the shaders outputs list */
- struct hash_entry *entry;
hash_table_foreach(split_outputs, entry) {
nir_variable *var = (nir_variable *) entry->key;
exec_node_remove(&var->node);
patch_indirects, split_inputs, false);
/* Remove old input from the shaders inputs list */
- struct hash_entry *entry;
hash_table_foreach(split_inputs, entry) {
nir_variable *var = (nir_variable *) entry->key;
exec_node_remove(&var->node);
}
/* Remove old input from the shaders inputs list */
- struct hash_entry *entry;
hash_table_foreach(split_inputs, entry) {
nir_variable *var = (nir_variable *) entry->key;
exec_node_remove(&var->node);
/* Merge new information to the parent control flow node. */
if (written) {
written->modes |= new_written->modes;
- struct hash_entry *new_entry;
hash_table_foreach(new_written->derefs, new_entry) {
struct hash_entry *old_entry =
_mesa_hash_table_search_pre_hashed(written->derefs, new_entry->hash,
}
}
- struct hash_entry *entry;
hash_table_foreach (written->derefs, entry) {
nir_deref_instr *deref_written = (nir_deref_instr *)entry->key;
kill_aliases(copies, deref_written, (uintptr_t)entry->data);
}
}
- struct set_entry *entry;
set_foreach(block->predecessors, entry) {
const nir_block *pred = entry->key;
validate_assert(state, pred->successors[0] == block ||
if (reg_state->uses->entries != 0) {
printf("extra entries in register uses:\n");
- struct set_entry *entry;
set_foreach(reg_state->uses, entry)
printf("%p\n", entry->key);
if (reg_state->if_uses->entries != 0) {
printf("extra entries in register if_uses:\n");
- struct set_entry *entry;
set_foreach(reg_state->if_uses, entry)
printf("%p\n", entry->key);
if (reg_state->defs->entries != 0) {
printf("extra entries in register defs:\n");
- struct set_entry *entry;
set_foreach(reg_state->defs, entry)
printf("%p\n", entry->key);
if (def_state->uses->entries != 0) {
printf("extra entries in SSA def uses:\n");
- struct set_entry *entry;
set_foreach(def_state->uses, entry)
printf("%p\n", entry->key);
if (def_state->if_uses->entries != 0) {
printf("extra entries in SSA def uses:\n");
- struct set_entry *entry;
set_foreach(def_state->if_uses, entry)
printf("%p\n", entry->key);
if (_mesa_hash_table_num_entries(errors) > 0) {
fprintf(stderr, "%d additional errors:\n",
_mesa_hash_table_num_entries(errors));
- struct hash_entry *entry;
hash_table_foreach(errors, entry) {
fprintf(stderr, "%s\n", (char *)entry->data);
}
struct fd6_context *fd6_ctx = fd6_context(fd_context(pctx));
struct fd6_sampler_stateobj *samp = hwcso;
- struct hash_entry *entry;
hash_table_foreach(fd6_ctx->tex_cache, entry) {
struct fd6_texture_state *state = entry->data;
struct fd6_context *fd6_ctx = fd6_context(fd_context(pctx));
struct fd6_pipe_sampler_view *view = fd6_pipe_sampler_view(_view);
- struct hash_entry *entry;
hash_table_foreach(fd6_ctx->tex_cache, entry) {
struct fd6_texture_state *state = entry->data;
{
struct fd6_context *fd6_ctx = fd6_context(fd_context(pctx));
- struct hash_entry *entry;
hash_table_foreach(fd6_ctx->tex_cache, entry) {
fd6_texture_state_destroy(entry->data);
}
void ir3_cache_destroy(struct ir3_cache *cache)
{
/* _mesa_hash_table_destroy is so *almost* useful.. */
- struct hash_entry *entry;
hash_table_foreach(cache->ht, entry) {
cache->funcs->destroy_state(cache->data, entry->data);
}
*/
void ir3_cache_invalidate(struct ir3_cache *cache, void *stobj)
{
- struct hash_entry *entry;
hash_table_foreach(cache->ht, entry) {
const struct ir3_cache_key *key = entry->key;
if ((key->fs == stobj) || (key->vs == stobj)) {
{
struct v3d_context *v3d = v3d_context(pctx);
- struct hash_entry *entry;
hash_table_foreach(v3d->jobs, entry) {
struct v3d_job *job = entry->data;
v3d_job_submit(v3d, job);
static void
v3d_job_free(struct v3d_context *v3d, struct v3d_job *job)
{
- struct set_entry *entry;
-
set_foreach(job->bos, entry) {
struct v3d_bo *bo = (struct v3d_bo *)entry->key;
v3d_bo_unreference(&bo);
remove_from_ht(v3d->jobs, &job->key);
if (job->write_prscs) {
- struct set_entry *entry;
-
set_foreach(job->write_prscs, entry) {
const struct pipe_resource *prsc = entry->key;
v3d_flush_jobs_writing_resource(v3d, prsc);
- struct hash_entry *entry;
hash_table_foreach(v3d->jobs, entry) {
struct v3d_job *job = entry->data;
stderr,
V3D_DEBUG & V3D_DEBUG_CL);
- struct set_entry *entry;
set_foreach(job->bos, entry) {
struct v3d_bo *bo = (void *)entry->key;
char *name = ralloc_asprintf(NULL, "%s_0x%x",
struct v3d_context *v3d = v3d_context(pctx);
struct v3d_uncompiled_shader *so = hwcso;
- struct hash_entry *entry;
hash_table_foreach(v3d->fs_cache, entry) {
delete_from_cache_if_matches(v3d->fs_cache, &v3d->prog.fs,
entry, so);
{
struct v3d_context *v3d = v3d_context(pctx);
- struct hash_entry *entry;
hash_table_foreach(v3d->fs_cache, entry) {
struct v3d_compiled_shader *shader = entry->data;
v3d_bo_unreference(&shader->bo);
{
struct vc4_context *vc4 = vc4_context(pctx);
- struct hash_entry *entry;
hash_table_foreach(vc4->jobs, entry) {
struct vc4_job *job = entry->data;
vc4_job_submit(vc4, job);
vc4_flush_jobs_writing_resource(vc4, prsc);
- struct hash_entry *entry;
hash_table_foreach(vc4->jobs, entry) {
struct vc4_job *job = entry->data;
struct vc4_context *vc4 = vc4_context(pctx);
struct vc4_uncompiled_shader *so = hwcso;
- struct hash_entry *entry;
hash_table_foreach(vc4->fs_cache, entry) {
delete_from_cache_if_matches(vc4->fs_cache, &vc4->prog.fs,
entry, so);
static void
sf_state_clear(struct hash_table *partial_update_ht)
{
- struct hash_entry *entry;
-
hash_table_foreach(partial_update_ht, entry) {
struct partial_update_state *state = entry->data;
*/
uint32_t max_count = 0;
uint32_t max_index = 0;
- struct hash_entry *entry;
hash_table_foreach(ht, entry) {
uint32_t count = (uintptr_t)entry->data;
uint32_t index = (uintptr_t)entry->key - 1;
struct gen_group *
gen_spec_find_instruction(struct gen_spec *spec, const uint32_t *p)
{
- struct hash_entry *entry;
-
hash_table_foreach(spec->commands, entry) {
struct gen_group *command = entry->data;
uint32_t opcode = *p & command->opcode_mask;
struct util_dynarray ranges;
util_dynarray_init(&ranges, mem_ctx);
- struct hash_entry *entry;
hash_table_foreach(state.blocks, entry) {
const int b = entry->hash - 1;
const struct ubo_block_info *info = entry->data;
filter.Draw();
ImGui::BeginChild(ImGui::GetID("##block"));
- struct hash_entry *entry;
hash_table_foreach(context.file->spec->registers_by_name, entry) {
struct gen_group *reg = (struct gen_group *) entry->data;
if (filter.PassFilter(reg->name) &&
if (ImGui::Button("Dwords")) show_dwords ^= 1;
ImGui::BeginChild(ImGui::GetID("##block"));
- struct hash_entry *entry;
hash_table_foreach(context.file->spec->commands, entry) {
struct gen_group *cmd = (struct gen_group *) entry->data;
if ((cmd_filter.PassFilter(cmd->name) &&
* going away, the shader cache has to hold a reference to all shader
* binaries it contains. We unref them when we destroy the cache.
*/
- struct hash_entry *entry;
hash_table_foreach(cache->cache, entry)
anv_shader_bin_unref(cache->device, entry->data);
VkResult result = VK_SUCCESS;
if (cache->cache) {
- struct hash_entry *entry;
hash_table_foreach(cache->cache, entry) {
struct anv_shader_bin *shader = entry->data;
if (!src->cache)
continue;
- struct hash_entry *entry;
hash_table_foreach(src->cache, entry) {
struct anv_shader_bin *bin = entry->data;
assert(bin);
kernel_has_dynamic_config_support(struct brw_context *brw)
{
__DRIscreen *screen = brw->screen->driScrnPriv;
- struct hash_entry *entry;
hash_table_foreach(brw->perfquery.oa_metrics_table, entry) {
struct brw_perf_query_info *query = entry->data;
init_oa_configs(struct brw_context *brw)
{
__DRIscreen *screen = brw->screen->driScrnPriv;
- struct hash_entry *entry;
hash_table_foreach(brw->perfquery.oa_metrics_table, entry) {
const struct brw_perf_query_info *query = entry->data;
void
brw_cache_sets_clear(struct brw_context *brw)
{
- struct hash_entry *render_entry;
hash_table_foreach(brw->render_cache, render_entry)
_mesa_hash_table_remove(brw->render_cache, render_entry);
- struct set_entry *depth_entry;
set_foreach(brw->depth_cache, depth_entry)
_mesa_set_remove(brw->depth_cache, depth_entry);
}
void (*callback)(GLuint key, void *data, void *userData),
void *userData)
{
- struct hash_entry *entry;
-
assert(callback);
_mesa_HashLockMutex(table);
table->InDeleteAll = GL_TRUE;
assert(table);
assert(callback);
- struct hash_entry *entry;
hash_table_foreach(table->ht, entry) {
callback((uintptr_t)entry->key, entry->data, userData);
}
return;
if (delete_function) {
- struct hash_entry *entry;
-
hash_table_foreach(ht, entry) {
delete_function(entry);
}
_mesa_hash_table_rehash(struct hash_table *ht, unsigned new_size_index)
{
struct hash_table old_ht;
- struct hash_entry *table, *entry;
+ struct hash_entry *table;
if (new_size_index >= ARRAY_SIZE(hash_sizes))
return;
* an entry's data with the deleted marker), but not against insertion
* (which may rehash the table, making entry a dangling pointer).
*/
-#define hash_table_foreach(ht, entry) \
- for (entry = _mesa_hash_table_next_entry(ht, NULL); \
- entry != NULL; \
+#define hash_table_foreach(ht, entry) \
+ for (struct hash_entry *entry = _mesa_hash_table_next_entry(ht, NULL); \
+ entry != NULL; \
entry = _mesa_hash_table_next_entry(ht, entry))
static inline void
void *closure),
void *closure)
{
- struct hash_entry *entry;
-
hash_table_foreach(ht, entry)
callback(entry->key, entry->data, closure);
}
int main()
{
struct hash_table *ht;
- struct hash_entry *entry;
const uint32_t size = 1000;
bool flags[size];
uint32_t i;
const char *str1 = "test1";
const char *str2 = "test2";
const char *str3 = "test3";
- struct hash_entry *entry1, *entry2, *search_entry;
+ struct hash_entry *entry1, *entry2;
uint32_t bad_hash = 5;
int i;
(struct wsi_x11 *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_XCB];
if (wsi) {
- struct hash_entry *entry;
hash_table_foreach(wsi->connections, entry)
wsi_x11_connection_destroy(wsi_device, entry->data);