@@ -2,15 +2,18 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-mesh -hlsl-entry CSMain -x
hlsl -finclude-default-header -verify -o - %s
[numthreads(8,8,1)]
-// expected-error@+3 {{attribute 'SV_GroupIndex' is unsupported in 'mesh'
shaders, requires compute}}
-// expect
@@ -2,15 +2,18 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-mesh -hlsl-entry CSMain -x
hlsl -finclude-default-header -verify -o - %s
[numthreads(8,8,1)]
-// expected-error@+3 {{attribute 'SV_GroupIndex' is unsupported in 'mesh'
shaders, requires compute}}
-// expect
@@ -2,15 +2,18 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-mesh -hlsl-entry CSMain -x
hlsl -finclude-default-header -verify -o - %s
[numthreads(8,8,1)]
-// expected-error@+3 {{attribute 'SV_GroupIndex' is unsupported in 'mesh'
shaders, requires compute}}
-// expect
@@ -49,3 +49,28 @@ void CSMain3_GID(uint3 : SV_GroupID) {
// CHECK-NEXT: ParmVarDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:24 'uint3'
// CHECK-NEXT: HLSLSV_GroupIDAttr
}
+
+[numthreads(8,8,1)]
+void CSMain_GThreadID(uint ID : SV_GroupThreadID) {
+// CHECK: FunctionDecl 0x{{[0-9a-fA-F
lizhengxing wrote:
> Do we need to consider how spirv handles this? Otherwise, LGTM
This PR is similar to the one for SV_GroupID. We don't consider the spirv part
for both PRs.
https://github.com/llvm/llvm-project/pull/117781
___
cfe-commits mailing
@@ -49,3 +49,28 @@ void CSMain3_GID(uint3 : SV_GroupID) {
// CHECK-NEXT: ParmVarDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:24 'uint3'
// CHECK-NEXT: HLSLSV_GroupIDAttr
}
+
+[numthreads(8,8,1)]
+void CSMain_GThreadID(uint ID : SV_GroupThreadID) {
+// CHECK: FunctionDecl 0x{{[0-9a-fA-F
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/117781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/inbelic commented:
Do we need to consider how spirv handles this? Otherwise, LGTM
https://github.com/llvm/llvm-project/pull/117781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -49,3 +49,28 @@ void CSMain3_GID(uint3 : SV_GroupID) {
// CHECK-NEXT: ParmVarDecl 0x{{[0-9a-fA-F]+}} <{{.*}}> col:24 'uint3'
// CHECK-NEXT: HLSLSV_GroupIDAttr
}
+
+[numthreads(8,8,1)]
+void CSMain_GThreadID(uint ID : SV_GroupThreadID) {
+// CHECK: FunctionDecl 0x{{[0-9a-fA-F
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Zhengxing li (lizhengxing)
Changes
Support SV_GroupThreadId attribute.
Translate it into dx.thread.id.in.group in clang codeGen.
Fixes: #70122
---
Full diff: https://github.com/llvm/llvm-project/pull/117781.diff
11 Files Affected:
- (m
https://github.com/lizhengxing ready_for_review
https://github.com/llvm/llvm-project/pull/117781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lizhengxing created
https://github.com/llvm/llvm-project/pull/117781
Support SV_GroupThreadId attribute.
Translate it into dx.thread.id.in.group in clang codeGen.
Fixes: #70122
>From 9d5ffe00f2a1093ca2c28cce184cad0324f53de2 Mon Sep 17 00:00:00 2001
From: Zhengxing Li
Date:
12 matches
Mail list logo