Commit f4d429c1 by Jamie Madill Committed by Commit Bot

Fix EGL enum allocation.

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: 's avatarYuly Novikov <ynovikov@chromium.org>
parent 17dff6d2
...@@ -53,7 +53,7 @@ New Tokens ...@@ -53,7 +53,7 @@ New Tokens
Accepted as an attribute name in the <*attrib_list> argument to Accepted as an attribute name in the <*attrib_list> argument to
eglCreateContext: eglCreateContext:
EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x33AC
Additions to the EGL 1.4 Specification Additions to the EGL 1.4 Specification
......
...@@ -53,7 +53,7 @@ New Tokens ...@@ -53,7 +53,7 @@ New Tokens
Accepted as an attribute name in the <*attrib_list> argument to Accepted as an attribute name in the <*attrib_list> argument to
eglCreateContext: eglCreateContext:
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x3AAD EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x33AD
Additions to the EGL 1.4 Specification Additions to the EGL 1.4 Specification
......
...@@ -125,17 +125,23 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLSt ...@@ -125,17 +125,23 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLSt
#ifndef EGL_ANGLE_create_context_webgl_compatibility #ifndef EGL_ANGLE_create_context_webgl_compatibility
#define EGL_ANGLE_create_context_webgl_compatibility 1 #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 */ #endif /* EGL_ANGLE_create_context_webgl_compatibility */
#ifndef EGL_ANGLE_display_texture_share_group #ifndef EGL_ANGLE_display_texture_share_group
#define EGL_ANGLE_display_texture_share_group 1 #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 */ #endif /* EGL_ANGLE_display_texture_share_group */
#ifndef EGL_CHROMIUM_create_context_bind_generates_resource #ifndef EGL_CHROMIUM_create_context_bind_generates_resource
#define EGL_CHROMIUM_create_context_bind_generates_resource 1 #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 */ #endif /* EGL_CHROMIUM_create_context_bind_generates_resource */
#ifndef EGL_ANGLE_create_context_client_arrays #ifndef EGL_ANGLE_create_context_client_arrays
......
...@@ -198,7 +198,9 @@ bool GetNoError(const egl::AttributeMap &attribs) ...@@ -198,7 +198,9 @@ bool GetNoError(const egl::AttributeMap &attribs)
bool GetWebGLContext(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) bool GetExtensionsEnabled(const egl::AttributeMap &attribs, bool webGLContext)
...@@ -210,7 +212,16 @@ 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) 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) bool GetClientArraysEnabled(const egl::AttributeMap &attribs)
......
...@@ -763,8 +763,10 @@ Error Display::createContext(const Config *configuration, ...@@ -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. // 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 = 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; gl::TextureManager *shareTextures = nullptr;
if (usingDisplayTextureShareGroup) if (usingDisplayTextureShareGroup)
......
...@@ -879,6 +879,8 @@ Error ValidateCreateContext(Display *display, ...@@ -879,6 +879,8 @@ Error ValidateCreateContext(Display *display,
} }
break; break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE_OLD:
case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE: case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE:
if (!display->getExtensions().createContextWebGLCompatibility) if (!display->getExtensions().createContextWebGLCompatibility)
{ {
...@@ -893,6 +895,8 @@ Error ValidateCreateContext(Display *display, ...@@ -893,6 +895,8 @@ Error ValidateCreateContext(Display *display,
} }
break; break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM_OLD:
case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM: case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM:
if (!display->getExtensions().createContextBindGeneratesResource) if (!display->getExtensions().createContextBindGeneratesResource)
{ {
...@@ -907,6 +911,8 @@ Error ValidateCreateContext(Display *display, ...@@ -907,6 +911,8 @@ Error ValidateCreateContext(Display *display,
} }
break; break;
// TODO(jmadill): Remove this. http://anglebug.com/2806
case EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE_OLD:
case EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE: case EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE:
if (!display->getExtensions().displayTextureShareGroup) if (!display->getExtensions().displayTextureShareGroup)
{ {
......
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