Update ANGLE to latest as of August 25, 2016
authorbrianosman <brianosman@google.com>
Fri, 26 Aug 2016 17:37:57 +0000 (10:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Aug 2016 17:37:57 +0000 (10:37 -0700)
With this version, it's now exposing GL_EXT_color_buffer_half_float, but
it's (incorrectly) using GL_HALF_FLOAT rather than GL_HALF_FLOAT_OES.
In addition, release builds were crashing in EGLImageTest due to an
apparent disagreement about calling convention on function-pointer to
exported symbol. There is a proper typedef for that in one of their
headers, but I can't seem to include it without creating more problems,
so I just fixed the decoration on our local typedef.

With those changes, all tests pass, and (on my Windows machine), all
GMs and SKPs produce identical results vs. master in angle and angle-gl.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2282733003

Review-Url: https://codereview.chromium.org/2282733003

DEPS
gyp/common_variables.gypi
src/gpu/gl/GrGLCaps.cpp
tools/gpu/gl/angle/GLTestContext_angle.cpp

diff --git a/DEPS b/DEPS
index 62f6fd9..0be68eb 100644 (file)
--- a/DEPS
+++ b/DEPS
@@ -10,7 +10,7 @@ deps = {
   # There is some duplication here that might be worth cleaning up:
   #   - can use use our existing t_p/e/libjpeg instead of pulling it for Android?
 
-  "third_party/externals/angle2"  : "https://chromium.googlesource.com/angle/angle.git@8182049470aa3ba0c9f7c54ef965bf1877df08cb",
+  "third_party/externals/angle2"  : "https://chromium.googlesource.com/angle/angle.git@55033e583ba1bc5cbfafbab11d3255fecdfe9056",
   "third_party/externals/cmake"   : "https://cmake.googlesource.com/cmake.git@v3.3.1",
   "third_party/externals/freetype": "https://skia.googlesource.com/third_party/freetype2.git@6a19a7d332c5446542196e5aeda0ede109ef097b",
   "third_party/externals/gyp"     : "https://chromium.googlesource.com/external/gyp.git@87ac4d0e63fc7dd8152a350327fea8dcf031bf56",
index 68d5072..4588594 100644 (file)
@@ -75,6 +75,7 @@
       'arm_version%': '<(arm_version)',
       'arm_neon%': '<(arm_neon)',
       'skia_egl%': '<(skia_egl)',
+      'use_ozone%': 0, # ANGLE requires this to be defined.
       'vulkan_merged_into_skia%': '<(vulkan_merged_into_skia)',
       'conditions': [
         [ 'skia_android_framework == 1', {
index 3385dbc..7b66898 100644 (file)
@@ -1699,7 +1699,9 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa
             = GR_GL_ALPHA;
         fConfigTable[kAlpha_half_GrPixelConfig].fSwizzle = GrSwizzle::AAAA();
     }
-    if (kGL_GrGLStandard == ctxInfo.standard() || ctxInfo.version() >= GR_GL_VER(3, 0)) {
+    // ANGLE reports the wrong format for half-float (See http://anglebug.com/1478)
+    if (kGL_GrGLStandard == ctxInfo.standard() || ctxInfo.version() >= GR_GL_VER(3, 0) ||
+        kANGLE_GrGLDriver == ctxInfo.driver()) {
         fConfigTable[kAlpha_half_GrPixelConfig].fFormats.fExternalType = GR_GL_HALF_FLOAT;
     } else {
         fConfigTable[kAlpha_half_GrPixelConfig].fFormats.fExternalType = GR_GL_HALF_FLOAT_OES;
@@ -1723,7 +1725,9 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa
     fConfigTable[kRGBA_half_GrPixelConfig].fFormats.fSizedInternalFormat = GR_GL_RGBA16F;
     fConfigTable[kRGBA_half_GrPixelConfig].fFormats.fExternalFormat[kOther_ExternalFormatUsage] =
         GR_GL_RGBA;
-    if (kGL_GrGLStandard == ctxInfo.standard() || ctxInfo.version() >= GR_GL_VER(3, 0)) {
+    // ANGLE reports the wrong format for half-float (See http://anglebug.com/1478)
+    if (kGL_GrGLStandard == ctxInfo.standard() || ctxInfo.version() >= GR_GL_VER(3, 0) ||
+        kANGLE_GrGLDriver == ctxInfo.driver()) {
         fConfigTable[kRGBA_half_GrPixelConfig].fFormats.fExternalType = GR_GL_HALF_FLOAT;
     } else {
         fConfigTable[kRGBA_half_GrPixelConfig].fFormats.fExternalType = GR_GL_HALF_FLOAT_OES;
index daa53c4..8cc6f99 100644 (file)
@@ -199,7 +199,7 @@ GrGLuint ANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const {
     if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) {
         return 0;
     }
-    typedef GrGLvoid (*EGLImageTargetTexture2DProc)(GrGLenum, GrGLeglImage);
+    typedef GrGLvoid (EGLAPIENTRY *EGLImageTargetTexture2DProc)(GrGLenum, GrGLeglImage);
     EGLImageTargetTexture2DProc glEGLImageTargetTexture2D =
         (EGLImageTargetTexture2DProc)eglGetProcAddress("glEGLImageTargetTexture2DOES");
     if (!glEGLImageTargetTexture2D) {