summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2012-11-11 12:18:32 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2012-11-11 12:18:32 +0000
commite0ec3b3335e3f2b6461f6c9510f10dabbb381d94 (patch)
tree509f56b6918eea854513735789c39c4c7b0965cd /xserver
parenta2f9e4985e2f3317cf670556692f4265a7bc60f7 (diff)
Try to load the gallium3d "swrastg" driver if available before falling back
to the default mesa "swrast" one for software rendering. ok matthieu@
Diffstat (limited to 'xserver')
-rw-r--r--xserver/glx/glxdriswrast.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xserver/glx/glxdriswrast.c b/xserver/glx/glxdriswrast.c
index c69b4d258..87ad1e619 100644
--- a/xserver/glx/glxdriswrast.c
+++ b/xserver/glx/glxdriswrast.c
@@ -422,7 +422,7 @@ initializeExtensions(__GLXDRIscreen * screen)
static __GLXscreen *
__glXDRIscreenProbe(ScreenPtr pScreen)
{
- const char *driverName = "swrast";
+ const char *driverName = "swrastg";
__GLXDRIscreen *screen;
screen = calloc(1, sizeof *screen);
@@ -440,6 +440,16 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__DRI_CORE, __DRI_CORE_VERSION,
(void **) &screen->swrast,
__DRI_SWRAST, __DRI_SWRAST_VERSION);
+
+ if (screen->driver == NULL) {
+ driverName = "swrast";
+ screen->driver = glxProbeDriver(driverName,
+ (void **) &screen->core,
+ __DRI_CORE, __DRI_CORE_VERSION,
+ (void **) &screen->swrast,
+ __DRI_SWRAST, __DRI_SWRAST_VERSION);
+ }
+
if (screen->driver == NULL) {
goto handle_error;
}