Lines Matching refs:vec
452 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
454 vec->definitions[0] = Definition(dst);
461 vec->operands[i] = Operand(src);
464 vec->operands[i] = Operand::zero(component_bytes);
468 ctx->block->instructions.emplace_back(std::move(vec));
474 byte_align_scalar(isel_context* ctx, Temp vec, Operand offset, Temp dst)
491 if (vec.size() == 1) {
492 bld.sop2(aco_opcode::s_lshr_b32, Definition(dst), bld.def(s1, scc), vec, shift);
493 } else if (vec.size() == 2) {
495 bld.sop2(aco_opcode::s_lshr_b64, Definition(tmp), bld.def(s1, scc), vec, shift);
500 } else if (vec.size() == 3 || vec.size() == 4) {
502 if (vec.size() == 3) {
505 bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), vec);
508 bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), vec);
525 byte_align_vector(isel_context* ctx, Temp vec, Operand offset, Temp dst, unsigned component_size)
529 Temp tmp[4] = {vec, vec, vec, vec};
531 if (vec.size() == 4) {
534 Definition(tmp[2]), Definition(tmp[3]), vec);
535 } else if (vec.size() == 3) {
538 Definition(tmp[2]), vec);
539 } else if (vec.size() == 2) {
541 bld.pseudo(aco_opcode::p_split_vector, Definition(tmp[0]), Definition(tmp[1]), vec);
546 vec = tmp[0];
548 vec = bld.pseudo(aco_opcode::p_create_vector, bld.def(v2), tmp[0], tmp[1]);
553 unsigned num_components = vec.bytes() / component_size;
554 if (vec.regClass() == dst.regClass()) {
556 bld.copy(Definition(dst), vec);
561 emit_split_vector(ctx, vec, num_components);
568 elems[i - skip] = emit_extract_vector(ctx, vec, i, rc);
582 vec = bld.pseudo(aco_opcode::p_as_uniform, bld.def(RegClass(RegType::sgpr, vec.size())), vec);
583 byte_align_scalar(ctx, vec, offset, dst);
585 assert(dst.size() == vec.size());
586 bld.pseudo(aco_opcode::p_as_uniform, Definition(dst), vec);
706 Temp vec = get_ssa_temp(ctx, src->src.ssa);
710 if (vec.size() > 1) {
712 vec = emit_extract_vector(ctx, vec, swizzle / 2, s1);
720 bld.copy(Definition(tmp), vec);
722 bld.pseudo(aco_opcode::p_extract, Definition(tmp), bld.def(s1, scc), Operand(vec),
738 Temp vec = get_ssa_temp(ctx, src.src.ssa);
747 return emit_extract_vector(ctx, vec, 0, RegClass::get(vec.type(), elem_size * size));
750 assert(vec.bytes() % elem_size == 0);
752 if (elem_size < 4 && vec.type() == RegType::sgpr && size == 1) {
758 bool as_uniform = elem_size < 4 && vec.type() == RegType::sgpr;
760 vec = as_vgpr(ctx, vec);
762 RegClass elem_rc = elem_size < 4 ? RegClass(vec.type(), elem_size).as_subdword()
763 : RegClass(vec.type(), elem_size / 4);
765 return emit_extract_vector(ctx, vec, src.swizzle[0], elem_rc);
772 elems[i] = emit_extract_vector(ctx, vec, src.swizzle[i], elem_rc);
775 Temp dst = ctx->program->allocateTmp(RegClass(vec.type(), elem_size * size / 4));
779 return vec.type() == RegType::sgpr ? Builder(ctx->program, ctx->block).as_uniform(dst) : dst;
1398 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
1404 vec->operands[i] = Operand{elems[i]};
1406 vec->definitions[0] = Definition(dst);
1407 ctx->block->instructions.emplace_back(std::move(vec));
3230 Temp vec = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), Operand::zero(),
3233 Temp mul = bld.vop3(aco_opcode::v_mul_f64, bld.def(v2), trunc, vec);
3234 vec = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), Operand::zero(),
3237 Temp fma = bld.vop3(aco_opcode::v_fma_f64, bld.def(v2), floor, vec, trunc);
3320 Temp vec = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), Operand::zero(),
3323 Temp mul = bld.vop3(aco_opcode::v_mul_f64, bld.def(v2), trunc, vec);
3324 vec = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), Operand::zero(),
3327 Temp fma = bld.vop3(aco_opcode::v_fma_f64, bld.def(v2), floor, vec, trunc);
3735 Temp vec = get_ssa_temp(ctx, instr->src[0].src.ssa);
3737 if (vec.size() > 1) {
3738 vec = emit_extract_vector(ctx, vec, swizzle / 2, s1);
3742 bld.pseudo(aco_opcode::p_extract, Definition(dst), bld.def(s1, scc), Operand(vec),
3952 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
3956 vec->operands[i] = Operand::c32(instr->value[0].u64 >> i * 32);
3959 vec->operands[i] = Operand::c32(instr->value[i].u32);
3961 vec->definitions[0] = Definition(dst);
3962 ctx->block->instructions.emplace_back(std::move(vec));
4190 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
4193 vec->operands[j] = Operand(tmp[j]);
4195 vec->definitions[0] = Definition(tmp[0]);
4196 bld.insert(std::move(vec));
4243 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
4246 vec->operands[i] = Operand(allocated_vec[i]);
4248 vec->operands[info.num_components] = Operand(RegClass::get(RegType::vgpr, padding_bytes));
4251 vec->definitions[0] = Definition(tmp);
4252 bld.insert(std::move(vec));
4255 vec->definitions[0] = Definition(info.dst);
4256 bld.insert(std::move(vec));
4785 aco_ptr<Instruction> vec{create_instruction<Pseudo_instruction>(aco_opcode::p_create_vector,
4791 vec->operands[j] = Operand(tmp);
4793 vec->definitions[0] = Definition(dst[i]);
4794 bld.insert(std::move(vec));
5305 aco_ptr<Pseudo_instruction> vec(create_instruction<Pseudo_instruction>(
5309 vec->operands[i] = Operand(get_arg(ctx, ctx->args->ac.frag_pos[i]));
5311 vec->operands[i] = Operand(v1);
5315 vec->operands[3] =
5319 for (Operand& op : vec->operands)
5322 vec->definitions[0] = Definition(dst);
5323 ctx->block->instructions.emplace_back(std::move(vec));
5369 aco_ptr<Pseudo_instruction> vec(create_instruction<Pseudo_instruction>(
5374 vec->operands[i] = Operand(tmp);
5376 vec->definitions[0] = Definition(dst);
5377 ctx->block->instructions.emplace_back(std::move(vec));
5467 aco_ptr<Instruction> vec{create_instruction<Pseudo_instruction>(
5479 vec->operands[i] = Operand(elems[i]);
5481 vec->definitions[0] = Definition(dst);
5482 ctx->block->instructions.emplace_back(std::move(vec));
5665 aco_ptr<Instruction> vec{create_instruction<Pseudo_instruction>(
5673 vec->operands[i] = Operand(channel);
5678 vec->operands[i] = bitsize == 16 ? Operand::c16(0x3c00u) : Operand::c32(0x3f800000u);
5680 vec->operands[i] = Operand::get_const(ctx->options->gfx_level, 1u, bitsize / 8u);
5682 vec->operands[i] = Operand::zero(bitsize / 8u);
5685 vec->definitions[0] = Definition(dst);
5686 ctx->block->instructions.emplace_back(std::move(vec));
5727 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
5732 vec->operands[i] = bld.vintrp(
5736 vec->definitions[0] = Definition(dst);
5737 bld.insert(std::move(vec));
5849 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
5855 vec->operands[i] = Operand{elems[i]};
5857 vec->definitions[0] = Definition(dst);
5858 ctx->block->instructions.emplace_back(std::move(vec));
5869 Temp vec = dst;
5877 vec = fits_in_dword ? bld.tmp(s1) : bld.tmp(s2);
5881 vec = count == 4 ? bld.tmp(s4) : count > 1 ? bld.tmp(s2) : bld.tmp(s1);
5886 switch (vec.size()) {
5890 vec = bld.tmp(s4);
5895 vec = bld.tmp(s8);
5902 bld.smem(op, Definition(vec), ptr, index).instr->smem().prevent_overflow = true;
5906 byte_align_scalar(ctx, vec, byte_offset, dst);
5911 emit_split_vector(ctx, vec, 4);
5913 bld.pseudo(aco_opcode::p_create_vector, Definition(dst), emit_extract_vector(ctx, vec, 0, rc),
5914 emit_extract_vector(ctx, vec, 1, rc), emit_extract_vector(ctx, vec, 2, rc));
6034 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
6037 vec->operands[i] = Operand(coords[i]);
6038 vec->definitions[0] = Definition(coord);
6039 bld.insert(std::move(vec));
6196 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
6199 vec->operands[i] = Operand::zero();
6200 vec->definitions[0] = Definition(tmp);
6205 vec->definitions[0].setNoCSE(true);
6206 bld.insert(std::move(vec));
6408 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
6412 vec->operands[index++] = Operand(emit_extract_vector(ctx, data, bit, rc));
6415 vec->definitions[0] = Definition(data);
6416 bld.insert(std::move(vec));
9394 get_const_vec(nir_ssa_def* vec, nir_const_value* cv[4])
9396 if (vec->parent_instr->type != nir_instr_type_alu)
9398 nir_alu_instr* vec_instr = nir_instr_as_alu(vec->parent_instr);
9399 if (vec_instr->op != nir_op_vec(vec->num_components))
9402 for (unsigned i = 0; i < vec->num_components; i++) {
9779 aco_ptr<Instruction> vec{create_instruction<Pseudo_instruction>(
9782 vec->operands[i] = Operand(desc[i]);
9784 vec->definitions[0] = Definition(resource);
9785 ctx->block->instructions.emplace_back(std::move(vec));
10193 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
10196 vec->operands[i] = Operand::zero();
10197 vec->definitions[0] = Definition(dst);
10198 ctx->block->instructions.emplace_back(std::move(vec));
11474 aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
11477 vec->operands[i] = Operand(ctx->outputs.temps[loc * 4 + start + i]);
11478 vec->definitions[0] = Definition(write_data);
11479 ctx->block->instructions.emplace_back(std::move(vec));