From 5750a7d85cf11062d395e70c93584ec69dced1f5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 26 Mar 2020 17:17:01 +0100 Subject: [PATCH] [dxbc] Fix the udiv crap again --- src/dxbc/dxbc_compiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index c882258c..bc19e877 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2055,10 +2055,10 @@ namespace dxvk { }; // Division by zero will return 0xffffffff for both results - auto bvecId = getVectorTypeId({ DxbcScalarType::Bool, ins.dst[0].mask.popCount() }); + auto bvecId = getVectorTypeId({ DxbcScalarType::Bool, srcMask.popCount() }); - DxbcRegisterValue const0 = emitBuildConstVecu32( 0u, 0u, 0u, 0u, ins.dst[0].mask); - DxbcRegisterValue constff = emitBuildConstVecu32(~0u, ~0u, ~0u, ~0u, ins.dst[0].mask); + DxbcRegisterValue const0 = emitBuildConstVecu32( 0u, 0u, 0u, 0u, srcMask); + DxbcRegisterValue constff = emitBuildConstVecu32(~0u, ~0u, ~0u, ~0u, srcMask); uint32_t cmpValue = m_module.opINotEqual(bvecId, src.at(1).id, const0.id);