Title: [267685] branches/safari-610-branch/Source/ThirdParty/ANGLE
Revision
267685
Author
[email protected]
Date
2020-09-27 13:00:47 -0700 (Sun, 27 Sep 2020)

Log Message

Cherry-pick r267520. rdar://problem/69594405

    REGRESSION: Textures Fail to Render in WebGL from HLS Stream [iOS 14]
    https://bugs.webkit.org/show_bug.cgi?id=215908
    <rdar://problem/68000962>

    Patch by Kimmo Kinnunen <[email protected]> on 2020-09-24
    Reviewed by Dean Jackson.

    Disable ANGLE workers until EAGL implementation is more complete.
    Current implementation fails to compile any shader, since the
    compilation happens in the worker thread and worker EAGL context
    which does not use the same sharegroup as the main context.
    The shader objects are created in the main context but the shader
    source setting and compilation happens in the worker context.
    EAGL needs a flush between state changes, and adding that
    correctly is a bigger change to be done later.

    Use sized formats when calling [EAGLContext -texImageIOSurface]
    from EGL_ANGLE_iosurface_client_buffer code. The texImageIOSurface
    accepts parameters with glTexImage2D logic. On ES3, some of the
    internal formats must be sized formats. The EAGLContext instantiated
    by ANGLE is ES3, even if the ANGLE context would be ES2.

    No tests added since this should be caught with the many video
    related tests. It's unclear why this is not the case -- at
    least on real hw. This is to be investigated later, too.

    * src/libANGLE/renderer/driver_utils.h:
    (rx::IsIOS):
    * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
    * src/libANGLE/renderer/gl/renderergl_utils.cpp:
    (rx::nativegl_gl::InitializeFeatures):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog (267684 => 267685)


--- branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog	2020-09-27 20:00:45 UTC (rev 267684)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog	2020-09-27 20:00:47 UTC (rev 267685)
@@ -1,3 +1,74 @@
+2020-09-27  Alan Coon  <[email protected]>
+
+        Cherry-pick r267520. rdar://problem/69594405
+
+    REGRESSION: Textures Fail to Render in WebGL from HLS Stream [iOS 14]
+    https://bugs.webkit.org/show_bug.cgi?id=215908
+    <rdar://problem/68000962>
+    
+    Patch by Kimmo Kinnunen <[email protected]> on 2020-09-24
+    Reviewed by Dean Jackson.
+    
+    Disable ANGLE workers until EAGL implementation is more complete.
+    Current implementation fails to compile any shader, since the
+    compilation happens in the worker thread and worker EAGL context
+    which does not use the same sharegroup as the main context.
+    The shader objects are created in the main context but the shader
+    source setting and compilation happens in the worker context.
+    EAGL needs a flush between state changes, and adding that
+    correctly is a bigger change to be done later.
+    
+    Use sized formats when calling [EAGLContext -texImageIOSurface]
+    from EGL_ANGLE_iosurface_client_buffer code. The texImageIOSurface
+    accepts parameters with glTexImage2D logic. On ES3, some of the
+    internal formats must be sized formats. The EAGLContext instantiated
+    by ANGLE is ES3, even if the ANGLE context would be ES2.
+    
+    No tests added since this should be caught with the many video
+    related tests. It's unclear why this is not the case -- at
+    least on real hw. This is to be investigated later, too.
+    
+    * src/libANGLE/renderer/driver_utils.h:
+    (rx::IsIOS):
+    * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
+    * src/libANGLE/renderer/gl/renderergl_utils.cpp:
+    (rx::nativegl_gl::InitializeFeatures):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-09-24  Kimmo Kinnunen  <[email protected]>
+
+            REGRESSION: Textures Fail to Render in WebGL from HLS Stream [iOS 14]
+            https://bugs.webkit.org/show_bug.cgi?id=215908
+            <rdar://problem/68000962>
+
+            Reviewed by Dean Jackson.
+
+            Disable ANGLE workers until EAGL implementation is more complete.
+            Current implementation fails to compile any shader, since the
+            compilation happens in the worker thread and worker EAGL context
+            which does not use the same sharegroup as the main context.
+            The shader objects are created in the main context but the shader
+            source setting and compilation happens in the worker context.
+            EAGL needs a flush between state changes, and adding that
+            correctly is a bigger change to be done later.
+
+            Use sized formats when calling [EAGLContext -texImageIOSurface]
+            from EGL_ANGLE_iosurface_client_buffer code. The texImageIOSurface
+            accepts parameters with glTexImage2D logic. On ES3, some of the
+            internal formats must be sized formats. The EAGLContext instantiated
+            by ANGLE is ES3, even if the ANGLE context would be ES2.
+
+            No tests added since this should be caught with the many video
+            related tests. It's unclear why this is not the case -- at
+            least on real hw. This is to be investigated later, too.
+
+            * src/libANGLE/renderer/driver_utils.h:
+            (rx::IsIOS):
+            * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
+            * src/libANGLE/renderer/gl/renderergl_utils.cpp:
+            (rx::nativegl_gl::InitializeFeatures):
+
 2020-09-10  Alan Coon  <[email protected]>
 
         Cherry-pick r266539. rdar://problem/68652473

Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h (267684 => 267685)


--- branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h	2020-09-27 20:00:45 UTC (rev 267684)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h	2020-09-27 20:00:47 UTC (rev 267685)
@@ -164,6 +164,14 @@
 #endif
 }
 
+inline bool IsIOS()
+{
+#if defined(ANGLE_PLATFORM_IOS)
+    return true;
+#else
+    return false;
+#endif
+}
 struct OSVersion
 {
     OSVersion();

Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm (267684 => 267685)


--- branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm	2020-09-27 20:00:45 UTC (rev 267684)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm	2020-09-27 20:00:47 UTC (rev 267685)
@@ -48,9 +48,9 @@
 // clang-format off
 
 static const IOSurfaceFormatInfo kIOSurfaceFormats[] = {
-    {GL_RED,      GL_UNSIGNED_BYTE,  1, GL_RED,  GL_RED,  GL_UNSIGNED_BYTE },
-    {GL_R16UI,    GL_UNSIGNED_SHORT, 2, GL_RED,  GL_RED,  GL_UNSIGNED_SHORT},
-    {GL_RG,       GL_UNSIGNED_BYTE,  2, GL_RG,   GL_RG,   GL_UNSIGNED_BYTE },
+    {GL_RED,      GL_UNSIGNED_BYTE,  1, GL_R8,  GL_RED,  GL_UNSIGNED_BYTE },
+    {GL_R16UI,    GL_UNSIGNED_SHORT, 2, GL_R16UI, GL_RED_INTEGER,  GL_UNSIGNED_SHORT},
+    {GL_RG,       GL_UNSIGNED_BYTE,  2, GL_RG8,  GL_RG,   GL_UNSIGNED_BYTE },
     {GL_RGB,      GL_UNSIGNED_BYTE,  4, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE },
     {GL_BGRA_EXT, GL_UNSIGNED_BYTE,  4, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE },
     {GL_RGBA,     GL_HALF_FLOAT,     8, GL_RGBA, GL_RGBA, GL_HALF_FLOAT    },

Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp (267684 => 267685)


--- branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp	2020-09-27 20:00:45 UTC (rev 267684)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp	2020-09-27 20:00:47 UTC (rev 267685)
@@ -1661,7 +1661,7 @@
     // anglebug.com/3031
     // crbug.com/922936
     ANGLE_FEATURE_CONDITION(features, disableWorkerContexts,
-                            (IsWindows() && (isIntel || isAMD)) || (IsLinux() && isNvidia));
+                            (IsWindows() && (isIntel || isAMD)) || (IsLinux() && isNvidia) || IsIOS());
 
     bool limitMaxTextureSize = isIntel && IsLinux() && GetLinuxOSVersion() < OSVersion(5, 0, 0);
     ANGLE_FEATURE_CONDITION(features, limitMaxTextureSizeTo4096,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to