From 4a3b3ba1a9a14798ff8fcaee53de587e32556ad1 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Thu, 11 Jun 2020 20:11:23 +0100 Subject: [PATCH] set __GLVND_DISALLOW_PATCHING=1 before loading glvnd libraries Gbp-Pq: Name glvnd.patch --- libglfork.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2