Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Issue 12197004: cc: Enforce correct recycling in resource pool. (Closed)

Created:
7 years, 10 months ago by epenner
Modified:
7 years, 10 months ago
Reviewers:
nduca, reveman, piman
CC:
chromium-reviews, cc-bugs_chromium.org, enne (OOO), aelias_OOO_until_Jul13
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

cc: Enforce correct recycling in resource pool. The active/pending tree makes it appear as though we recycle textures that are not in-use, however our memory assignment can easily take invalidated resources from the active tree and put them directly in the pending tree breaking our texture recycling. This introduces a read fence concept to resource provider, and uses the read fence to strictly enforce proper recycling behavior. 'canLockForWrite' can tell us that a resource is truly safe to recycle. No try, as this is only cc, and cc unit tests have passed. NOTRY=true BUG=172995 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180886

Patch Set 1 #

Patch Set 2 : Use fence interface. #

Total comments: 9

Patch Set 3 : Moved to renderer. Addressed feedback. #

Total comments: 1

Patch Set 4 : Address feedback. #

Patch Set 5 : Fix bots. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -1 line) Patch
M cc/gl_renderer.cc View 1 2 3 4 2 chunks +22 lines, -0 lines 0 comments Download
M cc/resource_pool.cc View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M cc/resource_provider.h View 1 2 3 4 5 chunks +27 lines, -0 lines 0 comments Download
M cc/resource_provider.cc View 1 10 chunks +33 lines, -1 line 0 comments Download

Messages

Total messages: 38 (0 generated)
nduca
Can you describe the situation that is causing the bug, first?
7 years, 10 months ago (2013-02-04 01:42:09 UTC) #1
epenner
Ptal. I need to do some more verification, and I can add a unit test ...
7 years, 10 months ago (2013-02-04 01:47:58 UTC) #2
nduca
What on earth is a "double buffer our writes" and "double buffered write constraint"?
7 years, 10 months ago (2013-02-04 01:54:53 UTC) #3
epenner
I updated the first paragraph to better describe the problem. Double buffering writes refers to ...
7 years, 10 months ago (2013-02-04 02:04:39 UTC) #4
nduca
Sorry, still dont fully get it. I think what i hear you saying is that ...
7 years, 10 months ago (2013-02-04 02:11:58 UTC) #5
reveman
This is only because we perform texture uploads on a separate thread, right? Feels very ...
7 years, 10 months ago (2013-02-04 02:12:07 UTC) #6
epenner
No I don't think it's best to handle it on the GPU side. The reason ...
7 years, 10 months ago (2013-02-04 02:14:15 UTC) #7
epenner
The whole purpose of texture recycling is to prevent writing to a texture while it ...
7 years, 10 months ago (2013-02-04 02:15:03 UTC) #8
nduca
One thing that might help us all communicate is to list out the steps that ...
7 years, 10 months ago (2013-02-04 02:21:52 UTC) #9
epenner
Nat, if the bug is in the service side, what do you propose the service ...
7 years, 10 months ago (2013-02-04 02:23:34 UTC) #10
reveman
On 2013/02/04 02:23:34, epenner wrote: > Nat, if the bug is in the service side, ...
7 years, 10 months ago (2013-02-04 03:03:57 UTC) #11
reveman
I'd prefer if we didn't make changes that prevent a different implementation of CHROMIUM_async_transfers from ...
7 years, 10 months ago (2013-02-04 03:23:46 UTC) #12
epenner
On 2013/02/04 03:23:46, David Reveman wrote: > I'd prefer if we didn't make changes that ...
7 years, 10 months ago (2013-02-04 03:30:52 UTC) #13
epenner
The OOM case needs to be handled by limiting the visible portion of the active ...
7 years, 10 months ago (2013-02-04 03:37:40 UTC) #14
reveman
Could we fix this by making the android implementation of async uploads always create a ...
7 years, 10 months ago (2013-02-04 03:46:54 UTC) #15
epenner
When would it create a new texture? We have no usage tracking of textures to ...
7 years, 10 months ago (2013-02-04 03:53:14 UTC) #16
epenner
"device correctness" -> define correctness.
7 years, 10 months ago (2013-02-04 03:58:18 UTC) #17
epenner
I think a better thing to do if we could detect this on the service ...
7 years, 10 months ago (2013-02-04 04:02:18 UTC) #18
nduca
I keep coming back to "what are the clean architectures" that we can support long ...
7 years, 10 months ago (2013-02-04 04:15:10 UTC) #19
reveman
On 2013/02/04 03:53:14, epenner wrote: > When would it create a new texture? We have ...
7 years, 10 months ago (2013-02-04 04:23:23 UTC) #20
epenner
Unfortunately we can't just allocate new textures on every upload (performance). Greg and I talked ...
7 years, 10 months ago (2013-02-04 07:18:58 UTC) #21
nduca
Your frame concept is a very simple fence. I think if we can make it ...
7 years, 10 months ago (2013-02-04 07:50:50 UTC) #22
epenner
Nat: 1.) wouldn't just need fences, it would special "async upload fences" since they happen ...
7 years, 10 months ago (2013-02-04 07:53:54 UTC) #23
epenner
The read fence could work since that occurs with regular GPU command stream. Happy to ...
7 years, 10 months ago (2013-02-04 08:02:37 UTC) #24
reveman
On 2013/02/04 07:53:54, epenner wrote: > Nat: 1.) wouldn't just need fences, it would special ...
7 years, 10 months ago (2013-02-04 17:23:11 UTC) #25
piman
Couple of high-level comments: - I'd really prefer if the RP didn't know anything about ...
7 years, 10 months ago (2013-02-04 17:50:28 UTC) #26
epenner
On 2013/02/04 17:50:28, piman wrote: > Couple of high-level comments: > - I'd really prefer ...
7 years, 10 months ago (2013-02-04 18:07:59 UTC) #27
epenner
Couple follow ups: Dave, allocations are always expensive on Android (EGLImage or not). In fact, ...
7 years, 10 months ago (2013-02-04 18:35:20 UTC) #28
epenner
Ptal. Sorry for the delay, lots of other bugs on my plate.
7 years, 10 months ago (2013-02-05 21:45:13 UTC) #29
piman
https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc#newcode870 cc/layer_tree_host_impl.cc:870: Can we move that logic to the renderer? It ...
7 years, 10 months ago (2013-02-05 22:19:07 UTC) #30
nduca
https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc#newcode855 cc/layer_tree_host_impl.cc:855: bool setToPassed() { m_passed = true; } m_passed -> ...
7 years, 10 months ago (2013-02-05 22:39:04 UTC) #31
piman
https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc#newcode861 cc/layer_tree_host_impl.cc:861: bool LayerTreeHostImpl::swapBuffers() On 2013/02/05 22:39:05, nduca wrote: > what ...
7 years, 10 months ago (2013-02-05 22:46:47 UTC) #32
epenner
https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12197004/diff/19001/cc/layer_tree_host_impl.cc#newcode855 cc/layer_tree_host_impl.cc:855: bool setToPassed() { m_passed = true; } On 2013/02/05 ...
7 years, 10 months ago (2013-02-05 23:27:35 UTC) #33
piman
lgtm https://codereview.chromium.org/12197004/diff/22002/cc/gl_renderer.cc File cc/gl_renderer.cc (right): https://codereview.chromium.org/12197004/diff/22002/cc/gl_renderer.cc#newcode1300 cc/gl_renderer.cc:1300: } nit: move to the top of the ...
7 years, 10 months ago (2013-02-05 23:47:02 UTC) #34
nduca
lgtm
7 years, 10 months ago (2013-02-05 23:49:41 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12197004/24004
7 years, 10 months ago (2013-02-06 01:31:18 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12197004/19004
7 years, 10 months ago (2013-02-06 03:08:12 UTC) #37
commit-bot: I haz the power
7 years, 10 months ago (2013-02-06 03:11:29 UTC) #38
Message was sent while issue was closed.
Change committed as 180886

Powered by Google App Engine
This is Rietveld 408576698