Skip to content

Commit

Permalink
Add Metal to user-guide/09-targets.md
Browse files Browse the repository at this point in the history
Partially resolves #4262

The description of "Parameter passing" part for Metal is related to PR #4022
  • Loading branch information
jkwak-work committed Jul 22, 2024
1 parent 4ae58a7 commit f3f6152
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/user-guide/09-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,27 @@ The binding index of a parameter is the zero-based index of the slot (of the app
Note that while OpenGL and Vulkan both use binding indices for shader parameters like textures, the semantics of those are different because OpenGL uses distinct slots for passing buffers and textures.
For OpenGL it is legal to have a texture that uses `binding=2` and a buffer that uses `binding=2` in the same kernel, because those are indices of distinct kinds of slots, while this scenario would typically be invalid for Vulkan.

Metal
-----

> #### Note ####
> Slang support for Metal is a work in progress.
Metal is a shading language exclusive on Apple slicons. The functionality from Metal is similar to DX12 or Vulkan with more or less features.

### Pipelines
Metal includes rasterization, compute, and ray tracing pipelines with the same set of stages as described for D3D12 above.

> #### Note ####
> Ray-tracing and Mesh support for Metal is a work in progress.
### Parameter Passing

Metal uses slots for binding resources, and it has three types of bindings: buffer, texture and sampler.
In addition, it has argument buffer which is itself a buffer, but any further resource members of the argument buffer does not occupy any explicit binding points, and instead set via an offset within the buffer referred to as id in the metal spec.

Note that Metal 3.1 currently doesn't support arrays of buffers.

CUDA and OptiX
--------------

Expand Down

0 comments on commit f3f6152

Please sign in to comment.