Lines Matching refs:ctx
312 void *ctx = state;
338 from = new(ctx) ir_expression(op, to, from, NULL);
937 void *ctx = state;
1028 *out_rvalue = needs_rvalue ? ir_rvalue::error_value(ctx) : NULL;
1041 ir_variable *var = new(ctx) ir_variable(rhs->type, "assignment_tmp",
1047 new(ctx) ir_dereference_variable(var);
1048 instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var));
1049 rvalue = new(ctx) ir_dereference_variable(var);
1051 rvalue = ir_rvalue::error_value(ctx);
1056 instructions->push_tail(new(ctx) ir_assignment(lhs, rhs));
1066 void *ctx = ralloc_parent(lvalue);
1069 var = new(ctx) ir_variable(lvalue->type, "_post_incdec_tmp",
1073 instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var),
1076 return new(ctx) ir_dereference_variable(var);
1216 void *ctx = state;
1230 return new(ctx) ir_constant(true);
1295 constant_one_for_inc_dec(void *ctx, const glsl_type *type)
1299 return new(ctx) ir_constant((unsigned) 1);
1301 return new(ctx) ir_constant(1);
1303 return new(ctx) ir_constant((uint64_t) 1);
1305 return new(ctx) ir_constant((int64_t) 1);
1308 return new(ctx) ir_constant(1.0f);
1349 void *ctx = state;
1448 result = new(ctx) ir_expression(operations[this->oper], type,
1464 result = new(ctx) ir_expression(operations[this->oper], type,
1476 result = new(ctx) ir_expression(operations[this->oper], type,
1491 result = new(ctx) ir_expression(operations[this->oper], type,
1520 result = new(ctx) ir_expression(operations[this->oper], type,
1567 result = new(ctx) ir_constant(false);
1569 result = do_comparison(ctx, operations[this->oper], op[0], op[1]);
1580 result = new(ctx) ir_expression(operations[this->oper], type,
1598 result = new(ctx) ir_expression(ir_unop_bit_not, type, op[0], NULL);
1609 result = new(ctx) ir_expression(ir_binop_logic_and, op[0], op[1]);
1611 ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
1616 ir_if *const stmt = new(ctx) ir_if(op[0]);
1620 ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
1622 new(ctx) ir_assignment(then_deref, op[1]);
1625 ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
1627 new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false));
1630 result = new(ctx) ir_dereference_variable(tmp);
1643 result = new(ctx) ir_expression(ir_binop_logic_or, op[0], op[1]);
1645 ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
1650 ir_if *const stmt = new(ctx) ir_if(op[0]);
1653 ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
1655 new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true));
1659 ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
1661 new(ctx) ir_assignment(else_deref, op[1]);
1664 result = new(ctx) ir_dereference_variable(tmp);
1681 result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type,
1689 result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type,
1707 result = ir_rvalue::error_value(ctx);
1722 ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
1728 op[0]->clone(ctx, NULL), temp_rhs,
1749 result = ir_rvalue::error_value(ctx);
1766 temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
1772 op[0]->clone(ctx, NULL), temp_rhs,
1788 result = ir_rvalue::error_value(ctx);
1794 ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
1799 op[0]->clone(ctx, NULL), temp_rhs,
1816 result = ir_rvalue::error_value(ctx);
1830 ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
1835 op[0]->clone(ctx, NULL), temp_rhs,
1910 ir_constant *cond_val = op[0]->constant_expression_value(ctx);
1924 new(ctx) ir_variable(type, "conditional_tmp", ir_var_temporary);
1927 ir_if *const stmt = new(ctx) ir_if(op[0]);
1932 new(ctx) ir_dereference_variable(tmp);
1934 new(ctx) ir_assignment(then_deref, op[1]);
1939 new(ctx) ir_dereference_variable(tmp);
1941 new(ctx) ir_assignment(else_deref, op[2]);
1944 result = new(ctx) ir_dereference_variable(tmp);
1955 op[1] = constant_one_for_inc_dec(ctx, op[0]->type);
1960 temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
1966 op[0]->clone(ctx, NULL), temp_rhs,
1977 op[1] = constant_one_for_inc_dec(ctx, op[0]->type);
1982 result = ir_rvalue::error_value(ctx);
1989 temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
1995 result = get_lvalue_copy(instructions, op[0]->clone(ctx, NULL));
2001 op[0]->clone(ctx, NULL), temp_rhs,
2023 result = _mesa_ast_array_index_to_hir(ctx, state, op[0], op[1],
2052 sub_name = ralloc_asprintf(ctx, "%s_%s", _mesa_shader_stage_to_subroutine_prefix(state->stage), this->primary_expression.identifier);
2059 result = new(ctx) ir_dereference_variable(var);
2099 result = ir_rvalue::error_value(ctx);
2106 result = new(ctx) ir_constant(this->primary_expression.int_constant);
2110 result = new(ctx) ir_constant(this->primary_expression.uint_constant);
2114 result = new(ctx) ir_constant(this->primary_expression.float_constant);
2118 result = new(ctx) ir_constant(bool(this->primary_expression.bool_constant));
2122 result = new(ctx) ir_constant(this->primary_expression.double_constant);
2126 result = new(ctx) ir_constant(this->primary_expression.uint64_constant);
2130 result = new(ctx) ir_constant(this->primary_expression.int64_constant);
4954 void *ctx = state;
5289 name = ralloc_asprintf(ctx, "%s_%s", _mesa_shader_stage_to_subroutine_prefix(state->stage), decl->identifier);
5297 var = new(ctx) ir_variable(var_type, identifier, ir_var_auto);
5883 void *ctx = state;
5942 ir_variable *var = new(ctx)
6059 void *ctx = state;
6201 f = new(ctx) ir_function(name);
6317 sig = new(ctx) ir_function_signature(return_type);
6471 void *ctx = state;
6533 inst = new(ctx) ir_return(ret);
6544 inst = new(ctx) ir_return;
6559 instructions->push_tail(new(ctx) ir_discard);
6585 clone_ir_list(ctx, instructions,
6597 ir_rvalue *const true_val = new (ctx) ir_constant(true);
6599 new(ctx) ir_dereference_variable(state->switch_state.continue_inside);
6600 instructions->push_tail(new(ctx) ir_assignment(deref_continue_inside_var,
6606 new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
6613 new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
6617 new(ctx) ir_loop_jump((mode == ast_break)
6637 void *ctx = state;
6646 instructions->push_tail(new(ctx) ir_demote);
6656 void *ctx = state;
6676 ir_if *const stmt = new(ctx) ir_if(condition);
6744 void *ctx = state;
6777 ir_rvalue *const is_fallthru_val = new (ctx) ir_constant(false);
6779 new(ctx) ir_variable(glsl_type::bool_type,
6785 new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var);
6786 instructions->push_tail(new(ctx) ir_assignment(deref_is_fallthru_var,
6792 new(ctx) ir_variable(glsl_type::bool_type,
6797 ir_rvalue *const false_val = new (ctx) ir_constant(false);
6799 new(ctx) ir_dereference_variable(state->switch_state.continue_inside);
6800 instructions->push_tail(new(ctx) ir_assignment(deref_continue_inside_var,
6804 new(ctx) ir_variable(glsl_type::bool_type,
6810 ir_loop * loop = new(ctx) ir_loop();
6822 ir_loop_jump *jump = new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
6828 new(ctx) ir_dereference_variable(state->switch_state.continue_inside);
6829 ir_if *irif = new(ctx) ir_if(deref_continue_inside);
6830 ir_loop_jump *jump = new(ctx) ir_loop_jump(ir_loop_jump::jump_continue);
6834 clone_ir_list(ctx, &irif->then_instructions,
6859 void *ctx = state;
6869 state->switch_state.test_var = new(ctx) ir_variable(test_val->type,
6873 new(ctx) ir_dereference_variable(state->switch_state.test_var);
6876 instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val));
7130 void *ctx = state;
7147 new(ctx) ir_expression(ir_unop_logic_not, cond);
7149 ir_if *const if_stmt = new(ctx) ir_if(not_cond);
7152 new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
7165 void *ctx = state;
7175 ir_loop *const stmt = new(ctx) ir_loop();