From 59d4e8a36ab640fa765b4919d37bf2a0cc112af6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 30 Sep 2019 00:19:47 +0200 Subject: [PATCH] [dxbc] Fix NaN handling in not-equal comparison Ne and Dne are unordered in DXBC. Avoid FUnordNotEqual to avoid potential issues with drivers and debugging tools. --- src/dxbc/dxbc_compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 18870906c..34397d342 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -1892,8 +1892,9 @@ namespace dxvk { case DxbcOpcode::Ne: case DxbcOpcode::DNe: - condition = m_module.opFOrdNotEqual( - conditionType, src.at(0).id, src.at(1).id); + // Avoid poorly supported FUnordNotEqual + condition = m_module.opLogicalNot(conditionType, + m_module.opFOrdEqual(conditionType, src.at(0).id, src.at(1).id)); break; case DxbcOpcode::IEq: