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; }