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

Issue 772653 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug

Blocking:
issue 798174



Sign in to add a comment

GLSL bug: some mat2 M = mat2(vec) won't compile

Reported by fabrice....@gmail.com, Oct 7 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Example URL:
https://www.shadertoy.com/view/MlyXW1

Steps to reproduce the problem:
vec2 V = U/iResolution.xy, 
     W = mat2(V,V)*U;

see https://www.shadertoy.com/view/MlyXW1

What is the expected behavior?
compiling

What went wrong?
not compiling

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 14.04
Flash Version: Shockwave Flash 27.0 r0

- It does compile on firefox
- It does not compile on chrome, either linux or windows
- so, Version 61.0.3163.100 and previous since January when I first detected the bug
 
Components: Blink>WebGL Internals>GPU
Cc: ranjitkan@chromium.org
Labels: Needs-Triage-M61 Needs-Feedback
Thanks for filing the issue, could you please help us with a sample screen shot for expected and actual behavior. This will help us to triage the issue better.

Thanks.!

Labels: -Type-Compat -Needs-Feedback OS-Mac OS-Windows Type-Bug
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows, Mac and Linux using chrome version 61.0.3163.100. Issue is a non regression since observed from M50 (50.0.2624.0). Untriaged it so that issue gets addressed.

P.S: No compile error is observed on Ubuntu FF browser.

Thanks.!

Comment 4 by zmo@chromium.org, Oct 9 2017

Cc: kbr@chromium.org oetu...@nvidia.com kainino@chromium.org
Labels: -Via-Wizard-Content -Needs-Triage-M61
Status: Available (was: Untriaged)
This bug is caused by scalarize_vec_and_mat_constructor_args driver bug workaround.

It's turned on in Chrome, but not in Firefox (I assume).

Run Chrome with --scalarize_vec_and_mat_constructor_args=0, this bug disappears.

Comment 5 by zmo@chromium.org, Oct 9 2017

Components: -Internals>GPU Internals>GPU>ANGLE
I should take this bug because I implemented the workaround and introduced this bug.

However, it will take a while for me to get around to work on it. If someone else can take a shot, feel free to grab it.

The shadertoy test case was minimal.

The bug is the workaround doesn't consider the constructor case like
mac2(vec2, float, float) 
note that mat2(vec2, vec2)  or mat2 (float, float, vec2) or mat2(float, vec2, float) don't work as well.
(and I guess it generalizes for larger matrices and vecs).

Comment 7 by zmo@chromium.org, Oct 12 2017

Cc: zmo@chromium.org
 Issue 716353  has been merged into this issue.
So, will something be done on this bug ? 
thanks

Comment 9 by oetu...@nvidia.com, Nov 27 2017

Owner: oetu...@nvidia.com
Status: Started (was: Available)
Turns out I already fixed most cases of this bug while doing some unrelated work. Latest Canary does not show the issue with the ShaderToy shader.

The root cause is that ScalarizeVecAndMatConstructorArgs can generate new statements in the constructor's parent block. This can result in statements ending up out of order when the affected constructor is inside:

a) a variable declaration with multiple declarators
b) loop condition or expression
c) sequence operator

I can make a quick fix for the remaining cases as well.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 29 2017

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

commit ae04e1e4a6bf8584dc33d3a72cb943df8e554378
Author: Olli Etuaho <oetuaho@nvidia.com>
Date: Wed Nov 29 14:38:48 2017

Fix scalarizing vec and mat constructor args

Scalarizing vec and mat constructor args can generate new statements
in the parent block of the constructor. To preserve the correct
execution order of expressions, scalarized vector and matrix
constructors need to be first moved out from inside loop conditions
and sequence operators. This is done whenever the compiler flag to
scalarize args is on.

BUG= chromium:772653 
TEST=angle_unittests

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

[add] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/tests/compiler_tests/ScalarizeVecAndMatConstructorArgs_test.cpp
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/tests/test_utils/compiler_test.h
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/tests/test_utils/compiler_test.cpp
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/compiler/translator/Compiler.cpp
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/tests/angle_unittests.gypi
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/compiler/translator/IntermNodePatternMatcher.cpp
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/compiler/translator/IntermNodePatternMatcher.h
[modify] https://crrev.com/ae04e1e4a6bf8584dc33d3a72cb943df8e554378/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 29 2017

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

commit aba4bb1b5fda581c28c7ba798de4e6fa54662b0b
Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org>
Date: Wed Nov 29 16:47:21 2017

Roll src/third_party/angle/ f13cadd8b..54a29ffd8 (2 commits)

https://chromium.googlesource.com/angle/angle.git/+log/f13cadd8bd5f..54a29ffd82e7

$ git log f13cadd8b..54a29ffd8 --date=short --no-merges --format='%ad %ae %s'
2017-11-28 oetuaho Refactor TSymbol to follow naming conventions
2017-11-27 oetuaho Fix scalarizing vec and mat constructor args

Created with:
  roll-dep src/third_party/angle
BUG= 772653 


The AutoRoll server is located here: https://angle-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


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
TBR=jmadill@chromium.org

Change-Id: I06e2ac5b82354070505d5314e67eef11790a37ff
Reviewed-on: https://chromium-review.googlesource.com/796714
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520141}
[modify] https://crrev.com/aba4bb1b5fda581c28c7ba798de4e6fa54662b0b/DEPS

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 29 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/ccd2852773ebc7723b90d95b5fe0b0e9bfadde51

commit ccd2852773ebc7723b90d95b5fe0b0e9bfadde51
Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org>
Date: Wed Nov 29 23:15:41 2017

Roll skia/third_party/externals/angle2/ f13cadd8b..c677795f9 (6 commits)

https://chromium.googlesource.com/angle/angle.git/+log/f13cadd8bd5f..c677795f9f7d

$ git log f13cadd8b..c677795f9 --date=short --no-merges --format='%ad %ae %s'
2017-11-27 fjhenigman docs: fix links and typos
2017-11-27 jmadill Add a gl::AttribArray helper type.
2017-11-27 jmadill Isolate GlslangWrapper header from most of ANGLE.
2017-11-28 geofflang Add extra warnings for narrowing and bool conversion.
2017-11-28 oetuaho Refactor TSymbol to follow naming conventions
2017-11-27 oetuaho Fix scalarizing vec and mat constructor args

Created with:
  roll-dep skia/third_party/externals/angle2
BUG= 772653 


The AutoRoll server is located here: https://angle-skia-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Build-Debian9-GCC-x86_64-Release-ANGLE
TBR=allanmac@google.com

Change-Id: I7c1549733e9ad035939c961eb4471253656d421e
Reviewed-on: https://skia-review.googlesource.com/77960
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>

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

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 30 2017

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

commit 066de975da576364b8d268be45ebdaf786b487dd
Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org>
Date: Thu Nov 30 03:17:34 2017

Roll src/third_party/skia/ ede860e91..ccd285277 (10 commits)

https://skia.googlesource.com/skia.git/+log/ede860e91c2a..ccd2852773eb

$ git log ede860e91..ccd285277 --date=short --no-merges --format='%ad %ae %s'
2017-11-29 angle-deps-roller Roll skia/third_party/externals/angle2/ f13cadd8b..c677795f9 (6 commits)
2017-11-28 mtklein devirtualize SkCanvas getClipBounds methods
2017-11-29 benjaminwagner Revert "Temporarily add Ubuntu IntelHD4400 jobs."
2017-11-29 csmartdalton Revert "Make sure to visit clips and dst proxies during gather"
2017-11-29 bsalomon Ignore deserialized path convexity and first direction.
2017-11-29 kjlubick Isolate the biggest CIPD assets to trim down on overhead
2017-11-29 mtklein SkRasterPipeline::dump() in forward order
2017-11-29 csmartdalton Make sure to visit clips and dst proxies during gather
2017-11-29 borenet Update CT bots to Debian-9.2
2017-11-29 borenet [infra] Provide Buildbucket Build ID in dm.json

Created with:
  roll-dep src/third_party/skia
BUG= 772653 , 781238 


The AutoRoll server is located here: https://autoroll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_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
TBR=allanmac@chromium.org

Change-Id: Ib5ff8ecb634495f9d85c3675bd89ec247c941bd3
Reviewed-on: https://chromium-review.googlesource.com/798430
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520409}
[modify] https://crrev.com/066de975da576364b8d268be45ebdaf786b487dd/DEPS

Comment 14 by oetu...@nvidia.com, Dec 29 2017

Status: Fixed (was: Started)
cool !
might this fix https://bugs.chromium.org/p/chromium/issues/detail?id=798174
as well ?

Comment 16 by kbr@chromium.org, Dec 31 2017

Blocking: 798174
Cc: sc00335...@techmahindra.com
 Issue 798174  has been merged into this issue.

Sign in to add a comment