xserver: Branch 'server-1.10-branch' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Jun 3 09:13:29 PDT 2011


 hw/xquartz/GL/indirect.c   |   12 +++++++++++-
 test/xi2/protocol-common.c |    2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit fe4af41314a6537b3fcc66955ccb6895639738b1
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Jun 1 10:24:43 2011 +1000

    test: fix memset size for WindowRec (#37801)
    
    X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Cyril Brulebois <kibi at debian.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit d9bda34d0df576d155e1d682d5e2a382b8e1ffda)

diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index 10d82a5..cd9e81a 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -122,7 +122,7 @@ ClientRec init_client(int len, void *data)
 
 void init_window(WindowPtr window, WindowPtr parent, int id)
 {
-    memset(window, 0, sizeof(window));
+    memset(window, 0, sizeof(*window));
 
     window->drawable.id = id;
     if (parent)
commit a4725afa0e77e9fcf6570001dc0de23a7a9ee6cb
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue May 31 13:01:05 2011 -0700

    XQuartz: GLX: Create a new dispatch table rather than modifying the existing one
    
    Fixes regression introduced by b0c665ac0fe6840dda581e4d0d0b76c703d62a7b
    
    0   X11.bin                       	0x0000000100118293 __glXAquaScreenCreateContext + 684
    1   X11.bin                       	0x00000001001315b0 DoCreateContext + 163
    2   X11.bin                       	0x000000010013509f __glXDispatch + 211
    3   X11.bin                       	0x00000001000c7dad Dispatch + 785
    4   X11.bin                       	0x00000001000b97e5 dix_main + 1022
    5   X11.bin                       	0x00000001000122bc server_thread + 50
    6   libSystem.B.dylib             	0x00007fff836554f6 _pthread_start + 331
    7   libSystem.B.dylib             	0x00007fff836553a9 thread_start + 13
    
    http://lists.apple.com/archives/X11-users/2011/May/msg00045.html
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    (cherry picked from commit 38df706c6b8a339c4267cae7be0881c4362f36da)

diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 1375bea..db4fe83 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -682,7 +682,15 @@ GLuint __glFloorLog2(GLuint val)
 }
 
 static void setup_dispatch_table(void) {
-    struct _glapi_table *disp=_glapi_get_dispatch();
+    static struct _glapi_table *disp = NULL;
+
+    if(disp)  {
+        _glapi_set_dispatch(disp);
+        return;
+    }
+
+    disp=calloc(1,sizeof(struct _glapi_table));
+    assert(disp);
 
     /* to update:
      * for f in $(grep 'define SET_' ../../../glx/dispatch.h  | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy
@@ -1626,4 +1634,6 @@ static void setup_dispatch_table(void) {
     SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS);
     SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX);
 #endif
+
+    _glapi_set_dispatch(disp);
 }


More information about the xorg-commit mailing list