[dxso] Omit relative constant range check when possible

We can just rely on robustness2 when it's supported.
This commit is contained in:
Robin Kertels 2021-11-14 16:27:39 +01:00 committed by Joshie
parent 0061139652
commit ce1c66d7dc
3 changed files with 6 additions and 1 deletions

View File

@ -1029,7 +1029,7 @@ namespace dxvk {
result.id = m_module.opLoad(typeId, ptrId);
if (relative) {
if (relative && !m_moduleInfo.options.robustness2Supported) {
uint32_t constCount = m_module.constu32(m_layout->floatCount);
// Expand condition to bvec4 since the result has four components

View File

@ -43,6 +43,8 @@ namespace dxvk {
longMad = options.longMad;
alphaTestWiggleRoom = options.alphaTestWiggleRoom;
robustness2Supported = devFeatures.extRobustness2.robustBufferAccess2;
}
}

View File

@ -54,6 +54,9 @@ namespace dxvk {
/// Workaround for games using alpha test == 1.0, etc due to wonky interpolation or
/// misc. imprecision on some vendors
bool alphaTestWiggleRoom;
/// Whether or not we can rely on robustness2 to handle oob constant access
bool robustness2Supported;
};
}