From 3fb86eefe8b22e8d95111ef49feb0a91d865fd00 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 24 Jun 2005 02:28:02 +0000 Subject: Fixed the XCB implementation when always_array is true, thanks to Ian Romanick for pointing it out. Please review. --- src/mesa/glapi/glX_proto_send.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py index 6a4d1dfc0d4..53a97959182 100644 --- a/src/mesa/glapi/glX_proto_send.py +++ b/src/mesa/glapi/glX_proto_send.py @@ -574,7 +574,8 @@ generic_%u_byte( GLint rop, const void * ptr ) if f.needs_reply(): print ' %sRep *reply = %sReply(c, %s, NULL);' % (xcb_name, xcb_name, xcb_request) if output and f.reply_always_array: - print ' %s = (%s)%sData(reply);' % (output.name, output.type_string(), xcb_name) + print ' (void)memcpy(%s, %sData(reply), %sDataLength(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string()) + elif output and not f.reply_always_array: if not output.is_image(): print ' if (%sDataLength(reply) == 0)' % (xcb_name) -- cgit v1.2.3