summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-04-21 17:18:02 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-04-21 17:18:02 +0000
commit1f79d81b3faf2988cc1bb238cecbb34e3707fd00 (patch)
tree7bc2ce3e6e436446834d263143af3bd6f26db03d
parent3c9092a4681773d9b2a5e2f94e2f4a3cb924fa46 (diff)
downloaddrak3d-1f79d81b3faf2988cc1bb238cecbb34e3707fd00.tar
drak3d-1f79d81b3faf2988cc1bb238cecbb34e3707fd00.tar.gz
drak3d-1f79d81b3faf2988cc1bb238cecbb34e3707fd00.tar.bz2
drak3d-1f79d81b3faf2988cc1bb238cecbb34e3707fd00.tar.xz
drak3d-1f79d81b3faf2988cc1bb238cecbb34e3707fd00.zip
Fix software rendering detection with newer Mesa
Newer Mesa report that htey support direct rendering even when they are in software mode and the vendor string no longer says "Mesa" but "Software Rasterizer". Detect this case, and only set "direct_rendering" to true when it's not set.
-rw-r--r--lib/Xconfig/glx.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Xconfig/glx.pm b/lib/Xconfig/glx.pm
index 45bef17..814dc06 100644
--- a/lib/Xconfig/glx.pm
+++ b/lib/Xconfig/glx.pm
@@ -138,6 +138,7 @@ sub get_glx_status {
my $glx_status = {};
$glx_status->{context}{Mesa} = $system_glx_info->{strings}{OpenGL_renderer} =~ /Mesa/;
+ $glx_status->{context}{SoftwareRasterizer} = $system_glx_info->{strings}{OpenGL_renderer} =~ /Software Rasterizer/;
$glx_status->{context}{MesaDRI} = $system_glx_info->{strings}{OpenGL_renderer} =~ /Mesa DRI/;
$glx_status->{context}{Xgl} =
$system_glx_info->{strings}{server_glx_vendor} eq 'SGI' &&
@@ -149,7 +150,7 @@ sub get_glx_status {
$glx_status->{context}{Xmetisse} = is_in_metisse();
$glx_status->{capabilities}{direct_rendering} =
- $system_glx_info->{capabilities}{direct_rendering} ||
+ ($system_glx_info->{capabilities}{direct_rendering} && !$glx_status->{context}{SoftwareRasterizer}) ||
$glx_status->{context}{Xgl} ||
$glx_status->{context}{Xmetisse};