[Xquartz-changes] mesa: Branch 'master' - 3 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Jun 13 17:56:06 PDT 2011


 configs/darwin            |    4 ++--
 src/glx/apple/apple_cgl.c |    4 ++++
 src/glx/glxcurrent.c      |   26 ++++++++++----------------
 3 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit 503b6a164d00b2879131eafdc08cf09132df3f8d
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 12:09:47 2011 -0700

    NOT TO ORIGIN: -O0
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/configs/darwin b/configs/darwin
index 9527f61..e33941b 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -25,9 +25,9 @@ DEFINES =  -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
 
 ARCH_FLAGS += $(RC_CFLAGS)
 
-CFLAGS =  -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fvisibility=hidden \
+CFLAGS =  -ggdb3 -O0 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fvisibility=hidden \
 	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
-CXXFLAGS =  -ggdb3 -Os -Wall -fno-strict-aliasing -fvisibility=hidden \
+CXXFLAGS =  -ggdb3 -O0 -Wall -fno-strict-aliasing -fvisibility=hidden \
 	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
 
 # Library names (actual file names)
commit 82636f76f4822c3e037aaad7d3a03970f89545d2
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 11:46:46 2011 -0700

    NOT TO ORIGIN: getpid()
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/apple/apple_cgl.c b/src/glx/apple/apple_cgl.c
index 648ed86..410ced7 100644
--- a/src/glx/apple/apple_cgl.c
+++ b/src/glx/apple/apple_cgl.c
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <dlfcn.h>
+#include <unistd.h>
 
 #include "apple_cgl.h"
 #include "apple_glx.h"
@@ -69,6 +70,9 @@ apple_cgl_init(void)
    if (initialized)
       return;
 
+   fprintf(stderr, "PID: %d\n", getpid());
+   sleep(30);
+
    opengl_framework_path = getenv("OPENGL_FRAMEWORK_PATH");
    if (!opengl_framework_path) {
       opengl_framework_path = OPENGL_FRAMEWORK_PATH;
commit 8ba0123c4148b6f461d5e4693ebc7de415da959e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 14:38:23 2011 -0700

    NOT TO ORIGIN: hacks to use make_context_current like we used to
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 9027734..f70cd6c 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -212,7 +212,15 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
 {
    struct glx_context *gc = (struct glx_context *) gc_user;
    struct glx_context *oldGC = __glXGetCurrentContext();
-
+#ifdef GLX_USE_APPLEGL
+   bool error = apple_glx_make_current_context(dpy, 
+                   (oldGC && oldGC != &dummyContext) ? oldGC->driContext : NULL, 
+                   gc ? gc->driContext : NULL, draw);
+   
+   apple_glx_diagnostic("%s: error %s\n", __func__, error ? "YES" : "NO");
+   if(error)
+      return GL_FALSE;
+#else
    /* XXX: If this is left out, then libGL ends up not having this
     * symbol, and drivers using it fail to load.  Compare the
     * implementation of this symbol to _glapi_noop_enable_warnings(),
@@ -242,6 +250,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
    }
 
    _glapi_check_multithread();
+#endif
 
    __glXLock();
    if (oldGC == gc &&
@@ -267,21 +276,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
    }
 
    if (gc) {
-      /* Attempt to bind the context.  We do this before mucking with
-       * gc and __glXSetCurrentContext to properly handle our state in
-       * case of an error.
-       *
-       * If an error occurs, set the Null context since we've already
-       * blown away our old context.  The caller is responsible for
-       * figuring out how to handle setting a valid context.
-       */
-      if (gc->vtable->bind(gc, oldGC, draw, read) != Success) {
-         __glXSetCurrentContextNull();
-         __glXUnlock();
-         __glXGenerateError(dpy, None, GLXBadContext, X_GLXMakeContextCurrent);
-         return GL_FALSE;
-      }
-
       if (gc->thread_refcount++ == 0) {
 	 gc->currentDpy = dpy;
 	 gc->currentDrawable = draw;


More information about the Xquartz-changes mailing list