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

Side by Side Diff: conformance/ogles/GL/build/CorrectParse2_frag.frag

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 #ifdef GL_ES
27 precision mediump float;
28 #endif
29 const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
30 const bool BoolConst1 = true && true || false;
31 const bool BoolConst2 = false || !false && false;
32
33 void main (void)
34 {
35 float float1 = 4.0, float2 = floatConst2;
36 int int_1 = int(FloatConst1);
37 vec4 vec4_1;
38 vec3 vec3_1;
39 // unsigned int unsigned_int_1;
40 bool bool4, bool5;
41
42 bool4 = bool5;
43 //float1 = bool5;
44 //bool5 = float1;
45
46 bool4 = 4.0 > 5.0;
47 bool4 = !(3.2 != 0.0);
48 bool4 = bool(float1);
49 bool4 = bool(int_1);
50 float1 = float(bool4);
51 float1 = float(int_1);
52 int_1 = int(float1);
53 int_1 = int(bool4);
54
55 {
56 int a, b, c;
57
58 a = b;
59 b = c;
60 {
61 int b, c, d;
62
63 b = c;
64 c = d;
65 {
66 int a, d, e;
67
68 a = d;
69 d = e;
70 }
71 {
72 int a, b, c;
73 a = b;
74 b = c;
75 }
76 }
77 a = b;
78 b = c;
79 }
80
81 {
82 float f1, f2;
83 vec3 v31, v32;
84
85 max(f1, f2);
86 max(v31, v32);
87
88 vec4 v4 = vec4(3.0);
89 vec3 v3 = -vec3(2.0, 1.0, 3.0);
90 mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
91 //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
92 }
93
94 if (BoolConst1)
95 ++vec3_1;
96 else
97 --vec3_1;
98
99 if (BoolConst2)
100 ++vec3_1;
101 else
102 --vec3_1;
103
104 if (BoolConst1 || BoolConst2)
105 ++vec3_1;
106 else
107 --vec3_1;
108
109 if (BoolConst2 && BoolConst1)
110 ++vec3_1;
111 else
112 --vec3_1;
113
114 if (FloatConst1 != 0.0)
115 --int_1;
116 else
117 ++int_1;
118
119 if (0 != 0)
120 ++int_1;
121 else
122 --int_1;
123
124 bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0 .0) && (FloatConst1 != 0.0) && (float1 != 0.0);
125
126 float1 = 5 != 0 ? float1 : float(int_1);
127 float1 = 0 != 0 ? float1 : float(int_1);
128
129 if (float1 != float1)
130 ++int_1;
131 else
132 --int_1;
133
134 float1 = float1 != float1 ? float1 : float(int_1);
135
136 --int_1;
137 ++float1;
138 (vec4_1.x)--;
139 vec3_1++;
140
141 if (int_1 != 4)
142 discard;
143
144 float1 = 4.0 + 6.0;
145 int ii,jj,kk;
146 float ff;
147 ii = jj, kk, ff;
148
149 vec4_1 = vec4_1 + 2.0;
150 ivec4 iv;
151 iv = iv + 2;
152 gl_FragColor = vec4(float1+float1, float1, float1, float(int_1));
153 }
OLDNEW
« no previous file with comments | « conformance/ogles/GL/build/CorrectParse1_frag.frag ('k') | conformance/ogles/GL/build/CorrectParse2_vert.vert » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698