From 7b2b8ceff3baa8885d6dfa5df6d9ca135bcbbd00 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 14 Sep 2021 15:27:05 +0200 Subject: [PATCH] [dxso] Handle multiplication by zero in dst instruction --- src/dxso/dxso_compiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp index 128c42d8..87f9ca9b 100644 --- a/src/dxso/dxso_compiler.cpp +++ b/src/dxso/dxso_compiler.cpp @@ -2164,15 +2164,15 @@ namespace dxvk { const uint32_t z = 2; const uint32_t w = 3; - uint32_t src0Y = m_module.opCompositeExtract(scalarTypeId, src0, 1, &y); - uint32_t src1Y = m_module.opCompositeExtract(scalarTypeId, src1, 1, &y); + DxsoRegisterValue src0Y = { scalarType, m_module.opCompositeExtract(scalarTypeId, src0, 1, &y) }; + DxsoRegisterValue src1Y = { scalarType, m_module.opCompositeExtract(scalarTypeId, src1, 1, &y) }; uint32_t src0Z = m_module.opCompositeExtract(scalarTypeId, src0, 1, &z); uint32_t src1W = m_module.opCompositeExtract(scalarTypeId, src1, 1, &w); std::array resultIndices; resultIndices[0] = m_module.constf32(1.0f); - resultIndices[1] = m_module.opFMul(scalarTypeId, src0Y, src1Y); + resultIndices[1] = emitMul(src0Y, src1Y).id; resultIndices[2] = src0Z; resultIndices[3] = src1W;