tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

uniform-block-layout-match.html (1403B)


      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 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     10 <meta charset="utf-8">
     11 <title>WebGL2 Uniform Block Layout Behavior Testing</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="ES3VertexShader" type="x-shader/x-vertex">#version 300 es
     22 layout(std140) uniform Block
     23 {
     24  highp vec4 val;
     25 };
     26 
     27 void main() {
     28    gl_Position = vec4(val);
     29 }
     30 </script>
     31 <script id="ES3FragmentShader" type="x-shader/x-fragment">#version 300 es
     32 uniform Block
     33 {
     34  highp vec4 val;
     35 };
     36 out highp vec4 my_FragColor;
     37 void main() {
     38    my_FragColor = vec4(val);
     39 }
     40 </script>
     41 <script type="application/javascript">
     42 "use strict";
     43 description();
     44 GLSLConformanceTester.runTests([
     45  {
     46    vShaderId: "ES3VertexShader",
     47    vShaderSuccess: true,
     48    fShaderId: "ES3FragmentShader",
     49    fShaderSuccess: true,
     50    linkSuccess: true,
     51    passMsg: "A uniform block's layout defaults to std140 if not specified."
     52  },
     53 ], 2);
     54 var successfullyParsed = true;
     55 </script>
     56 </body>
     57 </html>