Modified: branches/safari-613-branch/LayoutTests/ChangeLog (290703 => 290704)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-01 23:50:08 UTC (rev 290703)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-01 23:50:13 UTC (rev 290704)
@@ -1,30 +1,71 @@
2022-03-01 Russell Epstein <[email protected]>
- Cherry-pick r290512. rdar://problem/86582214
+ Cherry-pick r290087. rdar://problem/88713302
- [Tables] Incorrect table sizing when colgroup comes after tbody
- https://bugs.webkit.org/show_bug.cgi?id=237205
- <rdar://86582214>
+ Source/ThirdParty/ANGLE:
+ Metal ANGLE: vertex array does not correctly observe contents of data buffers
+ https://bugs.webkit.org/show_bug.cgi?id=236733
+ <rdar://problem/88713302>
+ <rdar://problem/88499073>
- Reviewed by Antti Koivisto.
+ Patch by Kyle Piddington <[email protected]> on 2022-02-17
+ Reviewed by Dean Jackson.
- Source/WebCore:
+ Similar to previous bug (236427), we were not correctly observing changes to the
+ vertex buffer data. This caused us to miss rebinding vertex buffers
+ when data was updated without causing conversion
- Let's use the colgroup for table sizing even when it comes after any thead, tbody, tfoot, and tr elements.
- This makes WebKit match other rendering engines (see https://src.chromium.org/viewvc/blink?revision=159442&view=revision)
+ * src/libANGLE/renderer/metal/VertexArrayMtl.h:
+ * src/libANGLE/renderer/metal/VertexArrayMtl.mm:
+ (rx::VertexArrayMtl::syncState):
+ (rx::VertexArrayMtl::setupDraw):
+ (rx::VertexArrayMtl::syncDirtyAttrib):
- Test: fast/table/table-sizing-fails-when-colgroup-comes-after-content.html
-
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::firstColumn const):
- * rendering/RenderTableCol.cpp:
- (WebCore::RenderTableCol::nextColumn const):
-
- LayoutTests:
-
- * fast/table/table-sizing-fails-when-colgroup-comes-after-content-expected.html: Added.
- * fast/table/table-sizing-fails-when-colgroup-comes-after-content.html: Added.
- * platform/mac/tables/mozilla_expected_failures/dom/appendCol1-expected.txt: Progression.
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-01 Russell Epstein <[email protected]>
+
+ Cherry-pick r290512. rdar://problem/86582214
+
+ [Tables] Incorrect table sizing when colgroup comes after tbody
+ https://bugs.webkit.org/show_bug.cgi?id=237205
+ <rdar://86582214>
+
+ Reviewed by Antti Koivisto.
+
+ Source/WebCore:
+
+ Let's use the colgroup for table sizing even when it comes after any thead, tbody, tfoot, and tr elements.
+ This makes WebKit match other rendering engines (see https://src.chromium.org/viewvc/blink?revision=159442&view=revision)
+
+ Test: fast/table/table-sizing-fails-when-colgroup-comes-after-content.html
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::firstColumn const):
+ * rendering/RenderTableCol.cpp:
+ (WebCore::RenderTableCol::nextColumn const):
+
+ LayoutTests:
+
+ * fast/table/table-sizing-fails-when-colgroup-comes-after-content-expected.html: Added.
+ * fast/table/table-sizing-fails-when-colgroup-comes-after-content.html: Added.
+ * platform/mac/tables/mozilla_expected_failures/dom/appendCol1-expected.txt: Progression.
+2022-02-17 Kyle Piddington <[email protected]>
+
+ Metal ANGLE: vertex array does not correctly observe contents of data buffers
+ https://bugs.webkit.org/show_bug.cgi?id=236733
+ <rdar://problem/88713302>
+ <rdar://problem/88499073>
+
+ Reviewed by Dean Jackson.
+
+ Similar to previous bug (236427), we were not correctly observing changes to the
+ vertex buffer data. This caused us to miss rebinding vertex buffers
+ when data was updated without causing conversion
+
+ * fast/canvas/webgl/buffer-data-subdata-dynamic-buffer.html: Added.
+ * fast/canvas/webgl/buffer-data-subdata-dynamic-buffer-expected.txt: Added.
+
* platform/mac/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt: Progression.
Added: branches/safari-613-branch/LayoutTests/fast/canvas/webgl/buffer-data-subdata-dynamic-buffer.html (0 => 290704)
--- branches/safari-613-branch/LayoutTests/fast/canvas/webgl/buffer-data-subdata-dynamic-buffer.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/canvas/webgl/buffer-data-subdata-dynamic-buffer.html 2022-03-01 23:50:13 UTC (rev 290704)
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src="" </script>
+</head>
+<body>
+<canvas id="example" width="40" height="40" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+#ifdef GL_ES
+precision highp float;
+#endif
+void main()
+{
+ gl_FragColor = vec4(0, 1, 0, 1);
+}
+</script>
+
+<script>
+function init()
+{
+ if (window.initNonKhronosFramework)
+ window.initNonKhronosFramework(false);
+
+ debug("Checks that update-draws of bufferSubData are respected");
+ debug("");
+
+ if (window.internals)
+ internals.settings.setWebGL2Enabled(true);
+ gl = initWebGL("example", "vshader", "fshader", [ "vPosition", "index" ],
+ [ 1, 1, 1, 1 ], 1, null, true);
+
+ gl.disable(gl.DEPTH_TEST);
+ gl.disable(gl.BLEND);
+
+ // Vertex buffer data lower left triangle
+ // 2
+ //
+ // o 1
+ var vertexData1 = new Float32Array([-1, -1, 1, -1, -1, 1]);
+ //Vertex buffer data upper right triangle
+ // 2 1
+ //
+ // 0
+ var vertexData2 = new Float32Array([ 1., -1., 1., 1., -1., 1.]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ shouldBe("gl.getError()", "gl.NO_ERROR")
+ gl.bufferData(gl.ARRAY_BUFFER, vertexData1, gl.DYNAMIC_DRAW);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ gl.bufferData(gl.ARRAY_BUFFER, vertexData2, gl.DYNAMIC_DRAW);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ gl.flush();
+ checkGreenValue(0, 0, 255, "top-left of canvas should be green.");
+ checkGreenValue(0, 39, 255, "bottom-left of canvas should be green.");
+ checkGreenValue(39, 0, 255, "Top-right of canvas should be green.");
+ checkGreenValue(39, 39, 255, "bottom-right of canvas should be green.");
+ gl.deleteBuffer(vertexObject);
+
+ function checkGreenValue(x, y, value, msg) {
+
+ var buf = new Uint8Array(4);
+ gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ if (buf[1] != value || buf[3] != 255) {
+ debug('expected: green channel should = ' + value + ' but was = ' + buf[2] + '.');
+ testFailed(msg);
+ return;
+ }
+ testPassed(msg);
+ }
+}
+
+init();
+</script>
+<script src=""
+</body>
+</html>
\ No newline at end of file
Modified: branches/safari-613-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm (290703 => 290704)
--- branches/safari-613-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm 2022-03-01 23:50:08 UTC (rev 290703)
+++ branches/safari-613-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm 2022-03-01 23:50:13 UTC (rev 290704)
@@ -273,7 +273,7 @@
case gl::VertexArray::DIRTY_BIT_ELEMENT_ARRAY_BUFFER:
case gl::VertexArray::DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA:
{
- mElementArrayDirty = true;
+ mVertexDataDirty = true;
break;
}
@@ -301,7 +301,7 @@
case gl::VertexArray::DIRTY_BIT_BUFFER_DATA_0 + INDEX: \
ANGLE_TRY(syncDirtyAttrib(context, attribs[INDEX], bindings[attribs[INDEX].bindingIndex], \
INDEX)); \
- mVertexArrayDirty = true; \
+ mVertexDataDirty = true; \
break;
ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_BUFFER_DATA_FUNC)
@@ -480,9 +480,9 @@
} // for (v)
}
- if(dirty || mElementArrayDirty)
+ if(dirty || mVertexDataDirty)
{
- mElementArrayDirty = false;
+ mVertexDataDirty = false;
const gl::ProgramExecutable *executable = glContext->getState().getProgramExecutable();
const gl::AttributesMask &programActiveAttribsMask =
executable->getActiveAttribLocationsMask();
@@ -652,6 +652,7 @@
if (bufferGL)
{
BufferMtl *bufferMtl = mtl::GetImpl(bufferGL);
+ mContentsObservers->enableForBuffer(bufferGL, static_cast<uint32_t>(attribIndex));
bool needConversion =
format.actualFormatId != format.intendedFormatId ||
(binding.getOffset() % format.actualAngleFormat().pixelBytes) != 0 ||
@@ -661,12 +662,10 @@
if (needConversion)
{
- mContentsObservers->enableForBuffer(bufferGL, static_cast<uint32_t>(attribIndex));
ANGLE_TRY(convertVertexBuffer(glContext, bufferMtl, binding, attribIndex, format));
}
else
{
- mContentsObservers->disableForBuffer(bufferGL, static_cast<uint32_t>(attribIndex));
mCurrentArrayBuffers[attribIndex] = bufferMtl;
mCurrentArrayBufferOffsets[attribIndex] = binding.getOffset();
mCurrentArrayBufferStrides[attribIndex] = binding.getStride();