aboutsummaryrefslogtreecommitdiff
path: root/tests/glslparsertest/shaders/CorrectParse2.vert
blob: aa937cfb389e9af92b3433c960f4349ac087dd36 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// [config]
// expect_result: pass
// glsl_version: 1.10
// glsles_version: 1.00
//
// # NOTE: Config section was auto-generated from file
// # NOTE: 'glslparser.tests' at git revision
// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
// [end config]

const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
const bool BoolConst1 = true && true || false;
const bool BoolConst2 = false || !false && false;

void main (void)
{
    float float1 = 4.0, float2 = floatConst2;
    int int_1 = int(FloatConst1);
    vec4 vec4_1;
    vec3 vec3_1, vec3_2;
//  unsigned int unsigned_int_1;
    bool bool4, bool5;

    bool4 = bool5;
    //float1 = bool5;
    //bool5 = float1;

    bool4 = 4 > 5;
    bool4 = !(3.2 != 0.0);
    bool4 = bool(float1);
    bool4 = bool(int_1);
    float1 = float(bool4);
    float1 = float(int_1);
    int_1 = int(float1);
    int_1 = int(bool4); 

    {
        int a, b, c;
        
        a = b;
        b = c;
        {
            int b, c, d;

            b = c;
            c = d;
            {
                int a, d, e;
                
                a = d;
                d = e;
            }
            {
                int a, b, c;
                a = b;
                b = c;
            }
        }
        a = b;
        b = c;
    }

    {
        float f1, f2;
        vec3 v31, v32;

        max(f1, f2);
        max(v31, v32);

        vec4 v4 = vec4(3.0);
        vec3 v3 = -vec3(2.0, 1.0, 3.0);
        mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
        //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
    }

    if (BoolConst1)
        ++vec3_1;
    else
        --vec3_1;

    if (BoolConst2)
        ++vec3_1;
    else
        --vec3_1;

    if (BoolConst1 || BoolConst2)
        ++vec3_1;
    else
        --vec3_1;

    if (BoolConst2 && BoolConst1)
        ++vec3_1;
    else
        --vec3_1;

    if (FloatConst1 != 0.0)
        --int_1;
    else
        ++int_1;

    if (0 != 0)
        ++int_1;
    else
        --int_1;

    bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1  && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (float1 != 0.0);
    
    float1 = 5 != 0 ? float1 : float(int_1);
    float1 = BoolConst1 ? float1 : float(int_1);

    if (float1 != float1)
        ++int_1;
    else
        --int_1;

    float1 = float1 != float1 ? float1 : float(int_1);

    --int_1;
    ++float1;
    (vec4_1.x)--;
    vec3_1++;

    if (vec3_1.x > vec3_2.x)
        float1 = 4.0 + 6.0;

    if (bool4 ^^ bool5)
        float1 *= 2.4;

    if (false ^^ false)
        float1 *= 2.5;

    if (true ^^ false)
        float1 *= 2.6;

    {
        int i;
    }

    if (bool4) {
        int i;
    } else {
        int i;
        i = 5;
    }

    mat4 m1;
    m1[2][1] = 4.0;

    gl_Position = vec4(float1+float1, float1, float1, float(int_1));
}