From a2e8c0aa4272273f3b3a8e943e7438328dfa2b51 Mon Sep 17 00:00:00 2001 From: Jed Davis Date: Thu, 28 Jul 2022 19:07:30 +0000 Subject: [PATCH] Bug 1780312 - Turn off the Linux nvidia driver's shader cache in the RDD process. r=gcp We were already turning off Mesa's shader cache in the RDD process, because it's not useful given that we're only using video codec acceleration and moving images around, and it does a few things related to trying to access the cache that the sandbox would have to accomodate. This patch does the equivalent thing for the nvidia proprietary driver; we don't support it for media codec acceleration, but it can still be loaded in that process (e.g., on multi-GPU systems) and it's trying to call `statfs` on startup which may be related. Differential Revision: https://phabricator.services.mozilla.com/D152932 --- ipc/glue/GeckoChildProcessHost.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index fcf0f3192b47..6febbd83800b 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -428,6 +428,8 @@ GeckoChildProcessHost::GeckoChildProcessHost(GeckoProcessType aProcessType, // this process, we just disable the cache to prevent that. mLaunchOptions->env_map["MESA_GLSL_CACHE_DISABLE"] = "true"; mLaunchOptions->env_map["MESA_SHADER_CACHE_DISABLE"] = "true"; + // In case the nvidia driver is also loaded: + mLaunchOptions->env_map["__GL_SHADER_DISK_CACHE"] = "0"; } #endif #if defined(MOZ_ENABLE_FORKSERVER)