summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Huddleston <[email protected]>2011-06-05 18:50:55 -0400
committerJeremy Huddleston <[email protected]>2011-06-06 12:00:16 -0400
commit4e18ad9d715fcd24675144b69db1929743f59447 (patch)
treeb41f26dfaf59d6cd4401abc17975b4f2d96e2509
parent12537b0baf6c7e28ece07bf198342669bc9c5533 (diff)
apple: Build darwin using applegl rather than indirect
This reverts portions of 6849916170c0275c13510251a7b217c20f2b993e that caused the darwin config to fail to build due to missing implementations in that commit. See https://bugs.freedesktop.org/show_bug.cgi?id=29162 Signed-off-by: Jeremy Huddleston <[email protected]> (cherry picked from commit 1885cf27c9c4642a049c60a8236cb84735cb9eba)
-rw-r--r--src/glx/glxclient.h12
-rw-r--r--src/glx/glxcmds.c4
-rw-r--r--src/glx/glxext.c7
3 files changed, 20 insertions, 3 deletions
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index c7c8228ab30..2152e16167d 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -775,7 +775,19 @@ GarbageCollectDRIDrawables(struct glx_screen *psc);
extern __GLXDRIdrawable *
GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable);
+#endif
+
+#ifdef GLX_USE_APPLEGL
+extern struct glx_screen *
+applegl_create_screen(int screen, struct glx_display * priv);
+
+extern struct glx_context *
+applegl_create_context(struct glx_screen *psc,
+ struct glx_config *mode,
+ struct glx_context *shareList, int renderType);
+extern int
+applegl_create_display(struct glx_display *display);
#endif
extern struct glx_context dummyContext;
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 0d41fe0c43c..55fdeb602c1 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -228,10 +228,14 @@ CreateContext(Display * dpy, int generic_id,
return NULL;
gc = NULL;
+#ifdef GLX_USE_APPLEGL
+ gc = applegl_create_context(psc, config, shareList, renderType);
+#else
if (allowDirect && psc->vtable->create_context)
gc = psc->vtable->create_context(psc, config, shareList, renderType);
if (!gc)
gc = indirect_create_context(psc, config, shareList, renderType);
+#endif
if (!gc)
return NULL;
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 120a4b7d82b..7fd710c933a 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -769,11 +769,12 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv)
psc = (*priv->driswDisplay->createScreen) (i, priv);
#endif
#if defined(GLX_USE_APPLEGL)
- if (psc == NULL && priv->appleglDisplay)
- psc = (*priv->appleglDisplay->createScreen) (i, priv);
-#endif
+ if (psc == NULL)
+ psc = applegl_create_screen(i, priv);
+#else
if (psc == NULL)
psc = indirect_create_screen(i, priv);
+#endif
priv->screens[i] = psc;
}
SyncHandle();