1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 07:08:50 +01:00

[dxso] Handle multiplication by zero in dst instruction

This commit is contained in:
Philip Rebohle 2021-09-14 15:27:05 +02:00 committed by Joshie
parent ebc5326ed5
commit 7b2b8ceff3

View File

@ -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<uint32_t, 4> 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;