From 51512d01d8e956b2afada91e51dfd7c0a6444ad6 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 20 Jan 2021 20:09:57 -0300 Subject: 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. --- src/common/nvidia_flags.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/common/nvidia_flags.h (limited to 'src/common/nvidia_flags.h') diff --git a/src/common/nvidia_flags.h b/src/common/nvidia_flags.h new file mode 100644 index 000000000..75a0233ac --- /dev/null +++ b/src/common/nvidia_flags.h @@ -0,0 +1,10 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +namespace Common { + +/// Configure platform specific flags for Nvidia's driver +void ConfigureNvidiaEnvironmentFlags(); + +} // namespace Common -- cgit v1.2.3