blob: 01968b8d769bab53bc0b9add09b56adaa399091e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
--- include/xorg-config.h.in.orig 2007-04-29 23:26:56.000000000 +0200
+++ include/xorg-config.h.in 2007-04-29 23:27:28.000000000 +0200
@@ -115,4 +115,7 @@
/* Have execinfo.h */
#undef HAVE_EXECINFO_H
+/* Loadable XFree86 server awesomeness */
+#undef XFree86LOADER
+
#endif /* _XORG_CONFIG_H_ */
--- hw/xfree86/dri/dri.c.orig 2007-01-23 06:39:16.000000000 +0100
+++ hw/xfree86/dri/dri.c 2007-04-29 20:18:51.000000000 +0200
@@ -75,6 +75,11 @@
extern Bool noPanoramiXExtension;
#endif
+#ifdef XFree86LOADER
+typedef __GLXscreen *(*__glXgetActiveScreenFn)(int);
+__glXgetActiveScreenFn __glXgetActiveScreenPtr = NULL;
+#endif
+
static int DRIScreenPrivIndex = -1;
static int DRIWindowPrivIndex = -1;
static unsigned long DRIGeneration = 0;
@@ -800,13 +805,24 @@
DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- __GLXscreen *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
- __GLcontextModes *modes = pGLXScreen->modes;
- void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
DRIContextPrivPtr pDRIContextPriv;
void *contextStore;
VisualPtr visual;
int visNum;
+#if defined(XFree86LOADER)
+ __GLXscreen *pGLXScreen;
+ __GLcontextModes *modes;
+ void **pVisualConfigPriv;
+ if (__glXgetActiveScreenPtr == NULL)
+ __glXgetActiveScreenPtr = (__glXgetActiveScreenFn)LoaderSymbol("__glXgetActiveScreen");
+ pGLXScreen = (*__glXgetActiveScreenPtr)(pScreen->myNum);
+ modes = pGLXScreen->modes;
+ pVisualConfigPriv = pGLXScreen->pVisualPriv;
+#else
+ __GLXscreen *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
+ __GLcontextModes *modes = pGLXScreen->modes;
+ void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
+#endif
visual = pScreen->visuals;
@@ -864,11 +880,22 @@
XID context, drm_context_t * pHWContext)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
+ DRIContextPrivPtr pDRIContextPriv;
+ void *contextStore;
+#if defined(XFree86LOADER)
+ __GLXscreen *pGLXScreen;
+ __GLcontextModes *modes;
+ void **pVisualConfigPriv;
+ if (__glXgetActiveScreenPtr == NULL)
+ __glXgetActiveScreenPtr = (__glXgetActiveScreenFn)LoaderSymbol("__glXgetActiveScreen");
+ pGLXScreen = (*__glXgetActiveScreenPtr)(pScreen->myNum);
+ modes = pGLXScreen->modes;
+ pVisualConfigPriv = pGLXScreen->pVisualPriv;
+#else
__GLXscreen *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
__GLcontextModes *modes = pGLXScreen->modes;
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
- DRIContextPrivPtr pDRIContextPriv;
- void *contextStore;
+#endif
if (pDRIPriv->createDummyCtx && !pDRIPriv->dummyCtxPriv) {
if (!DRICreateDummyContext(pScreen, pDRIPriv->createDummyCtxPriv)) {
|