Bug 1918529 - fix some subpixel misalignment issues with gfx.webrender.svg-filter...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / glsl / misc / shader-with-illegal-default-precision.frag.html
blob04902c50db1b19f4d7e89d373f78b1320a393691
1 <!--
2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
5 -->
7 <!DOCTYPE html>
8 <html>
9 <head>
10 <meta charset="utf-8">
11 <title>WebGL GLSL Conformance Tests</title>
12 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
13 <link rel="stylesheet" href="../../../resources/glsl-feature-tests.css"/>
14 <script src="../../../js/js-test-pre.js"></script>
15 <script src="../../../js/webgl-test-utils.js"></script>
16 <script src="../../../js/glsl-conformance-test.js"></script>
17 </head>
18 <body>
19 <div id="description"></div>
20 <div id="console"></div>
21 <script id="fragmentShaderVoid" type="text/something-not-javascript">
22 // fragment shader with default precision for illegal type should fail
23 precision mediump void;
24 void main()
26 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
27 gl_FragColor = color;
29 </script>
30 <script id="fragmentShaderBool" type="text/something-not-javascript">
31 // fragment shader with default precision for illegal type should fail
32 precision mediump bool;
33 void main()
35 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
36 gl_FragColor = color;
38 </script>
39 <script id="fragmentShaderVec2" type="text/something-not-javascript">
40 // fragment shader with default precision for illegal type should fail
41 precision mediump vec2;
42 void main()
44 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
45 gl_FragColor = color;
47 </script>
48 <script id="fragmentShaderVec3" type="text/something-not-javascript">
49 // fragment shader with default precision for illegal type should fail
50 precision mediump vec3;
51 void main()
53 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
54 gl_FragColor = color;
56 </script>
57 <script id="fragmentShaderVec4" type="text/something-not-javascript">
58 // fragment shader with default precision for illegal type should fail
59 precision mediump vec4;
60 void main()
62 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
63 gl_FragColor = color;
65 </script>
66 <script id="fragmentShaderBvec2" type="text/something-not-javascript">
67 // fragment shader with default precision for illegal type should fail
68 precision mediump bvec2;
69 void main()
71 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
72 gl_FragColor = color;
74 </script>
75 <script id="fragmentShaderBvec3" type="text/something-not-javascript">
76 // fragment shader with default precision for illegal type should fail
77 precision mediump bvec3;
78 void main()
80 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
81 gl_FragColor = color;
83 </script>
84 <script id="fragmentShaderBvec4" type="text/something-not-javascript">
85 // fragment shader with default precision for illegal type should fail
86 precision mediump bvec4;
87 void main()
89 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
90 gl_FragColor = color;
92 </script>
93 <script id="fragmentShaderIvec2" type="text/something-not-javascript">
94 // fragment shader with default precision for illegal type should fail
95 precision mediump ivec2;
96 void main()
98 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
99 gl_FragColor = color;
101 </script>
102 <script id="fragmentShaderIvec3" type="text/something-not-javascript">
103 // fragment shader with default precision for illegal type should fail
104 precision mediump ivec3;
105 void main()
107 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
108 gl_FragColor = color;
110 </script>
111 <script id="fragmentShaderIvec4" type="text/something-not-javascript">
112 // fragment shader with default precision for illegal type should fail
113 precision mediump ivec4;
114 void main()
116 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
117 gl_FragColor = color;
119 </script>
120 <script id="fragmentShaderMat2" type="text/something-not-javascript">
121 // fragment shader with default precision for illegal type should fail
122 precision mediump mat2;
123 void main()
125 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
126 gl_FragColor = color;
128 </script>
129 <script id="fragmentShaderMat3" type="text/something-not-javascript">
130 // fragment shader with default precision for illegal type should fail
131 precision mediump mat3;
132 void main()
134 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
135 gl_FragColor = color;
137 </script>
138 <script id="fragmentShaderMat4" type="text/something-not-javascript">
139 // fragment shader with default precision for illegal type should fail
140 precision mediump mat4;
141 void main()
143 mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
144 gl_FragColor = color;
146 </script>
147 <script>
148 "use strict";
149 GLSLConformanceTester.runTests([
151 fShaderId: 'fragmentShaderVoid',
152 fShaderSuccess: false,
153 linkSuccess: false,
154 passMsg: 'shader with default precision for void should fail'
157 fShaderId: 'fragmentShaderBool',
158 fShaderSuccess: false,
159 linkSuccess: false,
160 passMsg: 'shader with default precision for bool should fail'
163 fShaderId: 'fragmentShaderVec2',
164 fShaderSuccess: false,
165 linkSuccess: false,
166 passMsg: 'shader with default precision for vec2 should fail'
169 fShaderId: 'fragmentShaderVec3',
170 fShaderSuccess: false,
171 linkSuccess: false,
172 passMsg: 'shader with default precision for vec3 should fail'
175 fShaderId: 'fragmentShaderVec4',
176 fShaderSuccess: false,
177 linkSuccess: false,
178 passMsg: 'shader with default precision for vec4 should fail'
181 fShaderId: 'fragmentShaderBvec2',
182 fShaderSuccess: false,
183 linkSuccess: false,
184 passMsg: 'shader with default precision for bvec2 should fail'
187 fShaderId: 'fragmentShaderBvec3',
188 fShaderSuccess: false,
189 linkSuccess: false,
190 passMsg: 'shader with default precision for bvec3 should fail'
193 fShaderId: 'fragmentShaderBvec4',
194 fShaderSuccess: false,
195 linkSuccess: false,
196 passMsg: 'shader with default precision for bvec4 should fail'
199 fShaderId: 'fragmentShaderIvec2',
200 fShaderSuccess: false,
201 linkSuccess: false,
202 passMsg: 'shader with default precision for ivec2 should fail'
205 fShaderId: 'fragmentShaderIvec3',
206 fShaderSuccess: false,
207 linkSuccess: false,
208 passMsg: 'shader with default precision for ivec3 should fail'
211 fShaderId: 'fragmentShaderIvec4',
212 fShaderSuccess: false,
213 linkSuccess: false,
214 passMsg: 'shader with default precision for ivec4 should fail'
217 fShaderId: 'fragmentShaderMat2',
218 fShaderSuccess: false,
219 linkSuccess: false,
220 passMsg: 'shader with default precision for mat2 should fail'
223 fShaderId: 'fragmentShaderMat3',
224 fShaderSuccess: false,
225 linkSuccess: false,
226 passMsg: 'shader with default precision for mat3 should fail'
229 fShaderId: 'fragmentShaderMat4',
230 fShaderSuccess: false,
231 linkSuccess: false,
232 passMsg: 'shader with default precision for mat4 should fail'
235 var successfullyParsed = true;
236 </script>
237 </body>
238 </html>