DescriptionAdded 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 #Messages
Total messages: 16 (4 generated)
|