Issue metadata
Sign in to add a comment
|
Slow WebGL performance when using alpha: false |
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Steps to reproduce the problem: 1. Compare these two pages: https://jsfiddle.net/fz6s3sez/10/embedded/result/ (alpha: false) https://jsfiddle.net/fz6s3sez/11/embedded/result/ (alpha: true) What is the expected behavior? Performance shouldn't be affected, if anything it should be faster when disabling alpha. What went wrong? Feels like the whole javascript code gets deoptimised. Did this work before? Yes Does this work in other browsers? Yes Chrome version: 64.0.3282.140 Channel: stable OS Version: OS X 10.12.6 Flash Version:
,
Feb 14 2018
Yes, this is Intel specific. I can reproduce on my retina (AMD/Intel) by --force_integrated_gpu. kbr@, I suspect you can also reproduce on your NVidia/Intel with the same switch. No, it's not related with the loop-to-init-variables. By passing --dont_use_loops_to_initialize_variables and also tested on Canary, the perf issue is still visible.
,
Feb 14 2018
Doesn't need to be restricted view.
,
Feb 14 2018
James or Kai: could one of you please help by bisecting this?
,
Feb 14 2018
I'll take this since I have a mac dev env.
,
Feb 15 2018
This bisects to https://chromium.googlesource.com/chromium/src/+/cdc786f5d2a2b538f4914ba0afbaee15634206b9 > Use 8x MSAA rather than 4x MSAA when available. We may need to use the max_msaa_sample_count_4 workaround on Mac/Intel. Over to the Intel folks to look into this.
,
Feb 15 2018
N.b., this bug only affects alpha:false contexts for unknown reasons. So max_msaa_sample_count_4 may not be the right solution. See also the msaa_is_slow workaround, issue 527565 .
,
Feb 15 2018
,
Feb 15 2018
Just a guess, this might be related to crrev.com/c/899957. BTW, the change to 8x MSAA by default actually caused a lot of performance issues on Intel platforms. We're collecting data on various OSes to see if we can handle AA better in Chromium.
,
Feb 15 2018
ricardocabello@ Thanks for the issue. Tested this issue on Mac OS 10.12.6 on the reported version 64.0.3282.140 and the latest Canary 66.0.3347.0 and somehow was unable to reproduce this issue. On comparing the above two given fiddles with alpha as true and false, can see see no issues in performance. Attached is the chrome://gpu details. As per comment #6, removing the Needs-Bisect label as the bisect is already provided. Thanks..
,
Feb 15 2018
Thanks for testing Susan. I can see you're using a Intel(R) HD Graphics 6000 on a MacBook Air. The issue seems to be with Intel(R) Iris(TM) Graphics 550 on retina devices.
,
Feb 15 2018
Actually, I did repro on a device that should be identical to Susan's except for the OS - MacBook Air early 2015, non-retina, Intel HD 6000, macOS 10.13.3.
,
Feb 15 2018
Kai, thanks for bisecting and sorry all for the difficulty. I'm not sure why Chrome's RGB emulation on top of RGBA textures/IOSurfaces would be more prone to slowdowns in this area. We do operations like clearing the alpha channel and setting write masks, so maybe this incurs a read/modify/write to main memory rather than being able to simply keep multisample data on-chip. I'll look into blacklisting the 8x MSAA path on Intel GPUs in response. The quality difference from 4x to 8x MSAA is not worth this hit.
,
Feb 15 2018
kbr investigated and it doesn't seem that there should be any RGB-on-RGBA emulation code happening if we run Chrome without IOSurface. Since disabling IOSurface didn't fix the regression, it doesn't seem to be related to that emulation. I'll land the max_msaa_sample_count_4 workaround entry.
,
Feb 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/28cc4cd37aa9c4e27d882c249092098197920133 commit 28cc4cd37aa9c4e27d882c249092098197920133 Author: Kai Ninomiya <kainino@chromium.org> Date: Wed Feb 21 02:03:58 2018 Use 4x MSAA on Mac/Intel to avoid perf regression On Mac/Intel, the default 8x MSAA causes huge performance regressions specifically in WebGL contexts with {alpha:false,antialias:true}. Add a workaround to fall back to 4x MSAA on Mac/Intel devices. Adds pixel test suppressions that will be removed, after rebaseline, in https://crrev.com/c/924310 Bug: 812071 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: Ifd2283f6b232371cb63d67a8641236073cb0b4da Reviewed-on: https://chromium-review.googlesource.com/923103 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Cr-Commit-Position: refs/heads/master@{#537993} [modify] https://crrev.com/28cc4cd37aa9c4e27d882c249092098197920133/content/test/gpu/gpu_tests/pixel_expectations.py [modify] https://crrev.com/28cc4cd37aa9c4e27d882c249092098197920133/content/test/gpu/gpu_tests/pixel_test_pages.py [modify] https://crrev.com/28cc4cd37aa9c4e27d882c249092098197920133/gpu/config/gpu_driver_bug_list.json
,
Feb 21 2018
Requesting merge of #15 to M65. The change is a small and safe - an addition to the workaround list. It fixes a major performance regression seen with most WebGL content on Chrome 63/64.
,
Feb 21 2018
This bug requires manual review: We are only 12 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 21 2018
Pls test/verify cl listed at #15 on next canary and update canary result here before M65 merge approval. Thank you.
,
Feb 22 2018
Tried to verify this issue on the latest Canary 66.0.3352.0 on Mac OS 10.13.3 by following the steps mentioned in the original comment. Compared the performance of the above fiddles with alpha:false and alpha:true and attached are the screen shots of the results. kainino@ Request you to please check the attached screenshots and verify if the fix is working as intended on the latest Canary build? Thanks..
,
Feb 22 2018
The NextAction date has arrived: 2018-02-22
,
Feb 22 2018
Verified fixed in Canary.
,
Feb 22 2018
Approving merge to M65 branch 3325 based on comments #16 and #21. Please merge ASAP. Thank you.
,
Feb 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5aa3cbd79236759e67b8ffcff8b4f51f96efcc39 commit 5aa3cbd79236759e67b8ffcff8b4f51f96efcc39 Author: Kai Ninomiya <kainino@chromium.org> Date: Thu Feb 22 18:44:38 2018 Use 4x MSAA on Mac/Intel to avoid perf regression On Mac/Intel, the default 8x MSAA causes huge performance regressions specifically in WebGL contexts with {alpha:false,antialias:true}. Add a workaround to fall back to 4x MSAA on Mac/Intel devices. Adds pixel test suppressions that will be removed, after rebaseline, in https://crrev.com/c/924310 TBR=kainino@chromium.org Bug: 812071 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: Ifd2283f6b232371cb63d67a8641236073cb0b4da Reviewed-on: https://chromium-review.googlesource.com/923103 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#537993}(cherry picked from commit 28cc4cd37aa9c4e27d882c249092098197920133) Reviewed-on: https://chromium-review.googlesource.com/932007 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Cr-Commit-Position: refs/branch-heads/3325@{#552} Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} [modify] https://crrev.com/5aa3cbd79236759e67b8ffcff8b4f51f96efcc39/content/test/gpu/gpu_tests/pixel_test_pages.py [modify] https://crrev.com/5aa3cbd79236759e67b8ffcff8b4f51f96efcc39/gpu/config/gpu_driver_bug_list.json
,
Feb 22 2018
,
Feb 22 2018
Thanks!
,
Feb 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/77ccad70106609e52630b5936eb3a7f488a3e5c6 commit 77ccad70106609e52630b5936eb3a7f488a3e5c6 Author: Kai Ninomiya <kainino@chromium.org> Date: Fri Feb 23 03:59:33 2018 Remove pixel test suppressions after rebaseline Follow-up to https://crrev.com/c/923103 TBR=zmo@chromium.org Bug: 812071 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: Ib9cf961ef492ce3aea6a2cd415716d4df7236391 Reviewed-on: https://chromium-review.googlesource.com/924310 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Cr-Commit-Position: refs/heads/master@{#538693} [modify] https://crrev.com/77ccad70106609e52630b5936eb3a7f488a3e5c6/content/test/gpu/gpu_tests/pixel_expectations.py
,
Feb 26 2018
,
Mar 21 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kbr@chromium.org
, Feb 14 2018