Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: conformance/ogles/GL/build/CorrectParse2_vert.vert

Issue 41993002: Add ToT WebGL conformance tests : part 9 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 /*
3 ** Copyright (c) 2012 The Khronos Group Inc.
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining a
6 ** copy of this software and/or associated documentation files (the
7 ** "Materials"), to deal in the Materials without restriction, including
8 ** without limitation the rights to use, copy, modify, merge, publish,
9 ** distribute, sublicense, and/or sell copies of the Materials, and to
10 ** permit persons to whom the Materials are furnished to do so, subject to
11 ** the following conditions:
12 **
13 ** The above copyright notice and this permission notice shall be included
14 ** in all copies or substantial portions of the Materials.
15 **
16 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23 */
24
25
26 const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
27 const bool BoolConst1 = true && true || false;
28 const bool BoolConst2 = false || !false && false;
29
30 void main (void)
31 {
32 float float1 = 4.0, float2 = floatConst2;
33 int int_1 = int(FloatConst1);
34 vec4 vec4_1;
35 vec3 vec3_1 = vec3(1, 1, 1);
36 vec3 vec3_2 = vec3(0, 0, 0);
37 // unsigned int unsigned_int_1;
38 bool bool4, bool5;
39
40 bool4 = bool5;
41 //float1 = bool5;
42 //bool5 = float1;
43
44 bool4 = 4 > 5;
45 bool4 = !(3.2 != 0.0);
46 bool4 = bool(float1);
47 bool4 = bool(int_1);
48 float1 = float(bool4);
49 float1 = float(int_1);
50 int_1 = int(float1);
51 int_1 = int(bool4);
52
53 {
54 int a, b, c;
55
56 a = b;
57 b = c;
58 {
59 int b, c, d;
60
61 b = c;
62 c = d;
63 {
64 int a, d, e;
65
66 a = d;
67 d = e;
68 }
69 {
70 int a, b, c;
71 a = b;
72 b = c;
73 }
74 }
75 a = b;
76 b = c;
77 }
78
79 {
80 float f1, f2;
81 vec3 v31, v32;
82
83 max(f1, f2);
84 max(v31, v32);
85
86 vec4 v4 = vec4(3.0);
87 vec3 v3 = -vec3(2.0, 1.0, 3.0);
88 mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
89 //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
90 }
91
92 if (BoolConst1)
93 ++vec3_1;
94 else
95 --vec3_1;
96
97 if (BoolConst2)
98 ++vec3_1;
99 else
100 --vec3_1;
101
102 if (BoolConst1 || BoolConst2)
103 ++vec3_1;
104 else
105 --vec3_1;
106
107 if (BoolConst2 && BoolConst1)
108 ++vec3_1;
109 else
110 --vec3_1;
111
112 if (FloatConst1 != 0.0)
113 --int_1;
114 else
115 ++int_1;
116
117 if (0 != 0)
118 ++int_1;
119 else
120 --int_1;
121
122 bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0 .0) && (FloatConst1 != 0.0) && (float1 != 0.0);
123
124 float1 = 5 != 0 ? float1 : float(int_1);
125 float1 = BoolConst1 ? float1 : float(int_1);
126
127 if (float1 != float1)
128 ++int_1;
129 else
130 --int_1;
131
132 float1 = float1 != float1 ? float1 : float(int_1);
133
134 --int_1;
135 ++float1;
136 (vec4_1.x)--;
137 vec3_1++;
138
139 if (vec3_1.x > vec3_2.x)
140 float1 = 4.0 + 6.0;
141
142 if (bool4 ^^ bool5)
143 float1 *= 2.4;
144
145 if (false ^^ false)
146 float1 *= 2.5;
147
148 if (true ^^ false)
149 float1 *= 2.6;
150
151 {
152 int i;
153 }
154
155 if (bool4) {
156 int i;
157 } else {
158 int i;
159 i = 5;
160 }
161
162 mat4 m1;
163 m1[2][1] = 4.0;
164
165 gl_Position = vec4(float1+float1, float1, float1, float(int_1));
166 }
OLDNEW
« no previous file with comments | « conformance/ogles/GL/build/CorrectParse2_frag.frag ('k') | conformance/ogles/GL/build/CorrectParseTest1_frag.frag » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698