Skip to content

Add --extension-file option to merge additional XML files into the specification#538

Open
chrisd-work wants to merge 2 commits intoDav1dde:glad2from
chrisd-work:dev/cdannemiller/extensions
Open

Add --extension-file option to merge additional XML files into the specification#538
chrisd-work wants to merge 2 commits intoDav1dde:glad2from
chrisd-work:dev/cdannemiller/extensions

Conversation

@chrisd-work
Copy link
Copy Markdown

Developers working on Vulkan features not yet merged into vk.xml had no way to test against the spec without modifying it directly.

This adds an --extension-file option that accepts a path (or comma-separated list of paths) to additional XML files, which are merged into vk.xml at runtime — allowing users to prototype and test new extensions without touching the upstream spec.

Usage:
glad --extension-file VK_test_extension.xml ...
glad --extension-file VK_ext_a.xml,VK_ext_b.xml ...

Comment thread glad/parse.py
sections of the extension file into the corresponding sections of this spec.
"""
ext_root = xml_parse(path)
for section_tag in ('types', 'commands', 'extensions', 'platforms'):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why can't the entire document be merged unconditionally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants