View | Details | Raw Unified | Return to bug 10472 | Differences between
and this patch

Collapse All | Expand All

(-)mesa-7.4.4-1.cygport (-14 / +23 lines)
Lines 2-14 Link Here
2
HOMEPAGE="http://www.mesa3d.org/"
2
HOMEPAGE="http://www.mesa3d.org/"
3
SRC_URI="mirror://sourceforge/mesa3d/MesaLib-${PV}.tar.bz2
3
SRC_URI="mirror://sourceforge/mesa3d/MesaLib-${PV}.tar.bz2
4
         mirror://sourceforge/mesa3d/MesaDemos-${PV}.tar.bz2"
4
         mirror://sourceforge/mesa3d/MesaDemos-${PV}.tar.bz2"
5
PATCH_URI="7.2-mklib.patch"
5
PATCH_URI="7.2-mklib.patch
6
        0002-PTHREADS-should-be-defined-on-cygwin-also.patch
7
        0004-Move-initialization-of-ext_list_first_time-out-of-DR.patch
8
        0005-External-texture-compressor-names-are-same-on-Cygwin.patch
9
        0006-Bodge-for-cygwin-link-swrast.so-with-ligGL.dll.a-as-.patch
10
        0007-Install-final_bins-as-well.patch
11
        0008-Cygwin-Various-changes-to-enable-mesa-to-be-built-fo.patch
12
        0009-Fix-building-of-couple-of-GLSL-demos.patch"
6
13
7
SRC_DIR=Mesa-${PV}
14
SRC_DIR=Mesa-${PV}
8
15
9
PKG_NAMES="mesa libGL1 libGL-devel libGLU1 libGLU-devel libGLw1 libGLw-devel
16
PKG_NAMES="mesa libGL1 libGL-devel libGLU1 libGLU-devel libGLw1 libGLw-devel
10
           libOSMesa7 libOSMesa-devel"
17
           libOSMesa7 libOSMesa-devel mesademos"
11
mesa_CONTENTS="usr/bin/*.exe usr/share/doc/"
18
19
mesa_CONTENTS="usr/bin/glxdemo.exe usr/bin/glxgears.exe usr/bin/glxinfo.exe
20
               usr/bin/glxheads.exe usr/share/doc/"
12
libGL1_CONTENTS='usr/bin/cygGL-1.dll usr/lib/dri/'
21
libGL1_CONTENTS='usr/bin/cygGL-1.dll usr/lib/dri/'
13
libGL_devel_CONTENTS="--exclude=glu* usr/include/GL/gl*.h usr/include/GL/internal
22
libGL_devel_CONTENTS="--exclude=glu* usr/include/GL/gl*.h usr/include/GL/internal
14
                      usr/lib/libGL.* usr/lib/pkgconfig/gl.pc"
23
                      usr/lib/libGL.* usr/lib/pkgconfig/gl.pc"
Lines 18-27 Link Here
18
libGLw1_CONTENTS='usr/bin/cygGLw-1.dll'
27
libGLw1_CONTENTS='usr/bin/cygGLw-1.dll'
19
libGLw_devel_CONTENTS="usr/include/GL/GLw*.h
28
libGLw_devel_CONTENTS="usr/include/GL/GLw*.h
20
                       usr/lib/libGLw.* usr/lib/pkgconfig/glw.pc"
29
                       usr/lib/libGLw.* usr/lib/pkgconfig/glw.pc"
21
libOSMesa7_CONTENTS='usr/bin/cygOSMesa-7.dll'
30
#libOSMesa7_CONTENTS='usr/bin/cygOSMesa-7.dll'
22
libOSMesa_devel_CONTENTS="usr/include/GL/*mesa*.h usr/lib/libOSMesa.*"
31
#libOSMesa_devel_CONTENTS="usr/include/GL/*mesa*.h usr/lib/libOSMesa.*"
32
mesademos_CONTENTS="--exclude=glxdemo.exe --exclude=glxgears.exe
33
                     --exclude=glxheads.exe --exclude=glxinfo.exe usr/bin/*.exe"
23
34
24
src_compile() {
35
src_compile() {
36
        cd ${S}
37
        cygautoreconf
38
25
	lndirs
39
	lndirs
26
	cd ${B}
40
	cd ${B}
27
#		--enable-xcb: only for DRI driver?
41
#		--enable-xcb: only for DRI driver?
Lines 29-47 Link Here
29
		--enable-shared --disable-static \
43
		--enable-shared --disable-static \
30
		--disable-glut \
44
		--disable-glut \
31
		--enable-motif \
45
		--enable-motif \
32
		--with-driver=xlib
46
		--with-driver=dri --with-dri-drivers=swrast \
47
                --with-demos=xdemos,glsl,samples,redbook,demos
33
48
34
	cygmake -j1 APP_LIB_DEPS="-lX11"
49
	cygmake -j1 APP_LIB_DEPS="-lX11"
35
50
36
	cygmake -C src/mesa gl.pc
51
	cygmake -C src/mesa gl.pc
37
	cygmake -C src/glu glu.pc
52
	cygmake -C src/glu glu.pc
38
	cygmake -C src/glw glw.pc
53
	cygmake -C src/glw glw.pc
39
40
	cd ${B}/src/mesa/drivers/dri/swrast
41
	# _glapi_Dispatch/_glapi_Context are supposed to be defined by
42
	# the implementor (i.e. XWin).  The problem is that if there is no
43
	# single implementor, then what to resolve against?
44
	cygmake DEFINES="-DUSE_XSHM -DIN_DRI_DRIVER" MESA_MODULES="\$(TOP)/lib/libGL.dll.a"
45
}
54
}
46
55
47
src_test() {
56
src_test() {
Lines 50-56 Link Here
50
59
51
src_install() {
60
src_install() {
52
	cd ${B}
61
	cd ${B}
53
	dobin $(find src -name '*.dll') progs/xdemos/glx{demo,gears,heads,info}.exe
62
	dobin $(find lib -name '*.dll') progs/*/*.exe
54
	dolib lib/*.dll.a
63
	dolib lib/*.dll.a
55
64
56
	exeinto /usr/lib/dri
65
	exeinto /usr/lib/dri
Lines 58-64 Link Here
58
67
59
	insinto /usr/include/GL
68
	insinto /usr/include/GL
60
	doins include/GL/gl{,ext,u,x,xext,*_mangle}.h
69
	doins include/GL/gl{,ext,u,x,xext,*_mangle}.h
61
	doins include/GL/osmesa.h
70
#	doins include/GL/osmesa.h
62
	doins src/glw/GLw*A.h
71
	doins src/glw/GLw*A.h
63
72
64
	# for building xorg-server
73
	# for building xorg-server
(-)0008-Cygwin-Various-changes-to-enable-mesa-to-be-built-fo.patch (+205 lines)
Line 0 Link Here
1
From 849c5a06462e59646ec7dcba40a6dee784862d80 Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Thu, 23 Jul 2009 19:28:24 +0100
4
Subject: [PATCH 8/9] Cygwin: Various changes to enable mesa to be built for Cygwin -with-driver=dri -with-dri-driver=swrast rather than -with-driver=x11
5
6
This allows DRI driver to be built with only the swrast driver, and not
7
requiring the platform to have DRM support
8
9
In configure.ac, no_drm_is_fatal is introduced to try to make behaviour on platforms which
10
expect to have DRM available the same as before
11
12
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13
---
14
 configure.ac          |   51 ++++++++++++++++++++++++++++++++++++++++++++----
15
 src/glx/x11/Makefile  |   19 +++++++++++++----
16
 src/glx/x11/glxcmds.c |    4 ++-
17
 src/glx/x11/glxext.c  |    3 ++
18
 src/glx/x11/xf86dri.h |    5 ++++
19
 5 files changed, 71 insertions(+), 11 deletions(-)
20
21
diff --git a/configure.ac b/configure.ac
22
index b10f8b3..2c74e9f 100644
23
--- a/configure.ac
24
+++ b/configure.ac
25
@@ -538,6 +538,22 @@ else
26
     enable_xcb=no
27
 fi
28
 
29
+dnl is DRM expected on the target platform?
30
+case "$host_os" in
31
+linux*|*-gnu*|gnu*)
32
+    no_drm_is_fatal=yes
33
+    ;;
34
+solaris*)
35
+    no_drm_is_fatal=yes
36
+    ;;
37
+cygwin*)
38
+    no_drm_is_fatal=no
39
+    ;;
40
+darwin* )
41
+    no_drm_is_fatal=no
42
+    ;;
43
+esac
44
+
45
 dnl
46
 dnl libGL configuration per driver
47
 dnl
48
@@ -572,10 +588,18 @@ dri)
49
     fi
50
 
51
     # Check for libdrm
52
-    PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
53
-    PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
54
-    GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
55
-    DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
56
+    PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED], HAVE_LIBDRM=yes, HAVE_LIBDRM=no)
57
+    PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED], HAVE_DRI2PROTO=yes, HAVE_DRI2PROTO=no)
58
+
59
+    if test "$HAVE_LIBDRM" = no; then
60
+        if test "$no_drm_is_fatal" = yes; then
61
+            AC_MSG_ERROR([LIBDRM $LIBDRM_REQUIRED is required by DRI driver])
62
+        fi
63
+        LIBDRM_CFLAGS=-DNO_LIBDRM
64
+    else
65
+        GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
66
+        DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
67
+    fi
68
 
69
     PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
70
 
71
@@ -586,8 +610,15 @@ dri)
72
 
73
     # find the DRI deps for libGL
74
     if test "$x11_pkgconfig" = yes; then
75
+        dri_modules="x11 xext xdamage xfixes"
76
+
77
+        # add xf86vidmode if available
78
+        PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no)
79
+        if test "$HAVE_XF86VIDMODE" = yes ; then
80
+            dri_modules="$dri_modules xxf86vm"
81
+        fi
82
+
83
         # add xcb modules if necessary
84
-        dri_modules="x11 xext xxf86vm xdamage xfixes"
85
         if test "$enable_xcb" = yes; then
86
             dri_modules="$dri_modules x11-xcb xcb-glx"
87
         fi
88
@@ -764,6 +795,16 @@ if test "$mesa_driver" = dri; then
89
             DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
90
         fi
91
         ;;
92
+    cygwin*)
93
+        DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
94
+        if test "x$driglx_direct" = xyes; then
95
+            DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
96
+        fi
97
+        DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
98
+        if test "x$DRI_DIRS" = "xyes"; then
99
+            DRI_DIRS="swrast"
100
+        fi
101
+        ;;
102
     esac
103
 
104
     # default drivers
105
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
106
index 86d84d4..906eb95 100644
107
--- a/src/glx/x11/Makefile
108
+++ b/src/glx/x11/Makefile
109
@@ -1,9 +1,21 @@
110
 TOP = ../../..
111
 include $(TOP)/configs/current
112
 
113
-EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER \
114
+EXTRA_DEFINES = -D_REENTRANT -UIN_DRI_DRIVER \
115
                 -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
116
 
117
+ifdef HAVE_XF86VIDMODE
118
+EXTRA_DEFINES = $(EXTRA_DEFINES) -DXF86VIDMODE
119
+endif
120
+
121
+ifdef HAVE_LIBDRM
122
+DRI_SOURCES = \
123
+	  dri_glx.c \
124
+	  XF86dri.c \
125
+	  dri2_glx.c \
126
+	  dri2.c
127
+endif
128
+
129
 SOURCES = \
130
 	  glcontextmodes.c \
131
 	  clientattrib.c \
132
@@ -33,11 +45,8 @@ SOURCES = \
133
 	  glx_query.c \
134
 	  drisw_glx.c \
135
 	  dri_common.c \
136
-	  dri_glx.c \
137
-	  XF86dri.c \
138
 	  glxhash.c \
139
-	  dri2_glx.c \
140
-	  dri2.c
141
+	  $(DRI_SOURCES)
142
 
143
 include $(TOP)/src/mesa/sources.mak
144
 
145
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
146
index 820d8b9..dddf535 100644
147
--- a/src/glx/x11/glxcmds.c
148
+++ b/src/glx/x11/glxcmds.c
149
@@ -40,7 +40,9 @@
150
 
151
 #ifdef GLX_DIRECT_RENDERING
152
 #include <sys/time.h>
153
+#ifdef XF86VIDMODE
154
 #include <X11/extensions/xf86vmode.h>
155
+#endif
156
 #include "xf86dri.h"
157
 #endif
158
 
159
@@ -2895,7 +2897,7 @@ static const struct name_address_pair GLX_functions[] = {
160
    GLX_FUNCTION2( glXBindTexImageEXT, __glXBindTexImageEXT ),
161
    GLX_FUNCTION2( glXReleaseTexImageEXT, __glXReleaseTexImageEXT ),
162
 
163
-#ifdef GLX_DIRECT_RENDERING
164
+#if defined(GLX_DIRECT_RENDERING) && !defined(NO_LIBDRM)
165
    /*** DRI configuration ***/
166
    GLX_FUNCTION( glXGetScreenDriver ),
167
    GLX_FUNCTION( glXGetDriverConfig ),
168
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
169
index fb2dfe4..74af9eb 100644
170
--- a/src/glx/x11/glxext.c
171
+++ b/src/glx/x11/glxext.c
172
@@ -722,10 +722,13 @@ __glXInitialize(Display * dpy)
173
     ** Note: This _must_ be done before calling any other DRI routines
174
     ** (e.g., those called in AllocAndFetchScreenConfigs).
175
     */
176
+#ifndef NO_LIBDRM
177
    if (glx_direct && glx_accel) {
178
       dpyPriv->dri2Display = dri2CreateDisplay(dpy);
179
       dpyPriv->driDisplay = driCreateDisplay(dpy);
180
    }
181
+#endif
182
+
183
    if (glx_direct)
184
       dpyPriv->driswDisplay = driswCreateDisplay(dpy);
185
 #endif
186
diff --git a/src/glx/x11/xf86dri.h b/src/glx/x11/xf86dri.h
187
index f2d0dd5..a4388aa 100644
188
--- a/src/glx/x11/xf86dri.h
189
+++ b/src/glx/x11/xf86dri.h
190
@@ -39,7 +39,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
191
 #define _XF86DRI_H_
192
 
193
 #include <X11/Xfuncproto.h>
194
+#ifndef NO_LIBDRM
195
 #include <xf86drm.h>
196
+#else
197
+typedef unsigned int drm_handle_t;
198
+typedef unsigned int drm_magic_t;
199
+#endif
200
 
201
 #define X_XF86DRIQueryVersion                   0
202
 #define X_XF86DRIQueryDirectRenderingCapable    1
203
-- 
204
1.6.3.2
205
(-)0005-External-texture-compressor-names-are-same-on-Cygwin.patch (+27 lines)
Line 0 Link Here
1
From 0a418262979b1bd3c98621047cc6a27b755d9602 Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Thu, 23 Jul 2009 19:30:02 +0100
4
Subject: [PATCH 5/9] External texture compressor names are same on Cygwin as Mingw
5
6
7
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
8
---
9
 src/mesa/main/texcompress_s3tc.c |    2 +-
10
 1 files changed, 1 insertions(+), 1 deletions(-)
11
12
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
13
index a1c0f18..a52f714 100644
14
--- a/src/mesa/main/texcompress_s3tc.c
15
+++ b/src/mesa/main/texcompress_s3tc.c
16
@@ -44,7 +44,7 @@
17
 #include "texformat.h"
18
 #include "texstore.h"
19
 
20
-#ifdef __MINGW32__
21
+#if defined (__MINGW32__) || defined (__CYGWIN__)
22
 #define DXTN_LIBNAME "dxtn.dll"
23
 #define RTLD_LAZY 0
24
 #define RTLD_GLOBAL 0
25
-- 
26
1.6.3.2
27
(-)0006-Bodge-for-cygwin-link-swrast.so-with-ligGL.dll.a-as-.patch (+32 lines)
Line 0 Link Here
1
From d495840a287fba024861157fa4c6381fcac5be8c Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Thu, 23 Jul 2009 19:31:07 +0100
4
Subject: [PATCH 9/9] Bodge for cygwin: link swrast.so with libGL.dll.a to resolve all symbols
5
6
_glapi_Dispatch/_glapi_Context are supposed to be defined by
7
the implementor (i.e. XWin).  The problem is that if there is no
8
single implementor, then what to resolve against?
9
10
We link again libGL.dll.a to provide those symbols (and take other
11
steps in XWin to avoid duplicating symbols there)
12
13
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
14
---
15
 src/mesa/drivers/dri/Makefile.template |    2 +-
16
 1 files changed, 1 insertions(+), 1 deletions(-)
17
18
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
19
index 18dbeba..0b7ec3f 100644
20
--- a/src/mesa/drivers/dri/Makefile.template
21
+++ b/src/mesa/drivers/dri/Makefile.template
22
@@ -1,6 +1,6 @@
23
 # -*-makefile-*-
24
 
25
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
26
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a $(TOP)/lib/libGL.dll.a
27
 
28
 COMMON_GALLIUM_SOURCES = \
29
         ../common/utils.c \
30
-- 
31
1.6.3.2
32
(-)0007-Install-final_bins-as-well.patch (+27 lines)
Line 0 Link Here
1
From 29d25499f01d820a7e25e42d75f58cb57123676a Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Thu, 23 Jul 2009 19:31:20 +0100
4
Subject: [PATCH 7/9] Install final_bins as well
5
6
7
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
8
---
9
 bin/mklib |    4 ++++
10
 1 files changed, 4 insertions(+), 0 deletions(-)
11
12
diff --git a/bin/mklib b/bin/mklib
13
index 2444945..42db31d 100755
14
--- a/bin/mklib
15
+++ b/bin/mklib
16
@@ -972,4 +972,8 @@ esac
17
 if [ ${INSTALLDIR} != "." ] ; then
18
     echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
19
     mv ${FINAL_LIBS} ${INSTALLDIR}/
20
+    if [ "x${FINAL_BINS}" != "x" ] ; then
21
+        echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR}
22
+        mv ${FINAL_BINS} ${INSTALLDIR}
23
+    fi
24
 fi
25
-- 
26
1.6.3.2
27
(-)0009-Fix-building-of-couple-of-GLSL-demos.patch (+43 lines)
Line 0 Link Here
1
From 26fb482e6ad23c89b5112e41412d0133749e3057 Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Fri, 24 Jul 2009 20:33:25 +0100
4
Subject: [PATCH 9/9] Fix building of couple of GLSL demos
5
6
7
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
8
---
9
 progs/glsl/skinning.c |    3 +++
10
 progs/glsl/twoside.c  |    3 +++
11
 2 files changed, 6 insertions(+), 0 deletions(-)
12
13
diff --git a/progs/glsl/skinning.c b/progs/glsl/skinning.c
14
index 65ba983..2b96f31 100644
15
--- a/progs/glsl/skinning.c
16
+++ b/progs/glsl/skinning.c
17
@@ -16,6 +16,9 @@
18
 #include <GL/glut.h>
19
 #include "shaderutil.h"
20
 
21
+#ifndef M_PI
22
+#define M_PI 3.1415926535
23
+#endif
24
 
25
 static char *FragProgFile = "skinning.frag";
26
 static char *VertProgFile = "skinning.vert";
27
diff --git a/progs/glsl/twoside.c b/progs/glsl/twoside.c
28
index b6c1b47..1747e62 100644
29
--- a/progs/glsl/twoside.c
30
+++ b/progs/glsl/twoside.c
31
@@ -16,6 +16,9 @@
32
 #include <GL/glut.h>
33
 #include "shaderutil.h"
34
 
35
+#ifndef M_PI
36
+#define M_PI 3.1415926535
37
+#endif
38
 
39
 static GLint WinWidth = 300, WinHeight = 300;
40
 static char *FragProgFile = NULL;
41
-- 
42
1.6.3.2
43
(-)0004-Move-initialization-of-ext_list_first_time-out-of-DR.patch (+76 lines)
Line 0 Link Here
1
From f13537d1a9108b78a899946490d3a101ecfc4b4c Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Wed, 1 Jul 2009 21:18:13 +0100
4
Subject: [PATCH 4/9] Move initialization of ext_list_first_time out of DRI driver
5
6
It needs to get set when the psc is created even if DRI is forced off,
7
so psc->direct_support is initialized correctly, otherwise
8
__glXExtensionBitIsEnabled() always returns FALSE
9
10
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
11
---
12
 src/glx/x11/dri2_glx.c  |    3 ---
13
 src/glx/x11/dri_glx.c   |    3 ---
14
 src/glx/x11/drisw_glx.c |    3 ---
15
 src/glx/x11/glxext.c    |    3 +++
16
 4 files changed, 3 insertions(+), 9 deletions(-)
17
18
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
19
index f4865ae..084b6a8 100644
20
--- a/src/glx/x11/dri2_glx.c
21
+++ b/src/glx/x11/dri2_glx.c
22
@@ -421,9 +421,6 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen,
23
     if (psp == NULL)
24
 	return NULL;
25
 
26
-    /* Initialize per screen dynamic client GLX extensions */
27
-    psc->ext_list_first_time = GL_TRUE;
28
-
29
     if (!DRI2Connect(psc->dpy, RootWindow(psc->dpy, screen),
30
 		     &driverName, &deviceName))
31
 	return NULL;
32
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
33
index ac2eb05..93c9ee1 100644
34
--- a/src/glx/x11/dri_glx.c
35
+++ b/src/glx/x11/dri_glx.c
36
@@ -641,9 +641,6 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
37
     if (psp == NULL)
38
 	return NULL;
39
 
40
-    /* Initialize per screen dynamic client GLX extensions */
41
-    psc->ext_list_first_time = GL_TRUE;
42
-
43
     if (!driGetDriverName(priv->dpy, screen, &driverName)) {
44
 	Xfree(psp);
45
 	return NULL;
46
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
47
index 1c229dd..dc9feb4 100644
48
--- a/src/glx/x11/drisw_glx.c
49
+++ b/src/glx/x11/drisw_glx.c
50
@@ -363,9 +363,6 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
51
    if (psp == NULL)
52
       return NULL;
53
 
54
-   /* Initialize per screen dynamic client GLX extensions */
55
-   psc->ext_list_first_time = GL_TRUE;
56
-
57
    psc->driver = driOpenDriver(driverName);
58
    if (psc->driver == NULL)
59
       goto handle_error;
60
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
61
index b296b7c..fb2dfe4 100644
62
--- a/src/glx/x11/glxext.c
63
+++ b/src/glx/x11/glxext.c
64
@@ -612,6 +612,9 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
65
       if (psc->drawHash == NULL)
66
          continue;
67
 
68
+      /* Initialize per screen dynamic client GLX extensions */
69
+      psc->ext_list_first_time = GL_TRUE;
70
+
71
       if (priv->dri2Display)
72
          psc->driScreen = (*priv->dri2Display->createScreen) (psc, i, priv);
73
 
74
-- 
75
1.6.3.2
76
(-)0002-PTHREADS-should-be-defined-on-cygwin-also.patch (+27 lines)
Line 0 Link Here
1
From fb31cf724a6ab274a0fe93026533b7a72e3323d2 Mon Sep 17 00:00:00 2001
2
From: Jon TURNEY <jon.turney@dronecode.org.uk>
3
Date: Tue, 23 Jun 2009 00:16:19 +0100
4
Subject: [PATCH 2/9] PTHREADS should be defined on cygwin, also
5
6
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
7
---
8
 configure.ac |    3 +++
9
 1 files changed, 3 insertions(+), 0 deletions(-)
10
11
diff --git a/configure.ac b/configure.ac
12
index 9b65d96..b10f8b3 100644
13
--- a/configure.ac
14
+++ b/configure.ac
15
@@ -90,6 +90,9 @@ linux*|*-gnu*|gnu*)
16
 solaris*)
17
     DEFINES="$DEFINES -DPTHREADS -DSVR4"
18
     ;;
19
+cygwin*)
20
+    DEFINES="$DEFINES -DPTHREADS"
21
+    ;;
22
 esac
23
 
24
 dnl Add flags for gcc and g++
25
-- 
26
1.6.3.2
27
(-)mesademos.hint (+5 lines)
Line 0 Link Here
1
category: X11
2
requires: libgcc1 libGL1 libX11_6 mesa
3
external-source: mesa
4
sdesc: "X11 OpenGL libraries (demos)"
5
ldesc: "X11 OpenGL libraries "

Return to bug 10472