Try to load the gallium3d "swrastg" driver if available before falling back

to the default mesa "swrast" one for software rendering.

ok matthieu@
This commit is contained in:
mpi 2012-11-11 12:18:31 +00:00
parent 0661f3e5da
commit 5675f61d57
2 changed files with 13 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}