assign-to-swizzled-twice-in-function.html (1146B)
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>Assigning an assignment to a swizzled value inside function</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> 15 <script src="../../../js/glsl-conformance-test.js"></script> 16 </head> 17 <body> 18 <div id="description"></div> 19 <div id="console"></div> 20 <script id="fshader" type="x-shader/x-fragment"> 21 precision mediump float; 22 23 vec2 f() 24 { 25 vec2 r = vec2(0); 26 r.x = r.y = 1.0; 27 return r; 28 } 29 30 void main() 31 { 32 gl_FragColor.ga = f(); 33 } 34 35 </script> 36 <script type="text/javascript"> 37 "use strict"; 38 description(); 39 40 // Minimal test case based on report at http://crbug.com/798117 41 42 GLSLConformanceTester.runRenderTests([ 43 { 44 fShaderId: 'fshader', 45 fShaderSuccess: true, 46 linkSuccess: true, 47 passMsg: "Assigning an assignment to a swizzled value inside a user-defined function" 48 } 49 ]); 50 </script> 51 </body> 52 </html>