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

fragmentShaderBarycentric reports as true without complete SPIR-V to MSL support #2258

Open
SRSaunders opened this issue Jun 26, 2024 · 0 comments
Labels

Comments

@SRSaunders
Copy link
Contributor

When testing the fragment_shader_barycentric sample from the official Khronos Vulkan Sample repository (https://github.com/KhronosGroup/Vulkan-Samples), I receive the following errors:

[mvk-error] SPIR-V to MSL conversion error: Cannot declare both BaryCoordNV and BaryCoordNoPerspNV in same shader in MSL.
[mvk-error] SPIR-V to MSL conversion error: PerVertexKHR decoration is not supported in MSL.

My device reports fragmentShaderBarycentric = true, and while it allows the sample to startup it eventually fails on the above MSL conversion errors. The spec says the following:

fragmentShaderBarycentric indicates that the implementation supports the BaryCoordKHR and BaryCoordNoPerspKHR SPIR-V fragment shader built-ins and supports the PerVertexKHR SPIR-V decoration on fragment shader input variables.

So my question is why does MoltenVK report fragmentShaderBarycentric = true, when the implementation is incomplete and violates the spec? Perhaps this should instead return false, and let the developer choose to proceed only based on known limitations of this feature on MoltenVK. Or have you taken the opposite approach, i.e. return true but expect the developer to investigate the known limitations on MoltenVK and write code to support only the working cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants