COPYING | 793 ++++------------------------------- Xext/geext.c | 2 Xext/panoramiX.c | 6 configure.ac | 4 dix/devices.c | 2 dix/events.c | 2 doc/Xserver.man.pre | 2 exa/exa_accel.c | 35 - exa/exa_glyphs.c | 73 +-- exa/exa_priv.h | 10 exa/exa_render.c | 2 exa/exa_unaccel.c | 2 glx/glxcmds.c | 44 + glx/glxdrawable.h | 3 glx/glxdri.c | 2 glx/glxdri2.c | 51 ++ hw/kdrive/src/kinput.c | 4 hw/xfree86/common/Makefile.am | 2 hw/xfree86/common/xf86Config.c | 5 hw/xfree86/ddc/print_edid.c | 6 hw/xfree86/doc/man/xorg.conf.man.pre | 11 hw/xfree86/dri2/dri2.c | 253 ++++++++--- hw/xfree86/dri2/dri2.h | 21 hw/xfree86/dri2/dri2ext.c | 6 hw/xfree86/exa/examodule.c | 2 hw/xfree86/loader/loader.c | 2 hw/xfree86/parser/Makefile.am | 10 hw/xfree86/ramdac/xf86Cursor.c | 6 os/xdmcp.c | 4 randr/randr.c | 11 randr/rrcrtc.c | 5 randr/rrscreen.c | 4 xkb/xkb.c | 8 33 files changed, 519 insertions(+), 874 deletions(-)
New commits: commit 606f6dba16d42e3546a82a386d5a01087467b511 Author: Adam Jackson <a...@redhat.com> Date: Tue Apr 14 10:54:25 2009 -0400 xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) You could be more clever than this, but the wire protocol says this really is an array of not more than 255 ARRAY8, so it's not just a matter of changing the types. (cherry picked from commit 0eb19f9437b7d8c19592e49eedb028771d300d80) diff --git a/os/xdmcp.c b/os/xdmcp.c index 736cd3e..746f598 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -491,7 +491,9 @@ XdmcpRegisterConnection ( return; } } - newAddress = (CARD8 *) xalloc (addrlen * sizeof (CARD8)); + if (ConnectionAddresses.length + 1 == 256) + return; + newAddress = xalloc (addrlen * sizeof (CARD8)); if (!newAddress) return; if (!XdmcpReallocARRAY16 (&ConnectionTypes, ConnectionTypes.length + 1)) commit 396d3a7762abd0dd84042833b75f2ebf9d100bb0 Author: Alan Coopersmith <alan.coopersm...@sun.com> Date: Wed Jul 8 11:26:46 2009 -0700 Fix build of drivers with 1.6.2 when not using --install-libxf86config c859b736d1d23c5dc2f53958b1e76660e6d45018 removed duplicate entries for these from the Makefile, but removed a different set than was done in master branch, causing xf86Parser.h to not be installed, which in turn breaks the build of drivers like -ati, -intel & -nv that use xf86Modes.h, which includes xf86Parser.h Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am index 6ed1814..a2774a4 100644 --- a/hw/xfree86/parser/Makefile.am +++ b/hw/xfree86/parser/Makefile.am @@ -1,8 +1,5 @@ if INSTALL_LIBXF86CONFIG lib_LIBRARIES = libxf86config.a -LIBHEADERS = \ - xf86Optrec.h \ - xf86Parser.h else noinst_LIBRARIES = libxf86config.a endif @@ -30,9 +27,8 @@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ - xf86Optrec.h \ - xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - $(LIBHEADERS) + xf86Optrec.h \ + xf86Parser.h commit 6f1aff5a2b45bc2985081abc240a8fed37170386 Author: Keith Packard <kei...@keithp.com> Date: Mon Jul 6 14:08:31 2009 -0700 Bump to version 1.6.2 Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/configure.ac b/configure.ac index 339172f..71cc30c 100644 --- a/configure.ac +++ b/configure.ac @@ -26,12 +26,12 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.6.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.6.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE -RELEASE_DATE="2009-6-29" +RELEASE_DATE="2009-7-7" dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. commit 499f9f62e408510ed4efb6f2321a3f851f535567 Author: Keith Packard <kei...@keithp.com> Date: Wed Jul 1 14:01:57 2009 -0700 dri2: Preserve compatibility with 1.6 DRI2 API/ABI The old DRI2 buffer allocation API wasn't great, but there's no reason to make the server stop working with those drivers. This patch has the X server adapting to the API provided by the driver, using the new API where available and falling back to the old API as necessary. A warning will be placed in the log file when the old API is in use. (cherry picked from commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca) Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 385c5e8..580383d 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -53,7 +53,7 @@ typedef struct _DRI2Drawable { unsigned int refCount; int width; int height; - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int bufferCount; unsigned int pendingSequence; } DRI2DrawableRec, *DRI2DrawablePtr; @@ -63,6 +63,10 @@ typedef struct _DRI2Screen { const char *deviceName; int fd; unsigned int lastSequence; + + DRI2CreateBuffersProcPtr CreateBuffers; + DRI2DestroyBuffersProcPtr DestroyBuffers; + DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; @@ -133,17 +137,17 @@ DRI2CreateDrawable(DrawablePtr pDraw) } static int -find_attachment(DRI2BufferPtr *buffer_list, int count, unsigned attachment) +find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) { int i; - if (buffer_list == NULL) { + if (pPriv->buffers == NULL) { return -1; } - for (i = 0; i < count; i++) { - if ((buffer_list[i] != NULL) - && (buffer_list[i]->attachment == attachment)) { + for (i = 0; i < pPriv->bufferCount; i++) { + if ((pPriv->buffers[i] != NULL) + && (pPriv->buffers[i]->attachment == attachment)) { return i; } } @@ -151,16 +155,16 @@ find_attachment(DRI2BufferPtr *buffer_list, int count, unsigned attachment) return -1; } -static DRI2BufferPtr +static DRI2Buffer2Ptr allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, DRI2DrawablePtr pPriv, unsigned int attachment, unsigned int format, int dimensions_match) { - DRI2BufferPtr buffer; + DRI2Buffer2Ptr buffer; int old_buf; - old_buf = find_attachment(pPriv->buffers, pPriv->bufferCount, attachment); + old_buf = find_attachment(pPriv, attachment); if ((old_buf < 0) || !dimensions_match @@ -174,14 +178,14 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, return buffer; } -static DRI2BufferPtr * +static DRI2Buffer2Ptr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, int has_format) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int need_real_front = 0; int need_fake_front = 0; int have_fake_front = 0; @@ -193,68 +197,156 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, buffers = xalloc((count + 1) * sizeof(buffers[0])); - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - const unsigned format = (has_format) ? *(attachments++) : 0; + if (ds->CreateBuffer) { + /* Version 2 API with CreateBuffer */ + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + const unsigned format = (has_format) ? *(attachments++) : 0; + + buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, + format, dimensions_match); + + /* If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the case + * where the client requests both the fake and real front-buffer. + */ + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; + } + + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; + + if (pDraw->type == DRAWABLE_WINDOW) { + need_fake_front++; + } + } - buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, - format, dimensions_match); + if (pDraw->type == DRAWABLE_WINDOW) { + if (attachment == DRI2BufferFakeFrontLeft) { + need_fake_front--; + have_fake_front = 1; + } + } + } + if (need_real_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFrontLeft, + front_format, dimensions_match); + } - /* If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the case - * where the client requests both the fake and real front-buffer. - */ - if (attachment == DRI2BufferBackLeft) { - need_real_front++; - front_format = format; + if (need_fake_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFakeFrontLeft, + front_format, dimensions_match); + have_fake_front = 1; } - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - front_format = format; + *out_count = i; - if (pDraw->type == DRAWABLE_WINDOW) { - need_fake_front++; + + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } } + + xfree(pPriv->buffers); + } + } else { + DRI2BufferPtr buffers1; + unsigned int temp_buf[32]; + unsigned int *temp = temp_buf; + int i; + int buffers_match = 1; + + /* Version 1 API with CreateBuffers */ + + if ((count + 1) > 32) { + temp = xalloc((count + 1) * sizeof(temp[0])); } - if (pDraw->type == DRAWABLE_WINDOW) { - if (attachment == DRI2BufferFakeFrontLeft) { + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + + /* Version 1 doesn't deal with the format at all */ + if (has_format) + attachments++; + + /* + * Make sure the client also gets the front buffer when + * it asks for a back buffer + */ + if (attachment == DRI2BufferBackLeft) + need_real_front++; + + /* + * If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the + * case where the client requests both the fake and real + * front-buffer. + */ + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + if (pDraw->type == DRAWABLE_WINDOW) + need_fake_front++; + } + if (pDraw->type == DRAWABLE_WINDOW && + attachment == DRI2BufferFakeFrontLeft) + { need_fake_front--; have_fake_front = 1; } + + temp[i] = attachment; } - } - if (need_real_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFrontLeft, - front_format, dimensions_match); - } + if (need_real_front > 0) + temp[count++] = DRI2BufferFrontLeft; - if (need_fake_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFakeFrontLeft, - front_format, dimensions_match); - have_fake_front = 1; - } + if (need_fake_front > 0) { + temp[count++] = DRI2BufferFakeFrontLeft; + have_fake_front = 1; + } + + if (count != pPriv->bufferCount) + buffers_match = 0; + else { + for (i = 0; i < count; i++) + if (pPriv->buffers[i]->attachment != temp[i]) { + buffers_match = 0; + break; + } + } + if (pPriv->buffers == NULL || !dimensions_match || !buffers_match) + { + buffers1 = (*ds->CreateBuffers)(pDraw, temp, count); + if (pPriv->buffers != NULL) + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); + } + else + buffers1 = (DRI2BufferPtr) pPriv->buffers[0]; - *out_count = i; + for (i = 0; i < count; i++) + buffers[i] = (DRI2Buffer2Ptr) &buffers1[i]; + *out_count = count; - if (pPriv->buffers != NULL) { - for (i = 0; i < pPriv->bufferCount; i++) { - if (pPriv->buffers[i] != NULL) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } - } + if (pPriv->buffers) + xfree (pPriv->buffers); - xfree(pPriv->buffers); + if (temp != temp_buf) { + xfree(temp); + } } - pPriv->buffers = buffers; pPriv->bufferCount = *out_count; pPriv->width = pDraw->width; @@ -284,7 +376,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, return pPriv->buffers; } -DRI2BufferPtr * +DRI2Buffer2Ptr * DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -292,7 +384,7 @@ DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, out_count, FALSE); } -DRI2BufferPtr * +DRI2Buffer2Ptr * DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -318,13 +410,13 @@ DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i]->attachment == dest) - pDestBuffer = pPriv->buffers[i]; + pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; if (pPriv->buffers[i]->attachment == src) - pSrcBuffer = pPriv->buffers[i]; + pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; } if (pSrcBuffer == NULL || pDestBuffer == NULL) return BadValue; - + (*ds->CopyRegion)(pDraw, pRegion, pDestBuffer, pSrcBuffer); return Success; @@ -341,7 +433,7 @@ DRI2DestroyDrawable(DrawablePtr pDraw) pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return; - + pPriv->refCount--; if (pPriv->refCount > 0) return; @@ -349,8 +441,13 @@ DRI2DestroyDrawable(DrawablePtr pDraw) if (pPriv->buffers != NULL) { int i; - for (i = 0; i < pPriv->bufferCount; i++) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + if (ds->DestroyBuffer) { + for (i = 0; i < pPriv->bufferCount; i++) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } + } else { + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); } xfree(pPriv->buffers); @@ -409,18 +506,36 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) if (!ds) return FALSE; - if ((info->version < 2) - || (info->CreateBuffer == NULL) - || (info->DestroyBuffer == NULL)) { - return FALSE; - } - - ds->fd = info->fd; ds->driverName = info->driverName; ds->deviceName = info->deviceName; - ds->CreateBuffer = info->CreateBuffer; - ds->DestroyBuffer = info->DestroyBuffer; + + /* Prefer the new one-at-a-time buffer API */ + if (info->version >= 2 && info->CreateBuffer && info->DestroyBuffer) { + ds->CreateBuffer = info->CreateBuffer; + ds->DestroyBuffer = info->DestroyBuffer; + ds->CreateBuffers = NULL; + ds->DestroyBuffers = NULL; + } else if (info->CreateBuffers && info->DestroyBuffers) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Version 1 API (broken front buffer rendering)\n"); + ds->CreateBuffer = NULL; + ds->DestroyBuffer = NULL; + ds->CreateBuffers = info->CreateBuffers; + ds->DestroyBuffers = info->DestroyBuffers; + } else { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[DRI2] Missing buffer management functions\n"); + xfree(ds); + return FALSE; + } + + if (!info->CopyRegion) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[DRI2] Missing copy region function\n"); + xfree(ds); + return FALSE; + } ds->CopyRegion = info->CopyRegion; dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h index c9a0d3f..f369267 100644 --- a/hw/xfree86/dri2/dri2.h +++ b/hw/xfree86/dri2/dri2.h @@ -35,16 +35,27 @@ #include <X11/extensions/dri2tokens.h> +/* Version 1 structure (for ABI compatibility) */ typedef struct { unsigned int attachment; unsigned int name; unsigned int pitch; unsigned int cpp; unsigned int flags; - unsigned int format; void *driverPrivate; } DRI2BufferRec, *DRI2BufferPtr; +/* Version 2 structure (with format at the end) */ +typedef struct { + unsigned int attachment; + unsigned int name; + unsigned int pitch; + unsigned int cpp; + unsigned int flags; + void *driverPrivate; + unsigned int format; +} DRI2Buffer2Rec, *DRI2Buffer2Ptr; + typedef DRI2BufferPtr (*DRI2CreateBuffersProcPtr)(DrawablePtr pDraw, unsigned int *attachments, int count); @@ -59,11 +70,11 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw, typedef void (*DRI2WaitProcPtr)(WindowPtr pWin, unsigned int sequence); -typedef DRI2BufferPtr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, +typedef DRI2Buffer2Ptr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, unsigned int attachment, unsigned int format); typedef void (*DRI2DestroyBufferProcPtr)(DrawablePtr pDraw, - DRI2BufferPtr buffer); + DRI2Buffer2Ptr buffer); /** * Version of the DRI2InfoRec structure defined in this header @@ -108,7 +119,7 @@ int DRI2CreateDrawable(DrawablePtr pDraw); void DRI2DestroyDrawable(DrawablePtr pDraw); -DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw, +DRI2Buffer2Ptr *DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, @@ -138,7 +149,7 @@ int DRI2CopyRegion(DrawablePtr pDraw, */ extern _X_EXPORT void DRI2Version(int *major, int *minor); -extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, +extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index 97b96fa..3c06174 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -196,7 +196,7 @@ ProcDRI2DestroyDrawable(ClientPtr client) static void send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, - DRI2BufferPtr *buffers, int count, int width, int height) + DRI2Buffer2Ptr *buffers, int count, int width, int height) { xDRI2GetBuffersReply rep; int skip = 0; @@ -246,7 +246,7 @@ ProcDRI2GetBuffers(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int status, width, height, count; unsigned int *attachments; @@ -269,7 +269,7 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int status, width, height, count; unsigned int *attachments; commit c859b736d1d23c5dc2f53958b1e76660e6d45018 Author: Arkadiusz Miskiewicz <ar...@maven.pl> Date: Fri Jul 3 11:03:32 2009 +0200 xfree86: remove duplicate header entries in Makefile.am fixes https://bugs.freedesktop.org/show_bug.cgi?id=22547 This bug was fixed in a big clean-up commit in master, which cannot be backported (see commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3) Signed-off-by: Rémi Cardona <r...@gentoo.org> Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 77ab4c3..b38c14a 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -47,7 +47,7 @@ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ $(XVSDKINCS) xorgVersion.h \ - xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h + xf86sbusBus.h xf86xvpriv.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am index 7f599f9..6ed1814 100644 --- a/hw/xfree86/parser/Makefile.am +++ b/hw/xfree86/parser/Makefile.am @@ -35,6 +35,4 @@ EXTRA_DIST = \ xf86tokens.h sdk_HEADERS = \ - $(LIBHEADERS) \ - xf86Parser.h \ - xf86Optrec.h + $(LIBHEADERS) commit 6f82ca0f8bfc074474407cb5ffe782c3c128f838 Author: Alan Hourihane <al...@vmware.com> Date: Mon Feb 16 11:39:34 2009 +0000 dri2: support glXWaitGL & glXWaitX by copying fake front to front and vice-versa. (cherry picked from commit 2a8b8077d8f6001eb57deba60e1009fc99c28668) Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 71f1544..ff8b126 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -748,29 +748,46 @@ int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc) int __glXDisp_WaitGL(__GLXclientState *cl, GLbyte *pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc; + GLXContextTag tag = req->contextTag; + __GLXcontext *glxc = NULL; int error; + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) + return __glXError(GLXBadContextTag); - if (!__glXForceCurrent(cl, req->contextTag, &error)) { - return error; + if (!__glXForceCurrent(cl, req->contextTag, &error)) + return error; + + CALL_Finish( GET_DISPATCH(), () ); } - CALL_Finish( GET_DISPATCH(), () ); + + if (glxc && glxc->drawPriv->waitGL) + (*glxc->drawPriv->waitGL)(glxc->drawPriv); + return Success; } int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc) { xGLXWaitXReq *req = (xGLXWaitXReq *)pc; + GLXContextTag tag = req->contextTag; + __GLXcontext *glxc = NULL; int error; + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) + return __glXError(GLXBadContextTag); - if (!__glXForceCurrent(cl, req->contextTag, &error)) { - return error; + if (!__glXForceCurrent(cl, req->contextTag, &error)) + return error; } - /* - ** In a multithreaded server that had separate X and GL threads, we would - ** have to wait for the X thread to finish before returning. As it stands, - ** this sample implementation only supports singlethreaded servers, and - ** nothing needs to be done here. - */ + + if (glxc && glxc->drawPriv->waitGL) + (*glxc->drawPriv->waitGL)(glxc->drawPriv); + return Success; } diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h index 4f61f8b..f5a0403 100644 --- a/glx/glxdrawable.h +++ b/glx/glxdrawable.h @@ -49,6 +49,8 @@ struct __GLXdrawable { GLboolean (*swapBuffers)(__GLXdrawable *); void (*copySubBuffer)(__GLXdrawable *drawable, int x, int y, int w, int h); + void (*waitX)(__GLXdrawable *); + void (*waitGL)(__GLXdrawable *); DrawablePtr pDraw; XID drawId; diff --git a/glx/glxdri.c b/glx/glxdri.c index 8d614d0..64606ab 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -706,6 +706,8 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, private->base.destroy = __glXDRIdrawableDestroy; private->base.swapBuffers = __glXDRIdrawableSwapBuffers; private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + private->base.waitX = NULL; + private->base.waitGL = NULL; __glXenterServer(GL_FALSE); retval = DRICreateDrawable(screen->pScreen, serverClient, diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 836fea4..146ea82 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -143,6 +143,39 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *drawable) return TRUE; } +static void +__glXDRIdrawableWaitX(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = private->width; + box.y2 = private->height; + REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0); + + DRI2CopyRegion(drawable->pDraw, ®ion, + DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); +} + +static void +__glXDRIdrawableWaitGL(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = private->width; + box.y2 = private->height; + REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0); + + DRI2CopyRegion(drawable->pDraw, ®ion, + DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft); +} static int __glXDRIdrawableSwapInterval(__GLXdrawable *drawable, int interval) @@ -351,6 +384,8 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, private->base.destroy = __glXDRIdrawableDestroy; private->base.swapBuffers = __glXDRIdrawableSwapBuffers; private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + private->base.waitGL = __glXDRIdrawableWaitGL; + private->base.waitX = __glXDRIdrawableWaitX; if (DRI2CreateDrawable(pDraw)) { xfree(private); commit d478bc948838d11b3abcf6d2cdd3a00dccb344c4 Author: Eric Anholt <e...@anholt.net> Date: Tue Feb 17 09:59:17 2009 -0800 xinerama: Put the proto version in the code instead using proto headers. Proto headers updating resulting in the server advertising new versions is broken. This should be applied to every extension. This fixes the build against slightly-older xineramaproto. (cherry picked from commit b349a764e98f0d8f221190157ffa0904b91beca5) Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index bab8c98..a1f4ce0 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -58,6 +58,8 @@ Equipment Corporation. #endif #include "modinit.h" +#define SERVER_PANORAMIX_MAJOR_VERSION 1 +#define SERVER_PANORAMIX_MINOR_VERSION 1 #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, @@ -903,8 +905,8 @@ ProcPanoramiXQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = PANORAMIX_MAJOR_VERSION; - rep.minorVersion = PANORAMIX_MINOR_VERSION; + rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION; + rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); commit a7a93c12f91e0de72868f17a555215f1795d9e2f Author: Keith Packard <kei...@keithp.com> Date: Mon Jun 29 23:18:55 2009 -0700 Build against DRI_TEX_BUFFER_VERSION 1 setTexBuffer2 isn't present in this version of the structure, so don't try to call it. Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 0b64298..836fea4 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -222,12 +222,15 @@ __glXDRIbindTexImage(__GLXcontext *baseContext, if (texBuffer == NULL) return Success; +#if __DRI_TEX_BUFFER_VERSION >= 2 if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { (*texBuffer->setTexBuffer2)(context->driContext, glxPixmap->target, glxPixmap->format, drawable->driDrawable); - } else { + } else +#endif + { texBuffer->setTexBuffer(context->driContext, glxPixmap->target, drawable->driDrawable); commit 5b49aff4f8b5e4d15bc883f74509d93324f09f5f Author: Keith Packard <kei...@keithp.com> Date: Mon Jun 29 14:40:46 2009 -0700 Bump version to 1.6.1.902 Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/configure.ac b/configure.ac index 1f0fddd..339172f 100644 --- a/configure.ac +++ b/configure.ac @@ -26,12 +26,12 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.6.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.6.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE -RELEASE_DATE="2009-5-8" +RELEASE_DATE="2009-6-29" dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. commit e97cabce4abdaf6b83d1a442f7972d4c45979b33 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Mar 25 12:55:42 2009 +1000 xfree86: fix SWCursor check in xf86CursorSetCursor. Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when the pointer left the screen (in a Xinerama setup). We must call the sprite rendering function if - SW cursors are enabled, or - The current device is not the VCP and not attached to the VCP. Backported from commit 66089e9129a821cfb1983d3d35f41b975a52de5e for server-1.6-branch by Peter Hutterer Reported-by: Gordon Yuan <gordony...@viatech.com.cn> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 2b73b16..896ed37 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -302,9 +302,9 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ - if (ScreenPriv->SWCursor || pDev != inputInfo.pointer) - (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, - x, y); + if (ScreenPriv->SWCursor || + !(pDev == inputInfo.pointer || !pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; commit 17c5b2caf01deec1d1be9fc2ac68a3d636e64c44 Author: Julien Cristau <jcris...@debian.org> Date: Mon May 18 19:01:46 2009 +0200 Change default for ExaOptimizeMigration to false Quoting Michel Dänzer in <1234862541.4823.541.ca...@thor>: Unfortunately, there are still bugs left in EXA which prevent it from working 100% correctly with the option enabled, see http://bugs.freedesktop.org/show_bug.cgi?id=16416 http://bugs.freedesktop.org/show_bug.cgi?id=19940 So disable it for now to avoid corruption. Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 601288c..27607a1 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -146,7 +146,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->optimize_migration = xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_OPTIMIZE_MIGRATION, - TRUE); + FALSE); } if (xf86ReturnOptValBool(pScreenPriv->options, commit 8d65439d5c950ea01ec8e1e4dd989aff0fb4c3f0 Author: Keith Packard <kei...@keithp.com> Date: Thu May 28 14:43:27 2009 -0700 Make RANDR 'set' timestamps follow client specified time. Bug 21987. -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org