src[i] = get_alu_src(ctx, instr->src[i], src_components);
switch (instr->op) {
- case nir_op_fmov:
- case nir_op_imov:
+ case nir_op_mov:
result = src[0];
break;
case nir_op_fneg:
struct qreg result;
switch (instr->op) {
- case nir_op_fmov:
- case nir_op_imov:
+ case nir_op_mov:
result = vir_MOV(c, src[0]);
break;
case ir_unop_bitcast_d2u64:
case ir_unop_subroutine_to_int:
/* no-op */
- result = nir_imov(&b, srcs[0]);
+ result = nir_mov(&b, srcs[0]);
break;
case ir_unop_trunc: result = nir_ftrunc(&b, srcs[0]); break;
case ir_unop_ceil: result = nir_fceil(&b, srcs[0]); break;
nir_op_vec(unsigned components)
{
switch (components) {
- case 1: return nir_op_imov;
+ case 1: return nir_op_mov;
case 2: return nir_op_vec2;
case 3: return nir_op_vec3;
case 4: return nir_op_vec4;
nir_mov_alu(nir_builder *build, nir_alu_src src, unsigned num_components)
{
assert(!src.abs && !src.negate);
- nir_alu_instr *mov = nir_alu_instr_create(build->shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(build->shader, nir_op_mov);
nir_ssa_dest_init(&mov->instr, &mov->dest.dest, num_components,
nir_src_bit_size(src.src), NULL);
mov->exact = build->exact;
else
assert(src.reg.reg->num_components >= dest_src.reg.reg->num_components);
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
nir_src_copy(&mov->src[0].src, &src, mov);
mov->dest.dest = nir_dest_for_reg(dest_src.reg.reg);
mov->dest.write_mask = (1 << dest_src.reg.reg->num_components) - 1;
}
}
- nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov);
mov->src[0].src = nir_src_for_ssa(def);
mov->dest.dest = nir_dest_for_reg(reg);
mov->dest.write_mask = (1 << reg->num_components) - 1;
nir_register *reg = create_reg_for_ssa_def(&phi->dest.ssa, impl);
- nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov);
mov->src[0].src = nir_src_for_reg(reg);
mov->dest.write_mask = (1 << phi->dest.ssa.num_components) - 1;
nir_ssa_dest_init(&mov->instr, &mov->dest.dest,
nir_register *reg = create_reg_for_ssa_def(&load->def, state.impl);
nir_ssa_def_rewrite_uses(&load->def, nir_src_for_reg(reg));
- nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov);
mov->src[0].src = nir_src_for_ssa(&load->def);
mov->dest.dest = nir_dest_for_reg(reg);
mov->dest.write_mask = (1 << reg->num_components) - 1;
assert(alu->dest.dest.is_ssa);
const nir_op_info *info = &nir_op_infos[alu->op];
switch (alu->op) {
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
case nir_op_vec2:
case nir_op_vec3:
case nir_op_vec4:
/* These we expect to have booleans but the opcode doesn't change */
break;
- case nir_op_b2f32: alu->op = nir_op_fmov; break;
- case nir_op_b2i32: alu->op = nir_op_fmov; break;
+ case nir_op_b2f32: alu->op = nir_op_mov; break;
+ case nir_op_b2i32: alu->op = nir_op_mov; break;
case nir_op_f2b1:
case nir_op_i2b1:
rep = nir_sne(b, nir_ssa_for_alu_src(b, alu, 0),
case nir_op_bcsel: alu->op = nir_op_fcsel; break;
- case nir_op_imov: alu->op = nir_op_fmov; break;
case nir_op_iand: alu->op = nir_op_fmul; break;
case nir_op_ixor: alu->op = nir_op_sne; break;
case nir_op_ior: alu->op = nir_op_fmax; break;
assert(alu->dest.dest.is_ssa);
switch (alu->op) {
- case nir_op_imov:
+ case nir_op_mov:
case nir_op_vec2:
case nir_op_vec3:
case nir_op_vec4:
/* These we expect to have integers or booleans but the opcode doesn't change */
break;
- case nir_op_b2f32: alu->op = nir_op_fmov; break;
- case nir_op_b2i32: alu->op = nir_op_fmov; break;
- case nir_op_i2f32: alu->op = nir_op_fmov; break;
- case nir_op_f2i32: alu->op = nir_op_fmov; break;
+ case nir_op_b2f32: alu->op = nir_op_mov; break;
+ case nir_op_b2i32: alu->op = nir_op_mov; break;
+ case nir_op_i2f32: alu->op = nir_op_mov; break;
+ case nir_op_f2i32: alu->op = nir_op_mov; break;
case nir_op_f2i1:
case nir_op_f2b1:
case nir_op_i2b1:
case nir_op_iadd: alu->op = nir_op_fadd; break;
case nir_op_isub: alu->op = nir_op_fsub; break;
case nir_op_imul: alu->op = nir_op_fmul; break;
- case nir_op_imov: alu->op = nir_op_fmov; break;
case nir_op_iand: alu->op = nir_op_fmul; break;
case nir_op_ixor: alu->op = nir_op_sne; break;
case nir_op_ior: alu->op = nir_op_fmax; break;
b->cursor = nir_before_instr(&intrin->instr);
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
mov->src[0].src = get_deref_reg_src(deref, state);
mov->dest.write_mask = (1 << intrin->num_components) - 1;
if (intrin->dest.is_ssa) {
nir_src reg_src = get_deref_reg_src(deref, state);
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
nir_src_copy(&mov->src[0].src, &intrin->src[1], mov);
mov->dest.write_mask = nir_intrinsic_write_mask(intrin);
mov->dest.dest.is_ssa = false;
nir_foreach_phi_src(src, phi) {
/* We need to insert a mov to grab the i'th component of src */
nir_alu_instr *mov = nir_alu_instr_create(state->mem_ctx,
- nir_op_imov);
+ nir_op_mov);
nir_ssa_dest_init(&mov->instr, &mov->dest.dest, 1, bit_size, NULL);
mov->dest.write_mask = 1;
nir_src_copy(&mov->src[0].src, &src->src, state->mem_ctx);
assert(child_src->is_ssa);
nir_alu_instr *child_alu = nir_instr_as_alu(child_src->parent_instr);
- child_alu->op = nir_op_fmov;
+ child_alu->op = nir_op_mov;
child_alu->dest.saturate = false;
/* We could propagate the dest of our instruction to the
* destinations of the uses here. However, one quick round of
continue;
nir_alu_instr *mov = nir_alu_instr_create(state->shader,
- nir_op_imov);
+ nir_op_mov);
mov->src[0].src = nir_src_for_ssa(
nir_phi_builder_value_get_block_def(node->pb_value, block));
for (unsigned i = intrin->num_components; i < NIR_MAX_VEC_COMPONENTS; i++)
{
assert(start_idx < nir_op_infos[vec->op].num_inputs);
- nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov);
nir_alu_src_copy(&mov->src[0], &vec->src[start_idx], mov);
nir_alu_dest_copy(&mov->dest, &vec->dest, mov);
def unop_numeric_convert(name, out_type, in_type, const_expr):
opcode(name, 0, out_type, [0], [in_type], True, "", const_expr)
-# These two move instructions differ in what modifiers they support and what
-# the negate modifier means. Otherwise, they are identical.
-unop("fmov", tfloat, "src0")
-unop("imov", tint, "src0")
+unop("mov", tuint, "src0")
unop("ineg", tint, "-src0")
unop("fneg", tfloat, "-src0")
unsigned dst_bit_size = nir_alu_type_get_type_size(dst);
if (src == dst && src_base == nir_type_float) {
- return nir_op_fmov;
+ return nir_op_mov;
} else if (src == dst && src_base == nir_type_bool) {
- return nir_op_imov;
+ return nir_op_mov;
} else if ((src_base == nir_type_int || src_base == nir_type_uint) &&
(dst_base == nir_type_int || dst_base == nir_type_uint) &&
src_bit_size == dst_bit_size) {
/* Integer <-> integer conversions with the same bit-size on both
* ends are just no-op moves.
*/
- return nir_op_imov;
+ return nir_op_mov;
}
switch (src_base) {
* will clean these up. This is similar to nir_replace_instr (in
* nir_search.c).
*/
- nir_alu_instr *mov_add = nir_alu_instr_create(mem_ctx, nir_op_imov);
+ nir_alu_instr *mov_add = nir_alu_instr_create(mem_ctx, nir_op_mov);
mov_add->dest.write_mask = orig_add->dest.write_mask;
nir_ssa_dest_init(&mov_add->instr, &mov_add->dest.dest,
orig_add->dest.dest.ssa.num_components,
nir_builder_instr_insert(bld, &mov_add->instr);
- nir_alu_instr *mov_cmp = nir_alu_instr_create(mem_ctx, nir_op_imov);
+ nir_alu_instr *mov_cmp = nir_alu_instr_create(mem_ctx, nir_op_mov);
mov_cmp->dest.write_mask = orig_cmp->dest.write_mask;
nir_ssa_dest_init(&mov_cmp->instr, &mov_cmp->dest.dest,
orig_cmp->dest.dest.ssa.num_components,
{
assert(instr->src[0].src.is_ssa);
- if (instr->op != nir_op_fmov &&
- instr->op != nir_op_imov)
+ if (instr->op != nir_op_mov)
return false;
if (instr->dest.saturate)
nir_ssa_def *def;
unsigned new_swizzle[NIR_MAX_VEC_COMPONENTS] = {0, 0, 0, 0};
- if (alu_instr->op == nir_op_fmov ||
- alu_instr->op == nir_op_imov) {
+ if (alu_instr->op == nir_op_mov) {
for (unsigned i = 0; i < NIR_MAX_VEC_COMPONENTS; i++)
new_swizzle[i] = alu_instr->src[0].swizzle[src->swizzle[i]];
def = alu_instr->src[0].src.ssa;
* should be one of the other two operands, so the result of the bcsel
* should never be replaced with undef.
*
- * nir_op_vec{2,3,4}, nir_op_imov, and nir_op_fmov are excluded because
- * they can easily lead to infinite optimization loops.
+ * nir_op_vec{2,3,4} and nir_op_mov are excluded because they can easily
+ * lead to infinite optimization loops.
*/
if (alu->op == nir_op_bcsel ||
alu->op == nir_op_b32csel ||
alu->op == nir_op_vec2 ||
alu->op == nir_op_vec3 ||
alu->op == nir_op_vec4 ||
- alu->op == nir_op_imov ||
- alu->op == nir_op_fmov ||
+ alu->op == nir_op_mov ||
alu_instr_is_comparison(alu) ||
alu_instr_is_type_conversion(alu))
continue;
case nir_instr_type_alu: {
nir_alu_instr *mov = nir_instr_as_alu(instr);
switch (mov->op) {
- case nir_op_fmov:
- case nir_op_imov:
+ case nir_op_mov:
case nir_op_fneg:
case nir_op_ineg:
case nir_op_fabs:
return NULL;
nir_alu_instr *alu = nir_instr_as_alu(ssa->parent_instr);
- return (alu->op == nir_op_imov || alu->op == nir_op_fmov) ? alu : NULL;
+ return (alu->op == nir_op_mov) ? alu : NULL;
}
static bool
memset(&empty_src, 0, sizeof(empty_src));
nir_instr_rewrite_src(&instr->instr, &instr->src[1].src, empty_src);
nir_instr_rewrite_src(&instr->instr, &instr->src[2].src, empty_src);
- instr->op = nir_op_imov;
+ instr->op = nir_op_mov;
return true;
}
if (alu->op != nir_op_vec2 &&
alu->op != nir_op_vec3 &&
alu->op != nir_op_vec4 &&
- alu->op != nir_op_fmov &&
- alu->op != nir_op_imov)
+ alu->op != nir_op_mov)
return false;
assert(alu->dest.dest.is_ssa);
nir_alu_instr *src_alu = nir_instr_as_alu(src_instr);
- if (src_alu->op == nir_op_imov ||
- src_alu->op == nir_op_fmov) {
+ if (src_alu->op == nir_op_mov) {
/* If it's just a swizzle of a load from the same deref, discount any
* channels that don't move in the swizzle.
*/
{
nir_alu_src *src = &instr->src[index];
- if (instr->op == nir_op_fmov || instr->op == nir_op_imov)
+ if (instr->op == nir_op_mov)
assert(!src->abs && !src->negate);
unsigned num_components = nir_src_num_components(src->src);
{
nir_alu_dest *dest = &instr->dest;
- if (instr->op == nir_op_fmov || instr->op == nir_op_imov)
+ if (instr->op == nir_op_mov)
assert(!dest->saturate);
unsigned dest_size = nir_dest_num_components(dest->dest);
switch (opcode) {
case SpvOpAny:
if (src[0]->num_components == 1) {
- val->ssa->def = nir_imov(&b->nb, src[0]);
+ val->ssa->def = nir_mov(&b->nb, src[0]);
} else {
nir_op op;
switch (src[0]->num_components) {
case SpvOpAll:
if (src[0]->num_components == 1) {
- val->ssa->def = nir_imov(&b->nb, src[0]);
+ val->ssa->def = nir_mov(&b->nb, src[0]);
} else {
nir_op op;
switch (src[0]->num_components) {
case USub_sat: return nir_op_usub_sat;
case Trunc: return nir_op_ftrunc;
/* uhm... */
- case UAbs: return nir_op_imov;
+ case UAbs: return nir_op_mov;
default:
vtn_fail("No NIR equivalent");
}
/* We also get mov's with more than one component for mov's so
* handle those specially:
*/
- if ((alu->op == nir_op_imov) || (alu->op == nir_op_fmov)) {
- type_t type = (alu->op == nir_op_imov) ? TYPE_U32 : TYPE_F32;
+ if (alu->op == nir_op_mov) {
+ type_t type = TYPE_U32;
nir_alu_src *asrc = &alu->src[0];
struct ir3_instruction *const *src0 = ir3_get_src(ctx, &asrc->src);
if (!(dest.write_mask & write_mask))
return;
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_imov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
mov->dest = dest;
mov->dest.write_mask &= write_mask;
mov->src[0].src = nir_src_for_ssa(def);
{
ttn_move_dest_masked(b, dest, nir_imm_float(b, 1.0), TGSI_WRITEMASK_X);
ttn_move_dest_masked(b, dest, nir_fmul(b, src[0], src[1]), TGSI_WRITEMASK_Y);
- ttn_move_dest_masked(b, dest, nir_fmov(b, src[0]), TGSI_WRITEMASK_Z);
- ttn_move_dest_masked(b, dest, nir_fmov(b, src[1]), TGSI_WRITEMASK_W);
+ ttn_move_dest_masked(b, dest, nir_mov(b, src[0]), TGSI_WRITEMASK_Z);
+ ttn_move_dest_masked(b, dest, nir_mov(b, src[1]), TGSI_WRITEMASK_W);
}
/* LIT - Light Coefficients
static const nir_op op_trans[TGSI_OPCODE_LAST] = {
[TGSI_OPCODE_ARL] = 0,
- [TGSI_OPCODE_MOV] = nir_op_fmov,
+ [TGSI_OPCODE_MOV] = nir_op_mov,
[TGSI_OPCODE_LIT] = 0,
[TGSI_OPCODE_RCP] = nir_op_frcp,
[TGSI_OPCODE_RSQ] = nir_op_frsq,
/* XXX: SAMPLE opcodes */
- [TGSI_OPCODE_UARL] = nir_op_imov,
+ [TGSI_OPCODE_UARL] = nir_op_mov,
[TGSI_OPCODE_UCMP] = 0,
[TGSI_OPCODE_IABS] = nir_op_iabs,
[TGSI_OPCODE_ISSG] = nir_op_isign,
} nir_ir2_opc[nir_num_opcodes+1] = {
[0 ... nir_num_opcodes - 1] = {-1, -1},
- [nir_op_fmov] = {MAXs, MAXv},
+ [nir_op_mov] = {MAXs, MAXv},
[nir_op_fsign] = {-1, CNDGTEv},
[nir_op_fnot] = {SETEs, SETEv},
[nir_op_for] = {MAXs, MAXv},
[nir_op_fsin] = {SIN, -1},
/* no fsat, fneg, fabs since source mods deal with those */
- /* some nir passes still generate nir_op_imov */
- [nir_op_imov] = {MAXs, MAXv},
-
/* so we can use this function with non-nir op */
#define ir2_op_cube nir_num_opcodes
[ir2_op_cube] = {-1, CUBEv},
if (nir_src_as_const_value(src)) {
assert(src.is_ssa);
- instr = instr_create_alu(ctx, nir_op_fmov, src.ssa->num_components);
+ instr = instr_create_alu(ctx, nir_op_mov, src.ssa->num_components);
instr->src[0] = make_src(ctx, src);
return ir2_src(instr->idx, 0, IR2_SRC_SSA);
}
* TODO: only components that are required by fragment shader
*/
instr = instr_create_alu_reg(ctx,
- ctx->so->is_a20x ? nir_op_fadd : nir_op_fmov, 3, NULL);
+ ctx->so->is_a20x ? nir_op_fadd : nir_op_mov, 3, NULL);
instr->src[0] = ir2_src(ctx->f->inputs_count, 0, IR2_SRC_INPUT);
instr->src[0].abs = true;
/* on a20x, C64 contains the tile offset */
instr->src[1] = ir2_src(64, 0, IR2_SRC_CONST);
- instr = instr_create_alu_reg(ctx, nir_op_fmov, 4, instr);
+ instr = instr_create_alu_reg(ctx, nir_op_mov, 4, instr);
instr->src[0] = ir2_src(ctx->f->fragcoord, 0, IR2_SRC_INPUT);
instr = instr_create_alu_reg(ctx, nir_op_frcp, 8, instr);
instr->src[0] = ir2_src(ctx->f->fragcoord, IR2_SWIZZLE_Y, IR2_SRC_INPUT);
unsigned reg_idx = instr->reg - ctx->reg; /* XXX */
- instr = instr_create_alu_dest(ctx, nir_op_fmov, dst);
+ instr = instr_create_alu_dest(ctx, nir_op_mov, dst);
instr->src[0] = ir2_src(reg_idx, 0, IR2_SRC_REG);
break;
default:
- instr = instr_create_alu_dest(ctx, nir_op_fmov, dst);
+ instr = instr_create_alu_dest(ctx, nir_op_mov, dst);
instr->src[0] = ir2_src(idx, 0, IR2_SRC_INPUT);
break;
}
return;
}
- instr = instr_create_alu(ctx, nir_op_fmov, ncomp);
+ instr = instr_create_alu(ctx, nir_op_mov, ncomp);
instr->src[0] = make_src(ctx, src);
instr->alu.export = idx;
}
assert(const_offset); /* TODO can be false in ES2? */
idx = nir_intrinsic_base(intr);
idx += (uint32_t) nir_src_as_const_value(intr->src[0])[0].f32;
- instr = instr_create_alu_dest(ctx, nir_op_fmov, &intr->dest);
+ instr = instr_create_alu_dest(ctx, nir_op_mov, &intr->dest);
instr->src[0] = ir2_src(idx, 0, IR2_SRC_CONST);
break;
case nir_intrinsic_discard:
struct ir2_instr *instr;
- instr = instr_create_alu_dest(ctx, nir_op_fmov,
+ instr = instr_create_alu_dest(ctx, nir_op_mov,
&(nir_dest) {.ssa = undef->def,.is_ssa = true});
instr->src[0] = ir2_src(0, 0, IR2_SRC_CONST);
}
/* fragcoord z/w */
if (ctx->f->fragcoord >= 0 && !binning) {
- instr = instr_create_alu(ctx, nir_op_fmov, 1);
+ instr = instr_create_alu(ctx, nir_op_mov, 1);
instr->src[0] = ir2_src(wincoord->idx, IR2_SWIZZLE_Z, IR2_SRC_SSA);
instr->alu.export = ctx->f->fragcoord;
- instr = instr_create_alu(ctx, nir_op_fmov, 1);
+ instr = instr_create_alu(ctx, nir_op_mov, 1);
instr->src[0] = ctx->position;
instr->src[0].swizzle = IR2_SWIZZLE_W;
instr->alu.export = ctx->f->fragcoord;
[nir_op_fand] = gpir_op_min,
[nir_op_for] = gpir_op_max,
[nir_op_fabs] = gpir_op_abs,
- [nir_op_fmov] = gpir_op_mov,
+ [nir_op_mov] = gpir_op_mov,
};
static bool gpir_emit_alu(gpir_block *block, nir_instr *ni)
/* not supported */
[0 ... nir_last_opcode] = -1,
- [nir_op_fmov] = ppir_op_mov,
- [nir_op_imov] = ppir_op_mov,
+ [nir_op_mov] = ppir_op_mov,
[nir_op_fmul] = ppir_op_mul,
[nir_op_fadd] = ppir_op_add,
[nir_op_fdot2] = ppir_op_dot2,
// those are weird ALU ops and need special handling, because
// 1. they are always componend based
// 2. they basically just merge multiple values into one data type
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
if (!insn->dest.dest.is_ssa && insn->dest.dest.reg.reg->num_array_elems) {
nir_reg_dest& reg = insn->dest.dest.reg;
uint32_t goffset = regToLmemOffset[reg.reg->index];
ALU_CASE(imax, imax);
ALU_CASE(umin, umin);
ALU_CASE(umax, umax);
- ALU_CASE(fmov, fmov);
ALU_CASE(ffloor, ffloor);
ALU_CASE(fround_even, froundeven);
ALU_CASE(ftrunc, ftrunc);
ALU_CASE(isub, isub);
ALU_CASE(imul, imul);
ALU_CASE(iabs, iabs);
- ALU_CASE(imov, imov);
+ ALU_CASE(mov, imov);
ALU_CASE(feq32, feq);
ALU_CASE(fne32, fne);
struct qreg result;
switch (instr->op) {
- case nir_op_fmov:
- case nir_op_imov:
+ case nir_op_mov:
result = qir_MOV(c, src[0]);
break;
case nir_op_fmul:
* instructions.
*/
switch (instr->op) {
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
case nir_op_vec2:
case nir_op_vec3:
case nir_op_vec4:
fs_reg result = prepare_alu_destination_and_sources(bld, instr, op, true);
switch (instr->op) {
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
case nir_op_vec2:
case nir_op_vec3:
case nir_op_vec4: {
if (!(instr->dest.write_mask & (1 << i)))
continue;
- if (instr->op == nir_op_imov || instr->op == nir_op_fmov) {
+ if (instr->op == nir_op_mov) {
inst = bld.MOV(offset(temp, bld, i),
offset(op[0], bld, instr->src[0].swizzle[i]));
} else {
resolve_status = BRW_NIR_BOOLEAN_NO_RESOLVE;
break;
- case nir_op_imov:
+ case nir_op_mov:
case nir_op_inot:
/* This is a single-source instruction. Just copy the resolve
* status from the source.
case nir_op_fadd:
break; /* This one's ok */
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
case nir_op_fneg:
case nir_op_fabs:
assert(use_alu->dest.dest.is_ssa);
return NULL;
switch (alu->op) {
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
alu = get_mul_for_src(&alu->src[0], alu->dest.dest.ssa.num_components,
swizzle, negate, abs);
break;
}
switch (instr->op) {
- case nir_op_imov:
- case nir_op_fmov:
+ case nir_op_mov:
inst = emit(MOV(dst, op[0]));
inst->saturate = instr->dest.saturate;
break;
chans[i] = nir_imm_float(b, 1.0);
} else {
assert(swizzle != SWIZZLE_NIL);
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_fmov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
nir_ssa_dest_init(&mov->instr, &mov->dest.dest, 1, 32, NULL);
mov->dest.write_mask = 0x1;
mov->src[0] = src;
if (!(dest.write_mask & write_mask))
return;
- nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_fmov);
+ nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov);
if (!mov)
return;
{
ptn_move_dest_masked(b, dest, nir_imm_float(b, 1.0), WRITEMASK_X);
ptn_move_dest_masked(b, dest, nir_fmul(b, src[0], src[1]), WRITEMASK_Y);
- ptn_move_dest_masked(b, dest, nir_fmov(b, src[0]), WRITEMASK_Z);
- ptn_move_dest_masked(b, dest, nir_fmov(b, src[1]), WRITEMASK_W);
+ ptn_move_dest_masked(b, dest, nir_mov(b, src[0]), WRITEMASK_Z);
+ ptn_move_dest_masked(b, dest, nir_mov(b, src[1]), WRITEMASK_W);
}
/* LIT - Light Coefficients
[OPCODE_MAD] = 0,
[OPCODE_MAX] = nir_op_fmax,
[OPCODE_MIN] = nir_op_fmin,
- [OPCODE_MOV] = nir_op_fmov,
+ [OPCODE_MOV] = nir_op_mov,
[OPCODE_MUL] = nir_op_fmul,
[OPCODE_POW] = 0,
[OPCODE_RCP] = 0,
case OPCODE_SWZ:
/* Extended swizzles were already handled in ptn_get_src(). */
- ptn_alu(b, nir_op_fmov, dest, src);
+ ptn_alu(b, nir_op_mov, dest, src);
break;
case OPCODE_NOP: