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

Issue 638313 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression

Blocking:
issue angleproject:1341



Sign in to add a comment

Inverted WebGL canvas on Canary Windows

Reported by alecazam...@gmail.com, Aug 16 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Example URL:
The editor on figma.com, need account access.

Steps to reproduce the problem:
1. Create a new file in the figma.com editor
2. Note that the canvas, interactions, rulers, etc inverted.  It looks like an origin flip issue in ANGLE.  I did not try the GL backend for Canary, but I did try DX9 and DX11 and they both exhibit the problem in Canary.

What is the expected behavior?
The WebGL canvas should not be inverted.

What went wrong?
We render the canvas upside down, and then flip it at the last minute to copy it to the backbuffer.  This inversion works on OSX, and on Windows Chrome mainline.  It does not work on Windows Chrome Canary.  

Ken Russell has an account to login to figma to see this issue.  I don't have a reduced test case to try.  Contact me if you need an account to access Figma.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? Yes It works on Chrome mainline now, and on OSX

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.116  Channel: canary
OS Version: WIndows 10
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by kbr@chromium.org, Aug 16 2016

Cc: kbr@chromium.org zmo@chromium.org geoffl...@chromium.org jmad...@chromium.org
Components: Internals>GPU>ANGLE Blink>WebGL

Comment 2 by kbr@chromium.org, Aug 17 2016

Cc: kainino@chromium.org oetu...@nvidia.com
Labels: -Pri-2 -Type-Compat ReleaseBlock-Stable M-54 Pri-1 Type-Bug-Regression
Status: Available (was: Unconfirmed)
This is 100% reproducible. A bisect reveals:

You are probably looking for a change made after 406970 (known good), but no later than 407004 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/bec4caf4bf87bdc03f93e5e27c8ab7c14370df8b..79f7b784a97cbb22f11064a05b621b0def87eab3

This changelog is unfortunately quite large.

It contains an ANGLE roll:
https://chromium.googlesource.com/chromium/src/+/206bdb9446b8cd6493c0496ee0f86719e1486c8b

which contains these changes:
https://chromium.googlesource.com/angle/angle.git/+log/1be913c..7da9850

Based on feedback from the submitter that some of his shaders using the comma operator were recently affected, I wonder whether Figma is using this GLSL feature excessively and whether the following change affected it:

https://chromium.googlesource.com/angle/angle.git/+/e1d199bb9bfcf4d377608a52d5c0889be99724f9

Submitter, you mention that Figma renders the canvas upside down and flips it at the last minute. How exactly is that flip performed?

Marking ReleaseBlock-Stable for M-54. M-53 (beta) is fortunately unaffected.

Comment 3 by kbr@chromium.org, Aug 17 2016

It doesn't appear to be:
https://chromium.googlesource.com/angle/angle.git/+/e1d199bb9bfcf4d377608a52d5c0889be99724f9

I reverted it locally with no effect.

Comment 4 by kbr@chromium.org, Aug 17 2016

Unfortunately it's not easy to tell whether the ANGLE roll contained the regression or the other Chromium changes in the changelist -- ANGLE can't be rolled back to 1be913c in top-of-tree Chromium apparently because of GN issues.

I can take a look at the ANGLE stuff tomorrow Ken, and try to determine if it's related. The best way is to use dropped DLLs in Canary, FYI. We have a script that helps with that, but I'll be happy to help.

Comment 6 by a...@figma.com, Aug 17 2016

We just use an inverted full screen quad and shader.  The uv are inverted in v(y-axis) so they go 1 to 0.  These shaders have gone through a mini fire which comma separates the lines.
Owner: jmad...@chromium.org
Status: Assigned (was: Available)
Owner: oetu...@nvidia.com
I've bisected this to 7da9850643f55335 by Olli:

Cover vector dynamic indexing case in SplitSequenceOperator
https://chromium.googlesource.com/angle/angle.git/+/7da9850643f55335a13a4663d226c73d0ac4d3b1

I'll try reverting this in https://chromium-review.googlesource.com/#/c/371643/ but I honestly don't remember what tests this fixed when it landed. Olli can you help diagnose what's going on here?
By the, Alec, if you ever use the sequence operator (,) you could try removing this from your shaders to see if that can work around the problem for now.

Comment 10 by a...@figma.com, Aug 17 2016

I made my void function return a bool.  Didn't want to rewrite the minifier.

Comment 11 by kbr@chromium.org, Aug 17 2016

Thanks Jamie for tracking that down. I thought I reverted the entire use of the SplitSequenceOperator locally by commenting out its application, but probably did something wrong.

Comment 12 by kbr@chromium.org, Aug 17 2016

Blocking: angleproject:1341

Comment 13 by kbr@chromium.org, Aug 17 2016

Owner: jmad...@chromium.org
Jamie, let me assign this to you since you're handling the revert. I've reopened the ANGLE bug and blocked it on this one. We'll close this once the revert goes through and expect that the re-land will fix the problem and include a new test.

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 17 2016

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

commit ff055014a801b57be9b10714d290321b06259f85
Author: jmadill <jmadill@chromium.org>
Date: Wed Aug 17 17:15:24 2016

WebGL: Re-add dynamic indexing test suppression.

An ANGLE revert requires this test to be expected to fail.

BUG= 638313 
TBR=kbr@chromium.org
CQ_INCLUDE_TRYBOTS=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
NOTRY=true

Review-Url: https://codereview.chromium.org/2249823004
Cr-Commit-Position: refs/heads/master@{#412570}

[modify] https://crrev.com/ff055014a801b57be9b10714d290321b06259f85/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

Comment 15 by oetu...@nvidia.com, Aug 19 2016

Owner: oetu...@nvidia.com
I'll diagnose what's going on here. Had some problems with getting a working Chromium build to test with, but seems like I can make progress now.

Comment 16 by kbr@chromium.org, Aug 20 2016

Thanks very much Olli. Please reach out to the submitter if necessary to figure out what's being mis-handled in the shader. Let's add a WebGL conformance test for this.

Comment 17 by kbr@chromium.org, Aug 20 2016

Labels: -Pri-1 Pri-2
Downgrading to P2 since the revert has taken effect already.

We may want to close this as fixed and open a new bug to track the re-land, since this one was M-54, ReleaseBlock-Stable -- and I think for tracking purposes it should stay that way.

Comment 18 by ajha@chromium.org, Aug 24 2016

Cc: -oetu...@nvidia.com
oetuaho@: Any update on this.
Alec, Ken, Olli: It looks as though it wasn't as nice as a single revert. Better testing shows that I need to revert three CLs to get this demo working again.

Alec, can you possibly look at things on your end to see if the minification script possibly makes a statement where there's a void returning function in a sequence? Like you hinted in comment #10, if you can workaround that by making them return something, that would be good.

Olli or Ken, do you recall the details of the comma operator with void? Should I revert this stack of CLs, or is this a problematic case of existing content being broken by a spec update?

See revert stack here:
https://chromium-review.googlesource.com/376121
https://chromium-review.googlesource.com/376122
https://chromium-review.googlesource.com/376123
https://chromium-review.googlesource.com/376124

Comment 20 by kbr@chromium.org, Aug 25 2016

The comma operator isn't allowed to be used with a void return value.

Jamie, Olli, I'm not sure that reverting Olli's entire stack of patches is the best thing to do here. His patches make certain complex WebGL conformance tests pass with ANGLE's HLSL backend.

I think the first thing to do is un-revert Olli's patch which clearly didn't have an effect on Figma's application. The next thing to do is work with Figma to have them confirm that it's a void return value in a sequence operator that's breaking their shader, and then have them work around that.

Comment 21 by a...@figma.com, Aug 26 2016

I can try that.  Will get back to you.  The fixes I did were for WebGL 2.  The shaders that I had didn't compile under WebGL 2.  The WebGL 1 shaders all passed, but I'll try this.

Comment 22 by oetu...@nvidia.com, Aug 26 2016

Finally got around to fixing this, sorry about the delays. This turned out to be a logic error inside the SplitSequenceOperator AST traversal step. It behaved incorrectly when there was a sequence operator nested inside another. ANGLE somewhat unexpectedly generates nested sequence operators in the AST when there is a sequence operator with more than two operands.

I've uploaded an ANGLE patch for review here: https://chromium-review.googlesource.com/#/c/376678/

I'll also put together a WebGL conformance test.

Comment 23 by a...@figma.com, Aug 26 2016

So I updated our shaders to not have void returns, and the shaders still compile fine in WebGL1 (DX9 and DX11), but the canvas is still inverted.  Hopefully the patch will correct the inversion, but we'll update the shaders regardless for our minifier.  

Some good news is that enabling WebGL 2 no longer breaks our WebGL 1 app when enabled, but we had a user report the breakage.  I'll tell them to update Canary.
We do still have the DX9 leftover renders, but turning on the Chrome WebGL2
flag used to leave our canvas as a tiny black square.
Project Member

Comment 25 by bugdroid1@chromium.org, Aug 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/ab48164566a4e3d859c75196047bd688437e0307

commit ab48164566a4e3d859c75196047bd688437e0307
Author: Olli Etuaho <oetuaho@nvidia.com>
Date: Fri Aug 26 09:09:10 2016

Fix splitting nested sequence operators

Make sure that only one sequence operator is split on one iteration
of SplitSequenceOperator. This prevents multiple successive PostVisit
calls to nested sequence operator nodes from adding duplicate nodes
to the AST. The sequence operators are split starting from the
outermost one to preserve execution order.

Note that the shader translator somewhat unexpectedly generates nested
sequence operators in the AST when there is a sequence operator with
more than two operands, so this bug ended up affecting shaders in the
wild. The code around parsing sequence operators could be clarified
separately.

BUG= 638313 
TEST=angle_end2end_tests

Change-Id: Ic6400a484ceff0c790c2290f7b4b80980f87cd88
Reviewed-on: https://chromium-review.googlesource.com/376678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>

[modify] https://crrev.com/ab48164566a4e3d859c75196047bd688437e0307/src/tests/gl_tests/GLSLTest.cpp
[modify] https://crrev.com/ab48164566a4e3d859c75196047bd688437e0307/src/compiler/translator/SplitSequenceOperator.cpp

Project Member

Comment 26 by bugdroid1@chromium.org, Aug 30 2016

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

commit ef465a5a418b092f9eab8bf1020a46eafe527432
Author: geofflang <geofflang@chromium.org>
Date: Tue Aug 30 16:08:08 2016

Roll ANGLE ca05a08..d5da505

https://chromium.googlesource.com/angle/angle.git/+log/ca05a08..d5da505

BUG= 638313 ,605754

TBR=cwallez@chromium.org

TEST=bots

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

Review-Url: https://codereview.chromium.org/2296753002
Cr-Commit-Position: refs/heads/master@{#415309}

[modify] https://crrev.com/ef465a5a418b092f9eab8bf1020a46eafe527432/DEPS

Project Member

Comment 27 by bugdroid1@chromium.org, Sep 7 2016

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

commit 7b1cde44b479da6b87520073d9c2a95d7bb32346
Author: jmadill <jmadill@chromium.org>
Date: Wed Sep 07 17:38:13 2016

WebGL 2: Update Windows expectations.

The NVIDIA driver update should fix one test.
We re-landed a fix for dynamic indexing.
Try lifting the buffercopy flaky suppression.

BUG= 638313 , 587601 
BUG= angleproject:1246 
TBR=kbr@chromium.org,zmo@chromium.org
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2316233002
Cr-Commit-Position: refs/heads/master@{#416982}

[modify] https://crrev.com/7b1cde44b479da6b87520073d9c2a95d7bb32346/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

M54 Stable release is scheduled during  the first week of OCT, please have the fix baked/verified in canary and request a merge to M54 ASAP.
Cc: oetu...@nvidia.com
Labels: Merge-Request-54
Owner: jmad...@chromium.org
Status: Fixed (was: Assigned)
Fix has baked in Canary for some time, fixes customer websites, and should be safe:

https://chromium-review.googlesource.com/376678

Comment 30 by dimu@chromium.org, Sep 20 2016

Labels: -Merge-Request-54 Merge-Review-54 Hotlist-Merge-Review
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.
Labels: -Merge-Review-54 Merge-Approved-54
This change meets the bar and is approved for M54
Project Member

Comment 32 by bugdroid1@chromium.org, Sep 20 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/905fbdea9ef049fb0b81a46013b78f4e619c8466

commit 905fbdea9ef049fb0b81a46013b78f4e619c8466
Author: Olli Etuaho <oetuaho@nvidia.com>
Date: Fri Aug 26 09:09:10 2016

Fix splitting nested sequence operators

Make sure that only one sequence operator is split on one iteration
of SplitSequenceOperator. This prevents multiple successive PostVisit
calls to nested sequence operator nodes from adding duplicate nodes
to the AST. The sequence operators are split starting from the
outermost one to preserve execution order.

Note that the shader translator somewhat unexpectedly generates nested
sequence operators in the AST when there is a sequence operator with
more than two operands, so this bug ended up affecting shaders in the
wild. The code around parsing sequence operators could be clarified
separately.

BUG= 638313 
TEST=angle_end2end_tests

Change-Id: Ic6400a484ceff0c790c2290f7b4b80980f87cd88
Reviewed-on: https://chromium-review.googlesource.com/376678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/387173

[modify] https://crrev.com/905fbdea9ef049fb0b81a46013b78f4e619c8466/src/tests/gl_tests/GLSLTest.cpp
[modify] https://crrev.com/905fbdea9ef049fb0b81a46013b78f4e619c8466/src/compiler/translator/SplitSequenceOperator.cpp

Project Member

Comment 33 by bugdroid1@chromium.org, Sep 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/905fbdea9ef049fb0b81a46013b78f4e619c8466

commit 905fbdea9ef049fb0b81a46013b78f4e619c8466
Author: Olli Etuaho <oetuaho@nvidia.com>
Date: Fri Aug 26 09:09:10 2016

Fix splitting nested sequence operators

Make sure that only one sequence operator is split on one iteration
of SplitSequenceOperator. This prevents multiple successive PostVisit
calls to nested sequence operator nodes from adding duplicate nodes
to the AST. The sequence operators are split starting from the
outermost one to preserve execution order.

Note that the shader translator somewhat unexpectedly generates nested
sequence operators in the AST when there is a sequence operator with
more than two operands, so this bug ended up affecting shaders in the
wild. The code around parsing sequence operators could be clarified
separately.

BUG= 638313 
TEST=angle_end2end_tests

Change-Id: Ic6400a484ceff0c790c2290f7b4b80980f87cd88
Reviewed-on: https://chromium-review.googlesource.com/376678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/387173

[modify] https://crrev.com/905fbdea9ef049fb0b81a46013b78f4e619c8466/src/tests/gl_tests/GLSLTest.cpp
[modify] https://crrev.com/905fbdea9ef049fb0b81a46013b78f4e619c8466/src/compiler/translator/SplitSequenceOperator.cpp

Comment 34 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment