summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-01-20 20:09:57 -0300
committerGravatar ReinUsesLisp2021-01-21 00:41:03 -0300
commit51512d01d8e956b2afada91e51dfd7c0a6444ad6 (patch)
tree920ed6ec21b438894b7caeef0a946dbfc2ead10a /src/yuzu_cmd/yuzu.cpp
parentMerge pull request #5755 from FearlessTobi/port-5344 (diff)
downloadyuzu-51512d01d8e956b2afada91e51dfd7c0a6444ad6.tar.gz
yuzu-51512d01d8e956b2afada91e51dfd7c0a6444ad6.tar.xz
yuzu-51512d01d8e956b2afada91e51dfd7c0a6444ad6.zip
renderer_opengl: Avoid precompiled cache and force NV GL cache directory
Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to be in yuzu's user directory to stop commonly distributed malware from deleting our driver shader cache. And by setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader cache size. This has only been implemented on Windows, mostly because previous tests didn't seem to work on Linux. Disable the precompiled cache on Nvidia's driver. There's no need to hide information the driver already has in its own cache.
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 4faf62ede..0e1f3bdb3 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -17,6 +17,7 @@
17#include "common/logging/filter.h" 17#include "common/logging/filter.h"
18#include "common/logging/log.h" 18#include "common/logging/log.h"
19#include "common/microprofile.h" 19#include "common/microprofile.h"
20#include "common/nvidia_flags.h"
20#include "common/scm_rev.h" 21#include "common/scm_rev.h"
21#include "common/scope_exit.h" 22#include "common/scope_exit.h"
22#include "common/string_util.h" 23#include "common/string_util.h"
@@ -152,6 +153,8 @@ int main(int argc, char** argv) {
152 MicroProfileOnThreadCreate("EmuThread"); 153 MicroProfileOnThreadCreate("EmuThread");
153 SCOPE_EXIT({ MicroProfileShutdown(); }); 154 SCOPE_EXIT({ MicroProfileShutdown(); });
154 155
156 Common::ConfigureNvidiaEnvironmentFlags();
157
155 if (filepath.empty()) { 158 if (filepath.empty()) {
156 LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); 159 LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
157 return -1; 160 return -1;