WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for landing
bug-231475-20211025160944.patch (text/plain), 6.17 KB, created by
Kyle Piddington
on 2021-10-25 16:09:45 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Kyle Piddington
Created:
2021-10-25 16:09:45 PDT
Size:
6.17 KB
patch
obsolete
>Subversion Revision: 284820 >diff --git a/Source/ThirdParty/ANGLE/ChangeLog b/Source/ThirdParty/ANGLE/ChangeLog >index 7af3e2f7e3aeaa3c8fbdb0bb3096f0f9dc5a2f4f..9573cb160238387a49b060cad469bf24bbd80323 100644 >--- a/Source/ThirdParty/ANGLE/ChangeLog >+++ b/Source/ThirdParty/ANGLE/ChangeLog >@@ -1,3 +1,16 @@ >+2021-10-25 Kyle Piddington <kpiddington@apple.com> >+ >+ REGRESSION (iOS 15), safari604.1: Could not link the shader program >+ https://bugs.webkit.org/show_bug.cgi?id=231475 >+ >+ Renaming regex incorrectly substituted an attribute. >+ Update to require exact attribute match >+ >+ Reviewed by Dean Jackson >+ >+ * src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm: >+ (rx::mtl::updateShaderAttributes): >+ > 2021-10-15 Ross Kirsling <ross.kirsling@sony.com> > > Realize Mac CMake build of WebCore and WebKit >diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm >index 3e79b2063b242294c4f74cd4187030cf00c64099..550b1e2e0a485918ee24ef6c5f55297ff9fb9fc3 100644 >--- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm >+++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm >@@ -171,15 +171,16 @@ std::string updateShaderAttributes(std::string shaderSourceIn, const gl::Program > for(int i = 0; i < regs; i++) > { > stream.str(""); >- stream << attribute.name << "_" << std::to_string(i) << sh::kUnassignedAttributeString; >- attributeBindings.insert({std::string(stream.str()), i+attribute.location}); >+ stream << " " << kUserDefinedNamePrefix << attribute.name << "_" << std::to_string(i) >+ << sh::kUnassignedAttributeString; >+ attributeBindings.insert({std::string(stream.str()), i + attribute.location}); > } > } > else > { > stream.str(""); >- stream << attribute.name << sh::kUnassignedAttributeString; >- attributeBindings.insert({std::string(stream.str()),attribute.location}); >+ stream << " " << kUserDefinedNamePrefix << attribute.name << sh::kUnassignedAttributeString; >+ attributeBindings.insert({std::string(stream.str()), attribute.location}); > } > } > //Rewrite attributes >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 661342dc1328f3919a3e09dfa2996cbed68f9d30..3d2dd518e240d3e03aea438cdcbdeb57b78c2275 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2021-10-25 Kyle Piddington <kpiddington@apple.com> >+ >+ REGRESSION (iOS 15), safari604.1: Could not link the shader program >+ https://bugs.webkit.org/show_bug.cgi?id=231475 >+ >+ Renaming regex incorrectly substituted an attribute. >+ Update to require exact attribute match >+ >+ Add test to expose bug, verify test passes >+ >+ Reviewed by Dean Jackson. >+ >+ * fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt: Added. >+ * fast/canvas/webgl/attrib-name-aliasing-bug.html: Added. >+ > 2021-10-25 Kate Cheney <katherine_cheney@apple.com> > > [App Privacy Report] CORS preflight requests attributed incorrectly >diff --git a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt b/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..3a52cb797290bb91c43c0e217ad5fe26b2479d9e >--- /dev/null >+++ b/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt >@@ -0,0 +1,10 @@ >+Verify fix on substring-mached attrib locations. >+Test attrib names not incorrectly identified during renaming >+PASS gl.getProgramParameter(program, gl.LINK_STATUS) is true >+PASS attrib location should not be -1 >+PASS attrib 2 location should not be -1 >+PASS getError was expected value: NO_ERROR : >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug.html b/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug.html >new file mode 100644 >index 0000000000000000000000000000000000000000..216f04dceeb1ab6ba112b9f267abf32701bc7c8f >--- /dev/null >+++ b/LayoutTests/fast/canvas/webgl/attrib-name-aliasing-bug.html >@@ -0,0 +1,63 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<meta charset="utf-8"> >+<title>WebGL attrib location length tests</title> >+<script src="../../../resources/js-test.js"></script> >+<script src="resources/webgl-test.js"> </script> >+<script src="resources/webgl-test-utils.js"> </script> >+</head> >+<body> >+<canvas id="example" width="50" height="50"> >+There is supposed to be an example drawing here, but it's not important. >+</canvas> >+<div id="description">Verify fix on substring-mached attrib locations.</div> >+<div id="console"></div> >+<script id="vertexShader" type="x-shader/x-vertex"> >+// A shader where two attributes share the same substring. >+attribute vec4 attrib_name; >+attribute vec4 name; >+ >+void main() >+{ >+ gl_Position = attrib_name + name; >+} >+</script> >+<script id="fragmentShader" type="x-shader/x-fragment"> >+precision mediump float; >+ >+void main() { >+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); >+} >+</script> >+<script> >+if (window.initNonKhronosFramework) { >+ window.initNonKhronosFramework(false); >+} >+if (window.internals) >+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false); >+ >+var wtu = WebGLTestUtils; >+var gl = wtu.create3DContext(document.getElementById("example")); >+ >+debug("Test attrib names not incorrectly identified during renaming"); >+var program = wtu.loadProgramFromScript(gl, "vertexShader", "fragmentShader"); >+shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true'); >+var attribLoc = gl.getAttribLocation(program, "attrib_name"); >+var attribLoc2 = gl.getAttribLocation(program, "name"); >+if (attribLoc == -1) { >+ testFailed("attrib location was -1, should not be"); >+} else { >+ testPassed("attrib location should not be -1"); >+} >+if (attribLoc2 == -1) { >+ testFailed("attrib 2 location was -1, should not be"); >+} else { >+ testPassed("attrib 2 location should not be -1"); >+} >+wtu.glErrorShouldBe(gl, gl.NONE); >+ >+ >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 231475
:
442210
|
442218
|
442417
| 442435