<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - OpenGLShims appears to have a dead store if GLES2"
   href="https://bugs.webkit.org/show_bug.cgi?id=143964">143964</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>OpenGLShims appears to have a dead store if GLES2
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebGL
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joepeck&#64;webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>hausmann&#64;webkit.org, joepeck&#64;webkit.org, noam&#64;webkit.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>* SUMMARY
<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Build of OpenGLShims.cpp against EGL/GLES2 platforms is broken"
   href="show_bug.cgi?id=95556">Bug 95556</a> / r127874 introduced some GLES2 handling. It looks like it would cause a dead store. The code should be cleaned up in some way, or there is an actual bug.

Currently the code looks like:
<a href="https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp#L64">https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp#L64</a>

    static void* lookupOpenGLFunctionAddress(const char* functionName, bool* success = 0)
    {
        ...
        fullFunctionName = functionName;
        fullFunctionName.append(&quot;EXT&quot;);
        target = getProcAddress(fullFunctionName.utf8().data());

    #if defined(GL_ES_VERSION_2_0)
        fullFunctionName = functionName;
        fullFunctionName.append(&quot;ANGLE&quot;);
        target = getProcAddress(fullFunctionName.utf8().data());
        if (target)
            return target;

        fullFunctionName = functionName;
        fullFunctionName.append(&quot;APPLE&quot;);
        target = getProcAddress(fullFunctionName.utf8().data());
    #endif

        // A null address is still a failure case.
        if (!target &amp;&amp; success)
            *success = false;

        return target;
    }

Note that the target assignment for &quot;EXT&quot; will just immediately get overwritten by the &quot;ANGLE&quot;/&quot;APPLE&quot; case if GL_ES_VERSION_2_0.

So either there is a bug and the &quot;EXT&quot; case should be getting used, or there is not a bug and this is unnecessary work and the &quot;EXT&quot; case should just be an #else.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>