[clang] [HLSL][SPIR-V] Handle SV_Postion builtin in PS (PR #141759)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 6 10:26:13 PDT 2025


================
@@ -8472,6 +8472,20 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo
   }];
 }
 
+def HLSLSV_PositionDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+The ``SV_Position`` semantic, when applied to an input parameter in a pixel
+shader, contains the location of the pixel center (x, y) in screen space.
+This semantic can be applied to the parameter, or a field in a struct used
+as input parameter.
+This attribute is supported as input in pixel, hull, domain and mesh shaders.
+This attribute is supported as output in vertex, geometry and domain shaders.
----------------
farzonl wrote:

```suggestion
This attribute is supported as an input in pixel, hull, domain and mesh shaders.
This attribute is supported as an output in vertex, geometry and domain shaders.
```

https://github.com/llvm/llvm-project/pull/141759


More information about the cfe-commits mailing list