blob: 358c3facd1682da139a3f3ea0d94cbe007f8f976 (
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
39
40
41
42
|
// Test that multiple functions from different extensions are properly linked.
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj
interface IValuable
{
int getValue();
};
__generic <Int : __BuiltinIntegerType>
extension Int : IValuable
{
int getValue()
{
return 0;
}
};
__generic <Float : __BuiltinFloatingPointType>
extension Float : IValuable
{
int getValue()
{
return 1;
}
};
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<int> outputBuffer;
[shader("compute")]
[numthreads(1, 1, 1)]
void computeMain()
{
uint i = 0;
float f = float(i) / float(10);
// CHECK: 0
outputBuffer[0] = i.getValue();
// CHECK: 1
outputBuffer[1] = f.getValue();
}
|