Home
last modified time | relevance | path

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

12345678

/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_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_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.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()
Dlower_ubo_reference.cpp57 void *mem_ctx; member in __anon619a38e60111::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 …]
Dopt_structure_splitting.cpp58 this->mem_ctx = NULL; in variable_entry2()
75 void *mem_ctx; member in __anoncf79886a0111::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 __anoncf79886a0111::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 …]
/external/chromium_org/third_party/mesa/src/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_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_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.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()
Dlower_ubo_reference.cpp57 void *mem_ctx; member in __anon75cb76b90111::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 …]
Dopt_structure_splitting.cpp58 this->mem_ctx = NULL; in variable_entry2()
75 void *mem_ctx; member in __anonf2eb77bd0111::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 __anonf2eb77bd0111::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 …]
/external/chromium_org/third_party/mesa/src/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/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/chromium_org/third_party/mesa/src/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 …]
/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 …]

12345678