A couple of the structures in the xf86dri xcb protocol don't match with xlib of the same version. The protocol version is suppose to be 4.1. The following are different: The xcb_xf86dri_open_connection_reply_t looks like this: uint8_t response_type; /**< */ uint8_t pad0; /**< */ uint16_t sequence; /**< */ uint32_t length; /**< */ uint32_t drm_client_key_low; /**< */ uint32_t drm_client_key_high; /**< */ uint32_t sarea_handle_low; /**< */ uint32_t sarea_handle_high; /**< */ uint32_t bus_id_len; /**< */ uint8_t pad1[12]; /**< */ But the xlib version in xf86dristr.h looks like this (in xcb format): uint8_t response_type; /**< */ uint8_t pad0; /**< */ uint16_t sequence; /**< */ uint32_t length; /**< */ uint32_t sarea_handle_low; /**< */ uint32_t sarea_handle_high; /**< */ uint32_t bus_id_len; /**< */ uint8_t pad1[12]; /**< */ The drm_client_key fields seem to have been removed in the xlib version. The xcb_xf86dri_create_context_request_t looks like this: uint8_t major_opcode; /**< */ uint8_t minor_opcode; /**< */ uint16_t length; /**< */ uint32_t visual; /**< */ uint32_t screen; /**< */ uint32_t context; /**< */ but the xib version looks like this (in xcb format): uint8_t major_opcode; /**< */ uint8_t minor_opcode; /**< */ uint16_t length; /**< */ uint32_t screen; /**< */ uint32_t visual; /**< */ uint32_t context; /**< */ The screen and visual fields are swapped.
This should be fixed in xcb/proto FWIW. If you have clue to resolv this, I suggest you modify the XML files describing the protocole and send us a patch.
Created attachment 20496 [details] [review] Possible patch to xf86dri.xml I don't have XML prototype parser installed anymore to test this, but I think this is what needs to be changed in the XML so that it creates the correct .h file
I think you're right. I've checked against current xorg/proto/xf86driproto and pushed a fix for xcb/proto accordingly.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.