[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-experimental'



 ChangeLog                             |  340 +
 Xi/exevents.c                         |   11 
 Xi/extinit.c                          |    2 
 Xi/xipassivegrab.c                    |   16 
 configure.ac                          |    6 
 debian/changelog                      |   13 
 dix/devices.c                         |   47 
 dix/ptrveloc.c                        |    2 
 glx/Makefile.am                       |    6 
 glx/glapi.c                           |  558 --
 glx/glapi.h                           |   28 
 glx/glapitemp.h                       | 6655 ----------------------------------
 glx/glxcmds.c                         |  109 
 glx/glxdri2.c                         |    1 
 glx/glxdriswrast.c                    |    8 
 glx/glxext.c                          |   53 
 glx/glxserver.h                       |    7 
 hw/xquartz/GL/indirect.c              |    9 
 hw/xquartz/X11Application.m           |    2 
 hw/xquartz/applewmExt.h               |   13 
 hw/xquartz/darwinEvents.c             |   28 
 hw/xquartz/mach-startup/bundle-main.c |   23 
 hw/xquartz/pbproxy/x-selection.m      |   11 
 hw/xquartz/xpr/xprAppleWM.c           |    4 
 include/input.h                       |    5 
 include/inputstr.h                    |    2 
 miext/rootless/rootlessScreen.c       |    2 
 test/input.c                          |   24 
 28 files changed, 581 insertions(+), 7404 deletions(-)

New commits:
commit 7d111fb3bd11e2840dc26952240054b91dd798dd
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat May 7 13:27:40 2011 +0200

    Upload to experimental.

diff --git a/debian/changelog b/debian/changelog
index a175b94..4c39950 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-xorg-server (2:1.10.1.901-1) UNRELEASED; urgency=low
+xorg-server (2:1.10.1.901-1) experimental; urgency=low
 
   * New upstream release (1.10.2 rc1):
     - Comes with some Xi fixes.
     - Comes with many GLX fixes.
 
- -- Cyril Brulebois <kibi@debian.org>  Sat, 07 May 2011 13:22:35 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 07 May 2011 13:27:28 +0200
 
 xorg-server (2:1.10.1-2) unstable; urgency=low
 

commit 4e9d4971d5fa66a781611f03dd7bc9534c647c5b
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat May 7 13:27:09 2011 +0200

    Mention Xi/GLX.

diff --git a/debian/changelog b/debian/changelog
index 583af9f..a175b94 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 xorg-server (2:1.10.1.901-1) UNRELEASED; urgency=low
 
-  * New upstream release (1.10.2 rc1).
+  * New upstream release (1.10.2 rc1):
+    - Comes with some Xi fixes.
+    - Comes with many GLX fixes.
 
  -- Cyril Brulebois <kibi@debian.org>  Sat, 07 May 2011 13:22:35 +0200
 

commit 20b68036eb7fefa0ae986b6d2939f133bea3613d
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat May 7 13:23:30 2011 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 63ab294..047e8cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,343 @@
+commit 164ef01bd55a1d2c31620e9868f4cc3d032223a6
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri May 6 15:43:04 2011 -0700
+
+    configure.ac: Version bumped to 1.10.1.901
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit c52a93c5398e439e6e1d9e8ee20c6c1cf28dd5de
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri Apr 29 11:06:18 2011 -0700
+
+    XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4
+    
+    Ok, this time for sure... how many brown bags can I fit over my face?
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 0fc7ec6dd504aa03e1a1b18c60942c0c8c8b701b)
+
+commit 7688d6d317f809028394ea6c5ffa31424e853796
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Apr 15 13:01:37 2011 -0400
+
+    glx: Make --disable-dri not disable AIGLX
+    
+    Either the DRI1 or DRI2 loaders are sufficient.
+    
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 001b6b8b70734db1fa2f68e45c1db8337ba9f662)
+
+commit e67afcdb9a6a634d6903da3f272aed7dab0e91b3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Apr 15 12:57:05 2011 -0400
+
+    glx: Use 0 rather than garbage for unknown INTEL_swap_event types
+    
+    Otherwise the garbage you return could well be numerically identical to
+    one of the swap type tokens, and apps which rely on us to tell the truth
+    would be in trouble.
+    
+    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit f8540b9dcc1fba886be5c4ce7ea0d74952cb48c4)
+
+commit b5093063b5d76ff31519a2daf85ea32808f1afe6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Mar 28 12:30:09 2011 -0400
+
+    glx: Fix lifetime tracking for pixmaps
+    
+    GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
+    IDs can be destroyed in either order with no error.  Only windows need
+    to be tracked under both XIDs.
+    
+    Fixes piglit/glx-pixmap-life.
+    
+    Reviewed-by: Michel Dänzer <michel@daenzer.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 6a433b67ca15fd1ea58334e607f867554f227451)
+
+commit 618dc75a05faf3bb390c152af3059a311f21e406
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Mar 21 11:59:29 2011 -0400
+
+    glx: Reimplement context tags
+    
+    This would let you do a constant-time context lookup, but if that's your
+    performance problem you have two problems.  Just use the context's XID
+    as the tag value instead.
+    
+    In order to do this, we have to defer destroying a context until it
+    actually goes unreferenced, as you're allowed to mention a context tag
+    after you've (ostensibly) destroyed the context, as long as it's still
+    your current context.  Thus, change DestroyContext to merely mark the
+    context as dead if it's a current context, and call down to actual
+    resource destruction (and XID reclamation) in StopUsingContext.
+    
+    Also, stop trying to delete context state from DrawableGone.  This was
+    always broken, as GLX does not say that contexts are destroyed when
+    their drawables are destroyed.  But with the above change to defer
+    context destruction, this would trigger a server crash on client exit as
+    we'd free the context state twice.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit a48dadc98a28c969741979b70b7a639f24f4cbbd)
+
+commit c7d9a07d52ce8a6259d6693d68290826b9618a86
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Mar 7 14:53:28 2011 -0500
+
+    glx: Fix _glapi_add_dispatch
+    
+    We never need to generate stubs, because those conditions can't happen
+    in the server.  Yank that code out, but keep the bookkeeping for which
+    extension functions are registered so the DRI driver doesn't get
+    confused.
+    
+    As a pleasant bonus, we're now friendlier for environments like selinux
+    that make runtime code generation difficult, and we're portable to more
+    arches since we don't have to port the assembly stubs.
+    
+    Fixes the following clutter conformance tests (indirect rendering,
+    llvmpipe driver):
+    
+        test-cogl-backface-culling
+        test-cogl-materials
+        test-cogl-readpixels
+        test-cogl-texture-mipmaps
+        test-cogl-texture-get-set-data
+        test-cogl-viewport
+        test-cogl-offscreen
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 30d6947cee714385cf62a40ea6fa6d2e68388c78)
+
+commit 888a29674c51ff8c6ce74f5f78289ba88cda160a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 2 13:21:39 2011 -0500
+
+    glx: Lobotomize _glapi_get_proc_address
+    
+    This isn't a meaningful thing in the indirect glx loader, so just warn
+    if it ever happens and move on.
+    
+    But also, mark it PUBLIC, so if the driver does ever call it we merely
+    warn instead of aborting because ld.so can't find the symbol.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 17d9e374721d6c8ee3f7f9cdc882f80127bdb57f)
+
+commit 00d1569918d0dca2cf2a5e2e320da7b427e1f69f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 2 12:30:22 2011 -0500
+
+    glx: Remove noop dispatch table
+    
+    We can never hit this, because the indirect GLX dispatch code always
+    forces a current context and checks that it's non-NULL before calling
+    into the dispatch table.  If it's _not_ null, then _glapi_set_context
+    will call into the driver, which is responsible for calling
+    _glapi_set_dispatch to make sure the dispatch table is non-NULL.
+    
+    Also remove _glapi_set_warning_func and friends, since we can no longer
+    call them even from dead code.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit b0c665ac0fe6840dda581e4d0d0b76c703d62a7b)
+
+commit 522443dbf9edf618a158b8241afde5ab35f571f8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 10 10:47:40 2011 -0500
+
+    glx: Add texbuffer2 support to swrast
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 1ad9f01c31742157934a791e6141d10520d13e8a)
+
+commit 353ccf4d8eabcf046824d418fd59b417bc7e7851
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 2 12:12:35 2011 -0500
+
+    glx: Remove unused _glapi_get_proc_name
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit b73ebe65cd071a063417ac9c38513a6742e32428)
+
+commit 1c7afece23bfef90fd7c2184bd4c097a84b32e83
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 2 11:52:27 2011 -0500
+
+    glx: Simplify _glapi_check_multithread
+    
+    We can guarantee that the X server does not call DRI driver services
+    from multiple threads, so _glapi_check_multithread need never do
+    anything special.  As a result, ThreadSafe is always false, so remove it
+    and simplify expressions where it appeared to match.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 4377288abdbaac8506d8643b440c300ba03182fe)
+
+commit 5285e71fc54b83fb8168433519ac9280d64553fe
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 2 10:20:02 2011 -0500
+
+    glx: Remove unused _glapi_get_proc_offset and friends
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit a5fdd1aa06c7c8ecefeafafc4a778fc816ad41a4)
+
+commit be3f41d1ec5413d0ad05ef18e145714201d602aa
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Apr 20 13:14:11 2011 +1000
+
+    dix: fix typo in direction calculation
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    Reviewed-by: Simon Thum <simon.thum@gmx.de>
+    (cherry picked from commit 8c528c667da7c7fba0ba07973a06b2d4613fbf70)
+
+commit d2c9f331d2d58a396d8d6f067120b0eee041e321
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 9 10:44:48 2011 +1000
+
+    Xi: don't swap the status byte in the XIPassiveGrab replies
+    
+    Reported-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit 60b08e013dd1e971f82e5bc8708d3f120c217497)
+
+commit 0de1802c998d105a61dbb643e38600d2748eb520
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 9 10:07:19 2011 +1000
+
+    Xi: exit with error value if CheckGrabValues failed.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit a3f37f3698880aec508b5ecfb88daf39360610aa)
+
+commit e3887c8fa36eba2c7fdc5684f4c744156fc9a9e5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 9 09:54:12 2011 +1000
+
+    Xi: fix reply swapping function check for XIPassiveGrabDevice
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit f4d9ff73b161d84d3fcacc5834fa714c113c7a10)
+
+commit ea55d0d504805674ac06b589d673ed9884575846
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 9 09:53:47 2011 +1000
+
+    Xi: return the bad device ID if a passive grab fails with BadDevice.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit 2a49ffa3c94819e9f28dd939f23ee8a675258172)
+
+commit d6328c6bfe49958f68abbb6ddbc1f1514de6831f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Apr 12 10:17:07 2011 +1000
+
+    Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)
+    
+    commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 only fixed the
+    initialization, not the copy. After a slave device change, the valuator
+    were out of alignment again.
+    
+    X.Org Bug 36119 <http://bugs.freedesktop.org/show_bug.cgi?id=36119>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 419a27b5219a739f2fbd50cc96a1b54c469e4a88)
+
+commit b4455b119cb55cc5f61add0c25863afe8cb06484
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Wed Apr 27 22:12:59 2011 -0700
+
+    XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4
+    
+    This fixes a regression introduced by d79cc14a51f3e8d4d2f66aad055092672cab1526
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 0f284f0f42f26a242eb3153787f2e98b6b88dff8)
+
+commit 11847e2ab410fa7f47cb3d41ce6c2b64200e7dc7
+Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
+Date:   Mon Apr 25 10:38:17 2011 -0700
+
+    XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4
+    
+    http://xquartz.macosforge.org/trac/ticket/476
+    
+    Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 72ed7551f494c61283a7ac3d7b570eac39cc9786)
+
+commit 3319b415f73cfbd6907c37b5dae40036057cc34e
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri Apr 22 12:05:32 2011 -0700
+
+    XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4
+    
+    xprAppleWM.c:143: warning: initialization from incompatible pointer type
+    xprAppleWM.c:144: warning: initialization from incompatible pointer type
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit d79cc14a51f3e8d4d2f66aad055092672cab1526)
+
+commit 1939043a34c47d2cff63aac3909f31f08aa6ab84
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Apr 23 23:25:39 2011 -0700
+
+    rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value
+    
+    Found by clang static analyzer
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 4944de24849a109c65f1b353bc12e44e90a1211d)
+
+commit 5db125883f7d7d4501b0e7c720ffd38f2b92a538
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Apr 21 15:19:12 2011 -0700
+
+    XQuartz: Fix prototypes for thread functions
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 3960115dbc83ec1eb8d9c8e90466af3fa0b32abd)
+
+commit f3e33fb1edcbda2d0dab66f0adc2c5d08bf860af
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Apr 21 15:11:52 2011 -0700
+
+    XQuartz: Make the DarwinProcessFDAdditionQueue_thread wait 3 seconds to allow xinitrc to catch up
+    
+    Previously, we weren't always waiting the full three seconds.  This should
+    be better, but is still sub-optimal.  We really want to start processing
+    these once a WM has been started.
+    
+    http://xquartz.macosforge.org/trac/ticket/416
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 7524dbd06113ec081eaa882aa54e03553ccf96aa)
+
 commit a73311f8304193f9245fb077f173bf1e1d52e040
 Author: Jeremy Huddleston <jeremyhu@apple.com>
 Date:   Fri Apr 15 17:58:57 2011 -0700
diff --git a/debian/changelog b/debian/changelog
index 91253df..583af9f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.10.1.901-1) UNRELEASED; urgency=low
+
+  * New upstream release (1.10.2 rc1).
+
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 07 May 2011 13:22:35 +0200
+
 xorg-server (2:1.10.1-2) unstable; urgency=low
 
   * Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!

commit 164ef01bd55a1d2c31620e9868f4cc3d032223a6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri May 6 15:43:04 2011 -0700

    configure.ac: Version bumped to 1.10.1.901
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index 949db90..5f85383 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-04-15"
+AC_INIT([xorg-server], 1.10.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-05-06"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit c52a93c5398e439e6e1d9e8ee20c6c1cf28dd5de
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Apr 29 11:06:18 2011 -0700

    XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4
    
    Ok, this time for sure... how many brown bags can I fit over my face?
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 0fc7ec6dd504aa03e1a1b18c60942c0c8c8b701b)

diff --git a/hw/xquartz/applewmExt.h b/hw/xquartz/applewmExt.h
index 35c8f8f..c46a7bd 100644
--- a/hw/xquartz/applewmExt.h
+++ b/hw/xquartz/applewmExt.h
@@ -35,9 +35,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <Xplugin.h>
 
 #if XPLUGIN_VERSION < 4
-typedef xp_frame_attr int;
-typedef xp_frame_class int;
-typedef xp_frame_rect int;
+typedef int xp_frame_attr;
+typedef int xp_frame_class;
+typedef int xp_frame_rect;
 #endif
 
 typedef int (*DisableUpdateProc)(void);

commit 7688d6d317f809028394ea6c5ffa31424e853796
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Apr 15 13:01:37 2011 -0400

    glx: Make --disable-dri not disable AIGLX
    
    Either the DRI1 or DRI2 loaders are sufficient.
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 001b6b8b70734db1fa2f68e45c1db8337ba9f662)

diff --git a/configure.ac b/configure.ac
index 756733e..949db90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1009,7 +1009,7 @@ else
 fi
 AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
 
-if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then
+if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then
 	AC_DEFINE(AIGLX, 1, [Build AIGLX loader])
 else
 	AIGLX=no
diff --git a/glx/Makefile.am b/glx/Makefile.am
index 8c7f7a5..091c18b 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -49,10 +49,13 @@ glapi_sources =					\
 	glthread.h
 
 libglxdri_la_SOURCES = \
-        glxdri.c \
         extension_string.c \
         extension_string.h
 
+if DRI
+libglxdri_la_SOURCES += glxdri.c
+endif
+
 if DRI2_AIGLX
 libglxdri_la_SOURCES += glxdri2.c
 endif

commit e67afcdb9a6a634d6903da3f272aed7dab0e91b3
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Apr 15 12:57:05 2011 -0400

    glx: Use 0 rather than garbage for unknown INTEL_swap_event types
    
    Otherwise the garbage you return could well be numerically identical to
    one of the swap type tokens, and apps which rely on us to tell the truth
    would be in trouble.
    
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit f8540b9dcc1fba886be5c4ce7ea0d74952cb48c4)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 8d21c93..c4b7ba4 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -184,6 +184,7 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust,
 	break;
     default:
 	/* unknown swap completion type */
+	wire.event_type = 0;
 	break;
     }
     wire.drawable = drawable->drawId;

commit b5093063b5d76ff31519a2daf85ea32808f1afe6
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Mar 28 12:30:09 2011 -0400

    glx: Fix lifetime tracking for pixmaps
    
    GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
    IDs can be destroyed in either order with no error.  Only windows need
    to be tracked under both XIDs.
    
    Fixes piglit/glx-pixmap-life.
    
    Reviewed-by: Michel Dänzer <michel@daenzer.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 6a433b67ca15fd1ea58334e607f867554f227451)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 6585080..0e3ca66 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1127,10 +1127,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen,
 	return BadAlloc;
     }
 
-    /* Add the glx drawable under the XID of the underlying X drawable
-     * too.  That way we'll get a callback in DrawableGone and can
-     * clean up properly when the drawable is destroyed. */
-    if (drawableId != glxDrawableId &&
+    /*
+     * Windows aren't refcounted, so track both the X and the GLX window
+     * so we get called regardless of destruction order.
+     */
+    if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
 	!AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
 	pGlxDraw->destroy (pGlxDraw);
 	return BadAlloc;
@@ -1161,6 +1162,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config
     err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
 			      glxDrawableId, GLX_DRAWABLE_PIXMAP);
 
+    ((PixmapPtr)pDraw)->refcnt++;
+
     return err;
 }
 
diff --git a/glx/glxext.c b/glx/glxext.c
index 16315b8..fdabfe9 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -124,15 +124,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
 {
     __GLXcontext *c, *next;
 
-    /* If this drawable was created using glx 1.3 drawable
-     * constructors, we added it as a glx drawable resource under both
-     * its glx drawable ID and it X drawable ID.  Remove the other
-     * resource now so we don't a callback for freed memory. */
-    if (glxPriv->drawId != glxPriv->pDraw->id) {
-	if (xid == glxPriv->drawId)
-	    FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
-	else
-	    FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
+    if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
+        /* If this was created by glXCreateWindow, free the matching resource */
+        if (glxPriv->drawId != glxPriv->pDraw->id) {
+            if (xid == glxPriv->drawId)
+                FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
+            else
+                FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
+        }
+        /* otherwise this window was implicitly created by MakeCurrent */
     }
 
     for (c = glxAllContexts; c; c = next) {
@@ -149,6 +149,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
 	    c->readPriv = NULL;
     }
 
+    /* drop our reference to any backing pixmap */
+    if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
+        glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw);
+
     glxPriv->destroy(glxPriv);
 
     return True;

commit 618dc75a05faf3bb390c152af3059a311f21e406
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Mar 21 11:59:29 2011 -0400

    glx: Reimplement context tags
    
    This would let you do a constant-time context lookup, but if that's your
    performance problem you have two problems.  Just use the context's XID
    as the tag value instead.
    
    In order to do this, we have to defer destroying a context until it
    actually goes unreferenced, as you're allowed to mention a context tag
    after you've (ostensibly) destroyed the context, as long as it's still
    your current context.  Thus, change DestroyContext to merely mark the
    context as dead if it's a current context, and call down to actual
    resource destruction (and XID reclamation) in StopUsingContext.
    
    Also, stop trying to delete context state from DrawableGone.  This was
    always broken, as GLX does not say that contexts are destroyed when
    their drawables are destroyed.  But with the above change to defer
    context destruction, this would trigger a server crash on client exit as
    we'd free the context state twice.
    
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit a48dadc98a28c969741979b70b7a639f24f4cbbd)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 9b4bc9e..6585080 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -136,9 +136,9 @@ validGlxContext(ClientPtr client, XID id, int access_mode,
 {
     *err = dixLookupResourceByType((pointer *) context, id,
 				   __glXContextRes, client, access_mode);
-    if (*err != Success) {
+    if (*err != Success || (*context)->idExists == GL_FALSE) {
 	client->errorValue = id;
-	if (*err == BadValue)
+	if (*err == BadValue || *err == Success)
 	    *err = __glXError(GLXBadContext);
 	return FALSE;
     }
@@ -369,6 +369,7 @@ int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
     return DoCreateContext(cl, req->context, req->shareList,
 			   config, pGlxScreen, req->isDirect);
 }
+
 int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc)
 {
     ClientPtr client = cl->client;
@@ -382,77 +383,31 @@ int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc)
 			 &glxc, &err))
 	    return err;
 
-    FreeResourceByType(req->context, __glXContextRes, FALSE);
-    return Success;
-}
-
-/*****************************************************************************/
-
-/*
-** For each client, the server keeps a table of all the contexts that are
-** current for that client (each thread of a client may have its own current
-** context).  These routines add, change, and lookup contexts in the table.
-*/
-
-/*
-** Add a current context, and return the tag that will be used to refer to it.
-*/
-static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
-{
-    int i;
-    int num = cl->numCurrentContexts;
-    __GLXcontext **table = cl->currentContexts;
-
-    if (!glxc) return -1;
-    
-    /*
-    ** Try to find an empty slot and use it.
-    */
-    for (i=0; i < num; i++) {
-	if (!table[i]) {
-	    table[i] = glxc;
-	    return i+1;
-	}
-    }
-    /*
-    ** Didn't find a free slot, so we'll have to grow the table.
-    */
-    if (!num) {
-	table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
-    } else {
-	table = (__GLXcontext **) realloc(table,
-					   (num+1)*sizeof(__GLXcontext *));
-    }
-    table[num] = glxc;
-    cl->currentContexts = table;
-    cl->numCurrentContexts++;
-    return num+1;
-}
+    glxc->idExists = GL_FALSE;
+    if (!glxc->isCurrent)
+        FreeResourceByType(req->context, __glXContextRes, FALSE);
 
-/*
-** Given a tag, change the current context for the corresponding entry.
-*/
-static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
-				GLXContextTag tag)
-{
-    __GLXcontext **table = cl->currentContexts;
-    table[tag-1] = glxc;
+    return Success;
 }
 
 /*
-** For this implementation we have chosen to simply use the index of the
-** context's entry in the table as the context tag.  A tag must be greater
-** than 0.
-*/
+ * This will return "deleted" contexts, ie, where idExists is GL_FALSE.
+ * Contrast validGlxContext, which will not.  We're cheating here and
+ * using the XID as the context tag, which is fine as long as we defer
+ * actually destroying the context until it's no longer referenced, and
+ * block clients from trying to MakeCurrent on contexts that are on the
+ * way to destruction.  Notice that DoMakeCurrent calls validGlxContext
+ * for new contexts but __glXLookupContextByTag for previous contexts.
+ */
 __GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
 {
-    int num = cl->numCurrentContexts;
+    __GLXcontext *ret;
 
-    if (tag < 1 || tag > num) {
-	return 0;
-    } else {
-	return cl->currentContexts[tag-1];
-    }
+    if (dixLookupResourceByType((void **)&ret, tag, __glXContextRes,
+                                cl->client, DixUseAccess) == Success)
+        return ret;
+
+    return NULL;
 }
 
 /*****************************************************************************/
@@ -466,7 +421,7 @@ static void StopUsingContext(__GLXcontext *glxc)
 	}
 	glxc->isCurrent = GL_FALSE;
 	if (!glxc->idExists) {
-	    __glXFreeContext(glxc);
+            FreeResourceByType(glxc->id, __glXContextRes, FALSE);
 	}
     }
 }
@@ -669,16 +624,11 @@ DoMakeCurrent(__GLXclientState *cl,
 	glxc->isCurrent = GL_TRUE;
     }
 
-    if (prevglxc) {
-	ChangeCurrentContext(cl, glxc, tag);
-	StopUsingContext(prevglxc);
-    } else {
-	tag = AddCurrentContext(cl, glxc);
-    }
+    StopUsingContext(prevglxc);
 
     if (glxc) {
 	StartUsingContext(cl, glxc);
-	reply.contextTag = tag;
+	reply.contextTag = glxc->id;
     } else {
 	reply.contextTag = 0;
     }
diff --git a/glx/glxext.c b/glx/glxext.c
index 4bd5d6b..16315b8 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -138,34 +138,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
     for (c = glxAllContexts; c; c = next) {
 	next = c->next;
 	if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
-	    int i;
-
 	    (*c->loseCurrent)(c);
 	    c->isCurrent = GL_FALSE;
 	    if (c == __glXLastContext)
 		__glXFlushContextCache();
-
-	    for (i = 1; i < currentMaxClients; i++) {
-		if (clients[i]) {
-		    __GLXclientState *cl = glxGetClient(clients[i]);
-
-		    if (cl->inUse) {
-			int j;
-
-			for (j = 0; j < cl->numCurrentContexts; j++) {
-			    if (cl->currentContexts[j] == c)
-				cl->currentContexts[j] = NULL;
-			}
-		    }
-		}
-	    }
 	}
 	if (c->drawPriv == glxPriv)
 	    c->drawPriv = NULL;
 	if (c->readPriv == glxPriv)
 	    c->readPriv = NULL;
-	if (!c->idExists && !c->isCurrent)
-	    __glXFreeContext(c);
     }
 
     glxPriv->destroy(glxPriv);
@@ -283,8 +264,6 @@ glxClientCallback (CallbackListPtr	*list,
     NewClientInfoRec	*clientinfo = (NewClientInfoRec *) data;
     ClientPtr		pClient = clientinfo->client;
     __GLXclientState	*cl = glxGetClient(pClient);
-    __GLXcontext	*cx;
-    int i;
 
     switch (pClient->clientState) {
     case ClientStateRunning:
@@ -298,18 +277,8 @@ glxClientCallback (CallbackListPtr	*list,
 	break;
 
     case ClientStateGone:
-	for (i = 0; i < cl->numCurrentContexts; i++) {
-	    cx = cl->currentContexts[i];
-	    if (cx) {
-		cx->isCurrent = GL_FALSE;
-		if (!cx->idExists)
-		    __glXFreeContext(cx);
-	    }
-	}
-
 	free(cl->returnBuf);
 	free(cl->largeCmdBuf);
-	free(cl->currentContexts);
 	free(cl->GLClientextensions);
 	break;
 
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 1daf977..f10c8fe 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -158,13 +158,6 @@ struct __GLXclientStateRec {
     GLbyte *largeCmdBuf;
     GLint largeCmdBufSize;
 
-    /*
-    ** Keep a list of all the contexts that are current for this client's
-    ** threads.
-    */
-    __GLXcontext **currentContexts;
-    GLint numCurrentContexts;
-
     /* Back pointer to X client record */
     ClientPtr client;
 

commit c7d9a07d52ce8a6259d6693d68290826b9618a86
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Mar 7 14:53:28 2011 -0500

    glx: Fix _glapi_add_dispatch
    
    We never need to generate stubs, because those conditions can't happen
    in the server.  Yank that code out, but keep the bookkeeping for which
    extension functions are registered so the DRI driver doesn't get
    confused.
    
    As a pleasant bonus, we're now friendlier for environments like selinux
    that make runtime code generation difficult, and we're portable to more
    arches since we don't have to port the assembly stubs.
    
    Fixes the following clutter conformance tests (indirect rendering,
    llvmpipe driver):
    
        test-cogl-backface-culling
        test-cogl-materials
        test-cogl-readpixels
        test-cogl-texture-mipmaps
        test-cogl-texture-get-set-data
        test-cogl-viewport
        test-cogl-offscreen
    
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 30d6947cee714385cf62a40ea6fa6d2e68388c78)

diff --git a/glx/glapi.c b/glx/glapi.c
index 79ff6b1..92395ae 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -77,9 +77,6 @@
 static void init_glapi_relocs(void);
 #endif
 
-static _glapi_proc generate_entrypoint(GLuint functionOffset);
-static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
-
 /**
  * \name Current dispatch and current context control variables
  *
@@ -140,23 +137,6 @@ PUBLIC void *_glapi_Context = NULL;
 #endif /* defined(GLX_USE_TLS) */
 /*@}*/
 
-
-/**
- * strdup() is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- */
-static char *
-str_dup(const char *str)
-{
-   char *copy;
-   copy = (char*) malloc(strlen(str) + 1);
-   if (!copy)
-      return NULL;
-   strcpy(copy, str);
-   return copy;
-}
-
-
 /*
  * xserver's gl is not multithreaded, we promise.
  */
@@ -367,7 +347,6 @@ struct _glapi_function {
     */
    const char * name;
 
-
    /**
     * Text string that describes the types of the parameters passed to the
     * named function.   Parameter types are converted to characters using the
@@ -379,164 +358,17 @@ struct _glapi_function {
     */
    const char * parameter_signature;
 
-
    /**
     * Offset in the dispatch table where the pointer to the real function is


Reply to: