Debian Codegraph @

clang/test/SemaHLSL/entry.hlsl

raw
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -hlsl-entry foo -DWITH_NUM_THREADS -ast-dump -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -hlsl-entry foo -o - %s -verify
3
4
5 // Make sure add HLSLShaderAttr along with HLSLNumThreadsAttr.
6 // CHECK:HLSLNumThreadsAttr 0x{{.*}} <line:10:2, col:18> 1 1 1
7 // CHECK:HLSLShaderAttr 0x{{.*}} <line:13:1> Implicit Compute
8
9 #ifdef WITH_NUM_THREADS
10 [numthreads(1,1,1)]
11 #endif
12 // expected-error@+1 {{missing numthreads attribute for compute shader entry}}
13 void foo() {
14
15 }