Log Message
Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2] https://bugs.webkit.org/show_bug.cgi?id=218637 <rdar://problem/71102126>
Patch by Kimmo Kinnunen <kkinnu...@apple.com> on 2021-02-26 Reviewed by Kenneth Russell. 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. Most likely this started to reproduce if IOSurfaceGetBytesPerElementOfPlane was changed to produce correct results for the above YUV format. Later commits could add the validation back for formats that we know the pixel format type. * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm: (rx::IOSurfaceSurfaceEAGL::validateAttributes):
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (273581 => 273582)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2021-02-26 20:31:04 UTC (rev 273581)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2021-02-26 20:44:05 UTC (rev 273582)
@@ -1,3 +1,28 @@
+2021-02-26 Kimmo Kinnunen <kkinnu...@apple.com>
+
+ Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
+ https://bugs.webkit.org/show_bug.cgi?id=218637
+ <rdar://problem/71102126>
+
+ Reviewed by Kenneth Russell.
+
+ 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.
+ Most likely this started to reproduce if IOSurfaceGetBytesPerElementOfPlane
+ was changed to produce correct results for the above YUV format.
+
+ Later commits could add the validation back for formats that we know the
+ pixel format type.
+
+ * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
+ (rx::IOSurfaceSurfaceEAGL::validateAttributes):
+
2021-02-25 Kyle Piddington <kpidding...@apple.com>
Fix crashes in fast/canvas/webgl/texImage video tests
Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm (273581 => 273582)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm 2021-02-26 20:31:04 UTC (rev 273581)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm 2021-02-26 20:44:05 UTC (rev 273582)
@@ -38,8 +38,6 @@
GLenum internalFormat;
GLenum type;
- size_t componentBytes;
-
GLenum nativeInternalFormat;
GLenum nativeFormat;
GLenum nativeType;
@@ -48,12 +46,12 @@
// clang-format off
static const IOSurfaceFormatInfo kIOSurfaceFormats[] = {
- {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 },
+ {GL_RED, GL_UNSIGNED_BYTE, GL_R8, GL_RED, GL_UNSIGNED_BYTE },
+ {GL_R16UI, GL_UNSIGNED_SHORT, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT},
+ {GL_RG, GL_UNSIGNED_BYTE, GL_RG8, GL_RG, GL_UNSIGNED_BYTE },
+ {GL_RGB, GL_UNSIGNED_BYTE, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE },
+ {GL_BGRA_EXT, GL_UNSIGNED_BYTE, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE },
+ {GL_RGBA, GL_HALF_FLOAT, GL_RGBA, GL_RGBA, GL_HALF_FLOAT },
};
// clang-format on
@@ -318,14 +316,11 @@
{
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.
- // Check that the format matches this IOSurface plane
- if (IOSurfaceGetBytesPerElementOfPlane(ioSurface, plane) !=
- kIOSurfaceFormats[formatIndex].componentBytes)
- {
- return false;
- }
-
return true;
}
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes