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>WebGL Transform Feedback Conformance Tests
</title>
12 <link rel=
"stylesheet" href=
"../../resources/js-test-style.css"/>
13 <script src=
"../../js/js-test-pre.js"></script>
14 <script src=
"../../js/webgl-test-utils.js"></script>
17 <div id=
"description"></div>
18 <div id=
"console"></div>
19 <script id=
"vshader" type=
"x-shader/x-vertex">#version
300 es
23 gl_Position = vec4(position,
1);
26 <script id=
"fshader" type=
"x-shader/x-fragment">#version
300 es
27 precision mediump float;
36 description("Test that specifying non-existent varyings for transform feedback causes the program to fail to link. This test covers an ANGLE bug.");
38 // Spec: GLES 3.0.5 section 2.12.8:
39 // "A program will fail to link if:"
40 // "any variable name specified in the varyings array is not declared as an output in the vertex shader;"
44 var wtu
= WebGLTestUtils
;
45 var gl
= wtu
.create3DContext(undefined, undefined, 2);
48 testFailed("WebGL context does not exist");
54 function runTest(nonExistentVaryingName
) {
55 var program
= wtu
.setupTransformFeedbackProgram(gl
, ["vshader", "fshader"],
56 [nonExistentVaryingName
], gl
.INTERLEAVED_ATTRIBS
,
58 var msg
= "Program should fail to link when a nonexistent varying '" + nonExistentVaryingName
+ "' is specified for transform feedback.";
66 var successfullyParsed
= true;
68 <script src=
"../../js/js-test-post.js"></script>