RESOLVED FIXED 212594
[ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html & webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html are constant failures
https://bugs.webkit.org/show_bug.cgi?id=212594
Summary [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscree...
Jacob Uphoff
Reported 2020-06-01 07:34:38 PDT
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&suite=layout-tests&test=webgl%2F2.0.0%2Fconformance%2Fcanvas%2Fbuffer-offscreen-test.html&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
Attachments
Patch (2.48 KB, patch)
2020-06-02 19:21 PDT, Dean Jackson
eric.carlson: review+
Radar WebKit Bug Importer
Comment 1 2020-06-01 07:35:04 PDT
Ryan Haddad
Comment 2 2020-06-01 17:32:07 PDT
Marked tests as failing in r262400
Dean Jackson
Comment 3 2020-06-02 16:25:07 PDT
It'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?
Dean Jackson
Comment 4 2020-06-02 16:26:20 PDT
Our visual result is correct. It's the content read from the in-progress draw that's wrong.
Dean Jackson
Comment 5 2020-06-02 18:25:49 PDT
Hmmm.. I see an extra call to clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT)
Dean Jackson
Comment 6 2020-06-02 18:31:51 PDT
Oh. I see. We shouldn't prepare the canvas if it isn't going to be displayed. We're effectively swapping the drawing buffer on a canvas that is never drawn, so when it is read back out it is cleared.
Dean Jackson
Comment 7 2020-06-02 18:50:46 PDT
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'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't want to make such a big change right now though.
Dean Jackson
Comment 8 2020-06-02 19:03:39 PDT
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.
Dean Jackson
Comment 9 2020-06-02 19:21:27 PDT
Alexey Proskuryakov
Comment 10 2020-06-03 09:56:16 PDT
Comment on attachment 400880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400880&action=review > Source/WebCore/ChangeLog:3 > + [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html & 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?
Dean Jackson
Comment 11 2020-06-03 11:38:30 PDT
Comment on attachment 400880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400880&action=review >> Source/WebCore/ChangeLog:3 >> + [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html & 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? Yes, I should have thought of that.
Dean Jackson
Comment 12 2020-06-03 11:49:29 PDT
Note You need to log in before you can comment on or make changes to this bug.