diff options
| author | 2019-09-03 22:34:34 -0400 | |
|---|---|---|
| committer | 2019-09-03 22:34:34 -0400 | |
| commit | d4f33b822bbb4ced7d1e23c39f2da1c7d7bb725f (patch) | |
| tree | 1fb7ff5b8cb70eb4887132086530b306f8bbe059 /src/video_core/shader | |
| parent | Merge pull request #2826 from ReinUsesLisp/macro-binding (diff) | |
| parent | float_set_predicate: Add missing negation bit for the second operand (diff) | |
| download | yuzu-d4f33b822bbb4ced7d1e23c39f2da1c7d7bb725f.tar.gz yuzu-d4f33b822bbb4ced7d1e23c39f2da1c7d7bb725f.tar.xz yuzu-d4f33b822bbb4ced7d1e23c39f2da1c7d7bb725f.zip | |
Merge pull request #2811 from ReinUsesLisp/fsetp-fix
float_set_predicate: Add missing negation bit for the second operand
Diffstat (limited to 'src/video_core/shader')
| -rw-r--r-- | src/video_core/shader/decode/float_set_predicate.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/float_set_predicate.cpp b/src/video_core/shader/decode/float_set_predicate.cpp index 34854fcca..200c2c983 100644 --- a/src/video_core/shader/decode/float_set_predicate.cpp +++ b/src/video_core/shader/decode/float_set_predicate.cpp | |||
| @@ -17,8 +17,8 @@ using Tegra::Shader::Pred; | |||
| 17 | u32 ShaderIR::DecodeFloatSetPredicate(NodeBlock& bb, u32 pc) { | 17 | u32 ShaderIR::DecodeFloatSetPredicate(NodeBlock& bb, u32 pc) { |
| 18 | const Instruction instr = {program_code[pc]}; | 18 | const Instruction instr = {program_code[pc]}; |
| 19 | 19 | ||
| 20 | const Node op_a = GetOperandAbsNegFloat(GetRegister(instr.gpr8), instr.fsetp.abs_a != 0, | 20 | Node op_a = GetOperandAbsNegFloat(GetRegister(instr.gpr8), instr.fsetp.abs_a != 0, |
| 21 | instr.fsetp.neg_a != 0); | 21 | instr.fsetp.neg_a != 0); |
| 22 | Node op_b = [&]() { | 22 | Node op_b = [&]() { |
| 23 | if (instr.is_b_imm) { | 23 | if (instr.is_b_imm) { |
| 24 | return GetImmediate19(instr); | 24 | return GetImmediate19(instr); |
| @@ -28,12 +28,13 @@ u32 ShaderIR::DecodeFloatSetPredicate(NodeBlock& bb, u32 pc) { | |||
| 28 | return GetConstBuffer(instr.cbuf34.index, instr.cbuf34.GetOffset()); | 28 | return GetConstBuffer(instr.cbuf34.index, instr.cbuf34.GetOffset()); |
| 29 | } | 29 | } |
| 30 | }(); | 30 | }(); |
| 31 | op_b = GetOperandAbsNegFloat(op_b, instr.fsetp.abs_b, false); | 31 | op_b = GetOperandAbsNegFloat(std::move(op_b), instr.fsetp.abs_b, instr.fsetp.neg_b); |
| 32 | 32 | ||
| 33 | // We can't use the constant predicate as destination. | 33 | // We can't use the constant predicate as destination. |
| 34 | ASSERT(instr.fsetp.pred3 != static_cast<u64>(Pred::UnusedIndex)); | 34 | ASSERT(instr.fsetp.pred3 != static_cast<u64>(Pred::UnusedIndex)); |
| 35 | 35 | ||
| 36 | const Node predicate = GetPredicateComparisonFloat(instr.fsetp.cond, op_a, op_b); | 36 | const Node predicate = |
| 37 | GetPredicateComparisonFloat(instr.fsetp.cond, std::move(op_a), std::move(op_b)); | ||
| 37 | const Node second_pred = GetPredicate(instr.fsetp.pred39, instr.fsetp.neg_pred != 0); | 38 | const Node second_pred = GetPredicate(instr.fsetp.pred39, instr.fsetp.neg_pred != 0); |
| 38 | 39 | ||
| 39 | const OperationCode combiner = GetPredicateCombiner(instr.fsetp.op); | 40 | const OperationCode combiner = GetPredicateCombiner(instr.fsetp.op); |