tor-browser

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

shader-with-illegal-default-precision.vert.html (6498B)


      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>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="vertexShaderVoid" type="text/something-not-javascript">
     22 // vertex shader with default precision for illegal type should fail
     23 precision mediump void;
     24 attribute vec4 vPosition;
     25 void main()
     26 {
     27    gl_Position = vPosition;
     28 }
     29 </script>
     30 <script id="vertexShaderBool" type="text/something-not-javascript">
     31 // vertex shader with default precision for illegal type should fail
     32 precision mediump bool;
     33 attribute vec4 vPosition;
     34 void main()
     35 {
     36    gl_Position = vPosition;
     37 }
     38 </script>
     39 <script id="vertexShaderVec2" type="text/something-not-javascript">
     40 // vertex shader with default precision for illegal type should fail
     41 precision mediump vec2;
     42 attribute vec4 vPosition;
     43 void main()
     44 {
     45    gl_Position = vPosition;
     46 }
     47 </script>
     48 <script id="vertexShaderVec3" type="text/something-not-javascript">
     49 // vertex shader with default precision for illegal type should fail
     50 precision mediump vec3;
     51 attribute vec4 vPosition;
     52 void main()
     53 {
     54    gl_Position = vPosition;
     55 }
     56 </script>
     57 <script id="vertexShaderVec4" type="text/something-not-javascript">
     58 // vertex shader with default precision for illegal type should fail
     59 precision mediump vec4;
     60 attribute vec4 vPosition;
     61 void main()
     62 {
     63    gl_Position = vPosition;
     64 }
     65 </script>
     66 <script id="vertexShaderBvec2" type="text/something-not-javascript">
     67 // vertex shader with default precision for illegal type should fail
     68 precision mediump bvec2;
     69 attribute vec4 vPosition;
     70 void main()
     71 {
     72    gl_Position = vPosition;
     73 }
     74 </script>
     75 <script id="vertexShaderBvec3" type="text/something-not-javascript">
     76 // vertex shader with default precision for illegal type should fail
     77 precision mediump bvec3;
     78 attribute vec4 vPosition;
     79 void main()
     80 {
     81    gl_Position = vPosition;
     82 }
     83 </script>
     84 <script id="vertexShaderBvec4" type="text/something-not-javascript">
     85 // vertex shader with default precision for illegal type should fail
     86 precision mediump bvec4;
     87 attribute vec4 vPosition;
     88 void main()
     89 {
     90    gl_Position = vPosition;
     91 }
     92 </script>
     93 <script id="vertexShaderIvec2" type="text/something-not-javascript">
     94 // vertex shader with default precision for illegal type should fail
     95 precision mediump ivec2;
     96 attribute vec4 vPosition;
     97 void main()
     98 {
     99    gl_Position = vPosition;
    100 }
    101 </script>
    102 <script id="vertexShaderIvec3" type="text/something-not-javascript">
    103 // vertex shader with default precision for illegal type should fail
    104 precision mediump ivec3;
    105 attribute vec4 vPosition;
    106 void main()
    107 {
    108    gl_Position = vPosition;
    109 }
    110 </script>
    111 <script id="vertexShaderIvec4" type="text/something-not-javascript">
    112 // vertex shader with default precision for illegal type should fail
    113 precision mediump ivec4;
    114 attribute vec4 vPosition;
    115 void main()
    116 {
    117    gl_Position = vPosition;
    118 }
    119 </script>
    120 <script id="vertexShaderMat2" type="text/something-not-javascript">
    121 // vertex shader with default precision for illegal type should fail
    122 precision mediump mat2;
    123 attribute vec4 vPosition;
    124 void main()
    125 {
    126    gl_Position = vPosition;
    127 }
    128 </script>
    129 <script id="vertexShaderMat3" type="text/something-not-javascript">
    130 // vertex shader with default precision for illegal type should fail
    131 precision mediump mat3;
    132 attribute vec4 vPosition;
    133 void main()
    134 {
    135    gl_Position = vPosition;
    136 }
    137 </script>
    138 <script id="vertexShaderMat4" type="text/something-not-javascript">
    139 // vertex shader with default precision for illegal type should fail
    140 precision mediump mat4;
    141 attribute vec4 vPosition;
    142 void main()
    143 {
    144    gl_Position = vPosition;
    145 }
    146 </script>
    147 <script>
    148 "use strict";
    149 GLSLConformanceTester.runTests([
    150    { vShaderId: 'vertexShaderVoid',
    151      vShaderSuccess: false,
    152      linkSuccess: false,
    153      passMsg: 'shader with default precision for void should fail'
    154    },
    155    { vShaderId: 'vertexShaderBool',
    156      vShaderSuccess: false,
    157      linkSuccess: false,
    158      passMsg: 'shader with default precision for bool should fail'
    159    },
    160    { vShaderId: 'vertexShaderVec2',
    161      vShaderSuccess: false,
    162      linkSuccess: false,
    163      passMsg: 'shader with default precision for vec2 should fail'
    164    },
    165    { vShaderId: 'vertexShaderVec3',
    166      vShaderSuccess: false,
    167      linkSuccess: false,
    168      passMsg: 'shader with default precision for vec3 should fail'
    169    },
    170    { vShaderId: 'vertexShaderVec4',
    171      vShaderSuccess: false,
    172      linkSuccess: false,
    173      passMsg: 'shader with default precision for vec4 should fail'
    174    },
    175    { vShaderId: 'vertexShaderBvec2',
    176      vShaderSuccess: false,
    177      linkSuccess: false,
    178      passMsg: 'shader with default precision for bvec2 should fail'
    179    },
    180    { vShaderId: 'vertexShaderBvec3',
    181      vShaderSuccess: false,
    182      linkSuccess: false,
    183      passMsg: 'shader with default precision for bvec3 should fail'
    184    },
    185    { vShaderId: 'vertexShaderBvec4',
    186      vShaderSuccess: false,
    187      linkSuccess: false,
    188      passMsg: 'shader with default precision for bvec4 should fail'
    189    },
    190    { vShaderId: 'vertexShaderIvec2',
    191      vShaderSuccess: false,
    192      linkSuccess: false,
    193      passMsg: 'shader with default precision for ivec2 should fail'
    194    },
    195    { vShaderId: 'vertexShaderIvec3',
    196      vShaderSuccess: false,
    197      linkSuccess: false,
    198      passMsg: 'shader with default precision for ivec3 should fail'
    199    },
    200    { vShaderId: 'vertexShaderIvec4',
    201      vShaderSuccess: false,
    202      linkSuccess: false,
    203      passMsg: 'shader with default precision for ivec4 should fail'
    204    },
    205    { vShaderId: 'vertexShaderMat2',
    206      vShaderSuccess: false,
    207      linkSuccess: false,
    208      passMsg: 'shader with default precision for mat2 should fail'
    209    },
    210    { vShaderId: 'vertexShaderMat3',
    211      vShaderSuccess: false,
    212      linkSuccess: false,
    213      passMsg: 'shader with default precision for mat3 should fail'
    214    },
    215    { vShaderId: 'vertexShaderMat4',
    216      vShaderSuccess: false,
    217      linkSuccess: false,
    218      passMsg: 'shader with default precision for mat4 should fail'
    219    }
    220 ]);
    221 var successfullyParsed = true;
    222 </script>
    223 </body>
    224 </html>