mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[d3d11] Avoid querying environment variables on shader creation
This commit is contained in:
parent
fea86ef116
commit
b055c2daea
@ -67,6 +67,9 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shader dump path is only available via an environment variable
|
||||
this->shaderDumpPath = env::getEnvVar("DXVK_SHADER_DUMP_PATH");
|
||||
}
|
||||
|
||||
}
|
@ -116,6 +116,9 @@ namespace dxvk {
|
||||
/// useful for debugging purposes or when applications have
|
||||
/// race conditions.
|
||||
bool enableContextLock;
|
||||
|
||||
/// Shader dump path
|
||||
std::string shaderDumpPath;
|
||||
};
|
||||
|
||||
}
|
@ -24,7 +24,7 @@ namespace dxvk {
|
||||
|
||||
// If requested by the user, dump both the raw DXBC
|
||||
// shader and the compiled SPIR-V module to a file.
|
||||
const std::string dumpPath = env::getEnvVar("DXVK_SHADER_DUMP_PATH");
|
||||
const std::string& dumpPath = pDevice->GetOptions()->shaderDumpPath;
|
||||
|
||||
if (dumpPath.size() != 0) {
|
||||
reader.store(std::ofstream(str::topath(str::format(dumpPath, "/", name, ".dxbc").c_str()).c_str(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user