[Mesa-stable] [Mesa-dev] [PATCH] glx: Fix __glXWireToEvent for BufferSwapComplete
Eric Anholt
eric at anholt.net
Tue Aug 4 19:38:48 PDT 2015
Adam Jackson <ajax at redhat.com> writes:
> In the DRI2 path this event is magically synthesized from the
> corresponding DRI2 event, but with Present, the server sends us the
> event itself. The DRI2 path fills in the serial number, send_event, and
> display fields of the XEvent struct that the app sees, but the Present
> path did not.
>
> This is likely related to a class of crashes seen in gtk/clutter apps:
>
> https://bugzilla.redhat.com/attachment.cgi?id=1032631
>
> Note that the crashing instruction is looking up the lock_fns slot in
> the Display *, and %rdi (holding the Display *) is 0x1.
>
> Cc: mesa-stable at lists.freedesktop.org
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
> src/glx/glxext.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/glx/glxext.c b/src/glx/glxext.c
> index fdc24d4..dc87fb9 100644
> --- a/src/glx/glxext.c
> +++ b/src/glx/glxext.c
> @@ -138,6 +138,9 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
> if (!glxDraw)
> return False;
>
> + aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
In the Pbuffer path, we get serial from awire. Why's this one
different?
> + aevent->send_event = (awire->type & 0x80) != 0;
> + aevent->display = dpy;
These look good. Related: pbuffers don't seem to be setting the
display, either. Doesn't have to be fixed in this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20150804/de6c227f/attachment.sig>
More information about the mesa-stable
mailing list