mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 14:39:58 -04:00
Set NVIDIA's shader disk cache on Linux only with NVIDIA's driver, in a folder that could be made and written, before any thread of the game starts.
The first part of this pull request (the cache beside the exe with an 8 GiB limit) was already in. This is the rest: nothing is set without NVIDIA's kernel driver, neither variable is set when the folder cannot be made or written (the driver caches nothing in such a folder), the log says which folder and limit hold, and a game run sets the drivers' cache variables in main before any of its threads can load a Vulkan driver (vk_device.c vk_driver_cache_env); the other modes still set them in create_instance. On Windows that only moves the MESA_SHADER_CACHE_DIR setenv earlier. Pull request #369 by mooki000, taken as it is. The Linux part is not compiled or run here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -611,6 +611,7 @@ int main(int argc, char **argv) {
|
||||
log_open(!mode);
|
||||
if (!mode) {
|
||||
cfg.boot = cfg.seconds > 0; // --seconds starts the game like --boot, with its checkpoints
|
||||
vk_driver_cache_env(); // before the threads below and rt_boot's, any of which may load the Vulkan driver
|
||||
discord_init(); // the Rich Presence thread (discord_rpc.c); it reads nx2navi.ini itself and idles while off
|
||||
rt_boot();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user