New issue
Advanced search Search tips

Issue 721648 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

A lot of messages "WARNING:angle_platform_impl.cc(41)] : getBlendState(157): Overflowed the limit of 2048 blend states, removing the least recently used to make room." on chrome://gpu tab

Reported by mikhail....@gmail.com, May 12 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3095.6 Safari/537.36

Steps to reproduce the problem:
1. Open gpu://tab
2. 
3. 

What is the expected behavior?

What went wrong?
A lot of messages "WARNING:angle_platform_impl.cc(41)] : getBlendState(157): Overflowed the limit of 2048 blend states, removing the least recently used to make room." on chrome://gpu tab

Did this work before? N/A 

Chrome version: 60.0.3095.6  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 26.0 r0
 
gpu.zip
790 KB Download
Labels: Needs-Triage-M60

Comment 2 by ajha@chromium.org, May 15 2017

Cc: ajha@chromium.org
Components: Internals>GPU>VendorSpecific
60.0.3095.6 is a Windows Clang build and I was unable to reproduce the issue on the reported version: 60.0.3095.6 on Windows-10 and Windows-7. No Logs as such were recorded under chrome://gpu. Attached is the chrome://gpu of Windows-7 on which this was tested.

Adding respective component for someone from the respective team to have a look at this.
Gpu.txt
9.4 KB View Download

Comment 3 by enne@chromium.org, May 19 2017

Cc: jmad...@chromium.org
Components: Internals>GPU>ANGLE
jmadill: can you triage this?
Cc: mikhail....@gmail.com
Labels: -Needs-Triage-M60
Owner: jmad...@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report. This is almost certainly due to 

https://chromium-review.googlesource.com/c/453886/3/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp

Which cuts the cache sizes in half. I don't think this is a serious issue, since the cache is doing what we want and discarding the older entries, but there are concerns about performance and certainly we shouldn't be spamming about:gpu.

Options are to:

* revert the change
* pick somewhat larger sizes (this would ensure we don't overflow the cache)
* instead of dropping a single item, drop a larger number of items
* remove the warning entirely.

We can also consider moving to MRUCache in Chromium's base library. Having more info would be useful.

mikhail.v.gavrilov@gmail.com: what were you doing when you noticed the warnings? Was this just from ordinary browsing over a period of time, or were you using WebGL in someway?

Demostration issue: https://youtu.be/hNvxBYNgEfk
Status: Started (was: Assigned)
Thanks Mikhail, that's very helpful. I'll take a look.
I was having trouble reproing this. Just saw this was a Clang build. Possibly related somehow to initialization of variables or a copy constructor. Probably not a critical issue, but will keep looking.
I think I have a speculative fix for this - I noticed some undefined behaviours in RenderStateCache on D3D11.
Project Member

Comment 9 by bugdroid1@chromium.org, May 29 2017

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

commit aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon May 29 20:51:09 2017

Ensure gl State structs are zero filled.

In some cases we would hash or memcmp against structs with bools or
other non-filled data. This could have implementation differences,
and may have been causing cache errors on Clang.

BUG= chromium:721648 
BUG= angleproject:2044 

Change-Id: I981a1e6e8d50a33f7fade568497b72b919accfce
Reviewed-on: https://chromium-review.googlesource.com/516383
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/State.cpp
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/Sampler.cpp
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/angletypes.inl
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.h
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/angletypes.cpp
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/angletypes.h
[modify] https://crrev.com/aa0a5446e1a7ba2ae2cd08ae52493778c86d33c1/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h

Project Member

Comment 10 by bugdroid1@chromium.org, May 30 2017

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

commit 07f6758930d23cf2790a7ee97bda1d97889638c9
Author: geofflang <geofflang@chromium.org>
Date: Tue May 30 15:47:35 2017

Roll ANGLE 7d79fe9..63d8c26

https://chromium.googlesource.com/angle/angle.git/+log/7d79fe9..63d8c26

BUG=722684, chromium:721648 

TBR=jmadill@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/2912963002
Cr-Commit-Position: refs/heads/master@{#475539}

[modify] https://crrev.com/07f6758930d23cf2790a7ee97bda1d97889638c9/DEPS

Status: Fixed (was: Started)
Should be fixed now. Not verified.
Still seen again message "[13652:17036:0602/090654.658:WARNING:angle_platform_impl.cc(41)] : getBlendState(157): Overflowed the limit of 2048 blend states, removing the least recently used to make room." on chrome://gpu tab.
gpu4.htm
2.5 MB View Download
Version 60.0.3112.11 (Official Build) dev (64-bit)
The fix will be visible in Chrome Canary, versions after 61.0.3116.0
Chrome/61.0.3124.11

Still see message:
[14932:12628:0613/091454.093:WARNING:angle_platform_impl.cc(41)] : TrimCache(35): Overflowed the limit of 2048 blend states, removing the least recently used to make room.
gpu6.htm
170 KB View Download
Status: Assigned (was: Fixed)
Project Member

Comment 17 by bugdroid1@chromium.org, Nov 22 2017

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

commit f1b47e89631848b074ae0892126e0d675aaa26e4
Author: Jamie Madill <jmadill@chromium.org>
Date: Wed Nov 22 05:43:51 2017

Fix ComputeGenericHash.

ANGLE's internal hash maps would run MurmurHash on c++ structs to
come up with hash values. Since the hash ran on 4 byte words only,
it would have no understanding that sometimes our structs would only
have meaninful data in the first N bytes, and would include the
garbage at the end in the hash calculation. This fixes the problem by
forcing our structs to be aligned at compile-time.

It also adds custom copy operators for a few classes to ensure that
all bits are copied when the struct is initialized, including the
padding.

Bug:  angleproject:1569 
Bug:  chromium:721648 
Change-Id: I4d11f6e12d9a067b36e1416c7ed15586eff99aab
Reviewed-on: https://chromium-review.googlesource.com/783990
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/angletypes.h
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/angletypes.cpp
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/SizedMRUCache.h
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h
[modify] https://crrev.com/f1b47e89631848b074ae0892126e0d675aaa26e4/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp

No, issue 765576 is some minor D3D compiler warning, not related.

It's possible this could fix the cache overflow warnings, but it's speculative. It should roll out to Canary in a few days, then you could test it.
Status: Fixed (was: Assigned)
mikhail.v.gavrilov@gmail.com, can you verify if this is fixed for you now?

Sign in to add a comment