Skip to content

Instantly share code, notes, and snippets.

@michicc
Created February 27, 2021 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michicc/fb6496a8a7fa2c2431e4b33f7ee1e6d7 to your computer and use it in GitHub Desktop.
Save michicc/fb6496a8a7fa2c2431e4b33f7ee1e6d7 to your computer and use it in GitHub Desktop.
llvmpipe
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp
index e466e506d..7075803cc 100644
--- a/src/video/opengl.cpp
+++ b/src/video/opengl.cpp
@@ -536,6 +536,10 @@ const char *OpenGLBackend::Init()
DEBUG(driver, 1, "OpenGL driver: %s - %s (%s)", vend, renderer, ver);
+ /* Don't use MESA software rendering backends as they are slower than
+ * just using a non-OpenGL video driver. */
+ if (strncmp(renderer, "llvmpipe", 8) == 0 || strncmp(renderer, "softpipe", 8) == 0) return "Software renderer detected, not using OpenGL";
+
const char *minor = strchr(ver, '.');
_gl_major_ver = atoi(ver);
_gl_minor_ver = minor != nullptr ? atoi(minor + 1) : 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment