summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/envvars.html2
-rw-r--r--src/glx/indirect_glx.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/envvars.html b/docs/envvars.html
index 89563e36361..45e45eb0c9f 100644
--- a/docs/envvars.html
+++ b/docs/envvars.html
@@ -31,7 +31,7 @@ sometimes be useful for debugging end-user issues.
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
<li>LIBGL_ALWAYS_INDIRECT - if set to `true`, forces an indirect rendering context/connection.
<li>LIBGL_ALWAYS_SOFTWARE - if set to `true`, always use software rendering
-<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
+<li>LIBGL_NO_DRAWARRAYS - if set to `true`, do not use DrawArrays GLX protocol (for debugging)
<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
calls per second.
<li>LIBGL_DRI3_DISABLE - disable DRI3 if set to `true`.
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 51dd2cacb21..4302a8ff288 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -30,9 +30,13 @@
* Kristian Høgsberg ([email protected])
*/
+#include <stdbool.h>
+
#include "glapi.h"
#include "glxclient.h"
+#include "util/debug.h"
+
#ifndef GLX_USE_APPLEGL
extern struct _glapi_table *__glXNewIndirectAPI(void);
@@ -371,7 +375,7 @@ indirect_create_context(struct glx_screen *psc,
return NULL;
}
gc->client_state_private = state;
- state->NoDrawArraysProtocol = (getenv("LIBGL_NO_DRAWARRAYS") != NULL);
+ state->NoDrawArraysProtocol = env_var_as_boolean("LIBGL_NO_DRAWARRAYS", false);
/*
** Create a temporary buffer to hold GLX rendering commands. The size