summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/capability/var-capability-incompatible.slang
blob: 89378f6b3332423d162cddba87b47fa0c47f2e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//TEST:SIMPLE(filecheck=CHECK):-target spirv
[require(hlsl)]
struct MyType
{}

//CHECK: ([[# @LINE+2]]): error 36107
[numthreads(1,1,1)]
void f1()
{
    MyType t;  // compile to spirv should result error here.
}

ConstantBuffer<MyType> t2;
//CHECK: ([[# @LINE+2]]): error 36107
[numthreads(1,1,1)]
void f2()  // compile to spirv should result error here.
{
    ConstantBuffer<MyType> t3 = t2; 
}