summaryrefslogtreecommitdiff
path: root/docs/user-guide/a2-01-spirv-target-specific.md
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-20 01:08:20 +0800
committerGitHub <noreply@github.com>2024-11-19 09:08:20 -0800
commit0bf6a668208c65c980648fbe74a8c0a7bf4ded77 (patch)
tree02e3a58af7561daed342c1362aef8b5aaad8e489 /docs/user-guide/a2-01-spirv-target-specific.md
parenta50de6bd32de1b064874480a2528fc994597f7ac (diff)
Markdown emphasis corrections (#5588)
* Add markdown formatting to extras/formatting.sh * Correct formatting in markdown * Warn on unrecognized argument in formatting script * Print all diffs in formatting script * Correct markdown emph formatting * Don't format markdown by default --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'docs/user-guide/a2-01-spirv-target-specific.md')
-rw-r--r--docs/user-guide/a2-01-spirv-target-specific.md74
1 files changed, 37 insertions, 37 deletions
diff --git a/docs/user-guide/a2-01-spirv-target-specific.md b/docs/user-guide/a2-01-spirv-target-specific.md
index e0d6fd69b..d6d1190bb 100644
--- a/docs/user-guide/a2-01-spirv-target-specific.md
+++ b/docs/user-guide/a2-01-spirv-target-specific.md
@@ -31,42 +31,42 @@ System-Value semantics
The system-value semantics are translated to the following SPIR-V code.
-| SV semantic name | SPIR-V code |
-|--|--|
-| SV_Barycentrics | BuiltIn BaryCoordKHR |
-| SV_ClipDistance<N> | BuiltIn ClipDistance |
-| SV_CullDistance<N> | BuiltIn CullDistance |
-| SV_Coverage | BuiltIn SampleMask |
-| SV_CullPrimitive | BuiltIn CullPrimitiveEXT |
-| SV_Depth | BuiltIn FragDepth |
-| SV_DepthGreaterEqual | BuiltIn FragDepth |
-| SV_DepthLessEqual | BuiltIn FragDepth |
-| SV_DispatchThreadID | BuiltIn GlobalInvocationId |
-| SV_DomainLocation | BuiltIn TessCoord |
-| SV_GSInstanceID | BuiltIn InvocationId |
-| SV_GroupID | BuiltIn WorkgroupId |
-| SV_GroupIndex | BuiltIn LocalInvocationIndex |
-| SV_GroupThreadID | BuiltIn LocalInvocationId |
-| SV_InnerCoverage | BuiltIn FullyCoveredEXT |
-| SV_InsideTessFactor | BuiltIn TessLevelInner |
-| SV_InstanceID | BuiltIn InstanceIndex |
-| SV_IntersectionAttributes | *Not supported* |
-| SV_IsFrontFace | BuiltIn FrontFacing |
-| SV_OutputControlPointID | BuiltIn InvocationId |
-| SV_PointSize<sup>note</sup> | BuiltIn PointSize |
-| SV_Position | BuiltIn Position/FragCoord |
-| SV_PrimitiveID | BuiltIn PrimitiveId |
-| SV_RenderTargetArrayIndex | BuiltIn Layer |
-| SV_SampleIndex | BuiltIn SampleId |
-| SV_ShadingRate | BuiltIn PrimitiveShadingRateKHR |
-| SV_StartVertexLocation | *Not supported* |
-| SV_StartInstanceLocation | *Not suported* |
-| SV_StencilRef | BuiltIn FragStencilRefEXT |
-| SV_Target<N> | Location |
-| SV_TessFactor | BuiltIn TessLevelOuter |
-| SV_VertexID | BuiltIn VertexIndex |
-| SV_ViewID | BuiltIn ViewIndex |
-| SV_ViewportArrayIndex | BuiltIn ViewportIndex |
+| SV semantic name | SPIR-V code |
+|-------------------------------|-----------------------------------|
+| `SV_Barycentrics` | `BuiltIn BaryCoordKHR` |
+| `SV_ClipDistance<N>` | `BuiltIn ClipDistance` |
+| `SV_CullDistance<N>` | `BuiltIn CullDistance` |
+| `SV_Coverage` | `BuiltIn SampleMask` |
+| `SV_CullPrimitive` | `BuiltIn CullPrimitiveEXT` |
+| `SV_Depth` | `BuiltIn FragDepth` |
+| `SV_DepthGreaterEqual` | `BuiltIn FragDepth` |
+| `SV_DepthLessEqual` | `BuiltIn FragDepth` |
+| `SV_DispatchThreadID` | `BuiltIn GlobalInvocationId` |
+| `SV_DomainLocation` | `BuiltIn TessCoord` |
+| `SV_GSInstanceID` | `BuiltIn InvocationId` |
+| `SV_GroupID` | `BuiltIn WorkgroupId` |
+| `SV_GroupIndex` | `BuiltIn LocalInvocationIndex` |
+| `SV_GroupThreadID` | `BuiltIn LocalInvocationId` |
+| `SV_InnerCoverage` | `BuiltIn FullyCoveredEXT` |
+| `SV_InsideTessFactor` | `BuiltIn TessLevelInner` |
+| `SV_InstanceID` | `BuiltIn InstanceIndex` |
+| `SV_IntersectionAttributes` | *Not supported* |
+| `SV_IsFrontFace` | `BuiltIn FrontFacing` |
+| `SV_OutputControlPointID` | `BuiltIn InvocationId` |
+| `SV_PointSize<sup>note</sup>` | `BuiltIn PointSize` |
+| `SV_Position` | `BuiltIn Position/FragCoord` |
+| `SV_PrimitiveID` | `BuiltIn PrimitiveId` |
+| `SV_RenderTargetArrayIndex` | `BuiltIn Layer` |
+| `SV_SampleIndex` | `BuiltIn SampleId` |
+| `SV_ShadingRate` | `BuiltIn PrimitiveShadingRateKHR` |
+| `SV_StartVertexLocation` | `*Not supported* |
+| `SV_StartInstanceLocation` | `*Not suported* |
+| `SV_StencilRef` | `BuiltIn FragStencilRefEXT` |
+| `SV_Target<N>` | `Location` |
+| `SV_TessFactor` | `BuiltIn TessLevelOuter` |
+| `SV_VertexID` | `BuiltIn VertexIndex` |
+| `SV_ViewID` | `BuiltIn ViewIndex` |
+| `SV_ViewportArrayIndex` | `BuiltIn ViewportIndex` |
*Note* that `SV_PointSize` is a unique keyword that HLSL doesn't have.
@@ -113,7 +113,7 @@ Slang ignores the keywords above and all of them are treated as `highp`.
Supported atomic types for each target
--------------------------------------
-Shader Model 6.2 introduced [16-bit scalar types](https://github.com/microsoft/DirectXShaderCompiler/wiki/16-Bit-Scalar-Types) such as float16 and int16_t, but they didn't come with any atomic operations.
+Shader Model 6.2 introduced [16-bit scalar types](https://github.com/microsoft/DirectXShaderCompiler/wiki/16-Bit-Scalar-Types) such as `float16` and `int16_t`, but they didn't come with any atomic operations.
Shader Model 6.6 introduced [atomic operations for 64-bit integer types and bitwise atomic operations for 32-bit float type](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Int64_and_Float_Atomics.html), but 16-bit integer types and 16-bit float types are not a part of it.
[GLSL 4.3](https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.30.pdf) introduced atomic operations for 32-bit integer types.