-
Notifications
You must be signed in to change notification settings - Fork 35
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: Improve handling of API variants #477
scripts: Improve handling of API variants #477
Conversation
CI VulkanProfiles build queued with queue ID 23133. |
CI VulkanProfiles build # 2696 running. |
CI VulkanProfiles build # 2696 passed. |
a2c5ca5
to
16b8231
Compare
CI VulkanProfiles build queued with queue ID 23143. |
CI VulkanProfiles build # 2697 running. |
CI VulkanProfiles build # 2697 passed. |
@aqnuep, I think I would feel a little more confident about this if I had a better idea of what specific cases it resolves. For example, could you had some tests, maybe adding "profiles" here E:\Github\khronos\Vulkan-Profiles - Bugfix\profiles\test\data and manually checking the specific cases in E:\Github\khronos\Vulkan-Profiles - Bugfix\layer\tests\tests_mechanism.cpp ? |
@@ -1421,7 +1455,7 @@ def __init__(self, xml, upperCaseName): | |||
self.limits = dict() | |||
self.platform = xml.get('platform') | |||
self.provisional = xml.get('provisional') | |||
self.promotedTo = xml.get('promotedto') | |||
self.promotedTo = xml.get('promotedto').split(',') if xml.get('promotedto') is not None else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case where an extension is promoted to multiple extensions? Or is this for promotedto an extension and a core version maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is one example, but also consider API variants like Vulkan SC.
I think the changes are mostly to better handle Vulkan and Vulkan SC it seems reasonnable. It looks like it also fix some cases regarding promotedto and alias for which I could enjoy seeing additional tests to prevent future changes accidently break these cases. |
Yes, most of these were detected by testing against Vulkan SC content, but are rather generic fixes so far. The problem is that in order to write tests for this you'd actually have to create custom vk.xml inputs to test with, e.g. one where |
This PR introduces some improvements to the generator scripts to better handle API variants defined in the vk.xml, as the previous code did not handle some of the aspects of the new vk.xml syntaxes introduced for API variant dependent definitions in a general way.