Lines Matching refs:var
47 variable_entry(ir_variable *var)
49 this->var = var;
56 ir_variable *var; /* The key: the variable's pointer. */
69 /** ralloc_parent(this->var) -- the shader's ralloc context. */
93 variable_entry *get_variable_entry(ir_variable *var);
102 ir_structure_reference_visitor::get_variable_entry(ir_variable *var)
104 assert(var);
106 if (!var->type->is_struct() ||
107 var->data.mode == ir_var_uniform || var->data.mode == ir_var_shader_storage ||
108 var->data.mode == ir_var_shader_in || var->data.mode == ir_var_shader_out)
112 if (entry->var == var)
116 variable_entry *entry = new(mem_ctx) variable_entry(var);
136 ir_variable *const var = ir->variable_referenced();
137 variable_entry *entry = this->get_variable_entry(var);
198 variable_entry *get_splitting_entry(ir_variable *var);
204 ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
206 assert(var);
208 if (!var->type->is_struct())
212 if (entry->var == var) {
231 variable_entry *entry = get_splitting_entry(deref_var->var);
237 assert((unsigned) i < entry->var->type->length);
262 variable_entry *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL;
263 variable_entry *rhs_entry = rhs_deref ? get_splitting_entry(rhs_deref->var) : NULL;
311 entry->var->name, (void *) entry->var, entry->declaration,
329 const struct glsl_type *type = entry->var->type;
331 entry->mem_ctx = ralloc_parent(entry->var);
335 for (unsigned int i = 0; i < entry->var->type->length; i++) {
336 const char *name = ralloc_asprintf(mem_ctx, "%s_%s", entry->var->name,
341 (ir_variable_mode) entry->var->data.mode);
362 entry->var->insert_before(entry->components[i]);
365 entry->var->remove();