New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 768969 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 773293



Sign in to add a comment

WebGL blitFramebuffer and clearBufferfv are idempotent without clear

Reported by pavolze...@gmail.com, Sep 26 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0

Steps to reproduce the problem:
1. Draw into offscreen framebuffer
2. Blit onto canvas
3. Only first blit is performed

What is the expected behavior?
Should blit each time

What went wrong?
everything

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version: 

adding gl.clear(gl.COLOR_BUFFER_BIT) makes the blit work
 

Comment 1 by kbr@chromium.org, Sep 26 2017

Can you please provide a self-contained test case?

Comment 2 by kbr@chromium.org, Sep 26 2017

Labels: Needs-Feedback
I added a new test in https://github.com/KhronosGroup/WebGL/pull/2523 which indicates that there's no bug in Chromium. More likely there's a bug in the application.

https://klacansky.com/open-scivis-datasets/

Open first dataset (Aneurism) by expanding the arrow. Then in preview when you rotate with mouse it works as expected (uses extra gl.clear) but zoom by scrolling does nothing (I commented out the gl.clear). If you rotate after zooming you will see the update.
Project Member

Comment 4 by sheriffbot@chromium.org, Oct 7 2017

Cc: kbr@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kbr@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by kbr@chromium.org, Oct 7 2017

Owner: kbr@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks, can reproduce the behavior. A smaller self-contained test case would have been helpful, but have yours running locally. Investigating.

Comment 6 by kbr@chromium.org, Oct 7 2017

Thanks again for the test case. https://chromium-review.googlesource.com/706602 up for review fixing it and adding a regression test. Unfortunately since the WebGL conformance suite doesn't yet support reftests this can't be tested there since the bug here was in the compositing of the WebGL canvas; the bug can't be seen from JavaScript.

Comment 7 by kbr@chromium.org, Oct 7 2017

Status: Started (was: Assigned)
Also: https://github.com/KhronosGroup/WebGL/issues/2527 filed about being able to add tests for bugs like this to the WebGL conformance suite. (The bug here could only be seen visually, and not from JavaScript.)

Thanks for quick fix and reporting the conformance tests issue.
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0916d55b226948b79bb46ba63b8649e3448f0d18

commit 0916d55b226948b79bb46ba63b8649e3448f0d18
Author: Kenneth Russell <kbr@chromium.org>
Date: Mon Oct 09 19:51:10 2017

Fix BlitFramebuffer's context dirtying.

Mark the context changed if the destination of the blit is the default
back buffer. Added new pixel test.

BUG= 768969 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I30d8c6df99c3dc32466d55157c9e9d31acf8ef38
Reviewed-on: https://chromium-review.googlesource.com/706602
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507454}
[add] https://crrev.com/0916d55b226948b79bb46ba63b8649e3448f0d18/content/test/data/gpu/pixel_webgl2_blitframebuffer_result_displayed.html
[modify] https://crrev.com/0916d55b226948b79bb46ba63b8649e3448f0d18/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/0916d55b226948b79bb46ba63b8649e3448f0d18/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Comment 10 by kbr@chromium.org, Oct 11 2017

Blockedon: 773293

Comment 11 by kbr@chromium.org, Oct 11 2017

After writing the above CL I realized the same bug exists in the new WebGL 2.0 entry point clearBufferfv.

Comment 12 by kbr@chromium.org, Oct 12 2017

Summary: WebGL blitFramebuffer and clearBufferfv are idempotent without clear (was: WebGL blitFramebuffer is indempotent without clear)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d47ea05b31b129fa6bec5393858cccd85d66cf41

commit d47ea05b31b129fa6bec5393858cccd85d66cf41
Author: Kenneth Russell <kbr@chromium.org>
Date: Fri Oct 13 22:28:27 2017

Properly mark canvas changed in clearBufferfv.

Simplify earlier fix to blitFramebuffer; forgot that MarkContextChanged
already checks if the draw framebuffer is the default back buffer.

BUG= 768969 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ifdb21a2689fd3d9a9e694863df50bbb9e8588521
Reviewed-on: https://chromium-review.googlesource.com/714653
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508849}
[add] https://crrev.com/d47ea05b31b129fa6bec5393858cccd85d66cf41/content/test/data/gpu/pixel_webgl2_clearbufferfv_result_displayed.html
[modify] https://crrev.com/d47ea05b31b129fa6bec5393858cccd85d66cf41/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/d47ea05b31b129fa6bec5393858cccd85d66cf41/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Comment 14 by kbr@chromium.org, Oct 13 2017

Status: Fixed (was: Started)
Project Member

Comment 15 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09a81d3609c63f62d4775e087cbefdd7468da170

commit 09a81d3609c63f62d4775e087cbefdd7468da170
Author: Kenneth Russell <kbr@chromium.org>
Date: Tue Nov 14 06:54:56 2017

Roll WebGL 34842fa..12192b9

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/34842fa..12192b9

BUG= 765469 ,  768969 ,  769989 , 772651

TEST=bots

TBR=zmo@chromium.org, kainino@chromium.org

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I180314943cb6427b916790f5ae5bf295c87330ea
Reviewed-on: https://chromium-review.googlesource.com/764818
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516218}
[modify] https://crrev.com/09a81d3609c63f62d4775e087cbefdd7468da170/DEPS
[modify] https://crrev.com/09a81d3609c63f62d4775e087cbefdd7468da170/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/09a81d3609c63f62d4775e087cbefdd7468da170/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
[modify] https://crrev.com/09a81d3609c63f62d4775e087cbefdd7468da170/content/test/gpu/gpu_tests/webgl_conformance_revision.txt

Sign in to add a comment