Changeset 220983 in webkit


Ignore:
Timestamp:
Aug 21, 2017 2:51:49 PM (7 years ago)
Author:
dino@apple.com
Message:

Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
https://bugs.webkit.org/show_bug.cgi?id=175783
<rdar://problem/33623867>

Reviewed by Alex Christensen.

Source/WebCore:

The version of ANGLE we use inserts this line into each shader:
It causes our lower-level GLSL compiler to give a warning, which is
confusing to developers because they didn't write this code.

Until we upgrade our OpenGL support to version 4.1, we should remove
this error message from the log returned to the developer.
See https://bugs.webkit.org/show_bug.cgi?id=175785

Test: fast/canvas/webgl/no-info-log-for-simple-shaders.html

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::getUnmangledInfoLog): Search for and remove
this warning.

LayoutTests:

  • fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt: Added.
  • fast/canvas/webgl/no-info-log-for-simple-shaders.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220981 r220983  
     12017-08-21  Dean Jackson  <dino@apple.com>
     2
     3        Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
     4        https://bugs.webkit.org/show_bug.cgi?id=175783
     5        <rdar://problem/33623867>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * fast/canvas/webgl/no-info-log-for-simple-shaders-expected.txt: Added.
     10        * fast/canvas/webgl/no-info-log-for-simple-shaders.html: Added.
     11
    1122017-08-21  Matt Lewis  <jlewis3@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r220980 r220983  
     12017-08-21  Dean Jackson  <dino@apple.com>
     2
     3        Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
     4        https://bugs.webkit.org/show_bug.cgi?id=175783
     5        <rdar://problem/33623867>
     6
     7        Reviewed by Alex Christensen.
     8
     9        The version of ANGLE we use inserts this line into each shader:
     10        #extension GL_ARB_gpu_shader5 : enable
     11        It causes our lower-level GLSL compiler to give a warning, which is
     12        confusing to developers because they didn't write this code.
     13
     14        Until we upgrade our OpenGL support to version 4.1, we should remove
     15        this error message from the log returned to the developer.
     16        See https://bugs.webkit.org/show_bug.cgi?id=175785
     17
     18        Test: fast/canvas/webgl/no-info-log-for-simple-shaders.html
     19
     20        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
     21        (WebCore::GraphicsContext3D::getUnmangledInfoLog): Search for and remove
     22        this warning.
     23
    1242017-08-21  Andy Estes  <aestes@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp

    r219910 r220983  
    15641564String GraphicsContext3D::getUnmangledInfoLog(Platform3DObject shaders[2], GC3Dsizei count, const String& log)
    15651565{
    1566     LOG(WebGL, "Was: %s", log.utf8().data());
     1566    LOG(WebGL, "Original ShaderInfoLog:\n%s", log.utf8().data());
    15671567
    15681568    JSC::Yarr::RegularExpression regExp("webgl_[0123456789abcdefABCDEF]+", TextCaseSensitive);
     
    15701570    StringBuilder processedLog;
    15711571   
    1572     int startFrom = 0;
     1572    // ANGLE inserts a "#extension" line into the shader source that
     1573    // causes a warning in some compilers. There is no point showing
     1574    // this warning to the user since they didn't write the code that
     1575    // is causing it.
     1576    static const NeverDestroyed<String> angleWarning = ASCIILiteral { "WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported\n" };
     1577    int startFrom = log.startsWith(angleWarning) ? angleWarning.get().length() : 0;
    15731578    int matchedLength = 0;
     1579
    15741580    do {
    15751581        int start = regExp.match(log, startFrom, &matchedLength);
     
    15881594    processedLog.append(log.substring(startFrom, log.length() - startFrom));
    15891595
    1590     LOG(WebGL, "-->: %s", processedLog.toString().utf8().data());
     1596    LOG(WebGL, "Unmangled ShaderInfoLog:\n%s", processedLog.toString().utf8().data());
    15911597    return processedLog.toString();
    15921598}
Note: See TracChangeset for help on using the changeset viewer.