mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 04:54:15 +01:00
parent
1f88ee595f
commit
630fee59fc
@ -1500,6 +1500,25 @@ namespace dxvk {
|
|||||||
return dot;
|
return dot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DxsoRegisterValue DxsoCompiler::emitMix(
|
||||||
|
DxsoRegisterValue x,
|
||||||
|
DxsoRegisterValue y,
|
||||||
|
DxsoRegisterValue a) {
|
||||||
|
uint32_t typeId = getVectorTypeId(x.type);
|
||||||
|
|
||||||
|
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 revA;
|
||||||
|
revA.type = a.type;
|
||||||
|
revA.id = m_module.opFSub(typeId, oneId, a.id);
|
||||||
|
|
||||||
|
DxsoRegisterValue xRevA = emitMul(x, revA);
|
||||||
|
return emitFma(a, y, xRevA);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DxsoRegisterValue DxsoCompiler::emitCross(
|
DxsoRegisterValue DxsoCompiler::emitCross(
|
||||||
DxsoRegisterValue a,
|
DxsoRegisterValue a,
|
||||||
@ -2226,10 +2245,10 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DxsoOpcode::Lrp:
|
case DxsoOpcode::Lrp:
|
||||||
result.id = m_module.opFMix(typeId,
|
result.id = emitMix(
|
||||||
emitRegisterLoad(src[2], mask).id,
|
emitRegisterLoad(src[2], mask),
|
||||||
emitRegisterLoad(src[1], mask).id,
|
emitRegisterLoad(src[1], mask),
|
||||||
emitRegisterLoad(src[0], mask).id);
|
emitRegisterLoad(src[0], mask)).id;
|
||||||
break;
|
break;
|
||||||
case DxsoOpcode::Frc:
|
case DxsoOpcode::Frc:
|
||||||
result.id = m_module.opFract(typeId,
|
result.id = m_module.opFract(typeId,
|
||||||
|
@ -562,6 +562,11 @@ namespace dxvk {
|
|||||||
DxsoRegisterValue a,
|
DxsoRegisterValue a,
|
||||||
DxsoRegisterValue b);
|
DxsoRegisterValue b);
|
||||||
|
|
||||||
|
DxsoRegisterValue emitMix(
|
||||||
|
DxsoRegisterValue x,
|
||||||
|
DxsoRegisterValue y,
|
||||||
|
DxsoRegisterValue a);
|
||||||
|
|
||||||
DxsoRegisterValue emitCross(
|
DxsoRegisterValue emitCross(
|
||||||
DxsoRegisterValue a,
|
DxsoRegisterValue a,
|
||||||
DxsoRegisterValue b);
|
DxsoRegisterValue b);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user