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

Side by Side Diff: gpu/command_buffer/client/gpu_control.h

Issue 2727573003: gpu: Add sync token dependencies to flush metadata. (Closed)
Patch Set: fix broken tests oops Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Returns true if the service has received the fence sync. Used for verifying 92 // Returns true if the service has received the fence sync. Used for verifying
93 // sync tokens. 93 // sync tokens.
94 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0; 94 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0;
95 95
96 // Returns true if the service has released (executed) the fence sync. Some 96 // Returns true if the service has released (executed) the fence sync. Some
97 // implementations may support calling this from any thread without holding 97 // implementations may support calling this from any thread without holding
98 // the lock provided by the client. 98 // the lock provided by the client.
99 virtual bool IsFenceSyncReleased(uint64_t release) = 0; 99 virtual bool IsFenceSyncReleased(uint64_t release) = 0;
100 100
101 // Runs |callback| when sync token is signalled. 101 // Runs |callback| when sync token is signaled.
102 virtual void SignalSyncToken(const SyncToken& sync_token, 102 virtual void SignalSyncToken(const SyncToken& sync_token,
103 const base::Closure& callback) = 0; 103 const base::Closure& callback) = 0;
104 104
105 // This allows the command buffer proxy to mark each flush with sync token
piman 2017/03/15 00:30:14 nit: maybe say "the next flush" instead of "each f
sunnyps 2017/03/15 00:56:12 Done.
106 // dependencies of that flush for the gpu scheduler. This is used in addition
107 // to the WaitSyncToken command in the command buffer. For example, the
108 // WaitSyncToken command is used to pull texture updates when used in
109 // conjunction with MailboxManagerSync.
110 virtual void WaitSyncToken(const SyncToken& sync_token) = 0;
111
105 // Under some circumstances a sync token may be used which has not been 112 // Under some circumstances a sync token may be used which has not been
106 // verified to have been flushed. For example, fence syncs queued on the 113 // verified to have been flushed. For example, fence syncs queued on the same
107 // same channel as the wait command guarantee that the fence sync will 114 // channel as the wait command guarantee that the fence sync will be enqueued
108 // be enqueued first so does not need to be flushed. 115 // first so does not need to be flushed.
109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; 116 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0;
110 117
111 private: 118 private:
112 DISALLOW_COPY_AND_ASSIGN(GpuControl); 119 DISALLOW_COPY_AND_ASSIGN(GpuControl);
113 }; 120 };
114 121
115 } // namespace gpu 122 } // namespace gpu
116 123
117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 124 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/common/sync_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698