[PATCH 5/7] Add event queue splitting

Keith Packard keithp at keithp.com
Wed Nov 6 16:32:40 PST 2013


Peter Harris <pharris at opentext.com> writes:

> There was some push-back the last time something similar to this came
> up, on the theory that it should be in a separate library from xcb[1].
> That said, we may have reached the point where it's just too useful to
> not have in libxcb.

We cannot effectively implement OpenGL without something of this
nature. The current DRI2 GLX implementation in Mesa is stuck on Xlib
because of this, and the current DRI2 EGL implementation is inefficient
and often wrong.

The resistance for something of this nature in the past has been a
natural antipathy to callbacks from the library, which is the obvious
way to perform event filtering of this nature. Providing a very specific
and non-callback mechanism for event filtering avoids all of those
issues while still letting us use xcb for OpenGL.

> Does this interface work for the rest of the things needed for GLX?

It works for Present, as that uses XGE in the format required for
this special event hook to work. If we want to make the special event
queue work for other event formats, we'd have to add new filter
mechanisms to the core libxcb.

In particular, it will not work for DRI2 as that doesn't use XGE.

>>  /**
>> - * @brief GE event
>> - *
>> - * An event as sent by the XGE extension. The length field specifies the
>> - * number of 4-byte blocks trailing the struct.
>> - */
>> -typedef struct {
>> -    uint8_t  response_type;  /**< Type of the response */
>> -    uint8_t  pad0;           /**< Padding */
>> -    uint16_t sequence;       /**< Sequence number */
>> -    uint32_t length;
>> -    uint16_t event_type;
>> -    uint16_t pad1;
>> -    uint32_t pad[5];         /**< Padding */
>> -    uint32_t full_sequence;  /**< full sequence */
>> -} xcb_ge_event_t;
>> -
>> -/**
>
> This hunk doesn't appear to be related to event queue splitting. Should
> it be in a separate commit?

Probably; it's the matching patch to the proto chunk which added an XML
description of this data structure.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131106/6ad3e33d/attachment.pgp>


More information about the xorg-devel mailing list