Title: [286960] trunk/Source/ThirdParty/ANGLE
Revision
286960
Author
commit-qu...@webkit.org
Date
2021-12-13 11:46:53 -0800 (Mon, 13 Dec 2021)

Log Message

REGRESSION(Safari 15, BigSur): Poor video texture upload performance with MacBook M1, ANGLE OpenGL backend
https://bugs.webkit.org/show_bug.cgi?id=232235
<rdar://problem/84878815>
Patch by Kimmo Kinnunen <kkinnu...@apple.com> on 2021-12-13
Reviewed by Dean Jackson.

Remove validation for IOSurface element size when a IOSurface is bound
to a pbuffer. The IOSurfaceGetBytesPerElementOfPlane is not valid for some internal formats
that might be compressed.

Will add a WebKit level test in subsequent fix.
Will add an ANGLE level test during upstreaming of the patch.

Same as "Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]"
but this time for CGL.
https://webkit.org/b/218637  rdar://problem/71102126

Remove incorrect validation that IOSurface pixel format matches
the pixel format of the texture image being specified.

The "Element" in IOSurface is a block of pixels, while the validation assumed
it means one pixel. The validation failed for a compressed format.

Currently we map non-public YUV formats, to which there is no elequent way
of implementing the validation.

* src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp:
(rx::IOSurfaceSurfaceCGL::validateAttributes):

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (286959 => 286960)


--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-12-13 19:10:01 UTC (rev 286959)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-12-13 19:46:53 UTC (rev 286960)
@@ -1,3 +1,34 @@
+2021-12-13  Kimmo Kinnunen  <kkinnu...@apple.com>
+
+        REGRESSION(Safari 15, BigSur): Poor video texture upload performance with MacBook M1, ANGLE OpenGL backend 
+        https://bugs.webkit.org/show_bug.cgi?id=232235
+        <rdar://problem/84878815>
+        Reviewed by Dean Jackson.
+
+        Remove validation for IOSurface element size when a IOSurface is bound
+        to a pbuffer. The IOSurfaceGetBytesPerElementOfPlane is not valid for some internal formats
+        that might be compressed.
+
+        Will add a WebKit level test in subsequent fix.
+        Will add an ANGLE level test during upstreaming of the patch.
+
+        Same as "Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]"
+        but this time for CGL.
+        https://webkit.org/b/218637  rdar://problem/71102126
+
+        Remove incorrect validation that IOSurface pixel format matches
+        the pixel format of the texture image being specified.
+
+        The "Element" in IOSurface is a block of pixels, while the validation assumed
+        it means one pixel. The validation failed for a compressed format.
+
+        Currently we map non-public YUV formats, to which there is no elequent way
+        of implementing the validation.
+
+
+        * src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp:
+        (rx::IOSurfaceSurfaceCGL::validateAttributes):
+
 2021-12-10  Kyle Piddington  <kpidding...@apple.com>
 
         [ANGLE] ASTC-HDR is unavailable on some platforms

Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp (286959 => 286960)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp	2021-12-13 19:10:01 UTC (rev 286959)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp	2021-12-13 19:46:53 UTC (rev 286960)
@@ -250,12 +250,10 @@
         return false;
     }
 
-    // Check that the format matches this IOSurface plane
-    if (IOSurfaceGetBytesPerElementOfPlane(ioSurface, plane) !=
-        kIOSurfaceFormats[formatIndex].componentBytes)
-    {
-        return false;
-    }
+    // FIXME: Check that the format matches this IOSurface plane for pixel formats that we know of.
+    // We could map IOSurfaceGetPixelFormat to expected type plane and format type.
+    // However, the caller might supply us non-public pixel format, which makes exhaustive checks
+    // problematic.
 
     return true;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to