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: Regression in Metal shader compilation tests #2407

Closed
billhollings opened this issue Nov 5, 2024 · 2 comments · Fixed by #2417
Closed

MSL: Regression in Metal shader compilation tests #2407

billhollings opened this issue Nov 5, 2024 · 2 comments · Fixed by #2417

Comments

@billhollings
Copy link
Contributor

df234e8 introduced the following test shaders:

shaders-msl-no-opt/asm/frag/barycentric-centroid-noperspective.msl22.asm.frag
shaders-msl-no-opt/asm/frag/barycentric-centroid-perspective.msl22.asm.frag
shaders-msl-no-opt/asm/frag/barycentric-sample-noperspective.msl22.asm.frag
shaders-msl-no-opt/asm/frag/barycentric-sample-perspective.msl22.asm.frag

These are failing Metal compilation with:

reference/shaders-msl-no-opt/asm/frag/barycentric-centroid-perspective.msl22.asm.frag:13:30: error: 'barycentric_coord' and 'centroid_perspective' attributes are not compatible
    float3 gl_BaryCoordEXT [[barycentric_coord, centroid_perspective]];
                             ^~~~~~~~~~~~~~~~~
reference/shaders-msl-no-opt/asm/frag/barycentric-centroid-perspective.msl22.asm.frag:16:26: error: type 'main0_in' is not valid for attribute 'stage_in'
fragment main0_out main0(main0_in in [[stage_in]])
                         ^             ~~~~~~~~
2 errors generated.
Error compiling Metal shader: reference/shaders-msl-no-opt/asm/frag/barycentric-centroid-perspective.msl22.asm.frag
Error: Failed to compile Metal shader

These tests seem to be violating this restriction from the MSL spec:

A fragment function input declared with the [[barycentric_coord]] attribute can only be declared with either the center_perspective (default) or center_no_perspective

@billhollings billhollings changed the title Regression in Metal shader compilation tests MSL: Regression in Metal shader compilation tests Nov 5, 2024
@HansKristian-Work
Copy link
Contributor

Why are we passing CI then?

@HansKristian-Work
Copy link
Contributor

12: Testing MSL shader: /Users/runner/work/SPIRV-Cross/SPIRV-Cross/shaders-msl-no-opt/asm/frag/barycentric-centroid-noperspective.msl22.asm.frag
12: Reference shader path: /Users/runner/work/SPIRV-Cross/SPIRV-Cross/reference/shaders-msl-no-opt/asm/frag/barycentric-centroid-noperspective.msl22.asm.frag
12: Skipping validation for /Users/runner/work/SPIRV-Cross/SPIRV-Cross/shaders-msl-no-opt/asm/frag/barycentric-centroid-noperspective.msl22.asm.frag due to lack of toolchain support.

uh ... but logs also say

 19: Current SDK supports MSL -std=macos-metal2.2. Enabling validation for MSL -std=macos-metal2.2 shaders.
19: Current SDK supports MSL -std=macos-metal2.3. Enabling validation for MSL -std=macos-metal2.3 shaders.
19: Current SDK supports MSL -std=macos-metal2.4. Enabling validation for MSL -std=macos-metal2.4 shaders.
19: Current SDK supports MSL -std=metal3.0. Enabling validation for MSL -std=metal3.0 shaders.
19: Current SDK supports MSL -std=metal3.1. Enabling validation for MSL -std=metal3.1 shaders.

sigh ...

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 a pull request may close this issue.

2 participants