Backed out changeset 8fc3326bce7f (bug 1943032) for causing failures at browser_tab_g...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / attribs / gl-bindAttribLocation-aliasing-inactive.html
blobabbbc43d6ae0d0b15186e3abcad5799e45014978
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 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
11 <script src="../../js/js-test-pre.js"></script>
12 <script src="../../js/webgl-test-utils.js"></script>
13 <script src="../../js/tests/gl-bindattriblocation-aliasing.js"></script>
14 <title>bindAttribLocation with aliasing - inactive attributes</title>
15 </head>
16 <body>
17 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
20 <script id="vertexShaderStaticallyUsedButInactive" type="text/something-not-javascript">#version 300 es
21 precision mediump float;
22 in $(type_1) a_1;
23 in $(type_2) a_2;
24 void main() {
25 gl_Position = true ? $(gl_Position_1) : $(gl_Position_2);
27 </script>
28 <script id="vertexShaderUnused" type="text/something-not-javascript">#version 300 es
29 precision mediump float;
30 in $(type_1) a_1;
31 in $(type_2) a_2;
32 void main() {
33 gl_Position = vec4(0.0);
35 </script>
36 <script>
37 "use strict";
38 description("This test verifies combinations of valid inactive attributes cannot be bound to the same location with bindAttribLocation. GLSL ES 3.00.6 section 12.46.");
39 var wtu = WebGLTestUtils;
40 var canvas = document.getElementById("canvas");
41 var gl = wtu.create3DContext(canvas, {antialias: false}, 2);
42 var glFragmentShader = wtu.loadShader(gl, wtu.simpleColorFragmentShaderESSL300, gl.FRAGMENT_SHADER);
44 debug("Testing with shader that has statically used but inactive attributes.");
45 runBindAttribLocationAliasingTest(wtu, gl, glFragmentShader, wtu.getScript('vertexShaderStaticallyUsedButInactive'));
47 debug("");
48 debug("Testing with shader that has entirely unused attributes.");
49 runBindAttribLocationAliasingTest(wtu, gl, glFragmentShader, wtu.getScript('vertexShaderUnused'));
51 var successfullyParsed = true;
52 </script>
53 <script src="../../js/js-test-post.js"></script>
54 </body>
55 </html>