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: Improve handling of API variants #477

Merged

Conversation

aqnuep
Copy link
Contributor

@aqnuep aqnuep commented Aug 14, 2023

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.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build queued with queue ID 23133.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2696 running.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2696 passed.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build queued with queue ID 23143.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2697 running.

@ci-tester-lunarg
Copy link
Collaborator

CI VulkanProfiles build # 2697 passed.

@christophe-lunarg
Copy link
Collaborator

@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 []
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@christophe-lunarg
Copy link
Collaborator

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.

@aqnuep
Copy link
Contributor Author

aqnuep commented Aug 16, 2023

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 supported="vulkan,vulkansc" is replaced with supported="vulkansc,vulkan" in the extension tags, which the code before this PR doesn't handle.

@christophe-lunarg christophe-lunarg merged commit 12b98aa into KhronosGroup:main Aug 17, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants