static int InitDriver( Display *dpy )
{
- char * str;
- char * srvLibname = NULL;
-
- srvLibname = strdup(dpy->clientDriverName);
- if (!srvLibname) {
- goto failed;
- }
-
- /*
- * Construct server library name. Assume clientDriverName ends
- * with dri.so. Replace dri.so with srv.so.
- */
- str = strstr(srvLibname, "dri.so");
- if (!str) {
- goto failed;
- }
- strcpy(str, "srv.so");
-
/*
* Begin DRI setup.
* We're kind of combining the per-display and per-screen information
goto failed;
}
- dpy->dlHandleSrv = dlopen(srvLibname, RTLD_NOW | RTLD_GLOBAL);
- if (!dpy->dlHandleSrv) {
- fprintf(stderr, "Unable to open %s: %s\n", dpy->clientDriverName,
- dlerror());
- goto failed;
- }
-
/* Pull in Mini GLX specific hooks:
*/
- dpy->driver = (struct DRIDriverRec *) dlsym(dpy->dlHandleSrv,
+ dpy->driver = (struct DRIDriverRec *) dlsym(dpy->dlHandle,
"__driDriver");
if (!dpy->driver) {
fprintf(stderr, "Couldn't find __driDriver in %s\n",
return GL_TRUE;
failed:
- if (srvLibname) {
- free(srvLibname);
- }
- if (dpy->dlHandleSrv) {
- dlclose(dpy->dlHandleSrv);
- dpy->dlHandleSrv = 0;
- }
if (dpy->dlHandle) {
dlclose(dpy->dlHandle);
dpy->dlHandle = 0;
* \brief handle to the client dynamic
* library
*/
- void *dlHandleSrv; /**<
- * \brief handle to the server dynamic
- * library
- */
/*@}*/
/**
# -*-makefile-*-
-TOP = ../../../../..
-
MESA_MODULES = $(TOP)/src/mesa/mesa.a
### Include directories
SHARED_INCLUDES = \
-I. \
- -I../common \
+ -I$(TOP)/src/mesa/drivers/dri/common \
-Iserver \
-I$(DRM_SOURCE_PATH)/shared \
-I$(TOP)/include \
# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile ../Makefile.template
+$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(GL_LIB_DEPS)
ctx->shared.hFrameBuffer = ctx->FBStart;
ctx->shared.fbSize = ctx->FBSize;
ctx->shared.hSAREA = 0xB37D;
- ctx->shared.SAREASize = DRM_PAGE_SIZE;
+ ctx->shared.SAREASize = SAREA_MAX;
id = shmget(ctx->shared.hSAREA, ctx->shared.SAREASize, IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
if (id == -1) {
/* segment will already exist if previous server segfaulted */
fprintf(stderr, "fb: shmat failed\n");
return 0;
}
- memset(ctx->pSAREA, 0, DRM_PAGE_SIZE);
+ memset(ctx->pSAREA, 0, SAREA_MAX);
return 1;
}
}
info->registerSize = ctx->MMIOSize;
- ctx->shared.SAREASize = DRM_PAGE_SIZE;
+ ctx->shared.SAREASize = SAREA_MAX;
/* Note that drmOpen will try to load the kernel module, if needed. */
ctx->drmFD = drmOpen("r128", NULL );
}
info->registerSize = ctx->MMIOSize;
- ctx->shared.SAREASize = DRM_PAGE_SIZE;
+ ctx->shared.SAREASize = SAREA_MAX;
/* Note that drmOpen will try to load the kernel module, if needed. */
ctx->drmFD = drmOpen("radeon", NULL );