mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[dxgi] Introduce dxgi.enableUe4Workarounds option
This commit is contained in:
parent
1dcc9f3b6a
commit
482e758aee
@ -47,7 +47,7 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool isHDRDisallowed() {
|
static bool isHDRDisallowed(bool enableUe4Workarounds) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Unreal Engine 4 titles use AGS/NVAPI to try and enable
|
// Unreal Engine 4 titles use AGS/NVAPI to try and enable
|
||||||
// HDR globally.
|
// HDR globally.
|
||||||
@ -70,7 +70,7 @@ namespace dxvk {
|
|||||||
// Luckily for us, they only load d3d12.dll on the D3D12 render path
|
// Luckily for us, they only load d3d12.dll on the D3D12 render path
|
||||||
// so we can key off that to force disable HDR only in D3D11.
|
// so we can key off that to force disable HDR only in D3D11.
|
||||||
std::string exeName = env::getExeName();
|
std::string exeName = env::getExeName();
|
||||||
bool isUE4 = exeName.find("-Win64-Shipping") != std::string::npos;
|
bool isUE4 = enableUe4Workarounds || exeName.find("-Win64-Shipping") != std::string::npos;
|
||||||
bool hasD3D12 = GetModuleHandleA("d3d12") != nullptr;
|
bool hasD3D12 = GetModuleHandleA("d3d12") != nullptr;
|
||||||
|
|
||||||
if (isUE4 && !hasD3D12 && !isNvapiEnabled())
|
if (isUE4 && !hasD3D12 && !isNvapiEnabled())
|
||||||
@ -115,7 +115,10 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->enableHDR = config.getOption<bool>("dxgi.enableHDR", env::getEnvVar("DXVK_HDR") == "1");
|
this->enableHDR = config.getOption<bool>("dxgi.enableHDR", env::getEnvVar("DXVK_HDR") == "1");
|
||||||
if (this->enableHDR && isHDRDisallowed()) {
|
|
||||||
|
bool enableUe4Workarounds = config.getOption<bool>("dxgi.enableUe4Workarounds", false);
|
||||||
|
|
||||||
|
if (this->enableHDR && isHDRDisallowed(enableUe4Workarounds)) {
|
||||||
Logger::info("HDR was configured to be enabled, but has been force disabled as a UE4 DX11 game was detected.");
|
Logger::info("HDR was configured to be enabled, but has been force disabled as a UE4 DX11 game was detected.");
|
||||||
this->enableHDR = false;
|
this->enableHDR = false;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +443,7 @@ namespace dxvk {
|
|||||||
/* GTA Definitive Edition trilogy *
|
/* GTA Definitive Edition trilogy *
|
||||||
* Static ags crash with HDR support */
|
* Static ags crash with HDR support */
|
||||||
{ R"(\\(LibertyCity|ViceCity|SanAndreas)\.exe$)", {{
|
{ R"(\\(LibertyCity|ViceCity|SanAndreas)\.exe$)", {{
|
||||||
{ "dxgi.hideAmdGpu", "True" },
|
{ "dxgi.enableUe4Workarounds", "True" },
|
||||||
}} },
|
}} },
|
||||||
|
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user