mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[dxgi] Add DXVK_ENABLE_NVAPI envvar
Add a new environment variable DXVK_ENABLE_NVAPI as an environment-level override for 'nvapiHack'. This will allow for DLSS (and other NvAPI-backed features) to be available without the user manually writing a configuration file, allowing for more seamless integration with Proton's launch script.
This commit is contained in:
parent
115385d1d9
commit
f92c6ae859
@ -40,6 +40,10 @@ namespace dxvk {
|
|||||||
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
||||||
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
||||||
|
|
||||||
|
// Force nvapiHack to be disabled if NvAPI is enabled in environment
|
||||||
|
if (env::getEnvVar("DXVK_ENABLE_NVAPI") == "1")
|
||||||
|
this->nvapiHack = false;
|
||||||
|
else
|
||||||
this->nvapiHack = config.getOption<bool>("dxgi.nvapiHack", true);
|
this->nvapiHack = config.getOption<bool>("dxgi.nvapiHack", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user