Title: [267520] trunk/Source/ThirdParty/ANGLE
Revision
267520
Author
[email protected]
Date
2020-09-24 00:01:36 -0700 (Thu, 24 Sep 2020)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (267519 => 267520)


--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2020-09-24 06:15:35 UTC (rev 267519)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2020-09-24 07:01:36 UTC (rev 267520)
@@ -1,3 +1,36 @@
+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-11  James Darpinian  <[email protected]>
 
         [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts

Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h (267519 => 267520)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h	2020-09-24 06:15:35 UTC (rev 267519)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h	2020-09-24 07:01:36 UTC (rev 267520)
@@ -164,6 +164,14 @@
 #endif
 }
 
+inline bool IsIOS()
+{
+#if defined(ANGLE_PLATFORM_IOS)
+    return true;
+#else
+    return false;
+#endif
+}
 struct OSVersion
 {
     OSVersion();

Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm (267519 => 267520)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm	2020-09-24 06:15:35 UTC (rev 267519)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm	2020-09-24 07:01:36 UTC (rev 267520)
@@ -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: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp (267519 => 267520)


--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp	2020-09-24 06:15:35 UTC (rev 267519)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp	2020-09-24 07:01:36 UTC (rev 267520)
@@ -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