1#version 450
2
3#extension GL_EXT_shader_explicit_arithmetic_types : require
4
5const bool bool_init = true;
6const int8_t int8_t_init = int8_t(-1);
7const int16_t int16_t_init = int16_t(-2);
8const int32_t int32_t_init = int32_t(-3);
9const int64_t int64_t_init = int64_t(-4);
10const uint8_t uint8_t_init = uint8_t(1);
11const uint16_t uint16_t_init = uint16_t(2);
12const uint32_t uint32_t_init = uint32_t(3);
13const uint64_t uint64_t_init = uint64_t(4);
14const float16_t float16_t_init = float16_t(42.0);
15const float32_t float32_t_init = float32_t(13.0);
16const float64_t float64_t_init = float64_t(-4.0);
17
18#define TYPE_TO_TYPE(x, y) \
19    const x y##_to_##x = x(y##_init)
20
21#define TYPE_TO(x)              \
22    TYPE_TO_TYPE(x, bool);      \
23    TYPE_TO_TYPE(x, int8_t);    \
24    TYPE_TO_TYPE(x, int16_t);   \
25    TYPE_TO_TYPE(x, int32_t);   \
26    TYPE_TO_TYPE(x, int64_t);   \
27    TYPE_TO_TYPE(x, uint8_t);   \
28    TYPE_TO_TYPE(x, uint16_t);  \
29    TYPE_TO_TYPE(x, uint32_t);  \
30    TYPE_TO_TYPE(x, uint64_t);  \
31    TYPE_TO_TYPE(x, float16_t); \
32    TYPE_TO_TYPE(x, float32_t); \
33    TYPE_TO_TYPE(x, float64_t)
34
35TYPE_TO(bool);
36TYPE_TO(int8_t);
37TYPE_TO(int16_t);
38TYPE_TO(int32_t);
39TYPE_TO(int64_t);
40TYPE_TO(uint8_t);
41TYPE_TO(uint16_t);
42TYPE_TO(uint32_t);
43TYPE_TO(uint64_t);
44TYPE_TO(float16_t);
45TYPE_TO(float32_t);
46TYPE_TO(float64_t);
47
48void main() {}
49