aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdriswrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r--xorg-server/glx/glxdriswrast.c43
1 files changed, 24 insertions, 19 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index fb2316a62..59a202b16 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -26,6 +26,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <stdint.h>
@@ -54,13 +58,6 @@
#include "dispatch.h"
#include "extension_string.h"
-/* RTLD_LOCAL is not defined on Cygwin */
-#ifdef __CYGWIN__
-#ifndef RTLD_LOCAL
-#define RTLD_LOCAL 0
-#endif
-#endif
-
typedef struct __GLXDRIscreen __GLXDRIscreen;
typedef struct __GLXDRIcontext __GLXDRIcontext;
typedef struct __GLXDRIdrawable __GLXDRIdrawable;
@@ -77,7 +74,7 @@ struct __GLXDRIscreen {
};
struct __GLXDRIcontext {
- __GLXcontext base;
+ struct glx_context base;
__DRIcontext *driContext;
};
@@ -130,7 +127,7 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
}
static void
-__glXDRIcontextDestroy(__GLXcontext *baseContext)
+__glXDRIcontextDestroy(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -141,7 +138,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
+__glXDRIcontextMakeCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -154,7 +151,7 @@ __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
+__glXDRIcontextLoseCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -163,7 +160,7 @@ __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
+__glXDRIcontextCopy(struct glx_context *baseDst, struct glx_context *baseSrc,
unsigned long mask)
{
__GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
@@ -175,7 +172,7 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
}
static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
+__glXDRIcontextForceCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -190,7 +187,7 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
#ifdef __DRI_TEX_BUFFER
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -217,7 +214,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -228,7 +225,7 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
#else
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -236,7 +233,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -257,17 +254,21 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
(*screen->core->destroyScreen)(screen->driScreen);
+#ifdef _MSC_VER
+ FreeLibrary(screen->driver);
+#else
dlclose(screen->driver);
+#endif
__glXScreenDestroy(baseScreen);
free(screen);
}
-static __GLXcontext *
+static struct glx_context *
__glXDRIscreenCreateContext(__GLXscreen *baseScreen,
__GLXconfig *glxConfig,
- __GLXcontext *baseShareContext)
+ struct glx_context *baseShareContext)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
@@ -492,7 +493,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
handle_error:
if (screen->driver)
+#ifdef _MSC_VER
+ FreeLibrary(screen->driver);
+#else
dlclose(screen->driver);
+#endif
free(screen);