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

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

Issue 7458010: Revert 93066 - Execute all GL commands up to the put offset reported by a each flush.This means g... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/common/cmd_buffer_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/cmd_buffer_common.h
===================================================================
--- gpu/command_buffer/common/cmd_buffer_common.h (revision 93137)
+++ gpu/command_buffer/common/cmd_buffer_common.h (working copy)
@@ -158,6 +158,7 @@
OP(SetBucketDataImmediate) /* 9 */ \
OP(GetBucketSize) /* 10 */ \
OP(GetBucketData) /* 11 */ \
+ OP(YieldScheduler) /* 12 */ \
// Common commands.
enum CommandId {
@@ -642,6 +643,32 @@
COMPILE_ASSERT(offsetof(GetBucketData, shared_memory_offset) == 20,
Offsetof_GetBucketData_shared_memory_offset_not_20);
+// A Yield command. Hints the scheduler that this is a good point to update the
+// state and schedule other command buffers.
+struct YieldScheduler {
+ typedef YieldScheduler ValueType;
+ static const CommandId kCmdId = kYieldScheduler;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+
+ void SetHeader() {
+ header.SetCmd<ValueType>();
+ }
+
+ void Init() {
+ SetHeader();
+ }
+ static void* Set(void* cmd) {
+ static_cast<ValueType*>(cmd)->Init();
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ CommandHeader header;
+};
+
+COMPILE_ASSERT(sizeof(YieldScheduler) == 4, Sizeof_YieldScheduler_is_not_4);
+COMPILE_ASSERT(offsetof(YieldScheduler, header) == 0,
+ Offsetof_YieldScheduler_header_not_0);
+
} // namespace cmd
#pragma pack(pop)
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/common/cmd_buffer_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698