Commit babce049 by James Darpinian Committed by Commit Bot

iOS: Disable worker contexts, and use sized formats

Kimmo Kinnunen made this change downstream in WebKit. https://bugs.webkit.org/show_bug.cgi?id=215908 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. Bug: angleproject:5104 Change-Id: Iebf1a04488c5137d55a278d973a34511e8dc46bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481850Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
parent 3c8f582b
...@@ -176,6 +176,15 @@ inline bool IsFuchsia() ...@@ -176,6 +176,15 @@ inline bool IsFuchsia()
#endif #endif
} }
inline bool IsIOS()
{
#if defined(ANGLE_PLATFORM_IOS)
return true;
#else
return false;
#endif
}
bool IsWayland(); bool IsWayland();
struct OSVersion struct OSVersion
......
...@@ -48,9 +48,9 @@ struct IOSurfaceFormatInfo ...@@ -48,9 +48,9 @@ struct IOSurfaceFormatInfo
// clang-format off // clang-format off
static const IOSurfaceFormatInfo kIOSurfaceFormats[] = { static const IOSurfaceFormatInfo kIOSurfaceFormats[] = {
{GL_RED, GL_UNSIGNED_BYTE, 1, GL_RED, GL_RED, GL_UNSIGNED_BYTE }, {GL_RED, GL_UNSIGNED_BYTE, 1, GL_R8, GL_RED, GL_UNSIGNED_BYTE },
{GL_R16UI, GL_UNSIGNED_SHORT, 2, GL_RED, GL_RED, GL_UNSIGNED_SHORT}, {GL_R16UI, GL_UNSIGNED_SHORT, 2, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT},
{GL_RG, GL_UNSIGNED_BYTE, 2, GL_RG, GL_RG, GL_UNSIGNED_BYTE }, {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_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_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_RGBA, GL_HALF_FLOAT, 8, GL_RGBA, GL_RGBA, GL_HALF_FLOAT },
......
...@@ -1692,8 +1692,9 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ...@@ -1692,8 +1692,9 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
// TODO(jie.a.chen@intel.com): Clean up the bugs. // TODO(jie.a.chen@intel.com): Clean up the bugs.
// anglebug.com/3031 // anglebug.com/3031
// crbug.com/922936 // crbug.com/922936
ANGLE_FEATURE_CONDITION(features, disableWorkerContexts, ANGLE_FEATURE_CONDITION(
(IsWindows() && (isIntel || isAMD)) || (IsLinux() && isNvidia)); features, disableWorkerContexts,
(IsWindows() && (isIntel || isAMD)) || (IsLinux() && isNvidia) || IsIOS());
bool limitMaxTextureSize = isIntel && IsLinux() && GetLinuxOSVersion() < OSVersion(5, 0, 0); bool limitMaxTextureSize = isIntel && IsLinux() && GetLinuxOSVersion() < OSVersion(5, 0, 0);
ANGLE_FEATURE_CONDITION(features, limitMaxTextureSizeTo4096, ANGLE_FEATURE_CONDITION(features, limitMaxTextureSizeTo4096,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment