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

Issue 1568563002: Added a way for sync point clients to issue out of order waits. (Closed)

Created:
4 years, 11 months ago by David Yen
Modified:
4 years, 11 months ago
Reviewers:
sky, piman
CC:
chromium-reviews, rjkroege, darin-cc_chromium.org, jam, piman+watch_chromium.org, Peng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added a way for sync point clients to issue out of order waits. This patch fixes a subtle bug that could occur if a sync point client is waiting without a corresponding order number. This can occur for any wait that is not done within the usual command buffer processing loop. An example is the command buffer stub OnSignalSyncToken() function which issues a wait directly on the IO thread. Previously, a similar concept was introduced in SyncPointClientWaiter which was used to wait out of order when a Gpu Memory Buffer was destroyed. Because of the need for this functionality in the regular SyncPointClient, I have folded the SyncPointClientWaiter functions into SyncPointClient under WaitOutOfOrder() & WaitOutOfOrderNonThreadSafe(). Because of how subtle this bug is, further state tracking is now done so we can test whether or not an order number is processing or not. Using that test, DCHECKs have been added so Wait()/WaitNonThreadSafe can only be called when processing an order number, and the the out of order variants can only be called when not processing an order number. BUG=514815 TEST=Added unit tests to test SignalSyncToken(). Committed: https://crrev.com/563fb212fda4ad5ea477b754d628527e3f20010f Cr-Commit-Position: refs/heads/master@{#368441}

Patch Set 1 #

Patch Set 2 : Removed SyncPointClientWaiter forward class declaration #

Patch Set 3 : InProcessCommandBuffer::SignalSyncTokenOnGpuThread also waits out of order #

Total comments: 4

Patch Set 4 : revert gpu_command_buffer_stub.cc #

Patch Set 5 : Allow WaitOutOfOrder if no client order data #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -58 lines) Patch
M components/mus/gles2/command_buffer_impl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/gpu_channel.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/sync_point_manager.h View 7 chunks +32 lines, -27 lines 0 comments Download
M gpu/command_buffer/service/sync_point_manager.cc View 1 2 3 4 7 chunks +56 lines, -21 lines 0 comments Download
M gpu/command_buffer/service/sync_point_manager_unittest.cc View 3 chunks +16 lines, -0 lines 0 comments Download
M gpu/command_buffer/tests/gl_fence_sync_unittest.cc View 1 chunk +30 lines, -0 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.h View 2 chunks +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 4 chunks +33 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
David Yen
Sorry for another big semi-complex change, but I found a subtle bug with SignalSyncToken. Hopefully ...
4 years, 11 months ago (2016-01-06 18:45:49 UTC) #2
piman
https://codereview.chromium.org/1568563002/diff/40001/content/common/gpu/gpu_command_buffer_stub.cc File content/common/gpu/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/1568563002/diff/40001/content/common/gpu/gpu_command_buffer_stub.cc#newcode1013 content/common/gpu/gpu_command_buffer_stub.cc:1013: // within the global order. I don't think that's ...
4 years, 11 months ago (2016-01-07 01:16:22 UTC) #3
piman
Actually, thinking a bit more, the difference between SignalSyncToken and WaitSyncToken is that the former ...
4 years, 11 months ago (2016-01-07 01:25:59 UTC) #4
David Yen
https://codereview.chromium.org/1568563002/diff/40001/content/common/gpu/gpu_command_buffer_stub.cc File content/common/gpu/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/1568563002/diff/40001/content/common/gpu/gpu_command_buffer_stub.cc#newcode1013 content/common/gpu/gpu_command_buffer_stub.cc:1013: // within the global order. On 2016/01/07 01:16:22, piman ...
4 years, 11 months ago (2016-01-07 18:40:58 UTC) #5
David Yen
On 2016/01/07 01:25:59, piman (Slow to review) wrote: > Actually, thinking a bit more, the ...
4 years, 11 months ago (2016-01-07 18:47:58 UTC) #6
piman
On 2016/01/07 18:47:58, David Yen wrote: > On 2016/01/07 01:25:59, piman (Slow to review) wrote: ...
4 years, 11 months ago (2016-01-07 22:39:07 UTC) #7
David Yen
On 2016/01/07 22:39:07, piman (Slow to review) wrote: > On 2016/01/07 18:47:58, David Yen wrote: ...
4 years, 11 months ago (2016-01-07 22:48:45 UTC) #8
piman
On 2016/01/07 22:48:45, David Yen wrote: > On 2016/01/07 22:39:07, piman (Slow to review) wrote: ...
4 years, 11 months ago (2016-01-07 22:58:12 UTC) #9
sky
LGTM
4 years, 11 months ago (2016-01-08 16:21:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1568563002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1568563002/80001
4 years, 11 months ago (2016-01-08 21:33:11 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-08 21:58:30 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 21:59:23 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/563fb212fda4ad5ea477b754d628527e3f20010f
Cr-Commit-Position: refs/heads/master@{#368441}

Powered by Google App Engine
This is Rietveld 408576698