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

Metal documentation #5549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

expipiplus1
Copy link
Collaborator

Closes #4262

Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

The purpose of 09-targets.md is to provide an overview of what each target platform expects, and less about what Slang will do on that platform.

We will use separate chapters for each platform to list all the details about how Slang translate different things to that platform.

We need a document that is similar to https://github.com/shader-slang/slang/blob/master/docs/user-guide/a2-01-spirv-target-specific.md for Metal.
In which we talk about every detail about the platform, including how types and specific intrinsics (atomics, texture fetching etc.) are translated.

docs/user-guide/09-targets.md Show resolved Hide resolved
@csyonghe
Copy link
Collaborator

Can you please create a file that is under docs/user-guide/a2-02-metal-target-specific.md and move all the details there? Then we can deep link into this doc from shader-slang.com/docs

@expipiplus1
Copy link
Collaborator Author

I've added that file populated with the functionality from the metal legalization source.

@expipiplus1 expipiplus1 marked this pull request as ready for review November 15, 2024 09:45
@expipiplus1 expipiplus1 requested a review from a team as a code owner November 15, 2024 09:45
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

Looks good!

@expipiplus1
Copy link
Collaborator Author

Thanks for the feedback, addressed.

[[mesh]]
void meshMain(
uint tid [[thread_position_in_grid]],
metal::mesh<VertexType, PrimitiveType, NumVertices, NumPrimitives, Topology> mesh
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we support mesh shaders written in pure HLSL syntax without using metal specific types. Do we even have metal::mesh? This should be updated to reflect what is in tests\metal\simple-mesh.slang.

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.

Add documentation for Metal target
2 participants