| Differences between
and this patch
- a/Source/ThirdParty/ANGLE/ChangeLog +13 lines
Lines 1-3 a/Source/ThirdParty/ANGLE/ChangeLog_sec1
1
2021-10-22  Kyle Piddington  <kpiddington@apple.com>
2
3
        REGRESSION (iOS 15), safari604.1: Could not link the shader program
4
        https://bugs.webkit.org/show_bug.cgi?id=231475
5
	
6
        Renaming regex incorrectly substituted an attribute. 
7
        Update to require exact attribute match
8
9
        Reviewed by NOBODY (OOPS!).
10
11
        * src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:
12
        (rx::mtl::updateShaderAttributes):
13
1
2021-10-15  Ross Kirsling  <ross.kirsling@sony.com>
14
2021-10-15  Ross Kirsling  <ross.kirsling@sony.com>
2
15
3
        Realize Mac CMake build of WebCore and WebKit
16
        Realize Mac CMake build of WebCore and WebKit
- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm -4 / +5 lines
Lines 171-185 std::string updateShaderAttributes(std::string shaderSourceIn, const gl::Program a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm_sec1
171
            for(int i = 0; i < regs; i++)
171
            for(int i = 0; i < regs; i++)
172
            {
172
            {
173
                stream.str("");
173
                stream.str("");
174
                stream << attribute.name << "_" << std::to_string(i) << sh::kUnassignedAttributeString;
174
                stream << " " << kUserDefinedNamePrefix << attribute.name << "_" << std::to_string(i)
175
                attributeBindings.insert({std::string(stream.str()), i+attribute.location});
175
                                       << sh::kUnassignedAttributeString;
176
                attributeBindings.insert({std::string(stream.str()), i + attribute.location});
176
            }
177
            }
177
        }
178
        }
178
        else
179
        else
179
        {
180
        {
180
            stream.str("");
181
            stream.str("");
181
            stream << attribute.name << sh::kUnassignedAttributeString;
182
            stream << " " << kUserDefinedNamePrefix << attribute.name << sh::kUnassignedAttributeString;
182
            attributeBindings.insert({std::string(stream.str()),attribute.location});
183
            attributeBindings.insert({std::string(stream.str()), attribute.location});
183
        }
184
        }
184
    }
185
    }
185
    //Rewrite attributes
186
    //Rewrite attributes
- a/LayoutTests/ChangeLog +15 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2021-10-22  Kyle Piddington  <kpiddington@apple.com>
2
3
        REGRESSION (iOS 15), safari604.1: Could not link the shader program
4
        https://bugs.webkit.org/show_bug.cgi?id=231475
5
6
        Renaming regex incorrectly substituted an attribute. 
7
        Update to require exact attribute match
8
        
9
        Add test to expose bug, verify test passes
10
11
        Reviewed by NOBODY (OOPS!).
12
13
        * fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt: Added.
14
        * fast/canvas/webgl/attrib-name-aliasing-bug.html: Added.
15
1
2021-10-22  Sihui Liu  <sihui_liu@apple.com>
16
2021-10-22  Sihui Liu  <sihui_liu@apple.com>
2
17
3
        Followup to r284652: ensure file handle is closed in web process
18
        Followup to r284652: ensure file handle is closed in web process
- a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt +10 lines
Line 0 a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt_sec1
1
Verify limits on the lengths of attrib locations.
2
Test attrib names not incorrectly identified during renaming
3
PASS gl.getProgramParameter(program, gl.LINK_STATUS) is true
4
PASS attrib location should not be -1
5
PASS attrib 2 location should not be -1
6
PASS getError was expected value: NO_ERROR :
7
PASS successfullyParsed is true
8
9
TEST COMPLETE
10
- a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug.html +63 lines
Line 0 a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>WebGL attrib location length tests</title>
6
<script src="../../../resources/js-test.js"></script>
7
<script src="resources/webgl-test.js"> </script>
8
<script src="resources/webgl-test-utils.js"> </script>
9
</head>
10
<body>
11
<canvas id="example" width="50" height="50">
12
There is supposed to be an example drawing here, but it's not important.
13
</canvas>
14
<div id="description">Verify limits on the lengths of attrib locations.</div>
15
<div id="console"></div>
16
<script id="vertexShader" type="x-shader/x-vertex">
17
// A vertex shader where the needed attrib location is long, but not over the limit.
18
attribute vec4 attrib_name;
19
attribute vec4 name;
20
21
void main()
22
{
23
    gl_Position = attrib_name + name;
24
}
25
</script>
26
<script id="fragmentShader" type="x-shader/x-fragment">
27
precision mediump float;
28
29
void main() {
30
    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
31
}
32
</script>
33
<script>
34
if (window.initNonKhronosFramework) {
35
    window.initNonKhronosFramework(false);
36
}
37
if (window.internals)
38
    window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
39
40
var wtu = WebGLTestUtils;
41
var gl = wtu.create3DContext(document.getElementById("example"));
42
43
debug("Test attrib names not incorrectly identified during renaming");
44
var program = wtu.loadProgramFromScript(gl, "vertexShader", "fragmentShader");
45
shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
46
var attribLoc = gl.getAttribLocation(program, "attrib_name");
47
var attribLoc2 = gl.getAttribLocation(program, "name");
48
if (attribLoc == -1) {
49
    testFailed("attrib location was -1, should not be");
50
} else {
51
    testPassed("attrib location should not be -1");
52
}
53
if (attribLoc2 == -1) {
54
    testFailed("attrib 2 location was -1, should not be");
55
} else {
56
    testPassed("attrib 2 location should not be -1");
57
}
58
wtu.glErrorShouldBe(gl, gl.NONE);
59
60
61
</script>
62
</body>
63
</html>

Return to Bug 231475