blob: f2ed52d0ca121aae76a3d03a18225faedc36dd99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// anyvalue-size-validation.slang
//DIAGNOSTIC_TEST:SIMPLE:-target cpp -stage compute -entry main -disable-specialization
[anyValueSize(8)]
interface IInterface
{
int doSomething();
};
struct S : IInterface
{
uint a;
uint b;
uint c;
int doSomething() { return 5; }
};
T test<T:IInterface>(T s)
{
return s;
}
RWStructuredBuffer<uint> output;
[numthreads(4, 1, 1)]
void main()
{
S s = S();
output[0] = test(s).a;
}
|