[clang] [llvm] [HLSL] Implement SV_GroupThreadId semantic (PR #117781)
Zhengxing li via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 14:55:20 PST 2024
================
@@ -2851,7 +2851,21 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
.constrainAllUses(TII, TRI, RBI);
break;
case Intrinsic::spv_thread_id:
- return selectSpvThreadId(ResVReg, ResType, I);
+ // The HLSL SV_DispatchThreadID semantic is lowered to llvm.spv.thread.id
+ // intrinsic in LLVM IR for SPIR-V backend.
+ //
+ // In SPIR-V backend, llvm.spv.thread.id is now correctly translated to a
+ // `GlobalInvocationId` builtin variable
----------------
lizhengxing wrote:
@tex3d Those comments are based on the original comments in `selectSpvThreadId` function with minimal changes. They were added by @sudonatalie.
If there's no objections from other reviewers, I think it's fine to keep those comments here.
https://github.com/llvm/llvm-project/pull/117781
More information about the llvm-commits
mailing list