Lines Matching full:deref
52 void emit_ubo_loads(ir_dereference *deref, ir_variable *base_offset,
76 ir_dereference *deref = (*rvalue)->as_dereference();
77 if (!deref)
80 ir_variable *var = deref->variable_referenced();
96 while (deref) {
97 switch (deref->ir_type) {
100 deref = NULL;
105 ir_dereference_array *deref_array = (ir_dereference_array *)deref;
127 deref = deref_array->array->as_dereference();
132 ir_dereference_record *deref_record = (ir_dereference_record *)deref;
152 deref = deref_record->record->as_dereference();
157 deref = NULL;
177 deref = new(mem_ctx) ir_dereference_variable(load_var);
178 emit_ubo_loads(deref, load_offset, const_offset);
179 *rvalue = deref;
200 * Recursively calls itself to break the deref down to the point that
205 lower_ubo_reference_visitor::emit_ubo_loads(ir_dereference *deref,
209 if (deref->type->is_record()) {
212 for (unsigned i = 0; i < deref->type->length; i++) {
214 &deref->type->fields.structure[i];
216 new(mem_ctx) ir_dereference_record(deref->clone(mem_ctx, NULL),
230 if (deref->type->is_array()) {
232 align(deref->type->fields.array->std140_size(ubo_var->RowMajor), 16);
234 for (unsigned i = 0; i < deref->type->length; i++) {
237 new(mem_ctx) ir_dereference_array(deref->clone(mem_ctx, NULL),
245 if (deref->type->is_matrix()) {
246 for (unsigned i = 0; i < deref->type->matrix_columns; i++) {
249 new(mem_ctx) ir_dereference_array(deref->clone(mem_ctx, NULL),
260 assert(deref->type->is_scalar() ||
261 deref->type->is_vector());
266 base_ir->insert_before(assign(deref->clone(mem_ctx, NULL),
267 ubo_load(deref->type, offset)));
272 assert(deref->type->base_type == GLSL_TYPE_FLOAT);
280 for (unsigned i = 0; i < deref->type->vector_elements; i++) {
283 new(mem_ctx) ir_dereference_array(deref->clone(mem_ctx, NULL),
305 * a deref of a UBO array using a UBO dereference as the index will