glx: fix GLXChangeDrawableAttributesSGIX request
xGLXChangeDrawableAttributesSGIXReq follows the GLXVendorPrivate header with a drawable, number of attributes, and list of (type, value) attribute pairs. Don't forget to put the number of attributes in there. I don't think this can ever have worked. NOTE: This is a candidate for the 7.9 and 7.10 branches Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
ea5ede2178
commit
e27913f805
|
@ -117,7 +117,7 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
|
||||||
else {
|
else {
|
||||||
xGLXVendorPrivateWithReplyReq *vpreq;
|
xGLXVendorPrivateWithReplyReq *vpreq;
|
||||||
|
|
||||||
GetReqExtra(GLXVendorPrivateWithReply, 4 + (8 * num_attribs), vpreq);
|
GetReqExtra(GLXVendorPrivateWithReply, 8 + (8 * num_attribs), vpreq);
|
||||||
output = (CARD32 *) (vpreq + 1);
|
output = (CARD32 *) (vpreq + 1);
|
||||||
|
|
||||||
vpreq->reqType = opcode;
|
vpreq->reqType = opcode;
|
||||||
|
@ -125,7 +125,8 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
|
||||||
vpreq->vendorCode = X_GLXvop_ChangeDrawableAttributesSGIX;
|
vpreq->vendorCode = X_GLXvop_ChangeDrawableAttributesSGIX;
|
||||||
|
|
||||||
output[0] = (CARD32) drawable;
|
output[0] = (CARD32) drawable;
|
||||||
output++;
|
output[1] = num_attribs;
|
||||||
|
output += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) memcpy(output, attribs, sizeof(CARD32) * 2 * num_attribs);
|
(void) memcpy(output, attribs, sizeof(CARD32) * 2 * num_attribs);
|
||||||
|
|
Loading…
Reference in New Issue