summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2016-03-31 15:50:54 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2016-03-31 16:03:59 -0700
commit6464d06d42189b4c9eca05afbce3745a1b8ac21d (patch)
treef9a35f6e36ae27180e4bfd885b04689486d5a552
parent823837e6d5b61c09c5315f2f8a9d1bfeeaf78c8f (diff)
glapi: glX_proto_send.py: don't unpack useless values.
There are two ways to handle this. One is to use the _ placeholder value when multiple values are needed. The second is to use list indexing to get only the values actually needed when only one value is desired. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r--src/mapi/glapi/gen/glX_proto_send.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index 3de11d4838..8ea799a1d7 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -65,7 +65,7 @@ def hash_pixel_function(func):
hash_suf = ""
for param in func.parameterIterateGlxSend():
if param.is_image():
- [dim, junk, junk, junk, junk] = param.get_dimensions()
+ dim = param.get_dimensions()[0]
d = (dim + 1) & ~1
hash_pre = "%uD%uD_" % (d - 1, d)
@@ -512,7 +512,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
print '(void) memcpy((void *)(%s + %u), zero, 4);' % (pc, (param.offset + param.size()) + adjust)
else:
- [dim, width, height, depth, extent] = param.get_dimensions()
+ dim, width, height, depth, _ = param.get_dimensions()
if f.glx_rop == ~0:
dim_str = "dim"
else:
@@ -662,7 +662,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
print ' %s_reply_t *reply = %s_reply(c, %s, NULL);' % (xcb_name, xcb_name, xcb_request)
if output:
if output.is_image():
- [dim, w, h, d, junk] = output.get_dimensions()
+ dim, w, h, d, _ = output.get_dimensions()
if f.dimensions_in_reply:
w = "reply->width"
h = "reply->height"
@@ -732,7 +732,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
for p in f.parameterIterateOutputs():
if p.is_image():
- [dim, w, h, d, junk] = p.get_dimensions()
+ dim, w, h, d, _ = p.get_dimensions()
if f.dimensions_in_reply:
print " __glXReadPixelReply(dpy, gc, %u, 0, 0, 0, %s, %s, %s, GL_TRUE);" % (dim, p.img_format, p.img_type, p.name)
else:
@@ -796,7 +796,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
p_string += ", " + param.name
if param.is_image():
- [dim, junk, junk, junk, junk] = param.get_dimensions()
+ dim = param.get_dimensions()[0]
if f.pad_after(param):
p_string += ", 1"