<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>143964</bug_id>
          
          <creation_ts>2015-04-20 14:08:28 -0700</creation_ts>
          <short_desc>OpenGLShims appears to have a dead store if GLES2</short_desc>
          <delta_ts>2024-01-17 01:10:27 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>joepeck</cc>
    
    <cc>jturcotte</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>noam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1086897</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-20 14:08:28 -0700</bug_when>
    <thetext>* SUMMARY
Bug 95556 / 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:
https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp#L64

    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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086898</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-20 14:11:05 -0700</bug_when>
    <thetext>My guess is there should be an:

    if (target)
        return target;

But I don&apos;t know how to test.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>