[Xcb] GLX progress

Josh Triplett josh.trip@verizon.net
Tue Jan 25 13:23:49 PST 2005


Jeremy Kolb wrote:
> It's almost done, I just can't figure out how to express the strings in
> the VendorRequest and VendorRequestWithReply requests.  The length of
> the strings is not specified so I'm unsure, can I just do field with
> type="char *"?  Can someone double check?

No, you shouldn't declare a field of type "char*"; that would just
transmit the value of a pointer across the wire, not the data. :)  See
answers below.

> Once I figure that out and the bug in the xslt thing's fixed (how
> value-mask in a reply is ignored [I looked at it but couldn't figure out
> what's going on]) then this should be in a somewhat useable state.

Wonderful!

That bug is now fixed in the latest XCB CVS.  If you could mail your
final glx.xml (including the changes below) to the mailing list, I'll
gladly commit it to the repository.

> Here are the vendor requests:
>
>     <request name="VendorPrivate" opcode="16">
>         <field type="CARD32" name="vendor_code" />
>         <list type="BYTE" name="data"></list>
>         <!-- FIX: Not sure what the length is on this list -->
>     </request>

The length of this list is specified by the caller.  To indicate this,
just use an empty list element:
<list type="BYTE" name="data" />
XML-XCB will then automatically create a localfield "data_len", and use
this as the length of the "data" list.

(Note that using a separate closing tag as you did will also work; the
empty element syntax is just shorter and calls more attention to the
fact that the element is empty.)

>     <request name="VendorPrivateWithReply" opcode="17">
>         <field type="CARD32" name="vendor_code" />
>         <list type="BYTE" name="data"></list>
>         <!-- FIX: Not sure what the length is on this list -->

Same as above.

>         <reply>
>             <pad bytes="1" />
>             <field type="CARD32" name="retval" />
>             <list type="BYTE" name="data1">
>                 <value>24</value>
>             </list>
>             <list type="BYTE" name="data2">
>                 <fieldref>length</fieldref>
>             </list>
>         </reply>
>     </request>

In this case, the length of data2 should be determined by the length of
the reply structure; you can express this by using an empty list element
here:

<list type="BYTE" name="data2" />

I just fixed a bug in this reply-length-based calculation, so be sure to
update to the latest XCB CVS.

Thanks again for the excellent work!

- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050125/b0cfae81/signature.pgp


More information about the xcb mailing list