Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Make generate_source.py look harder for vk.xml #1048

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/generate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ def main(argv):
for path in files_to_gen.keys():
os.makedirs(os.path.join(temp_dir, path))

registry = os.path.abspath(os.path.join(args.registry, 'vk.xml'))
if not os.path.isfile(registry):
registry = os.path.abspath(os.path.join(args.registry, 'Vulkan-Headers/registry/vk.xml'))
if not os.path.isfile(registry):
print(f'cannot find vk.xml in {args.registry}')
return -1

# run each code generator
for path, filenames in files_to_gen.items():
for filename in filenames:
Expand All @@ -86,7 +93,7 @@ def main(argv):

cmd = [common_codegen.repo_relative(os.path.join('scripts','kvt_genvk.py')),
'-api', args.api,
'-registry', os.path.abspath(os.path.join(args.registry, 'vk.xml')),
'-registry', registry,
'-quiet', '-directory', output_path, filename]
print(' '.join(cmd))
try:
Expand Down
Loading