mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 03:30:16 +01:00
glx: swap the request arrays entirely, not just half of them
Various glx requests include a list of pairs of attributes. We were
only swapping the first half.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 62319e8381)
This commit is contained in:
parent
541f459a9e
commit
a02149cbad
1 changed files with 5 additions and 5 deletions
|
|
@ -322,7 +322,7 @@ int __glXDispSwap_CreatePixmap(__GLXclientState *cl, GLbyte *pc)
|
|||
|
||||
REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3);
|
||||
attribs = (CARD32*)(req + 1);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
||||
|
||||
return __glXDisp_CreatePixmap(cl, pc);
|
||||
}
|
||||
|
|
@ -403,7 +403,7 @@ int __glXDispSwap_CreatePbuffer(__GLXclientState *cl, GLbyte *pc)
|
|||
|
||||
REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3);
|
||||
attribs = (CARD32*)(req + 1);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
||||
|
||||
return __glXDisp_CreatePbuffer(cl, pc);
|
||||
}
|
||||
|
|
@ -467,7 +467,7 @@ int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
|||
|
||||
REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesReq, req->numAttribs << 3);
|
||||
attribs = (CARD32*)(req + 1);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
||||
|
||||
return __glXDisp_ChangeDrawableAttributes(cl, pc);
|
||||
}
|
||||
|
|
@ -489,7 +489,7 @@ int __glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState *cl,
|
|||
|
||||
REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq, req->numAttribs << 3);
|
||||
attribs = (CARD32*)(req + 1);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
||||
|
||||
return __glXDisp_ChangeDrawableAttributesSGIX(cl, pc);
|
||||
}
|
||||
|
|
@ -512,7 +512,7 @@ int __glXDispSwap_CreateWindow(__GLXclientState *cl, GLbyte *pc)
|
|||
|
||||
REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3);
|
||||
attribs = (CARD32*)(req + 1);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs);
|
||||
__GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
|
||||
|
||||
return __glXDisp_CreateWindow(cl, pc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue