aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-28 14:07:02 +0200
committermarha <marha@users.sourceforge.net>2012-08-28 14:07:02 +0200
commit05d67ae9117e5157fd1a5175dde6d7e48caf4653 (patch)
tree601c92c99a901b165664df7482c7baf538d4d7c5 /mesalib/src/mapi/glapi/gen
parentb3462c12542a69eeaa3fe90fddfbb15d30c18158 (diff)
downloadvcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.tar.gz
vcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.tar.bz2
vcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.zip
fontconfig mesa xserver git update 28 Aug 2012
Diffstat (limited to 'mesalib/src/mapi/glapi/gen')
-rw-r--r--mesalib/src/mapi/glapi/gen/glX_proto_send.py35
1 files changed, 25 insertions, 10 deletions
diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_send.py b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
index ca3a79056..c53359240 100644
--- a/mesalib/src/mapi/glapi/gen/glX_proto_send.py
+++ b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
@@ -681,16 +681,31 @@ generic_%u_byte( GLint rop, const void * ptr )
if f.needs_reply():
print ' %s_reply_t *reply = %s_reply(c, %s, NULL);' % (xcb_name, xcb_name, xcb_request)
- if output and f.reply_always_array:
- print ' (void)memcpy(%s, %s_data(reply), %s_data_length(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 (%s_data_length(reply) == 0)' % (xcb_name)
- print ' (void)memcpy(%s, &reply->datum, sizeof(reply->datum));' % (output.name)
- print ' else'
- print ' (void)memcpy(%s, %s_data(reply), %s_data_length(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string())
-
+ if output:
+ if output.is_image():
+ [dim, w, h, d, junk] = output.get_dimensions()
+ if f.dimensions_in_reply:
+ w = "reply->width"
+ h = "reply->height"
+ d = "reply->depth"
+ if dim < 2:
+ h = "1"
+ else:
+ print ' if (%s == 0) { %s = 1; }' % (h, h)
+ if dim < 3:
+ d = "1"
+ else:
+ print ' if (%s == 0) { %s = 1; }' % (d, d)
+
+ print ' __glEmptyImage(gc, 3, %s, %s, %s, %s, %s, %s_data(reply), %s);' % (w, h, d, output.img_format, output.img_type, xcb_name, output.name)
+ else:
+ if f.reply_always_array:
+ print ' (void)memcpy(%s, %s_data(reply), %s_data_length(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string())
+ else:
+ print ' if (%s_data_length(reply) == 0)' % (xcb_name)
+ print ' (void)memcpy(%s, &reply->datum, sizeof(reply->datum));' % (output.name)
+ print ' else'
+ print ' (void)memcpy(%s, %s_data(reply), %s_data_length(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string())
if f.return_type != 'void':
print ' retval = reply->ret_val;'