summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/decode/half_set_predicate.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-04-16 00:48:11 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-04-16 02:16:10 +0200
commitf43995ec535042d24fa1af637642a2974bfa4773 (patch)
tree9b5526da635742d96d7e3d95d6fd2e95dd5b1399 /src/video_core/shader/decode/half_set_predicate.cpp
parentgl_shader_decompiler: Fix MrgH0 decompilation (diff)
downloadyuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.gz
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.bz2
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.lz
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.xz
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.zst
yuzu-f43995ec535042d24fa1af637642a2974bfa4773.zip
Diffstat (limited to 'src/video_core/shader/decode/half_set_predicate.cpp')
-rw-r--r--src/video_core/shader/decode/half_set_predicate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/half_set_predicate.cpp b/src/video_core/shader/decode/half_set_predicate.cpp
index e68512692..6e59eb650 100644
--- a/src/video_core/shader/decode/half_set_predicate.cpp
+++ b/src/video_core/shader/decode/half_set_predicate.cpp
@@ -19,10 +19,10 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) {
UNIMPLEMENTED_IF(instr.hsetp2.ftz != 0);
- Node op_a = GetRegister(instr.gpr8);
+ Node op_a = UnpackHalfFloat(GetRegister(instr.gpr8), instr.hsetp2.type_a);
op_a = GetOperandAbsNegHalf(op_a, instr.hsetp2.abs_a, instr.hsetp2.negate_a);
- const Node op_b = [&]() {
+ Node op_b = [&]() {
switch (opcode->get().GetId()) {
case OpCode::Id::HSETP2_R:
return GetOperandAbsNegHalf(GetRegister(instr.gpr20), instr.hsetp2.abs_a,
@@ -32,6 +32,7 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) {
return Immediate(0);
}
}();
+ op_b = UnpackHalfFloat(op_b, instr.hsetp2.type_b);
// We can't use the constant predicate as destination.
ASSERT(instr.hsetp2.pred3 != static_cast<u64>(Pred::UnusedIndex));
@@ -42,8 +43,7 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) {
const OperationCode pair_combiner =
instr.hsetp2.h_and ? OperationCode::LogicalAll2 : OperationCode::LogicalAny2;
- MetaHalfArithmetic meta = {false, {instr.hsetp2.type_a, instr.hsetp2.type_b}};
- const Node comparison = GetPredicateComparisonHalf(instr.hsetp2.cond, meta, op_a, op_b);
+ const Node comparison = GetPredicateComparisonHalf(instr.hsetp2.cond, op_a, op_b);
const Node first_pred = Operation(pair_combiner, comparison);
// Set the primary predicate to the result of Predicate OP SecondPredicate