/external/mesa3d/src/compiler/glsl/ |
D | ir_clone.cpp | 31 ir_rvalue::clone(void *mem_ctx, struct hash_table *) const in clone() argument 34 return error_value(mem_ctx); in clone() 41 ir_variable::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument 43 ir_variable *var = new(mem_ctx) ir_variable(this->type, this->name, in clone() 63 var->constant_value = this->constant_value->clone(mem_ctx, ht); in clone() 67 this->constant_initializer->clone(mem_ctx, ht); in clone() 78 ir_swizzle::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument 80 return new(mem_ctx) ir_swizzle(this->val->clone(mem_ctx, ht), this->mask); in clone() 84 ir_return::clone(void *mem_ctx, struct hash_table *ht) const in clone() argument 89 new_value = this->value->clone(mem_ctx, ht); in clone() [all …]
|
D | lower_ubo_reference.cpp | 59 void setup_for_load_or_store(void *mem_ctx, 68 ir_expression *ubo_load(void *mem_ctx, const struct glsl_type *type, 70 ir_call *ssbo_load(void *mem_ctx, const struct glsl_type *type, 76 void write_to_memory(void *mem_ctx, ir_dereference *deref, ir_variable *var, 78 ir_call *ssbo_store(void *mem_ctx, ir_rvalue *deref, ir_rvalue *offset, 89 void insert_buffer_access(void *mem_ctx, ir_dereference *deref, 101 ir_expression *emit_ssbo_get_buffer_size(void *mem_ctx); 127 interface_field_name(void *mem_ctx, char *base_name, ir_rvalue *d, in interface_field_name() argument 197 name_copy = ralloc_strdup(mem_ctx, base_name); in interface_field_name() 215 ir_constant *base_size = new(mem_ctx) in interface_field_name() [all …]
|
D | lower_shared_reference.cpp | 72 void insert_buffer_access(void *mem_ctx, ir_dereference *deref, 86 ir_call *shared_load(void *mem_ctx, const struct glsl_type *type, 88 ir_call *shared_store(void *mem_ctx, ir_rvalue *deref, ir_rvalue *offset, 135 void *mem_ctx = ralloc_parent(shader->ir); in handle_rvalue() local 144 setup_buffer_access(mem_ctx, deref, in handle_rvalue() 152 ir_variable *load_var = new(mem_ctx) ir_variable(type, in handle_rvalue() 157 ir_variable *load_offset = new(mem_ctx) ir_variable(glsl_type::uint_type, in handle_rvalue() 163 deref = new(mem_ctx) ir_dereference_variable(load_var); in handle_rvalue() 165 emit_access(mem_ctx, false, deref, load_offset, const_offset, row_major, in handle_rvalue() 196 void *mem_ctx = ralloc_parent(shader->ir); in handle_assignment() local [all …]
|
D | lower_packed_varyings.cpp | 167 lower_packed_varyings_visitor(void *mem_ctx, 198 void * const mem_ctx; member in __anon04a8adbb0111::lower_packed_varyings_visitor 248 void *mem_ctx, unsigned locations_used, const uint8_t *components, in lower_packed_varyings_visitor() argument 253 : mem_ctx(mem_ctx), in lower_packed_varyings_visitor() 257 rzalloc_array_size(mem_ctx, sizeof(*packed_varyings), in lower_packed_varyings_visitor() 303 = new(this->mem_ctx) ir_dereference_variable(var); in run() 331 rhs = new(this->mem_ctx) in bitwise_assign_pack() 335 rhs = new(this->mem_ctx) in bitwise_assign_pack() 341 ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "pack", ir_var_temporary); in bitwise_assign_pack() 346 … assign(t, u2i(expr(ir_unop_unpack_double_2x32, swizzle_x(rhs->clone(mem_ctx, NULL)))), 0x3)); in bitwise_assign_pack() [all …]
|
D | lower_mat_op_to_vec.cpp | 45 this->mem_ctx = NULL; in ir_mat_op_to_vec_visitor() 64 void *mem_ctx; member in __anonbea637a00111::ir_mat_op_to_vec_visitor 108 return new(mem_ctx) ir_swizzle(val, row, 0, 0, 0, 1); in get_element() 114 val = val->clone(mem_ctx, NULL); in get_column() 117 val = new(mem_ctx) ir_dereference_array(val, in get_column() 118 new(mem_ctx) ir_constant(row)); in get_column() 135 expr = new(mem_ctx) ir_expression(ir_binop_mul, in do_mul_mat_mat() 143 mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, in do_mul_mat_mat() 146 expr = new(mem_ctx) ir_expression(ir_binop_add, in do_mul_mat_mat() 151 assign = new(mem_ctx) ir_assignment(get_column(result, b_col), expr); in do_mul_mat_mat() [all …]
|
D | builtin_int64.h | 2 umul64(void *mem_ctx, builtin_available_predicate avail) in umul64() argument 5 new(mem_ctx) ir_function_signature(glsl_type::uvec2_type, avail); in umul64() 6 ir_factory body(&sig->body, mem_ctx); in umul64() 11 …ir_variable *const r0001 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "a", ir_var_function_in… in umul64() 13 …ir_variable *const r0002 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "b", ir_var_function_in… in umul64() 15 … ir_variable *const r0003 = new(mem_ctx) ir_variable(glsl_type::uvec2_type, "result", ir_var_auto); in umul64() 32 sign64(void *mem_ctx, builtin_available_predicate avail) in sign64() argument 35 new(mem_ctx) ir_function_signature(glsl_type::ivec2_type, avail); in sign64() 36 ir_factory body(&sig->body, mem_ctx); in sign64() 41 …ir_variable *const r0007 = new(mem_ctx) ir_variable(glsl_type::ivec2_type, "a", ir_var_function_in… in sign64() [all …]
|
D | lower_discard_flow.cpp | 57 mem_ctx = ralloc_parent(discarded); in lower_discard_flow_visitor() 72 void *mem_ctx; member in __anon976100120111::lower_discard_flow_visitor 91 ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded); in visit_enter() 96 ir->condition = new(mem_ctx) ir_dereference_variable(discarded); in visit_enter() 98 rhs = new(mem_ctx) ir_constant(true); in visit_enter() 100 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs); in visit_enter() 120 ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded); in visit_enter() 121 ir_rvalue *rhs = new(mem_ctx) ir_constant(false); in visit_enter() 122 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs); in visit_enter() 131 ir_rvalue *if_condition = new(mem_ctx) ir_dereference_variable(discarded); in generate_discard_break() [all …]
|
D | ir_constant_expression.cpp | 631 ir_expression::constant_expression_value(void *mem_ctx, in constant_expression_value() argument 634 assert(mem_ctx); in constant_expression_value() 646 this->operands[operand]->constant_expression_value(mem_ctx, in constant_expression_value() 689 return new(mem_ctx) ir_constant(op[0]->has_value(op[1])); in constant_expression_value() 691 return new(mem_ctx) ir_constant(!op[0]->has_value(op[1])); in constant_expression_value() 700 return new(mem_ctx) ir_constant(this->type, &data); in constant_expression_value() 713 ir_swizzle::constant_expression_value(void *mem_ctx, in constant_expression_value() argument 716 assert(mem_ctx); in constant_expression_value() 718 ir_constant *v = this->val->constant_expression_value(mem_ctx, in constant_expression_value() 741 return new(mem_ctx) ir_constant(this->type, &data); in constant_expression_value() [all …]
|
D | lower_discard.cpp | 151 replace_discard(void *mem_ctx, ir_variable *var, ir_discard *ir) in replace_discard() argument 157 condition = new(mem_ctx) ir_constant(true); in replace_discard() 160 new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(var), in replace_discard() 176 void *mem_ctx = ralloc_parent(ir); in visit_leave() local 178 ir_variable *temp = new(mem_ctx) ir_variable(glsl_type::bool_type, in visit_leave() 182 new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(temp), in visit_leave() 183 new(mem_ctx) ir_constant(false)); in visit_leave() 189 replace_discard(mem_ctx, temp, then_discard); in visit_leave() 192 replace_discard(mem_ctx, temp, else_discard); in visit_leave() 195 discard->condition = new(mem_ctx) ir_dereference_variable(temp); in visit_leave()
|
D | lower_if_to_cond_assign.cpp | 172 move_block_to_cond_assign(void *mem_ctx, in move_block_to_cond_assign() argument 195 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign() 197 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign() 200 assign->condition = cond_expr->clone(mem_ctx, NULL); in move_block_to_cond_assign() 204 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign() 206 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign() 271 void *mem_ctx = ralloc_parent(ir); in visit_leave() local 278 new(mem_ctx) ir_variable(glsl_type::bool_type, in visit_leave() 284 new(mem_ctx) ir_dereference_variable(then_var); in visit_leave() 286 assign = new(mem_ctx) ir_assignment(then_cond, ir->condition); in visit_leave() [all …]
|
D | opt_structure_splitting.cpp | 53 this->mem_ctx = NULL; in variable_entry() 70 void *mem_ctx; member in __anon960a5ef90111::variable_entry 78 this->mem_ctx = ralloc_context(NULL); in ir_structure_reference_visitor() 84 ralloc_free(mem_ctx); in ~ir_structure_reference_visitor() 98 void *mem_ctx; member in __anon960a5ef90111::ir_structure_reference_visitor 116 variable_entry *entry = new(mem_ctx) variable_entry(var); in get_variable_entry() 240 *deref = new(entry->mem_ctx) ir_dereference_variable(entry->components[i]); in split_deref() 270 void *mem_ctx = lhs_entry ? lhs_entry->mem_ctx : rhs_entry->mem_ctx; in visit_leave() local 273 new_lhs = new(mem_ctx) ir_dereference_variable(lhs_entry->components[i]); in visit_leave() 275 new_lhs = new(mem_ctx) in visit_leave() [all …]
|
D | opt_array_splitting.cpp | 56 this->mem_ctx = NULL; in variable_entry() 78 void *mem_ctx; member in __anon74cf28e70111::opt_array_splitting::variable_entry 94 this->mem_ctx = ralloc_context(NULL); in ir_array_reference_visitor() 101 ralloc_free(mem_ctx); in ~ir_array_reference_visitor() 118 void *mem_ctx; member in __anon74cf28e70111::ir_array_reference_visitor 171 variable_entry *entry = new(mem_ctx) variable_entry(var); in get_variable_entry() 364 *deref = new(entry->mem_ctx) in split_deref() 373 ir_variable *temp = new(entry->mem_ctx) ir_variable(deref_array->type, in split_deref() 377 *deref = new(entry->mem_ctx) ir_dereference_variable(temp); in split_deref() 409 void *mem_ctx = ralloc_parent(ir); in visit_leave() local [all …]
|
D | lower_buffer_access.cpp | 56 lower_buffer_access::emit_access(void *mem_ctx, in emit_access() argument 73 new(mem_ctx) ir_dereference_record(deref->clone(mem_ctx, NULL), in emit_access() 83 emit_access(mem_ctx, is_write, field_deref, base_offset, in emit_access() 102 ir_constant *element = new(mem_ctx) ir_constant(i); in emit_access() 104 new(mem_ctx) ir_dereference_array(deref->clone(mem_ctx, NULL), in emit_access() 106 emit_access(mem_ctx, is_write, element_deref, base_offset, in emit_access() 116 ir_constant *col = new(mem_ctx) ir_constant(i); in emit_access() 118 new(mem_ctx) ir_dereference_array(deref->clone(mem_ctx, NULL), col); in emit_access() 127 emit_access(mem_ctx, is_write, col_deref, base_offset, in emit_access() 139 add(base_offset, new(mem_ctx) ir_constant(deref_offset)); in emit_access() [all …]
|
D | lower_texture_projection.cpp | 62 void *mem_ctx = ralloc_parent(ir); in visit_leave() local 64 ir_variable *var = new(mem_ctx) ir_variable(ir->projector->type, in visit_leave() 67 ir_dereference *deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave() 68 ir_expression *expr = new(mem_ctx) ir_expression(ir_unop_rcp, in visit_leave() 72 ir_assignment *assign = new(mem_ctx) ir_assignment(deref, expr); in visit_leave() 75 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave() 76 ir->coordinate = new(mem_ctx) ir_expression(ir_binop_mul, in visit_leave() 82 deref = new(mem_ctx) ir_dereference_variable(var); in visit_leave() 83 ir->shadow_comparator = new(mem_ctx) ir_expression(ir_binop_mul, in visit_leave()
|
D | lower_named_interface_blocks.cpp | 82 process_array_ir(void * const mem_ctx, in process_array_ir() argument 90 return new(mem_ctx) ir_dereference_array(deref_var, in process_array_ir() 93 deref_array = (ir_dereference_array *) process_array_ir(mem_ctx, in process_array_ir() 96 return new(mem_ctx) ir_dereference_array(deref_array, in process_array_ir() 106 void * const mem_ctx; member in __anon4e4f00330111::flatten_named_interface_blocks_declarations 109 flatten_named_interface_blocks_declarations(void *mem_ctx) in flatten_named_interface_blocks_declarations() argument 110 : mem_ctx(mem_ctx), in flatten_named_interface_blocks_declarations() 157 ralloc_asprintf(mem_ctx, "%s %s.%s.%s", in run() 167 ralloc_strdup(mem_ctx, iface_t->fields.structure[i].name); in run() 170 new(mem_ctx) ir_variable(iface_t->fields.structure[i].type, in run() [all …]
|
D | loop_analysis.cpp | 96 void *mem_ctx = ralloc_context(NULL); in calculate_iterations() local 99 new(mem_ctx) ir_expression(ir_binop_sub, from->type, to, from); in calculate_iterations() 102 new(mem_ctx) ir_expression(ir_binop_div, sub->type, sub, increment); in calculate_iterations() 104 ir_constant *iter = div->constant_expression_value(mem_ctx); in calculate_iterations() 106 ralloc_free(mem_ctx); in calculate_iterations() 114 new(mem_ctx) ir_expression(op, glsl_type::int_type, iter, NULL); in calculate_iterations() 116 iter = cast->constant_expression_value(mem_ctx); in calculate_iterations() 136 iter = new(mem_ctx) ir_constant(iter_value + bias[i]); in calculate_iterations() 139 iter = new(mem_ctx) ir_constant(unsigned(iter_value + bias[i])); in calculate_iterations() 142 iter = new(mem_ctx) ir_constant(float(iter_value + bias[i])); in calculate_iterations() [all …]
|
D | lower_blend_equation_advanced.cpp | 35 #define imm1(x) new(mem_ctx) ir_constant((float) (x), 1) 36 #define imm3(x) new(mem_ctx) ir_constant((float) (x), 3) 55 void *mem_ctx = ralloc_parent(src); in blend_overlay() local 83 void *mem_ctx = ralloc_parent(src); in blend_colordodge() local 98 void *mem_ctx = ralloc_parent(src); in blend_colorburn() local 113 void *mem_ctx = ralloc_parent(src); in blend_hardlight() local 127 void *mem_ctx = ralloc_parent(src); in blend_softlight() local 163 void *mem_ctx = ralloc_parent(src); in blend_exclusion() local 190 void *mem_ctx = ralloc_parent(c); in lumv3() local 193 return dot(c, new(mem_ctx) ir_constant(glsl_type::vec3_type, &data)); in lumv3() [all …]
|
D | builtin_functions.h | 50 udiv64(void *mem_ctx, builtin_available_predicate avail); 53 idiv64(void *mem_ctx, builtin_available_predicate avail); 56 umod64(void *mem_ctx, builtin_available_predicate avail); 59 imod64(void *mem_ctx, builtin_available_predicate avail); 62 umul64(void *mem_ctx, builtin_available_predicate avail); 65 sign64(void *mem_ctx, builtin_available_predicate avail); 68 udivmod64(void *mem_ctx, builtin_available_predicate avail);
|
/external/mesa3d/src/compiler/glsl/tests/ |
D | set_uniform_initializer_tests.cpp | 33 set_uniform_initializer(void *mem_ctx, gl_shader_program *prog, 65 void *mem_ctx; member in set_uniform_initializer 71 this->mem_ctx = ralloc_context(NULL); in SetUp() 84 ralloc_free(this->mem_ctx); in TearDown() 85 this->mem_ctx = NULL; in TearDown() 157 non_array_test(void *mem_ctx, struct gl_shader_program *prog, in non_array_test() argument 169 generate_data(mem_ctx, base_type, columns, rows, val); in non_array_test() 171 linker::set_uniform_initializer(mem_ctx, prog, name, type, val, 0xF00F); in non_array_test() 179 non_array_test(mem_ctx, prog, actual_index, name, GLSL_TYPE_INT, 1, 1); in TEST_F() 184 non_array_test(mem_ctx, prog, actual_index, name, GLSL_TYPE_INT, 1, 2); in TEST_F() [all …]
|
D | varyings_test.cpp | 39 populate_consumer_input_sets(void *mem_ctx, exec_list *ir, 45 get_matching_input(void *mem_ctx, 61 return ralloc_asprintf(mem_ctx, in interface_field_name() 67 void *mem_ctx; member in link_varyings 93 this->mem_ctx = ralloc_context(NULL); in SetUp() 108 ralloc_free(this->mem_ctx); in TearDown() 109 this->mem_ctx = NULL; in TearDown() 120 new(mem_ctx) ir_variable(glsl_type::vec(4), in TEST_F() 127 linker::populate_consumer_input_sets(mem_ctx, in TEST_F() 145 new(mem_ctx) ir_variable(array_8_of_float, in TEST_F() [all …]
|
D | lower_int64_test.cpp | 54 void *mem_ctx; member in expand_source 60 mem_ctx = ralloc_context(NULL); in SetUp() 64 body = new ir_factory(&instructions, mem_ctx); in SetUp() 73 ralloc_free(mem_ctx); in TearDown() 74 mem_ctx = NULL; in TearDown() 78 create_variable(void *mem_ctx, const glsl_type *type) in create_variable() argument 80 ir_variable *var = new(mem_ctx) ir_variable(type, in create_variable() 84 return new(mem_ctx) ir_dereference_variable(var); in create_variable() 88 create_expression(void *mem_ctx, const glsl_type *type) in create_expression() argument 90 return new(mem_ctx) ir_expression(ir_unop_neg, in create_expression() [all …]
|
D | array_refcount_test.cpp | 38 void *mem_ctx; member in array_refcount_test 96 mem_ctx = ralloc_context(NULL); in SetUp() 99 body = new ir_factory(&instructions, mem_ctx); in SetUp() 118 ralloc_free(mem_ctx); in TearDown() 119 mem_ctx = NULL; in TearDown() 125 void *mem_ctx = ralloc_parent(array.val); in deref_array() local 127 ir_rvalue *val = new(mem_ctx) ir_dereference_array(array.val, index.val); in deref_array() 135 void *mem_ctx = ralloc_parent(s.val); in deref_struct() local 137 ir_rvalue *val = new(mem_ctx) ir_dereference_record(s.val, field); in deref_struct() 210 new(mem_ctx) ir_variable(glsl_type::int_type, "a", ir_var_auto); in TEST_F() [all …]
|
/external/mesa3d/src/intel/compiler/ |
D | brw_cfg.cpp | 47 link(void *mem_ctx, bblock_t *block) in link() argument 49 bblock_link *l = new(mem_ctx) bblock_link(block); in link() 62 bblock_t::add_successor(void *mem_ctx, bblock_t *successor) in add_successor() argument 64 successor->parents.push_tail(::link(mem_ctx, this)); in add_successor() 65 children.push_tail(::link(mem_ctx, successor)); in add_successor() 157 mem_ctx = ralloc_context(NULL); in cfg_t() 191 if_stack.push_tail(link(mem_ctx, cur_if)); in cfg_t() 192 else_stack.push_tail(link(mem_ctx, cur_else)); in cfg_t() 202 cur_if->add_successor(mem_ctx, next); in cfg_t() 214 cur_if->add_successor(mem_ctx, next); in cfg_t() [all …]
|
/external/mesa3d/src/mesa/main/ |
D | ff_fragment_shader.cpp | 364 val = new(p->mem_ctx) ir_dereference_variable(current); in get_current_attrib() 365 ir_rvalue *index = new(p->mem_ctx) ir_constant(attrib); in get_current_attrib() 366 return new(p->mem_ctx) ir_dereference_array(val, index); in get_current_attrib() 375 return new(p->mem_ctx) ir_dereference_variable(var); in get_gl_Color() 390 return new(p->mem_ctx) ir_dereference_variable(p->src_texture[unit]); in get_source() 400 return new(p->mem_ctx) in get_source() 406 deref = new(p->mem_ctx) ir_dereference_variable(var); in get_source() 408 return new(p->mem_ctx) ir_dereference_array(deref, in get_source() 409 new(p->mem_ctx) ir_constant(unit)); in get_source() 414 return new(p->mem_ctx) ir_dereference_variable(var); in get_source() [all …]
|
/external/mesa3d/src/util/ |
D | u_dynarray.h | 46 void *mem_ctx; member 53 util_dynarray_init(struct util_dynarray *buf, void *mem_ctx) in util_dynarray_init() argument 56 buf->mem_ctx = mem_ctx; in util_dynarray_init() 63 if (buf->mem_ctx) { in util_dynarray_fini() 68 util_dynarray_init(buf, buf->mem_ctx); in util_dynarray_fini() 92 if (buf->mem_ctx) { in util_dynarray_resize() 93 buf->data = reralloc_size(buf->mem_ctx, buf->data, buf->capacity); in util_dynarray_resize() 116 if (buf->mem_ctx) { in util_dynarray_trim() 117 buf->data = reralloc_size(buf->mem_ctx, buf->data, buf->size); in util_dynarray_trim() 123 if (buf->mem_ctx) { in util_dynarray_trim()
|