xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/vulkan.ast.vert (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1#version 450
2
3layout(constant_id = 200) const float scf1 = 1.0;
4layout(constant_id = 201) const bool scbt = true;
5layout(constant_id = 202) const int sci2 = 2;
6
7void main()
8{
9    bool(scf1);   // not a spec-const
10    bool(scbt);   // spec-const
11    bool(sci2);   // spec-const
12
13    float(scf1);   // not a spec-const
14    float(scbt);   // not a spec-const
15    float(sci2);   // not a spec-const
16
17    int(scf1);   // not a spec-const
18    int(scbt);   // spec-const
19    int(sci2);   // spec-const
20
21    scf1 * scf1;   // not a spec-const
22    scbt || scbt;  // spec-const
23    sci2 * sci2;   // spec-const
24    scf1 + sci2;   // implicit conversion not a spec-const
25
26    -scf1;     // not a spec-const
27    !scbt;     // spec-const
28    -sci2;     // spec-const
29
30    scf1 > scf1;   // not a spec-const
31    sci2 > sci2;   // spec-const
32
33    scf1 != scf1;  // not a spec-const
34    scbt != scbt;  // spec-const
35    sci2 != sci2;  // spec-const
36
37    ivec2(sci2, sci2);   // spec-const
38    ivec2[2](ivec2(sci2, sci2), ivec2(sci2, sci2)); // not a spec-const
39
40    vec2(scf1, scf1);   // spec-const
41    vec2[2](vec2(scf1, scf1), vec2(scf1, scf1)); // spec-const
42}
43