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>ANGLE ambiguous function call test
</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>
18 <div id=
"description"></div>
19 <div id=
"console"></div>
20 <script id=
"fshaderAmbiguousHLSLFunctionCall" type=
"x-shader/x-fragment">
21 precision mediump float;
32 gl_FragColor = foo(uv) + foo(um);
35 <script id=
"fshaderAmbiguousHLSLStructFunctionCall" type=
"x-shader/x-fragment">
36 precision mediump float;
38 struct S { float foo; };
39 struct S2 { float foo; };
40 float get(S s) { return s.foo + u_zero; }
41 float get(S2 s2) { return
0.25 + s2.foo + u_zero; }
48 gl_FragColor = vec4(
0.0, get(s) + get(s2),
0.0,
1.0);
51 <script type=
"text/javascript">
53 description("Test overloaded functions with vec4 and mat2 parameters that have had issues in ANGLE. Issues were due to HLSL compiler treating float4 and float2x2 as the same type when resolving which overloaded function to call.");
55 GLSLConformanceTester
.runTests([
57 fShaderId
: 'fshaderAmbiguousHLSLFunctionCall',
60 passMsg
: "Disambiguate correctly between overloaded function calls with 4-component float parameters"
63 fShaderId
: 'fshaderAmbiguousHLSLStructFunctionCall',
66 passMsg
: "Disambiguate correctly between overloaded function calls with struct parameters",