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 | |
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@
-rw-r--r-- | dist/Mesa/src/glx/drisw_glx.c | 4 | ||||
-rw-r--r-- | xserver/glx/glxdriswrast.c | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/dist/Mesa/src/glx/drisw_glx.c b/dist/Mesa/src/glx/drisw_glx.c index 30fe0536b..a431bf4a7 100644 --- a/dist/Mesa/src/glx/drisw_glx.c +++ b/dist/Mesa/src/glx/drisw_glx.c @@ -430,10 +430,10 @@ driOpenSwrast(void) void *driver = NULL; if (driver == NULL) - driver = driOpenDriver("swrast"); + driver = driOpenDriver("swrastg"); if (driver == NULL) - driver = driOpenDriver("swrastg"); + driver = driOpenDriver("swrast"); return driver; } 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; } |