The following enums had a small typo causing them to be takend from an
unused block:

EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM
EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE

Fix this by temporarily defining a secondary enum. Once Chromium is
fixed upstream we can remove the temporary enum.

Reported by dan.glastonbury@gmail.com.

Bug: angleproject:2806
Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc
Reviewed-on: https://chromium-review.googlesource.com/1220371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Jamie Madill 2018-09-13 11:20:52 -04:00 коммит произвёл Commit Bot
Родитель 17dff6d2f9
Коммит f4d429c1cb
6 изменённых файлов: 33 добавлений и 8 удалений

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

@ -53,7 +53,7 @@ New Tokens
Accepted as an attribute name in the <*attrib_list> argument to
eglCreateContext:
EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC
EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x33AC
Additions to the EGL 1.4 Specification

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

@ -53,7 +53,7 @@ New Tokens
Accepted as an attribute name in the <*attrib_list> argument to
eglCreateContext:
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x3AAD
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x33AD
Additions to the EGL 1.4 Specification

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

@ -125,17 +125,23 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLSt
#ifndef EGL_ANGLE_create_context_webgl_compatibility
#define EGL_ANGLE_create_context_webgl_compatibility 1
#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC
#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x33AC
// TODO(jmadill): Remove this. http://anglebug.com/2806
#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE_OLD 0x3AAC
#endif /* EGL_ANGLE_create_context_webgl_compatibility */
#ifndef EGL_ANGLE_display_texture_share_group
#define EGL_ANGLE_display_texture_share_group 1
#define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE 0x3AAF
#define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE 0x33AF
// TODO(jmadill): Remove this. http://anglebug.com/2806
#define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE_OLD 0x3AAF
#endif /* EGL_ANGLE_display_texture_share_group */
#ifndef EGL_CHROMIUM_create_context_bind_generates_resource
#define EGL_CHROMIUM_create_context_bind_generates_resource 1
#define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x3AAD
#define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x33AD
// TODO(jmadill): Remove this. http://anglebug.com/2806
#define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM_OLD 0x3AAD
#endif /* EGL_CHROMIUM_create_context_bind_generates_resource */
#ifndef EGL_ANGLE_create_context_client_arrays

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

@ -198,7 +198,9 @@ bool GetNoError(const egl::AttributeMap &attribs)
bool GetWebGLContext(const egl::AttributeMap &attribs)
{
return (attribs.get(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE, EGL_FALSE) == EGL_TRUE);
// TODO(jmadill): Remove this. http://anglebug.com/2806
return (attribs.get(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE, EGL_FALSE) == EGL_TRUE) ||
(attribs.get(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE_OLD, EGL_FALSE) == EGL_TRUE);
}
bool GetExtensionsEnabled(const egl::AttributeMap &attribs, bool webGLContext)
@ -210,7 +212,16 @@ bool GetExtensionsEnabled(const egl::AttributeMap &attribs, bool webGLContext)
bool GetBindGeneratesResource(const egl::AttributeMap &attribs)
{
return (attribs.get(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM, EGL_TRUE) == EGL_TRUE);
// TODO(jmadill): Remove this. http://anglebug.com/2806
if (attribs.contains(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM))
{
return (attribs.get(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM, EGL_TRUE) == EGL_TRUE);
}
else
{
return (attribs.get(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM_OLD, EGL_TRUE) ==
EGL_TRUE);
}
}
bool GetClientArraysEnabled(const egl::AttributeMap &attribs)

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

@ -763,8 +763,10 @@ Error Display::createContext(const Config *configuration,
}
// This display texture sharing will allow the first context to create the texture share group.
// TODO(jmadill): Remove this. http://anglebug.com/2806
bool usingDisplayTextureShareGroup =
attribs.get(EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE, EGL_FALSE) == EGL_TRUE;
attribs.get(EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE, EGL_FALSE) == EGL_TRUE ||
attribs.get(EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE_OLD, EGL_FALSE) == EGL_TRUE;
gl::TextureManager *shareTextures = nullptr;
if (usingDisplayTextureShareGroup)

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

@ -879,6 +879,8 @@ Error ValidateCreateContext(Display *display,
}
break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE_OLD:
case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE:
if (!display->getExtensions().createContextWebGLCompatibility)
{
@ -893,6 +895,8 @@ Error ValidateCreateContext(Display *display,
}
break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM_OLD:
case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM:
if (!display->getExtensions().createContextBindGeneratesResource)
{
@ -907,6 +911,8 @@ Error ValidateCreateContext(Display *display,
}
break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE_OLD:
case EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE:
if (!display->getExtensions().displayTextureShareGroup)
{