mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[dxbc] Enable capabilities for float control modes
Fixes some validation errors (but seriously, why does everything have to be a capability in SPIR-V?)
This commit is contained in:
parent
c1073455bf
commit
2d670ec3db
@ -7481,17 +7481,27 @@ namespace dxvk {
|
||||
|
||||
m_module.enableExtension("SPV_KHR_float_controls");
|
||||
|
||||
if (flags.test(DxbcFloatControlFlag::DenormFlushToZero32))
|
||||
if (flags.test(DxbcFloatControlFlag::DenormFlushToZero32)) {
|
||||
m_module.enableCapability(spv::CapabilityDenormFlushToZero);
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDenormFlushToZero, 1, &width32);
|
||||
}
|
||||
|
||||
if (flags.test(DxbcFloatControlFlag::DenormPreserve64))
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDenormPreserve, 1, &width64);
|
||||
|
||||
if (flags.test(DxbcFloatControlFlag::PreserveNan32))
|
||||
if (flags.test(DxbcFloatControlFlag::PreserveNan32)) {
|
||||
m_module.enableCapability(spv::CapabilitySignedZeroInfNanPreserve);
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeSignedZeroInfNanPreserve, 1, &width32);
|
||||
}
|
||||
|
||||
if (flags.test(DxbcFloatControlFlag::PreserveNan64))
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeSignedZeroInfNanPreserve, 1, &width64);
|
||||
if (m_module.hasCapability(spv::CapabilityFloat64)) {
|
||||
if (flags.test(DxbcFloatControlFlag::DenormPreserve64)) {
|
||||
m_module.enableCapability(spv::CapabilityDenormPreserve);
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDenormPreserve, 1, &width64);
|
||||
}
|
||||
|
||||
if (flags.test(DxbcFloatControlFlag::PreserveNan64)) {
|
||||
m_module.enableCapability(spv::CapabilitySignedZeroInfNanPreserve);
|
||||
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeSignedZeroInfNanPreserve, 1, &width64);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user