From: Andreas Beckmann Date: Fri, 26 Jan 2024 23:14:00 +0000 (+0100) Subject: set __GLVND_DISALLOW_PATCHING=1 before loading glvnd libraries X-Git-Tag: archive/raspbian/0_20150328-16+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff58bc4fe67cbd0de6ef9dd26e694d905644ebd3;p=primus.git set __GLVND_DISALLOW_PATCHING=1 before loading glvnd libraries Gbp-Pq: Name glvnd.patch --- diff --git a/libglfork.cpp b/libglfork.cpp index 03f514f..270918e 100644 --- a/libglfork.cpp +++ b/libglfork.cpp @@ -165,6 +165,9 @@ struct ContextsInfo: public std::map { struct EarlyInitializer { EarlyInitializer(const char **adpy_strp, const char **libgla_strp) { + // Allow multiple glvnd libGL.so.1 instances to be loaded into a process + // and OpenGL calls dispatched to them depending on context. + setenv("__GLVND_DISALLOW_PATCHING", "1", 0); #ifdef BUMBLEBEE_SOCKET // Signal the Bumblebee daemon to bring up secondary X int sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);