+ /* set the major opcode, and the minor opcode for extensions */
+ if(req->ext)
+ {
+ const XCBQueryExtensionRep *extension = XCBGetExtensionData(c, req->ext);
+ /* TODO: better error handling here, please! */
+ assert(extension && extension->present);
+ ((CARD8 *) vector[0].iov_base)[0] = extension->major_opcode;
+ ((CARD8 *) vector[0].iov_base)[1] = req->opcode;
+
+ /* do we need to work around the X server bug described in glx.xml? */
+ if(strcmp(req->ext->name, "GLX") &&
+ ((req->opcode == 17 && ((CARD32 *) vector[0].iov_base)[0] == 0x10004) ||
+ req->opcode == 21))
+ workaround = WORKAROUND_GLX_GET_FB_CONFIGS_BUG;
+ }
+ else
+ ((CARD8 *) vector[0].iov_base)[0] = req->opcode;
+