From 915091b76b2de06d04a4de0b050001b8e7c88169 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 7 Feb 2019 19:32:07 +0100 Subject: [PATCH] [dxbc] OpSDiv by 4 -> OpShiftRightLogical by 2 --- 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 6fa5108ca..d23e952ee 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -5102,7 +5102,7 @@ namespace dxvk { result.id = m_module.opIAdd(typeId, m_module.opIMul(typeId, structId.id, m_module.consti32(structStride / 4)), - m_module.opSDiv(typeId, structOffset.id, m_module.consti32(4))); + m_module.opShiftRightLogical(typeId, structOffset.id, m_module.consti32(2))); return result; } @@ -5112,10 +5112,10 @@ namespace dxvk { DxbcRegisterValue result; result.type.ctype = DxbcScalarType::Sint32; result.type.ccount = 1; - result.id = m_module.opSDiv( + result.id = m_module.opShiftRightLogical( getVectorTypeId(result.type), byteOffset.id, - m_module.consti32(4)); + m_module.consti32(2)); return result; }