summaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-05-09 04:55:15 -0300
committerGravatar ReinUsesLisp2020-05-09 04:55:15 -0300
commit4e57f9d5cfc32b37fe7b6a1563ca2101ec59887c (patch)
tree057619ab05268d2c757dda7f5cec30c319a56bcb /src/video_core/shader/decode
parentMerge pull request #3879 from lioncash/global2 (diff)
downloadyuzu-4e57f9d5cfc32b37fe7b6a1563ca2101ec59887c.tar.gz
yuzu-4e57f9d5cfc32b37fe7b6a1563ca2101ec59887c.tar.xz
yuzu-4e57f9d5cfc32b37fe7b6a1563ca2101ec59887c.zip
shader_ir: Separate float-point comparisons in ordered and unordered
This allows us to use native SPIR-V instructions without having to manually check for NAN.
Diffstat (limited to 'src/video_core/shader/decode')
-rw-r--r--src/video_core/shader/decode/xmad.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/decode/xmad.cpp b/src/video_core/shader/decode/xmad.cpp
index 6191ffba1..c83dc6615 100644
--- a/src/video_core/shader/decode/xmad.cpp
+++ b/src/video_core/shader/decode/xmad.cpp
@@ -97,19 +97,19 @@ u32 ShaderIR::DecodeXmad(NodeBlock& bb, u32 pc) {
97 return SignedOperation(OperationCode::IAdd, is_signed_c, original_c, shifted_b); 97 return SignedOperation(OperationCode::IAdd, is_signed_c, original_c, shifted_b);
98 } 98 }
99 case Tegra::Shader::XmadMode::CSfu: { 99 case Tegra::Shader::XmadMode::CSfu: {
100 const Node comp_a = GetPredicateComparisonInteger(PredCondition::Equal, is_signed_a, 100 const Node comp_a =
101 op_a, Immediate(0)); 101 GetPredicateComparisonInteger(PredCondition::EQ, is_signed_a, op_a, Immediate(0));
102 const Node comp_b = GetPredicateComparisonInteger(PredCondition::Equal, is_signed_b, 102 const Node comp_b =
103 op_b, Immediate(0)); 103 GetPredicateComparisonInteger(PredCondition::EQ, is_signed_b, op_b, Immediate(0));
104 const Node comp = Operation(OperationCode::LogicalOr, comp_a, comp_b); 104 const Node comp = Operation(OperationCode::LogicalOr, comp_a, comp_b);
105 105
106 const Node comp_minus_a = GetPredicateComparisonInteger( 106 const Node comp_minus_a = GetPredicateComparisonInteger(
107 PredCondition::NotEqual, is_signed_a, 107 PredCondition::NE, is_signed_a,
108 SignedOperation(OperationCode::IBitwiseAnd, is_signed_a, op_a, 108 SignedOperation(OperationCode::IBitwiseAnd, is_signed_a, op_a,
109 Immediate(0x80000000)), 109 Immediate(0x80000000)),
110 Immediate(0)); 110 Immediate(0));
111 const Node comp_minus_b = GetPredicateComparisonInteger( 111 const Node comp_minus_b = GetPredicateComparisonInteger(
112 PredCondition::NotEqual, is_signed_b, 112 PredCondition::NE, is_signed_b,
113 SignedOperation(OperationCode::IBitwiseAnd, is_signed_b, op_b, 113 SignedOperation(OperationCode::IBitwiseAnd, is_signed_b, op_b,
114 Immediate(0x80000000)), 114 Immediate(0x80000000)),
115 Immediate(0)); 115 Immediate(0));