1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 10:24:10 +01:00

[d3d9] Enable longMad behaviour by default

And remove the respective config option.
This commit is contained in:
Philip Rebohle 2024-08-12 18:40:25 +02:00 committed by Philip Rebohle
parent 60e04503a6
commit 1e5b78e8ea
7 changed files with 6 additions and 40 deletions

View File

@ -517,18 +517,6 @@
# d3d9.forceSwapchainMSAA = -1
# Long Mad
#
# Should we make our Mads a FFma or do it the long way with an FMul and an FAdd?
# This solves some rendering bugs in games that have z-pass shaders which
# don't match entirely to the regular vertex shader in this way.
#
# Supported values:
# - True/False
# d3d9.longMad = False
# Device Local Constant Buffers
#
# Enables using device local, host accessible memory for constant buffers in D3D9.

View File

@ -67,7 +67,6 @@ namespace dxvk {
this->forceSampleRateShading = config.getOption<bool> ("d3d9.forceSampleRateShading", false);
this->forceAspectRatio = config.getOption<std::string> ("d3d9.forceAspectRatio", "");
this->enumerateByDisplays = config.getOption<bool> ("d3d9.enumerateByDisplays", true);
this->longMad = config.getOption<bool> ("d3d9.longMad", false);
this->cachedDynamicBuffers = config.getOption<bool> ("d3d9.cachedDynamicBuffers", false);
this->deviceLocalConstantBuffers = config.getOption<bool> ("d3d9.deviceLocalConstantBuffers", false);
this->allowDirectBufferMapping = config.getOption<bool> ("d3d9.allowDirectBufferMapping", true);

View File

@ -119,11 +119,6 @@ namespace dxvk {
/// Enumerate adapters by displays
bool enumerateByDisplays;
/// Should we make our Mads a FFma or do it the long way with an FMul and an FAdd?
/// This solves some rendering bugs in games that have z-pass shaders which
/// don't match entirely to the regular vertex shader in this way.
bool longMad;
/// Cached dynamic buffers: Maps all buffers in cached memory.
bool cachedDynamicBuffers;

View File

@ -1932,21 +1932,13 @@ namespace dxvk {
emitRegisterLoad(src[1], mask).id);
break;
case DxsoOpcode::Mad:
if (!m_moduleInfo.options.longMad) {
result.id = emitFma(
emitRegisterLoad(src[0], mask),
emitRegisterLoad(src[1], mask),
emitRegisterLoad(src[2], mask)).id;
}
else {
result.id = emitMul(
emitRegisterLoad(src[0], mask),
emitRegisterLoad(src[1], mask)).id;
result.id = emitMul(
emitRegisterLoad(src[0], mask),
emitRegisterLoad(src[1], mask)).id;
result.id = m_module.opFAdd(typeId,
result.id,
emitRegisterLoad(src[2], mask).id);
}
result.id = m_module.opFAdd(typeId,
result.id,
emitRegisterLoad(src[2], mask).id);
break;
case DxsoOpcode::Mul:
result.id = emitMul(

View File

@ -29,7 +29,6 @@ namespace dxvk {
vertexFloatConstantBufferAsSSBO = pDevice->GetVertexConstantLayout().floatSize() > devInfo.core.properties.limits.maxUniformBufferRange;
longMad = options.longMad;
robustness2Supported = devFeatures.extRobustness2.robustBufferAccess2;
drefScaling = options.drefScaling;

View File

@ -42,11 +42,6 @@ namespace dxvk {
/// Should the SWVP float constant buffer be a SSBO (because of the size on NV)
bool vertexFloatConstantBufferAsSSBO;
/// Should we make our Mads a FFma or do it the long way with an FMul and an FAdd?
/// This solves some rendering bugs in games that have z-pass shaders which
/// don't match entirely to the regular vertex shader in this way.
bool longMad;
/// Whether or not we can rely on robustness2 to handle oob constant access
bool robustness2Supported;

View File

@ -611,7 +611,6 @@ namespace dxvk {
* like a game bug that d3d9 drivers work *
* around. */
{ R"(\\(BF2|BF2142)\.exe$)", {{
{ "d3d9.longMad", "True" },
{ "d3d9.deviceLossOnFocusLoss", "True" },
{ "d3d9.countLosableResources", "False"},
}} },
@ -627,7 +626,6 @@ namespace dxvk {
{ R"(\\(trl|tra|tru)\.exe$)", {{
{ "d3d9.cachedDynamicBuffers", "True" },
{ "d3d9.maxFrameRate", "60" },
{ "d3d9.longMad", "True" },
}} },
/* Everquest */
{ R"(\\eqgame\.exe$)", {{