layers: Make sure we deref pointers to counts
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Tue, 13 Jan 2015 22:32:18 +0000 (15:32 -0700)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 5 Feb 2015 00:58:07 +0000 (17:58 -0700)
For functions that can return a count of elements, be sure to
dereference that pointer when looping over the array.

xgl-layer-generate.py

index 3e2d825e0fb0a6389ab66e8da82ad8dd712f7843..e5656dbf42f47258a635d11cda715c75a0f608c3 100755 (executable)
@@ -444,7 +444,10 @@ class Subcommand(object):
                             sp_param_dict[pindex] = 'index'
                         pindex += 1
                         if p.name.endswith('Count'):
-                            prev_count_name = p.name
+                            if '*' in p.ty:
+                                prev_count_name = "*%s" % p.name
+                            else:
+                                prev_count_name = p.name
                         else:
                             prev_count_name = ''
                     log_func = log_func.strip(', ')