|
@@ -728,105 +728,111 @@ some system-value (SV) semantic strings will be translated into SPIR-V
|
|
|
|
|
|
.. table:: Mapping from HLSL SV semantic to SPIR-V builtin and execution mode
|
|
|
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| HLSL Semantic | SigPoint | SPIR-V ``BuiltIn`` | SPIR-V Execution Mode |
|
|
|
-+=========================+=============+==========================+=======================+
|
|
|
-| | VSOut | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPIn | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPOut | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | DSCPIn | ``Position`` | N/A |
|
|
|
-| SV_Position +-------------+--------------------------+-----------------------+
|
|
|
-| | DSOut | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSVIn | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSOut | ``Position`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | PSIn | ``FragCoord`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| | VSOut | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPIn | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPOut | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | DSCPIn | ``ClipDistance`` | N/A |
|
|
|
-| SV_ClipDistance +-------------+--------------------------+-----------------------+
|
|
|
-| | DSOut | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSVIn | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSOut | ``ClipDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | PSIn | ``ClipDistance`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| | VSOut | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPIn | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | HSCPOut | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | DSCPIn | ``CullDistance`` | N/A |
|
|
|
-| SV_CullDistance +-------------+--------------------------+-----------------------+
|
|
|
-| | DSOut | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSVIn | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSOut | ``CullDistance`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | PSIn | ``CullDistance`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_VertexID | VSIn | ``VertexIndex`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_InstanceID | VSIn | ``InstanceIndex`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_Depth | PSOut | ``FragDepth`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_DepthGreaterEqual | PSOut | ``FragDepth`` | ``DepthGreater`` |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_DepthLessEqual | PSOut | ``FragDepth`` | ``DepthLess`` |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_IsFrontFace | PSIn | ``FrontFacing`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_DispatchThreadID | CSIn | ``GlobalInvocationId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_GroupID | CSIn | ``WorkgroupId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_GroupThreadID | CSIn | ``LocalInvocationId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_GroupIndex | CSIn | ``LocalInvocationIndex`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_OutputControlPointID | HSIn | ``InvocationId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_GSInstanceID | GSIn | ``InvocationId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_DomainLocation | DSIn | ``TessCoord`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| | HSIn | ``PrimitiveId`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | PCIn | ``PrimitiveId`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | DsIn | ``PrimitiveId`` | N/A |
|
|
|
-| SV_PrimitiveID +-------------+--------------------------+-----------------------+
|
|
|
-| | GSIn | ``PrimitiveId`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | GSOut | ``PrimitiveId`` | N/A |
|
|
|
-| +-------------+--------------------------+-----------------------+
|
|
|
-| | PSIn | ``PrimitiveId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| | PCOut | ``TessLevelOuter`` | N/A |
|
|
|
-| SV_TessFactor +-------------+--------------------------+-----------------------+
|
|
|
-| | DSIn | ``TessLevelOuter`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| | PCOut | ``TessLevelInner`` | N/A |
|
|
|
-| SV_InsideTessFactor +-------------+--------------------------+-----------------------+
|
|
|
-| | DSIn | ``TessLevelInner`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
-| SV_SampleIndex | PSIn | ``SampleId`` | N/A |
|
|
|
-+-------------------------+-------------+--------------------------+-----------------------+
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| HLSL Semantic | SigPoint | SPIR-V ``BuiltIn`` | SPIR-V Execution Mode |
|
|
|
++===========================+=============+==========================+=======================+
|
|
|
+| | VSOut | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPIn | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPOut | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | DSCPIn | ``Position`` | N/A |
|
|
|
+| SV_Position +-------------+--------------------------+-----------------------+
|
|
|
+| | DSOut | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSVIn | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSOut | ``Position`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | PSIn | ``FragCoord`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | VSOut | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPIn | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPOut | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | DSCPIn | ``ClipDistance`` | N/A |
|
|
|
+| SV_ClipDistance +-------------+--------------------------+-----------------------+
|
|
|
+| | DSOut | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSVIn | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSOut | ``ClipDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | PSIn | ``ClipDistance`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | VSOut | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPIn | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | HSCPOut | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | DSCPIn | ``CullDistance`` | N/A |
|
|
|
+| SV_CullDistance +-------------+--------------------------+-----------------------+
|
|
|
+| | DSOut | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSVIn | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSOut | ``CullDistance`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | PSIn | ``CullDistance`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_VertexID | VSIn | ``VertexIndex`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_InstanceID | VSIn | ``InstanceIndex`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_Depth | PSOut | ``FragDepth`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_DepthGreaterEqual | PSOut | ``FragDepth`` | ``DepthGreater`` |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_DepthLessEqual | PSOut | ``FragDepth`` | ``DepthLess`` |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_IsFrontFace | PSIn | ``FrontFacing`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_DispatchThreadID | CSIn | ``GlobalInvocationId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_GroupID | CSIn | ``WorkgroupId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_GroupThreadID | CSIn | ``LocalInvocationId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_GroupIndex | CSIn | ``LocalInvocationIndex`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_OutputControlPointID | HSIn | ``InvocationId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_GSInstanceID | GSIn | ``InvocationId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_DomainLocation | DSIn | ``TessCoord`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | HSIn | ``PrimitiveId`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | PCIn | ``PrimitiveId`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | DsIn | ``PrimitiveId`` | N/A |
|
|
|
+| SV_PrimitiveID +-------------+--------------------------+-----------------------+
|
|
|
+| | GSIn | ``PrimitiveId`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | GSOut | ``PrimitiveId`` | N/A |
|
|
|
+| +-------------+--------------------------+-----------------------+
|
|
|
+| | PSIn | ``PrimitiveId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | PCOut | ``TessLevelOuter`` | N/A |
|
|
|
+| SV_TessFactor +-------------+--------------------------+-----------------------+
|
|
|
+| | DSIn | ``TessLevelOuter`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | PCOut | ``TessLevelInner`` | N/A |
|
|
|
+| SV_InsideTessFactor +-------------+--------------------------+-----------------------+
|
|
|
+| | DSIn | ``TessLevelInner`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_SampleIndex | PSIn | ``SampleId`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| SV_StencilRef | PSOut | ``FragStencilRefEXT`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
+| | GSOut | ``Layer`` | N/A |
|
|
|
+| SV_RenderTargetArrayIndex +-------------+--------------------------+-----------------------+
|
|
|
+| | PSIn | ``Layer`` | N/A |
|
|
|
++---------------------------+-------------+--------------------------+-----------------------+
|
|
|
|
|
|
[TODO] add other SV semantic strings in the above
|
|
|
|