[Mesa-dev] [PATCH] glx: fix request lengths
Brian Paul
brianp at vmware.com
Sun Jan 23 10:43:31 PST 2011
On 01/23/2011 09:26 AM, Julien Cristau wrote:
> We were sending too long requests for GLXChangeDrawableAttributes,
> GLXGetDrawableAttributes, GLXDestroyPixmap and GLXDestroyWindow.
>
> Signed-off-by: Julien Cristau<jcristau at debian.org>
> ---
> src/glx/glx_pbuffer.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
> index 34892e8..1de3e74 100644
> --- a/src/glx/glx_pbuffer.c
> +++ b/src/glx/glx_pbuffer.c
> @@ -106,7 +106,7 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
> if ((priv->majorVersion> 1) || (priv->minorVersion>= 3)) {
> xGLXChangeDrawableAttributesReq *req;
>
> - GetReqExtra(GLXChangeDrawableAttributes, 8 + (8 * num_attribs), req);
> + GetReqExtra(GLXChangeDrawableAttributes, 8 * num_attribs, req);
> output = (CARD32 *) (req + 1);
>
> req->reqType = opcode;
> @@ -297,7 +297,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
> if (use_glx_1_3) {
> xGLXGetDrawableAttributesReq *req;
>
> - GetReqExtra(GLXGetDrawableAttributes, 4, req);
> + GetReq(GLXGetDrawableAttributes, req);
> req->reqType = opcode;
> req->glxCode = X_GLXGetDrawableAttributes;
> req->drawable = drawable;
> @@ -435,7 +435,7 @@ DestroyDrawable(Display * dpy, GLXDrawable drawable, CARD32 glxCode)
>
> LockDisplay(dpy);
>
> - GetReqExtra(GLXDestroyPbuffer, 4, req);
> + GetReq(GLXDestroyPbuffer, req);
> req->reqType = opcode;
> req->glxCode = glxCode;
> req->pbuffer = (GLXPbuffer) drawable;
Looks good to me, but I haven't looked at this code in a while. If
nobody objects I'll commit in a day or two (I don't think you have
git-write permission).
-Brian
More information about the mesa-dev
mailing list