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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed memory leak Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_format.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h
index e4d00dd41ea7ee54d64e191e1db885e06dc05020..e502b5ed036c838b844885938eda8ce0b299bf85 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -18,6 +18,7 @@
#include "base/macros.h"
#include "gpu/command_buffer/common/bitfield_helpers.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
+#include "gpu/command_buffer/common/constants.h"
#include "gpu/command_buffer/common/gles2_cmd_ids.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
@@ -202,6 +203,23 @@ struct UniformsES3Header {
// UniformES3Info uniforms[num_uniforms];
};
+// The format of fence sync tokens.
+struct SyncToken {
+ CommandBufferNamespace namespace_id;
+ uint64_t command_buffer_id;
+ uint32_t release_count;
+
+ bool operator<(const SyncToken& other) const {
+ // TODO(dyen): Once all our compilers support c++11, we can replace this
+ // long list of comparisons with std::tie().
+ return (namespace_id < other.namespace_id) ||
+ ((namespace_id == other.namespace_id) &&
+ ((command_buffer_id < other.command_buffer_id) ||
+ ((command_buffer_id == other.command_buffer_id) &&
+ (release_count < other.release_count))));
+ }
+};
+
// The format of QuerySync used by EXT_occlusion_query_boolean
struct QuerySync {
void Reset() {

Powered by Google App Engine
This is Rietveld 408576698