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

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Jun 13 18:46:22 PDT 2011


Rebased ref, commits from common ancestor:
commit 8918cd00522e6cc82ebd0512b26a275707446a2e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 12:09:47 2011 -0700

    NOT TO ORIGIN: -ggdb3 -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 3b09071ab214d5402db081d0bffd9536513b6d88
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..9875d08 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(20);
+
    opengl_framework_path = getenv("OPENGL_FRAMEWORK_PATH");
    if (!opengl_framework_path) {
       opengl_framework_path = OPENGL_FRAMEWORK_PATH;
commit 1067fbc774f6bea40a54c1b44e21d14e71b0f186
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..893bd98 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,6 +276,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
    }
 
    if (gc) {
+#ifndef GLX_USE_APPLEGL
       /* Attempt to bind the context.  We do this before mucking with
        * gc and __glXSetCurrentContext to properly handle our state in
        * case of an error.
@@ -281,6 +291,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
          __glXGenerateError(dpy, None, GLXBadContext, X_GLXMakeContextCurrent);
          return GL_FALSE;
       }
+#endif
 
       if (gc->thread_refcount++ == 0) {
 	 gc->currentDpy = dpy;


More information about the Xquartz-changes mailing list