mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxbc] Implement option to split up fma
This commit is contained in:
parent
c613078ba8
commit
e7d14e97de
@ -499,6 +499,7 @@
|
|||||||
# Supported values:
|
# Supported values:
|
||||||
# - True/False
|
# - True/False
|
||||||
|
|
||||||
|
# d3d11.longMad = False
|
||||||
# d3d9.longMad = False
|
# d3d9.longMad = False
|
||||||
|
|
||||||
# Device Local Constant Buffers
|
# Device Local Constant Buffers
|
||||||
|
@ -32,6 +32,7 @@ namespace dxvk {
|
|||||||
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
||||||
this->maxFrameRate = config.getOption<int32_t>("dxgi.maxFrameRate", 0);
|
this->maxFrameRate = config.getOption<int32_t>("dxgi.maxFrameRate", 0);
|
||||||
this->exposeDriverCommandLists = config.getOption<bool>("d3d11.exposeDriverCommandLists", true);
|
this->exposeDriverCommandLists = config.getOption<bool>("d3d11.exposeDriverCommandLists", true);
|
||||||
|
this->longMad = config.getOption<bool>("d3d11.longMad", false);
|
||||||
|
|
||||||
// Clamp LOD bias so that people don't abuse this in unintended ways
|
// Clamp LOD bias so that people don't abuse this in unintended ways
|
||||||
this->samplerLodBias = dxvk::fclamp(this->samplerLodBias, -2.0f, 1.0f);
|
this->samplerLodBias = dxvk::fclamp(this->samplerLodBias, -2.0f, 1.0f);
|
||||||
|
@ -120,6 +120,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
/// Shader dump path
|
/// Shader dump path
|
||||||
std::string shaderDumpPath;
|
std::string shaderDumpPath;
|
||||||
|
|
||||||
|
/// Should we make our Mads a FFma or do it the long way with an FMul and an FAdd?
|
||||||
|
bool longMad;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
@ -1623,8 +1623,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
case DxbcOpcode::Mad:
|
case DxbcOpcode::Mad:
|
||||||
case DxbcOpcode::DFma:
|
case DxbcOpcode::DFma:
|
||||||
dst.id = m_module.opFFma(typeId,
|
if (likely(!m_moduleInfo.options.longMad)) {
|
||||||
src.at(0).id, src.at(1).id, src.at(2).id);
|
dst.id = m_module.opFFma(typeId,
|
||||||
|
src.at(0).id, src.at(1).id, src.at(2).id);
|
||||||
|
} else {
|
||||||
|
dst.id = m_module.opFMul(typeId, src.at(0).id, src.at(1).id);
|
||||||
|
dst.id = m_module.opFAdd(typeId, dst.id, src.at(2).id);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DxbcOpcode::Max:
|
case DxbcOpcode::Max:
|
||||||
|
@ -38,6 +38,7 @@ namespace dxvk {
|
|||||||
disableMsaa = options.disableMsaa;
|
disableMsaa = options.disableMsaa;
|
||||||
forceSampleRateShading = options.forceSampleRateShading;
|
forceSampleRateShading = options.forceSampleRateShading;
|
||||||
enableSampleShadingInterlock = device->features().extFragmentShaderInterlock.fragmentShaderSampleInterlock;
|
enableSampleShadingInterlock = device->features().extFragmentShaderInterlock.fragmentShaderSampleInterlock;
|
||||||
|
longMad = options.longMad;
|
||||||
|
|
||||||
// Figure out float control flags to match D3D11 rules
|
// Figure out float control flags to match D3D11 rules
|
||||||
if (options.floatControls) {
|
if (options.floatControls) {
|
||||||
|
@ -54,6 +54,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
/// Minimum storage buffer alignment
|
/// Minimum storage buffer alignment
|
||||||
VkDeviceSize minSsboAlignment = 0;
|
VkDeviceSize minSsboAlignment = 0;
|
||||||
|
|
||||||
|
/// Should we make our Mads a FFma or do it the long way with an FMul and an FAdd?
|
||||||
|
bool longMad;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user