[all-commits] [llvm/llvm-project] edbecc: [HLSL] Implement the SV_InstanceID semantic (#221091)
Jonathan Zakharov via All-commits
all-commits at lists.llvm.org
Wed Sep 23 12:04:13 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: edbeccc7c205ccd4e6ea37a01eb63740d065f145
https://github.com/llvm/llvm-project/commit/edbeccc7c205ccd4e6ea37a01eb63740d065f145
Author: Jonathan Zakharov <jzakharov at nvidia.com>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M clang/lib/CodeGen/CGHLSLRuntime.cpp
M clang/lib/Sema/SemaHLSL.cpp
A clang/test/CodeGenHLSL/semantics/SV_InstanceID.vs.hlsl
A clang/test/SemaHLSL/Semantics/instanceid.output.hlsl
A clang/test/SemaHLSL/Semantics/instanceid.ps.hlsl
A clang/test/SemaHLSL/Semantics/instanceid.vs.hlsl
M llvm/lib/Frontend/HLSL/SemanticSignatures.cpp
M llvm/unittests/Frontend/HLSLSemanticStagesTest.cpp
Log Message:
-----------
[HLSL] Implement the SV_InstanceID semantic (#221091)
Fixes #212572
Adds type validation, stage restriction, and lowering for
`SV_InstanceID`.
- Type check rejects non-uint; DXIL accepts U32/U16, SPIR-V accepts U32
only (VUID-InstanceIndex-InstanceIndex-04265).
- Rejected all sigpoints but Vertex In.
- On SPIR-V, the variable is decorated with `BuiltIn InstanceIndex`
instead of a user-assigned Location.
- SPIR-V lowering loads from the `InstanceIndex` (ID 43) built-in; DXIL
lowering uses `dx.op.loadInput`.
- LIT tests for sema (wrong type, wrong stage, output direction) and
codegen (BuiltIn decoration, no Location).
@dnovillo @pow2clk
Assisted-by: LLM
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list