Metal: Distinguish Metal backend from OpenGL's Metal driver

On macOS 11+ OpenGL is implemented on top of Metal internally.
This CL changes ANGLE's Metal backend's renderer string to better
differentiate it from the above OpenGL renderer.

Bug: angleproject:5841
Change-Id: I0d5466594e385cb663d537db034c82b006b6e907
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2820179
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
This commit is contained in:
Le Hoang Quyen 2021-04-11 15:04:19 +08:00 коммит произвёл Le Hoang Quyen
Родитель d170f8e11b
Коммит a878e81459
3 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -139,7 +139,7 @@ std::string DisplayMtl::getRendererDescription()
{
ANGLE_MTL_OBJC_SCOPE
{
std::string desc = "Metal Renderer";
std::string desc = "ANGLE Metal Renderer";
if (mMetalDevice)
{

Просмотреть файл

@ -1005,10 +1005,6 @@ TEST_P(ImageTest, ANGLEExtensionAvailability)
}
else if (IsMetal())
{
// http://anglebug.com/5814
// http://anglebug.com/5841 (wrong detection of IsMetal() on macOS 11)
ANGLE_SKIP_TEST_IF(IsARM64());
// NOTE(hqle): Metal currently doesn't implement any image extensions besides
// EGL_ANGLE_metal_texture_client_buffer
EXPECT_TRUE(hasOESExt());

Просмотреть файл

@ -77,7 +77,7 @@ bool IsMetal()
{
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
std::string rendererString(renderer);
return (rendererString.find("Metal") != std::string::npos);
return (rendererString.find("ANGLE Metal") != std::string::npos);
}
bool IsD3D()