mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
nit & remove some optional param
This commit is contained in:
parent
a166217480
commit
829f424618
1 changed files with 11 additions and 10 deletions
|
@ -100,8 +100,7 @@ u32 ShaderIR::DecodeXmad(NodeBlock& bb, u32 pc) {
|
||||||
op_a, Immediate(0));
|
op_a, Immediate(0));
|
||||||
const Node comp_b = GetPredicateComparisonInteger(PredCondition::Equal, is_signed_b,
|
const Node comp_b = GetPredicateComparisonInteger(PredCondition::Equal, is_signed_b,
|
||||||
op_b, Immediate(0));
|
op_b, Immediate(0));
|
||||||
const Node comp =
|
const Node comp = Operation(OperationCode::LogicalOr, comp_a, comp_b);
|
||||||
Operation(OperationCode::LogicalOr, std::move(comp_a), std::move(comp_b));
|
|
||||||
|
|
||||||
const Node comp_minus_a = GetPredicateComparisonInteger(
|
const Node comp_minus_a = GetPredicateComparisonInteger(
|
||||||
PredCondition::NotEqual, is_signed_a,
|
PredCondition::NotEqual, is_signed_a,
|
||||||
|
@ -120,9 +119,10 @@ u32 ShaderIR::DecodeXmad(NodeBlock& bb, u32 pc) {
|
||||||
original_c);
|
original_c);
|
||||||
new_c = Operation(
|
new_c = Operation(
|
||||||
OperationCode::Select, comp_minus_b,
|
OperationCode::Select, comp_minus_b,
|
||||||
SignedOperation(OperationCode::IAdd, is_signed_c, new_c, Immediate(-65536)), new_c);
|
SignedOperation(OperationCode::IAdd, is_signed_c, new_c, Immediate(-65536)),
|
||||||
|
std::move(new_c));
|
||||||
|
|
||||||
return Operation(OperationCode::Select, comp, original_c, new_c);
|
return Operation(OperationCode::Select, comp, original_c, std::move(new_c));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
@ -134,18 +134,19 @@ u32 ShaderIR::DecodeXmad(NodeBlock& bb, u32 pc) {
|
||||||
op_c = GetTemporary(1);
|
op_c = GetTemporary(1);
|
||||||
|
|
||||||
// TODO(Rodrigo): Use an appropiate sign for this operation
|
// TODO(Rodrigo): Use an appropiate sign for this operation
|
||||||
Node sum = Operation(OperationCode::IAdd, product, op_c);
|
Node sum = SignedOperation(OperationCode::IAdd, is_signed_a, product, std::move(op_c));
|
||||||
SetTemporary(bb, 2, sum);
|
SetTemporary(bb, 2, sum);
|
||||||
sum = GetTemporary(2);
|
sum = GetTemporary(2);
|
||||||
if (is_merge) {
|
if (is_merge) {
|
||||||
const Node a = BitfieldExtract(sum, 0, 16);
|
const Node a = SignedOperation(OperationCode::IBitfieldExtract, is_signed_a, std::move(sum),
|
||||||
const Node b =
|
Immediate(0), Immediate(16));
|
||||||
Operation(OperationCode::ILogicalShiftLeft, NO_PRECISE, original_b, Immediate(16));
|
const Node b = SignedOperation(OperationCode::ILogicalShiftLeft, is_signed_b, original_b,
|
||||||
sum = Operation(OperationCode::IBitwiseOr, NO_PRECISE, a, b);
|
Immediate(16));
|
||||||
|
sum = SignedOperation(OperationCode::IBitwiseOr, is_signed_a, a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInternalFlagsFromInteger(bb, sum, instr.generates_cc);
|
SetInternalFlagsFromInteger(bb, sum, instr.generates_cc);
|
||||||
SetRegister(bb, instr.gpr0, sum);
|
SetRegister(bb, instr.gpr0, std::move(sum));
|
||||||
|
|
||||||
return pc;
|
return pc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue