print " struct {"
for type, name, args, num, h in entrypoints:
- print_guard_start(name)
- print " PFN_vk{0} {0};".format(name)
- print_guard_end(name)
+ guard = get_platform_guard_macro(name)
+ if guard is not None:
+ print "#ifdef {0}".format(guard)
+ print " PFN_vk{0} {0};".format(name)
+ print "#else"
+ print " void *{0};".format(name)
+ print "#endif"
+ else:
+ print " PFN_vk{0} {0};".format(name)
print " };\n"
print " };\n"
print "};\n"
offsets = []
i = 0;
for type, name, args, num, h in entrypoints:
- print_guard_start(name)
print " \"vk%s\\0\"" % name
offsets.append(i)
i += 2 + len(name) + 1
- print_guard_end(name)
print """ ;
/* Weak aliases for all potential validate functions. These will resolve to
print "\nstatic const struct anv_entrypoint entrypoints[] = {"
for type, name, args, num, h in entrypoints:
- print_guard_start(name)
print " { %5d, 0x%08x }," % (offsets[num], h)
- print_guard_end(name)
print "};\n"
for layer in [ "anv", "validate", "gen7", "gen75", "gen8", "gen9" ]: