<?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>178705</bug_id>
          
          <creation_ts>2017-10-23 20:49:01 -0700</creation_ts>
          <short_desc>[WPE] Two WebGL layout tests are failing</short_desc>
          <delta_ts>2020-06-15 11:45:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aboya</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cadubentzen</cc>
    
    <cc>dpino</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1363550</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-10-23 20:49:01 -0700</bug_when>
    <thetext>Layout tests fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html and webgl/1.0.2/conformance/rendering/multisample-corruption.html are failing for WPE. Updating expectations accordingly.


--- /home/buildbot/wpe/wpe-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt
+++ /home/buildbot/wpe/wpe-linux-64-release-tests/build/layout-test-results/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-actual.txt
@@ -4,14 +4,18 @@
 
 Testing texImage2D with flipY=true
 Checking lower left corner
-PASS shouldBe 0,255,0
+FAIL shouldBe 0,255,0
+at (0, 0) expected: 0,255,0 was 0,0,0
 Checking upper left corner
-PASS shouldBe 255,0,0
+FAIL shouldBe 255,0,0
+at (0, 0) expected: 255,0,0 was 0,0,0
 Testing texImage2D with flipY=false
 Checking lower left corner
-PASS shouldBe 255,0,0
+FAIL shouldBe 255,0,0
+at (0, 0) expected: 255,0,0 was 0,0,0
 Checking upper left corner
-PASS shouldBe 0,255,0
+FAIL shouldBe 0,255,0
+at (0, 0) expected: 0,255,0 was 0,0,0
 Testing texSubImage2D with flipY=true
 Checking lower left corner
 PASS shouldBe 0,255,0
@@ -24,6 +28,7 @@
 PASS shouldBe 0,255,0
 PASS getError was expected value: NO_ERROR : should be no errors
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE



--- /home/buildbot/wpe/wpe-linux-64-release-tests/build/layout-test-results/webgl/1.0.2/conformance/rendering/multisample-corruption-expected.txt
+++ /home/buildbot/wpe/wpe-linux-64-release-tests/build/layout-test-results/webgl/1.0.2/conformance/rendering/multisample-corruption-actual.txt
@@ -1,5 +1,5 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance/rendering/multisample-corruption.html
-PASS
+FAIL</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1413175</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Bentzen">cadubentzen</who>
    <bug_when>2018-04-09 21:29:25 -0700</bug_when>
    <thetext>fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html is passing since r225060 (see bug 180000).

About webgl/1.0.2/conformance/rendering/multisample-corruption.html, the bug happens because antialiasing is disabled for GLES2 (check GraphicsContext3D::validateAttributes() in GraphicsContext3DOpenGLES.cpp)

In order to enable it, one of these extensions would be required, since according to the specification GLES2 does not support multisampling in framebuffer objects:
- APPLE_framebuffer_multisample, which is what Apple used enclosed in #if&apos;s, or
- ANGLE_framebuffer_multisample, which is implemented in ANGLE translating it OpenGL extensions calls or
- other vendor-specific extensions

So right now GraphicsContext3D::resolveMultisamplingIfNecessary() for GLES is empty and I don&apos;t know how exactly to implement it without non vendor-specific GLES2 extensions. GLES3 on the other hand does support multisampling in framebuffer objects.

The test can be run manually from here: https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/multisample-corruption.html

By the way, WebKit-based browsers (GTK and Safari) seem to make the red canvas in the test disappear or turn black, which does not seem like a correct behavior although the pixel reading values still returns correct. I could not trace to exactly why it happens but Chrome and Firefox display correctly. Disabling accelerated compositing make WebKitGTK+ to work OK.

Please correct me if I made wrong conclusions in the above investigation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489614</commentid>
    <comment_count>2</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2018-12-19 17:07:03 -0800</bug_when>
    <thetext>*/multiframe-corruption.html failures are flaky by nature, I&apos;ll mark them as such. Same applies for the much more verbose webgl/2.0.0/conformance/rendering/multisample-corruption.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1662740</commentid>
    <comment_count>3</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2020-06-15 11:45:15 -0700</bug_when>
    <thetext>Only webgl/1.0.3/conformance/rendering/multisample-corruption.html was filed under this bug in WPE test expectations. The test is no longer flaky as it has been consistently failing for the last 4000 revisions.

Filed a new bug: webkit.org/b/213203.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>