/third_party/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 | 62 void setup_for_load_or_store(void *mem_ctx, 71 ir_expression *ubo_load(void *mem_ctx, const struct glsl_type *type, 73 ir_call *ssbo_load(void *mem_ctx, const struct glsl_type *type, 79 void write_to_memory(void *mem_ctx, ir_dereference *deref, ir_variable *var, 81 ir_call *ssbo_store(void *mem_ctx, ir_rvalue *deref, ir_rvalue *offset, 92 void insert_buffer_access(void *mem_ctx, ir_dereference *deref, 104 ir_expression *emit_ssbo_get_buffer_size(void *mem_ctx); 130 interface_field_name(void *mem_ctx, char *base_name, ir_rvalue *d, in interface_field_name() argument 200 name_copy = ralloc_strdup(mem_ctx, base_name); in interface_field_name() 218 ir_constant *base_size = new(mem_ctx) in interface_field_name() [all …]
|
D | lower_shared_reference.cpp | 75 void insert_buffer_access(void *mem_ctx, ir_dereference *deref, 89 ir_call *shared_load(void *mem_ctx, const struct glsl_type *type, 91 ir_call *shared_store(void *mem_ctx, ir_rvalue *deref, ir_rvalue *offset, 138 void *mem_ctx = ralloc_parent(shader->ir); in handle_rvalue() local 147 setup_buffer_access(mem_ctx, deref, in handle_rvalue() 155 ir_variable *load_var = new(mem_ctx) ir_variable(type, in handle_rvalue() 160 ir_variable *load_offset = new(mem_ctx) ir_variable(glsl_type::uint_type, in handle_rvalue() 166 deref = new(mem_ctx) ir_dereference_variable(load_var); in handle_rvalue() 168 emit_access(mem_ctx, false, deref, load_offset, const_offset, row_major, in handle_rvalue() 199 void *mem_ctx = ralloc_parent(shader->ir); in handle_assignment() local [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 __anon6819c9280111::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 | lower_packed_varyings.cpp | 168 lower_packed_varyings_visitor(void *mem_ctx, 200 void * const mem_ctx; member in __anond946c1430111::lower_packed_varyings_visitor 251 void *mem_ctx, unsigned locations_used, const uint8_t *components, in lower_packed_varyings_visitor() argument 256 : mem_ctx(mem_ctx), in lower_packed_varyings_visitor() 260 rzalloc_array_size(mem_ctx, sizeof(*packed_varyings), in lower_packed_varyings_visitor() 307 = new(this->mem_ctx) ir_dereference_variable(var); in run() 335 rhs = new(this->mem_ctx) in bitwise_assign_pack() 339 rhs = new(this->mem_ctx) in bitwise_assign_pack() 345 ir_variable *t = new(mem_ctx) ir_variable(lhs->type, "pack", ir_var_temporary); in bitwise_assign_pack() 350 … assign(t, u2i(expr(ir_unop_unpack_double_2x32, swizzle_x(rhs->clone(mem_ctx, NULL)))), 0x3)); in bitwise_assign_pack() [all …]
|
D | lower_discard_flow.cpp | 57 mem_ctx = ralloc_parent(discarded); in lower_discard_flow_visitor() 72 void *mem_ctx; member in __anon2064809a0111::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 | 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.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 | 176 move_block_to_cond_assign(void *mem_ctx, in move_block_to_cond_assign() argument 199 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign() 201 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign() 204 assign->condition = cond_expr->clone(mem_ctx, NULL); in move_block_to_cond_assign() 208 new(mem_ctx) ir_expression(ir_binop_logic_and, in move_block_to_cond_assign() 210 cond_expr->clone(mem_ctx, NULL), in move_block_to_cond_assign() 275 void *mem_ctx = ralloc_parent(ir); in visit_leave() local 282 new(mem_ctx) ir_variable(glsl_type::bool_type, in visit_leave() 288 new(mem_ctx) ir_dereference_variable(then_var); in visit_leave() 290 assign = new(mem_ctx) ir_assignment(then_cond, ir->condition); in visit_leave() [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() 130 new(mem_ctx) ir_expression(ir_binop_add, from->type, from, increment); in calculate_iterations() 134 ? new(mem_ctx) ir_expression(op, glsl_type::bool_type, to, first_value) in calculate_iterations() 135 : new(mem_ctx) ir_expression(op, glsl_type::bool_type, first_value, to); in calculate_iterations() [all …]
|
D | opt_structure_splitting.cpp | 53 this->mem_ctx = NULL; in variable_entry() 70 void *mem_ctx; member in __anon0a7b74810111::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 __anon0a7b74810111::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 | lower_xfb_varying.cpp | 42 explicit lower_xfb_var_splicer(void *mem_ctx, 55 void * const mem_ctx; member in __anon8f5d19080111::lower_xfb_var_splicer 68 lower_xfb_var_splicer::lower_xfb_var_splicer(void *mem_ctx, gl_shader_stage stage, in lower_xfb_var_splicer() argument 70 : mem_ctx(mem_ctx), stage(stage), instructions(instructions) in lower_xfb_var_splicer() 78 node->insert_before(ir->clone(this->mem_ctx, NULL)); in append_instructions() 109 sig->body.push_tail(ir->clone(this->mem_ctx, NULL)); in visit_leave() 137 generate_new_name(void *mem_ctx, const char *name) in generate_new_name() argument 142 new_name = ralloc_strdup(mem_ctx, name); in generate_new_name() 212 lower_xfb_varying(void *mem_ctx, in lower_xfb_varying() argument 221 if (!get_deref(mem_ctx, old_var_name, shader, &deref, &type)) { in lower_xfb_varying() [all …]
|
D | lower_vector_derefs.cpp | 35 vector_deref_visitor(void *mem_ctx, gl_shader_stage shader_stage) in vector_deref_visitor() argument 37 factory(&factory_instructions, mem_ctx) in vector_deref_visitor() 78 void *mem_ctx = ralloc_parent(ir); in visit_enter() local 80 deref->array_index->constant_expression_value(mem_ctx); in visit_enter() 98 ir->set_lhs(new(mem_ctx) ir_dereference_variable(src_temp)); in visit_enter() 106 ir_constant::zero(factory.mem_ctx, deref->array_index->type); in visit_enter() 109 ir_rvalue *const lhs_clone = new_lhs->clone(factory.mem_ctx, NULL); in visit_enter() 111 new(mem_ctx) ir_dereference_variable(src_temp); in visit_enter() 116 new(mem_ctx) ir_assignment(lhs_clone->as_dereference(), in visit_enter() 123 new(mem_ctx) ir_assignment(swizzle(lhs_clone, i, 1), in visit_enter() [all …]
|
D | opt_array_splitting.cpp | 56 this->mem_ctx = NULL; in variable_entry() 78 void *mem_ctx; member in __anon1e42ba6f0111::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 __anon1e42ba6f0111::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 | ir_constant_expression.cpp | 689 ir_expression::constant_expression_value(void *mem_ctx, in constant_expression_value() argument 692 assert(mem_ctx); in constant_expression_value() 705 this->operands[operand]->constant_expression_value(mem_ctx, in constant_expression_value() 725 op[operand] = new(mem_ctx) ir_constant(float_type, &f); in constant_expression_value() 740 op[operand] = new(mem_ctx) ir_constant(int_type, &d); in constant_expression_value() 755 op[operand] = new(mem_ctx) ir_constant(uint_type, &d); in constant_expression_value() 828 return new(mem_ctx) ir_constant(op[0]->has_value(op[1])); in constant_expression_value() 830 return new(mem_ctx) ir_constant(!op[0]->has_value(op[1])); in constant_expression_value() 845 return new(mem_ctx) ir_constant(this->type, &f); in constant_expression_value() 852 return new(mem_ctx) ir_constant(this->type, &d); in constant_expression_value() [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_named_interface_blocks.cpp | 83 process_array_ir(void * const mem_ctx, in process_array_ir() argument 91 return new(mem_ctx) ir_dereference_array(deref_var, in process_array_ir() 94 deref_array = (ir_dereference_array *) process_array_ir(mem_ctx, in process_array_ir() 97 return new(mem_ctx) ir_dereference_array(deref_array, in process_array_ir() 107 void * const mem_ctx; member in __anon6af2cabb0111::flatten_named_interface_blocks_declarations 110 flatten_named_interface_blocks_declarations(void *mem_ctx) in flatten_named_interface_blocks_declarations() argument 111 : mem_ctx(mem_ctx), in flatten_named_interface_blocks_declarations() 158 ralloc_asprintf(mem_ctx, "%s %s.%s.%s", in run() 168 ralloc_strdup(mem_ctx, iface_t->fields.structure[i].name); in run() 171 new(mem_ctx) ir_variable(iface_t->fields.structure[i].type, in run() [all …]
|
/third_party/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 73 this->mem_ctx = ralloc_context(NULL); in SetUp() 86 ralloc_free(this->mem_ctx); in TearDown() 87 this->mem_ctx = NULL; in TearDown() 164 non_array_test(void *mem_ctx, struct gl_shader_program *prog, in non_array_test() argument 176 generate_data(mem_ctx, base_type, columns, rows, val); in non_array_test() 178 linker::set_uniform_initializer(mem_ctx, prog, name, type, val, 0xF00F); in non_array_test() 186 non_array_test(mem_ctx, prog, actual_index, name, GLSL_TYPE_INT, 1, 1); in TEST_F() 191 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, 59 return ralloc_asprintf(mem_ctx, in interface_field_name() 65 void *mem_ctx; member in link_varyings 79 this->mem_ctx = ralloc_context(NULL); in SetUp() 106 ralloc_free(this->mem_ctx); in TearDown() 107 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 62 mem_ctx = ralloc_context(NULL); in SetUp() 66 body = new ir_factory(&instructions, mem_ctx); in SetUp() 75 ralloc_free(mem_ctx); in TearDown() 76 mem_ctx = NULL; in TearDown() 82 create_variable(void *mem_ctx, const glsl_type *type) in create_variable() argument 84 ir_variable *var = new(mem_ctx) ir_variable(type, in create_variable() 88 return new(mem_ctx) ir_dereference_variable(var); in create_variable() 92 create_expression(void *mem_ctx, const glsl_type *type) in create_expression() argument 94 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 98 mem_ctx = ralloc_context(NULL); in SetUp() 101 body = new ir_factory(&instructions, mem_ctx); in SetUp() 120 ralloc_free(mem_ctx); in TearDown() 121 mem_ctx = NULL; in TearDown() 129 void *mem_ctx = ralloc_parent(array.val); in deref_array() local 131 ir_rvalue *val = new(mem_ctx) ir_dereference_array(array.val, index.val); in deref_array() 139 void *mem_ctx = ralloc_parent(s.val); in deref_struct() local 141 ir_rvalue *val = new(mem_ctx) ir_dereference_record(s.val, field); in deref_struct() 213 new(mem_ctx) ir_variable(glsl_type::int_type, "a", ir_var_auto); in TEST_F() [all …]
|
/third_party/mesa3d/src/intel/compiler/ |
D | brw_cfg.cpp | 50 link(void *mem_ctx, bblock_t *block, enum bblock_link_kind kind) in link() argument 52 bblock_link *l = new(mem_ctx) bblock_link(block, kind); in link() 57 push_stack(exec_list *list, void *mem_ctx, bblock_t *block) in push_stack() argument 62 list->push_tail(link(mem_ctx, block, bblock_link_logical)); in push_stack() 74 bblock_t::add_successor(void *mem_ctx, bblock_t *successor, in add_successor() argument 77 successor->parents.push_tail(::link(mem_ctx, this, kind)); in add_successor() 78 children.push_tail(::link(mem_ctx, successor, kind)); in add_successor() 172 mem_ctx = ralloc_context(NULL); in cfg_t() 204 push_stack(&if_stack, mem_ctx, cur_if); in cfg_t() 205 push_stack(&else_stack, mem_ctx, cur_else); in cfg_t() [all …]
|
/third_party/mesa3d/src/compiler/nir/ |
D | nir_lower_goto_ifs.c | 113 sorted_block_arr_for_set(const struct set *block_set, void *mem_ctx) in sorted_block_arr_for_set() argument 116 nir_block **block_arr = ralloc_array(mem_ctx, nir_block *, num_blocks); in sorted_block_arr_for_set() 294 void *mem_ctx) in loop_routing_start() argument 311 struct routes *routing_backup = rzalloc(mem_ctx, struct routes); in loop_routing_start() 335 struct path_fork *fork = rzalloc(mem_ctx, struct path_fork); in loop_routing_start() 345 struct path_fork *fork = rzalloc(mem_ctx, struct path_fork); in loop_routing_start() 431 struct set *reach, struct set *brk_reachable, void *mem_ctx) in inside_outside() argument 434 struct set *remaining = _mesa_pointer_set_create(mem_ctx); in inside_outside() 490 brk_reachable, mem_ctx); in inside_outside() 510 nir_function_impl *impl, bool need_var, void *mem_ctx) in select_fork_recur() argument [all …]
|
D | nir_split_vars.c | 33 get_complex_used_vars(nir_shader *shader, void *mem_ctx) in get_complex_used_vars() argument 35 struct set *complex_vars = _mesa_pointer_set_create(mem_ctx); in get_complex_used_vars() 62 void *mem_ctx; member 125 field->fields = ralloc_array(state->mem_ctx, struct field, in init_field_for_type() 130 field_name = ralloc_asprintf(state->mem_ctx, "%s_%s", name, in init_field_for_type() 133 field_name = ralloc_asprintf(state->mem_ctx, "{unnamed %s}_%s", in init_field_for_type() 162 void *mem_ctx) in split_var_list_structs() argument 165 .mem_ctx = mem_ctx, in split_var_list_structs() 184 *complex_vars = get_complex_used_vars(shader, mem_ctx); in split_var_list_structs() 199 struct field *root_field = ralloc(mem_ctx, struct field); in split_var_list_structs() [all …]
|
/third_party/mesa3d/src/mesa/main/ |
D | ff_fragment_shader.cpp | 362 return new(p->mem_ctx) ir_dereference_variable(current); in get_current_attrib() 371 return new(p->mem_ctx) ir_dereference_variable(var); in get_gl_Color() 386 return new(p->mem_ctx) ir_dereference_variable(p->src_texture[unit]); in get_source() 396 return new(p->mem_ctx) in get_source() 402 deref = new(p->mem_ctx) ir_dereference_variable(var); in get_source() 404 return new(p->mem_ctx) ir_dereference_array(deref, in get_source() 405 new(p->mem_ctx) ir_constant(unit)); in get_source() 410 return new(p->mem_ctx) ir_dereference_variable(var); in get_source() 413 return new(p->mem_ctx) ir_constant(0.0f); in get_source() 416 return new(p->mem_ctx) ir_constant(1.0f); in get_source() [all …]
|