<?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>212594</bug_id>
          
          <creation_ts>2020-06-01 07:34:38 -0700</creation_ts>
          <short_desc>[ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html &amp; webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html are constant failures</short_desc>
          <delta_ts>2021-08-31 01:43:31 -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>WebGL</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=229668</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jacob Uphoff">jacob_uphoff</reporter>
          <assigned_to name="Dean Jackson">dino</assigned_to>
          <cc>cdumez</cc>
    
    <cc>dino</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>kangil.han</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1657898</commentid>
    <comment_count>0</comment_count>
    <who name="Jacob Uphoff">jacob_uphoff</who>
    <bug_when>2020-06-01 07:34:38 -0700</bug_when>
    <thetext>webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html
webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html

These tests became constant failures after commit r262366 for all of macOS.

History:

https://results.webkit.org/?suite=layout-tests&amp;suite=layout-tests&amp;test=webgl%2F2.0.0%2Fconformance%2Fcanvas%2Fbuffer-offscreen-test.html&amp;test=webgl%2F1.0.3%2Fconformance%2Fcanvas%2Fbuffer-offscreen-test.html

Diffs:

--- /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/webgl/1.0.3/conformance/canvas/buffer-offscreen-test-expected.txt
+++ /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/webgl/1.0.3/conformance/canvas/buffer-offscreen-test-actual.txt
@@ -1,5 +1,14 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance/canvas/buffer-offscreen-test.html
-[ PASS ] All tests passed
+[ 1: PASS ] gl1 != null is true
+[ 2: PASS ] gl2 != null is true
+[ 3: PASS ] gl1.getContextAttributes().preserveDrawingBuffer == false is true
+[ 4: PASS ] gl2.getContextAttributes().preserveDrawingBuffer == false is true
+[ 5: PASS ] cleared corner should be blue, stencil should be preserved
+[ 6: PASS ] remainder of buffer should be cleared
+[ 7: PASS ] cleared corner should be blue, stencil should be preserved
+[ 8: FAIL ] at (0, 0) expected: 255,0,0,255 was 0,0,0,0
+[ 9: PASS ] successfullyParsed is true
+[ FAIL ] 1 failures reported
 

--- /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/webgl/2.0.0/conformance/canvas/buffer-offscreen-test-expected.txt
+++ /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/webgl/2.0.0/conformance/canvas/buffer-offscreen-test-actual.txt
@@ -1,5 +1,14 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance/canvas/buffer-offscreen-test.html
-[ PASS ] All tests passed
+[ 1: PASS ] gl1 != null is true
+[ 2: PASS ] gl2 != null is true
+[ 3: PASS ] gl1.getContextAttributes().preserveDrawingBuffer == false is true
+[ 4: PASS ] gl2.getContextAttributes().preserveDrawingBuffer == false is true
+[ 5: PASS ] cleared corner should be blue, stencil should be preserved
+[ 6: PASS ] remainder of buffer should be cleared
+[ 7: PASS ] cleared corner should be blue, stencil should be preserved
+[ 8: FAIL ] remainder of buffer should be un-cleared red at (0, 0) expected: 255,0,0,255 was 0,0,0,0
+[ 9: PASS ] successfullyParsed is true
+[ FAIL ] 1 failures reported</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1657899</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-06-01 07:35:04 -0700</bug_when>
    <thetext>&lt;rdar://problem/63828783&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658125</commentid>
    <comment_count>2</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2020-06-01 17:32:07 -0700</bug_when>
    <thetext>Marked tests as failing in r262400</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658496</commentid>
    <comment_count>3</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 16:25:07 -0700</bug_when>
    <thetext>It&apos;s quite confusing as to how I could have broken this. Maybe another case where we are setting the GL state temporarily for compositing and not restoring it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658498</commentid>
    <comment_count>4</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 16:26:20 -0700</bug_when>
    <thetext>Our visual result is correct. It&apos;s the content read from the in-progress draw that&apos;s wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658537</commentid>
    <comment_count>5</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 18:25:49 -0700</bug_when>
    <thetext>Hmmm.. I see an extra call to clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658542</commentid>
    <comment_count>6</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 18:31:51 -0700</bug_when>
    <thetext>Oh. I see.

We shouldn&apos;t prepare the canvas if it isn&apos;t going to be displayed. We&apos;re effectively swapping the drawing buffer on a canvas that is never drawn, so when it is read back out it is cleared.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658552</commentid>
    <comment_count>7</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 18:50:46 -0700</bug_when>
    <thetext>Now that I think of it, this whole area could do with some cleanup. We really only need a WebGLLayer when the owning canvas is put in the page. It&apos;s a bit weird that the GraphicsContextGL lets the WebGLLayer manage the IOSurface backbuffers. Instead it should just hand the current framebuffer surface to the layer.

I don&apos;t want to make such a big change right now though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658563</commentid>
    <comment_count>8</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 19:03:39 -0700</bug_when>
    <thetext>This is slightly tricky since we indicate we need preparation as we touch GL, but we only know if we need to actually prepare at the end of the run loop.

So I guess the Document::prepareCanvasesForDisplayIfNeeded has an even more correct name now. It should check if the canvas element is actually in its body before preparing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658573</commentid>
    <comment_count>9</comment_count>
      <attachid>400880</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-02 19:21:27 -0700</bug_when>
    <thetext>Created attachment 400880
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658755</commentid>
    <comment_count>10</comment_count>
      <attachid>400880</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-06-03 09:56:16 -0700</bug_when>
    <thetext>Comment on attachment 400880
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400880&amp;action=review

&gt; Source/WebCore/ChangeLog:3
&gt; +        [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html &amp; webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html are constant failures

Could you please unmark the tests in a single commit with the fix?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658812</commentid>
    <comment_count>11</comment_count>
      <attachid>400880</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-03 11:38:30 -0700</bug_when>
    <thetext>Comment on attachment 400880
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400880&amp;action=review

&gt;&gt; Source/WebCore/ChangeLog:3
&gt;&gt; +        [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html &amp; webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html are constant failures
&gt; 
&gt; Could you please unmark the tests in a single commit with the fix?

Yes, I should have thought of that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1658820</commentid>
    <comment_count>12</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-06-03 11:49:29 -0700</bug_when>
    <thetext>Committed r262498: &lt;https://trac.webkit.org/changeset/262498&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>400880</attachid>
            <date>2020-06-02 19:21:27 -0700</date>
            <delta_ts>2020-06-02 19:28:20 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-212594-20200603122126.patch</filename>
            <type>text/plain</type>
            <size>2536</size>
            <attacher name="Dean Jackson">dino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjYyMzg3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZThhNzk0ZDkyNGE5Njdi
MWFhMWM0MTMzYjA5MWVjMmRhNjRjZGQwMS4uOGQwM2JlM2UzMmUxZjhkNTFkZjcyMjMzZmMyMTRi
YWJiMmEy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Kysg
Yi9Tb3VyY2UvV2ViQ29yZS9kb20vRG9jdW1lbnQuY3BwCkBAIC04NTg3LDYgKzg1ODcsMTMgQEAg
dm9pZCBEb2N1bWVudDo6cHJlcGFyZUNhbnZhc2VzRm9yRGlzcGxheUlmTmVlZGVkKCkKICAgICAv
LyBTb21lIGNhbnZhcyBjb250ZXh0cyBuZWVkIHRvIGRvIHdvcmsgd2hlbiByZW5kZXJpbmcgaGFz
IGZpbmlzaGVkIGJ1dAogICAgIC8vIGJlZm9yZSB0aGVpciBjb250ZW50IGlzIGNvbXBvc2l0ZWQu
CiAgICAgZm9yIChhdXRvKiBjYW52YXMgOiBtX2NhbnZhc2VzTmVlZGluZ0Rpc3BsYXlQcmVwYXJh
dGlvbikgeworICAgICAgICAvLyBIb3dldmVyLCBpZiB0aGV5IGFyZSBub3QgaW4gdGhlIGRvY3Vt
ZW50IGJvZHksIHRoZW4gdGhleSB3b24ndAorICAgICAgICAvLyBiZSBjb21wb3NpdGVkIGFuZCB0
aHVzIGRvbid0IG5lZWQgcHJlcGFyYXRpb24uIFVuZm9ydHVuYXRlbHkgdGhleQorICAgICAgICAv
LyBjYW4ndCB0ZWxsIGF0IHRoZSB0aW1lIHRoZXkgd2VyZSBhZGRlZCB0byB0aGUgbGlzdCwgc2lu
Y2UgdGhleQorICAgICAgICAvLyBjb3VsZCBiZSBpbnNlcnRlZCBvciByZW1vdmVkIGZyb20gdGhl
IGRvY3VtZW50IGJvZHkgYWZ0ZXJ3YXJkcy4KKyAgICAgICAgaWYgKCFjYW52YXMtPmlzSW5UcmVl
U2NvcGUoKSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworCiAgICAgICAgIGF1dG8gcmVmQ291bnRl
ZENhbnZhcyA9IG1ha2VSZWZQdHIoY2FudmFzKTsKICAgICAgICAgcmVmQ291bnRlZENhbnZhcy0+
cHJlcGFyZUZvckRpc3BsYXkoKTsKICAgICB9Cg==
</data>
<flag name="review"
          id="416273"
          type_id="1"
          status="+"
          setter="eric.carlson"
    />
          </attachment>
      

    </bug>

</bugzilla>