Unreviewed, rolling out r161843.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jan 2014 06:29:18 +0000 (06:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jan 2014 06:29:18 +0000 (06:29 +0000)
http://trac.webkit.org/changeset/161843
https://bugs.webkit.org/show_bug.cgi?id=126871

Caused CSS custom filter tests to assert (Requested by smfr on
#webkit).

Source/WebCore:

* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getShaderInfoLog):

LayoutTests:

* fast/canvas/webgl/glsl-conformance-expected.txt:
* fast/canvas/webgl/glsl-conformance.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161862 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/glsl-conformance-expected.txt
LayoutTests/fast/canvas/webgl/glsl-conformance.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp

index b35ec4d..d711009 100644 (file)
@@ -1,3 +1,15 @@
+2014-01-12  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r161843.
+        http://trac.webkit.org/changeset/161843
+        https://bugs.webkit.org/show_bug.cgi?id=126871
+
+        Caused CSS custom filter tests to assert (Requested by smfr on
+        #webkit).
+
+        * fast/canvas/webgl/glsl-conformance-expected.txt:
+        * fast/canvas/webgl/glsl-conformance.html:
+
 2014-01-12  Brent Fulgham  <bfulgham@apple.com>
 
         Unreviewed test maintenance.
index d93b188..58b7bfb 100644 (file)
@@ -28,9 +28,6 @@ PASS [vshaderWithImplicitVec3Cast/fshader]: vertex shader that implicit vec3 to
 PASS [vshaderWithVersion130/fshader]: vertex shader uses the #version not 100 directive should fail
 PASS [vshaderWithVersion120/fshader]: vertex shader uses the #version not 100 directive should fail
 PASS [vshaderWithVersion100/fshader]: vertex shader uses the #version 100 directive should succeed
-Program link log:ERROR: Input of fragment shader 'v_varying' not written by vertex shader
-
-PASS [vshaderWithVersion100/fragmentShaderUsedVarying]: vertex shader with no varying and fragment shader with used varying must fail
 PASS [shaders/implicit/add_int_float.vert/fshader]: implicit cast adding integer to float should fail
 PASS [shaders/implicit/add_int_mat2.vert/fshader]: implicit cast adding integer to mat2 should fail
 PASS [shaders/implicit/add_int_mat3.vert/fshader]: implicit cast adding integer to mat3 should fail
index dc1b4a5..625c875 100644 (file)
@@ -211,16 +211,6 @@ void main()
     gl_Position = vPosition;
 }
 </script>
-<script id="fragmentShaderUsedVarying" type="text/something-not-javascript">
-precision mediump float;
-
-varying vec4 v_varying;
-
-void main()
-{
-    gl_FragColor = v_varying;
-}
-</script>
 <script id="vshaderWith__FILE__" type="text/something-not-javascript">
 __FILE__
 </script>
@@ -413,13 +403,6 @@ if (!gl) {
       linkSuccess: true,
       passMsg: 'vertex shader uses the #version 100 directive should succeed',
     },
-    { vShaderId: 'vshaderWithVersion100',
-      vShaderSuccess: true,
-      fShaderId: 'fragmentShaderUsedVarying',
-      fShaderSuccess: true,
-      linkSuccess: false,
-      passMsg: 'vertex shader with no varying and fragment shader with used varying must fail',
-    },
   ];
 
   // Read in all the shader source.
@@ -515,17 +498,13 @@ if (!gl) {
       gl.linkProgram(program);
       var linked = (gl.getProgramParameter(program, gl.LINK_STATUS) != 0);
       if (!linked) {
-        var error = gl.getProgramInfoLog(program);
+        var error = gl.getProgramInfoLog(shader);
         log("*** Error linking program '"+program+"':"+error);
       }
       if (linked != info.linkSuccess) {
         testFailed(passMsg);
         continue;
       }
-      if (!info.linkSuccess) {
-        var error = gl.getProgramInfoLog(program);
-        debug("Program link log:" + error);
-      }
     } else {
       if (info.linkSuccess) {
         testFailed(passMsg);
index 27a425b..a352e29 100644 (file)
@@ -1,5 +1,23 @@
 2014-01-12  Commit Queue  <commit-queue@webkit.org>
 
+        Unreviewed, rolling out r161843.
+        http://trac.webkit.org/changeset/161843
+        https://bugs.webkit.org/show_bug.cgi?id=126871
+
+        Caused CSS custom filter tests to assert (Requested by smfr on
+        #webkit).
+
+        * platform/graphics/ANGLEWebKitBridge.cpp:
+        (WebCore::getSymbolInfo):
+        (WebCore::ANGLEWebKitBridge::compileShaderSource):
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::compileShader):
+        (WebCore::GraphicsContext3D::getProgramInfoLog):
+        (WebCore::GraphicsContext3D::getShaderInfoLog):
+
+2014-01-12  Commit Queue  <commit-queue@webkit.org>
+
         Unreviewed, rolling out r161840.
         http://trac.webkit.org/changeset/161840
         https://bugs.webkit.org/show_bug.cgi?id=126870
index abfb06d..f0c1a1e 100644 (file)
@@ -60,7 +60,6 @@ static bool getSymbolInfo(ShHandle compiler, ShShaderInfo symbolType, Vector<ANG
         break;
     case SH_VARYINGS:
         symbolMaxNameLengthType = SH_VARYING_MAX_LENGTH;
-        break;
     default:
         ASSERT_NOT_REACHED();
         return false;
@@ -228,8 +227,6 @@ bool ANGLEWebKitBridge::compileShaderSource(const char* shaderSource, ANGLEShade
         return false;
     if (!getSymbolInfo(compiler, SH_ACTIVE_UNIFORMS, symbols))
         return false;
-    if (!getSymbolInfo(compiler, SH_VARYINGS, symbols))
-        return false;
 
     return true;
 }
index 3ef90d3..f1cfda2 100644 (file)
@@ -739,7 +739,6 @@ public:
     void getProgramiv(Platform3DObject program, GC3Denum pname, GC3Dint* value);
     void getNonBuiltInActiveSymbolCount(Platform3DObject program, GC3Denum pname, GC3Dint* value);
     String getProgramInfoLog(Platform3DObject);
-    String getUnmangledInfoLog(Platform3DObject[2], GC3Dsizei, const String&);
     void getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
     void getShaderiv(Platform3DObject, GC3Denum pname, GC3Dint* value);
     String getShaderInfoLog(Platform3DObject);
@@ -1085,7 +1084,6 @@ private:
     std::unique_ptr<ActiveShaderSymbolCounts> m_shaderSymbolCount;
 
     String mappedSymbolName(Platform3DObject program, ANGLEShaderSymbolType, const String& name);
-    String mappedSymbolName(Platform3DObject shaders[2], size_t count, const String& name);
     String originalSymbolName(Platform3DObject program, ANGLEShaderSymbolType, const String& name);
 
     ANGLEWebKitBridge m_compiler;
index 1c581e6..49bd44b 100644 (file)
@@ -47,7 +47,6 @@
 #include "IntSize.h"
 #include "Logging.h"
 #include "NotImplemented.h"
-#include "RegularExpression.h"
 #include "TemporaryOpenGLSetting.h"
 #include <cstring>
 #include <runtime/ArrayBuffer.h>
@@ -547,8 +546,7 @@ void GraphicsContext3D::compileShader(Platform3DObject shader)
         auto info = std::make_unique<GLchar[]>(length);
         ::glGetShaderInfoLog(shader, length, &size, info.get());
 
-        Platform3DObject shaders[2] = { shader, 0 };
-        entry.log = getUnmangledInfoLog(shaders, 1, String(info.get()));
+        entry.log = info.get();
     }
 
     if (GLCompileSuccess != GL_TRUE) {
@@ -808,24 +806,6 @@ String GraphicsContext3D::originalSymbolName(Platform3DObject program, ANGLEShad
     return name;
 }
 
-String GraphicsContext3D::mappedSymbolName(Platform3DObject shaders[2], size_t count, const String& name)
-{
-    for (size_t symbolType = 0; symbolType <= static_cast<size_t>(SHADER_SYMBOL_TYPE_VARYING); ++symbolType) {
-        for (size_t i = 0; i < count; ++i) {
-            ShaderSourceMap::iterator result = m_shaderSourceMap.find(shaders[i]);
-            if (result == m_shaderSourceMap.end())
-                continue;
-            
-            const ShaderSymbolMap& symbolMap = result->value.symbolMap(static_cast<enum ANGLEShaderSymbolType>(symbolType));
-            for (const auto& symbolEntry : symbolMap) {
-                if (symbolEntry.value.mappedName == name)
-                    return symbolEntry.key;
-            }
-        }
-    }
-    return name;
-}
-
 int GraphicsContext3D::getAttribLocation(Platform3DObject program, const String& name)
 {
     if (!program)
@@ -1298,36 +1278,6 @@ void GraphicsContext3D::getNonBuiltInActiveSymbolCount(Platform3DObject program,
     *value = m_shaderSymbolCount->countForType(pname);
 }
 
-String GraphicsContext3D::getUnmangledInfoLog(Platform3DObject shaders[2], GC3Dsizei count, const String& log)
-{
-    LOG(WebGL, "Was: %s", log.utf8().data());
-
-    RegularExpression regExp("webgl_[0123456789abcdefABCDEF]+", TextCaseSensitive);
-
-    String processedLog;
-    
-    int startFrom = 0;
-    int matchedLength = 0;
-    do {
-        int start = regExp.match(log, startFrom, &matchedLength);
-        if (start == -1)
-            break;
-
-        processedLog.append(log.substring(startFrom, start - startFrom));
-        startFrom = start + matchedLength;
-
-        const String& mangledSymbol = log.substring(start, matchedLength);
-        const String& mappedSymbol = mappedSymbolName(shaders, count, mangledSymbol);
-        LOG(WebGL, "Demangling: %s to %s", mangledSymbol.utf8().data(), mappedSymbol.utf8().data());
-        processedLog.append(mappedSymbol);
-    } while (startFrom < static_cast<int>(log.length()));
-
-    processedLog.append(log.substring(startFrom, log.length() - startFrom));
-
-    LOG(WebGL, "-->: %s", processedLog.utf8().data());
-    return processedLog;
-}
-
 String GraphicsContext3D::getProgramInfoLog(Platform3DObject program)
 {
     ASSERT(program);
@@ -1342,11 +1292,7 @@ String GraphicsContext3D::getProgramInfoLog(Platform3DObject program)
     auto info = std::make_unique<GLchar[]>(length);
     ::glGetProgramInfoLog(program, length, &size, info.get());
 
-    GC3Dsizei count;
-    Platform3DObject shaders[2];
-    getAttachedShaders(program, 2, &count, shaders);
-
-    return getUnmangledInfoLog(shaders, count, String(info.get()));
+    return String(info.get());
 }
 
 void GraphicsContext3D::getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value)
@@ -1413,8 +1359,7 @@ String GraphicsContext3D::getShaderInfoLog(Platform3DObject shader)
     auto info = std::make_unique<GLchar[]>(length);
     ::glGetShaderInfoLog(shader, length, &size, info.get());
 
-    Platform3DObject shaders[2] = { shader, 0 };
-    return getUnmangledInfoLog(shaders, 1, String(info.get()));
+    return String(info.get());
 }
 
 String GraphicsContext3D::getShaderSource(Platform3DObject shader)