blob: c9ea26161e5c14c9262e90c6c7501b8c201d6b32 (
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
|
//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -output-using-type
//TEST_INPUT: set outputBuffer = out ubuffer(data=[0 0], stride=4)
RWStructuredBuffer<int> outputBuffer;
struct X<B, each T, each U>
{
int getTSize() { return countof(T); }
int getUSize() { return countof(U); }
}
func foo<each T, each U>() -> X<bool, expand Ptr<each T>, int, expand Ptr<each U>, float> // unify
{
return {};
}
[numthreads(1,1,1)]
void computeMain()
{
let x = foo<int, float>();
outputBuffer[0] = x.getTSize();
outputBuffer[1] = x.getUSize();
// CHECK-COUNT-2: 2
}
|