const char *spirv_capability_to_string(SpvCapability cap);
const char *spirv_decoration_to_string(SpvDecoration dec);
+const char *spirv_op_to_string(SpvOp op);
#endif /* SPIRV_INFO_H */
return (kind, values)
+def collect_opcodes(spirv):
+ values = []
+ for x in spirv["instructions"]:
+ name = x["opname"]
+ assert name.startswith("Op")
+ values.append(name[2:])
+
+ return ("Op", values)
+
def parse_args():
p = argparse.ArgumentParser()
p.add_argument("json")
info = [
collect_data(spirv_info, "Capability"),
collect_data(spirv_info, "Decoration"),
+ collect_opcodes(spirv_info),
]
with open(pargs.out, 'w') as f: