<?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>137842</bug_id>
          
          <creation_ts>2014-10-17 19:22:07 -0700</creation_ts>
          <short_desc>REGRESSION(r174107): [EFL] WebGL broken</short_desc>
          <delta_ts>2017-03-11 10:35:45 -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>WebKit EFL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=143561</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>144247</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>gyuyoung.kim</cc>
    
    <cc>hs85.jeong</cc>
    
    <cc>jinwoo7.song</cc>
    
    <cc>lucas.de.marchi</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mtiborinf</cc>
    
    <cc>ossy</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>yoon</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1042546</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2014-10-17 19:22:07 -0700</bug_when>
    <thetext>Revision r174107 &lt;http://trac.webkit.org/r174107&gt; updated the EFL libraries used by WebKitEFL to a major new version. WebGL support is broken since that.

On the terminal, I get &quot;evas_gl_new() Evas GL engine not available.&quot; errors.

I&apos;m using the internal jhbuild, and I execute the minibrowser as follows:

$ cd WebKit
$ LD_LIBRARY_PATH=$(pwd)/WebKitBuild/Dependencies/Root/lib WebKitBuild/Release/bin/MiniBrowser http://get.webgl.org/

When it loads, the page says &quot;Your browser supports WebGL&quot;, *but* the cube don&apos;t shows.

I also tried https://webglsamples.googlecode.com/hg/aquarium/aquarium.html and it don&apos;t shows any fish on the screen (however it still reports the number of fps despite only showing a grey screen)

I tested to revert r174107, then I wiped out WebKitBuild/Dependencies and rebuilt all the jhbuild dependencies (Tools/Scripts/update-webkitefl-libs), and tried the test again. Now it works as expected in both tests.

For the record: I tried this on two machines. One with a Nvidia GPU and the proprietary drivers, and another one with an Intel GPU (sandybridge) and the free Mesa drivers (both machines running Debian testing). The same result on both machines: WebGL is broken, but reverting r174107 fixes it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1045689</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-11-03 01:57:09 -0800</bug_when>
    <thetext>WebGL tests are skipped since 7+ months: https://trac.webkit.org/changeset/167345 , so I&apos;m not sure if it is important for EFL port nowadays.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051064</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-11-26 04:04:00 -0800</bug_when>
    <thetext>WebGL is still broken with the latest EFL too.

Any plan to fix it? If it isn&apos;t imporant / supported to have 
working WebGL with EFL, why not simple disable building it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051804</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-12-02 05:05:07 -0800</bug_when>
    <thetext>Can we get a feedback from EFL maintainers if WebGL is supported / important?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1052726</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-12-05 07:33:54 -0800</bug_when>
    <thetext>ping?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053252</commentid>
    <comment_count>5</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2014-12-07 17:19:19 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Can we get a feedback from EFL maintainers if WebGL is supported / important?

I think WebGL is important to us. Besides Tizen also has supported WebGL based on  WebKit. Let me check if after finishing my local work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053255</commentid>
    <comment_count>6</comment_count>
    <who name="Jinwoo Song">jinwoo7.song</who>
    <bug_when>2014-12-07 17:43:44 -0800</bug_when>
    <thetext>FYI, in my local environment, webGL runs well with latest code.
I&apos;m using ubuntu 13.10 and NVIDIA driver.

ELM_ENGINE=opengl_x11 ./MiniBrowser http://get.webgl.org/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053333</commentid>
    <comment_count>7</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-12-08 02:27:44 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; FYI, in my local environment, webGL runs well with latest code.
&gt; I&apos;m using ubuntu 13.10 and NVIDIA driver.
&gt; 
&gt; ELM_ENGINE=opengl_x11 ./MiniBrowser http://get.webgl.org/

Ah, one more magic environment variable. It really works. Thanks.

But it worked out-of-the-box previously - with EFL 1.10, but something 
changed with 1.11, and now we need this magic. We already tried the -e
option of MiniBrowser, but it doesn&apos;t work, only this env magic helps.

Can&apos;t we make it work out-of-the-box somehow?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053339</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-12-08 03:14:45 -0800</bug_when>
    <thetext>I checked, MiniBrowser calls elm_config_preferred_engine_set(&quot;opengl_x11&quot;) 
by default if we don&apos;t pass -e command line argument. Something must be
changed in elementary between 1.10 and 1.11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053342</commentid>
    <comment_count>9</comment_count>
    <who name="Gwang Yoon Hwang">yoon</who>
    <bug_when>2014-12-08 03:24:00 -0800</bug_when>
    <thetext>For me, I couldn&apos;t use evas_gl backend without EVAS_GL_NO_BLACKLIST environment.

As you can see, several GPUs are blacklisted (including llvm!), I cannot run WebKitEFL with OpenGL acceleration using out-of-box.

https://github.com/kakaroto/e17/blob/master/evas/src/modules/engines/gl_x11/evas_x_main.c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053438</commentid>
    <comment_count>10</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-12-08 10:52:41 -0800</bug_when>
    <thetext>The problem is come from elementary/src/lib/elm_win.c:

...
static Eina_Bool
_accel_is_gl(void)
{
   const char *env = NULL;
   const char *str = NULL;

   if (_elm_config-&gt;accel) str = _elm_config-&gt;accel;
   if (_elm_accel_preference) str = _elm_accel_preference;
   if ((_elm_config-&gt;accel_override) &amp;&amp; (_elm_config-&gt;accel))
     str = _elm_config-&gt;accel;
   env = getenv(&quot;ELM_ACCEL&quot;);
   if (env) str = env;
   if ((str) &amp;&amp;
       ((!strcasecmp(str, &quot;gl&quot;)) ||
        (!strcasecmp(str, &quot;opengl&quot;)) ||
        (!strcasecmp(str, &quot;3d&quot;)) ||
        (!strcasecmp(str, &quot;hw&quot;)) ||
        (!strcasecmp(str, &quot;accel&quot;)) ||
        (!strcasecmp(str, &quot;hardware&quot;))
       ))
     return EINA_TRUE;
   return EINA_FALSE;                         &lt;-------------- BANG!!!
}

...
       else if ((getenv(&quot;DISPLAY&quot;)) &amp;&amp; (!getenv(&quot;ELM_ENGINE&quot;)))
          {
             if (_accel_is_gl())
               {
                  enginelist[0] = ELM_OPENGL_X11;
                  enginelist[1] = ELM_SOFTWARE_X11;
                  enginelist[2] = NULL;
               }
             else
               {
                  enginelist[0] = ELM_SOFTWARE_X11;   &lt; -------- BANG !!!!!
                  enginelist[1] = ELM_OPENGL_X11;
                  enginelist[2] = NULL;
               }
          }
...

To put ELM_OPENGL_X11 in the first place, we should set the ELM_ENGINE
environment variable automatically for MiniBrowser and WebKitTestrunner too,
or make _accel_is_gl() is true with setting ELM_ACCEL env or 
elm_config_accel_preference_set(&quot;opengl&quot;) or something different
API call, which modifies _elm_accel_preference and _elm_config-&gt;accel_override.

Additional problem is to run webgl tests. EFL /elementary / whatever else
disables gl if we use xvfb. We shouldn&apos;t do it or should have a dedicated
tester machine with DISABLE_XVFB_DRIVER=1 environment variable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053835</commentid>
    <comment_count>11</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2014-12-09 10:20:04 -0800</bug_when>
    <thetext>I don&apos;t know why upstream (EFL) disables GL at the first shot. I guess they have a good reason, it would be nice to know that reason.

But at least on the WebKitEFL jhbuild I guess some patches are needed to ensure that it runs with GL support enabled even when using the LLVM pipe software rasterizer (the one that is used with xvfb for the tests)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059961</commentid>
    <comment_count>12</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-08 14:49:29 -0800</bug_when>
    <thetext>Any plan to make WebGL work out-of-the-box without magic environment variable hacks?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1061121</commentid>
    <comment_count>13</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-01-14 01:33:22 -0800</bug_when>
    <thetext>ping?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1072333</commentid>
    <comment_count>14</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-02-26 03:34:34 -0800</bug_when>
    <thetext>I skipped these tests properly in http://trac.webkit.org/changeset/180670.
Please unskip once WebGL works out of the box on the EFL bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088207</commentid>
    <comment_count>15</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2015-04-24 02:38:50 -0700</bug_when>
    <thetext>Currently openGL only works on EFL MiniBrowser. It isn&apos;t supported by EFL WebKitTestRunner.

According to our investigation, EFL seems to only support openGL backend when using elementary. That&apos;s why EFL MiniBrowser is able to use openGL.

 - https://lists.webkit.org/pipermail/webkit-dev/2015-April/027391.html

To fix this problem, we may need to fix EFL itself, or make WKR to use Elementary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088906</commentid>
    <comment_count>16</comment_count>
      <attachid>251719</attachid>
    <who name="Hunseop Jeong">hs85.jeong</who>
    <bug_when>2015-04-26 19:23:47 -0700</bug_when>
    <thetext>Created attachment 251719
Using Xorg driver for WTR until fix the GL issue on xvfb driver.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102113</commentid>
    <comment_count>17</comment_count>
    <who name="Gyuyoung Kim">gyuyoung.kim</who>
    <bug_when>2015-06-15 18:31:16 -0700</bug_when>
    <thetext>(In reply to comment #16)
&gt; Created attachment 251719 [details]
&gt; Using Xorg driver for WTR until fix the GL issue on xvfb driver.

When we enable USE_NATIVE_XDISPLAY, too many flaky tests have been generated. When using it, WTR compares image buffer during layout test (I don&apos;t know why WTR compare image buffer when enabling the USE_NATIVE_XDISPLAY yet). However test results are different during the two test cycles. That&apos;s why there are too many flaky tests on EFL bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1286281</commentid>
    <comment_count>18</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-03-11 10:35:45 -0800</bug_when>
    <thetext>Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>251719</attachid>
            <date>2015-04-26 19:23:47 -0700</date>
            <delta_ts>2015-04-26 19:23:47 -0700</delta_ts>
            <desc>Using Xorg driver for WTR until fix the GL issue on xvfb driver.</desc>
            <filename>Xorg.patch</filename>
            <type>text/plain</type>
            <size>1105</size>
            <attacher name="Hunseop Jeong">hs85.jeong</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1Rvb2xzL1NjcmlwdHMvd2Via2l0cHkvcG9ydC9lZmwucHkgYi9Ub29scy9T
Y3JpcHRzL3dlYmtpdHB5L3BvcnQvZWZsLnB5CmluZGV4IDNjODkyMTkuLjkxOTVhYjIgMTAwNjQ0
Ci0tLSBhL1Rvb2xzL1NjcmlwdHMvd2Via2l0cHkvcG9ydC9lZmwucHkKKysrIGIvVG9vbHMvU2Ny
aXB0cy93ZWJraXRweS9wb3J0L2VmbC5weQpAQCAtMzIsNiArMzIsNyBAQCBpbXBvcnQgb3MKIGZy
b20gd2Via2l0cHkubGF5b3V0X3Rlc3RzLm1vZGVscy50ZXN0X2NvbmZpZ3VyYXRpb24gaW1wb3J0
IFRlc3RDb25maWd1cmF0aW9uCiBmcm9tIHdlYmtpdHB5LnBvcnQuYmFzZSBpbXBvcnQgUG9ydAog
ZnJvbSB3ZWJraXRweS5wb3J0LnB1bHNlYXVkaW9fc2FuaXRpemVyIGltcG9ydCBQdWxzZUF1ZGlv
U2FuaXRpemVyCitmcm9tIHdlYmtpdHB5LnBvcnQueG9yZ2RyaXZlciBpbXBvcnQgWG9yZ0RyaXZl
cgogZnJvbSB3ZWJraXRweS5wb3J0Lnh2ZmJkcml2ZXIgaW1wb3J0IFh2ZmJEcml2ZXIKIGZyb20g
d2Via2l0cHkucG9ydC5saW51eF9nZXRfY3Jhc2hfbG9nIGltcG9ydCBHREJDcmFzaExvZ0dlbmVy
YXRvcgogCkBAIC00OSw2ICs1MCw4IEBAIGNsYXNzIEVmbFBvcnQoUG9ydCk6CiAKICAgICAgICAg
c2VsZi5fcHVsc2VhdWRpb19zYW5pdGl6ZXIgPSBQdWxzZUF1ZGlvU2FuaXRpemVyKCkKIAorICAg
ICAgICBvcy5lbnZpcm9uWydVU0VfTkFUSVZFX1hESVNQTEFZJ10gPSAnMScKKwogICAgIGRlZiBf
cG9ydF9mbGFnX2Zvcl9zY3JpcHRzKHNlbGYpOgogICAgICAgICByZXR1cm4gIi0tZWZsIgogCkBA
IC05OCw2ICsxMDEsOCBAQCBjbGFzcyBFZmxQb3J0KFBvcnQpOgogICAgIGRlZiBfZHJpdmVyX2Ns
YXNzKHNlbGYpOgogICAgICAgICBpZiBvcy5lbnZpcm9uLmdldCgiRElTQUJMRV9YVkZCX0RSSVZF
UiIpOgogICAgICAgICAgICAgcmV0dXJuIFBvcnQuX2RyaXZlcl9jbGFzcyhzZWxmKQorICAgICAg
ICBpZiBvcy5lbnZpcm9uLmdldCgiVVNFX05BVElWRV9YRElTUExBWSIpOgorICAgICAgICAgICAg
cmV0dXJuIFhvcmdEcml2ZXIKICAgICAgICAgcmV0dXJuIFh2ZmJEcml2ZXIKIAogICAgIGRlZiBf
cGF0aF90b19kcml2ZXIoc2VsZik6Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>