From a00db74d1afa717dd90dfcf3170c63d0d1c0d3d7 Mon Sep 17 00:00:00 2001 From: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Date: Fri, 20 Dec 2024 01:00:20 -0500 Subject: Add base vertex and base instance system values (#5918) * Add base vertex and base instance system values * Fixed incorrect stage in tests --- docs/user-guide/a2-01-spirv-target-specific.md | 4 ++-- docs/user-guide/a2-02-metal-target-specific.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/user-guide/a2-01-spirv-target-specific.md b/docs/user-guide/a2-01-spirv-target-specific.md index 4faf3bde5..d57cc8ce5 100644 --- a/docs/user-guide/a2-01-spirv-target-specific.md +++ b/docs/user-guide/a2-01-spirv-target-specific.md @@ -60,8 +60,8 @@ The system-value semantics are translated to the following SPIR-V code. | `SV_RenderTargetArrayIndex` | `BuiltIn Layer` | | `SV_SampleIndex` | `BuiltIn SampleId` | | `SV_ShadingRate` | `BuiltIn PrimitiveShadingRateKHR` | -| `SV_StartVertexLocation` | `*Not supported* | -| `SV_StartInstanceLocation` | `*Not supported* | +| `SV_StartVertexLocation` | `BuiltIn BaseVertex` | +| `SV_StartInstanceLocation` | `BuiltIn BaseInstance` | | `SV_StencilRef` | `BuiltIn FragStencilRefEXT` | | `SV_Target` | `Location` | | `SV_TessFactor` | `BuiltIn TessLevelOuter` | diff --git a/docs/user-guide/a2-02-metal-target-specific.md b/docs/user-guide/a2-02-metal-target-specific.md index f63b985b5..48c6b4587 100644 --- a/docs/user-guide/a2-02-metal-target-specific.md +++ b/docs/user-guide/a2-02-metal-target-specific.md @@ -40,6 +40,8 @@ The system-value semantics are translated to the following Metal attributes: | `SV_Target` | `[[color(N)]]` | | `SV_VertexID` | `[[vertex_id]]` | | `SV_ViewportArrayIndex` | `[[viewport_array_index]]` | +| `SV_StartVertexLocation` | `[[base_vertex]]` | +| `SV_StartInstanceLocation` | `[[base_instance]]` | Custom semantics are mapped to user attributes: @@ -293,4 +295,4 @@ Translates to: ```metal constant int fc_a_0 [[function_constant(7)]]; constant int a_0 = is_function_constant_defined(fc_a_0) ? fc_a_0 : 2; -``` \ No newline at end of file +``` -- cgit v1.2.3