From eb21fddb558ac8113b68670d90ba56998b51951d Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:49:24 -0700 Subject: [PATCH] Add Metal to user-guide/09-targets.md Partially resolves #4262 The description of "Parameter passing" part for Metal is related to PR --- docs/user-guide/09-targets.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/user-guide/09-targets.md b/docs/user-guide/09-targets.md index 61735d4bbc..2822b33d14 100644 --- a/docs/user-guide/09-targets.md +++ b/docs/user-guide/09-targets.md @@ -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. + +While Slang primarily targets APIs like D3D12, Vulkan, D3D11, OpenGL, CUDA, and CPU, it also provides support for Metal. + +### 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 --------------