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

mesa: Changes to 'debian-unstable'



 debian/changelog |    2 ++
 include/GL/glx.h |    2 +-
 src/glx/glxext.c |    9 +++++----
 3 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 2fea99b92624c55d7fb490e1e550c9205c176ec7
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Thu Jul 3 08:42:47 2014 +0200

    Add changelog entry

diff --git a/debian/changelog b/debian/changelog
index 54f77cf..3020768 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ mesa (10.2.2-1) UNRELEASED; urgency=medium
       (Closes: #685328).
     - 01_targets-xa-limit-the-amount-of-exported-symbols.diff dropped,
       upstream
+  * Cherry-pick commit b4dcf87 (glxext: Send the Drawable's ID in the
+    GLX_BufferSwapComplete event) from upstream, fixes intel + dri3.
 
  -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 02 Jul 2014 18:00:52 +0200
 

commit 9dd43892337893f3fb28a269afd59149ddecbfb7
Author: Jasper St. Pierre <jstpierre@mecheye.net>
Date:   Tue Jun 24 13:43:53 2014 -0400

    glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event
    
    While the official INTEL_swap_event specification says that the drawable
    field should contain the GLXDrawable, not the Drawable, the existing
    DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out
    GLX_BufferSwapComplete with the Drawable's ID, so existing codebases
    like Clutter/Cogl rely on getting the Drawable.
    
    Match DRI2's error here and stuff the event with the X Drawable, not
    the GLX drawable.
    
    This fixes apps seeing wrong drawables through an indirect GLX context
    or with DRI3, which uses the GLX_BufferSwapComplete event directly on
    the wire instead of translates Present in mesa.
    
    At the same time, also modify the structure for the event to make sure
    that clients don't make the same mistake. This is not an API or ABI
    break, as GLXDrawable and Drawable are both typedefs for XID.
    
    Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
    Reviewed-by: Axel Davy <axel.davy@ens.fr>
    Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit b4dcf87f34f68111acd9d364739938721fc692f4)

diff --git a/include/GL/glx.h b/include/GL/glx.h
index 234abc0..78f5052 100644
--- a/include/GL/glx.h
+++ b/include/GL/glx.h
@@ -518,7 +518,7 @@ typedef struct {
     unsigned long serial;	/* # of last request processed by server */
     Bool send_event;		/* true if this came from a SendEvent request */
     Display *display;		/* Display the event was read from */
-    GLXDrawable drawable;	/* drawable on which event was requested in event mask */
+    Drawable drawable;	/* drawable on which event was requested in event mask */
     int event_type;
     int64_t ust;
     int64_t msc;
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 820cbc0..b0d1e3c 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -134,14 +134,15 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
       GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
       xGLXBufferSwapComplete2 *awire = (xGLXBufferSwapComplete2 *)wire;
       struct glx_drawable *glxDraw = GetGLXDrawable(dpy, awire->drawable);
-      aevent->event_type = awire->event_type;
-      aevent->drawable = awire->drawable;
-      aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo;
-      aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo;
 
       if (!glxDraw)
 	 return False;
 
+      aevent->event_type = awire->event_type;
+      aevent->drawable = glxDraw->xDrawable;
+      aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo;
+      aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo;
+
       if (awire->sbc < glxDraw->lastEventSbc)
 	 glxDraw->eventSbcWrap += 0x100000000;
       glxDraw->lastEventSbc = awire->sbc;


Reply to: