Home
last modified time | relevance | path

Searched refs:mem_ctx (Results 1 – 25 of 88) sorted by relevance

1234

/external/mesa3d/src/glsl/
Dir_clone.cpp31 ir_rvalue::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument
34 return error_value(mem_ctx); in clone()
45 ir_variable::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument
47 ir_variable *var = new(mem_ctx) ir_variable(this->type, this->name, in clone()
78 var->constant_value = this->constant_value->clone(mem_ctx, ht); in clone()
82 this->constant_initializer->clone(mem_ctx, ht); in clone()
92 ir_swizzle::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument
94 return new(mem_ctx) ir_swizzle(this->val->clone(mem_ctx, ht), this->mask); in clone()
98 ir_return::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument
103 new_value = this->value->clone(mem_ctx, ht); in clone()
[all …]
Dlower_mat_op_to_vec.cpp43 this->mem_ctx = NULL; in ir_mat_op_to_vec_visitor()
62 void *mem_ctx; member in ir_mat_op_to_vec_visitor
104 return new(mem_ctx) ir_swizzle(val, row, 0, 0, 0, 1); in get_element()
110 val = val->clone(mem_ctx, NULL); in get_column()
113 val = new(mem_ctx) ir_dereference_array(val, in get_column()
114 new(mem_ctx) ir_constant(row)); in get_column()
131 expr = new(mem_ctx) ir_expression(ir_binop_mul, in do_mul_mat_mat()
139 mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, in do_mul_mat_mat()
142 expr = new(mem_ctx) ir_expression(ir_binop_add, in do_mul_mat_mat()
147 assign = new(mem_ctx) ir_assignment(get_column(result, b_col), expr); in do_mul_mat_mat()
[all …]
Dlower_variable_index_to_cond_assign.cpp74 unsigned base, unsigned components, void *mem_ctx) in compare_index_block() argument
76 ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index); in compare_index_block()
84 broadcast_index = new(mem_ctx) ir_swizzle(broadcast_index, m); in compare_index_block()
97 new(mem_ctx) ir_constant(broadcast_index->type, in compare_index_block()
101 new(mem_ctx) ir_expression(ir_binop_equal, in compare_index_block()
107 new(mem_ctx) ir_variable(condition_val->type, in compare_index_block()
113 new(mem_ctx) ir_dereference_variable(condition); in compare_index_block()
114 instructions->push_tail(new(mem_ctx) ir_assignment(cond_deref, condition_val, 0)); in compare_index_block()
202 void *mem_ctx = ralloc_parent(base_ir); in generate() local
207 ir_dereference *element = this->rvalue->clone(mem_ctx, NULL); in generate()
[all …]
Dlower_ubo_reference.cpp57 void *mem_ctx; member in __anon1315ef220111::lower_ubo_reference_visitor
84 mem_ctx = ralloc_parent(*rvalue); in handle_rvalue()
88 ir_rvalue *offset = new(mem_ctx) ir_constant(0u); in handle_rvalue()
125 new(mem_ctx) ir_constant(array_stride))); in handle_rvalue()
166 ir_variable *load_var = new(mem_ctx) ir_variable(type, in handle_rvalue()
171 ir_variable *load_offset = new(mem_ctx) ir_variable(glsl_type::uint_type, in handle_rvalue()
177 deref = new(mem_ctx) ir_dereference_variable(load_var); in handle_rvalue()
188 return new(mem_ctx) in ubo_load()
191 new(mem_ctx) ir_constant(this->uniform_block), in ubo_load()
216 new(mem_ctx) ir_dereference_record(deref->clone(mem_ctx, NULL), in emit_ubo_loads()
[all …]
Dlower_if_to_cond_assign.cpp110 move_block_to_cond_assign(void *mem_ctx, in move_block_to_cond_assign() argument
134 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign()
136 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign()
139 assign->condition = cond_expr->clone(mem_ctx, NULL); in move_block_to_cond_assign()
143 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign()
145 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign()
188 void *mem_ctx = ralloc_parent(ir); in visit_leave() local
195 new(mem_ctx) ir_variable(glsl_type::bool_type, in visit_leave()
201 new(mem_ctx) ir_dereference_variable(then_var); in visit_leave()
203 assign = new(mem_ctx) ir_assignment(then_cond, ir->condition); in visit_leave()
[all …]
Dlower_discard_flow.cpp56 mem_ctx = ralloc_parent(discarded); in lower_discard_flow_visitor()
71 void *mem_ctx; member in lower_discard_flow_visitor
88 ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded); in visit_enter()
89 ir_rvalue *rhs = new(mem_ctx) ir_constant(true); in visit_enter()
90 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs); in visit_enter()
110 ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded); in visit_enter()
111 ir_rvalue *rhs = new(mem_ctx) ir_constant(false); in visit_enter()
112 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs); in visit_enter()
121 ir_rvalue *if_condition = new(mem_ctx) ir_dereference_variable(discarded); in generate_discard_break()
122 ir_if *if_inst = new(mem_ctx) ir_if(if_condition); in generate_discard_break()
[all …]
Dlower_discard.cpp148 replace_discard(void *mem_ctx, ir_variable *var, ir_discard *ir) in replace_discard() argument
154 condition = new(mem_ctx) ir_constant(true); in replace_discard()
157 new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(var), in replace_discard()
173 void *mem_ctx = ralloc_parent(ir); in visit_leave() local
175 ir_variable *temp = new(mem_ctx) ir_variable(glsl_type::bool_type, in visit_leave()
179 new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(temp), in visit_leave()
180 new(mem_ctx) ir_constant(false), NULL); in visit_leave()
186 replace_discard(mem_ctx, temp, then_discard); in visit_leave()
189 replace_discard(mem_ctx, temp, else_discard); in visit_leave()
192 discard->condition = new(mem_ctx) ir_dereference_variable(temp); in visit_leave()
Dopt_structure_splitting.cpp58 this->mem_ctx = NULL; in variable_entry2()
75 void *mem_ctx; member in __anona81dfca60111::variable_entry2
83 this->mem_ctx = ralloc_context(NULL); in ir_structure_reference_visitor()
89 ralloc_free(mem_ctx); in ~ir_structure_reference_visitor()
103 void *mem_ctx; member in __anona81dfca60111::ir_structure_reference_visitor
120 variable_entry2 *entry = new(mem_ctx) variable_entry2(var); in get_variable_entry2()
249 *deref = new(entry->mem_ctx) ir_dereference_variable(entry->components[i]); in split_deref()
279 void *mem_ctx = lhs_entry ? lhs_entry->mem_ctx : rhs_entry->mem_ctx; in visit_leave() local
282 new_lhs = new(mem_ctx) ir_dereference_variable(lhs_entry->components[i]); in visit_leave()
284 new_lhs = new(mem_ctx) in visit_leave()
[all …]
Dir_builder.cpp42 var = new(mem_ctx) ir_variable(type, name, ir_var_temporary); in make_temp()
51 void *mem_ctx = ralloc_parent(lhs.val); in assign() local
53 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs.val, in assign()
69 void *mem_ctx = ralloc_parent(a.val); in swizzle() local
71 return new(mem_ctx) ir_swizzle(a.val, in swizzle()
82 void *mem_ctx = ralloc_parent(a.val); in swizzle_for_size() local
91 return new(mem_ctx) ir_swizzle(a.val, s, components); in swizzle_for_size()
163 void *mem_ctx = ralloc_parent(a.val); in expr() local
165 return new(mem_ctx) ir_expression(op, a.val); in expr()
171 void *mem_ctx = ralloc_parent(a.val); in expr() local
[all …]
Dlower_texture_projection.cpp58 void *mem_ctx = ralloc_parent(ir); in visit_leave() local
60 ir_variable *var = new(mem_ctx) ir_variable(ir->projector->type, in visit_leave()
63 ir_dereference *deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
64 ir_expression *expr = new(mem_ctx) ir_expression(ir_unop_rcp, in visit_leave()
68 ir_assignment *assign = new(mem_ctx) ir_assignment(deref, expr, NULL); in visit_leave()
71 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
72 ir->coordinate = new(mem_ctx) ir_expression(ir_binop_mul, in visit_leave()
78 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
79 ir->shadow_comparitor = new(mem_ctx) ir_expression(ir_binop_mul, in visit_leave()
Dir_import_prototypes.cpp46 void *mem_ctx) in import_prototype_visitor() argument
48 this->mem_ctx = mem_ctx; in import_prototype_visitor()
60 this->function = new(this->mem_ctx) ir_function(ir->name); in visit_enter()
84 ir_function_signature *copy = ir->clone_prototype(mem_ctx, NULL); in visit_enter()
99 void *mem_ctx; member in import_prototype_visitor
115 glsl_symbol_table *symbols, void *mem_ctx) in import_prototypes() argument
117 import_prototype_visitor v(dest, symbols, mem_ctx); in import_prototypes()
Dopt_copy_propagation.cpp76 mem_ctx = ralloc_context(0); in ir_copy_propagation_visitor()
77 this->acp = new(mem_ctx) exec_list; in ir_copy_propagation_visitor()
78 this->kills = new(mem_ctx) exec_list; in ir_copy_propagation_visitor()
82 ralloc_free(mem_ctx); in ~ir_copy_propagation_visitor()
109 void *mem_ctx; member in __anon85e25c360111::ir_copy_propagation_visitor
125 this->acp = new(mem_ctx) exec_list; in visit_enter()
126 this->kills = new(mem_ctx) exec_list; in visit_enter()
214 this->acp = new(mem_ctx) exec_list; in handle_if_block()
215 this->kills = new(mem_ctx) exec_list; in handle_if_block()
221 this->acp->push_tail(new(this->mem_ctx) acp_entry(a->lhs, a->rhs)); in handle_if_block()
[all …]
Dopt_array_splitting.cpp55 this->mem_ctx = NULL; in variable_entry()
77 void *mem_ctx; member in opt_array_splitting::variable_entry
92 this->mem_ctx = ralloc_context(NULL); in ir_array_reference_visitor()
98 ralloc_free(mem_ctx); in ~ir_array_reference_visitor()
113 void *mem_ctx; member in ir_array_reference_visitor
140 variable_entry *entry = new(mem_ctx) variable_entry(var); in get_variable_entry()
299 *deref = new(entry->mem_ctx) in split_deref()
308 ir_variable *temp = new(entry->mem_ctx) ir_variable(deref_array->type, in split_deref()
312 *deref = new(entry->mem_ctx) ir_dereference_variable(temp); in split_deref()
362 void *mem_ctx = ralloc_context(NULL); in optimize_split_arrays() local
[all …]
Dopt_algebraic.cpp48 this->mem_ctx = NULL; in ir_algebraic_visitor()
68 void *mem_ctx; member in __anon357935720111::ir_algebraic_visitor
180 return new(mem_ctx) ir_swizzle(operand, 0, 0, 0, 0, in swizzle_if_required()
203 if (this->mem_ctx == NULL) in handle_expression()
204 this->mem_ctx = ralloc_parent(ir); in handle_expression()
231 return new(mem_ctx) ir_expression(new_op, in handle_expression()
264 temp = new(mem_ctx) ir_expression(ir_unop_neg, in handle_expression()
306 temp = new(mem_ctx) ir_expression(ir_unop_rcp, in handle_expression()
321 return ir_constant::zero(mem_ctx, ir->type); in handle_expression()
330 return new(mem_ctx) ir_swizzle(ir->operands[1], component, 0, 0, 0, 1); in handle_expression()
[all …]
Dlink_uniform_initializers.cpp81 set_uniform_initializer(void *mem_ctx, gl_shader_program *prog, in set_uniform_initializer() argument
92 const char *field_name = ralloc_asprintf(mem_ctx, "%s.%s", name, in set_uniform_initializer()
94 set_uniform_initializer(mem_ctx, prog, field_name, in set_uniform_initializer()
103 const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i); in set_uniform_initializer()
105 set_uniform_initializer(mem_ctx, prog, element_name, in set_uniform_initializer()
158 void *mem_ctx = NULL; in link_set_uniform_initializers() local
172 if (!mem_ctx) in link_set_uniform_initializers()
173 mem_ctx = ralloc_context(NULL); in link_set_uniform_initializers()
175 linker::set_uniform_initializer(mem_ctx, prog, var->name, in link_set_uniform_initializers()
180 ralloc_free(mem_ctx); in link_set_uniform_initializers()
Dopt_constant_propagation.cpp96 mem_ctx = ralloc_context(0); in ir_constant_propagation_visitor()
97 this->acp = new(mem_ctx) exec_list; in ir_constant_propagation_visitor()
98 this->kills = new(mem_ctx) exec_list; in ir_constant_propagation_visitor()
102 ralloc_free(mem_ctx); in ~ir_constant_propagation_visitor()
130 void *mem_ctx; member in __anonf8f17e250111::ir_constant_propagation_visitor
228 this->acp = new(mem_ctx) exec_list; in visit_enter()
229 this->kills = new(mem_ctx) exec_list; in visit_enter()
315 this->acp = new(mem_ctx) exec_list; in handle_if_block()
316 this->kills = new(mem_ctx) exec_list; in handle_if_block()
322 this->acp->push_tail(new(this->mem_ctx) acp_entry(a)); in handle_if_block()
[all …]
Dopt_copy_propagation_elements.cpp99 this->mem_ctx = ralloc_context(NULL); in ir_copy_propagation_elements_visitor()
101 this->acp = new(mem_ctx) exec_list; in ir_copy_propagation_elements_visitor()
102 this->kills = new(mem_ctx) exec_list; in ir_copy_propagation_elements_visitor()
106 ralloc_free(mem_ctx); in ~ir_copy_propagation_elements_visitor()
135 void *mem_ctx; member in __anon350281720111::ir_copy_propagation_elements_visitor
153 this->acp = new(mem_ctx) exec_list; in visit_enter()
154 this->kills = new(mem_ctx) exec_list; in visit_enter()
176 k = new(mem_ctx) kill_entry(var, ir->write_mask); in visit_leave()
178 k = new(mem_ctx) kill_entry(var, ~0); in visit_leave()
322 this->acp = new(mem_ctx) exec_list; in handle_if_block()
[all …]
Dir.h107 virtual ir_instruction *clone(void *mem_ctx,
150 virtual ir_rvalue *clone(void *mem_ctx, struct hash_table *) const;
255 static ir_rvalue *error_value(void *mem_ctx);
310 virtual ir_variable *clone(void *mem_ctx, struct hash_table *ht) const;
530 virtual ir_function_signature *clone(void *mem_ctx,
532 ir_function_signature *clone_prototype(void *mem_ctx,
644 virtual ir_function *clone(void *mem_ctx, struct hash_table *ht) const;
723 virtual ir_if *clone(void *mem_ctx, struct hash_table *ht) const;
752 virtual ir_loop *clone(void *mem_ctx, struct hash_table *ht) const;
821 virtual ir_assignment *clone(void *mem_ctx, struct hash_table *ht) const;
[all …]
/external/mesa3d/src/glsl/tests/
Dset_uniform_initializer_tests.cpp32 set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
64 void *mem_ctx; member in set_uniform_initializer
70 this->mem_ctx = ralloc_context(NULL); in SetUp()
82 ralloc_free(this->mem_ctx); in TearDown()
83 this->mem_ctx = NULL; in TearDown()
162 non_array_test(void *mem_ctx, struct gl_shader_program *prog, in non_array_test() argument
174 generate_data(mem_ctx, base_type, columns, rows, val); in non_array_test()
176 linker::set_uniform_initializer(mem_ctx, prog, name, type, val); in non_array_test()
185 non_array_test(mem_ctx, prog, actual_index, name, GLSL_TYPE_INT, 1, 1); in TEST_F()
190 non_array_test(mem_ctx, prog, actual_index, name, GLSL_TYPE_INT, 1, 2); in TEST_F()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_fs_cfg.cpp57 fs_bblock::add_successor(void *mem_ctx, fs_bblock *successor) in add_successor() argument
59 successor->parents.push_tail(this->make_list(mem_ctx)); in add_successor()
60 children.push_tail(successor->make_list(mem_ctx)); in add_successor()
64 fs_bblock::make_list(void *mem_ctx) in make_list() argument
66 return new(mem_ctx) fs_bblock_link(this); in make_list()
71 mem_ctx = ralloc_context(v->mem_ctx); in fs_cfg()
100 if_stack.push_tail(cur_if->make_list(mem_ctx)); in fs_cfg()
101 else_stack.push_tail(cur_else->make_list(mem_ctx)); in fs_cfg()
102 endif_stack.push_tail(cur_endif->make_list(mem_ctx)); in fs_cfg()
116 cur_if->add_successor(mem_ctx, next); in fs_cfg()
[all …]
Dbrw_cubemap_normalize.cpp57 void *mem_ctx = ralloc_parent(ir); in visit_leave() local
59 ir_variable *var = new(mem_ctx) ir_variable(ir->coordinate->type, in visit_leave()
62 ir_dereference *deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
63 ir_assignment *assign = new(mem_ctx) ir_assignment(deref, ir->coordinate, in visit_leave()
67 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
68 ir_rvalue *swiz0 = new(mem_ctx) ir_swizzle(deref, 0, 0, 0, 0, 1); in visit_leave()
69 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
70 ir_rvalue *swiz1 = new(mem_ctx) ir_swizzle(deref, 1, 0, 0, 0, 1); in visit_leave()
71 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave()
72 ir_rvalue *swiz2 = new(mem_ctx) ir_swizzle(deref, 2, 0, 0, 0, 1); in visit_leave()
[all …]
Dbrw_fs_vector_splitting.cpp60 this->mem_ctx = NULL; in variable_entry()
73 void *mem_ctx; member in variable_entry
80 this->mem_ctx = ralloc_context(NULL); in ir_vector_reference_visitor()
86 ralloc_free(mem_ctx); in ~ir_vector_reference_visitor()
100 void *mem_ctx; member in ir_vector_reference_visitor
131 variable_entry *entry = new(mem_ctx) variable_entry(var); in get_variable_entry()
254 *rvalue = new(entry->mem_ctx) ir_dereference_variable(var); in handle_rvalue()
272 void *mem_ctx = lhs ? lhs->mem_ctx : rhs->mem_ctx; in visit_leave() local
279 new_lhs = new(mem_ctx) ir_dereference_variable(lhs->components[i]); in visit_leave()
282 new_lhs = ir->lhs->clone(mem_ctx, NULL); in visit_leave()
[all …]
Dbrw_fs_channel_expressions.cpp57 this->mem_ctx = NULL; in ir_channel_expressions_visitor()
66 void *mem_ctx; member in ir_channel_expressions_visitor
108 return new(mem_ctx) ir_dereference_variable(var); in get_element()
111 deref = new(mem_ctx) ir_dereference_variable(var); in get_element()
112 return new(mem_ctx) ir_swizzle(deref, elem, 0, 0, 0, 1); in get_element()
118 ir_dereference *lhs = ir->lhs->clone(mem_ctx, NULL); in assign()
128 assign = new(mem_ctx) ir_assignment(lhs, val, NULL, (1 << elem)); in assign()
143 if (!this->mem_ctx) in visit_leave()
144 this->mem_ctx = ralloc_parent(ir); in visit_leave()
165 op_var[i] = new(mem_ctx) ir_variable(expr->operands[i]->type, in visit_leave()
[all …]
Dbrw_lower_texture_gradients.cpp93 void *mem_ctx = ralloc_parent(ir); in visit_leave() local
100 ir_texture *txs = new(mem_ctx) ir_texture(ir_txs); in visit_leave()
101 txs->set_sampler(ir->sampler->clone(mem_ctx, NULL), in visit_leave()
103 txs->lod_info.lod = new(mem_ctx) ir_constant(0); in visit_leave()
105 new(mem_ctx) ir_variable(grad_type, "size", ir_var_temporary); in visit_leave()
109 base_ir->insert_before(assign(size, new(mem_ctx) ir_constant(1.0f), WRITEMASK_Z)); in visit_leave()
120 new(mem_ctx) ir_variable(grad_type, "dPdx", ir_var_temporary); in visit_leave()
124 new(mem_ctx) ir_variable(grad_type, "dPdy", ir_var_temporary); in visit_leave()
/external/mesa3d/src/mesa/main/
Dff_fragment_shader.cpp549 val = new(p->mem_ctx) ir_dereference_variable(current); in get_current_attrib()
550 ir_rvalue *index = new(p->mem_ctx) ir_constant(attrib); in get_current_attrib()
551 return new(p->mem_ctx) ir_dereference_array(val, index); in get_current_attrib()
560 return new(p->mem_ctx) ir_dereference_variable(var); in get_gl_Color()
575 return new(p->mem_ctx) ir_dereference_variable(p->src_texture[unit]); in get_source()
585 return new(p->mem_ctx) in get_source()
591 deref = new(p->mem_ctx) ir_dereference_variable(var); in get_source()
593 return new(p->mem_ctx) ir_dereference_array(deref, in get_source()
594 new(p->mem_ctx) ir_constant(unit)); in get_source()
599 return new(p->mem_ctx) ir_dereference_variable(var); in get_source()
[all …]

1234