[clang] [llvm] [HLSL][SPIR-V] Implements SV_Position for VS/PS I/O (PR #168735)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 06:56:31 PST 2025


================
@@ -961,11 +967,14 @@ void SemaHLSL::checkSemanticAnnotation(
   }
 
   if (SemanticName == "SV_POSITION") {
-    // TODO(#143523): allow use on other shader types & output once the overall
-    // semantic logic is implemented.
-    if (ST == llvm::Triple::Pixel)
+    // SV_Position can is I/O for vertex shaders.
+    // For pixel shaders, only valid as input.
+    // Note: for SPIR-V, not backed by a builtin when used as input in a vertex
+    // shaders.
----------------
s-perron wrote:

Why is this note important here? I would be more important when creating the load or store.

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


More information about the llvm-commits mailing list