blob: bf18b04a6c0bcdc1bd1d187a1a818f47d8605597 (
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
|
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-d3d11 -output-using-type
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
#pragma warning(disable:30856)
public interface A<T: IFloat>
{
}
public extension<T1: IFloat, a1 : A<T1>> a1
{
void foo() {
outputBuffer[0] = 1.0;
}
}
RWStructuredBuffer<float> outputBuffer;
struct S : A<float> {
}
void helper<T: IFloat, a : A<T>>(a a2)
{
a2.foo();
}
// CHECK: 1
[numthreads(1,1,1)]
void computeMain()
{
S a;
helper(a);
}
|