diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 22020d59f..da25f5434 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -1010,8 +1010,10 @@ void Translator::V_CMP_CLASS_F32(const GcnInst& inst) { value = ir.FPIsNan(src0); } else if ((class_mask & IR::FloatClassFunc::Infinity) == IR::FloatClassFunc::Infinity) { value = ir.FPIsInf(src0); + } else if ((class_mask & IR::FloatClassFunc::Negative) == IR::FloatClassFunc::Negative) { + value = ir.FPLessThanEqual(src0, ir.Imm32(-0.f)); } else { - UNREACHABLE(); + UNREACHABLE_MSG("Unsupported float class mask: {:#x}", static_cast(class_mask)); } } else { // We don't know the type yet, delay its resolution. diff --git a/src/shader_recompiler/ir/reg.h b/src/shader_recompiler/ir/reg.h index 40c4b61c3..622190cf0 100644 --- a/src/shader_recompiler/ir/reg.h +++ b/src/shader_recompiler/ir/reg.h @@ -25,6 +25,7 @@ enum class FloatClassFunc : u32 { NaN = SignalingNan | QuietNan, Infinity = PositiveInfinity | NegativeInfinity, + Negative = NegativeInfinity | NegativeNormal | NegativeDenorm | NegativeZero, Finite = NegativeNormal | NegativeDenorm | NegativeZero | PositiveNormal | PositiveDenorm | PositiveZero, };