blob: 6c33b72a9be56832ff634197dde60f48b0308408 (
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
|
// 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;
}
[numthreads(4, 1, 1)]
void main()
{
S s;
test(s);
}
|