mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[dxgi] Allow HDR on UE4/D3D11 when NVAPI is enabled
This commit is contained in:
parent
92dc61f161
commit
02db89ac30
@ -27,6 +27,11 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static bool isNvapiEnabled() {
|
||||||
|
return env::getEnvVar("DXVK_ENABLE_NVAPI") == "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool isHDRDisallowed() {
|
static bool isHDRDisallowed() {
|
||||||
#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
|
||||||
@ -53,7 +58,7 @@ namespace dxvk {
|
|||||||
bool isUE4 = exeName.find("-Win64-Shipping") != std::string::npos;
|
bool isUE4 = exeName.find("-Win64-Shipping") != std::string::npos;
|
||||||
bool hasD3D12 = GetModuleHandleA("d3d12") != nullptr;
|
bool hasD3D12 = GetModuleHandleA("d3d12") != nullptr;
|
||||||
|
|
||||||
if (isUE4 && !hasD3D12)
|
if (isUE4 && !hasD3D12 && !isNvapiEnabled())
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
@ -74,7 +79,7 @@ namespace dxvk {
|
|||||||
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
||||||
|
|
||||||
// Expose Nvidia GPUs properly if NvAPI is enabled in environment
|
// Expose Nvidia GPUs properly if NvAPI is enabled in environment
|
||||||
this->hideNvidiaGpu = env::getEnvVar("DXVK_ENABLE_NVAPI") != "1";
|
this->hideNvidiaGpu = !isNvapiEnabled();
|
||||||
|
|
||||||
Tristate hideNvidiaGpuOption = config.getOption<Tristate>("dxgi.hideNvidiaGpu", Tristate::Auto);
|
Tristate hideNvidiaGpuOption = config.getOption<Tristate>("dxgi.hideNvidiaGpu", Tristate::Auto);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user