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

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

Issue 299043003: Adding bindless variants mailbox produce/consume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix for windows Created 6 years, 6 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/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a541cbb09e8545d408e305792f7ab4ac4561bf65..656b4b12a9a682358d44bd2bc536db0062e7e5ec 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -461,6 +461,57 @@ struct InsertSyncPointCHROMIUM {
CommandHeader header;
};
+struct CreateAndConsumeTextureCHROMIUMImmediate {
+ typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType;
+ static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) +
+ ComputeDataSize()); // NOLINT
+ }
+
+ void SetHeader(uint32_t size_in_bytes) {
+ header.SetCmdByTotalSize<ValueType>(size_in_bytes);
+ }
+
+ void Init(GLenum _target, uint32_t _client_id, const GLbyte* _mailbox) {
+ SetHeader(ComputeSize());
+ target = _target;
+ client_id = _client_id;
+ memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
+ }
+
+ void* Set(void* cmd,
+ GLenum _target,
+ uint32_t _client_id,
+ const GLbyte* _mailbox) {
+ static_cast<ValueType*>(cmd)->Init(_target, _client_id, _mailbox);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ uint32_t client_id;
+};
+
+COMPILE_ASSERT(sizeof(CreateAndConsumeTextureCHROMIUMImmediate) == 12,
+ Sizeof_CreateAndConsumeTextureCHROMIUMImmediate_is_not_12);
+COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, header) == 0,
+ OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_header_not_0);
+COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, target) == 4,
+ OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_target_not_4);
+COMPILE_ASSERT(
+ offsetof(CreateAndConsumeTextureCHROMIUMImmediate, client_id) == 8,
+ OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_client_id_not_8);
+
+
#pragma pack(pop)
} // namespace cmd
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698