Skip to content

Commit

Permalink
[dxbc] Use NClamp for tess factors and depth clamp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
doitsujin committed Jan 4, 2025
1 parent 24f98c5 commit 9a244e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dxbc/dxbc_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 9a244e8

Please sign in to comment.