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

MSL: Expose information about specialization constants - macro mapping #2442

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

dboyan
Copy link
Contributor

@dboyan dboyan commented Feb 4, 2025

Specialization constant may be translated into either function constant or macro in MSL. MoltenVK requires different processing for the two cases. We expose the list of constant ids and their corresponding macro names so that MoltenVK can use them properly support specialization on those macros.

References:
KhronosGroup/MoltenVK#2434
KhronosGroup/MoltenVK#2423 (comment)

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2025

CLA assistant check
All committers have signed the CLA.

@dboyan
Copy link
Contributor Author

dboyan commented Feb 10, 2025

I have updated the PR to finalize the API and clean up unnecessary code in previous versions. It does not change the generated MSL code but rather provides some extra information for users to know the handling of specialization constants in MSL to properly implement specialization.

The user of the API is: KhronosGroup/MoltenVK#2441 (The API is stable and most likely won't change regardless of the user implementation)

Please let me know if there is concern over the change or amendment needed.

Copy link
Contributor

@HansKristian-Work HansKristian-Work left a comment

Choose a reason for hiding this comment

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

Comments.

@dboyan dboyan force-pushed the msl-specialize-macro branch from 572cba9 to bfb24b2 Compare February 12, 2025 17:00
Specialization constant may be translated into either function constant
or macro in MSL. MoltenVK requires different processing for the two cases.
We expose the list of constant ids and their corresponding macro names
so that MoltenVK can use them properly support specialization on those
macros.
@HansKristian-Work HansKristian-Work merged commit 9f9782e into KhronosGroup:main Feb 14, 2025
10 checks passed
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.

4 participants