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
This commit is contained in:
Jed Davis 2022-07-28 19:07:30 +00:00
parent 06f1fbef08
commit 501b8ffcd7

View file

@ -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)