mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
Merge 8048be5774d401a56dccfeee8999da44d7d3fa8e into c04410ca00f33162d0875bc8500d3f8185bc73df
This commit is contained in:
commit
c86bd30299
@ -31,6 +31,19 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_options = DxvkOptions(m_config);
|
m_options = DxvkOptions(m_config);
|
||||||
|
|
||||||
|
std::string vkLoaderLayersDisableEnv = env::getEnvVar("VK_LOADER_LAYERS_DISABLE");
|
||||||
|
if (!vkLoaderLayersDisableEnv.empty())
|
||||||
|
Logger::info(str::format("VK_LOADER_LAYERS_DISABLE: ", vkLoaderLayersDisableEnv));
|
||||||
|
|
||||||
|
// Optionally override VK_LOADER_LAYERS_DISABLE with specified DXVK_LOADER_LAYERS_DISABLE
|
||||||
|
// Or set DXVK_OVERRIDE_VK_LOADER_LAYERS_DISABLE=1 alone, to clear VK_LOADER_LAYERS_DISABLE
|
||||||
|
std::string dxvkLoaderLayersDisableEnv = env::getEnvVar("DXVK_LOADER_LAYERS_DISABLE");
|
||||||
|
if (!dxvkLoaderLayersDisableEnv.empty() || env::getEnvVar("DXVK_OVERRIDE_VK_LOADER_LAYERS_DISABLE") == "1")
|
||||||
|
{
|
||||||
|
Logger::info(str::format("DXVK_LOADER_LAYERS_DISABLE: ", dxvkLoaderLayersDisableEnv));
|
||||||
|
env::setEnvVar("VK_LOADER_LAYERS_DISABLE", dxvkLoaderLayersDisableEnv.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
// Load Vulkan library
|
// Load Vulkan library
|
||||||
createLibraryLoader(args);
|
createLibraryLoader(args);
|
||||||
|
|
||||||
|
@ -35,6 +35,13 @@ namespace dxvk::env {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setEnvVar(const char* name, const char* value) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
::SetEnvironmentVariableA(name, value);
|
||||||
|
#else
|
||||||
|
std::setenv(name, value);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
size_t matchFileExtension(const std::string& name, const char* ext) {
|
size_t matchFileExtension(const std::string& name, const char* ext) {
|
||||||
auto pos = name.find_last_of('.');
|
auto pos = name.find_last_of('.');
|
||||||
|
@ -28,6 +28,13 @@ namespace dxvk::env {
|
|||||||
*/
|
*/
|
||||||
std::string getEnvVar(const char* name);
|
std::string getEnvVar(const char* name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Sets environment variable
|
||||||
|
* \param [in] name Name of the variable
|
||||||
|
* \param [in] value New value to set
|
||||||
|
*/
|
||||||
|
void setEnvVar(const char* name, const char* value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Checks whether a file name has a given extension
|
* \brief Checks whether a file name has a given extension
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user