blob: 301ef10211689f02addc48d532ce6d420a377370 (
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
|
//TEST(smoke,compute):COMPARE_COMPUTE:-xslang -use-ir
//TEST_INPUT:ubuffer(data=[0], stride=4):dxbinding(0),glbinding(0),out
//TEST_INPUT:type Impl
RWStructuredBuffer<float> outputBuffer;
interface IBase
{
float compute();
}
struct Impl : IBase
{
float compute()
{
return 1.0;
}
};
__generic_param TImpl : IBase;
TImpl impl;
[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
float outVal = impl.compute();
outputBuffer[tid] = outVal;
}
|