1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxso] Use a * (y - x) + x for lerp.

Fixes Alice: Madness Returns.
This commit is contained in:
Georg Lehmann 2022-09-13 23:09:33 +02:00 committed by Joshie
parent 63ca34bb29
commit 18a801de84

View File

@ -1429,14 +1429,11 @@ namespace dxvk {
if (m_moduleInfo.options.d3d9FloatEmulation != D3D9FloatEmulation::Strict)
return {x.type, m_module.opFMix(typeId, x.id, y.id, a.id)};
uint32_t oneId = m_module.constfReplicant(1.0f, a.type.ccount);
DxsoRegisterValue ySubx;
ySubx.type = x.type;
ySubx.id = m_module.opFSub(typeId, y.id, x.id);
DxsoRegisterValue revA;
revA.type = a.type;
revA.id = m_module.opFSub(typeId, oneId, a.id);
DxsoRegisterValue xRevA = emitMul(x, revA);
return emitFma(a, y, xRevA);
return emitFma(a, ySubx, x);
}