spirv: Make 'info' a local array spirv_info_c.py
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Dec 2017 05:52:22 +0000 (21:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 8 Jan 2018 22:57:44 +0000 (14:57 -0800)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/compiler/spirv/spirv_info_c.py

index d898bf0131b96a24d4ed636e1aff7accdeb522d9..4a6a81524b32b0d8eba98fd44a5bd08e13f5ffac 100644 (file)
@@ -78,8 +78,10 @@ if __name__ == "__main__":
 
     spirv_info = json.JSONDecoder().decode(open(pargs.json, "r").read())
 
-    capabilities = collect_data(spirv_info, "Capability")
-    decorations = collect_data(spirv_info, "Decoration")
+    info = [
+        collect_data(spirv_info, "Capability"),
+        collect_data(spirv_info, "Decoration"),
+    ]
 
     with open(pargs.out, 'w') as f:
-        f.write(TEMPLATE.render(info=[capabilities, decorations]))
+        f.write(TEMPLATE.render(info=info))