OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 |
| 3 /* |
| 4 ** Copyright (c) 2012 The Khronos Group Inc. |
| 5 ** |
| 6 ** Permission is hereby granted, free of charge, to any person obtaining a |
| 7 ** copy of this software and/or associated documentation files (the |
| 8 ** "Materials"), to deal in the Materials without restriction, including |
| 9 ** without limitation the rights to use, copy, modify, merge, publish, |
| 10 ** distribute, sublicense, and/or sell copies of the Materials, and to |
| 11 ** permit persons to whom the Materials are furnished to do so, subject to |
| 12 ** the following conditions: |
| 13 ** |
| 14 ** The above copyright notice and this permission notice shall be included |
| 15 ** in all copies or substantial portions of the Materials. |
| 16 ** |
| 17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 24 */ |
| 25 |
| 26 --> |
| 27 |
| 28 <!DOCTYPE html> |
| 29 <html> |
| 30 <head> |
| 31 <meta charset="utf-8"> |
| 32 <title>WebGL GLSL Conformance Tests</title> |
| 33 <link rel="stylesheet" href="../../../resources/js-test-style.css"/> |
| 34 <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/> |
| 35 <script src="../../../resources/js-test-pre.js"></script> |
| 36 <script src="../../resources/webgl-test-utils.js"></script> |
| 37 <script src="../../resources/glsl-conformance-test.js"></script> |
| 38 </head> |
| 39 <body> |
| 40 <div id="description"></div> |
| 41 <div id="console"></div> |
| 42 <script id="fragmentShader256" type="text/something-not-javascript"> |
| 43 // shader that uses 256 character identifier should succeed |
| 44 precision mediump float; |
| 45 uniform float a12345678901234567890123456789012345678901234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345
678901234567890123456789012345; |
| 46 void main() |
| 47 { |
| 48 gl_FragColor = vec4(a123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345,0.0,0.0,1.0); |
| 49 } |
| 50 </script> |
| 51 <script id="fragmentShader_before" type="text/something-not-javascript"> |
| 52 // shader that uses 256 character identifier that starts with underscore should
succeed |
| 53 precision mediump float; |
| 54 uniform float _a1234567890123456789012345678901234567890123456789012345678901234
56789012345678901234567890123456789012345678901234567890123456789012345678901234
56789012345678901234567890123456789012345678901234567890123456789012345678901234
567890123456789012345678901234; |
| 55 void main() |
| 56 { |
| 57 gl_FragColor = vec4(_a12345678901234567890123456789012345678901234567890123456
78901234567890123456789012345678901234567890123456789012345678901234567890123456
78901234567890123456789012345678901234567890123456789012345678901234567890123456
78901234567890123456789012345678901234,0.0,0.0,1.0); |
| 58 } |
| 59 </script> |
| 60 <script id="fragmentShader_after" type="text/something-not-javascript"> |
| 61 // shader that uses 256 character identifier that ends with underscore should su
cceed |
| 62 precision mediump float; |
| 63 uniform float a12345678901234567890123456789012345678901234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345
67890123456789012345678901234_; |
| 64 void main() |
| 65 { |
| 66 gl_FragColor = vec4(a123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901234567
8901234567890123456789012345678901234_,0.0,0.0,1.0); |
| 67 } |
| 68 </script> |
| 69 <script id="fragmentShader256_odd" type="text/something-not-javascript"> |
| 70 // shader that uses 256 character identifier with odd characters as underscores
should succeed |
| 71 precision mediump float; |
| 72 uniform float a_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_
6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_
6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_
6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_; |
| 73 void main() |
| 74 { |
| 75 gl_FragColor = vec4(a_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_
8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_
8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_
8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_,0.0,0.0,1.0); |
| 76 } |
| 77 </script> |
| 78 <script id="fragmentShader256_even" type="text/something-not-javascript"> |
| 79 // shader that uses 256 character identifier with even characters as underscores
should succeed |
| 80 precision mediump float; |
| 81 uniform float a1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5
_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5
_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5
_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5; |
| 82 void main() |
| 83 { |
| 84 gl_FragColor = vec4(a1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7
_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7
_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7
_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5,0.0,0.0,1.0); |
| 85 } |
| 86 </script> |
| 87 <script> |
| 88 GLSLConformanceTester.runTests([ |
| 89 { vShaderId: undefined, |
| 90 vShaderSuccess: true, |
| 91 fShaderId: 'fragmentShader256', |
| 92 fShaderSuccess: true, |
| 93 linkSuccess: true, |
| 94 passMsg: 'shader with 256 character identifier should succeed' |
| 95 }, |
| 96 { vShaderId: undefined, |
| 97 vShaderSuccess: true, |
| 98 fShaderId: 'fragmentShader_before', |
| 99 fShaderSuccess: true, |
| 100 linkSuccess: true, |
| 101 passMsg: 'shader with 256 character identifier that starts with underscore
should succeed' |
| 102 }, |
| 103 { vShaderId: undefined, |
| 104 vShaderSuccess: true, |
| 105 fShaderId: 'fragmentShader_after', |
| 106 fShaderSuccess: true, |
| 107 linkSuccess: true, |
| 108 passMsg: 'shader with 256 character identifier that ends with underscore s
hould succeed' |
| 109 }, |
| 110 { vShaderId: undefined, |
| 111 vShaderSuccess: true, |
| 112 fShaderId: 'fragmentShader256_odd', |
| 113 fShaderSuccess: true, |
| 114 linkSuccess: true, |
| 115 passMsg: 'shader with 256 character identifier with odd characters as unde
rscores should succeed' |
| 116 }, |
| 117 { vShaderId: undefined, |
| 118 vShaderSuccess: true, |
| 119 fShaderId: 'fragmentShader256_even', |
| 120 fShaderSuccess: true, |
| 121 linkSuccess: true, |
| 122 passMsg: 'shader with 256 character identifier with even characters as und
erscores should succeed' |
| 123 } |
| 124 ]); |
| 125 successfullyParsed = true; |
| 126 </script> |
| 127 </body> |
| 128 </html> |
| 129 |
| 130 |
OLD | NEW |