summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common/gles2_cmd_format_autogen.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_format_autogen.h')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 7597a51..3557348 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -10936,6 +10936,93 @@ COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0,
COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4);
+struct DrawBuffersEXT {
+ typedef DrawBuffersEXT ValueType;
+ static const CommandId kCmdId = kDrawBuffersEXT;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+
+ static uint32 ComputeSize() {
+ return static_cast<uint32>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() {
+ header.SetCmd<ValueType>();
+ }
+
+ void Init(GLsizei _count, uint32 _bufs_shm_id, uint32 _bufs_shm_offset) {
+ SetHeader();
+ count = _count;
+ bufs_shm_id = _bufs_shm_id;
+ bufs_shm_offset = _bufs_shm_offset;
+ }
+
+ void* Set(
+ void* cmd, GLsizei _count, uint32 _bufs_shm_id,
+ uint32 _bufs_shm_offset) {
+ static_cast<ValueType*>(cmd)->Init(_count, _bufs_shm_id, _bufs_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ int32 count;
+ uint32 bufs_shm_id;
+ uint32 bufs_shm_offset;
+};
+
+COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16,
+ Sizeof_DrawBuffersEXT_is_not_16);
+COMPILE_ASSERT(offsetof(DrawBuffersEXT, header) == 0,
+ OffsetOf_DrawBuffersEXT_header_not_0);
+COMPILE_ASSERT(offsetof(DrawBuffersEXT, count) == 4,
+ OffsetOf_DrawBuffersEXT_count_not_4);
+COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_id) == 8,
+ OffsetOf_DrawBuffersEXT_bufs_shm_id_not_8);
+COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_offset) == 12,
+ OffsetOf_DrawBuffersEXT_bufs_shm_offset_not_12);
+
+struct DrawBuffersEXTImmediate {
+ typedef DrawBuffersEXTImmediate ValueType;
+ static const CommandId kCmdId = kDrawBuffersEXTImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+
+ static uint32 ComputeDataSize(GLsizei count) {
+ return static_cast<uint32>(
+ sizeof(GLenum) * 1 * count); // NOLINT
+ }
+
+ static uint32 ComputeSize(GLsizei count) {
+ return static_cast<uint32>(
+ sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
+ }
+
+ void SetHeader(GLsizei count) {
+ header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
+ }
+
+ void Init(GLsizei _count, const GLenum* _bufs) {
+ SetHeader(_count);
+ count = _count;
+ memcpy(ImmediateDataAddress(this),
+ _bufs, ComputeDataSize(_count));
+ }
+
+ void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
+ static_cast<ValueType*>(cmd)->Init(_count, _bufs);
+ const uint32 size = ComputeSize(_count);
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ int32 count;
+};
+
+COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8,
+ Sizeof_DrawBuffersEXTImmediate_is_not_8);
+COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0,
+ OffsetOf_DrawBuffersEXTImmediate_header_not_0);
+COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4,
+ OffsetOf_DrawBuffersEXTImmediate_count_not_4);
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_