Blob Blame History Raw
From 2bd1975803f1d7e03a7f98881e8332a2330c4146 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Fri, 14 Jan 2011 08:44:52 +0100
Subject: [PATCH] tools: Do not consider Gallium's softpipe and llvmpipe as accelerated

Those are software renderers too. It might be that llvmpipe gets good
enough in the future, but it's not the case at the moment.

Based on patch from Matthias Clasen <mclasen@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=639490
---
 tools/gnome-session-is-accelerated.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/gnome-session-is-accelerated.c b/tools/gnome-session-is-accelerated.c
index 6b8b1a4..0729c14 100644
--- a/tools/gnome-session-is-accelerated.c
+++ b/tools/gnome-session-is-accelerated.c
@@ -144,8 +144,11 @@ _has_hardware_gl (Display *display)
 
         renderer = (const char *) glGetString (GL_RENDERER);
         /* The current Mesa software GL renderer string is
-         * "Software Rasterizer" */
-        if (strcasestr (renderer, "software rasterizer") != NULL)
+	 * "Software Rasterizer".
+	 * Gallium has softpipe and llvmpipe. */
+        if (strcasestr (renderer, "software rasterizer") != NULL ||
+            strcasestr (renderer, "softpipe") != NULL ||
+            strcasestr (renderer, "llvmpipe") != NULL)
                 goto out;
 
         /* we need to get the max texture size while we have a context,
-- 
1.7.3.4