[dxbc] Use NClamp for tess factors and depth clamp

This flushes NaN tess factors to 0, which should match D3D behaviour
for both outer and inner tess factors. The legacy code hasn't been
touched in 7 years.
This commit is contained in:
Philip Rebohle 2025-01-04 17:35:53 +01:00
parent 24f98c5835
commit 9a244e8951

View file

@ -6109,7 +6109,7 @@ namespace dxvk {
DxbcRegisterValue value = emitValueLoad(ptr);
value.id = m_module.opFClamp(
value.id = m_module.opNClamp(
getVectorTypeId(ptr.type),
value.id,
m_module.constf32(0.0f),
@ -6566,7 +6566,7 @@ namespace dxvk {
}
DxbcRegisterValue tessValue = emitRegisterExtract(value, mask);
tessValue.id = m_module.opFClamp(getVectorTypeId(tessValue.type),
tessValue.id = m_module.opNClamp(getVectorTypeId(tessValue.type),
tessValue.id, m_module.constf32(0.0f),
m_module.constf32(maxTessFactor));