[PATCH 5/6] Add DRI3
Adam Jackson
ajax at nwnk.net
Wed Nov 6 07:36:24 PST 2013
On Tue, 2013-11-05 at 16:39 -0800, Keith Packard wrote:
> + <request name="Open" opcode="1">
> + <field type="WINDOW" name="window" />
> + <field type="CARD32" name="provider" />
> + <reply>
> + <field type="CARD8" name="nfd"/>
> + <fd name="device_fd" />
> + <pad bytes="24" />
> + </reply>
> + </request>
There's not much semantic difference, but the protocol text says
Drawable not Window.
The protocol spec is ambiguous here? Section A.2 still seems to
reference CARD32 driver_type and driver name and whatnot.
> diff --git a/src/xproto.xml b/src/xproto.xml
> index bf4dcbf..c9f6979 100644
> --- a/src/xproto.xml
> +++ b/src/xproto.xml
> @@ -1080,7 +1080,24 @@ The number of keycodes altered.
> </doc>
> </event>
>
> -
> + <event name="ge" number="35">
> + <field type="CARD8" name="extension"/>
> + <field type="CARD32" name="length"/>
> + <field type="CARD16" name="evtype"/>
> + <pad bytes="22" />
> + <doc>
> + <brief>generic event (with length)</brief>
> + <field name="extension"><![CDATA[
> +The major opcode of the extension creating this event
> + ]]></field>
> + <field name="length"><![CDATA[
> +The amount (in 4-byte units) of data beyond 32 bytes
> + ]]></field>
> + <field name="evtype"><![CDATA[
> +The extension-specific event type
> + ]]></field>
> + </doc>
> + </event>
This seems like it ought to be a separate commit.
> <!-- Core error types -->
>
> diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
> index d007635..a68e8b8 100644
> --- a/xcbgen/xtypes.py
> +++ b/xcbgen/xtypes.py
> @@ -34,6 +34,7 @@ class Type(object):
> self.is_pad = False
> self.is_switch = False
> self.is_bitcase = False
> + self.is_event_align = False
>
> def resolve(self, module):
> '''
> @@ -314,6 +315,24 @@ class PadType(Type):
> return True
>
>
> +class EventAlignType(Type):
> + '''
> + Derived class which represents the end of a normal 32-byte
> + X event. Fields after this are extended fields.
> + '''
> + def __init__(self, elt):
> + Type.__init__(self, tcard8.name)
> + self.is_event_align = True
> + self.size = 0
> + self.nmemb = 0
> +
> + def resolve(self, module):
> + self.resolved = True
> +
> + def fixed_size(self):
> + return True
> +
> +
> class ComplexType(Type):
> '''
> Derived class which represents a structure. Base type for all structure types.
> @@ -345,6 +364,11 @@ class ComplexType(Type):
> type = PadType(child)
> pads = pads + 1
> visible = False
> + elif child.tag == 'eventalign':
> + field_name = 'eventalign'
> + fkey = 'CARD8'
> + type = EventAlignType(child)
> + visible = False
> elif child.tag == 'field':
> field_name = child.get('name')
> enum = child.get('enum')
These three hunks don't seem to be wired up to anything.
- ajax
More information about the xorg-devel
mailing list