break;
case nir_op_fsign: {
+ assert(!instr->dest.saturate);
if (op[0].abs) {
/* Straightforward since the source can be assumed to be either
* strictly >= 0 or strictly <= 0 depending on the setting of the
: bld.MOV(result, brw_imm_f(1.0f));
set_predicate(BRW_PREDICATE_NORMAL, inst);
-
- if (instr->dest.saturate)
- inst->saturate = true;
-
} else if (type_sz(op[0].type) < 8) {
/* AND(val, 0x80000000) gives the sign bit.
*
inst = bld.OR(result_int, result_int, brw_imm_ud(0x3f800000u));
inst->predicate = BRW_PREDICATE_NORMAL;
- if (instr->dest.saturate) {
- inst = bld.MOV(result, result);
- inst->saturate = true;
- }
} else {
/* For doubles we do the same but we need to consider:
*
set_predicate(BRW_PREDICATE_NORMAL,
bld.OR(r, r, brw_imm_ud(0x3ff00000u)));
-
- if (instr->dest.saturate) {
- inst = bld.MOV(result, result);
- inst->saturate = true;
- }
}
break;
}
unreachable("not reached: should have been lowered");
case nir_op_fsign:
+ assert(!instr->dest.saturate);
if (op[0].abs) {
/* Straightforward since the source can be assumed to be either
* strictly >= 0 or strictly <= 0 depending on the setting of the
? emit(MOV(dst, brw_imm_f(-1.0f)))
: emit(MOV(dst, brw_imm_f(1.0f)));
inst->predicate = BRW_PREDICATE_NORMAL;
-
- if (instr->dest.saturate)
- inst->saturate = true;
-
} else if (type_sz(op[0].type) < 8) {
/* AND(val, 0x80000000) gives the sign bit.
*
inst = emit(OR(dst, src_reg(dst), brw_imm_ud(0x3f800000u)));
inst->predicate = BRW_PREDICATE_NORMAL;
dst.type = BRW_REGISTER_TYPE_F;
-
- if (instr->dest.saturate) {
- inst = emit(MOV(dst, src_reg(dst)));
- inst->saturate = true;
- }
} else {
/* For doubles we do the same but we need to consider:
*
/* Now convert the result from float to double */
emit_conversion_to_double(dst, retype(src_reg(tmp),
BRW_REGISTER_TYPE_F),
- instr->dest.saturate);
+ false);
}
break;