Merge pull request #2976 from jeremy-lunarg/hayes-fix-2975
[platform/upstream/glslang.git] / Test / findFunction.frag
1 #version 450
2
3 #extension GL_EXT_shader_explicit_arithmetic_types: enable
4
5 int64_t func(int8_t a, int16_t b, int16_t c)
6 {
7     return int64_t(a | b + c);
8 }
9
10 int64_t func(int8_t a, int16_t b, int32_t c)
11 {
12     return int64_t(a | b - c);
13 }
14
15 int64_t func(int32_t a, int32_t b, int32_t c)
16 {
17     return int64_t(a / b + c);
18 }
19
20 int64_t func(float16_t a, float16_t b, float32_t c)
21 {
22     return int64_t(a - b * c);
23 }
24
25 int64_t func(float16_t a, int16_t b, float32_t c)
26 {
27     return int64_t(a - b * c);
28 }
29
30 void main()
31 {
32     int8_t  x;
33     int16_t y;
34     int32_t z;
35     int64_t w;
36     float16_t f16;
37     float64_t f64;
38     int64_t b1 = func(x, y, z);
39     int64_t b2 = func(y, y, z); // tie
40     int64_t b3 = func(y, y, w); // No match
41     int64_t b4 = func(y, z, f16); // No match
42     int64_t b5 = func(y, y, f16);
43     int64_t b7 = func(f16, f16, y);
44     int64_t b8 = func(f16, f16, f64); // No match
45     int64_t b9 = func(f16, x, f16); // tie
46 }