blob: 4bd76b80014aff24581195501b990fedfd4fd487 (
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
32
33
34
35
36
37
38
|
//DISABLED_TEST(compute):COMPARE_COMPUTE: -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
//TEST_INPUT:type AssocImpl
RWStructuredBuffer<float> outputBuffer;
interface IBase
{
float getVal();
};
interface IAssoc
{
associatedtype TBase : IBase;
};
struct BaseImpl : IBase
{
float getVal() { return 1.0; }
};
struct AssocImpl : IAssoc
{
typedef BaseImpl TBase;
};
[numthreads(4, 1, 1)]
void computeMain<T:IAssoc>(
uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
T.TBase base;
float rs = base.getVal();
outputBuffer[tid] = rs;
}
|