diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-11-11 12:18:32 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-11-11 12:18:32 +0000 |
commit | e0ec3b3335e3f2b6461f6c9510f10dabbb381d94 (patch) | |
tree | 509f56b6918eea854513735789c39c4c7b0965cd /xserver/glx | |
parent | a2f9e4985e2f3317cf670556692f4265a7bc60f7 (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/glx')
-rw-r--r-- | xserver/glx/glxdriswrast.c | 12 |
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; } |