Commit f9de2e20 by Jonah Ryan-Davis Committed by Commit Bot

Enable required extensions for Chromium to use the Metal backend.

This includes: EGL_ANGLE_display_texture_share_group EGL_ANGLE_display_semaphore_share_group EGL_ANGLE_robust_resource_initialization GL_EXT_debug_marker Bug: angleproject:4847 Bug: angleproject:4930 Bug: angleproject:4929 Bug: chromium:1112800 Bug: angleproject:4946 Change-Id: Ibacb6badf9f784dae3ca42514142ef13ee7297b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332863 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2e2fcfb5
......@@ -257,6 +257,13 @@ void DisplayMtl::generateExtensions(egl::DisplayExtensions *outExtensions) const
outExtensions->flexibleSurfaceCompatibility = true;
outExtensions->iosurfaceClientBuffer = true;
outExtensions->surfacelessContext = true;
outExtensions->displayTextureShareGroup = true;
outExtensions->displaySemaphoreShareGroup = true;
// Note that robust resource initialization is not yet implemented. We only expose
// this extension so that ANGLE can be initialized in Chrome. WebGL will fail to use
// this extension (anglebug.com/4929)
outExtensions->robustResourceInitialization = true;
}
void DisplayMtl::generateCaps(egl::Caps *outCaps) const {}
......@@ -584,7 +591,11 @@ void DisplayMtl::initializeExtensions() const
mNativeExtensions.framebufferMultisample = false;
mNativeExtensions.copyTexture = true;
mNativeExtensions.copyCompressedTexture = false;
mNativeExtensions.debugMarker = false;
// EXT_debug_marker is not implemented yet, but the entry points must be exposed for the Metal
// backend to be used in Chrome (http://anglebug.com/4946)
mNativeExtensions.debugMarker = true;
mNativeExtensions.robustness = true;
mNativeExtensions.textureBorderClampOES = false; // not implemented yet
mNativeExtensions.translatedShaderSource = true;
......
......@@ -584,6 +584,7 @@ ANGLE_INSTANTIATE_TEST(EGLContextSharingTest,
ES2_D3D9(),
ES2_D3D11(),
ES3_D3D11(),
ES2_METAL(),
ES2_OPENGL(),
ES3_OPENGL(),
ES2_VULKAN(),
......
......@@ -211,11 +211,23 @@ class RobustResourceInitTest : public ANGLETest
bool hasGLExtension()
{
// The extension is exposed in metal, but not actually implemented yet
// (http://anglebug.com/4929)
if (IsMetal())
{
return false;
}
return IsGLExtensionEnabled("GL_ANGLE_robust_resource_initialization");
}
bool hasEGLExtension()
{
// The extension is exposed in metal, but not actually implemented yet
// (http://anglebug.com/4929)
if (IsMetal())
{
return false;
}
return IsEGLDisplayExtensionEnabled(getEGLWindow()->getDisplay(),
"EGL_ANGLE_robust_resource_initialization");
}
......
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