[clang] [llvm] [HLSL] Add support for SV_StartVertexLocation (PR #235831)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 09:59:16 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/Sema/SemaHLSL.cpp llvm/lib/Frontend/HLSL/SemanticSignatures.cpp llvm/lib/Target/DirectX/DXILShaderFlags.cpp llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp b/llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp
index d31187017..80e1e9519 100644
--- a/llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp
+++ b/llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp
@@ -59,16 +59,23 @@ constexpr Triple::EnvironmentType AllStages[] = {
     Triple::Amplification, Triple::Mesh,  Triple::Library};
 
 // The semantic kinds getAvailableStages knows about.
-constexpr SemanticKind SupportedKinds[] = {
-    SemanticKind::Arbitrary,        SemanticKind::Position,
-    SemanticKind::VertexID,         SemanticKind::Target,
-    SemanticKind::IsFrontFace,      SemanticKind::ClipDistance,
-    SemanticKind::CullDistance,     SemanticKind::TessFactor,
-    SemanticKind::InsideTessFactor, SemanticKind::DispatchThreadID,
-    SemanticKind::GroupID,          SemanticKind::GroupIndex,
-    SemanticKind::GroupThreadID,    SemanticKind::InstanceID,
-    SemanticKind::ShadingRate,      SemanticKind::Barycentrics,
-    SemanticKind::StartVertexLocation};
+constexpr SemanticKind SupportedKinds[] = {SemanticKind::Arbitrary,
+                                           SemanticKind::Position,
+                                           SemanticKind::VertexID,
+                                           SemanticKind::Target,
+                                           SemanticKind::IsFrontFace,
+                                           SemanticKind::ClipDistance,
+                                           SemanticKind::CullDistance,
+                                           SemanticKind::TessFactor,
+                                           SemanticKind::InsideTessFactor,
+                                           SemanticKind::DispatchThreadID,
+                                           SemanticKind::GroupID,
+                                           SemanticKind::GroupIndex,
+                                           SemanticKind::GroupThreadID,
+                                           SemanticKind::InstanceID,
+                                           SemanticKind::ShadingRate,
+                                           SemanticKind::Barycentrics,
+                                           SemanticKind::StartVertexLocation};
 
 // Ensure all stages return a valid SemanticInterpretation
 TEST(HLSLSemanticStagesTest, StagesAreValid) {

``````````

</details>


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


More information about the cfe-commits mailing list