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.
10 <meta charset=
"utf-8">
11 <title>Default precision qualifiers should only work with int, float and sampler types
</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>
19 <div id=
"description"></div>
20 <div id=
"console"></div>
21 <!-- See ESSL 3.00 section 4.5.4 -->
22 <script id=
"precisionVec" type=
"x-shader/x-fragment">#version
300 es
23 precision mediump float;
24 precision mediump vec2;
25 out vec4 my_FragColor;
27 my_FragColor = vec4(
0.0,
1.0,
0.0,
1.0);
30 <script id=
"precisionVoid" type=
"x-shader/x-fragment">#version
300 es
31 precision mediump float;
32 precision mediump void;
33 out vec4 my_FragColor;
35 my_FragColor = vec4(
0.0,
1.0,
0.0,
1.0);
38 <script id=
"precisionUint" type=
"x-shader/x-fragment">#version
300 es
39 precision mediump float;
40 precision mediump uint;
41 out vec4 my_FragColor;
43 my_FragColor = vec4(
0.0,
1.0,
0.0,
1.0);
46 <script type=
"application/javascript">
49 GLSLConformanceTester.runTests([
51 fShaderId:
"precisionVec",
52 fShaderSuccess: false,
54 passMsg:
"default precision qualifier shouldn't work with vec2"
57 fShaderId:
"precisionVoid",
58 fShaderSuccess: false,
60 passMsg:
"default precision qualifier shouldn't work with void"
63 fShaderId:
"precisionUint",
64 fShaderSuccess: false,
66 passMsg:
"default precision qualifier shouldn't work with uint"