cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
blob11b990145d21fe4b91614a420d976d9e05405576
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT!
9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
12 struct ActiveTexture {
13 typedef ActiveTexture ValueType;
14 static const CommandId kCmdId = kActiveTexture;
15 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
17 static uint32 ComputeSize() {
18 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
21 void SetHeader() {
22 header.SetCmd<ValueType>();
25 void Init(GLenum _texture) {
26 SetHeader();
27 texture = _texture;
30 void* Set(void* cmd, GLenum _texture) {
31 static_cast<ValueType*>(cmd)->Init(_texture);
32 return NextCmdAddress<ValueType>(cmd);
35 gpu::CommandHeader header;
36 uint32 texture;
39 COMPILE_ASSERT(sizeof(ActiveTexture) == 8,
40 Sizeof_ActiveTexture_is_not_8);
41 COMPILE_ASSERT(offsetof(ActiveTexture, header) == 0,
42 OffsetOf_ActiveTexture_header_not_0);
43 COMPILE_ASSERT(offsetof(ActiveTexture, texture) == 4,
44 OffsetOf_ActiveTexture_texture_not_4);
46 struct AttachShader {
47 typedef AttachShader ValueType;
48 static const CommandId kCmdId = kAttachShader;
49 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
51 static uint32 ComputeSize() {
52 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
55 void SetHeader() {
56 header.SetCmd<ValueType>();
59 void Init(GLuint _program, GLuint _shader) {
60 SetHeader();
61 program = _program;
62 shader = _shader;
65 void* Set(void* cmd, GLuint _program, GLuint _shader) {
66 static_cast<ValueType*>(cmd)->Init(_program, _shader);
67 return NextCmdAddress<ValueType>(cmd);
70 gpu::CommandHeader header;
71 uint32 program;
72 uint32 shader;
75 COMPILE_ASSERT(sizeof(AttachShader) == 12,
76 Sizeof_AttachShader_is_not_12);
77 COMPILE_ASSERT(offsetof(AttachShader, header) == 0,
78 OffsetOf_AttachShader_header_not_0);
79 COMPILE_ASSERT(offsetof(AttachShader, program) == 4,
80 OffsetOf_AttachShader_program_not_4);
81 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8,
82 OffsetOf_AttachShader_shader_not_8);
84 struct BindAttribLocation {
85 typedef BindAttribLocation ValueType;
86 static const CommandId kCmdId = kBindAttribLocation;
87 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
89 static uint32 ComputeSize() {
90 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
93 void SetHeader() {
94 header.SetCmd<ValueType>();
97 void Init(
98 GLuint _program, GLuint _index, uint32 _name_shm_id,
99 uint32 _name_shm_offset, uint32 _data_size) {
100 SetHeader();
101 program = _program;
102 index = _index;
103 name_shm_id = _name_shm_id;
104 name_shm_offset = _name_shm_offset;
105 data_size = _data_size;
108 void* Set(
109 void* cmd, GLuint _program, GLuint _index, uint32 _name_shm_id,
110 uint32 _name_shm_offset, uint32 _data_size) {
111 static_cast<ValueType*>(
112 cmd)->Init(
113 _program, _index, _name_shm_id, _name_shm_offset, _data_size);
114 return NextCmdAddress<ValueType>(cmd);
117 gpu::CommandHeader header;
118 uint32 program;
119 uint32 index;
120 uint32 name_shm_id;
121 uint32 name_shm_offset;
122 uint32 data_size;
125 COMPILE_ASSERT(sizeof(BindAttribLocation) == 24,
126 Sizeof_BindAttribLocation_is_not_24);
127 COMPILE_ASSERT(offsetof(BindAttribLocation, header) == 0,
128 OffsetOf_BindAttribLocation_header_not_0);
129 COMPILE_ASSERT(offsetof(BindAttribLocation, program) == 4,
130 OffsetOf_BindAttribLocation_program_not_4);
131 COMPILE_ASSERT(offsetof(BindAttribLocation, index) == 8,
132 OffsetOf_BindAttribLocation_index_not_8);
133 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_id) == 12,
134 OffsetOf_BindAttribLocation_name_shm_id_not_12);
135 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_offset) == 16,
136 OffsetOf_BindAttribLocation_name_shm_offset_not_16);
137 COMPILE_ASSERT(offsetof(BindAttribLocation, data_size) == 20,
138 OffsetOf_BindAttribLocation_data_size_not_20);
140 struct BindAttribLocationImmediate {
141 typedef BindAttribLocationImmediate ValueType;
142 static const CommandId kCmdId = kBindAttribLocationImmediate;
143 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
145 static uint32 ComputeSize(uint32 data_size) {
146 return static_cast<uint32>(
147 sizeof(ValueType) + data_size); // NOLINT
150 void SetHeader(uint32 data_size) {
151 header.SetCmdBySize<ValueType>(data_size);
154 void Init(
155 GLuint _program, GLuint _index, const char* _name, uint32 _data_size) {
156 SetHeader(_data_size);
157 program = _program;
158 index = _index;
159 data_size = _data_size;
160 memcpy(ImmediateDataAddress(this), _name, _data_size);
163 void* Set(
164 void* cmd, GLuint _program, GLuint _index, const char* _name,
165 uint32 _data_size) {
166 static_cast<ValueType*>(cmd)->Init(_program, _index, _name, _data_size);
167 return NextImmediateCmdAddress<ValueType>(cmd, _data_size);
170 gpu::CommandHeader header;
171 uint32 program;
172 uint32 index;
173 uint32 data_size;
176 COMPILE_ASSERT(sizeof(BindAttribLocationImmediate) == 16,
177 Sizeof_BindAttribLocationImmediate_is_not_16);
178 COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, header) == 0,
179 OffsetOf_BindAttribLocationImmediate_header_not_0);
180 COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, program) == 4,
181 OffsetOf_BindAttribLocationImmediate_program_not_4);
182 COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, index) == 8,
183 OffsetOf_BindAttribLocationImmediate_index_not_8);
184 COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, data_size) == 12,
185 OffsetOf_BindAttribLocationImmediate_data_size_not_12);
187 struct BindAttribLocationBucket {
188 typedef BindAttribLocationBucket ValueType;
189 static const CommandId kCmdId = kBindAttribLocationBucket;
190 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
192 static uint32 ComputeSize() {
193 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
196 void SetHeader() {
197 header.SetCmd<ValueType>();
200 void Init(GLuint _program, GLuint _index, uint32 _name_bucket_id) {
201 SetHeader();
202 program = _program;
203 index = _index;
204 name_bucket_id = _name_bucket_id;
207 void* Set(
208 void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id) {
209 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
210 return NextCmdAddress<ValueType>(cmd);
213 gpu::CommandHeader header;
214 uint32 program;
215 uint32 index;
216 uint32 name_bucket_id;
219 COMPILE_ASSERT(sizeof(BindAttribLocationBucket) == 16,
220 Sizeof_BindAttribLocationBucket_is_not_16);
221 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, header) == 0,
222 OffsetOf_BindAttribLocationBucket_header_not_0);
223 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, program) == 4,
224 OffsetOf_BindAttribLocationBucket_program_not_4);
225 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, index) == 8,
226 OffsetOf_BindAttribLocationBucket_index_not_8);
227 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
228 OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12);
230 struct BindBuffer {
231 typedef BindBuffer ValueType;
232 static const CommandId kCmdId = kBindBuffer;
233 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
235 static uint32 ComputeSize() {
236 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
239 void SetHeader() {
240 header.SetCmd<ValueType>();
243 void Init(GLenum _target, GLuint _buffer) {
244 SetHeader();
245 target = _target;
246 buffer = _buffer;
249 void* Set(void* cmd, GLenum _target, GLuint _buffer) {
250 static_cast<ValueType*>(cmd)->Init(_target, _buffer);
251 return NextCmdAddress<ValueType>(cmd);
254 gpu::CommandHeader header;
255 uint32 target;
256 uint32 buffer;
259 COMPILE_ASSERT(sizeof(BindBuffer) == 12,
260 Sizeof_BindBuffer_is_not_12);
261 COMPILE_ASSERT(offsetof(BindBuffer, header) == 0,
262 OffsetOf_BindBuffer_header_not_0);
263 COMPILE_ASSERT(offsetof(BindBuffer, target) == 4,
264 OffsetOf_BindBuffer_target_not_4);
265 COMPILE_ASSERT(offsetof(BindBuffer, buffer) == 8,
266 OffsetOf_BindBuffer_buffer_not_8);
268 struct BindFramebuffer {
269 typedef BindFramebuffer ValueType;
270 static const CommandId kCmdId = kBindFramebuffer;
271 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
273 static uint32 ComputeSize() {
274 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
277 void SetHeader() {
278 header.SetCmd<ValueType>();
281 void Init(GLenum _target, GLuint _framebuffer) {
282 SetHeader();
283 target = _target;
284 framebuffer = _framebuffer;
287 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
288 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
289 return NextCmdAddress<ValueType>(cmd);
292 gpu::CommandHeader header;
293 uint32 target;
294 uint32 framebuffer;
297 COMPILE_ASSERT(sizeof(BindFramebuffer) == 12,
298 Sizeof_BindFramebuffer_is_not_12);
299 COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0,
300 OffsetOf_BindFramebuffer_header_not_0);
301 COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4,
302 OffsetOf_BindFramebuffer_target_not_4);
303 COMPILE_ASSERT(offsetof(BindFramebuffer, framebuffer) == 8,
304 OffsetOf_BindFramebuffer_framebuffer_not_8);
306 struct BindRenderbuffer {
307 typedef BindRenderbuffer ValueType;
308 static const CommandId kCmdId = kBindRenderbuffer;
309 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
311 static uint32 ComputeSize() {
312 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
315 void SetHeader() {
316 header.SetCmd<ValueType>();
319 void Init(GLenum _target, GLuint _renderbuffer) {
320 SetHeader();
321 target = _target;
322 renderbuffer = _renderbuffer;
325 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
326 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
327 return NextCmdAddress<ValueType>(cmd);
330 gpu::CommandHeader header;
331 uint32 target;
332 uint32 renderbuffer;
335 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12,
336 Sizeof_BindRenderbuffer_is_not_12);
337 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0,
338 OffsetOf_BindRenderbuffer_header_not_0);
339 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4,
340 OffsetOf_BindRenderbuffer_target_not_4);
341 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8,
342 OffsetOf_BindRenderbuffer_renderbuffer_not_8);
344 struct BindTexture {
345 typedef BindTexture ValueType;
346 static const CommandId kCmdId = kBindTexture;
347 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
349 static uint32 ComputeSize() {
350 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
353 void SetHeader() {
354 header.SetCmd<ValueType>();
357 void Init(GLenum _target, GLuint _texture) {
358 SetHeader();
359 target = _target;
360 texture = _texture;
363 void* Set(void* cmd, GLenum _target, GLuint _texture) {
364 static_cast<ValueType*>(cmd)->Init(_target, _texture);
365 return NextCmdAddress<ValueType>(cmd);
368 gpu::CommandHeader header;
369 uint32 target;
370 uint32 texture;
373 COMPILE_ASSERT(sizeof(BindTexture) == 12,
374 Sizeof_BindTexture_is_not_12);
375 COMPILE_ASSERT(offsetof(BindTexture, header) == 0,
376 OffsetOf_BindTexture_header_not_0);
377 COMPILE_ASSERT(offsetof(BindTexture, target) == 4,
378 OffsetOf_BindTexture_target_not_4);
379 COMPILE_ASSERT(offsetof(BindTexture, texture) == 8,
380 OffsetOf_BindTexture_texture_not_8);
382 struct BlendColor {
383 typedef BlendColor ValueType;
384 static const CommandId kCmdId = kBlendColor;
385 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
387 static uint32 ComputeSize() {
388 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
391 void SetHeader() {
392 header.SetCmd<ValueType>();
395 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
396 SetHeader();
397 red = _red;
398 green = _green;
399 blue = _blue;
400 alpha = _alpha;
403 void* Set(
404 void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue,
405 GLclampf _alpha) {
406 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
407 return NextCmdAddress<ValueType>(cmd);
410 gpu::CommandHeader header;
411 float red;
412 float green;
413 float blue;
414 float alpha;
417 COMPILE_ASSERT(sizeof(BlendColor) == 20,
418 Sizeof_BlendColor_is_not_20);
419 COMPILE_ASSERT(offsetof(BlendColor, header) == 0,
420 OffsetOf_BlendColor_header_not_0);
421 COMPILE_ASSERT(offsetof(BlendColor, red) == 4,
422 OffsetOf_BlendColor_red_not_4);
423 COMPILE_ASSERT(offsetof(BlendColor, green) == 8,
424 OffsetOf_BlendColor_green_not_8);
425 COMPILE_ASSERT(offsetof(BlendColor, blue) == 12,
426 OffsetOf_BlendColor_blue_not_12);
427 COMPILE_ASSERT(offsetof(BlendColor, alpha) == 16,
428 OffsetOf_BlendColor_alpha_not_16);
430 struct BlendEquation {
431 typedef BlendEquation ValueType;
432 static const CommandId kCmdId = kBlendEquation;
433 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
435 static uint32 ComputeSize() {
436 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
439 void SetHeader() {
440 header.SetCmd<ValueType>();
443 void Init(GLenum _mode) {
444 SetHeader();
445 mode = _mode;
448 void* Set(void* cmd, GLenum _mode) {
449 static_cast<ValueType*>(cmd)->Init(_mode);
450 return NextCmdAddress<ValueType>(cmd);
453 gpu::CommandHeader header;
454 uint32 mode;
457 COMPILE_ASSERT(sizeof(BlendEquation) == 8,
458 Sizeof_BlendEquation_is_not_8);
459 COMPILE_ASSERT(offsetof(BlendEquation, header) == 0,
460 OffsetOf_BlendEquation_header_not_0);
461 COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4,
462 OffsetOf_BlendEquation_mode_not_4);
464 struct BlendEquationSeparate {
465 typedef BlendEquationSeparate ValueType;
466 static const CommandId kCmdId = kBlendEquationSeparate;
467 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
469 static uint32 ComputeSize() {
470 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
473 void SetHeader() {
474 header.SetCmd<ValueType>();
477 void Init(GLenum _modeRGB, GLenum _modeAlpha) {
478 SetHeader();
479 modeRGB = _modeRGB;
480 modeAlpha = _modeAlpha;
483 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
484 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
485 return NextCmdAddress<ValueType>(cmd);
488 gpu::CommandHeader header;
489 uint32 modeRGB;
490 uint32 modeAlpha;
493 COMPILE_ASSERT(sizeof(BlendEquationSeparate) == 12,
494 Sizeof_BlendEquationSeparate_is_not_12);
495 COMPILE_ASSERT(offsetof(BlendEquationSeparate, header) == 0,
496 OffsetOf_BlendEquationSeparate_header_not_0);
497 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeRGB) == 4,
498 OffsetOf_BlendEquationSeparate_modeRGB_not_4);
499 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeAlpha) == 8,
500 OffsetOf_BlendEquationSeparate_modeAlpha_not_8);
502 struct BlendFunc {
503 typedef BlendFunc ValueType;
504 static const CommandId kCmdId = kBlendFunc;
505 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
507 static uint32 ComputeSize() {
508 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
511 void SetHeader() {
512 header.SetCmd<ValueType>();
515 void Init(GLenum _sfactor, GLenum _dfactor) {
516 SetHeader();
517 sfactor = _sfactor;
518 dfactor = _dfactor;
521 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
522 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
523 return NextCmdAddress<ValueType>(cmd);
526 gpu::CommandHeader header;
527 uint32 sfactor;
528 uint32 dfactor;
531 COMPILE_ASSERT(sizeof(BlendFunc) == 12,
532 Sizeof_BlendFunc_is_not_12);
533 COMPILE_ASSERT(offsetof(BlendFunc, header) == 0,
534 OffsetOf_BlendFunc_header_not_0);
535 COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4,
536 OffsetOf_BlendFunc_sfactor_not_4);
537 COMPILE_ASSERT(offsetof(BlendFunc, dfactor) == 8,
538 OffsetOf_BlendFunc_dfactor_not_8);
540 struct BlendFuncSeparate {
541 typedef BlendFuncSeparate ValueType;
542 static const CommandId kCmdId = kBlendFuncSeparate;
543 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
545 static uint32 ComputeSize() {
546 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
549 void SetHeader() {
550 header.SetCmd<ValueType>();
553 void Init(
554 GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha, GLenum _dstAlpha) {
555 SetHeader();
556 srcRGB = _srcRGB;
557 dstRGB = _dstRGB;
558 srcAlpha = _srcAlpha;
559 dstAlpha = _dstAlpha;
562 void* Set(
563 void* cmd, GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha,
564 GLenum _dstAlpha) {
565 static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
566 return NextCmdAddress<ValueType>(cmd);
569 gpu::CommandHeader header;
570 uint32 srcRGB;
571 uint32 dstRGB;
572 uint32 srcAlpha;
573 uint32 dstAlpha;
576 COMPILE_ASSERT(sizeof(BlendFuncSeparate) == 20,
577 Sizeof_BlendFuncSeparate_is_not_20);
578 COMPILE_ASSERT(offsetof(BlendFuncSeparate, header) == 0,
579 OffsetOf_BlendFuncSeparate_header_not_0);
580 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcRGB) == 4,
581 OffsetOf_BlendFuncSeparate_srcRGB_not_4);
582 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstRGB) == 8,
583 OffsetOf_BlendFuncSeparate_dstRGB_not_8);
584 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcAlpha) == 12,
585 OffsetOf_BlendFuncSeparate_srcAlpha_not_12);
586 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstAlpha) == 16,
587 OffsetOf_BlendFuncSeparate_dstAlpha_not_16);
589 struct BufferData {
590 typedef BufferData ValueType;
591 static const CommandId kCmdId = kBufferData;
592 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
594 static uint32 ComputeSize() {
595 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
598 void SetHeader() {
599 header.SetCmd<ValueType>();
602 void Init(
603 GLenum _target, GLsizeiptr _size, uint32 _data_shm_id,
604 uint32 _data_shm_offset, GLenum _usage) {
605 SetHeader();
606 target = _target;
607 size = _size;
608 data_shm_id = _data_shm_id;
609 data_shm_offset = _data_shm_offset;
610 usage = _usage;
613 void* Set(
614 void* cmd, GLenum _target, GLsizeiptr _size, uint32 _data_shm_id,
615 uint32 _data_shm_offset, GLenum _usage) {
616 static_cast<ValueType*>(
617 cmd)->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage);
618 return NextCmdAddress<ValueType>(cmd);
621 gpu::CommandHeader header;
622 uint32 target;
623 int32 size;
624 uint32 data_shm_id;
625 uint32 data_shm_offset;
626 uint32 usage;
629 COMPILE_ASSERT(sizeof(BufferData) == 24,
630 Sizeof_BufferData_is_not_24);
631 COMPILE_ASSERT(offsetof(BufferData, header) == 0,
632 OffsetOf_BufferData_header_not_0);
633 COMPILE_ASSERT(offsetof(BufferData, target) == 4,
634 OffsetOf_BufferData_target_not_4);
635 COMPILE_ASSERT(offsetof(BufferData, size) == 8,
636 OffsetOf_BufferData_size_not_8);
637 COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12,
638 OffsetOf_BufferData_data_shm_id_not_12);
639 COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16,
640 OffsetOf_BufferData_data_shm_offset_not_16);
641 COMPILE_ASSERT(offsetof(BufferData, usage) == 20,
642 OffsetOf_BufferData_usage_not_20);
644 struct BufferDataImmediate {
645 typedef BufferDataImmediate ValueType;
646 static const CommandId kCmdId = kBufferDataImmediate;
647 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
649 static uint32 ComputeSize(uint32 size_in_bytes) {
650 return static_cast<uint32>(
651 sizeof(ValueType) + // NOLINT
652 RoundSizeToMultipleOfEntries(size_in_bytes));
655 void SetHeader(uint32 size_in_bytes) {
656 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
659 void Init(GLenum _target, GLsizeiptr _size, GLenum _usage) {
660 uint32 total_size = 0; // TODO(gman): get correct size.
661 SetHeader(total_size);
662 target = _target;
663 size = _size;
664 usage = _usage;
667 void* Set(void* cmd, GLenum _target, GLsizeiptr _size, GLenum _usage) {
668 uint32 total_size = 0; // TODO(gman): get correct size.
669 static_cast<ValueType*>(cmd)->Init(_target, _size, _usage);
670 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
673 gpu::CommandHeader header;
674 uint32 target;
675 int32 size;
676 uint32 usage;
679 COMPILE_ASSERT(sizeof(BufferDataImmediate) == 16,
680 Sizeof_BufferDataImmediate_is_not_16);
681 COMPILE_ASSERT(offsetof(BufferDataImmediate, header) == 0,
682 OffsetOf_BufferDataImmediate_header_not_0);
683 COMPILE_ASSERT(offsetof(BufferDataImmediate, target) == 4,
684 OffsetOf_BufferDataImmediate_target_not_4);
685 COMPILE_ASSERT(offsetof(BufferDataImmediate, size) == 8,
686 OffsetOf_BufferDataImmediate_size_not_8);
687 COMPILE_ASSERT(offsetof(BufferDataImmediate, usage) == 12,
688 OffsetOf_BufferDataImmediate_usage_not_12);
690 struct BufferSubData {
691 typedef BufferSubData ValueType;
692 static const CommandId kCmdId = kBufferSubData;
693 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
695 static uint32 ComputeSize() {
696 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
699 void SetHeader() {
700 header.SetCmd<ValueType>();
703 void Init(
704 GLenum _target, GLintptr _offset, GLsizeiptr _size, uint32 _data_shm_id,
705 uint32 _data_shm_offset) {
706 SetHeader();
707 target = _target;
708 offset = _offset;
709 size = _size;
710 data_shm_id = _data_shm_id;
711 data_shm_offset = _data_shm_offset;
714 void* Set(
715 void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size,
716 uint32 _data_shm_id, uint32 _data_shm_offset) {
717 static_cast<ValueType*>(
718 cmd)->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset);
719 return NextCmdAddress<ValueType>(cmd);
722 gpu::CommandHeader header;
723 uint32 target;
724 int32 offset;
725 int32 size;
726 uint32 data_shm_id;
727 uint32 data_shm_offset;
730 COMPILE_ASSERT(sizeof(BufferSubData) == 24,
731 Sizeof_BufferSubData_is_not_24);
732 COMPILE_ASSERT(offsetof(BufferSubData, header) == 0,
733 OffsetOf_BufferSubData_header_not_0);
734 COMPILE_ASSERT(offsetof(BufferSubData, target) == 4,
735 OffsetOf_BufferSubData_target_not_4);
736 COMPILE_ASSERT(offsetof(BufferSubData, offset) == 8,
737 OffsetOf_BufferSubData_offset_not_8);
738 COMPILE_ASSERT(offsetof(BufferSubData, size) == 12,
739 OffsetOf_BufferSubData_size_not_12);
740 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16,
741 OffsetOf_BufferSubData_data_shm_id_not_16);
742 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20,
743 OffsetOf_BufferSubData_data_shm_offset_not_20);
745 struct BufferSubDataImmediate {
746 typedef BufferSubDataImmediate ValueType;
747 static const CommandId kCmdId = kBufferSubDataImmediate;
748 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
750 static uint32 ComputeSize(uint32 size_in_bytes) {
751 return static_cast<uint32>(
752 sizeof(ValueType) + // NOLINT
753 RoundSizeToMultipleOfEntries(size_in_bytes));
756 void SetHeader(uint32 size_in_bytes) {
757 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
760 void Init(GLenum _target, GLintptr _offset, GLsizeiptr _size) {
761 uint32 total_size = ComputeSize(_size);
762 SetHeader(total_size);
763 target = _target;
764 offset = _offset;
765 size = _size;
768 void* Set(void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size) {
769 uint32 total_size = ComputeSize(_size);
770 static_cast<ValueType*>(cmd)->Init(_target, _offset, _size);
771 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
774 gpu::CommandHeader header;
775 uint32 target;
776 int32 offset;
777 int32 size;
780 COMPILE_ASSERT(sizeof(BufferSubDataImmediate) == 16,
781 Sizeof_BufferSubDataImmediate_is_not_16);
782 COMPILE_ASSERT(offsetof(BufferSubDataImmediate, header) == 0,
783 OffsetOf_BufferSubDataImmediate_header_not_0);
784 COMPILE_ASSERT(offsetof(BufferSubDataImmediate, target) == 4,
785 OffsetOf_BufferSubDataImmediate_target_not_4);
786 COMPILE_ASSERT(offsetof(BufferSubDataImmediate, offset) == 8,
787 OffsetOf_BufferSubDataImmediate_offset_not_8);
788 COMPILE_ASSERT(offsetof(BufferSubDataImmediate, size) == 12,
789 OffsetOf_BufferSubDataImmediate_size_not_12);
791 struct CheckFramebufferStatus {
792 typedef CheckFramebufferStatus ValueType;
793 static const CommandId kCmdId = kCheckFramebufferStatus;
794 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
796 typedef GLenum Result;
798 static uint32 ComputeSize() {
799 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
802 void SetHeader() {
803 header.SetCmd<ValueType>();
806 void Init(GLenum _target, uint32 _result_shm_id, uint32 _result_shm_offset) {
807 SetHeader();
808 target = _target;
809 result_shm_id = _result_shm_id;
810 result_shm_offset = _result_shm_offset;
813 void* Set(
814 void* cmd, GLenum _target, uint32 _result_shm_id,
815 uint32 _result_shm_offset) {
816 static_cast<ValueType*>(
817 cmd)->Init(_target, _result_shm_id, _result_shm_offset);
818 return NextCmdAddress<ValueType>(cmd);
821 gpu::CommandHeader header;
822 uint32 target;
823 uint32 result_shm_id;
824 uint32 result_shm_offset;
827 COMPILE_ASSERT(sizeof(CheckFramebufferStatus) == 16,
828 Sizeof_CheckFramebufferStatus_is_not_16);
829 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, header) == 0,
830 OffsetOf_CheckFramebufferStatus_header_not_0);
831 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, target) == 4,
832 OffsetOf_CheckFramebufferStatus_target_not_4);
833 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
834 OffsetOf_CheckFramebufferStatus_result_shm_id_not_8);
835 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
836 OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12);
838 struct Clear {
839 typedef Clear ValueType;
840 static const CommandId kCmdId = kClear;
841 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
843 static uint32 ComputeSize() {
844 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
847 void SetHeader() {
848 header.SetCmd<ValueType>();
851 void Init(GLbitfield _mask) {
852 SetHeader();
853 mask = _mask;
856 void* Set(void* cmd, GLbitfield _mask) {
857 static_cast<ValueType*>(cmd)->Init(_mask);
858 return NextCmdAddress<ValueType>(cmd);
861 gpu::CommandHeader header;
862 uint32 mask;
865 COMPILE_ASSERT(sizeof(Clear) == 8,
866 Sizeof_Clear_is_not_8);
867 COMPILE_ASSERT(offsetof(Clear, header) == 0,
868 OffsetOf_Clear_header_not_0);
869 COMPILE_ASSERT(offsetof(Clear, mask) == 4,
870 OffsetOf_Clear_mask_not_4);
872 struct ClearColor {
873 typedef ClearColor ValueType;
874 static const CommandId kCmdId = kClearColor;
875 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
877 static uint32 ComputeSize() {
878 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
881 void SetHeader() {
882 header.SetCmd<ValueType>();
885 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
886 SetHeader();
887 red = _red;
888 green = _green;
889 blue = _blue;
890 alpha = _alpha;
893 void* Set(
894 void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue,
895 GLclampf _alpha) {
896 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
897 return NextCmdAddress<ValueType>(cmd);
900 gpu::CommandHeader header;
901 float red;
902 float green;
903 float blue;
904 float alpha;
907 COMPILE_ASSERT(sizeof(ClearColor) == 20,
908 Sizeof_ClearColor_is_not_20);
909 COMPILE_ASSERT(offsetof(ClearColor, header) == 0,
910 OffsetOf_ClearColor_header_not_0);
911 COMPILE_ASSERT(offsetof(ClearColor, red) == 4,
912 OffsetOf_ClearColor_red_not_4);
913 COMPILE_ASSERT(offsetof(ClearColor, green) == 8,
914 OffsetOf_ClearColor_green_not_8);
915 COMPILE_ASSERT(offsetof(ClearColor, blue) == 12,
916 OffsetOf_ClearColor_blue_not_12);
917 COMPILE_ASSERT(offsetof(ClearColor, alpha) == 16,
918 OffsetOf_ClearColor_alpha_not_16);
920 struct ClearDepthf {
921 typedef ClearDepthf ValueType;
922 static const CommandId kCmdId = kClearDepthf;
923 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
925 static uint32 ComputeSize() {
926 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
929 void SetHeader() {
930 header.SetCmd<ValueType>();
933 void Init(GLclampf _depth) {
934 SetHeader();
935 depth = _depth;
938 void* Set(void* cmd, GLclampf _depth) {
939 static_cast<ValueType*>(cmd)->Init(_depth);
940 return NextCmdAddress<ValueType>(cmd);
943 gpu::CommandHeader header;
944 float depth;
947 COMPILE_ASSERT(sizeof(ClearDepthf) == 8,
948 Sizeof_ClearDepthf_is_not_8);
949 COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0,
950 OffsetOf_ClearDepthf_header_not_0);
951 COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4,
952 OffsetOf_ClearDepthf_depth_not_4);
954 struct ClearStencil {
955 typedef ClearStencil ValueType;
956 static const CommandId kCmdId = kClearStencil;
957 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
959 static uint32 ComputeSize() {
960 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
963 void SetHeader() {
964 header.SetCmd<ValueType>();
967 void Init(GLint _s) {
968 SetHeader();
969 s = _s;
972 void* Set(void* cmd, GLint _s) {
973 static_cast<ValueType*>(cmd)->Init(_s);
974 return NextCmdAddress<ValueType>(cmd);
977 gpu::CommandHeader header;
978 int32 s;
981 COMPILE_ASSERT(sizeof(ClearStencil) == 8,
982 Sizeof_ClearStencil_is_not_8);
983 COMPILE_ASSERT(offsetof(ClearStencil, header) == 0,
984 OffsetOf_ClearStencil_header_not_0);
985 COMPILE_ASSERT(offsetof(ClearStencil, s) == 4,
986 OffsetOf_ClearStencil_s_not_4);
988 struct ColorMask {
989 typedef ColorMask ValueType;
990 static const CommandId kCmdId = kColorMask;
991 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
993 static uint32 ComputeSize() {
994 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
997 void SetHeader() {
998 header.SetCmd<ValueType>();
1001 void Init(
1002 GLboolean _red, GLboolean _green, GLboolean _blue, GLboolean _alpha) {
1003 SetHeader();
1004 red = _red;
1005 green = _green;
1006 blue = _blue;
1007 alpha = _alpha;
1010 void* Set(
1011 void* cmd, GLboolean _red, GLboolean _green, GLboolean _blue,
1012 GLboolean _alpha) {
1013 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
1014 return NextCmdAddress<ValueType>(cmd);
1017 gpu::CommandHeader header;
1018 uint32 red;
1019 uint32 green;
1020 uint32 blue;
1021 uint32 alpha;
1024 COMPILE_ASSERT(sizeof(ColorMask) == 20,
1025 Sizeof_ColorMask_is_not_20);
1026 COMPILE_ASSERT(offsetof(ColorMask, header) == 0,
1027 OffsetOf_ColorMask_header_not_0);
1028 COMPILE_ASSERT(offsetof(ColorMask, red) == 4,
1029 OffsetOf_ColorMask_red_not_4);
1030 COMPILE_ASSERT(offsetof(ColorMask, green) == 8,
1031 OffsetOf_ColorMask_green_not_8);
1032 COMPILE_ASSERT(offsetof(ColorMask, blue) == 12,
1033 OffsetOf_ColorMask_blue_not_12);
1034 COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16,
1035 OffsetOf_ColorMask_alpha_not_16);
1037 struct CompileShader {
1038 typedef CompileShader ValueType;
1039 static const CommandId kCmdId = kCompileShader;
1040 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1042 static uint32 ComputeSize() {
1043 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1046 void SetHeader() {
1047 header.SetCmd<ValueType>();
1050 void Init(GLuint _shader) {
1051 SetHeader();
1052 shader = _shader;
1055 void* Set(void* cmd, GLuint _shader) {
1056 static_cast<ValueType*>(cmd)->Init(_shader);
1057 return NextCmdAddress<ValueType>(cmd);
1060 gpu::CommandHeader header;
1061 uint32 shader;
1064 COMPILE_ASSERT(sizeof(CompileShader) == 8,
1065 Sizeof_CompileShader_is_not_8);
1066 COMPILE_ASSERT(offsetof(CompileShader, header) == 0,
1067 OffsetOf_CompileShader_header_not_0);
1068 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4,
1069 OffsetOf_CompileShader_shader_not_4);
1071 struct CompressedTexImage2D {
1072 typedef CompressedTexImage2D ValueType;
1073 static const CommandId kCmdId = kCompressedTexImage2D;
1074 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1076 static uint32 ComputeSize() {
1077 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1080 void SetHeader() {
1081 header.SetCmd<ValueType>();
1084 void Init(
1085 GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width,
1086 GLsizei _height, GLint _border, GLsizei _imageSize, uint32 _data_shm_id,
1087 uint32 _data_shm_offset) {
1088 SetHeader();
1089 target = _target;
1090 level = _level;
1091 internalformat = _internalformat;
1092 width = _width;
1093 height = _height;
1094 border = _border;
1095 imageSize = _imageSize;
1096 data_shm_id = _data_shm_id;
1097 data_shm_offset = _data_shm_offset;
1100 void* Set(
1101 void* cmd, GLenum _target, GLint _level, GLenum _internalformat,
1102 GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize,
1103 uint32 _data_shm_id, uint32 _data_shm_offset) {
1104 static_cast<ValueType*>(
1105 cmd)->Init(
1106 _target, _level, _internalformat, _width, _height, _border,
1107 _imageSize, _data_shm_id, _data_shm_offset);
1108 return NextCmdAddress<ValueType>(cmd);
1111 gpu::CommandHeader header;
1112 uint32 target;
1113 int32 level;
1114 uint32 internalformat;
1115 int32 width;
1116 int32 height;
1117 int32 border;
1118 int32 imageSize;
1119 uint32 data_shm_id;
1120 uint32 data_shm_offset;
1123 COMPILE_ASSERT(sizeof(CompressedTexImage2D) == 40,
1124 Sizeof_CompressedTexImage2D_is_not_40);
1125 COMPILE_ASSERT(offsetof(CompressedTexImage2D, header) == 0,
1126 OffsetOf_CompressedTexImage2D_header_not_0);
1127 COMPILE_ASSERT(offsetof(CompressedTexImage2D, target) == 4,
1128 OffsetOf_CompressedTexImage2D_target_not_4);
1129 COMPILE_ASSERT(offsetof(CompressedTexImage2D, level) == 8,
1130 OffsetOf_CompressedTexImage2D_level_not_8);
1131 COMPILE_ASSERT(offsetof(CompressedTexImage2D, internalformat) == 12,
1132 OffsetOf_CompressedTexImage2D_internalformat_not_12);
1133 COMPILE_ASSERT(offsetof(CompressedTexImage2D, width) == 16,
1134 OffsetOf_CompressedTexImage2D_width_not_16);
1135 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20,
1136 OffsetOf_CompressedTexImage2D_height_not_20);
1137 COMPILE_ASSERT(offsetof(CompressedTexImage2D, border) == 24,
1138 OffsetOf_CompressedTexImage2D_border_not_24);
1139 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 28,
1140 OffsetOf_CompressedTexImage2D_imageSize_not_28);
1141 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 32,
1142 OffsetOf_CompressedTexImage2D_data_shm_id_not_32);
1143 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 36,
1144 OffsetOf_CompressedTexImage2D_data_shm_offset_not_36);
1146 struct CompressedTexImage2DImmediate {
1147 typedef CompressedTexImage2DImmediate ValueType;
1148 static const CommandId kCmdId = kCompressedTexImage2DImmediate;
1149 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1151 static uint32 ComputeSize(uint32 size_in_bytes) {
1152 return static_cast<uint32>(
1153 sizeof(ValueType) + // NOLINT
1154 RoundSizeToMultipleOfEntries(size_in_bytes));
1157 void SetHeader(uint32 size_in_bytes) {
1158 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
1161 void Init(
1162 GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width,
1163 GLsizei _height, GLint _border, GLsizei _imageSize) {
1164 uint32 total_size = 0; // TODO(gman): get correct size.
1165 SetHeader(total_size);
1166 target = _target;
1167 level = _level;
1168 internalformat = _internalformat;
1169 width = _width;
1170 height = _height;
1171 border = _border;
1172 imageSize = _imageSize;
1175 void* Set(
1176 void* cmd, GLenum _target, GLint _level, GLenum _internalformat,
1177 GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize) {
1178 uint32 total_size = 0; // TODO(gman): get correct size.
1179 static_cast<ValueType*>(
1180 cmd)->Init(
1181 _target, _level, _internalformat, _width, _height, _border,
1182 _imageSize);
1183 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
1186 gpu::CommandHeader header;
1187 uint32 target;
1188 int32 level;
1189 uint32 internalformat;
1190 int32 width;
1191 int32 height;
1192 int32 border;
1193 int32 imageSize;
1196 COMPILE_ASSERT(sizeof(CompressedTexImage2DImmediate) == 32,
1197 Sizeof_CompressedTexImage2DImmediate_is_not_32);
1198 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, header) == 0,
1199 OffsetOf_CompressedTexImage2DImmediate_header_not_0);
1200 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, target) == 4,
1201 OffsetOf_CompressedTexImage2DImmediate_target_not_4);
1202 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, level) == 8,
1203 OffsetOf_CompressedTexImage2DImmediate_level_not_8);
1204 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, internalformat) == 12,
1205 OffsetOf_CompressedTexImage2DImmediate_internalformat_not_12);
1206 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, width) == 16,
1207 OffsetOf_CompressedTexImage2DImmediate_width_not_16);
1208 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, height) == 20,
1209 OffsetOf_CompressedTexImage2DImmediate_height_not_20);
1210 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, border) == 24,
1211 OffsetOf_CompressedTexImage2DImmediate_border_not_24);
1212 COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, imageSize) == 28,
1213 OffsetOf_CompressedTexImage2DImmediate_imageSize_not_28);
1215 struct CompressedTexImage2DBucket {
1216 typedef CompressedTexImage2DBucket ValueType;
1217 static const CommandId kCmdId = kCompressedTexImage2DBucket;
1218 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1220 static uint32 ComputeSize() {
1221 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1224 void SetHeader() {
1225 header.SetCmd<ValueType>();
1228 void Init(
1229 GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width,
1230 GLsizei _height, GLint _border, GLuint _bucket_id) {
1231 SetHeader();
1232 target = _target;
1233 level = _level;
1234 internalformat = _internalformat;
1235 width = _width;
1236 height = _height;
1237 border = _border;
1238 bucket_id = _bucket_id;
1241 void* Set(
1242 void* cmd, GLenum _target, GLint _level, GLenum _internalformat,
1243 GLsizei _width, GLsizei _height, GLint _border, GLuint _bucket_id) {
1244 static_cast<ValueType*>(
1245 cmd)->Init(
1246 _target, _level, _internalformat, _width, _height, _border,
1247 _bucket_id);
1248 return NextCmdAddress<ValueType>(cmd);
1251 gpu::CommandHeader header;
1252 uint32 target;
1253 int32 level;
1254 uint32 internalformat;
1255 int32 width;
1256 int32 height;
1257 int32 border;
1258 uint32 bucket_id;
1261 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 32,
1262 Sizeof_CompressedTexImage2DBucket_is_not_32);
1263 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0,
1264 OffsetOf_CompressedTexImage2DBucket_header_not_0);
1265 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4,
1266 OffsetOf_CompressedTexImage2DBucket_target_not_4);
1267 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8,
1268 OffsetOf_CompressedTexImage2DBucket_level_not_8);
1269 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12,
1270 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12);
1271 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16,
1272 OffsetOf_CompressedTexImage2DBucket_width_not_16);
1273 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20,
1274 OffsetOf_CompressedTexImage2DBucket_height_not_20);
1275 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, border) == 24,
1276 OffsetOf_CompressedTexImage2DBucket_border_not_24);
1277 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 28,
1278 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_28);
1280 struct CompressedTexSubImage2D {
1281 typedef CompressedTexSubImage2D ValueType;
1282 static const CommandId kCmdId = kCompressedTexSubImage2D;
1283 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1285 static uint32 ComputeSize() {
1286 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1289 void SetHeader() {
1290 header.SetCmd<ValueType>();
1293 void Init(
1294 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1295 GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize,
1296 uint32 _data_shm_id, uint32 _data_shm_offset) {
1297 SetHeader();
1298 target = _target;
1299 level = _level;
1300 xoffset = _xoffset;
1301 yoffset = _yoffset;
1302 width = _width;
1303 height = _height;
1304 format = _format;
1305 imageSize = _imageSize;
1306 data_shm_id = _data_shm_id;
1307 data_shm_offset = _data_shm_offset;
1310 void* Set(
1311 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1312 GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize,
1313 uint32 _data_shm_id, uint32 _data_shm_offset) {
1314 static_cast<ValueType*>(
1315 cmd)->Init(
1316 _target, _level, _xoffset, _yoffset, _width, _height, _format,
1317 _imageSize, _data_shm_id, _data_shm_offset);
1318 return NextCmdAddress<ValueType>(cmd);
1321 gpu::CommandHeader header;
1322 uint32 target;
1323 int32 level;
1324 int32 xoffset;
1325 int32 yoffset;
1326 int32 width;
1327 int32 height;
1328 uint32 format;
1329 int32 imageSize;
1330 uint32 data_shm_id;
1331 uint32 data_shm_offset;
1334 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D) == 44,
1335 Sizeof_CompressedTexSubImage2D_is_not_44);
1336 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, header) == 0,
1337 OffsetOf_CompressedTexSubImage2D_header_not_0);
1338 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, target) == 4,
1339 OffsetOf_CompressedTexSubImage2D_target_not_4);
1340 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, level) == 8,
1341 OffsetOf_CompressedTexSubImage2D_level_not_8);
1342 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, xoffset) == 12,
1343 OffsetOf_CompressedTexSubImage2D_xoffset_not_12);
1344 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, yoffset) == 16,
1345 OffsetOf_CompressedTexSubImage2D_yoffset_not_16);
1346 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, width) == 20,
1347 OffsetOf_CompressedTexSubImage2D_width_not_20);
1348 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, height) == 24,
1349 OffsetOf_CompressedTexSubImage2D_height_not_24);
1350 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28,
1351 OffsetOf_CompressedTexSubImage2D_format_not_28);
1352 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32,
1353 OffsetOf_CompressedTexSubImage2D_imageSize_not_32);
1354 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36,
1355 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36);
1356 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40,
1357 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40);
1359 struct CompressedTexSubImage2DImmediate {
1360 typedef CompressedTexSubImage2DImmediate ValueType;
1361 static const CommandId kCmdId = kCompressedTexSubImage2DImmediate;
1362 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1364 static uint32 ComputeSize(uint32 size_in_bytes) {
1365 return static_cast<uint32>(
1366 sizeof(ValueType) + // NOLINT
1367 RoundSizeToMultipleOfEntries(size_in_bytes));
1370 void SetHeader(uint32 size_in_bytes) {
1371 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
1374 void Init(
1375 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1376 GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize) {
1377 uint32 total_size = ComputeSize(_imageSize);
1378 SetHeader(total_size);
1379 target = _target;
1380 level = _level;
1381 xoffset = _xoffset;
1382 yoffset = _yoffset;
1383 width = _width;
1384 height = _height;
1385 format = _format;
1386 imageSize = _imageSize;
1389 void* Set(
1390 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1391 GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize) {
1392 uint32 total_size = ComputeSize(_imageSize);
1393 static_cast<ValueType*>(
1394 cmd)->Init(
1395 _target, _level, _xoffset, _yoffset, _width, _height, _format,
1396 _imageSize);
1397 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
1400 gpu::CommandHeader header;
1401 uint32 target;
1402 int32 level;
1403 int32 xoffset;
1404 int32 yoffset;
1405 int32 width;
1406 int32 height;
1407 uint32 format;
1408 int32 imageSize;
1411 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DImmediate) == 36,
1412 Sizeof_CompressedTexSubImage2DImmediate_is_not_36);
1413 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, header) == 0,
1414 OffsetOf_CompressedTexSubImage2DImmediate_header_not_0);
1415 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, target) == 4,
1416 OffsetOf_CompressedTexSubImage2DImmediate_target_not_4);
1417 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, level) == 8,
1418 OffsetOf_CompressedTexSubImage2DImmediate_level_not_8);
1419 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, xoffset) == 12,
1420 OffsetOf_CompressedTexSubImage2DImmediate_xoffset_not_12);
1421 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, yoffset) == 16,
1422 OffsetOf_CompressedTexSubImage2DImmediate_yoffset_not_16);
1423 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, width) == 20,
1424 OffsetOf_CompressedTexSubImage2DImmediate_width_not_20);
1425 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, height) == 24,
1426 OffsetOf_CompressedTexSubImage2DImmediate_height_not_24);
1427 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, format) == 28,
1428 OffsetOf_CompressedTexSubImage2DImmediate_format_not_28);
1429 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, imageSize) == 32,
1430 OffsetOf_CompressedTexSubImage2DImmediate_imageSize_not_32);
1432 struct CompressedTexSubImage2DBucket {
1433 typedef CompressedTexSubImage2DBucket ValueType;
1434 static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
1435 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1437 static uint32 ComputeSize() {
1438 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1441 void SetHeader() {
1442 header.SetCmd<ValueType>();
1445 void Init(
1446 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1447 GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) {
1448 SetHeader();
1449 target = _target;
1450 level = _level;
1451 xoffset = _xoffset;
1452 yoffset = _yoffset;
1453 width = _width;
1454 height = _height;
1455 format = _format;
1456 bucket_id = _bucket_id;
1459 void* Set(
1460 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1461 GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) {
1462 static_cast<ValueType*>(
1463 cmd)->Init(
1464 _target, _level, _xoffset, _yoffset, _width, _height, _format,
1465 _bucket_id);
1466 return NextCmdAddress<ValueType>(cmd);
1469 gpu::CommandHeader header;
1470 uint32 target;
1471 int32 level;
1472 int32 xoffset;
1473 int32 yoffset;
1474 int32 width;
1475 int32 height;
1476 uint32 format;
1477 uint32 bucket_id;
1480 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36,
1481 Sizeof_CompressedTexSubImage2DBucket_is_not_36);
1482 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0,
1483 OffsetOf_CompressedTexSubImage2DBucket_header_not_0);
1484 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4,
1485 OffsetOf_CompressedTexSubImage2DBucket_target_not_4);
1486 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8,
1487 OffsetOf_CompressedTexSubImage2DBucket_level_not_8);
1488 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
1489 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12);
1490 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
1491 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16);
1492 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20,
1493 OffsetOf_CompressedTexSubImage2DBucket_width_not_20);
1494 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24,
1495 OffsetOf_CompressedTexSubImage2DBucket_height_not_24);
1496 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28,
1497 OffsetOf_CompressedTexSubImage2DBucket_format_not_28);
1498 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
1499 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32);
1501 struct CopyTexImage2D {
1502 typedef CopyTexImage2D ValueType;
1503 static const CommandId kCmdId = kCopyTexImage2D;
1504 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1506 static uint32 ComputeSize() {
1507 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1510 void SetHeader() {
1511 header.SetCmd<ValueType>();
1514 void Init(
1515 GLenum _target, GLint _level, GLenum _internalformat, GLint _x, GLint _y,
1516 GLsizei _width, GLsizei _height, GLint _border) {
1517 SetHeader();
1518 target = _target;
1519 level = _level;
1520 internalformat = _internalformat;
1521 x = _x;
1522 y = _y;
1523 width = _width;
1524 height = _height;
1525 border = _border;
1528 void* Set(
1529 void* cmd, GLenum _target, GLint _level, GLenum _internalformat, GLint _x,
1530 GLint _y, GLsizei _width, GLsizei _height, GLint _border) {
1531 static_cast<ValueType*>(
1532 cmd)->Init(
1533 _target, _level, _internalformat, _x, _y, _width, _height,
1534 _border);
1535 return NextCmdAddress<ValueType>(cmd);
1538 gpu::CommandHeader header;
1539 uint32 target;
1540 int32 level;
1541 uint32 internalformat;
1542 int32 x;
1543 int32 y;
1544 int32 width;
1545 int32 height;
1546 int32 border;
1549 COMPILE_ASSERT(sizeof(CopyTexImage2D) == 36,
1550 Sizeof_CopyTexImage2D_is_not_36);
1551 COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0,
1552 OffsetOf_CopyTexImage2D_header_not_0);
1553 COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4,
1554 OffsetOf_CopyTexImage2D_target_not_4);
1555 COMPILE_ASSERT(offsetof(CopyTexImage2D, level) == 8,
1556 OffsetOf_CopyTexImage2D_level_not_8);
1557 COMPILE_ASSERT(offsetof(CopyTexImage2D, internalformat) == 12,
1558 OffsetOf_CopyTexImage2D_internalformat_not_12);
1559 COMPILE_ASSERT(offsetof(CopyTexImage2D, x) == 16,
1560 OffsetOf_CopyTexImage2D_x_not_16);
1561 COMPILE_ASSERT(offsetof(CopyTexImage2D, y) == 20,
1562 OffsetOf_CopyTexImage2D_y_not_20);
1563 COMPILE_ASSERT(offsetof(CopyTexImage2D, width) == 24,
1564 OffsetOf_CopyTexImage2D_width_not_24);
1565 COMPILE_ASSERT(offsetof(CopyTexImage2D, height) == 28,
1566 OffsetOf_CopyTexImage2D_height_not_28);
1567 COMPILE_ASSERT(offsetof(CopyTexImage2D, border) == 32,
1568 OffsetOf_CopyTexImage2D_border_not_32);
1570 struct CopyTexSubImage2D {
1571 typedef CopyTexSubImage2D ValueType;
1572 static const CommandId kCmdId = kCopyTexSubImage2D;
1573 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1575 static uint32 ComputeSize() {
1576 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1579 void SetHeader() {
1580 header.SetCmd<ValueType>();
1583 void Init(
1584 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, GLint _x,
1585 GLint _y, GLsizei _width, GLsizei _height) {
1586 SetHeader();
1587 target = _target;
1588 level = _level;
1589 xoffset = _xoffset;
1590 yoffset = _yoffset;
1591 x = _x;
1592 y = _y;
1593 width = _width;
1594 height = _height;
1597 void* Set(
1598 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
1599 GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
1600 static_cast<ValueType*>(
1601 cmd)->Init(
1602 _target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
1603 return NextCmdAddress<ValueType>(cmd);
1606 gpu::CommandHeader header;
1607 uint32 target;
1608 int32 level;
1609 int32 xoffset;
1610 int32 yoffset;
1611 int32 x;
1612 int32 y;
1613 int32 width;
1614 int32 height;
1617 COMPILE_ASSERT(sizeof(CopyTexSubImage2D) == 36,
1618 Sizeof_CopyTexSubImage2D_is_not_36);
1619 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, header) == 0,
1620 OffsetOf_CopyTexSubImage2D_header_not_0);
1621 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, target) == 4,
1622 OffsetOf_CopyTexSubImage2D_target_not_4);
1623 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, level) == 8,
1624 OffsetOf_CopyTexSubImage2D_level_not_8);
1625 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, xoffset) == 12,
1626 OffsetOf_CopyTexSubImage2D_xoffset_not_12);
1627 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, yoffset) == 16,
1628 OffsetOf_CopyTexSubImage2D_yoffset_not_16);
1629 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, x) == 20,
1630 OffsetOf_CopyTexSubImage2D_x_not_20);
1631 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, y) == 24,
1632 OffsetOf_CopyTexSubImage2D_y_not_24);
1633 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, width) == 28,
1634 OffsetOf_CopyTexSubImage2D_width_not_28);
1635 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, height) == 32,
1636 OffsetOf_CopyTexSubImage2D_height_not_32);
1638 struct CreateProgram {
1639 typedef CreateProgram ValueType;
1640 static const CommandId kCmdId = kCreateProgram;
1641 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1643 static uint32 ComputeSize() {
1644 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1647 void SetHeader() {
1648 header.SetCmd<ValueType>();
1651 void Init(uint32 _client_id) {
1652 SetHeader();
1653 client_id = _client_id;
1656 void* Set(void* cmd, uint32 _client_id) {
1657 static_cast<ValueType*>(cmd)->Init(_client_id);
1658 return NextCmdAddress<ValueType>(cmd);
1661 gpu::CommandHeader header;
1662 uint32 client_id;
1665 COMPILE_ASSERT(sizeof(CreateProgram) == 8,
1666 Sizeof_CreateProgram_is_not_8);
1667 COMPILE_ASSERT(offsetof(CreateProgram, header) == 0,
1668 OffsetOf_CreateProgram_header_not_0);
1669 COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4,
1670 OffsetOf_CreateProgram_client_id_not_4);
1672 struct CreateShader {
1673 typedef CreateShader ValueType;
1674 static const CommandId kCmdId = kCreateShader;
1675 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1677 static uint32 ComputeSize() {
1678 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1681 void SetHeader() {
1682 header.SetCmd<ValueType>();
1685 void Init(GLenum _type, uint32 _client_id) {
1686 SetHeader();
1687 type = _type;
1688 client_id = _client_id;
1691 void* Set(void* cmd, GLenum _type, uint32 _client_id) {
1692 static_cast<ValueType*>(cmd)->Init(_type, _client_id);
1693 return NextCmdAddress<ValueType>(cmd);
1696 gpu::CommandHeader header;
1697 uint32 type;
1698 uint32 client_id;
1701 COMPILE_ASSERT(sizeof(CreateShader) == 12,
1702 Sizeof_CreateShader_is_not_12);
1703 COMPILE_ASSERT(offsetof(CreateShader, header) == 0,
1704 OffsetOf_CreateShader_header_not_0);
1705 COMPILE_ASSERT(offsetof(CreateShader, type) == 4,
1706 OffsetOf_CreateShader_type_not_4);
1707 COMPILE_ASSERT(offsetof(CreateShader, client_id) == 8,
1708 OffsetOf_CreateShader_client_id_not_8);
1710 struct CullFace {
1711 typedef CullFace ValueType;
1712 static const CommandId kCmdId = kCullFace;
1713 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1715 static uint32 ComputeSize() {
1716 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1719 void SetHeader() {
1720 header.SetCmd<ValueType>();
1723 void Init(GLenum _mode) {
1724 SetHeader();
1725 mode = _mode;
1728 void* Set(void* cmd, GLenum _mode) {
1729 static_cast<ValueType*>(cmd)->Init(_mode);
1730 return NextCmdAddress<ValueType>(cmd);
1733 gpu::CommandHeader header;
1734 uint32 mode;
1737 COMPILE_ASSERT(sizeof(CullFace) == 8,
1738 Sizeof_CullFace_is_not_8);
1739 COMPILE_ASSERT(offsetof(CullFace, header) == 0,
1740 OffsetOf_CullFace_header_not_0);
1741 COMPILE_ASSERT(offsetof(CullFace, mode) == 4,
1742 OffsetOf_CullFace_mode_not_4);
1744 struct DeleteBuffers {
1745 typedef DeleteBuffers ValueType;
1746 static const CommandId kCmdId = kDeleteBuffers;
1747 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1749 static uint32 ComputeSize() {
1750 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1753 void SetHeader() {
1754 header.SetCmd<ValueType>();
1757 void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
1758 SetHeader();
1759 n = _n;
1760 buffers_shm_id = _buffers_shm_id;
1761 buffers_shm_offset = _buffers_shm_offset;
1764 void* Set(
1765 void* cmd, GLsizei _n, uint32 _buffers_shm_id,
1766 uint32 _buffers_shm_offset) {
1767 static_cast<ValueType*>(
1768 cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset);
1769 return NextCmdAddress<ValueType>(cmd);
1772 gpu::CommandHeader header;
1773 int32 n;
1774 uint32 buffers_shm_id;
1775 uint32 buffers_shm_offset;
1778 COMPILE_ASSERT(sizeof(DeleteBuffers) == 16,
1779 Sizeof_DeleteBuffers_is_not_16);
1780 COMPILE_ASSERT(offsetof(DeleteBuffers, header) == 0,
1781 OffsetOf_DeleteBuffers_header_not_0);
1782 COMPILE_ASSERT(offsetof(DeleteBuffers, n) == 4,
1783 OffsetOf_DeleteBuffers_n_not_4);
1784 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_id) == 8,
1785 OffsetOf_DeleteBuffers_buffers_shm_id_not_8);
1786 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_offset) == 12,
1787 OffsetOf_DeleteBuffers_buffers_shm_offset_not_12);
1789 struct DeleteBuffersImmediate {
1790 typedef DeleteBuffersImmediate ValueType;
1791 static const CommandId kCmdId = kDeleteBuffersImmediate;
1792 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1794 static uint32 ComputeDataSize(GLsizei n) {
1795 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1798 static uint32 ComputeSize(GLsizei n) {
1799 return static_cast<uint32>(
1800 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
1803 void SetHeader(GLsizei n) {
1804 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1807 void Init(GLsizei _n, const GLuint* _buffers) {
1808 SetHeader(_n);
1809 n = _n;
1810 memcpy(ImmediateDataAddress(this),
1811 _buffers, ComputeDataSize(_n));
1814 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
1815 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
1816 const uint32 size = ComputeSize(_n);
1817 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1820 gpu::CommandHeader header;
1821 int32 n;
1824 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate) == 8,
1825 Sizeof_DeleteBuffersImmediate_is_not_8);
1826 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, header) == 0,
1827 OffsetOf_DeleteBuffersImmediate_header_not_0);
1828 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, n) == 4,
1829 OffsetOf_DeleteBuffersImmediate_n_not_4);
1831 struct DeleteFramebuffers {
1832 typedef DeleteFramebuffers ValueType;
1833 static const CommandId kCmdId = kDeleteFramebuffers;
1834 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1836 static uint32 ComputeSize() {
1837 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1840 void SetHeader() {
1841 header.SetCmd<ValueType>();
1844 void Init(
1845 GLsizei _n, uint32 _framebuffers_shm_id,
1846 uint32 _framebuffers_shm_offset) {
1847 SetHeader();
1848 n = _n;
1849 framebuffers_shm_id = _framebuffers_shm_id;
1850 framebuffers_shm_offset = _framebuffers_shm_offset;
1853 void* Set(
1854 void* cmd, GLsizei _n, uint32 _framebuffers_shm_id,
1855 uint32 _framebuffers_shm_offset) {
1856 static_cast<ValueType*>(
1857 cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
1858 return NextCmdAddress<ValueType>(cmd);
1861 gpu::CommandHeader header;
1862 int32 n;
1863 uint32 framebuffers_shm_id;
1864 uint32 framebuffers_shm_offset;
1867 COMPILE_ASSERT(sizeof(DeleteFramebuffers) == 16,
1868 Sizeof_DeleteFramebuffers_is_not_16);
1869 COMPILE_ASSERT(offsetof(DeleteFramebuffers, header) == 0,
1870 OffsetOf_DeleteFramebuffers_header_not_0);
1871 COMPILE_ASSERT(offsetof(DeleteFramebuffers, n) == 4,
1872 OffsetOf_DeleteFramebuffers_n_not_4);
1873 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_id) == 8,
1874 OffsetOf_DeleteFramebuffers_framebuffers_shm_id_not_8);
1875 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_offset) == 12,
1876 OffsetOf_DeleteFramebuffers_framebuffers_shm_offset_not_12);
1878 struct DeleteFramebuffersImmediate {
1879 typedef DeleteFramebuffersImmediate ValueType;
1880 static const CommandId kCmdId = kDeleteFramebuffersImmediate;
1881 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1883 static uint32 ComputeDataSize(GLsizei n) {
1884 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1887 static uint32 ComputeSize(GLsizei n) {
1888 return static_cast<uint32>(
1889 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
1892 void SetHeader(GLsizei n) {
1893 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1896 void Init(GLsizei _n, const GLuint* _framebuffers) {
1897 SetHeader(_n);
1898 n = _n;
1899 memcpy(ImmediateDataAddress(this),
1900 _framebuffers, ComputeDataSize(_n));
1903 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
1904 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
1905 const uint32 size = ComputeSize(_n);
1906 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1909 gpu::CommandHeader header;
1910 int32 n;
1913 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate) == 8,
1914 Sizeof_DeleteFramebuffersImmediate_is_not_8);
1915 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, header) == 0,
1916 OffsetOf_DeleteFramebuffersImmediate_header_not_0);
1917 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, n) == 4,
1918 OffsetOf_DeleteFramebuffersImmediate_n_not_4);
1920 struct DeleteProgram {
1921 typedef DeleteProgram ValueType;
1922 static const CommandId kCmdId = kDeleteProgram;
1923 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1925 static uint32 ComputeSize() {
1926 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1929 void SetHeader() {
1930 header.SetCmd<ValueType>();
1933 void Init(GLuint _program) {
1934 SetHeader();
1935 program = _program;
1938 void* Set(void* cmd, GLuint _program) {
1939 static_cast<ValueType*>(cmd)->Init(_program);
1940 return NextCmdAddress<ValueType>(cmd);
1943 gpu::CommandHeader header;
1944 uint32 program;
1947 COMPILE_ASSERT(sizeof(DeleteProgram) == 8,
1948 Sizeof_DeleteProgram_is_not_8);
1949 COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0,
1950 OffsetOf_DeleteProgram_header_not_0);
1951 COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4,
1952 OffsetOf_DeleteProgram_program_not_4);
1954 struct DeleteRenderbuffers {
1955 typedef DeleteRenderbuffers ValueType;
1956 static const CommandId kCmdId = kDeleteRenderbuffers;
1957 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1959 static uint32 ComputeSize() {
1960 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1963 void SetHeader() {
1964 header.SetCmd<ValueType>();
1967 void Init(
1968 GLsizei _n, uint32 _renderbuffers_shm_id,
1969 uint32 _renderbuffers_shm_offset) {
1970 SetHeader();
1971 n = _n;
1972 renderbuffers_shm_id = _renderbuffers_shm_id;
1973 renderbuffers_shm_offset = _renderbuffers_shm_offset;
1976 void* Set(
1977 void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id,
1978 uint32 _renderbuffers_shm_offset) {
1979 static_cast<ValueType*>(
1980 cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
1981 return NextCmdAddress<ValueType>(cmd);
1984 gpu::CommandHeader header;
1985 int32 n;
1986 uint32 renderbuffers_shm_id;
1987 uint32 renderbuffers_shm_offset;
1990 COMPILE_ASSERT(sizeof(DeleteRenderbuffers) == 16,
1991 Sizeof_DeleteRenderbuffers_is_not_16);
1992 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, header) == 0,
1993 OffsetOf_DeleteRenderbuffers_header_not_0);
1994 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, n) == 4,
1995 OffsetOf_DeleteRenderbuffers_n_not_4);
1996 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_id) == 8,
1997 OffsetOf_DeleteRenderbuffers_renderbuffers_shm_id_not_8);
1998 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_offset) == 12,
1999 OffsetOf_DeleteRenderbuffers_renderbuffers_shm_offset_not_12);
2001 struct DeleteRenderbuffersImmediate {
2002 typedef DeleteRenderbuffersImmediate ValueType;
2003 static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
2004 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2006 static uint32 ComputeDataSize(GLsizei n) {
2007 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2010 static uint32 ComputeSize(GLsizei n) {
2011 return static_cast<uint32>(
2012 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
2015 void SetHeader(GLsizei n) {
2016 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2019 void Init(GLsizei _n, const GLuint* _renderbuffers) {
2020 SetHeader(_n);
2021 n = _n;
2022 memcpy(ImmediateDataAddress(this),
2023 _renderbuffers, ComputeDataSize(_n));
2026 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
2027 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
2028 const uint32 size = ComputeSize(_n);
2029 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2032 gpu::CommandHeader header;
2033 int32 n;
2036 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8,
2037 Sizeof_DeleteRenderbuffersImmediate_is_not_8);
2038 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0,
2039 OffsetOf_DeleteRenderbuffersImmediate_header_not_0);
2040 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4,
2041 OffsetOf_DeleteRenderbuffersImmediate_n_not_4);
2043 struct DeleteShader {
2044 typedef DeleteShader ValueType;
2045 static const CommandId kCmdId = kDeleteShader;
2046 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2048 static uint32 ComputeSize() {
2049 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2052 void SetHeader() {
2053 header.SetCmd<ValueType>();
2056 void Init(GLuint _shader) {
2057 SetHeader();
2058 shader = _shader;
2061 void* Set(void* cmd, GLuint _shader) {
2062 static_cast<ValueType*>(cmd)->Init(_shader);
2063 return NextCmdAddress<ValueType>(cmd);
2066 gpu::CommandHeader header;
2067 uint32 shader;
2070 COMPILE_ASSERT(sizeof(DeleteShader) == 8,
2071 Sizeof_DeleteShader_is_not_8);
2072 COMPILE_ASSERT(offsetof(DeleteShader, header) == 0,
2073 OffsetOf_DeleteShader_header_not_0);
2074 COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4,
2075 OffsetOf_DeleteShader_shader_not_4);
2077 struct DeleteTextures {
2078 typedef DeleteTextures ValueType;
2079 static const CommandId kCmdId = kDeleteTextures;
2080 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2082 static uint32 ComputeSize() {
2083 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2086 void SetHeader() {
2087 header.SetCmd<ValueType>();
2090 void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
2091 SetHeader();
2092 n = _n;
2093 textures_shm_id = _textures_shm_id;
2094 textures_shm_offset = _textures_shm_offset;
2097 void* Set(
2098 void* cmd, GLsizei _n, uint32 _textures_shm_id,
2099 uint32 _textures_shm_offset) {
2100 static_cast<ValueType*>(
2101 cmd)->Init(_n, _textures_shm_id, _textures_shm_offset);
2102 return NextCmdAddress<ValueType>(cmd);
2105 gpu::CommandHeader header;
2106 int32 n;
2107 uint32 textures_shm_id;
2108 uint32 textures_shm_offset;
2111 COMPILE_ASSERT(sizeof(DeleteTextures) == 16,
2112 Sizeof_DeleteTextures_is_not_16);
2113 COMPILE_ASSERT(offsetof(DeleteTextures, header) == 0,
2114 OffsetOf_DeleteTextures_header_not_0);
2115 COMPILE_ASSERT(offsetof(DeleteTextures, n) == 4,
2116 OffsetOf_DeleteTextures_n_not_4);
2117 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_id) == 8,
2118 OffsetOf_DeleteTextures_textures_shm_id_not_8);
2119 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_offset) == 12,
2120 OffsetOf_DeleteTextures_textures_shm_offset_not_12);
2122 struct DeleteTexturesImmediate {
2123 typedef DeleteTexturesImmediate ValueType;
2124 static const CommandId kCmdId = kDeleteTexturesImmediate;
2125 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2127 static uint32 ComputeDataSize(GLsizei n) {
2128 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2131 static uint32 ComputeSize(GLsizei n) {
2132 return static_cast<uint32>(
2133 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
2136 void SetHeader(GLsizei n) {
2137 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2140 void Init(GLsizei _n, const GLuint* _textures) {
2141 SetHeader(_n);
2142 n = _n;
2143 memcpy(ImmediateDataAddress(this),
2144 _textures, ComputeDataSize(_n));
2147 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
2148 static_cast<ValueType*>(cmd)->Init(_n, _textures);
2149 const uint32 size = ComputeSize(_n);
2150 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2153 gpu::CommandHeader header;
2154 int32 n;
2157 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate) == 8,
2158 Sizeof_DeleteTexturesImmediate_is_not_8);
2159 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, header) == 0,
2160 OffsetOf_DeleteTexturesImmediate_header_not_0);
2161 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, n) == 4,
2162 OffsetOf_DeleteTexturesImmediate_n_not_4);
2164 struct DepthFunc {
2165 typedef DepthFunc ValueType;
2166 static const CommandId kCmdId = kDepthFunc;
2167 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2169 static uint32 ComputeSize() {
2170 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2173 void SetHeader() {
2174 header.SetCmd<ValueType>();
2177 void Init(GLenum _func) {
2178 SetHeader();
2179 func = _func;
2182 void* Set(void* cmd, GLenum _func) {
2183 static_cast<ValueType*>(cmd)->Init(_func);
2184 return NextCmdAddress<ValueType>(cmd);
2187 gpu::CommandHeader header;
2188 uint32 func;
2191 COMPILE_ASSERT(sizeof(DepthFunc) == 8,
2192 Sizeof_DepthFunc_is_not_8);
2193 COMPILE_ASSERT(offsetof(DepthFunc, header) == 0,
2194 OffsetOf_DepthFunc_header_not_0);
2195 COMPILE_ASSERT(offsetof(DepthFunc, func) == 4,
2196 OffsetOf_DepthFunc_func_not_4);
2198 struct DepthMask {
2199 typedef DepthMask ValueType;
2200 static const CommandId kCmdId = kDepthMask;
2201 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2203 static uint32 ComputeSize() {
2204 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2207 void SetHeader() {
2208 header.SetCmd<ValueType>();
2211 void Init(GLboolean _flag) {
2212 SetHeader();
2213 flag = _flag;
2216 void* Set(void* cmd, GLboolean _flag) {
2217 static_cast<ValueType*>(cmd)->Init(_flag);
2218 return NextCmdAddress<ValueType>(cmd);
2221 gpu::CommandHeader header;
2222 uint32 flag;
2225 COMPILE_ASSERT(sizeof(DepthMask) == 8,
2226 Sizeof_DepthMask_is_not_8);
2227 COMPILE_ASSERT(offsetof(DepthMask, header) == 0,
2228 OffsetOf_DepthMask_header_not_0);
2229 COMPILE_ASSERT(offsetof(DepthMask, flag) == 4,
2230 OffsetOf_DepthMask_flag_not_4);
2232 struct DepthRangef {
2233 typedef DepthRangef ValueType;
2234 static const CommandId kCmdId = kDepthRangef;
2235 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2237 static uint32 ComputeSize() {
2238 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2241 void SetHeader() {
2242 header.SetCmd<ValueType>();
2245 void Init(GLclampf _zNear, GLclampf _zFar) {
2246 SetHeader();
2247 zNear = _zNear;
2248 zFar = _zFar;
2251 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
2252 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
2253 return NextCmdAddress<ValueType>(cmd);
2256 gpu::CommandHeader header;
2257 float zNear;
2258 float zFar;
2261 COMPILE_ASSERT(sizeof(DepthRangef) == 12,
2262 Sizeof_DepthRangef_is_not_12);
2263 COMPILE_ASSERT(offsetof(DepthRangef, header) == 0,
2264 OffsetOf_DepthRangef_header_not_0);
2265 COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4,
2266 OffsetOf_DepthRangef_zNear_not_4);
2267 COMPILE_ASSERT(offsetof(DepthRangef, zFar) == 8,
2268 OffsetOf_DepthRangef_zFar_not_8);
2270 struct DetachShader {
2271 typedef DetachShader ValueType;
2272 static const CommandId kCmdId = kDetachShader;
2273 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2275 static uint32 ComputeSize() {
2276 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2279 void SetHeader() {
2280 header.SetCmd<ValueType>();
2283 void Init(GLuint _program, GLuint _shader) {
2284 SetHeader();
2285 program = _program;
2286 shader = _shader;
2289 void* Set(void* cmd, GLuint _program, GLuint _shader) {
2290 static_cast<ValueType*>(cmd)->Init(_program, _shader);
2291 return NextCmdAddress<ValueType>(cmd);
2294 gpu::CommandHeader header;
2295 uint32 program;
2296 uint32 shader;
2299 COMPILE_ASSERT(sizeof(DetachShader) == 12,
2300 Sizeof_DetachShader_is_not_12);
2301 COMPILE_ASSERT(offsetof(DetachShader, header) == 0,
2302 OffsetOf_DetachShader_header_not_0);
2303 COMPILE_ASSERT(offsetof(DetachShader, program) == 4,
2304 OffsetOf_DetachShader_program_not_4);
2305 COMPILE_ASSERT(offsetof(DetachShader, shader) == 8,
2306 OffsetOf_DetachShader_shader_not_8);
2308 struct Disable {
2309 typedef Disable ValueType;
2310 static const CommandId kCmdId = kDisable;
2311 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2313 static uint32 ComputeSize() {
2314 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2317 void SetHeader() {
2318 header.SetCmd<ValueType>();
2321 void Init(GLenum _cap) {
2322 SetHeader();
2323 cap = _cap;
2326 void* Set(void* cmd, GLenum _cap) {
2327 static_cast<ValueType*>(cmd)->Init(_cap);
2328 return NextCmdAddress<ValueType>(cmd);
2331 gpu::CommandHeader header;
2332 uint32 cap;
2335 COMPILE_ASSERT(sizeof(Disable) == 8,
2336 Sizeof_Disable_is_not_8);
2337 COMPILE_ASSERT(offsetof(Disable, header) == 0,
2338 OffsetOf_Disable_header_not_0);
2339 COMPILE_ASSERT(offsetof(Disable, cap) == 4,
2340 OffsetOf_Disable_cap_not_4);
2342 struct DisableVertexAttribArray {
2343 typedef DisableVertexAttribArray ValueType;
2344 static const CommandId kCmdId = kDisableVertexAttribArray;
2345 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2347 static uint32 ComputeSize() {
2348 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2351 void SetHeader() {
2352 header.SetCmd<ValueType>();
2355 void Init(GLuint _index) {
2356 SetHeader();
2357 index = _index;
2360 void* Set(void* cmd, GLuint _index) {
2361 static_cast<ValueType*>(cmd)->Init(_index);
2362 return NextCmdAddress<ValueType>(cmd);
2365 gpu::CommandHeader header;
2366 uint32 index;
2369 COMPILE_ASSERT(sizeof(DisableVertexAttribArray) == 8,
2370 Sizeof_DisableVertexAttribArray_is_not_8);
2371 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, header) == 0,
2372 OffsetOf_DisableVertexAttribArray_header_not_0);
2373 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, index) == 4,
2374 OffsetOf_DisableVertexAttribArray_index_not_4);
2376 struct DrawArrays {
2377 typedef DrawArrays ValueType;
2378 static const CommandId kCmdId = kDrawArrays;
2379 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2381 static uint32 ComputeSize() {
2382 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2385 void SetHeader() {
2386 header.SetCmd<ValueType>();
2389 void Init(GLenum _mode, GLint _first, GLsizei _count) {
2390 SetHeader();
2391 mode = _mode;
2392 first = _first;
2393 count = _count;
2396 void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
2397 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
2398 return NextCmdAddress<ValueType>(cmd);
2401 gpu::CommandHeader header;
2402 uint32 mode;
2403 int32 first;
2404 int32 count;
2407 COMPILE_ASSERT(sizeof(DrawArrays) == 16,
2408 Sizeof_DrawArrays_is_not_16);
2409 COMPILE_ASSERT(offsetof(DrawArrays, header) == 0,
2410 OffsetOf_DrawArrays_header_not_0);
2411 COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4,
2412 OffsetOf_DrawArrays_mode_not_4);
2413 COMPILE_ASSERT(offsetof(DrawArrays, first) == 8,
2414 OffsetOf_DrawArrays_first_not_8);
2415 COMPILE_ASSERT(offsetof(DrawArrays, count) == 12,
2416 OffsetOf_DrawArrays_count_not_12);
2418 struct DrawElements {
2419 typedef DrawElements ValueType;
2420 static const CommandId kCmdId = kDrawElements;
2421 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2423 static uint32 ComputeSize() {
2424 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2427 void SetHeader() {
2428 header.SetCmd<ValueType>();
2431 void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
2432 SetHeader();
2433 mode = _mode;
2434 count = _count;
2435 type = _type;
2436 index_offset = _index_offset;
2439 void* Set(
2440 void* cmd, GLenum _mode, GLsizei _count, GLenum _type,
2441 GLuint _index_offset) {
2442 static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
2443 return NextCmdAddress<ValueType>(cmd);
2446 gpu::CommandHeader header;
2447 uint32 mode;
2448 int32 count;
2449 uint32 type;
2450 uint32 index_offset;
2453 COMPILE_ASSERT(sizeof(DrawElements) == 20,
2454 Sizeof_DrawElements_is_not_20);
2455 COMPILE_ASSERT(offsetof(DrawElements, header) == 0,
2456 OffsetOf_DrawElements_header_not_0);
2457 COMPILE_ASSERT(offsetof(DrawElements, mode) == 4,
2458 OffsetOf_DrawElements_mode_not_4);
2459 COMPILE_ASSERT(offsetof(DrawElements, count) == 8,
2460 OffsetOf_DrawElements_count_not_8);
2461 COMPILE_ASSERT(offsetof(DrawElements, type) == 12,
2462 OffsetOf_DrawElements_type_not_12);
2463 COMPILE_ASSERT(offsetof(DrawElements, index_offset) == 16,
2464 OffsetOf_DrawElements_index_offset_not_16);
2466 struct Enable {
2467 typedef Enable ValueType;
2468 static const CommandId kCmdId = kEnable;
2469 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2471 static uint32 ComputeSize() {
2472 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2475 void SetHeader() {
2476 header.SetCmd<ValueType>();
2479 void Init(GLenum _cap) {
2480 SetHeader();
2481 cap = _cap;
2484 void* Set(void* cmd, GLenum _cap) {
2485 static_cast<ValueType*>(cmd)->Init(_cap);
2486 return NextCmdAddress<ValueType>(cmd);
2489 gpu::CommandHeader header;
2490 uint32 cap;
2493 COMPILE_ASSERT(sizeof(Enable) == 8,
2494 Sizeof_Enable_is_not_8);
2495 COMPILE_ASSERT(offsetof(Enable, header) == 0,
2496 OffsetOf_Enable_header_not_0);
2497 COMPILE_ASSERT(offsetof(Enable, cap) == 4,
2498 OffsetOf_Enable_cap_not_4);
2500 struct EnableVertexAttribArray {
2501 typedef EnableVertexAttribArray ValueType;
2502 static const CommandId kCmdId = kEnableVertexAttribArray;
2503 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2505 static uint32 ComputeSize() {
2506 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2509 void SetHeader() {
2510 header.SetCmd<ValueType>();
2513 void Init(GLuint _index) {
2514 SetHeader();
2515 index = _index;
2518 void* Set(void* cmd, GLuint _index) {
2519 static_cast<ValueType*>(cmd)->Init(_index);
2520 return NextCmdAddress<ValueType>(cmd);
2523 gpu::CommandHeader header;
2524 uint32 index;
2527 COMPILE_ASSERT(sizeof(EnableVertexAttribArray) == 8,
2528 Sizeof_EnableVertexAttribArray_is_not_8);
2529 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, header) == 0,
2530 OffsetOf_EnableVertexAttribArray_header_not_0);
2531 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, index) == 4,
2532 OffsetOf_EnableVertexAttribArray_index_not_4);
2534 struct Finish {
2535 typedef Finish ValueType;
2536 static const CommandId kCmdId = kFinish;
2537 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2539 static uint32 ComputeSize() {
2540 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2543 void SetHeader() {
2544 header.SetCmd<ValueType>();
2547 void Init() {
2548 SetHeader();
2551 void* Set(void* cmd) {
2552 static_cast<ValueType*>(cmd)->Init();
2553 return NextCmdAddress<ValueType>(cmd);
2556 gpu::CommandHeader header;
2559 COMPILE_ASSERT(sizeof(Finish) == 4,
2560 Sizeof_Finish_is_not_4);
2561 COMPILE_ASSERT(offsetof(Finish, header) == 0,
2562 OffsetOf_Finish_header_not_0);
2564 struct Flush {
2565 typedef Flush ValueType;
2566 static const CommandId kCmdId = kFlush;
2567 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2569 static uint32 ComputeSize() {
2570 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2573 void SetHeader() {
2574 header.SetCmd<ValueType>();
2577 void Init() {
2578 SetHeader();
2581 void* Set(void* cmd) {
2582 static_cast<ValueType*>(cmd)->Init();
2583 return NextCmdAddress<ValueType>(cmd);
2586 gpu::CommandHeader header;
2589 COMPILE_ASSERT(sizeof(Flush) == 4,
2590 Sizeof_Flush_is_not_4);
2591 COMPILE_ASSERT(offsetof(Flush, header) == 0,
2592 OffsetOf_Flush_header_not_0);
2594 struct FramebufferRenderbuffer {
2595 typedef FramebufferRenderbuffer ValueType;
2596 static const CommandId kCmdId = kFramebufferRenderbuffer;
2597 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2599 static uint32 ComputeSize() {
2600 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2603 void SetHeader() {
2604 header.SetCmd<ValueType>();
2607 void Init(
2608 GLenum _target, GLenum _attachment, GLenum _renderbuffertarget,
2609 GLuint _renderbuffer) {
2610 SetHeader();
2611 target = _target;
2612 attachment = _attachment;
2613 renderbuffertarget = _renderbuffertarget;
2614 renderbuffer = _renderbuffer;
2617 void* Set(
2618 void* cmd, GLenum _target, GLenum _attachment, GLenum _renderbuffertarget,
2619 GLuint _renderbuffer) {
2620 static_cast<ValueType*>(
2621 cmd)->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
2622 return NextCmdAddress<ValueType>(cmd);
2625 gpu::CommandHeader header;
2626 uint32 target;
2627 uint32 attachment;
2628 uint32 renderbuffertarget;
2629 uint32 renderbuffer;
2632 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer) == 20,
2633 Sizeof_FramebufferRenderbuffer_is_not_20);
2634 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, header) == 0,
2635 OffsetOf_FramebufferRenderbuffer_header_not_0);
2636 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, target) == 4,
2637 OffsetOf_FramebufferRenderbuffer_target_not_4);
2638 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, attachment) == 8,
2639 OffsetOf_FramebufferRenderbuffer_attachment_not_8);
2640 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
2641 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12);
2642 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
2643 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16);
2645 struct FramebufferTexture2D {
2646 typedef FramebufferTexture2D ValueType;
2647 static const CommandId kCmdId = kFramebufferTexture2D;
2648 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2650 static uint32 ComputeSize() {
2651 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2654 void SetHeader() {
2655 header.SetCmd<ValueType>();
2658 void Init(
2659 GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture,
2660 GLint _level) {
2661 SetHeader();
2662 target = _target;
2663 attachment = _attachment;
2664 textarget = _textarget;
2665 texture = _texture;
2666 level = _level;
2669 void* Set(
2670 void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget,
2671 GLuint _texture, GLint _level) {
2672 static_cast<ValueType*>(
2673 cmd)->Init(_target, _attachment, _textarget, _texture, _level);
2674 return NextCmdAddress<ValueType>(cmd);
2677 gpu::CommandHeader header;
2678 uint32 target;
2679 uint32 attachment;
2680 uint32 textarget;
2681 uint32 texture;
2682 int32 level;
2685 COMPILE_ASSERT(sizeof(FramebufferTexture2D) == 24,
2686 Sizeof_FramebufferTexture2D_is_not_24);
2687 COMPILE_ASSERT(offsetof(FramebufferTexture2D, header) == 0,
2688 OffsetOf_FramebufferTexture2D_header_not_0);
2689 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4,
2690 OffsetOf_FramebufferTexture2D_target_not_4);
2691 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8,
2692 OffsetOf_FramebufferTexture2D_attachment_not_8);
2693 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12,
2694 OffsetOf_FramebufferTexture2D_textarget_not_12);
2695 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16,
2696 OffsetOf_FramebufferTexture2D_texture_not_16);
2697 COMPILE_ASSERT(offsetof(FramebufferTexture2D, level) == 20,
2698 OffsetOf_FramebufferTexture2D_level_not_20);
2700 struct FrontFace {
2701 typedef FrontFace ValueType;
2702 static const CommandId kCmdId = kFrontFace;
2703 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2705 static uint32 ComputeSize() {
2706 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2709 void SetHeader() {
2710 header.SetCmd<ValueType>();
2713 void Init(GLenum _mode) {
2714 SetHeader();
2715 mode = _mode;
2718 void* Set(void* cmd, GLenum _mode) {
2719 static_cast<ValueType*>(cmd)->Init(_mode);
2720 return NextCmdAddress<ValueType>(cmd);
2723 gpu::CommandHeader header;
2724 uint32 mode;
2727 COMPILE_ASSERT(sizeof(FrontFace) == 8,
2728 Sizeof_FrontFace_is_not_8);
2729 COMPILE_ASSERT(offsetof(FrontFace, header) == 0,
2730 OffsetOf_FrontFace_header_not_0);
2731 COMPILE_ASSERT(offsetof(FrontFace, mode) == 4,
2732 OffsetOf_FrontFace_mode_not_4);
2734 struct GenBuffers {
2735 typedef GenBuffers ValueType;
2736 static const CommandId kCmdId = kGenBuffers;
2737 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2739 static uint32 ComputeSize() {
2740 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2743 void SetHeader() {
2744 header.SetCmd<ValueType>();
2747 void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
2748 SetHeader();
2749 n = _n;
2750 buffers_shm_id = _buffers_shm_id;
2751 buffers_shm_offset = _buffers_shm_offset;
2754 void* Set(
2755 void* cmd, GLsizei _n, uint32 _buffers_shm_id,
2756 uint32 _buffers_shm_offset) {
2757 static_cast<ValueType*>(
2758 cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset);
2759 return NextCmdAddress<ValueType>(cmd);
2762 gpu::CommandHeader header;
2763 int32 n;
2764 uint32 buffers_shm_id;
2765 uint32 buffers_shm_offset;
2768 COMPILE_ASSERT(sizeof(GenBuffers) == 16,
2769 Sizeof_GenBuffers_is_not_16);
2770 COMPILE_ASSERT(offsetof(GenBuffers, header) == 0,
2771 OffsetOf_GenBuffers_header_not_0);
2772 COMPILE_ASSERT(offsetof(GenBuffers, n) == 4,
2773 OffsetOf_GenBuffers_n_not_4);
2774 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_id) == 8,
2775 OffsetOf_GenBuffers_buffers_shm_id_not_8);
2776 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_offset) == 12,
2777 OffsetOf_GenBuffers_buffers_shm_offset_not_12);
2779 struct GenBuffersImmediate {
2780 typedef GenBuffersImmediate ValueType;
2781 static const CommandId kCmdId = kGenBuffersImmediate;
2782 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2784 static uint32 ComputeDataSize(GLsizei n) {
2785 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2788 static uint32 ComputeSize(GLsizei n) {
2789 return static_cast<uint32>(
2790 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
2793 void SetHeader(GLsizei n) {
2794 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2797 void Init(GLsizei _n, GLuint* _buffers) {
2798 SetHeader(_n);
2799 n = _n;
2800 memcpy(ImmediateDataAddress(this),
2801 _buffers, ComputeDataSize(_n));
2804 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
2805 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
2806 const uint32 size = ComputeSize(_n);
2807 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2810 gpu::CommandHeader header;
2811 int32 n;
2814 COMPILE_ASSERT(sizeof(GenBuffersImmediate) == 8,
2815 Sizeof_GenBuffersImmediate_is_not_8);
2816 COMPILE_ASSERT(offsetof(GenBuffersImmediate, header) == 0,
2817 OffsetOf_GenBuffersImmediate_header_not_0);
2818 COMPILE_ASSERT(offsetof(GenBuffersImmediate, n) == 4,
2819 OffsetOf_GenBuffersImmediate_n_not_4);
2821 struct GenerateMipmap {
2822 typedef GenerateMipmap ValueType;
2823 static const CommandId kCmdId = kGenerateMipmap;
2824 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2826 static uint32 ComputeSize() {
2827 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2830 void SetHeader() {
2831 header.SetCmd<ValueType>();
2834 void Init(GLenum _target) {
2835 SetHeader();
2836 target = _target;
2839 void* Set(void* cmd, GLenum _target) {
2840 static_cast<ValueType*>(cmd)->Init(_target);
2841 return NextCmdAddress<ValueType>(cmd);
2844 gpu::CommandHeader header;
2845 uint32 target;
2848 COMPILE_ASSERT(sizeof(GenerateMipmap) == 8,
2849 Sizeof_GenerateMipmap_is_not_8);
2850 COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0,
2851 OffsetOf_GenerateMipmap_header_not_0);
2852 COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4,
2853 OffsetOf_GenerateMipmap_target_not_4);
2855 struct GenFramebuffers {
2856 typedef GenFramebuffers ValueType;
2857 static const CommandId kCmdId = kGenFramebuffers;
2858 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2860 static uint32 ComputeSize() {
2861 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2864 void SetHeader() {
2865 header.SetCmd<ValueType>();
2868 void Init(
2869 GLsizei _n, uint32 _framebuffers_shm_id,
2870 uint32 _framebuffers_shm_offset) {
2871 SetHeader();
2872 n = _n;
2873 framebuffers_shm_id = _framebuffers_shm_id;
2874 framebuffers_shm_offset = _framebuffers_shm_offset;
2877 void* Set(
2878 void* cmd, GLsizei _n, uint32 _framebuffers_shm_id,
2879 uint32 _framebuffers_shm_offset) {
2880 static_cast<ValueType*>(
2881 cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
2882 return NextCmdAddress<ValueType>(cmd);
2885 gpu::CommandHeader header;
2886 int32 n;
2887 uint32 framebuffers_shm_id;
2888 uint32 framebuffers_shm_offset;
2891 COMPILE_ASSERT(sizeof(GenFramebuffers) == 16,
2892 Sizeof_GenFramebuffers_is_not_16);
2893 COMPILE_ASSERT(offsetof(GenFramebuffers, header) == 0,
2894 OffsetOf_GenFramebuffers_header_not_0);
2895 COMPILE_ASSERT(offsetof(GenFramebuffers, n) == 4,
2896 OffsetOf_GenFramebuffers_n_not_4);
2897 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_id) == 8,
2898 OffsetOf_GenFramebuffers_framebuffers_shm_id_not_8);
2899 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_offset) == 12,
2900 OffsetOf_GenFramebuffers_framebuffers_shm_offset_not_12);
2902 struct GenFramebuffersImmediate {
2903 typedef GenFramebuffersImmediate ValueType;
2904 static const CommandId kCmdId = kGenFramebuffersImmediate;
2905 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2907 static uint32 ComputeDataSize(GLsizei n) {
2908 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2911 static uint32 ComputeSize(GLsizei n) {
2912 return static_cast<uint32>(
2913 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
2916 void SetHeader(GLsizei n) {
2917 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2920 void Init(GLsizei _n, GLuint* _framebuffers) {
2921 SetHeader(_n);
2922 n = _n;
2923 memcpy(ImmediateDataAddress(this),
2924 _framebuffers, ComputeDataSize(_n));
2927 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
2928 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
2929 const uint32 size = ComputeSize(_n);
2930 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2933 gpu::CommandHeader header;
2934 int32 n;
2937 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate) == 8,
2938 Sizeof_GenFramebuffersImmediate_is_not_8);
2939 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, header) == 0,
2940 OffsetOf_GenFramebuffersImmediate_header_not_0);
2941 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, n) == 4,
2942 OffsetOf_GenFramebuffersImmediate_n_not_4);
2944 struct GenRenderbuffers {
2945 typedef GenRenderbuffers ValueType;
2946 static const CommandId kCmdId = kGenRenderbuffers;
2947 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2949 static uint32 ComputeSize() {
2950 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2953 void SetHeader() {
2954 header.SetCmd<ValueType>();
2957 void Init(
2958 GLsizei _n, uint32 _renderbuffers_shm_id,
2959 uint32 _renderbuffers_shm_offset) {
2960 SetHeader();
2961 n = _n;
2962 renderbuffers_shm_id = _renderbuffers_shm_id;
2963 renderbuffers_shm_offset = _renderbuffers_shm_offset;
2966 void* Set(
2967 void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id,
2968 uint32 _renderbuffers_shm_offset) {
2969 static_cast<ValueType*>(
2970 cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
2971 return NextCmdAddress<ValueType>(cmd);
2974 gpu::CommandHeader header;
2975 int32 n;
2976 uint32 renderbuffers_shm_id;
2977 uint32 renderbuffers_shm_offset;
2980 COMPILE_ASSERT(sizeof(GenRenderbuffers) == 16,
2981 Sizeof_GenRenderbuffers_is_not_16);
2982 COMPILE_ASSERT(offsetof(GenRenderbuffers, header) == 0,
2983 OffsetOf_GenRenderbuffers_header_not_0);
2984 COMPILE_ASSERT(offsetof(GenRenderbuffers, n) == 4,
2985 OffsetOf_GenRenderbuffers_n_not_4);
2986 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_id) == 8,
2987 OffsetOf_GenRenderbuffers_renderbuffers_shm_id_not_8);
2988 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_offset) == 12,
2989 OffsetOf_GenRenderbuffers_renderbuffers_shm_offset_not_12);
2991 struct GenRenderbuffersImmediate {
2992 typedef GenRenderbuffersImmediate ValueType;
2993 static const CommandId kCmdId = kGenRenderbuffersImmediate;
2994 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2996 static uint32 ComputeDataSize(GLsizei n) {
2997 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
3000 static uint32 ComputeSize(GLsizei n) {
3001 return static_cast<uint32>(
3002 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
3005 void SetHeader(GLsizei n) {
3006 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3009 void Init(GLsizei _n, GLuint* _renderbuffers) {
3010 SetHeader(_n);
3011 n = _n;
3012 memcpy(ImmediateDataAddress(this),
3013 _renderbuffers, ComputeDataSize(_n));
3016 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
3017 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
3018 const uint32 size = ComputeSize(_n);
3019 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3022 gpu::CommandHeader header;
3023 int32 n;
3026 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8,
3027 Sizeof_GenRenderbuffersImmediate_is_not_8);
3028 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0,
3029 OffsetOf_GenRenderbuffersImmediate_header_not_0);
3030 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4,
3031 OffsetOf_GenRenderbuffersImmediate_n_not_4);
3033 struct GenTextures {
3034 typedef GenTextures ValueType;
3035 static const CommandId kCmdId = kGenTextures;
3036 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3038 static uint32 ComputeSize() {
3039 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3042 void SetHeader() {
3043 header.SetCmd<ValueType>();
3046 void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
3047 SetHeader();
3048 n = _n;
3049 textures_shm_id = _textures_shm_id;
3050 textures_shm_offset = _textures_shm_offset;
3053 void* Set(
3054 void* cmd, GLsizei _n, uint32 _textures_shm_id,
3055 uint32 _textures_shm_offset) {
3056 static_cast<ValueType*>(
3057 cmd)->Init(_n, _textures_shm_id, _textures_shm_offset);
3058 return NextCmdAddress<ValueType>(cmd);
3061 gpu::CommandHeader header;
3062 int32 n;
3063 uint32 textures_shm_id;
3064 uint32 textures_shm_offset;
3067 COMPILE_ASSERT(sizeof(GenTextures) == 16,
3068 Sizeof_GenTextures_is_not_16);
3069 COMPILE_ASSERT(offsetof(GenTextures, header) == 0,
3070 OffsetOf_GenTextures_header_not_0);
3071 COMPILE_ASSERT(offsetof(GenTextures, n) == 4,
3072 OffsetOf_GenTextures_n_not_4);
3073 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_id) == 8,
3074 OffsetOf_GenTextures_textures_shm_id_not_8);
3075 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_offset) == 12,
3076 OffsetOf_GenTextures_textures_shm_offset_not_12);
3078 struct GenTexturesImmediate {
3079 typedef GenTexturesImmediate ValueType;
3080 static const CommandId kCmdId = kGenTexturesImmediate;
3081 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3083 static uint32 ComputeDataSize(GLsizei n) {
3084 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
3087 static uint32 ComputeSize(GLsizei n) {
3088 return static_cast<uint32>(
3089 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
3092 void SetHeader(GLsizei n) {
3093 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3096 void Init(GLsizei _n, GLuint* _textures) {
3097 SetHeader(_n);
3098 n = _n;
3099 memcpy(ImmediateDataAddress(this),
3100 _textures, ComputeDataSize(_n));
3103 void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
3104 static_cast<ValueType*>(cmd)->Init(_n, _textures);
3105 const uint32 size = ComputeSize(_n);
3106 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3109 gpu::CommandHeader header;
3110 int32 n;
3113 COMPILE_ASSERT(sizeof(GenTexturesImmediate) == 8,
3114 Sizeof_GenTexturesImmediate_is_not_8);
3115 COMPILE_ASSERT(offsetof(GenTexturesImmediate, header) == 0,
3116 OffsetOf_GenTexturesImmediate_header_not_0);
3117 COMPILE_ASSERT(offsetof(GenTexturesImmediate, n) == 4,
3118 OffsetOf_GenTexturesImmediate_n_not_4);
3120 struct GetActiveAttrib {
3121 typedef GetActiveAttrib ValueType;
3122 static const CommandId kCmdId = kGetActiveAttrib;
3123 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3125 struct Result {
3126 int32 success;
3127 int32 size;
3128 uint32 type;
3131 static uint32 ComputeSize() {
3132 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3135 void SetHeader() {
3136 header.SetCmd<ValueType>();
3139 void Init(
3140 GLuint _program, GLuint _index, uint32 _name_bucket_id,
3141 uint32 _result_shm_id, uint32 _result_shm_offset) {
3142 SetHeader();
3143 program = _program;
3144 index = _index;
3145 name_bucket_id = _name_bucket_id;
3146 result_shm_id = _result_shm_id;
3147 result_shm_offset = _result_shm_offset;
3150 void* Set(
3151 void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id,
3152 uint32 _result_shm_id, uint32 _result_shm_offset) {
3153 static_cast<ValueType*>(
3154 cmd)->Init(
3155 _program, _index, _name_bucket_id, _result_shm_id,
3156 _result_shm_offset);
3157 return NextCmdAddress<ValueType>(cmd);
3160 gpu::CommandHeader header;
3161 uint32 program;
3162 uint32 index;
3163 uint32 name_bucket_id;
3164 uint32 result_shm_id;
3165 uint32 result_shm_offset;
3168 COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24,
3169 Sizeof_GetActiveAttrib_is_not_24);
3170 COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0,
3171 OffsetOf_GetActiveAttrib_header_not_0);
3172 COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4,
3173 OffsetOf_GetActiveAttrib_program_not_4);
3174 COMPILE_ASSERT(offsetof(GetActiveAttrib, index) == 8,
3175 OffsetOf_GetActiveAttrib_index_not_8);
3176 COMPILE_ASSERT(offsetof(GetActiveAttrib, name_bucket_id) == 12,
3177 OffsetOf_GetActiveAttrib_name_bucket_id_not_12);
3178 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_id) == 16,
3179 OffsetOf_GetActiveAttrib_result_shm_id_not_16);
3180 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_offset) == 20,
3181 OffsetOf_GetActiveAttrib_result_shm_offset_not_20);
3182 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, success) == 0,
3183 OffsetOf_GetActiveAttrib_Result_success_not_0);
3184 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, size) == 4,
3185 OffsetOf_GetActiveAttrib_Result_size_not_4);
3186 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, type) == 8,
3187 OffsetOf_GetActiveAttrib_Result_type_not_8);
3189 struct GetActiveUniform {
3190 typedef GetActiveUniform ValueType;
3191 static const CommandId kCmdId = kGetActiveUniform;
3192 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3194 struct Result {
3195 int32 success;
3196 int32 size;
3197 uint32 type;
3200 static uint32 ComputeSize() {
3201 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3204 void SetHeader() {
3205 header.SetCmd<ValueType>();
3208 void Init(
3209 GLuint _program, GLuint _index, uint32 _name_bucket_id,
3210 uint32 _result_shm_id, uint32 _result_shm_offset) {
3211 SetHeader();
3212 program = _program;
3213 index = _index;
3214 name_bucket_id = _name_bucket_id;
3215 result_shm_id = _result_shm_id;
3216 result_shm_offset = _result_shm_offset;
3219 void* Set(
3220 void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id,
3221 uint32 _result_shm_id, uint32 _result_shm_offset) {
3222 static_cast<ValueType*>(
3223 cmd)->Init(
3224 _program, _index, _name_bucket_id, _result_shm_id,
3225 _result_shm_offset);
3226 return NextCmdAddress<ValueType>(cmd);
3229 gpu::CommandHeader header;
3230 uint32 program;
3231 uint32 index;
3232 uint32 name_bucket_id;
3233 uint32 result_shm_id;
3234 uint32 result_shm_offset;
3237 COMPILE_ASSERT(sizeof(GetActiveUniform) == 24,
3238 Sizeof_GetActiveUniform_is_not_24);
3239 COMPILE_ASSERT(offsetof(GetActiveUniform, header) == 0,
3240 OffsetOf_GetActiveUniform_header_not_0);
3241 COMPILE_ASSERT(offsetof(GetActiveUniform, program) == 4,
3242 OffsetOf_GetActiveUniform_program_not_4);
3243 COMPILE_ASSERT(offsetof(GetActiveUniform, index) == 8,
3244 OffsetOf_GetActiveUniform_index_not_8);
3245 COMPILE_ASSERT(offsetof(GetActiveUniform, name_bucket_id) == 12,
3246 OffsetOf_GetActiveUniform_name_bucket_id_not_12);
3247 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_id) == 16,
3248 OffsetOf_GetActiveUniform_result_shm_id_not_16);
3249 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_offset) == 20,
3250 OffsetOf_GetActiveUniform_result_shm_offset_not_20);
3251 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, success) == 0,
3252 OffsetOf_GetActiveUniform_Result_success_not_0);
3253 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, size) == 4,
3254 OffsetOf_GetActiveUniform_Result_size_not_4);
3255 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, type) == 8,
3256 OffsetOf_GetActiveUniform_Result_type_not_8);
3258 struct GetAttachedShaders {
3259 typedef GetAttachedShaders ValueType;
3260 static const CommandId kCmdId = kGetAttachedShaders;
3261 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3263 typedef SizedResult<GLuint> Result;
3265 static uint32 ComputeSize() {
3266 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3269 void SetHeader() {
3270 header.SetCmd<ValueType>();
3273 void Init(
3274 GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset,
3275 uint32 _result_size) {
3276 SetHeader();
3277 program = _program;
3278 result_shm_id = _result_shm_id;
3279 result_shm_offset = _result_shm_offset;
3280 result_size = _result_size;
3283 void* Set(
3284 void* cmd, GLuint _program, uint32 _result_shm_id,
3285 uint32 _result_shm_offset, uint32 _result_size) {
3286 static_cast<ValueType*>(
3287 cmd)->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
3288 return NextCmdAddress<ValueType>(cmd);
3291 gpu::CommandHeader header;
3292 uint32 program;
3293 uint32 result_shm_id;
3294 uint32 result_shm_offset;
3295 uint32 result_size;
3298 COMPILE_ASSERT(sizeof(GetAttachedShaders) == 20,
3299 Sizeof_GetAttachedShaders_is_not_20);
3300 COMPILE_ASSERT(offsetof(GetAttachedShaders, header) == 0,
3301 OffsetOf_GetAttachedShaders_header_not_0);
3302 COMPILE_ASSERT(offsetof(GetAttachedShaders, program) == 4,
3303 OffsetOf_GetAttachedShaders_program_not_4);
3304 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_id) == 8,
3305 OffsetOf_GetAttachedShaders_result_shm_id_not_8);
3306 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_offset) == 12,
3307 OffsetOf_GetAttachedShaders_result_shm_offset_not_12);
3308 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_size) == 16,
3309 OffsetOf_GetAttachedShaders_result_size_not_16);
3311 struct GetBooleanv {
3312 typedef GetBooleanv ValueType;
3313 static const CommandId kCmdId = kGetBooleanv;
3314 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3316 typedef SizedResult<GLboolean> Result;
3318 static uint32 ComputeSize() {
3319 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3322 void SetHeader() {
3323 header.SetCmd<ValueType>();
3326 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3327 SetHeader();
3328 pname = _pname;
3329 params_shm_id = _params_shm_id;
3330 params_shm_offset = _params_shm_offset;
3333 void* Set(
3334 void* cmd, GLenum _pname, uint32 _params_shm_id,
3335 uint32 _params_shm_offset) {
3336 static_cast<ValueType*>(
3337 cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
3338 return NextCmdAddress<ValueType>(cmd);
3341 gpu::CommandHeader header;
3342 uint32 pname;
3343 uint32 params_shm_id;
3344 uint32 params_shm_offset;
3347 COMPILE_ASSERT(sizeof(GetBooleanv) == 16,
3348 Sizeof_GetBooleanv_is_not_16);
3349 COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0,
3350 OffsetOf_GetBooleanv_header_not_0);
3351 COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4,
3352 OffsetOf_GetBooleanv_pname_not_4);
3353 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_id) == 8,
3354 OffsetOf_GetBooleanv_params_shm_id_not_8);
3355 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_offset) == 12,
3356 OffsetOf_GetBooleanv_params_shm_offset_not_12);
3358 struct GetBufferParameteriv {
3359 typedef GetBufferParameteriv ValueType;
3360 static const CommandId kCmdId = kGetBufferParameteriv;
3361 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3363 typedef SizedResult<GLint> Result;
3365 static uint32 ComputeSize() {
3366 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3369 void SetHeader() {
3370 header.SetCmd<ValueType>();
3373 void Init(
3374 GLenum _target, GLenum _pname, uint32 _params_shm_id,
3375 uint32 _params_shm_offset) {
3376 SetHeader();
3377 target = _target;
3378 pname = _pname;
3379 params_shm_id = _params_shm_id;
3380 params_shm_offset = _params_shm_offset;
3383 void* Set(
3384 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
3385 uint32 _params_shm_offset) {
3386 static_cast<ValueType*>(
3387 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3388 return NextCmdAddress<ValueType>(cmd);
3391 gpu::CommandHeader header;
3392 uint32 target;
3393 uint32 pname;
3394 uint32 params_shm_id;
3395 uint32 params_shm_offset;
3398 COMPILE_ASSERT(sizeof(GetBufferParameteriv) == 20,
3399 Sizeof_GetBufferParameteriv_is_not_20);
3400 COMPILE_ASSERT(offsetof(GetBufferParameteriv, header) == 0,
3401 OffsetOf_GetBufferParameteriv_header_not_0);
3402 COMPILE_ASSERT(offsetof(GetBufferParameteriv, target) == 4,
3403 OffsetOf_GetBufferParameteriv_target_not_4);
3404 COMPILE_ASSERT(offsetof(GetBufferParameteriv, pname) == 8,
3405 OffsetOf_GetBufferParameteriv_pname_not_8);
3406 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_id) == 12,
3407 OffsetOf_GetBufferParameteriv_params_shm_id_not_12);
3408 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
3409 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16);
3411 struct GetError {
3412 typedef GetError ValueType;
3413 static const CommandId kCmdId = kGetError;
3414 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3416 typedef GLenum Result;
3418 static uint32 ComputeSize() {
3419 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3422 void SetHeader() {
3423 header.SetCmd<ValueType>();
3426 void Init(uint32 _result_shm_id, uint32 _result_shm_offset) {
3427 SetHeader();
3428 result_shm_id = _result_shm_id;
3429 result_shm_offset = _result_shm_offset;
3432 void* Set(void* cmd, uint32 _result_shm_id, uint32 _result_shm_offset) {
3433 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
3434 return NextCmdAddress<ValueType>(cmd);
3437 gpu::CommandHeader header;
3438 uint32 result_shm_id;
3439 uint32 result_shm_offset;
3442 COMPILE_ASSERT(sizeof(GetError) == 12,
3443 Sizeof_GetError_is_not_12);
3444 COMPILE_ASSERT(offsetof(GetError, header) == 0,
3445 OffsetOf_GetError_header_not_0);
3446 COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4,
3447 OffsetOf_GetError_result_shm_id_not_4);
3448 COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8,
3449 OffsetOf_GetError_result_shm_offset_not_8);
3451 struct GetFloatv {
3452 typedef GetFloatv ValueType;
3453 static const CommandId kCmdId = kGetFloatv;
3454 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3456 typedef SizedResult<GLfloat> Result;
3458 static uint32 ComputeSize() {
3459 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3462 void SetHeader() {
3463 header.SetCmd<ValueType>();
3466 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3467 SetHeader();
3468 pname = _pname;
3469 params_shm_id = _params_shm_id;
3470 params_shm_offset = _params_shm_offset;
3473 void* Set(
3474 void* cmd, GLenum _pname, uint32 _params_shm_id,
3475 uint32 _params_shm_offset) {
3476 static_cast<ValueType*>(
3477 cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
3478 return NextCmdAddress<ValueType>(cmd);
3481 gpu::CommandHeader header;
3482 uint32 pname;
3483 uint32 params_shm_id;
3484 uint32 params_shm_offset;
3487 COMPILE_ASSERT(sizeof(GetFloatv) == 16,
3488 Sizeof_GetFloatv_is_not_16);
3489 COMPILE_ASSERT(offsetof(GetFloatv, header) == 0,
3490 OffsetOf_GetFloatv_header_not_0);
3491 COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4,
3492 OffsetOf_GetFloatv_pname_not_4);
3493 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8,
3494 OffsetOf_GetFloatv_params_shm_id_not_8);
3495 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12,
3496 OffsetOf_GetFloatv_params_shm_offset_not_12);
3498 struct GetFramebufferAttachmentParameteriv {
3499 typedef GetFramebufferAttachmentParameteriv ValueType;
3500 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
3501 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3503 typedef SizedResult<GLint> Result;
3505 static uint32 ComputeSize() {
3506 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3509 void SetHeader() {
3510 header.SetCmd<ValueType>();
3513 void Init(
3514 GLenum _target, GLenum _attachment, GLenum _pname, uint32 _params_shm_id,
3515 uint32 _params_shm_offset) {
3516 SetHeader();
3517 target = _target;
3518 attachment = _attachment;
3519 pname = _pname;
3520 params_shm_id = _params_shm_id;
3521 params_shm_offset = _params_shm_offset;
3524 void* Set(
3525 void* cmd, GLenum _target, GLenum _attachment, GLenum _pname,
3526 uint32 _params_shm_id, uint32 _params_shm_offset) {
3527 static_cast<ValueType*>(
3528 cmd)->Init(
3529 _target, _attachment, _pname, _params_shm_id, _params_shm_offset);
3530 return NextCmdAddress<ValueType>(cmd);
3533 gpu::CommandHeader header;
3534 uint32 target;
3535 uint32 attachment;
3536 uint32 pname;
3537 uint32 params_shm_id;
3538 uint32 params_shm_offset;
3541 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv) == 24,
3542 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24);
3543 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
3544 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0);
3545 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
3546 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4);
3547 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
3548 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8);
3549 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
3550 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12);
3551 COMPILE_ASSERT(
3552 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
3553 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16); // NOLINT
3554 COMPILE_ASSERT(
3555 offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20,
3556 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20); // NOLINT
3558 struct GetIntegerv {
3559 typedef GetIntegerv ValueType;
3560 static const CommandId kCmdId = kGetIntegerv;
3561 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3563 typedef SizedResult<GLint> Result;
3565 static uint32 ComputeSize() {
3566 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3569 void SetHeader() {
3570 header.SetCmd<ValueType>();
3573 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3574 SetHeader();
3575 pname = _pname;
3576 params_shm_id = _params_shm_id;
3577 params_shm_offset = _params_shm_offset;
3580 void* Set(
3581 void* cmd, GLenum _pname, uint32 _params_shm_id,
3582 uint32 _params_shm_offset) {
3583 static_cast<ValueType*>(
3584 cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
3585 return NextCmdAddress<ValueType>(cmd);
3588 gpu::CommandHeader header;
3589 uint32 pname;
3590 uint32 params_shm_id;
3591 uint32 params_shm_offset;
3594 COMPILE_ASSERT(sizeof(GetIntegerv) == 16,
3595 Sizeof_GetIntegerv_is_not_16);
3596 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0,
3597 OffsetOf_GetIntegerv_header_not_0);
3598 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4,
3599 OffsetOf_GetIntegerv_pname_not_4);
3600 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8,
3601 OffsetOf_GetIntegerv_params_shm_id_not_8);
3602 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12,
3603 OffsetOf_GetIntegerv_params_shm_offset_not_12);
3605 struct GetProgramiv {
3606 typedef GetProgramiv ValueType;
3607 static const CommandId kCmdId = kGetProgramiv;
3608 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3610 typedef SizedResult<GLint> Result;
3612 static uint32 ComputeSize() {
3613 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3616 void SetHeader() {
3617 header.SetCmd<ValueType>();
3620 void Init(
3621 GLuint _program, GLenum _pname, uint32 _params_shm_id,
3622 uint32 _params_shm_offset) {
3623 SetHeader();
3624 program = _program;
3625 pname = _pname;
3626 params_shm_id = _params_shm_id;
3627 params_shm_offset = _params_shm_offset;
3630 void* Set(
3631 void* cmd, GLuint _program, GLenum _pname, uint32 _params_shm_id,
3632 uint32 _params_shm_offset) {
3633 static_cast<ValueType*>(
3634 cmd)->Init(_program, _pname, _params_shm_id, _params_shm_offset);
3635 return NextCmdAddress<ValueType>(cmd);
3638 gpu::CommandHeader header;
3639 uint32 program;
3640 uint32 pname;
3641 uint32 params_shm_id;
3642 uint32 params_shm_offset;
3645 COMPILE_ASSERT(sizeof(GetProgramiv) == 20,
3646 Sizeof_GetProgramiv_is_not_20);
3647 COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0,
3648 OffsetOf_GetProgramiv_header_not_0);
3649 COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4,
3650 OffsetOf_GetProgramiv_program_not_4);
3651 COMPILE_ASSERT(offsetof(GetProgramiv, pname) == 8,
3652 OffsetOf_GetProgramiv_pname_not_8);
3653 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_id) == 12,
3654 OffsetOf_GetProgramiv_params_shm_id_not_12);
3655 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_offset) == 16,
3656 OffsetOf_GetProgramiv_params_shm_offset_not_16);
3658 struct GetProgramInfoLog {
3659 typedef GetProgramInfoLog ValueType;
3660 static const CommandId kCmdId = kGetProgramInfoLog;
3661 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3663 static uint32 ComputeSize() {
3664 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3667 void SetHeader() {
3668 header.SetCmd<ValueType>();
3671 void Init(GLuint _program, uint32 _bucket_id) {
3672 SetHeader();
3673 program = _program;
3674 bucket_id = _bucket_id;
3677 void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
3678 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
3679 return NextCmdAddress<ValueType>(cmd);
3682 gpu::CommandHeader header;
3683 uint32 program;
3684 uint32 bucket_id;
3687 COMPILE_ASSERT(sizeof(GetProgramInfoLog) == 12,
3688 Sizeof_GetProgramInfoLog_is_not_12);
3689 COMPILE_ASSERT(offsetof(GetProgramInfoLog, header) == 0,
3690 OffsetOf_GetProgramInfoLog_header_not_0);
3691 COMPILE_ASSERT(offsetof(GetProgramInfoLog, program) == 4,
3692 OffsetOf_GetProgramInfoLog_program_not_4);
3693 COMPILE_ASSERT(offsetof(GetProgramInfoLog, bucket_id) == 8,
3694 OffsetOf_GetProgramInfoLog_bucket_id_not_8);
3696 struct GetRenderbufferParameteriv {
3697 typedef GetRenderbufferParameteriv ValueType;
3698 static const CommandId kCmdId = kGetRenderbufferParameteriv;
3699 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3701 typedef SizedResult<GLint> Result;
3703 static uint32 ComputeSize() {
3704 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3707 void SetHeader() {
3708 header.SetCmd<ValueType>();
3711 void Init(
3712 GLenum _target, GLenum _pname, uint32 _params_shm_id,
3713 uint32 _params_shm_offset) {
3714 SetHeader();
3715 target = _target;
3716 pname = _pname;
3717 params_shm_id = _params_shm_id;
3718 params_shm_offset = _params_shm_offset;
3721 void* Set(
3722 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
3723 uint32 _params_shm_offset) {
3724 static_cast<ValueType*>(
3725 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3726 return NextCmdAddress<ValueType>(cmd);
3729 gpu::CommandHeader header;
3730 uint32 target;
3731 uint32 pname;
3732 uint32 params_shm_id;
3733 uint32 params_shm_offset;
3736 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv) == 20,
3737 Sizeof_GetRenderbufferParameteriv_is_not_20);
3738 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, header) == 0,
3739 OffsetOf_GetRenderbufferParameteriv_header_not_0);
3740 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4,
3741 OffsetOf_GetRenderbufferParameteriv_target_not_4);
3742 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8,
3743 OffsetOf_GetRenderbufferParameteriv_pname_not_8);
3744 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
3745 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12);
3746 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
3747 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16);
3749 struct GetShaderiv {
3750 typedef GetShaderiv ValueType;
3751 static const CommandId kCmdId = kGetShaderiv;
3752 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3754 typedef SizedResult<GLint> Result;
3756 static uint32 ComputeSize() {
3757 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3760 void SetHeader() {
3761 header.SetCmd<ValueType>();
3764 void Init(
3765 GLuint _shader, GLenum _pname, uint32 _params_shm_id,
3766 uint32 _params_shm_offset) {
3767 SetHeader();
3768 shader = _shader;
3769 pname = _pname;
3770 params_shm_id = _params_shm_id;
3771 params_shm_offset = _params_shm_offset;
3774 void* Set(
3775 void* cmd, GLuint _shader, GLenum _pname, uint32 _params_shm_id,
3776 uint32 _params_shm_offset) {
3777 static_cast<ValueType*>(
3778 cmd)->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
3779 return NextCmdAddress<ValueType>(cmd);
3782 gpu::CommandHeader header;
3783 uint32 shader;
3784 uint32 pname;
3785 uint32 params_shm_id;
3786 uint32 params_shm_offset;
3789 COMPILE_ASSERT(sizeof(GetShaderiv) == 20,
3790 Sizeof_GetShaderiv_is_not_20);
3791 COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0,
3792 OffsetOf_GetShaderiv_header_not_0);
3793 COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4,
3794 OffsetOf_GetShaderiv_shader_not_4);
3795 COMPILE_ASSERT(offsetof(GetShaderiv, pname) == 8,
3796 OffsetOf_GetShaderiv_pname_not_8);
3797 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_id) == 12,
3798 OffsetOf_GetShaderiv_params_shm_id_not_12);
3799 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_offset) == 16,
3800 OffsetOf_GetShaderiv_params_shm_offset_not_16);
3802 struct GetShaderInfoLog {
3803 typedef GetShaderInfoLog ValueType;
3804 static const CommandId kCmdId = kGetShaderInfoLog;
3805 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3807 static uint32 ComputeSize() {
3808 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3811 void SetHeader() {
3812 header.SetCmd<ValueType>();
3815 void Init(GLuint _shader, uint32 _bucket_id) {
3816 SetHeader();
3817 shader = _shader;
3818 bucket_id = _bucket_id;
3821 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
3822 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3823 return NextCmdAddress<ValueType>(cmd);
3826 gpu::CommandHeader header;
3827 uint32 shader;
3828 uint32 bucket_id;
3831 COMPILE_ASSERT(sizeof(GetShaderInfoLog) == 12,
3832 Sizeof_GetShaderInfoLog_is_not_12);
3833 COMPILE_ASSERT(offsetof(GetShaderInfoLog, header) == 0,
3834 OffsetOf_GetShaderInfoLog_header_not_0);
3835 COMPILE_ASSERT(offsetof(GetShaderInfoLog, shader) == 4,
3836 OffsetOf_GetShaderInfoLog_shader_not_4);
3837 COMPILE_ASSERT(offsetof(GetShaderInfoLog, bucket_id) == 8,
3838 OffsetOf_GetShaderInfoLog_bucket_id_not_8);
3840 struct GetShaderPrecisionFormat {
3841 typedef GetShaderPrecisionFormat ValueType;
3842 static const CommandId kCmdId = kGetShaderPrecisionFormat;
3843 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3845 struct Result {
3846 int32 success;
3847 int32 min_range;
3848 int32 max_range;
3849 int32 precision;
3852 static uint32 ComputeSize() {
3853 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3856 void SetHeader() {
3857 header.SetCmd<ValueType>();
3860 void Init(
3861 GLenum _shadertype, GLenum _precisiontype, uint32 _result_shm_id,
3862 uint32 _result_shm_offset) {
3863 SetHeader();
3864 shadertype = _shadertype;
3865 precisiontype = _precisiontype;
3866 result_shm_id = _result_shm_id;
3867 result_shm_offset = _result_shm_offset;
3870 void* Set(
3871 void* cmd, GLenum _shadertype, GLenum _precisiontype,
3872 uint32 _result_shm_id, uint32 _result_shm_offset) {
3873 static_cast<ValueType*>(
3874 cmd)->Init(
3875 _shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
3876 return NextCmdAddress<ValueType>(cmd);
3879 gpu::CommandHeader header;
3880 uint32 shadertype;
3881 uint32 precisiontype;
3882 uint32 result_shm_id;
3883 uint32 result_shm_offset;
3886 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat) == 20,
3887 Sizeof_GetShaderPrecisionFormat_is_not_20);
3888 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, header) == 0,
3889 OffsetOf_GetShaderPrecisionFormat_header_not_0);
3890 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
3891 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4);
3892 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
3893 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8);
3894 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
3895 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12);
3896 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
3897 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16);
3898 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
3899 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0);
3900 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
3901 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4);
3902 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
3903 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8);
3904 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
3905 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12);
3907 struct GetShaderSource {
3908 typedef GetShaderSource ValueType;
3909 static const CommandId kCmdId = kGetShaderSource;
3910 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3912 static uint32 ComputeSize() {
3913 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3916 void SetHeader() {
3917 header.SetCmd<ValueType>();
3920 void Init(GLuint _shader, uint32 _bucket_id) {
3921 SetHeader();
3922 shader = _shader;
3923 bucket_id = _bucket_id;
3926 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
3927 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3928 return NextCmdAddress<ValueType>(cmd);
3931 gpu::CommandHeader header;
3932 uint32 shader;
3933 uint32 bucket_id;
3936 COMPILE_ASSERT(sizeof(GetShaderSource) == 12,
3937 Sizeof_GetShaderSource_is_not_12);
3938 COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0,
3939 OffsetOf_GetShaderSource_header_not_0);
3940 COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4,
3941 OffsetOf_GetShaderSource_shader_not_4);
3942 COMPILE_ASSERT(offsetof(GetShaderSource, bucket_id) == 8,
3943 OffsetOf_GetShaderSource_bucket_id_not_8);
3945 struct GetString {
3946 typedef GetString ValueType;
3947 static const CommandId kCmdId = kGetString;
3948 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3950 static uint32 ComputeSize() {
3951 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3954 void SetHeader() {
3955 header.SetCmd<ValueType>();
3958 void Init(GLenum _name, uint32 _bucket_id) {
3959 SetHeader();
3960 name = _name;
3961 bucket_id = _bucket_id;
3964 void* Set(void* cmd, GLenum _name, uint32 _bucket_id) {
3965 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
3966 return NextCmdAddress<ValueType>(cmd);
3969 gpu::CommandHeader header;
3970 uint32 name;
3971 uint32 bucket_id;
3974 COMPILE_ASSERT(sizeof(GetString) == 12,
3975 Sizeof_GetString_is_not_12);
3976 COMPILE_ASSERT(offsetof(GetString, header) == 0,
3977 OffsetOf_GetString_header_not_0);
3978 COMPILE_ASSERT(offsetof(GetString, name) == 4,
3979 OffsetOf_GetString_name_not_4);
3980 COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8,
3981 OffsetOf_GetString_bucket_id_not_8);
3983 struct GetTexParameterfv {
3984 typedef GetTexParameterfv ValueType;
3985 static const CommandId kCmdId = kGetTexParameterfv;
3986 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3988 typedef SizedResult<GLfloat> Result;
3990 static uint32 ComputeSize() {
3991 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3994 void SetHeader() {
3995 header.SetCmd<ValueType>();
3998 void Init(
3999 GLenum _target, GLenum _pname, uint32 _params_shm_id,
4000 uint32 _params_shm_offset) {
4001 SetHeader();
4002 target = _target;
4003 pname = _pname;
4004 params_shm_id = _params_shm_id;
4005 params_shm_offset = _params_shm_offset;
4008 void* Set(
4009 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
4010 uint32 _params_shm_offset) {
4011 static_cast<ValueType*>(
4012 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4013 return NextCmdAddress<ValueType>(cmd);
4016 gpu::CommandHeader header;
4017 uint32 target;
4018 uint32 pname;
4019 uint32 params_shm_id;
4020 uint32 params_shm_offset;
4023 COMPILE_ASSERT(sizeof(GetTexParameterfv) == 20,
4024 Sizeof_GetTexParameterfv_is_not_20);
4025 COMPILE_ASSERT(offsetof(GetTexParameterfv, header) == 0,
4026 OffsetOf_GetTexParameterfv_header_not_0);
4027 COMPILE_ASSERT(offsetof(GetTexParameterfv, target) == 4,
4028 OffsetOf_GetTexParameterfv_target_not_4);
4029 COMPILE_ASSERT(offsetof(GetTexParameterfv, pname) == 8,
4030 OffsetOf_GetTexParameterfv_pname_not_8);
4031 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_id) == 12,
4032 OffsetOf_GetTexParameterfv_params_shm_id_not_12);
4033 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_offset) == 16,
4034 OffsetOf_GetTexParameterfv_params_shm_offset_not_16);
4036 struct GetTexParameteriv {
4037 typedef GetTexParameteriv ValueType;
4038 static const CommandId kCmdId = kGetTexParameteriv;
4039 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4041 typedef SizedResult<GLint> Result;
4043 static uint32 ComputeSize() {
4044 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4047 void SetHeader() {
4048 header.SetCmd<ValueType>();
4051 void Init(
4052 GLenum _target, GLenum _pname, uint32 _params_shm_id,
4053 uint32 _params_shm_offset) {
4054 SetHeader();
4055 target = _target;
4056 pname = _pname;
4057 params_shm_id = _params_shm_id;
4058 params_shm_offset = _params_shm_offset;
4061 void* Set(
4062 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
4063 uint32 _params_shm_offset) {
4064 static_cast<ValueType*>(
4065 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4066 return NextCmdAddress<ValueType>(cmd);
4069 gpu::CommandHeader header;
4070 uint32 target;
4071 uint32 pname;
4072 uint32 params_shm_id;
4073 uint32 params_shm_offset;
4076 COMPILE_ASSERT(sizeof(GetTexParameteriv) == 20,
4077 Sizeof_GetTexParameteriv_is_not_20);
4078 COMPILE_ASSERT(offsetof(GetTexParameteriv, header) == 0,
4079 OffsetOf_GetTexParameteriv_header_not_0);
4080 COMPILE_ASSERT(offsetof(GetTexParameteriv, target) == 4,
4081 OffsetOf_GetTexParameteriv_target_not_4);
4082 COMPILE_ASSERT(offsetof(GetTexParameteriv, pname) == 8,
4083 OffsetOf_GetTexParameteriv_pname_not_8);
4084 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_id) == 12,
4085 OffsetOf_GetTexParameteriv_params_shm_id_not_12);
4086 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_offset) == 16,
4087 OffsetOf_GetTexParameteriv_params_shm_offset_not_16);
4089 struct GetUniformfv {
4090 typedef GetUniformfv ValueType;
4091 static const CommandId kCmdId = kGetUniformfv;
4092 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4094 typedef SizedResult<GLfloat> Result;
4096 static uint32 ComputeSize() {
4097 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4100 void SetHeader() {
4101 header.SetCmd<ValueType>();
4104 void Init(
4105 GLuint _program, GLint _location, uint32 _params_shm_id,
4106 uint32 _params_shm_offset) {
4107 SetHeader();
4108 program = _program;
4109 location = _location;
4110 params_shm_id = _params_shm_id;
4111 params_shm_offset = _params_shm_offset;
4114 void* Set(
4115 void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id,
4116 uint32 _params_shm_offset) {
4117 static_cast<ValueType*>(
4118 cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset);
4119 return NextCmdAddress<ValueType>(cmd);
4122 gpu::CommandHeader header;
4123 uint32 program;
4124 int32 location;
4125 uint32 params_shm_id;
4126 uint32 params_shm_offset;
4129 COMPILE_ASSERT(sizeof(GetUniformfv) == 20,
4130 Sizeof_GetUniformfv_is_not_20);
4131 COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0,
4132 OffsetOf_GetUniformfv_header_not_0);
4133 COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4,
4134 OffsetOf_GetUniformfv_program_not_4);
4135 COMPILE_ASSERT(offsetof(GetUniformfv, location) == 8,
4136 OffsetOf_GetUniformfv_location_not_8);
4137 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_id) == 12,
4138 OffsetOf_GetUniformfv_params_shm_id_not_12);
4139 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_offset) == 16,
4140 OffsetOf_GetUniformfv_params_shm_offset_not_16);
4142 struct GetUniformiv {
4143 typedef GetUniformiv ValueType;
4144 static const CommandId kCmdId = kGetUniformiv;
4145 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4147 typedef SizedResult<GLint> Result;
4149 static uint32 ComputeSize() {
4150 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4153 void SetHeader() {
4154 header.SetCmd<ValueType>();
4157 void Init(
4158 GLuint _program, GLint _location, uint32 _params_shm_id,
4159 uint32 _params_shm_offset) {
4160 SetHeader();
4161 program = _program;
4162 location = _location;
4163 params_shm_id = _params_shm_id;
4164 params_shm_offset = _params_shm_offset;
4167 void* Set(
4168 void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id,
4169 uint32 _params_shm_offset) {
4170 static_cast<ValueType*>(
4171 cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset);
4172 return NextCmdAddress<ValueType>(cmd);
4175 gpu::CommandHeader header;
4176 uint32 program;
4177 int32 location;
4178 uint32 params_shm_id;
4179 uint32 params_shm_offset;
4182 COMPILE_ASSERT(sizeof(GetUniformiv) == 20,
4183 Sizeof_GetUniformiv_is_not_20);
4184 COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0,
4185 OffsetOf_GetUniformiv_header_not_0);
4186 COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4,
4187 OffsetOf_GetUniformiv_program_not_4);
4188 COMPILE_ASSERT(offsetof(GetUniformiv, location) == 8,
4189 OffsetOf_GetUniformiv_location_not_8);
4190 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_id) == 12,
4191 OffsetOf_GetUniformiv_params_shm_id_not_12);
4192 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_offset) == 16,
4193 OffsetOf_GetUniformiv_params_shm_offset_not_16);
4195 struct GetVertexAttribfv {
4196 typedef GetVertexAttribfv ValueType;
4197 static const CommandId kCmdId = kGetVertexAttribfv;
4198 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4200 typedef SizedResult<GLfloat> Result;
4202 static uint32 ComputeSize() {
4203 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4206 void SetHeader() {
4207 header.SetCmd<ValueType>();
4210 void Init(
4211 GLuint _index, GLenum _pname, uint32 _params_shm_id,
4212 uint32 _params_shm_offset) {
4213 SetHeader();
4214 index = _index;
4215 pname = _pname;
4216 params_shm_id = _params_shm_id;
4217 params_shm_offset = _params_shm_offset;
4220 void* Set(
4221 void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id,
4222 uint32 _params_shm_offset) {
4223 static_cast<ValueType*>(
4224 cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset);
4225 return NextCmdAddress<ValueType>(cmd);
4228 gpu::CommandHeader header;
4229 uint32 index;
4230 uint32 pname;
4231 uint32 params_shm_id;
4232 uint32 params_shm_offset;
4235 COMPILE_ASSERT(sizeof(GetVertexAttribfv) == 20,
4236 Sizeof_GetVertexAttribfv_is_not_20);
4237 COMPILE_ASSERT(offsetof(GetVertexAttribfv, header) == 0,
4238 OffsetOf_GetVertexAttribfv_header_not_0);
4239 COMPILE_ASSERT(offsetof(GetVertexAttribfv, index) == 4,
4240 OffsetOf_GetVertexAttribfv_index_not_4);
4241 COMPILE_ASSERT(offsetof(GetVertexAttribfv, pname) == 8,
4242 OffsetOf_GetVertexAttribfv_pname_not_8);
4243 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_id) == 12,
4244 OffsetOf_GetVertexAttribfv_params_shm_id_not_12);
4245 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
4246 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16);
4248 struct GetVertexAttribiv {
4249 typedef GetVertexAttribiv ValueType;
4250 static const CommandId kCmdId = kGetVertexAttribiv;
4251 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4253 typedef SizedResult<GLint> Result;
4255 static uint32 ComputeSize() {
4256 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4259 void SetHeader() {
4260 header.SetCmd<ValueType>();
4263 void Init(
4264 GLuint _index, GLenum _pname, uint32 _params_shm_id,
4265 uint32 _params_shm_offset) {
4266 SetHeader();
4267 index = _index;
4268 pname = _pname;
4269 params_shm_id = _params_shm_id;
4270 params_shm_offset = _params_shm_offset;
4273 void* Set(
4274 void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id,
4275 uint32 _params_shm_offset) {
4276 static_cast<ValueType*>(
4277 cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset);
4278 return NextCmdAddress<ValueType>(cmd);
4281 gpu::CommandHeader header;
4282 uint32 index;
4283 uint32 pname;
4284 uint32 params_shm_id;
4285 uint32 params_shm_offset;
4288 COMPILE_ASSERT(sizeof(GetVertexAttribiv) == 20,
4289 Sizeof_GetVertexAttribiv_is_not_20);
4290 COMPILE_ASSERT(offsetof(GetVertexAttribiv, header) == 0,
4291 OffsetOf_GetVertexAttribiv_header_not_0);
4292 COMPILE_ASSERT(offsetof(GetVertexAttribiv, index) == 4,
4293 OffsetOf_GetVertexAttribiv_index_not_4);
4294 COMPILE_ASSERT(offsetof(GetVertexAttribiv, pname) == 8,
4295 OffsetOf_GetVertexAttribiv_pname_not_8);
4296 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_id) == 12,
4297 OffsetOf_GetVertexAttribiv_params_shm_id_not_12);
4298 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
4299 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16);
4301 struct GetVertexAttribPointerv {
4302 typedef GetVertexAttribPointerv ValueType;
4303 static const CommandId kCmdId = kGetVertexAttribPointerv;
4304 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4306 typedef SizedResult<GLuint> Result;
4308 static uint32 ComputeSize() {
4309 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4312 void SetHeader() {
4313 header.SetCmd<ValueType>();
4316 void Init(
4317 GLuint _index, GLenum _pname, uint32 _pointer_shm_id,
4318 uint32 _pointer_shm_offset) {
4319 SetHeader();
4320 index = _index;
4321 pname = _pname;
4322 pointer_shm_id = _pointer_shm_id;
4323 pointer_shm_offset = _pointer_shm_offset;
4326 void* Set(
4327 void* cmd, GLuint _index, GLenum _pname, uint32 _pointer_shm_id,
4328 uint32 _pointer_shm_offset) {
4329 static_cast<ValueType*>(
4330 cmd)->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
4331 return NextCmdAddress<ValueType>(cmd);
4334 gpu::CommandHeader header;
4335 uint32 index;
4336 uint32 pname;
4337 uint32 pointer_shm_id;
4338 uint32 pointer_shm_offset;
4341 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv) == 20,
4342 Sizeof_GetVertexAttribPointerv_is_not_20);
4343 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, header) == 0,
4344 OffsetOf_GetVertexAttribPointerv_header_not_0);
4345 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, index) == 4,
4346 OffsetOf_GetVertexAttribPointerv_index_not_4);
4347 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pname) == 8,
4348 OffsetOf_GetVertexAttribPointerv_pname_not_8);
4349 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
4350 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12);
4351 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
4352 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16);
4354 struct Hint {
4355 typedef Hint ValueType;
4356 static const CommandId kCmdId = kHint;
4357 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4359 static uint32 ComputeSize() {
4360 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4363 void SetHeader() {
4364 header.SetCmd<ValueType>();
4367 void Init(GLenum _target, GLenum _mode) {
4368 SetHeader();
4369 target = _target;
4370 mode = _mode;
4373 void* Set(void* cmd, GLenum _target, GLenum _mode) {
4374 static_cast<ValueType*>(cmd)->Init(_target, _mode);
4375 return NextCmdAddress<ValueType>(cmd);
4378 gpu::CommandHeader header;
4379 uint32 target;
4380 uint32 mode;
4383 COMPILE_ASSERT(sizeof(Hint) == 12,
4384 Sizeof_Hint_is_not_12);
4385 COMPILE_ASSERT(offsetof(Hint, header) == 0,
4386 OffsetOf_Hint_header_not_0);
4387 COMPILE_ASSERT(offsetof(Hint, target) == 4,
4388 OffsetOf_Hint_target_not_4);
4389 COMPILE_ASSERT(offsetof(Hint, mode) == 8,
4390 OffsetOf_Hint_mode_not_8);
4392 struct IsBuffer {
4393 typedef IsBuffer ValueType;
4394 static const CommandId kCmdId = kIsBuffer;
4395 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4397 typedef uint32 Result;
4399 static uint32 ComputeSize() {
4400 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4403 void SetHeader() {
4404 header.SetCmd<ValueType>();
4407 void Init(GLuint _buffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
4408 SetHeader();
4409 buffer = _buffer;
4410 result_shm_id = _result_shm_id;
4411 result_shm_offset = _result_shm_offset;
4414 void* Set(
4415 void* cmd, GLuint _buffer, uint32 _result_shm_id,
4416 uint32 _result_shm_offset) {
4417 static_cast<ValueType*>(
4418 cmd)->Init(_buffer, _result_shm_id, _result_shm_offset);
4419 return NextCmdAddress<ValueType>(cmd);
4422 gpu::CommandHeader header;
4423 uint32 buffer;
4424 uint32 result_shm_id;
4425 uint32 result_shm_offset;
4428 COMPILE_ASSERT(sizeof(IsBuffer) == 16,
4429 Sizeof_IsBuffer_is_not_16);
4430 COMPILE_ASSERT(offsetof(IsBuffer, header) == 0,
4431 OffsetOf_IsBuffer_header_not_0);
4432 COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4,
4433 OffsetOf_IsBuffer_buffer_not_4);
4434 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8,
4435 OffsetOf_IsBuffer_result_shm_id_not_8);
4436 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12,
4437 OffsetOf_IsBuffer_result_shm_offset_not_12);
4439 struct IsEnabled {
4440 typedef IsEnabled ValueType;
4441 static const CommandId kCmdId = kIsEnabled;
4442 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4444 typedef uint32 Result;
4446 static uint32 ComputeSize() {
4447 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4450 void SetHeader() {
4451 header.SetCmd<ValueType>();
4454 void Init(GLenum _cap, uint32 _result_shm_id, uint32 _result_shm_offset) {
4455 SetHeader();
4456 cap = _cap;
4457 result_shm_id = _result_shm_id;
4458 result_shm_offset = _result_shm_offset;
4461 void* Set(
4462 void* cmd, GLenum _cap, uint32 _result_shm_id,
4463 uint32 _result_shm_offset) {
4464 static_cast<ValueType*>(
4465 cmd)->Init(_cap, _result_shm_id, _result_shm_offset);
4466 return NextCmdAddress<ValueType>(cmd);
4469 gpu::CommandHeader header;
4470 uint32 cap;
4471 uint32 result_shm_id;
4472 uint32 result_shm_offset;
4475 COMPILE_ASSERT(sizeof(IsEnabled) == 16,
4476 Sizeof_IsEnabled_is_not_16);
4477 COMPILE_ASSERT(offsetof(IsEnabled, header) == 0,
4478 OffsetOf_IsEnabled_header_not_0);
4479 COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4,
4480 OffsetOf_IsEnabled_cap_not_4);
4481 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8,
4482 OffsetOf_IsEnabled_result_shm_id_not_8);
4483 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12,
4484 OffsetOf_IsEnabled_result_shm_offset_not_12);
4486 struct IsFramebuffer {
4487 typedef IsFramebuffer ValueType;
4488 static const CommandId kCmdId = kIsFramebuffer;
4489 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4491 typedef uint32 Result;
4493 static uint32 ComputeSize() {
4494 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4497 void SetHeader() {
4498 header.SetCmd<ValueType>();
4501 void Init(
4502 GLuint _framebuffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
4503 SetHeader();
4504 framebuffer = _framebuffer;
4505 result_shm_id = _result_shm_id;
4506 result_shm_offset = _result_shm_offset;
4509 void* Set(
4510 void* cmd, GLuint _framebuffer, uint32 _result_shm_id,
4511 uint32 _result_shm_offset) {
4512 static_cast<ValueType*>(
4513 cmd)->Init(_framebuffer, _result_shm_id, _result_shm_offset);
4514 return NextCmdAddress<ValueType>(cmd);
4517 gpu::CommandHeader header;
4518 uint32 framebuffer;
4519 uint32 result_shm_id;
4520 uint32 result_shm_offset;
4523 COMPILE_ASSERT(sizeof(IsFramebuffer) == 16,
4524 Sizeof_IsFramebuffer_is_not_16);
4525 COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0,
4526 OffsetOf_IsFramebuffer_header_not_0);
4527 COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4,
4528 OffsetOf_IsFramebuffer_framebuffer_not_4);
4529 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_id) == 8,
4530 OffsetOf_IsFramebuffer_result_shm_id_not_8);
4531 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_offset) == 12,
4532 OffsetOf_IsFramebuffer_result_shm_offset_not_12);
4534 struct IsProgram {
4535 typedef IsProgram ValueType;
4536 static const CommandId kCmdId = kIsProgram;
4537 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4539 typedef uint32 Result;
4541 static uint32 ComputeSize() {
4542 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4545 void SetHeader() {
4546 header.SetCmd<ValueType>();
4549 void Init(
4550 GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset) {
4551 SetHeader();
4552 program = _program;
4553 result_shm_id = _result_shm_id;
4554 result_shm_offset = _result_shm_offset;
4557 void* Set(
4558 void* cmd, GLuint _program, uint32 _result_shm_id,
4559 uint32 _result_shm_offset) {
4560 static_cast<ValueType*>(
4561 cmd)->Init(_program, _result_shm_id, _result_shm_offset);
4562 return NextCmdAddress<ValueType>(cmd);
4565 gpu::CommandHeader header;
4566 uint32 program;
4567 uint32 result_shm_id;
4568 uint32 result_shm_offset;
4571 COMPILE_ASSERT(sizeof(IsProgram) == 16,
4572 Sizeof_IsProgram_is_not_16);
4573 COMPILE_ASSERT(offsetof(IsProgram, header) == 0,
4574 OffsetOf_IsProgram_header_not_0);
4575 COMPILE_ASSERT(offsetof(IsProgram, program) == 4,
4576 OffsetOf_IsProgram_program_not_4);
4577 COMPILE_ASSERT(offsetof(IsProgram, result_shm_id) == 8,
4578 OffsetOf_IsProgram_result_shm_id_not_8);
4579 COMPILE_ASSERT(offsetof(IsProgram, result_shm_offset) == 12,
4580 OffsetOf_IsProgram_result_shm_offset_not_12);
4582 struct IsRenderbuffer {
4583 typedef IsRenderbuffer ValueType;
4584 static const CommandId kCmdId = kIsRenderbuffer;
4585 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4587 typedef uint32 Result;
4589 static uint32 ComputeSize() {
4590 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4593 void SetHeader() {
4594 header.SetCmd<ValueType>();
4597 void Init(
4598 GLuint _renderbuffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
4599 SetHeader();
4600 renderbuffer = _renderbuffer;
4601 result_shm_id = _result_shm_id;
4602 result_shm_offset = _result_shm_offset;
4605 void* Set(
4606 void* cmd, GLuint _renderbuffer, uint32 _result_shm_id,
4607 uint32 _result_shm_offset) {
4608 static_cast<ValueType*>(
4609 cmd)->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
4610 return NextCmdAddress<ValueType>(cmd);
4613 gpu::CommandHeader header;
4614 uint32 renderbuffer;
4615 uint32 result_shm_id;
4616 uint32 result_shm_offset;
4619 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16,
4620 Sizeof_IsRenderbuffer_is_not_16);
4621 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0,
4622 OffsetOf_IsRenderbuffer_header_not_0);
4623 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4,
4624 OffsetOf_IsRenderbuffer_renderbuffer_not_4);
4625 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8,
4626 OffsetOf_IsRenderbuffer_result_shm_id_not_8);
4627 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12,
4628 OffsetOf_IsRenderbuffer_result_shm_offset_not_12);
4630 struct IsShader {
4631 typedef IsShader ValueType;
4632 static const CommandId kCmdId = kIsShader;
4633 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4635 typedef uint32 Result;
4637 static uint32 ComputeSize() {
4638 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4641 void SetHeader() {
4642 header.SetCmd<ValueType>();
4645 void Init(GLuint _shader, uint32 _result_shm_id, uint32 _result_shm_offset) {
4646 SetHeader();
4647 shader = _shader;
4648 result_shm_id = _result_shm_id;
4649 result_shm_offset = _result_shm_offset;
4652 void* Set(
4653 void* cmd, GLuint _shader, uint32 _result_shm_id,
4654 uint32 _result_shm_offset) {
4655 static_cast<ValueType*>(
4656 cmd)->Init(_shader, _result_shm_id, _result_shm_offset);
4657 return NextCmdAddress<ValueType>(cmd);
4660 gpu::CommandHeader header;
4661 uint32 shader;
4662 uint32 result_shm_id;
4663 uint32 result_shm_offset;
4666 COMPILE_ASSERT(sizeof(IsShader) == 16,
4667 Sizeof_IsShader_is_not_16);
4668 COMPILE_ASSERT(offsetof(IsShader, header) == 0,
4669 OffsetOf_IsShader_header_not_0);
4670 COMPILE_ASSERT(offsetof(IsShader, shader) == 4,
4671 OffsetOf_IsShader_shader_not_4);
4672 COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8,
4673 OffsetOf_IsShader_result_shm_id_not_8);
4674 COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12,
4675 OffsetOf_IsShader_result_shm_offset_not_12);
4677 struct IsTexture {
4678 typedef IsTexture ValueType;
4679 static const CommandId kCmdId = kIsTexture;
4680 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4682 typedef uint32 Result;
4684 static uint32 ComputeSize() {
4685 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4688 void SetHeader() {
4689 header.SetCmd<ValueType>();
4692 void Init(
4693 GLuint _texture, uint32 _result_shm_id, uint32 _result_shm_offset) {
4694 SetHeader();
4695 texture = _texture;
4696 result_shm_id = _result_shm_id;
4697 result_shm_offset = _result_shm_offset;
4700 void* Set(
4701 void* cmd, GLuint _texture, uint32 _result_shm_id,
4702 uint32 _result_shm_offset) {
4703 static_cast<ValueType*>(
4704 cmd)->Init(_texture, _result_shm_id, _result_shm_offset);
4705 return NextCmdAddress<ValueType>(cmd);
4708 gpu::CommandHeader header;
4709 uint32 texture;
4710 uint32 result_shm_id;
4711 uint32 result_shm_offset;
4714 COMPILE_ASSERT(sizeof(IsTexture) == 16,
4715 Sizeof_IsTexture_is_not_16);
4716 COMPILE_ASSERT(offsetof(IsTexture, header) == 0,
4717 OffsetOf_IsTexture_header_not_0);
4718 COMPILE_ASSERT(offsetof(IsTexture, texture) == 4,
4719 OffsetOf_IsTexture_texture_not_4);
4720 COMPILE_ASSERT(offsetof(IsTexture, result_shm_id) == 8,
4721 OffsetOf_IsTexture_result_shm_id_not_8);
4722 COMPILE_ASSERT(offsetof(IsTexture, result_shm_offset) == 12,
4723 OffsetOf_IsTexture_result_shm_offset_not_12);
4725 struct LineWidth {
4726 typedef LineWidth ValueType;
4727 static const CommandId kCmdId = kLineWidth;
4728 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4730 static uint32 ComputeSize() {
4731 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4734 void SetHeader() {
4735 header.SetCmd<ValueType>();
4738 void Init(GLfloat _width) {
4739 SetHeader();
4740 width = _width;
4743 void* Set(void* cmd, GLfloat _width) {
4744 static_cast<ValueType*>(cmd)->Init(_width);
4745 return NextCmdAddress<ValueType>(cmd);
4748 gpu::CommandHeader header;
4749 float width;
4752 COMPILE_ASSERT(sizeof(LineWidth) == 8,
4753 Sizeof_LineWidth_is_not_8);
4754 COMPILE_ASSERT(offsetof(LineWidth, header) == 0,
4755 OffsetOf_LineWidth_header_not_0);
4756 COMPILE_ASSERT(offsetof(LineWidth, width) == 4,
4757 OffsetOf_LineWidth_width_not_4);
4759 struct LinkProgram {
4760 typedef LinkProgram ValueType;
4761 static const CommandId kCmdId = kLinkProgram;
4762 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4764 static uint32 ComputeSize() {
4765 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4768 void SetHeader() {
4769 header.SetCmd<ValueType>();
4772 void Init(GLuint _program) {
4773 SetHeader();
4774 program = _program;
4777 void* Set(void* cmd, GLuint _program) {
4778 static_cast<ValueType*>(cmd)->Init(_program);
4779 return NextCmdAddress<ValueType>(cmd);
4782 gpu::CommandHeader header;
4783 uint32 program;
4786 COMPILE_ASSERT(sizeof(LinkProgram) == 8,
4787 Sizeof_LinkProgram_is_not_8);
4788 COMPILE_ASSERT(offsetof(LinkProgram, header) == 0,
4789 OffsetOf_LinkProgram_header_not_0);
4790 COMPILE_ASSERT(offsetof(LinkProgram, program) == 4,
4791 OffsetOf_LinkProgram_program_not_4);
4793 struct PixelStorei {
4794 typedef PixelStorei ValueType;
4795 static const CommandId kCmdId = kPixelStorei;
4796 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4798 static uint32 ComputeSize() {
4799 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4802 void SetHeader() {
4803 header.SetCmd<ValueType>();
4806 void Init(GLenum _pname, GLint _param) {
4807 SetHeader();
4808 pname = _pname;
4809 param = _param;
4812 void* Set(void* cmd, GLenum _pname, GLint _param) {
4813 static_cast<ValueType*>(cmd)->Init(_pname, _param);
4814 return NextCmdAddress<ValueType>(cmd);
4817 gpu::CommandHeader header;
4818 uint32 pname;
4819 int32 param;
4822 COMPILE_ASSERT(sizeof(PixelStorei) == 12,
4823 Sizeof_PixelStorei_is_not_12);
4824 COMPILE_ASSERT(offsetof(PixelStorei, header) == 0,
4825 OffsetOf_PixelStorei_header_not_0);
4826 COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4,
4827 OffsetOf_PixelStorei_pname_not_4);
4828 COMPILE_ASSERT(offsetof(PixelStorei, param) == 8,
4829 OffsetOf_PixelStorei_param_not_8);
4831 struct PolygonOffset {
4832 typedef PolygonOffset ValueType;
4833 static const CommandId kCmdId = kPolygonOffset;
4834 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4836 static uint32 ComputeSize() {
4837 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4840 void SetHeader() {
4841 header.SetCmd<ValueType>();
4844 void Init(GLfloat _factor, GLfloat _units) {
4845 SetHeader();
4846 factor = _factor;
4847 units = _units;
4850 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
4851 static_cast<ValueType*>(cmd)->Init(_factor, _units);
4852 return NextCmdAddress<ValueType>(cmd);
4855 gpu::CommandHeader header;
4856 float factor;
4857 float units;
4860 COMPILE_ASSERT(sizeof(PolygonOffset) == 12,
4861 Sizeof_PolygonOffset_is_not_12);
4862 COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0,
4863 OffsetOf_PolygonOffset_header_not_0);
4864 COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4,
4865 OffsetOf_PolygonOffset_factor_not_4);
4866 COMPILE_ASSERT(offsetof(PolygonOffset, units) == 8,
4867 OffsetOf_PolygonOffset_units_not_8);
4869 // ReadPixels has the result separated from the pixel buffer so that
4870 // it is easier to specify the result going to some specific place
4871 // that exactly fits the rectangle of pixels.
4872 struct ReadPixels {
4873 typedef ReadPixels ValueType;
4874 static const CommandId kCmdId = kReadPixels;
4875 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4877 typedef uint32 Result;
4879 static uint32 ComputeSize() {
4880 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4883 void SetHeader() {
4884 header.SetCmd<ValueType>();
4887 void Init(
4888 GLint _x, GLint _y, GLsizei _width, GLsizei _height, GLenum _format,
4889 GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset,
4890 uint32 _result_shm_id, uint32 _result_shm_offset, GLboolean _async) {
4891 SetHeader();
4892 x = _x;
4893 y = _y;
4894 width = _width;
4895 height = _height;
4896 format = _format;
4897 type = _type;
4898 pixels_shm_id = _pixels_shm_id;
4899 pixels_shm_offset = _pixels_shm_offset;
4900 result_shm_id = _result_shm_id;
4901 result_shm_offset = _result_shm_offset;
4902 async = _async;
4905 void* Set(
4906 void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height,
4907 GLenum _format, GLenum _type, uint32 _pixels_shm_id,
4908 uint32 _pixels_shm_offset, uint32 _result_shm_id,
4909 uint32 _result_shm_offset, GLboolean _async) {
4910 static_cast<ValueType*>(
4911 cmd)->Init(
4912 _x, _y, _width, _height, _format, _type, _pixels_shm_id,
4913 _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
4914 return NextCmdAddress<ValueType>(cmd);
4917 gpu::CommandHeader header;
4918 int32 x;
4919 int32 y;
4920 int32 width;
4921 int32 height;
4922 uint32 format;
4923 uint32 type;
4924 uint32 pixels_shm_id;
4925 uint32 pixels_shm_offset;
4926 uint32 result_shm_id;
4927 uint32 result_shm_offset;
4928 uint32 async;
4931 COMPILE_ASSERT(sizeof(ReadPixels) == 48,
4932 Sizeof_ReadPixels_is_not_48);
4933 COMPILE_ASSERT(offsetof(ReadPixels, header) == 0,
4934 OffsetOf_ReadPixels_header_not_0);
4935 COMPILE_ASSERT(offsetof(ReadPixels, x) == 4,
4936 OffsetOf_ReadPixels_x_not_4);
4937 COMPILE_ASSERT(offsetof(ReadPixels, y) == 8,
4938 OffsetOf_ReadPixels_y_not_8);
4939 COMPILE_ASSERT(offsetof(ReadPixels, width) == 12,
4940 OffsetOf_ReadPixels_width_not_12);
4941 COMPILE_ASSERT(offsetof(ReadPixels, height) == 16,
4942 OffsetOf_ReadPixels_height_not_16);
4943 COMPILE_ASSERT(offsetof(ReadPixels, format) == 20,
4944 OffsetOf_ReadPixels_format_not_20);
4945 COMPILE_ASSERT(offsetof(ReadPixels, type) == 24,
4946 OffsetOf_ReadPixels_type_not_24);
4947 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_id) == 28,
4948 OffsetOf_ReadPixels_pixels_shm_id_not_28);
4949 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_offset) == 32,
4950 OffsetOf_ReadPixels_pixels_shm_offset_not_32);
4951 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_id) == 36,
4952 OffsetOf_ReadPixels_result_shm_id_not_36);
4953 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_offset) == 40,
4954 OffsetOf_ReadPixels_result_shm_offset_not_40);
4955 COMPILE_ASSERT(offsetof(ReadPixels, async) == 44,
4956 OffsetOf_ReadPixels_async_not_44);
4958 struct ReleaseShaderCompiler {
4959 typedef ReleaseShaderCompiler ValueType;
4960 static const CommandId kCmdId = kReleaseShaderCompiler;
4961 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4963 static uint32 ComputeSize() {
4964 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4967 void SetHeader() {
4968 header.SetCmd<ValueType>();
4971 void Init() {
4972 SetHeader();
4975 void* Set(void* cmd) {
4976 static_cast<ValueType*>(cmd)->Init();
4977 return NextCmdAddress<ValueType>(cmd);
4980 gpu::CommandHeader header;
4983 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler) == 4,
4984 Sizeof_ReleaseShaderCompiler_is_not_4);
4985 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler, header) == 0,
4986 OffsetOf_ReleaseShaderCompiler_header_not_0);
4988 struct RenderbufferStorage {
4989 typedef RenderbufferStorage ValueType;
4990 static const CommandId kCmdId = kRenderbufferStorage;
4991 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4993 static uint32 ComputeSize() {
4994 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4997 void SetHeader() {
4998 header.SetCmd<ValueType>();
5001 void Init(
5002 GLenum _target, GLenum _internalformat, GLsizei _width,
5003 GLsizei _height) {
5004 SetHeader();
5005 target = _target;
5006 internalformat = _internalformat;
5007 width = _width;
5008 height = _height;
5011 void* Set(
5012 void* cmd, GLenum _target, GLenum _internalformat, GLsizei _width,
5013 GLsizei _height) {
5014 static_cast<ValueType*>(
5015 cmd)->Init(_target, _internalformat, _width, _height);
5016 return NextCmdAddress<ValueType>(cmd);
5019 gpu::CommandHeader header;
5020 uint32 target;
5021 uint32 internalformat;
5022 int32 width;
5023 int32 height;
5026 COMPILE_ASSERT(sizeof(RenderbufferStorage) == 20,
5027 Sizeof_RenderbufferStorage_is_not_20);
5028 COMPILE_ASSERT(offsetof(RenderbufferStorage, header) == 0,
5029 OffsetOf_RenderbufferStorage_header_not_0);
5030 COMPILE_ASSERT(offsetof(RenderbufferStorage, target) == 4,
5031 OffsetOf_RenderbufferStorage_target_not_4);
5032 COMPILE_ASSERT(offsetof(RenderbufferStorage, internalformat) == 8,
5033 OffsetOf_RenderbufferStorage_internalformat_not_8);
5034 COMPILE_ASSERT(offsetof(RenderbufferStorage, width) == 12,
5035 OffsetOf_RenderbufferStorage_width_not_12);
5036 COMPILE_ASSERT(offsetof(RenderbufferStorage, height) == 16,
5037 OffsetOf_RenderbufferStorage_height_not_16);
5039 struct SampleCoverage {
5040 typedef SampleCoverage ValueType;
5041 static const CommandId kCmdId = kSampleCoverage;
5042 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5044 static uint32 ComputeSize() {
5045 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5048 void SetHeader() {
5049 header.SetCmd<ValueType>();
5052 void Init(GLclampf _value, GLboolean _invert) {
5053 SetHeader();
5054 value = _value;
5055 invert = _invert;
5058 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
5059 static_cast<ValueType*>(cmd)->Init(_value, _invert);
5060 return NextCmdAddress<ValueType>(cmd);
5063 gpu::CommandHeader header;
5064 float value;
5065 uint32 invert;
5068 COMPILE_ASSERT(sizeof(SampleCoverage) == 12,
5069 Sizeof_SampleCoverage_is_not_12);
5070 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0,
5071 OffsetOf_SampleCoverage_header_not_0);
5072 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4,
5073 OffsetOf_SampleCoverage_value_not_4);
5074 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8,
5075 OffsetOf_SampleCoverage_invert_not_8);
5077 struct Scissor {
5078 typedef Scissor ValueType;
5079 static const CommandId kCmdId = kScissor;
5080 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5082 static uint32 ComputeSize() {
5083 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5086 void SetHeader() {
5087 header.SetCmd<ValueType>();
5090 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
5091 SetHeader();
5092 x = _x;
5093 y = _y;
5094 width = _width;
5095 height = _height;
5098 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
5099 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
5100 return NextCmdAddress<ValueType>(cmd);
5103 gpu::CommandHeader header;
5104 int32 x;
5105 int32 y;
5106 int32 width;
5107 int32 height;
5110 COMPILE_ASSERT(sizeof(Scissor) == 20,
5111 Sizeof_Scissor_is_not_20);
5112 COMPILE_ASSERT(offsetof(Scissor, header) == 0,
5113 OffsetOf_Scissor_header_not_0);
5114 COMPILE_ASSERT(offsetof(Scissor, x) == 4,
5115 OffsetOf_Scissor_x_not_4);
5116 COMPILE_ASSERT(offsetof(Scissor, y) == 8,
5117 OffsetOf_Scissor_y_not_8);
5118 COMPILE_ASSERT(offsetof(Scissor, width) == 12,
5119 OffsetOf_Scissor_width_not_12);
5120 COMPILE_ASSERT(offsetof(Scissor, height) == 16,
5121 OffsetOf_Scissor_height_not_16);
5123 struct ShaderBinary {
5124 typedef ShaderBinary ValueType;
5125 static const CommandId kCmdId = kShaderBinary;
5126 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5128 static uint32 ComputeSize() {
5129 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5132 void SetHeader() {
5133 header.SetCmd<ValueType>();
5136 void Init(
5137 GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset,
5138 GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset,
5139 GLsizei _length) {
5140 SetHeader();
5141 n = _n;
5142 shaders_shm_id = _shaders_shm_id;
5143 shaders_shm_offset = _shaders_shm_offset;
5144 binaryformat = _binaryformat;
5145 binary_shm_id = _binary_shm_id;
5146 binary_shm_offset = _binary_shm_offset;
5147 length = _length;
5150 void* Set(
5151 void* cmd, GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset,
5152 GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset,
5153 GLsizei _length) {
5154 static_cast<ValueType*>(
5155 cmd)->Init(
5156 _n, _shaders_shm_id, _shaders_shm_offset, _binaryformat,
5157 _binary_shm_id, _binary_shm_offset, _length);
5158 return NextCmdAddress<ValueType>(cmd);
5161 gpu::CommandHeader header;
5162 int32 n;
5163 uint32 shaders_shm_id;
5164 uint32 shaders_shm_offset;
5165 uint32 binaryformat;
5166 uint32 binary_shm_id;
5167 uint32 binary_shm_offset;
5168 int32 length;
5171 COMPILE_ASSERT(sizeof(ShaderBinary) == 32,
5172 Sizeof_ShaderBinary_is_not_32);
5173 COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0,
5174 OffsetOf_ShaderBinary_header_not_0);
5175 COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4,
5176 OffsetOf_ShaderBinary_n_not_4);
5177 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8,
5178 OffsetOf_ShaderBinary_shaders_shm_id_not_8);
5179 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12,
5180 OffsetOf_ShaderBinary_shaders_shm_offset_not_12);
5181 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16,
5182 OffsetOf_ShaderBinary_binaryformat_not_16);
5183 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20,
5184 OffsetOf_ShaderBinary_binary_shm_id_not_20);
5185 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24,
5186 OffsetOf_ShaderBinary_binary_shm_offset_not_24);
5187 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28,
5188 OffsetOf_ShaderBinary_length_not_28);
5190 struct ShaderSource {
5191 typedef ShaderSource ValueType;
5192 static const CommandId kCmdId = kShaderSource;
5193 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5195 static uint32 ComputeSize() {
5196 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5199 void SetHeader() {
5200 header.SetCmd<ValueType>();
5203 void Init(
5204 GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset,
5205 uint32 _data_size) {
5206 SetHeader();
5207 shader = _shader;
5208 data_shm_id = _data_shm_id;
5209 data_shm_offset = _data_shm_offset;
5210 data_size = _data_size;
5213 void* Set(
5214 void* cmd, GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset,
5215 uint32 _data_size) {
5216 static_cast<ValueType*>(
5217 cmd)->Init(_shader, _data_shm_id, _data_shm_offset, _data_size);
5218 return NextCmdAddress<ValueType>(cmd);
5221 gpu::CommandHeader header;
5222 uint32 shader;
5223 uint32 data_shm_id;
5224 uint32 data_shm_offset;
5225 uint32 data_size;
5228 COMPILE_ASSERT(sizeof(ShaderSource) == 20,
5229 Sizeof_ShaderSource_is_not_20);
5230 COMPILE_ASSERT(offsetof(ShaderSource, header) == 0,
5231 OffsetOf_ShaderSource_header_not_0);
5232 COMPILE_ASSERT(offsetof(ShaderSource, shader) == 4,
5233 OffsetOf_ShaderSource_shader_not_4);
5234 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_id) == 8,
5235 OffsetOf_ShaderSource_data_shm_id_not_8);
5236 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_offset) == 12,
5237 OffsetOf_ShaderSource_data_shm_offset_not_12);
5238 COMPILE_ASSERT(offsetof(ShaderSource, data_size) == 16,
5239 OffsetOf_ShaderSource_data_size_not_16);
5241 struct ShaderSourceImmediate {
5242 typedef ShaderSourceImmediate ValueType;
5243 static const CommandId kCmdId = kShaderSourceImmediate;
5244 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5246 static uint32 ComputeSize(uint32 size_in_bytes) {
5247 return static_cast<uint32>(
5248 sizeof(ValueType) + // NOLINT
5249 RoundSizeToMultipleOfEntries(size_in_bytes));
5252 void SetHeader(uint32 size_in_bytes) {
5253 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
5256 void Init(GLuint _shader, uint32 _data_size) {
5257 uint32 total_size = ComputeSize(_data_size);
5258 SetHeader(total_size);
5259 shader = _shader;
5260 data_size = _data_size;
5263 void* Set(void* cmd, GLuint _shader, uint32 _data_size) {
5264 uint32 total_size = ComputeSize(_data_size);
5265 static_cast<ValueType*>(cmd)->Init(_shader, _data_size);
5266 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
5269 gpu::CommandHeader header;
5270 uint32 shader;
5271 uint32 data_size;
5274 COMPILE_ASSERT(sizeof(ShaderSourceImmediate) == 12,
5275 Sizeof_ShaderSourceImmediate_is_not_12);
5276 COMPILE_ASSERT(offsetof(ShaderSourceImmediate, header) == 0,
5277 OffsetOf_ShaderSourceImmediate_header_not_0);
5278 COMPILE_ASSERT(offsetof(ShaderSourceImmediate, shader) == 4,
5279 OffsetOf_ShaderSourceImmediate_shader_not_4);
5280 COMPILE_ASSERT(offsetof(ShaderSourceImmediate, data_size) == 8,
5281 OffsetOf_ShaderSourceImmediate_data_size_not_8);
5283 struct ShaderSourceBucket {
5284 typedef ShaderSourceBucket ValueType;
5285 static const CommandId kCmdId = kShaderSourceBucket;
5286 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5288 static uint32 ComputeSize() {
5289 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5292 void SetHeader() {
5293 header.SetCmd<ValueType>();
5296 void Init(GLuint _shader, uint32 _data_bucket_id) {
5297 SetHeader();
5298 shader = _shader;
5299 data_bucket_id = _data_bucket_id;
5302 void* Set(void* cmd, GLuint _shader, uint32 _data_bucket_id) {
5303 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id);
5304 return NextCmdAddress<ValueType>(cmd);
5307 gpu::CommandHeader header;
5308 uint32 shader;
5309 uint32 data_bucket_id;
5312 COMPILE_ASSERT(sizeof(ShaderSourceBucket) == 12,
5313 Sizeof_ShaderSourceBucket_is_not_12);
5314 COMPILE_ASSERT(offsetof(ShaderSourceBucket, header) == 0,
5315 OffsetOf_ShaderSourceBucket_header_not_0);
5316 COMPILE_ASSERT(offsetof(ShaderSourceBucket, shader) == 4,
5317 OffsetOf_ShaderSourceBucket_shader_not_4);
5318 COMPILE_ASSERT(offsetof(ShaderSourceBucket, data_bucket_id) == 8,
5319 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8);
5321 struct StencilFunc {
5322 typedef StencilFunc ValueType;
5323 static const CommandId kCmdId = kStencilFunc;
5324 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5326 static uint32 ComputeSize() {
5327 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5330 void SetHeader() {
5331 header.SetCmd<ValueType>();
5334 void Init(GLenum _func, GLint _ref, GLuint _mask) {
5335 SetHeader();
5336 func = _func;
5337 ref = _ref;
5338 mask = _mask;
5341 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
5342 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
5343 return NextCmdAddress<ValueType>(cmd);
5346 gpu::CommandHeader header;
5347 uint32 func;
5348 int32 ref;
5349 uint32 mask;
5352 COMPILE_ASSERT(sizeof(StencilFunc) == 16,
5353 Sizeof_StencilFunc_is_not_16);
5354 COMPILE_ASSERT(offsetof(StencilFunc, header) == 0,
5355 OffsetOf_StencilFunc_header_not_0);
5356 COMPILE_ASSERT(offsetof(StencilFunc, func) == 4,
5357 OffsetOf_StencilFunc_func_not_4);
5358 COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8,
5359 OffsetOf_StencilFunc_ref_not_8);
5360 COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12,
5361 OffsetOf_StencilFunc_mask_not_12);
5363 struct StencilFuncSeparate {
5364 typedef StencilFuncSeparate ValueType;
5365 static const CommandId kCmdId = kStencilFuncSeparate;
5366 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5368 static uint32 ComputeSize() {
5369 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5372 void SetHeader() {
5373 header.SetCmd<ValueType>();
5376 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
5377 SetHeader();
5378 face = _face;
5379 func = _func;
5380 ref = _ref;
5381 mask = _mask;
5384 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
5385 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
5386 return NextCmdAddress<ValueType>(cmd);
5389 gpu::CommandHeader header;
5390 uint32 face;
5391 uint32 func;
5392 int32 ref;
5393 uint32 mask;
5396 COMPILE_ASSERT(sizeof(StencilFuncSeparate) == 20,
5397 Sizeof_StencilFuncSeparate_is_not_20);
5398 COMPILE_ASSERT(offsetof(StencilFuncSeparate, header) == 0,
5399 OffsetOf_StencilFuncSeparate_header_not_0);
5400 COMPILE_ASSERT(offsetof(StencilFuncSeparate, face) == 4,
5401 OffsetOf_StencilFuncSeparate_face_not_4);
5402 COMPILE_ASSERT(offsetof(StencilFuncSeparate, func) == 8,
5403 OffsetOf_StencilFuncSeparate_func_not_8);
5404 COMPILE_ASSERT(offsetof(StencilFuncSeparate, ref) == 12,
5405 OffsetOf_StencilFuncSeparate_ref_not_12);
5406 COMPILE_ASSERT(offsetof(StencilFuncSeparate, mask) == 16,
5407 OffsetOf_StencilFuncSeparate_mask_not_16);
5409 struct StencilMask {
5410 typedef StencilMask ValueType;
5411 static const CommandId kCmdId = kStencilMask;
5412 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5414 static uint32 ComputeSize() {
5415 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5418 void SetHeader() {
5419 header.SetCmd<ValueType>();
5422 void Init(GLuint _mask) {
5423 SetHeader();
5424 mask = _mask;
5427 void* Set(void* cmd, GLuint _mask) {
5428 static_cast<ValueType*>(cmd)->Init(_mask);
5429 return NextCmdAddress<ValueType>(cmd);
5432 gpu::CommandHeader header;
5433 uint32 mask;
5436 COMPILE_ASSERT(sizeof(StencilMask) == 8,
5437 Sizeof_StencilMask_is_not_8);
5438 COMPILE_ASSERT(offsetof(StencilMask, header) == 0,
5439 OffsetOf_StencilMask_header_not_0);
5440 COMPILE_ASSERT(offsetof(StencilMask, mask) == 4,
5441 OffsetOf_StencilMask_mask_not_4);
5443 struct StencilMaskSeparate {
5444 typedef StencilMaskSeparate ValueType;
5445 static const CommandId kCmdId = kStencilMaskSeparate;
5446 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5448 static uint32 ComputeSize() {
5449 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5452 void SetHeader() {
5453 header.SetCmd<ValueType>();
5456 void Init(GLenum _face, GLuint _mask) {
5457 SetHeader();
5458 face = _face;
5459 mask = _mask;
5462 void* Set(void* cmd, GLenum _face, GLuint _mask) {
5463 static_cast<ValueType*>(cmd)->Init(_face, _mask);
5464 return NextCmdAddress<ValueType>(cmd);
5467 gpu::CommandHeader header;
5468 uint32 face;
5469 uint32 mask;
5472 COMPILE_ASSERT(sizeof(StencilMaskSeparate) == 12,
5473 Sizeof_StencilMaskSeparate_is_not_12);
5474 COMPILE_ASSERT(offsetof(StencilMaskSeparate, header) == 0,
5475 OffsetOf_StencilMaskSeparate_header_not_0);
5476 COMPILE_ASSERT(offsetof(StencilMaskSeparate, face) == 4,
5477 OffsetOf_StencilMaskSeparate_face_not_4);
5478 COMPILE_ASSERT(offsetof(StencilMaskSeparate, mask) == 8,
5479 OffsetOf_StencilMaskSeparate_mask_not_8);
5481 struct StencilOp {
5482 typedef StencilOp ValueType;
5483 static const CommandId kCmdId = kStencilOp;
5484 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5486 static uint32 ComputeSize() {
5487 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5490 void SetHeader() {
5491 header.SetCmd<ValueType>();
5494 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
5495 SetHeader();
5496 fail = _fail;
5497 zfail = _zfail;
5498 zpass = _zpass;
5501 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
5502 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
5503 return NextCmdAddress<ValueType>(cmd);
5506 gpu::CommandHeader header;
5507 uint32 fail;
5508 uint32 zfail;
5509 uint32 zpass;
5512 COMPILE_ASSERT(sizeof(StencilOp) == 16,
5513 Sizeof_StencilOp_is_not_16);
5514 COMPILE_ASSERT(offsetof(StencilOp, header) == 0,
5515 OffsetOf_StencilOp_header_not_0);
5516 COMPILE_ASSERT(offsetof(StencilOp, fail) == 4,
5517 OffsetOf_StencilOp_fail_not_4);
5518 COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8,
5519 OffsetOf_StencilOp_zfail_not_8);
5520 COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12,
5521 OffsetOf_StencilOp_zpass_not_12);
5523 struct StencilOpSeparate {
5524 typedef StencilOpSeparate ValueType;
5525 static const CommandId kCmdId = kStencilOpSeparate;
5526 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5528 static uint32 ComputeSize() {
5529 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5532 void SetHeader() {
5533 header.SetCmd<ValueType>();
5536 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
5537 SetHeader();
5538 face = _face;
5539 fail = _fail;
5540 zfail = _zfail;
5541 zpass = _zpass;
5544 void* Set(
5545 void* cmd, GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
5546 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
5547 return NextCmdAddress<ValueType>(cmd);
5550 gpu::CommandHeader header;
5551 uint32 face;
5552 uint32 fail;
5553 uint32 zfail;
5554 uint32 zpass;
5557 COMPILE_ASSERT(sizeof(StencilOpSeparate) == 20,
5558 Sizeof_StencilOpSeparate_is_not_20);
5559 COMPILE_ASSERT(offsetof(StencilOpSeparate, header) == 0,
5560 OffsetOf_StencilOpSeparate_header_not_0);
5561 COMPILE_ASSERT(offsetof(StencilOpSeparate, face) == 4,
5562 OffsetOf_StencilOpSeparate_face_not_4);
5563 COMPILE_ASSERT(offsetof(StencilOpSeparate, fail) == 8,
5564 OffsetOf_StencilOpSeparate_fail_not_8);
5565 COMPILE_ASSERT(offsetof(StencilOpSeparate, zfail) == 12,
5566 OffsetOf_StencilOpSeparate_zfail_not_12);
5567 COMPILE_ASSERT(offsetof(StencilOpSeparate, zpass) == 16,
5568 OffsetOf_StencilOpSeparate_zpass_not_16);
5570 struct TexImage2D {
5571 typedef TexImage2D ValueType;
5572 static const CommandId kCmdId = kTexImage2D;
5573 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5575 static uint32 ComputeSize() {
5576 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5579 void SetHeader() {
5580 header.SetCmd<ValueType>();
5583 void Init(
5584 GLenum _target, GLint _level, GLint _internalformat, GLsizei _width,
5585 GLsizei _height, GLint _border, GLenum _format, GLenum _type,
5586 uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
5587 SetHeader();
5588 target = _target;
5589 level = _level;
5590 internalformat = _internalformat;
5591 width = _width;
5592 height = _height;
5593 border = _border;
5594 format = _format;
5595 type = _type;
5596 pixels_shm_id = _pixels_shm_id;
5597 pixels_shm_offset = _pixels_shm_offset;
5600 void* Set(
5601 void* cmd, GLenum _target, GLint _level, GLint _internalformat,
5602 GLsizei _width, GLsizei _height, GLint _border, GLenum _format,
5603 GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
5604 static_cast<ValueType*>(
5605 cmd)->Init(
5606 _target, _level, _internalformat, _width, _height, _border, _format,
5607 _type, _pixels_shm_id, _pixels_shm_offset);
5608 return NextCmdAddress<ValueType>(cmd);
5611 gpu::CommandHeader header;
5612 uint32 target;
5613 int32 level;
5614 int32 internalformat;
5615 int32 width;
5616 int32 height;
5617 int32 border;
5618 uint32 format;
5619 uint32 type;
5620 uint32 pixels_shm_id;
5621 uint32 pixels_shm_offset;
5624 COMPILE_ASSERT(sizeof(TexImage2D) == 44,
5625 Sizeof_TexImage2D_is_not_44);
5626 COMPILE_ASSERT(offsetof(TexImage2D, header) == 0,
5627 OffsetOf_TexImage2D_header_not_0);
5628 COMPILE_ASSERT(offsetof(TexImage2D, target) == 4,
5629 OffsetOf_TexImage2D_target_not_4);
5630 COMPILE_ASSERT(offsetof(TexImage2D, level) == 8,
5631 OffsetOf_TexImage2D_level_not_8);
5632 COMPILE_ASSERT(offsetof(TexImage2D, internalformat) == 12,
5633 OffsetOf_TexImage2D_internalformat_not_12);
5634 COMPILE_ASSERT(offsetof(TexImage2D, width) == 16,
5635 OffsetOf_TexImage2D_width_not_16);
5636 COMPILE_ASSERT(offsetof(TexImage2D, height) == 20,
5637 OffsetOf_TexImage2D_height_not_20);
5638 COMPILE_ASSERT(offsetof(TexImage2D, border) == 24,
5639 OffsetOf_TexImage2D_border_not_24);
5640 COMPILE_ASSERT(offsetof(TexImage2D, format) == 28,
5641 OffsetOf_TexImage2D_format_not_28);
5642 COMPILE_ASSERT(offsetof(TexImage2D, type) == 32,
5643 OffsetOf_TexImage2D_type_not_32);
5644 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 36,
5645 OffsetOf_TexImage2D_pixels_shm_id_not_36);
5646 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 40,
5647 OffsetOf_TexImage2D_pixels_shm_offset_not_40);
5649 struct TexImage2DImmediate {
5650 typedef TexImage2DImmediate ValueType;
5651 static const CommandId kCmdId = kTexImage2DImmediate;
5652 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5654 static uint32 ComputeSize(uint32 size_in_bytes) {
5655 return static_cast<uint32>(
5656 sizeof(ValueType) + // NOLINT
5657 RoundSizeToMultipleOfEntries(size_in_bytes));
5660 void SetHeader(uint32 size_in_bytes) {
5661 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
5664 void Init(
5665 GLenum _target, GLint _level, GLint _internalformat, GLsizei _width,
5666 GLsizei _height, GLint _border, GLenum _format, GLenum _type) {
5667 uint32 total_size = 0; // TODO(gman): get correct size.
5668 SetHeader(total_size);
5669 target = _target;
5670 level = _level;
5671 internalformat = _internalformat;
5672 width = _width;
5673 height = _height;
5674 border = _border;
5675 format = _format;
5676 type = _type;
5679 void* Set(
5680 void* cmd, GLenum _target, GLint _level, GLint _internalformat,
5681 GLsizei _width, GLsizei _height, GLint _border, GLenum _format,
5682 GLenum _type) {
5683 uint32 total_size = 0; // TODO(gman): get correct size.
5684 static_cast<ValueType*>(
5685 cmd)->Init(
5686 _target, _level, _internalformat, _width, _height, _border, _format,
5687 _type);
5688 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
5691 gpu::CommandHeader header;
5692 uint32 target;
5693 int32 level;
5694 int32 internalformat;
5695 int32 width;
5696 int32 height;
5697 int32 border;
5698 uint32 format;
5699 uint32 type;
5702 COMPILE_ASSERT(sizeof(TexImage2DImmediate) == 36,
5703 Sizeof_TexImage2DImmediate_is_not_36);
5704 COMPILE_ASSERT(offsetof(TexImage2DImmediate, header) == 0,
5705 OffsetOf_TexImage2DImmediate_header_not_0);
5706 COMPILE_ASSERT(offsetof(TexImage2DImmediate, target) == 4,
5707 OffsetOf_TexImage2DImmediate_target_not_4);
5708 COMPILE_ASSERT(offsetof(TexImage2DImmediate, level) == 8,
5709 OffsetOf_TexImage2DImmediate_level_not_8);
5710 COMPILE_ASSERT(offsetof(TexImage2DImmediate, internalformat) == 12,
5711 OffsetOf_TexImage2DImmediate_internalformat_not_12);
5712 COMPILE_ASSERT(offsetof(TexImage2DImmediate, width) == 16,
5713 OffsetOf_TexImage2DImmediate_width_not_16);
5714 COMPILE_ASSERT(offsetof(TexImage2DImmediate, height) == 20,
5715 OffsetOf_TexImage2DImmediate_height_not_20);
5716 COMPILE_ASSERT(offsetof(TexImage2DImmediate, border) == 24,
5717 OffsetOf_TexImage2DImmediate_border_not_24);
5718 COMPILE_ASSERT(offsetof(TexImage2DImmediate, format) == 28,
5719 OffsetOf_TexImage2DImmediate_format_not_28);
5720 COMPILE_ASSERT(offsetof(TexImage2DImmediate, type) == 32,
5721 OffsetOf_TexImage2DImmediate_type_not_32);
5723 struct TexParameterf {
5724 typedef TexParameterf ValueType;
5725 static const CommandId kCmdId = kTexParameterf;
5726 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5728 static uint32 ComputeSize() {
5729 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5732 void SetHeader() {
5733 header.SetCmd<ValueType>();
5736 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
5737 SetHeader();
5738 target = _target;
5739 pname = _pname;
5740 param = _param;
5743 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
5744 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
5745 return NextCmdAddress<ValueType>(cmd);
5748 gpu::CommandHeader header;
5749 uint32 target;
5750 uint32 pname;
5751 float param;
5754 COMPILE_ASSERT(sizeof(TexParameterf) == 16,
5755 Sizeof_TexParameterf_is_not_16);
5756 COMPILE_ASSERT(offsetof(TexParameterf, header) == 0,
5757 OffsetOf_TexParameterf_header_not_0);
5758 COMPILE_ASSERT(offsetof(TexParameterf, target) == 4,
5759 OffsetOf_TexParameterf_target_not_4);
5760 COMPILE_ASSERT(offsetof(TexParameterf, pname) == 8,
5761 OffsetOf_TexParameterf_pname_not_8);
5762 COMPILE_ASSERT(offsetof(TexParameterf, param) == 12,
5763 OffsetOf_TexParameterf_param_not_12);
5765 struct TexParameterfv {
5766 typedef TexParameterfv ValueType;
5767 static const CommandId kCmdId = kTexParameterfv;
5768 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5770 static uint32 ComputeSize() {
5771 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5774 void SetHeader() {
5775 header.SetCmd<ValueType>();
5778 void Init(
5779 GLenum _target, GLenum _pname, uint32 _params_shm_id,
5780 uint32 _params_shm_offset) {
5781 SetHeader();
5782 target = _target;
5783 pname = _pname;
5784 params_shm_id = _params_shm_id;
5785 params_shm_offset = _params_shm_offset;
5788 void* Set(
5789 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
5790 uint32 _params_shm_offset) {
5791 static_cast<ValueType*>(
5792 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5793 return NextCmdAddress<ValueType>(cmd);
5796 gpu::CommandHeader header;
5797 uint32 target;
5798 uint32 pname;
5799 uint32 params_shm_id;
5800 uint32 params_shm_offset;
5803 COMPILE_ASSERT(sizeof(TexParameterfv) == 20,
5804 Sizeof_TexParameterfv_is_not_20);
5805 COMPILE_ASSERT(offsetof(TexParameterfv, header) == 0,
5806 OffsetOf_TexParameterfv_header_not_0);
5807 COMPILE_ASSERT(offsetof(TexParameterfv, target) == 4,
5808 OffsetOf_TexParameterfv_target_not_4);
5809 COMPILE_ASSERT(offsetof(TexParameterfv, pname) == 8,
5810 OffsetOf_TexParameterfv_pname_not_8);
5811 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_id) == 12,
5812 OffsetOf_TexParameterfv_params_shm_id_not_12);
5813 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_offset) == 16,
5814 OffsetOf_TexParameterfv_params_shm_offset_not_16);
5816 struct TexParameterfvImmediate {
5817 typedef TexParameterfvImmediate ValueType;
5818 static const CommandId kCmdId = kTexParameterfvImmediate;
5819 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5821 static uint32 ComputeDataSize() {
5822 return static_cast<uint32>(
5823 sizeof(GLfloat) * 1); // NOLINT
5826 static uint32 ComputeSize() {
5827 return static_cast<uint32>(
5828 sizeof(ValueType) + ComputeDataSize()); // NOLINT
5831 void SetHeader() {
5832 header.SetCmdByTotalSize<ValueType>(ComputeSize());
5835 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
5836 SetHeader();
5837 target = _target;
5838 pname = _pname;
5839 memcpy(ImmediateDataAddress(this),
5840 _params, ComputeDataSize());
5843 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
5844 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
5845 const uint32 size = ComputeSize();
5846 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5849 gpu::CommandHeader header;
5850 uint32 target;
5851 uint32 pname;
5854 COMPILE_ASSERT(sizeof(TexParameterfvImmediate) == 12,
5855 Sizeof_TexParameterfvImmediate_is_not_12);
5856 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, header) == 0,
5857 OffsetOf_TexParameterfvImmediate_header_not_0);
5858 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, target) == 4,
5859 OffsetOf_TexParameterfvImmediate_target_not_4);
5860 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, pname) == 8,
5861 OffsetOf_TexParameterfvImmediate_pname_not_8);
5863 struct TexParameteri {
5864 typedef TexParameteri ValueType;
5865 static const CommandId kCmdId = kTexParameteri;
5866 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5868 static uint32 ComputeSize() {
5869 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5872 void SetHeader() {
5873 header.SetCmd<ValueType>();
5876 void Init(GLenum _target, GLenum _pname, GLint _param) {
5877 SetHeader();
5878 target = _target;
5879 pname = _pname;
5880 param = _param;
5883 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
5884 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
5885 return NextCmdAddress<ValueType>(cmd);
5888 gpu::CommandHeader header;
5889 uint32 target;
5890 uint32 pname;
5891 int32 param;
5894 COMPILE_ASSERT(sizeof(TexParameteri) == 16,
5895 Sizeof_TexParameteri_is_not_16);
5896 COMPILE_ASSERT(offsetof(TexParameteri, header) == 0,
5897 OffsetOf_TexParameteri_header_not_0);
5898 COMPILE_ASSERT(offsetof(TexParameteri, target) == 4,
5899 OffsetOf_TexParameteri_target_not_4);
5900 COMPILE_ASSERT(offsetof(TexParameteri, pname) == 8,
5901 OffsetOf_TexParameteri_pname_not_8);
5902 COMPILE_ASSERT(offsetof(TexParameteri, param) == 12,
5903 OffsetOf_TexParameteri_param_not_12);
5905 struct TexParameteriv {
5906 typedef TexParameteriv ValueType;
5907 static const CommandId kCmdId = kTexParameteriv;
5908 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5910 static uint32 ComputeSize() {
5911 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5914 void SetHeader() {
5915 header.SetCmd<ValueType>();
5918 void Init(
5919 GLenum _target, GLenum _pname, uint32 _params_shm_id,
5920 uint32 _params_shm_offset) {
5921 SetHeader();
5922 target = _target;
5923 pname = _pname;
5924 params_shm_id = _params_shm_id;
5925 params_shm_offset = _params_shm_offset;
5928 void* Set(
5929 void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
5930 uint32 _params_shm_offset) {
5931 static_cast<ValueType*>(
5932 cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5933 return NextCmdAddress<ValueType>(cmd);
5936 gpu::CommandHeader header;
5937 uint32 target;
5938 uint32 pname;
5939 uint32 params_shm_id;
5940 uint32 params_shm_offset;
5943 COMPILE_ASSERT(sizeof(TexParameteriv) == 20,
5944 Sizeof_TexParameteriv_is_not_20);
5945 COMPILE_ASSERT(offsetof(TexParameteriv, header) == 0,
5946 OffsetOf_TexParameteriv_header_not_0);
5947 COMPILE_ASSERT(offsetof(TexParameteriv, target) == 4,
5948 OffsetOf_TexParameteriv_target_not_4);
5949 COMPILE_ASSERT(offsetof(TexParameteriv, pname) == 8,
5950 OffsetOf_TexParameteriv_pname_not_8);
5951 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_id) == 12,
5952 OffsetOf_TexParameteriv_params_shm_id_not_12);
5953 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_offset) == 16,
5954 OffsetOf_TexParameteriv_params_shm_offset_not_16);
5956 struct TexParameterivImmediate {
5957 typedef TexParameterivImmediate ValueType;
5958 static const CommandId kCmdId = kTexParameterivImmediate;
5959 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5961 static uint32 ComputeDataSize() {
5962 return static_cast<uint32>(
5963 sizeof(GLint) * 1); // NOLINT
5966 static uint32 ComputeSize() {
5967 return static_cast<uint32>(
5968 sizeof(ValueType) + ComputeDataSize()); // NOLINT
5971 void SetHeader() {
5972 header.SetCmdByTotalSize<ValueType>(ComputeSize());
5975 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
5976 SetHeader();
5977 target = _target;
5978 pname = _pname;
5979 memcpy(ImmediateDataAddress(this),
5980 _params, ComputeDataSize());
5983 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
5984 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
5985 const uint32 size = ComputeSize();
5986 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5989 gpu::CommandHeader header;
5990 uint32 target;
5991 uint32 pname;
5994 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12,
5995 Sizeof_TexParameterivImmediate_is_not_12);
5996 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0,
5997 OffsetOf_TexParameterivImmediate_header_not_0);
5998 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4,
5999 OffsetOf_TexParameterivImmediate_target_not_4);
6000 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8,
6001 OffsetOf_TexParameterivImmediate_pname_not_8);
6003 struct TexSubImage2D {
6004 typedef TexSubImage2D ValueType;
6005 static const CommandId kCmdId = kTexSubImage2D;
6006 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6008 static uint32 ComputeSize() {
6009 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6012 void SetHeader() {
6013 header.SetCmd<ValueType>();
6016 void Init(
6017 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
6018 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
6019 uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) {
6020 SetHeader();
6021 target = _target;
6022 level = _level;
6023 xoffset = _xoffset;
6024 yoffset = _yoffset;
6025 width = _width;
6026 height = _height;
6027 format = _format;
6028 type = _type;
6029 pixels_shm_id = _pixels_shm_id;
6030 pixels_shm_offset = _pixels_shm_offset;
6031 internal = _internal;
6034 void* Set(
6035 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
6036 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
6037 uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) {
6038 static_cast<ValueType*>(
6039 cmd)->Init(
6040 _target, _level, _xoffset, _yoffset, _width, _height, _format,
6041 _type, _pixels_shm_id, _pixels_shm_offset, _internal);
6042 return NextCmdAddress<ValueType>(cmd);
6045 gpu::CommandHeader header;
6046 uint32 target;
6047 int32 level;
6048 int32 xoffset;
6049 int32 yoffset;
6050 int32 width;
6051 int32 height;
6052 uint32 format;
6053 uint32 type;
6054 uint32 pixels_shm_id;
6055 uint32 pixels_shm_offset;
6056 uint32 internal;
6059 COMPILE_ASSERT(sizeof(TexSubImage2D) == 48,
6060 Sizeof_TexSubImage2D_is_not_48);
6061 COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0,
6062 OffsetOf_TexSubImage2D_header_not_0);
6063 COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4,
6064 OffsetOf_TexSubImage2D_target_not_4);
6065 COMPILE_ASSERT(offsetof(TexSubImage2D, level) == 8,
6066 OffsetOf_TexSubImage2D_level_not_8);
6067 COMPILE_ASSERT(offsetof(TexSubImage2D, xoffset) == 12,
6068 OffsetOf_TexSubImage2D_xoffset_not_12);
6069 COMPILE_ASSERT(offsetof(TexSubImage2D, yoffset) == 16,
6070 OffsetOf_TexSubImage2D_yoffset_not_16);
6071 COMPILE_ASSERT(offsetof(TexSubImage2D, width) == 20,
6072 OffsetOf_TexSubImage2D_width_not_20);
6073 COMPILE_ASSERT(offsetof(TexSubImage2D, height) == 24,
6074 OffsetOf_TexSubImage2D_height_not_24);
6075 COMPILE_ASSERT(offsetof(TexSubImage2D, format) == 28,
6076 OffsetOf_TexSubImage2D_format_not_28);
6077 COMPILE_ASSERT(offsetof(TexSubImage2D, type) == 32,
6078 OffsetOf_TexSubImage2D_type_not_32);
6079 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_id) == 36,
6080 OffsetOf_TexSubImage2D_pixels_shm_id_not_36);
6081 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
6082 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40);
6083 COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44,
6084 OffsetOf_TexSubImage2D_internal_not_44);
6086 struct TexSubImage2DImmediate {
6087 typedef TexSubImage2DImmediate ValueType;
6088 static const CommandId kCmdId = kTexSubImage2DImmediate;
6089 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6091 static uint32 ComputeSize(uint32 size_in_bytes) {
6092 return static_cast<uint32>(
6093 sizeof(ValueType) + // NOLINT
6094 RoundSizeToMultipleOfEntries(size_in_bytes));
6097 void SetHeader(uint32 size_in_bytes) {
6098 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
6101 void Init(
6102 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
6103 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
6104 GLboolean _internal) {
6105 uint32 total_size = 0; // TODO(gman): get correct size.
6106 SetHeader(total_size);
6107 target = _target;
6108 level = _level;
6109 xoffset = _xoffset;
6110 yoffset = _yoffset;
6111 width = _width;
6112 height = _height;
6113 format = _format;
6114 type = _type;
6115 internal = _internal;
6118 void* Set(
6119 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
6120 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
6121 GLboolean _internal) {
6122 uint32 total_size = 0; // TODO(gman): get correct size.
6123 static_cast<ValueType*>(
6124 cmd)->Init(
6125 _target, _level, _xoffset, _yoffset, _width, _height, _format,
6126 _type, _internal);
6127 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size);
6130 gpu::CommandHeader header;
6131 uint32 target;
6132 int32 level;
6133 int32 xoffset;
6134 int32 yoffset;
6135 int32 width;
6136 int32 height;
6137 uint32 format;
6138 uint32 type;
6139 uint32 internal;
6142 COMPILE_ASSERT(sizeof(TexSubImage2DImmediate) == 40,
6143 Sizeof_TexSubImage2DImmediate_is_not_40);
6144 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, header) == 0,
6145 OffsetOf_TexSubImage2DImmediate_header_not_0);
6146 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, target) == 4,
6147 OffsetOf_TexSubImage2DImmediate_target_not_4);
6148 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, level) == 8,
6149 OffsetOf_TexSubImage2DImmediate_level_not_8);
6150 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, xoffset) == 12,
6151 OffsetOf_TexSubImage2DImmediate_xoffset_not_12);
6152 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, yoffset) == 16,
6153 OffsetOf_TexSubImage2DImmediate_yoffset_not_16);
6154 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, width) == 20,
6155 OffsetOf_TexSubImage2DImmediate_width_not_20);
6156 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, height) == 24,
6157 OffsetOf_TexSubImage2DImmediate_height_not_24);
6158 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, format) == 28,
6159 OffsetOf_TexSubImage2DImmediate_format_not_28);
6160 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, type) == 32,
6161 OffsetOf_TexSubImage2DImmediate_type_not_32);
6162 COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, internal) == 36,
6163 OffsetOf_TexSubImage2DImmediate_internal_not_36);
6165 struct Uniform1f {
6166 typedef Uniform1f ValueType;
6167 static const CommandId kCmdId = kUniform1f;
6168 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6170 static uint32 ComputeSize() {
6171 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6174 void SetHeader() {
6175 header.SetCmd<ValueType>();
6178 void Init(GLint _location, GLfloat _x) {
6179 SetHeader();
6180 location = _location;
6181 x = _x;
6184 void* Set(void* cmd, GLint _location, GLfloat _x) {
6185 static_cast<ValueType*>(cmd)->Init(_location, _x);
6186 return NextCmdAddress<ValueType>(cmd);
6189 gpu::CommandHeader header;
6190 int32 location;
6191 float x;
6194 COMPILE_ASSERT(sizeof(Uniform1f) == 12,
6195 Sizeof_Uniform1f_is_not_12);
6196 COMPILE_ASSERT(offsetof(Uniform1f, header) == 0,
6197 OffsetOf_Uniform1f_header_not_0);
6198 COMPILE_ASSERT(offsetof(Uniform1f, location) == 4,
6199 OffsetOf_Uniform1f_location_not_4);
6200 COMPILE_ASSERT(offsetof(Uniform1f, x) == 8,
6201 OffsetOf_Uniform1f_x_not_8);
6203 struct Uniform1fv {
6204 typedef Uniform1fv ValueType;
6205 static const CommandId kCmdId = kUniform1fv;
6206 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6208 static uint32 ComputeSize() {
6209 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6212 void SetHeader() {
6213 header.SetCmd<ValueType>();
6216 void Init(
6217 GLint _location, GLsizei _count, uint32 _v_shm_id,
6218 uint32 _v_shm_offset) {
6219 SetHeader();
6220 location = _location;
6221 count = _count;
6222 v_shm_id = _v_shm_id;
6223 v_shm_offset = _v_shm_offset;
6226 void* Set(
6227 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6228 uint32 _v_shm_offset) {
6229 static_cast<ValueType*>(
6230 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6231 return NextCmdAddress<ValueType>(cmd);
6234 gpu::CommandHeader header;
6235 int32 location;
6236 int32 count;
6237 uint32 v_shm_id;
6238 uint32 v_shm_offset;
6241 COMPILE_ASSERT(sizeof(Uniform1fv) == 20,
6242 Sizeof_Uniform1fv_is_not_20);
6243 COMPILE_ASSERT(offsetof(Uniform1fv, header) == 0,
6244 OffsetOf_Uniform1fv_header_not_0);
6245 COMPILE_ASSERT(offsetof(Uniform1fv, location) == 4,
6246 OffsetOf_Uniform1fv_location_not_4);
6247 COMPILE_ASSERT(offsetof(Uniform1fv, count) == 8,
6248 OffsetOf_Uniform1fv_count_not_8);
6249 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_id) == 12,
6250 OffsetOf_Uniform1fv_v_shm_id_not_12);
6251 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_offset) == 16,
6252 OffsetOf_Uniform1fv_v_shm_offset_not_16);
6254 struct Uniform1fvImmediate {
6255 typedef Uniform1fvImmediate ValueType;
6256 static const CommandId kCmdId = kUniform1fvImmediate;
6257 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6259 static uint32 ComputeDataSize(GLsizei count) {
6260 return static_cast<uint32>(
6261 sizeof(GLfloat) * 1 * count); // NOLINT
6264 static uint32 ComputeSize(GLsizei count) {
6265 return static_cast<uint32>(
6266 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6269 void SetHeader(GLsizei count) {
6270 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6273 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6274 SetHeader(_count);
6275 location = _location;
6276 count = _count;
6277 memcpy(ImmediateDataAddress(this),
6278 _v, ComputeDataSize(_count));
6281 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6282 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6283 const uint32 size = ComputeSize(_count);
6284 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6287 gpu::CommandHeader header;
6288 int32 location;
6289 int32 count;
6292 COMPILE_ASSERT(sizeof(Uniform1fvImmediate) == 12,
6293 Sizeof_Uniform1fvImmediate_is_not_12);
6294 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, header) == 0,
6295 OffsetOf_Uniform1fvImmediate_header_not_0);
6296 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, location) == 4,
6297 OffsetOf_Uniform1fvImmediate_location_not_4);
6298 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, count) == 8,
6299 OffsetOf_Uniform1fvImmediate_count_not_8);
6301 struct Uniform1i {
6302 typedef Uniform1i ValueType;
6303 static const CommandId kCmdId = kUniform1i;
6304 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6306 static uint32 ComputeSize() {
6307 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6310 void SetHeader() {
6311 header.SetCmd<ValueType>();
6314 void Init(GLint _location, GLint _x) {
6315 SetHeader();
6316 location = _location;
6317 x = _x;
6320 void* Set(void* cmd, GLint _location, GLint _x) {
6321 static_cast<ValueType*>(cmd)->Init(_location, _x);
6322 return NextCmdAddress<ValueType>(cmd);
6325 gpu::CommandHeader header;
6326 int32 location;
6327 int32 x;
6330 COMPILE_ASSERT(sizeof(Uniform1i) == 12,
6331 Sizeof_Uniform1i_is_not_12);
6332 COMPILE_ASSERT(offsetof(Uniform1i, header) == 0,
6333 OffsetOf_Uniform1i_header_not_0);
6334 COMPILE_ASSERT(offsetof(Uniform1i, location) == 4,
6335 OffsetOf_Uniform1i_location_not_4);
6336 COMPILE_ASSERT(offsetof(Uniform1i, x) == 8,
6337 OffsetOf_Uniform1i_x_not_8);
6339 struct Uniform1iv {
6340 typedef Uniform1iv ValueType;
6341 static const CommandId kCmdId = kUniform1iv;
6342 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6344 static uint32 ComputeSize() {
6345 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6348 void SetHeader() {
6349 header.SetCmd<ValueType>();
6352 void Init(
6353 GLint _location, GLsizei _count, uint32 _v_shm_id,
6354 uint32 _v_shm_offset) {
6355 SetHeader();
6356 location = _location;
6357 count = _count;
6358 v_shm_id = _v_shm_id;
6359 v_shm_offset = _v_shm_offset;
6362 void* Set(
6363 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6364 uint32 _v_shm_offset) {
6365 static_cast<ValueType*>(
6366 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6367 return NextCmdAddress<ValueType>(cmd);
6370 gpu::CommandHeader header;
6371 int32 location;
6372 int32 count;
6373 uint32 v_shm_id;
6374 uint32 v_shm_offset;
6377 COMPILE_ASSERT(sizeof(Uniform1iv) == 20,
6378 Sizeof_Uniform1iv_is_not_20);
6379 COMPILE_ASSERT(offsetof(Uniform1iv, header) == 0,
6380 OffsetOf_Uniform1iv_header_not_0);
6381 COMPILE_ASSERT(offsetof(Uniform1iv, location) == 4,
6382 OffsetOf_Uniform1iv_location_not_4);
6383 COMPILE_ASSERT(offsetof(Uniform1iv, count) == 8,
6384 OffsetOf_Uniform1iv_count_not_8);
6385 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_id) == 12,
6386 OffsetOf_Uniform1iv_v_shm_id_not_12);
6387 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_offset) == 16,
6388 OffsetOf_Uniform1iv_v_shm_offset_not_16);
6390 struct Uniform1ivImmediate {
6391 typedef Uniform1ivImmediate ValueType;
6392 static const CommandId kCmdId = kUniform1ivImmediate;
6393 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6395 static uint32 ComputeDataSize(GLsizei count) {
6396 return static_cast<uint32>(
6397 sizeof(GLint) * 1 * count); // NOLINT
6400 static uint32 ComputeSize(GLsizei count) {
6401 return static_cast<uint32>(
6402 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6405 void SetHeader(GLsizei count) {
6406 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6409 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6410 SetHeader(_count);
6411 location = _location;
6412 count = _count;
6413 memcpy(ImmediateDataAddress(this),
6414 _v, ComputeDataSize(_count));
6417 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6418 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6419 const uint32 size = ComputeSize(_count);
6420 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6423 gpu::CommandHeader header;
6424 int32 location;
6425 int32 count;
6428 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12,
6429 Sizeof_Uniform1ivImmediate_is_not_12);
6430 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0,
6431 OffsetOf_Uniform1ivImmediate_header_not_0);
6432 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4,
6433 OffsetOf_Uniform1ivImmediate_location_not_4);
6434 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8,
6435 OffsetOf_Uniform1ivImmediate_count_not_8);
6437 struct Uniform2f {
6438 typedef Uniform2f ValueType;
6439 static const CommandId kCmdId = kUniform2f;
6440 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6442 static uint32 ComputeSize() {
6443 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6446 void SetHeader() {
6447 header.SetCmd<ValueType>();
6450 void Init(GLint _location, GLfloat _x, GLfloat _y) {
6451 SetHeader();
6452 location = _location;
6453 x = _x;
6454 y = _y;
6457 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
6458 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
6459 return NextCmdAddress<ValueType>(cmd);
6462 gpu::CommandHeader header;
6463 int32 location;
6464 float x;
6465 float y;
6468 COMPILE_ASSERT(sizeof(Uniform2f) == 16,
6469 Sizeof_Uniform2f_is_not_16);
6470 COMPILE_ASSERT(offsetof(Uniform2f, header) == 0,
6471 OffsetOf_Uniform2f_header_not_0);
6472 COMPILE_ASSERT(offsetof(Uniform2f, location) == 4,
6473 OffsetOf_Uniform2f_location_not_4);
6474 COMPILE_ASSERT(offsetof(Uniform2f, x) == 8,
6475 OffsetOf_Uniform2f_x_not_8);
6476 COMPILE_ASSERT(offsetof(Uniform2f, y) == 12,
6477 OffsetOf_Uniform2f_y_not_12);
6479 struct Uniform2fv {
6480 typedef Uniform2fv ValueType;
6481 static const CommandId kCmdId = kUniform2fv;
6482 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6484 static uint32 ComputeSize() {
6485 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6488 void SetHeader() {
6489 header.SetCmd<ValueType>();
6492 void Init(
6493 GLint _location, GLsizei _count, uint32 _v_shm_id,
6494 uint32 _v_shm_offset) {
6495 SetHeader();
6496 location = _location;
6497 count = _count;
6498 v_shm_id = _v_shm_id;
6499 v_shm_offset = _v_shm_offset;
6502 void* Set(
6503 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6504 uint32 _v_shm_offset) {
6505 static_cast<ValueType*>(
6506 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6507 return NextCmdAddress<ValueType>(cmd);
6510 gpu::CommandHeader header;
6511 int32 location;
6512 int32 count;
6513 uint32 v_shm_id;
6514 uint32 v_shm_offset;
6517 COMPILE_ASSERT(sizeof(Uniform2fv) == 20,
6518 Sizeof_Uniform2fv_is_not_20);
6519 COMPILE_ASSERT(offsetof(Uniform2fv, header) == 0,
6520 OffsetOf_Uniform2fv_header_not_0);
6521 COMPILE_ASSERT(offsetof(Uniform2fv, location) == 4,
6522 OffsetOf_Uniform2fv_location_not_4);
6523 COMPILE_ASSERT(offsetof(Uniform2fv, count) == 8,
6524 OffsetOf_Uniform2fv_count_not_8);
6525 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_id) == 12,
6526 OffsetOf_Uniform2fv_v_shm_id_not_12);
6527 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_offset) == 16,
6528 OffsetOf_Uniform2fv_v_shm_offset_not_16);
6530 struct Uniform2fvImmediate {
6531 typedef Uniform2fvImmediate ValueType;
6532 static const CommandId kCmdId = kUniform2fvImmediate;
6533 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6535 static uint32 ComputeDataSize(GLsizei count) {
6536 return static_cast<uint32>(
6537 sizeof(GLfloat) * 2 * count); // NOLINT
6540 static uint32 ComputeSize(GLsizei count) {
6541 return static_cast<uint32>(
6542 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6545 void SetHeader(GLsizei count) {
6546 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6549 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6550 SetHeader(_count);
6551 location = _location;
6552 count = _count;
6553 memcpy(ImmediateDataAddress(this),
6554 _v, ComputeDataSize(_count));
6557 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6558 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6559 const uint32 size = ComputeSize(_count);
6560 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6563 gpu::CommandHeader header;
6564 int32 location;
6565 int32 count;
6568 COMPILE_ASSERT(sizeof(Uniform2fvImmediate) == 12,
6569 Sizeof_Uniform2fvImmediate_is_not_12);
6570 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, header) == 0,
6571 OffsetOf_Uniform2fvImmediate_header_not_0);
6572 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, location) == 4,
6573 OffsetOf_Uniform2fvImmediate_location_not_4);
6574 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, count) == 8,
6575 OffsetOf_Uniform2fvImmediate_count_not_8);
6577 struct Uniform2i {
6578 typedef Uniform2i ValueType;
6579 static const CommandId kCmdId = kUniform2i;
6580 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6582 static uint32 ComputeSize() {
6583 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6586 void SetHeader() {
6587 header.SetCmd<ValueType>();
6590 void Init(GLint _location, GLint _x, GLint _y) {
6591 SetHeader();
6592 location = _location;
6593 x = _x;
6594 y = _y;
6597 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
6598 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
6599 return NextCmdAddress<ValueType>(cmd);
6602 gpu::CommandHeader header;
6603 int32 location;
6604 int32 x;
6605 int32 y;
6608 COMPILE_ASSERT(sizeof(Uniform2i) == 16,
6609 Sizeof_Uniform2i_is_not_16);
6610 COMPILE_ASSERT(offsetof(Uniform2i, header) == 0,
6611 OffsetOf_Uniform2i_header_not_0);
6612 COMPILE_ASSERT(offsetof(Uniform2i, location) == 4,
6613 OffsetOf_Uniform2i_location_not_4);
6614 COMPILE_ASSERT(offsetof(Uniform2i, x) == 8,
6615 OffsetOf_Uniform2i_x_not_8);
6616 COMPILE_ASSERT(offsetof(Uniform2i, y) == 12,
6617 OffsetOf_Uniform2i_y_not_12);
6619 struct Uniform2iv {
6620 typedef Uniform2iv ValueType;
6621 static const CommandId kCmdId = kUniform2iv;
6622 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6624 static uint32 ComputeSize() {
6625 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6628 void SetHeader() {
6629 header.SetCmd<ValueType>();
6632 void Init(
6633 GLint _location, GLsizei _count, uint32 _v_shm_id,
6634 uint32 _v_shm_offset) {
6635 SetHeader();
6636 location = _location;
6637 count = _count;
6638 v_shm_id = _v_shm_id;
6639 v_shm_offset = _v_shm_offset;
6642 void* Set(
6643 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6644 uint32 _v_shm_offset) {
6645 static_cast<ValueType*>(
6646 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6647 return NextCmdAddress<ValueType>(cmd);
6650 gpu::CommandHeader header;
6651 int32 location;
6652 int32 count;
6653 uint32 v_shm_id;
6654 uint32 v_shm_offset;
6657 COMPILE_ASSERT(sizeof(Uniform2iv) == 20,
6658 Sizeof_Uniform2iv_is_not_20);
6659 COMPILE_ASSERT(offsetof(Uniform2iv, header) == 0,
6660 OffsetOf_Uniform2iv_header_not_0);
6661 COMPILE_ASSERT(offsetof(Uniform2iv, location) == 4,
6662 OffsetOf_Uniform2iv_location_not_4);
6663 COMPILE_ASSERT(offsetof(Uniform2iv, count) == 8,
6664 OffsetOf_Uniform2iv_count_not_8);
6665 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_id) == 12,
6666 OffsetOf_Uniform2iv_v_shm_id_not_12);
6667 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_offset) == 16,
6668 OffsetOf_Uniform2iv_v_shm_offset_not_16);
6670 struct Uniform2ivImmediate {
6671 typedef Uniform2ivImmediate ValueType;
6672 static const CommandId kCmdId = kUniform2ivImmediate;
6673 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6675 static uint32 ComputeDataSize(GLsizei count) {
6676 return static_cast<uint32>(
6677 sizeof(GLint) * 2 * count); // NOLINT
6680 static uint32 ComputeSize(GLsizei count) {
6681 return static_cast<uint32>(
6682 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6685 void SetHeader(GLsizei count) {
6686 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6689 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6690 SetHeader(_count);
6691 location = _location;
6692 count = _count;
6693 memcpy(ImmediateDataAddress(this),
6694 _v, ComputeDataSize(_count));
6697 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6698 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6699 const uint32 size = ComputeSize(_count);
6700 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6703 gpu::CommandHeader header;
6704 int32 location;
6705 int32 count;
6708 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12,
6709 Sizeof_Uniform2ivImmediate_is_not_12);
6710 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0,
6711 OffsetOf_Uniform2ivImmediate_header_not_0);
6712 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4,
6713 OffsetOf_Uniform2ivImmediate_location_not_4);
6714 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8,
6715 OffsetOf_Uniform2ivImmediate_count_not_8);
6717 struct Uniform3f {
6718 typedef Uniform3f ValueType;
6719 static const CommandId kCmdId = kUniform3f;
6720 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6722 static uint32 ComputeSize() {
6723 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6726 void SetHeader() {
6727 header.SetCmd<ValueType>();
6730 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
6731 SetHeader();
6732 location = _location;
6733 x = _x;
6734 y = _y;
6735 z = _z;
6738 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
6739 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
6740 return NextCmdAddress<ValueType>(cmd);
6743 gpu::CommandHeader header;
6744 int32 location;
6745 float x;
6746 float y;
6747 float z;
6750 COMPILE_ASSERT(sizeof(Uniform3f) == 20,
6751 Sizeof_Uniform3f_is_not_20);
6752 COMPILE_ASSERT(offsetof(Uniform3f, header) == 0,
6753 OffsetOf_Uniform3f_header_not_0);
6754 COMPILE_ASSERT(offsetof(Uniform3f, location) == 4,
6755 OffsetOf_Uniform3f_location_not_4);
6756 COMPILE_ASSERT(offsetof(Uniform3f, x) == 8,
6757 OffsetOf_Uniform3f_x_not_8);
6758 COMPILE_ASSERT(offsetof(Uniform3f, y) == 12,
6759 OffsetOf_Uniform3f_y_not_12);
6760 COMPILE_ASSERT(offsetof(Uniform3f, z) == 16,
6761 OffsetOf_Uniform3f_z_not_16);
6763 struct Uniform3fv {
6764 typedef Uniform3fv ValueType;
6765 static const CommandId kCmdId = kUniform3fv;
6766 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6768 static uint32 ComputeSize() {
6769 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6772 void SetHeader() {
6773 header.SetCmd<ValueType>();
6776 void Init(
6777 GLint _location, GLsizei _count, uint32 _v_shm_id,
6778 uint32 _v_shm_offset) {
6779 SetHeader();
6780 location = _location;
6781 count = _count;
6782 v_shm_id = _v_shm_id;
6783 v_shm_offset = _v_shm_offset;
6786 void* Set(
6787 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6788 uint32 _v_shm_offset) {
6789 static_cast<ValueType*>(
6790 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6791 return NextCmdAddress<ValueType>(cmd);
6794 gpu::CommandHeader header;
6795 int32 location;
6796 int32 count;
6797 uint32 v_shm_id;
6798 uint32 v_shm_offset;
6801 COMPILE_ASSERT(sizeof(Uniform3fv) == 20,
6802 Sizeof_Uniform3fv_is_not_20);
6803 COMPILE_ASSERT(offsetof(Uniform3fv, header) == 0,
6804 OffsetOf_Uniform3fv_header_not_0);
6805 COMPILE_ASSERT(offsetof(Uniform3fv, location) == 4,
6806 OffsetOf_Uniform3fv_location_not_4);
6807 COMPILE_ASSERT(offsetof(Uniform3fv, count) == 8,
6808 OffsetOf_Uniform3fv_count_not_8);
6809 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_id) == 12,
6810 OffsetOf_Uniform3fv_v_shm_id_not_12);
6811 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_offset) == 16,
6812 OffsetOf_Uniform3fv_v_shm_offset_not_16);
6814 struct Uniform3fvImmediate {
6815 typedef Uniform3fvImmediate ValueType;
6816 static const CommandId kCmdId = kUniform3fvImmediate;
6817 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6819 static uint32 ComputeDataSize(GLsizei count) {
6820 return static_cast<uint32>(
6821 sizeof(GLfloat) * 3 * count); // NOLINT
6824 static uint32 ComputeSize(GLsizei count) {
6825 return static_cast<uint32>(
6826 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6829 void SetHeader(GLsizei count) {
6830 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6833 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6834 SetHeader(_count);
6835 location = _location;
6836 count = _count;
6837 memcpy(ImmediateDataAddress(this),
6838 _v, ComputeDataSize(_count));
6841 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6842 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6843 const uint32 size = ComputeSize(_count);
6844 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6847 gpu::CommandHeader header;
6848 int32 location;
6849 int32 count;
6852 COMPILE_ASSERT(sizeof(Uniform3fvImmediate) == 12,
6853 Sizeof_Uniform3fvImmediate_is_not_12);
6854 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, header) == 0,
6855 OffsetOf_Uniform3fvImmediate_header_not_0);
6856 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, location) == 4,
6857 OffsetOf_Uniform3fvImmediate_location_not_4);
6858 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, count) == 8,
6859 OffsetOf_Uniform3fvImmediate_count_not_8);
6861 struct Uniform3i {
6862 typedef Uniform3i ValueType;
6863 static const CommandId kCmdId = kUniform3i;
6864 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6866 static uint32 ComputeSize() {
6867 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6870 void SetHeader() {
6871 header.SetCmd<ValueType>();
6874 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
6875 SetHeader();
6876 location = _location;
6877 x = _x;
6878 y = _y;
6879 z = _z;
6882 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
6883 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
6884 return NextCmdAddress<ValueType>(cmd);
6887 gpu::CommandHeader header;
6888 int32 location;
6889 int32 x;
6890 int32 y;
6891 int32 z;
6894 COMPILE_ASSERT(sizeof(Uniform3i) == 20,
6895 Sizeof_Uniform3i_is_not_20);
6896 COMPILE_ASSERT(offsetof(Uniform3i, header) == 0,
6897 OffsetOf_Uniform3i_header_not_0);
6898 COMPILE_ASSERT(offsetof(Uniform3i, location) == 4,
6899 OffsetOf_Uniform3i_location_not_4);
6900 COMPILE_ASSERT(offsetof(Uniform3i, x) == 8,
6901 OffsetOf_Uniform3i_x_not_8);
6902 COMPILE_ASSERT(offsetof(Uniform3i, y) == 12,
6903 OffsetOf_Uniform3i_y_not_12);
6904 COMPILE_ASSERT(offsetof(Uniform3i, z) == 16,
6905 OffsetOf_Uniform3i_z_not_16);
6907 struct Uniform3iv {
6908 typedef Uniform3iv ValueType;
6909 static const CommandId kCmdId = kUniform3iv;
6910 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6912 static uint32 ComputeSize() {
6913 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6916 void SetHeader() {
6917 header.SetCmd<ValueType>();
6920 void Init(
6921 GLint _location, GLsizei _count, uint32 _v_shm_id,
6922 uint32 _v_shm_offset) {
6923 SetHeader();
6924 location = _location;
6925 count = _count;
6926 v_shm_id = _v_shm_id;
6927 v_shm_offset = _v_shm_offset;
6930 void* Set(
6931 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
6932 uint32 _v_shm_offset) {
6933 static_cast<ValueType*>(
6934 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
6935 return NextCmdAddress<ValueType>(cmd);
6938 gpu::CommandHeader header;
6939 int32 location;
6940 int32 count;
6941 uint32 v_shm_id;
6942 uint32 v_shm_offset;
6945 COMPILE_ASSERT(sizeof(Uniform3iv) == 20,
6946 Sizeof_Uniform3iv_is_not_20);
6947 COMPILE_ASSERT(offsetof(Uniform3iv, header) == 0,
6948 OffsetOf_Uniform3iv_header_not_0);
6949 COMPILE_ASSERT(offsetof(Uniform3iv, location) == 4,
6950 OffsetOf_Uniform3iv_location_not_4);
6951 COMPILE_ASSERT(offsetof(Uniform3iv, count) == 8,
6952 OffsetOf_Uniform3iv_count_not_8);
6953 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_id) == 12,
6954 OffsetOf_Uniform3iv_v_shm_id_not_12);
6955 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_offset) == 16,
6956 OffsetOf_Uniform3iv_v_shm_offset_not_16);
6958 struct Uniform3ivImmediate {
6959 typedef Uniform3ivImmediate ValueType;
6960 static const CommandId kCmdId = kUniform3ivImmediate;
6961 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6963 static uint32 ComputeDataSize(GLsizei count) {
6964 return static_cast<uint32>(
6965 sizeof(GLint) * 3 * count); // NOLINT
6968 static uint32 ComputeSize(GLsizei count) {
6969 return static_cast<uint32>(
6970 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
6973 void SetHeader(GLsizei count) {
6974 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6977 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6978 SetHeader(_count);
6979 location = _location;
6980 count = _count;
6981 memcpy(ImmediateDataAddress(this),
6982 _v, ComputeDataSize(_count));
6985 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6986 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6987 const uint32 size = ComputeSize(_count);
6988 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6991 gpu::CommandHeader header;
6992 int32 location;
6993 int32 count;
6996 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12,
6997 Sizeof_Uniform3ivImmediate_is_not_12);
6998 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0,
6999 OffsetOf_Uniform3ivImmediate_header_not_0);
7000 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4,
7001 OffsetOf_Uniform3ivImmediate_location_not_4);
7002 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8,
7003 OffsetOf_Uniform3ivImmediate_count_not_8);
7005 struct Uniform4f {
7006 typedef Uniform4f ValueType;
7007 static const CommandId kCmdId = kUniform4f;
7008 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7010 static uint32 ComputeSize() {
7011 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7014 void SetHeader() {
7015 header.SetCmd<ValueType>();
7018 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
7019 SetHeader();
7020 location = _location;
7021 x = _x;
7022 y = _y;
7023 z = _z;
7024 w = _w;
7027 void* Set(
7028 void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z,
7029 GLfloat _w) {
7030 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
7031 return NextCmdAddress<ValueType>(cmd);
7034 gpu::CommandHeader header;
7035 int32 location;
7036 float x;
7037 float y;
7038 float z;
7039 float w;
7042 COMPILE_ASSERT(sizeof(Uniform4f) == 24,
7043 Sizeof_Uniform4f_is_not_24);
7044 COMPILE_ASSERT(offsetof(Uniform4f, header) == 0,
7045 OffsetOf_Uniform4f_header_not_0);
7046 COMPILE_ASSERT(offsetof(Uniform4f, location) == 4,
7047 OffsetOf_Uniform4f_location_not_4);
7048 COMPILE_ASSERT(offsetof(Uniform4f, x) == 8,
7049 OffsetOf_Uniform4f_x_not_8);
7050 COMPILE_ASSERT(offsetof(Uniform4f, y) == 12,
7051 OffsetOf_Uniform4f_y_not_12);
7052 COMPILE_ASSERT(offsetof(Uniform4f, z) == 16,
7053 OffsetOf_Uniform4f_z_not_16);
7054 COMPILE_ASSERT(offsetof(Uniform4f, w) == 20,
7055 OffsetOf_Uniform4f_w_not_20);
7057 struct Uniform4fv {
7058 typedef Uniform4fv ValueType;
7059 static const CommandId kCmdId = kUniform4fv;
7060 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7062 static uint32 ComputeSize() {
7063 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7066 void SetHeader() {
7067 header.SetCmd<ValueType>();
7070 void Init(
7071 GLint _location, GLsizei _count, uint32 _v_shm_id,
7072 uint32 _v_shm_offset) {
7073 SetHeader();
7074 location = _location;
7075 count = _count;
7076 v_shm_id = _v_shm_id;
7077 v_shm_offset = _v_shm_offset;
7080 void* Set(
7081 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
7082 uint32 _v_shm_offset) {
7083 static_cast<ValueType*>(
7084 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
7085 return NextCmdAddress<ValueType>(cmd);
7088 gpu::CommandHeader header;
7089 int32 location;
7090 int32 count;
7091 uint32 v_shm_id;
7092 uint32 v_shm_offset;
7095 COMPILE_ASSERT(sizeof(Uniform4fv) == 20,
7096 Sizeof_Uniform4fv_is_not_20);
7097 COMPILE_ASSERT(offsetof(Uniform4fv, header) == 0,
7098 OffsetOf_Uniform4fv_header_not_0);
7099 COMPILE_ASSERT(offsetof(Uniform4fv, location) == 4,
7100 OffsetOf_Uniform4fv_location_not_4);
7101 COMPILE_ASSERT(offsetof(Uniform4fv, count) == 8,
7102 OffsetOf_Uniform4fv_count_not_8);
7103 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_id) == 12,
7104 OffsetOf_Uniform4fv_v_shm_id_not_12);
7105 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_offset) == 16,
7106 OffsetOf_Uniform4fv_v_shm_offset_not_16);
7108 struct Uniform4fvImmediate {
7109 typedef Uniform4fvImmediate ValueType;
7110 static const CommandId kCmdId = kUniform4fvImmediate;
7111 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7113 static uint32 ComputeDataSize(GLsizei count) {
7114 return static_cast<uint32>(
7115 sizeof(GLfloat) * 4 * count); // NOLINT
7118 static uint32 ComputeSize(GLsizei count) {
7119 return static_cast<uint32>(
7120 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
7123 void SetHeader(GLsizei count) {
7124 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7127 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
7128 SetHeader(_count);
7129 location = _location;
7130 count = _count;
7131 memcpy(ImmediateDataAddress(this),
7132 _v, ComputeDataSize(_count));
7135 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
7136 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7137 const uint32 size = ComputeSize(_count);
7138 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7141 gpu::CommandHeader header;
7142 int32 location;
7143 int32 count;
7146 COMPILE_ASSERT(sizeof(Uniform4fvImmediate) == 12,
7147 Sizeof_Uniform4fvImmediate_is_not_12);
7148 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, header) == 0,
7149 OffsetOf_Uniform4fvImmediate_header_not_0);
7150 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, location) == 4,
7151 OffsetOf_Uniform4fvImmediate_location_not_4);
7152 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, count) == 8,
7153 OffsetOf_Uniform4fvImmediate_count_not_8);
7155 struct Uniform4i {
7156 typedef Uniform4i ValueType;
7157 static const CommandId kCmdId = kUniform4i;
7158 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7160 static uint32 ComputeSize() {
7161 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7164 void SetHeader() {
7165 header.SetCmd<ValueType>();
7168 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
7169 SetHeader();
7170 location = _location;
7171 x = _x;
7172 y = _y;
7173 z = _z;
7174 w = _w;
7177 void* Set(
7178 void* cmd, GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
7179 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
7180 return NextCmdAddress<ValueType>(cmd);
7183 gpu::CommandHeader header;
7184 int32 location;
7185 int32 x;
7186 int32 y;
7187 int32 z;
7188 int32 w;
7191 COMPILE_ASSERT(sizeof(Uniform4i) == 24,
7192 Sizeof_Uniform4i_is_not_24);
7193 COMPILE_ASSERT(offsetof(Uniform4i, header) == 0,
7194 OffsetOf_Uniform4i_header_not_0);
7195 COMPILE_ASSERT(offsetof(Uniform4i, location) == 4,
7196 OffsetOf_Uniform4i_location_not_4);
7197 COMPILE_ASSERT(offsetof(Uniform4i, x) == 8,
7198 OffsetOf_Uniform4i_x_not_8);
7199 COMPILE_ASSERT(offsetof(Uniform4i, y) == 12,
7200 OffsetOf_Uniform4i_y_not_12);
7201 COMPILE_ASSERT(offsetof(Uniform4i, z) == 16,
7202 OffsetOf_Uniform4i_z_not_16);
7203 COMPILE_ASSERT(offsetof(Uniform4i, w) == 20,
7204 OffsetOf_Uniform4i_w_not_20);
7206 struct Uniform4iv {
7207 typedef Uniform4iv ValueType;
7208 static const CommandId kCmdId = kUniform4iv;
7209 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7211 static uint32 ComputeSize() {
7212 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7215 void SetHeader() {
7216 header.SetCmd<ValueType>();
7219 void Init(
7220 GLint _location, GLsizei _count, uint32 _v_shm_id,
7221 uint32 _v_shm_offset) {
7222 SetHeader();
7223 location = _location;
7224 count = _count;
7225 v_shm_id = _v_shm_id;
7226 v_shm_offset = _v_shm_offset;
7229 void* Set(
7230 void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
7231 uint32 _v_shm_offset) {
7232 static_cast<ValueType*>(
7233 cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
7234 return NextCmdAddress<ValueType>(cmd);
7237 gpu::CommandHeader header;
7238 int32 location;
7239 int32 count;
7240 uint32 v_shm_id;
7241 uint32 v_shm_offset;
7244 COMPILE_ASSERT(sizeof(Uniform4iv) == 20,
7245 Sizeof_Uniform4iv_is_not_20);
7246 COMPILE_ASSERT(offsetof(Uniform4iv, header) == 0,
7247 OffsetOf_Uniform4iv_header_not_0);
7248 COMPILE_ASSERT(offsetof(Uniform4iv, location) == 4,
7249 OffsetOf_Uniform4iv_location_not_4);
7250 COMPILE_ASSERT(offsetof(Uniform4iv, count) == 8,
7251 OffsetOf_Uniform4iv_count_not_8);
7252 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_id) == 12,
7253 OffsetOf_Uniform4iv_v_shm_id_not_12);
7254 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_offset) == 16,
7255 OffsetOf_Uniform4iv_v_shm_offset_not_16);
7257 struct Uniform4ivImmediate {
7258 typedef Uniform4ivImmediate ValueType;
7259 static const CommandId kCmdId = kUniform4ivImmediate;
7260 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7262 static uint32 ComputeDataSize(GLsizei count) {
7263 return static_cast<uint32>(
7264 sizeof(GLint) * 4 * count); // NOLINT
7267 static uint32 ComputeSize(GLsizei count) {
7268 return static_cast<uint32>(
7269 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
7272 void SetHeader(GLsizei count) {
7273 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7276 void Init(GLint _location, GLsizei _count, const GLint* _v) {
7277 SetHeader(_count);
7278 location = _location;
7279 count = _count;
7280 memcpy(ImmediateDataAddress(this),
7281 _v, ComputeDataSize(_count));
7284 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
7285 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7286 const uint32 size = ComputeSize(_count);
7287 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7290 gpu::CommandHeader header;
7291 int32 location;
7292 int32 count;
7295 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12,
7296 Sizeof_Uniform4ivImmediate_is_not_12);
7297 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0,
7298 OffsetOf_Uniform4ivImmediate_header_not_0);
7299 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4,
7300 OffsetOf_Uniform4ivImmediate_location_not_4);
7301 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8,
7302 OffsetOf_Uniform4ivImmediate_count_not_8);
7304 struct UniformMatrix2fv {
7305 typedef UniformMatrix2fv ValueType;
7306 static const CommandId kCmdId = kUniformMatrix2fv;
7307 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7309 static uint32 ComputeSize() {
7310 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7313 void SetHeader() {
7314 header.SetCmd<ValueType>();
7317 void Init(
7318 GLint _location, GLsizei _count, GLboolean _transpose,
7319 uint32 _value_shm_id, uint32 _value_shm_offset) {
7320 SetHeader();
7321 location = _location;
7322 count = _count;
7323 transpose = _transpose;
7324 value_shm_id = _value_shm_id;
7325 value_shm_offset = _value_shm_offset;
7328 void* Set(
7329 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7330 uint32 _value_shm_id, uint32 _value_shm_offset) {
7331 static_cast<ValueType*>(
7332 cmd)->Init(
7333 _location, _count, _transpose, _value_shm_id, _value_shm_offset);
7334 return NextCmdAddress<ValueType>(cmd);
7337 gpu::CommandHeader header;
7338 int32 location;
7339 int32 count;
7340 uint32 transpose;
7341 uint32 value_shm_id;
7342 uint32 value_shm_offset;
7345 COMPILE_ASSERT(sizeof(UniformMatrix2fv) == 24,
7346 Sizeof_UniformMatrix2fv_is_not_24);
7347 COMPILE_ASSERT(offsetof(UniformMatrix2fv, header) == 0,
7348 OffsetOf_UniformMatrix2fv_header_not_0);
7349 COMPILE_ASSERT(offsetof(UniformMatrix2fv, location) == 4,
7350 OffsetOf_UniformMatrix2fv_location_not_4);
7351 COMPILE_ASSERT(offsetof(UniformMatrix2fv, count) == 8,
7352 OffsetOf_UniformMatrix2fv_count_not_8);
7353 COMPILE_ASSERT(offsetof(UniformMatrix2fv, transpose) == 12,
7354 OffsetOf_UniformMatrix2fv_transpose_not_12);
7355 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_id) == 16,
7356 OffsetOf_UniformMatrix2fv_value_shm_id_not_16);
7357 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_offset) == 20,
7358 OffsetOf_UniformMatrix2fv_value_shm_offset_not_20);
7360 struct UniformMatrix2fvImmediate {
7361 typedef UniformMatrix2fvImmediate ValueType;
7362 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
7363 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7365 static uint32 ComputeDataSize(GLsizei count) {
7366 return static_cast<uint32>(
7367 sizeof(GLfloat) * 4 * count); // NOLINT
7370 static uint32 ComputeSize(GLsizei count) {
7371 return static_cast<uint32>(
7372 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
7375 void SetHeader(GLsizei count) {
7376 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7379 void Init(
7380 GLint _location, GLsizei _count, GLboolean _transpose,
7381 const GLfloat* _value) {
7382 SetHeader(_count);
7383 location = _location;
7384 count = _count;
7385 transpose = _transpose;
7386 memcpy(ImmediateDataAddress(this),
7387 _value, ComputeDataSize(_count));
7390 void* Set(
7391 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7392 const GLfloat* _value) {
7393 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
7394 const uint32 size = ComputeSize(_count);
7395 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7398 gpu::CommandHeader header;
7399 int32 location;
7400 int32 count;
7401 uint32 transpose;
7404 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 16,
7405 Sizeof_UniformMatrix2fvImmediate_is_not_16);
7406 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0,
7407 OffsetOf_UniformMatrix2fvImmediate_header_not_0);
7408 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4,
7409 OffsetOf_UniformMatrix2fvImmediate_location_not_4);
7410 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8,
7411 OffsetOf_UniformMatrix2fvImmediate_count_not_8);
7412 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, transpose) == 12,
7413 OffsetOf_UniformMatrix2fvImmediate_transpose_not_12);
7415 struct UniformMatrix3fv {
7416 typedef UniformMatrix3fv ValueType;
7417 static const CommandId kCmdId = kUniformMatrix3fv;
7418 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7420 static uint32 ComputeSize() {
7421 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7424 void SetHeader() {
7425 header.SetCmd<ValueType>();
7428 void Init(
7429 GLint _location, GLsizei _count, GLboolean _transpose,
7430 uint32 _value_shm_id, uint32 _value_shm_offset) {
7431 SetHeader();
7432 location = _location;
7433 count = _count;
7434 transpose = _transpose;
7435 value_shm_id = _value_shm_id;
7436 value_shm_offset = _value_shm_offset;
7439 void* Set(
7440 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7441 uint32 _value_shm_id, uint32 _value_shm_offset) {
7442 static_cast<ValueType*>(
7443 cmd)->Init(
7444 _location, _count, _transpose, _value_shm_id, _value_shm_offset);
7445 return NextCmdAddress<ValueType>(cmd);
7448 gpu::CommandHeader header;
7449 int32 location;
7450 int32 count;
7451 uint32 transpose;
7452 uint32 value_shm_id;
7453 uint32 value_shm_offset;
7456 COMPILE_ASSERT(sizeof(UniformMatrix3fv) == 24,
7457 Sizeof_UniformMatrix3fv_is_not_24);
7458 COMPILE_ASSERT(offsetof(UniformMatrix3fv, header) == 0,
7459 OffsetOf_UniformMatrix3fv_header_not_0);
7460 COMPILE_ASSERT(offsetof(UniformMatrix3fv, location) == 4,
7461 OffsetOf_UniformMatrix3fv_location_not_4);
7462 COMPILE_ASSERT(offsetof(UniformMatrix3fv, count) == 8,
7463 OffsetOf_UniformMatrix3fv_count_not_8);
7464 COMPILE_ASSERT(offsetof(UniformMatrix3fv, transpose) == 12,
7465 OffsetOf_UniformMatrix3fv_transpose_not_12);
7466 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_id) == 16,
7467 OffsetOf_UniformMatrix3fv_value_shm_id_not_16);
7468 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_offset) == 20,
7469 OffsetOf_UniformMatrix3fv_value_shm_offset_not_20);
7471 struct UniformMatrix3fvImmediate {
7472 typedef UniformMatrix3fvImmediate ValueType;
7473 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
7474 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7476 static uint32 ComputeDataSize(GLsizei count) {
7477 return static_cast<uint32>(
7478 sizeof(GLfloat) * 9 * count); // NOLINT
7481 static uint32 ComputeSize(GLsizei count) {
7482 return static_cast<uint32>(
7483 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
7486 void SetHeader(GLsizei count) {
7487 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7490 void Init(
7491 GLint _location, GLsizei _count, GLboolean _transpose,
7492 const GLfloat* _value) {
7493 SetHeader(_count);
7494 location = _location;
7495 count = _count;
7496 transpose = _transpose;
7497 memcpy(ImmediateDataAddress(this),
7498 _value, ComputeDataSize(_count));
7501 void* Set(
7502 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7503 const GLfloat* _value) {
7504 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
7505 const uint32 size = ComputeSize(_count);
7506 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7509 gpu::CommandHeader header;
7510 int32 location;
7511 int32 count;
7512 uint32 transpose;
7515 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 16,
7516 Sizeof_UniformMatrix3fvImmediate_is_not_16);
7517 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0,
7518 OffsetOf_UniformMatrix3fvImmediate_header_not_0);
7519 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4,
7520 OffsetOf_UniformMatrix3fvImmediate_location_not_4);
7521 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8,
7522 OffsetOf_UniformMatrix3fvImmediate_count_not_8);
7523 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, transpose) == 12,
7524 OffsetOf_UniformMatrix3fvImmediate_transpose_not_12);
7526 struct UniformMatrix4fv {
7527 typedef UniformMatrix4fv ValueType;
7528 static const CommandId kCmdId = kUniformMatrix4fv;
7529 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7531 static uint32 ComputeSize() {
7532 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7535 void SetHeader() {
7536 header.SetCmd<ValueType>();
7539 void Init(
7540 GLint _location, GLsizei _count, GLboolean _transpose,
7541 uint32 _value_shm_id, uint32 _value_shm_offset) {
7542 SetHeader();
7543 location = _location;
7544 count = _count;
7545 transpose = _transpose;
7546 value_shm_id = _value_shm_id;
7547 value_shm_offset = _value_shm_offset;
7550 void* Set(
7551 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7552 uint32 _value_shm_id, uint32 _value_shm_offset) {
7553 static_cast<ValueType*>(
7554 cmd)->Init(
7555 _location, _count, _transpose, _value_shm_id, _value_shm_offset);
7556 return NextCmdAddress<ValueType>(cmd);
7559 gpu::CommandHeader header;
7560 int32 location;
7561 int32 count;
7562 uint32 transpose;
7563 uint32 value_shm_id;
7564 uint32 value_shm_offset;
7567 COMPILE_ASSERT(sizeof(UniformMatrix4fv) == 24,
7568 Sizeof_UniformMatrix4fv_is_not_24);
7569 COMPILE_ASSERT(offsetof(UniformMatrix4fv, header) == 0,
7570 OffsetOf_UniformMatrix4fv_header_not_0);
7571 COMPILE_ASSERT(offsetof(UniformMatrix4fv, location) == 4,
7572 OffsetOf_UniformMatrix4fv_location_not_4);
7573 COMPILE_ASSERT(offsetof(UniformMatrix4fv, count) == 8,
7574 OffsetOf_UniformMatrix4fv_count_not_8);
7575 COMPILE_ASSERT(offsetof(UniformMatrix4fv, transpose) == 12,
7576 OffsetOf_UniformMatrix4fv_transpose_not_12);
7577 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_id) == 16,
7578 OffsetOf_UniformMatrix4fv_value_shm_id_not_16);
7579 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_offset) == 20,
7580 OffsetOf_UniformMatrix4fv_value_shm_offset_not_20);
7582 struct UniformMatrix4fvImmediate {
7583 typedef UniformMatrix4fvImmediate ValueType;
7584 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
7585 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7587 static uint32 ComputeDataSize(GLsizei count) {
7588 return static_cast<uint32>(
7589 sizeof(GLfloat) * 16 * count); // NOLINT
7592 static uint32 ComputeSize(GLsizei count) {
7593 return static_cast<uint32>(
7594 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
7597 void SetHeader(GLsizei count) {
7598 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7601 void Init(
7602 GLint _location, GLsizei _count, GLboolean _transpose,
7603 const GLfloat* _value) {
7604 SetHeader(_count);
7605 location = _location;
7606 count = _count;
7607 transpose = _transpose;
7608 memcpy(ImmediateDataAddress(this),
7609 _value, ComputeDataSize(_count));
7612 void* Set(
7613 void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
7614 const GLfloat* _value) {
7615 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
7616 const uint32 size = ComputeSize(_count);
7617 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7620 gpu::CommandHeader header;
7621 int32 location;
7622 int32 count;
7623 uint32 transpose;
7626 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 16,
7627 Sizeof_UniformMatrix4fvImmediate_is_not_16);
7628 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0,
7629 OffsetOf_UniformMatrix4fvImmediate_header_not_0);
7630 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4,
7631 OffsetOf_UniformMatrix4fvImmediate_location_not_4);
7632 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8,
7633 OffsetOf_UniformMatrix4fvImmediate_count_not_8);
7634 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, transpose) == 12,
7635 OffsetOf_UniformMatrix4fvImmediate_transpose_not_12);
7637 struct UseProgram {
7638 typedef UseProgram ValueType;
7639 static const CommandId kCmdId = kUseProgram;
7640 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7642 static uint32 ComputeSize() {
7643 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7646 void SetHeader() {
7647 header.SetCmd<ValueType>();
7650 void Init(GLuint _program) {
7651 SetHeader();
7652 program = _program;
7655 void* Set(void* cmd, GLuint _program) {
7656 static_cast<ValueType*>(cmd)->Init(_program);
7657 return NextCmdAddress<ValueType>(cmd);
7660 gpu::CommandHeader header;
7661 uint32 program;
7664 COMPILE_ASSERT(sizeof(UseProgram) == 8,
7665 Sizeof_UseProgram_is_not_8);
7666 COMPILE_ASSERT(offsetof(UseProgram, header) == 0,
7667 OffsetOf_UseProgram_header_not_0);
7668 COMPILE_ASSERT(offsetof(UseProgram, program) == 4,
7669 OffsetOf_UseProgram_program_not_4);
7671 struct ValidateProgram {
7672 typedef ValidateProgram ValueType;
7673 static const CommandId kCmdId = kValidateProgram;
7674 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7676 static uint32 ComputeSize() {
7677 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7680 void SetHeader() {
7681 header.SetCmd<ValueType>();
7684 void Init(GLuint _program) {
7685 SetHeader();
7686 program = _program;
7689 void* Set(void* cmd, GLuint _program) {
7690 static_cast<ValueType*>(cmd)->Init(_program);
7691 return NextCmdAddress<ValueType>(cmd);
7694 gpu::CommandHeader header;
7695 uint32 program;
7698 COMPILE_ASSERT(sizeof(ValidateProgram) == 8,
7699 Sizeof_ValidateProgram_is_not_8);
7700 COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0,
7701 OffsetOf_ValidateProgram_header_not_0);
7702 COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4,
7703 OffsetOf_ValidateProgram_program_not_4);
7705 struct VertexAttrib1f {
7706 typedef VertexAttrib1f ValueType;
7707 static const CommandId kCmdId = kVertexAttrib1f;
7708 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7710 static uint32 ComputeSize() {
7711 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7714 void SetHeader() {
7715 header.SetCmd<ValueType>();
7718 void Init(GLuint _indx, GLfloat _x) {
7719 SetHeader();
7720 indx = _indx;
7721 x = _x;
7724 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
7725 static_cast<ValueType*>(cmd)->Init(_indx, _x);
7726 return NextCmdAddress<ValueType>(cmd);
7729 gpu::CommandHeader header;
7730 uint32 indx;
7731 float x;
7734 COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12,
7735 Sizeof_VertexAttrib1f_is_not_12);
7736 COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0,
7737 OffsetOf_VertexAttrib1f_header_not_0);
7738 COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4,
7739 OffsetOf_VertexAttrib1f_indx_not_4);
7740 COMPILE_ASSERT(offsetof(VertexAttrib1f, x) == 8,
7741 OffsetOf_VertexAttrib1f_x_not_8);
7743 struct VertexAttrib1fv {
7744 typedef VertexAttrib1fv ValueType;
7745 static const CommandId kCmdId = kVertexAttrib1fv;
7746 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7748 static uint32 ComputeSize() {
7749 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7752 void SetHeader() {
7753 header.SetCmd<ValueType>();
7756 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7757 SetHeader();
7758 indx = _indx;
7759 values_shm_id = _values_shm_id;
7760 values_shm_offset = _values_shm_offset;
7763 void* Set(
7764 void* cmd, GLuint _indx, uint32 _values_shm_id,
7765 uint32 _values_shm_offset) {
7766 static_cast<ValueType*>(
7767 cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
7768 return NextCmdAddress<ValueType>(cmd);
7771 gpu::CommandHeader header;
7772 uint32 indx;
7773 uint32 values_shm_id;
7774 uint32 values_shm_offset;
7777 COMPILE_ASSERT(sizeof(VertexAttrib1fv) == 16,
7778 Sizeof_VertexAttrib1fv_is_not_16);
7779 COMPILE_ASSERT(offsetof(VertexAttrib1fv, header) == 0,
7780 OffsetOf_VertexAttrib1fv_header_not_0);
7781 COMPILE_ASSERT(offsetof(VertexAttrib1fv, indx) == 4,
7782 OffsetOf_VertexAttrib1fv_indx_not_4);
7783 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_id) == 8,
7784 OffsetOf_VertexAttrib1fv_values_shm_id_not_8);
7785 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_offset) == 12,
7786 OffsetOf_VertexAttrib1fv_values_shm_offset_not_12);
7788 struct VertexAttrib1fvImmediate {
7789 typedef VertexAttrib1fvImmediate ValueType;
7790 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
7791 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7793 static uint32 ComputeDataSize() {
7794 return static_cast<uint32>(
7795 sizeof(GLfloat) * 1); // NOLINT
7798 static uint32 ComputeSize() {
7799 return static_cast<uint32>(
7800 sizeof(ValueType) + ComputeDataSize()); // NOLINT
7803 void SetHeader() {
7804 header.SetCmdByTotalSize<ValueType>(ComputeSize());
7807 void Init(GLuint _indx, const GLfloat* _values) {
7808 SetHeader();
7809 indx = _indx;
7810 memcpy(ImmediateDataAddress(this),
7811 _values, ComputeDataSize());
7814 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7815 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7816 const uint32 size = ComputeSize();
7817 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7820 gpu::CommandHeader header;
7821 uint32 indx;
7824 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate) == 8,
7825 Sizeof_VertexAttrib1fvImmediate_is_not_8);
7826 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, header) == 0,
7827 OffsetOf_VertexAttrib1fvImmediate_header_not_0);
7828 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, indx) == 4,
7829 OffsetOf_VertexAttrib1fvImmediate_indx_not_4);
7831 struct VertexAttrib2f {
7832 typedef VertexAttrib2f ValueType;
7833 static const CommandId kCmdId = kVertexAttrib2f;
7834 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7836 static uint32 ComputeSize() {
7837 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7840 void SetHeader() {
7841 header.SetCmd<ValueType>();
7844 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
7845 SetHeader();
7846 indx = _indx;
7847 x = _x;
7848 y = _y;
7851 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
7852 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
7853 return NextCmdAddress<ValueType>(cmd);
7856 gpu::CommandHeader header;
7857 uint32 indx;
7858 float x;
7859 float y;
7862 COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16,
7863 Sizeof_VertexAttrib2f_is_not_16);
7864 COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0,
7865 OffsetOf_VertexAttrib2f_header_not_0);
7866 COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4,
7867 OffsetOf_VertexAttrib2f_indx_not_4);
7868 COMPILE_ASSERT(offsetof(VertexAttrib2f, x) == 8,
7869 OffsetOf_VertexAttrib2f_x_not_8);
7870 COMPILE_ASSERT(offsetof(VertexAttrib2f, y) == 12,
7871 OffsetOf_VertexAttrib2f_y_not_12);
7873 struct VertexAttrib2fv {
7874 typedef VertexAttrib2fv ValueType;
7875 static const CommandId kCmdId = kVertexAttrib2fv;
7876 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7878 static uint32 ComputeSize() {
7879 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7882 void SetHeader() {
7883 header.SetCmd<ValueType>();
7886 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7887 SetHeader();
7888 indx = _indx;
7889 values_shm_id = _values_shm_id;
7890 values_shm_offset = _values_shm_offset;
7893 void* Set(
7894 void* cmd, GLuint _indx, uint32 _values_shm_id,
7895 uint32 _values_shm_offset) {
7896 static_cast<ValueType*>(
7897 cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
7898 return NextCmdAddress<ValueType>(cmd);
7901 gpu::CommandHeader header;
7902 uint32 indx;
7903 uint32 values_shm_id;
7904 uint32 values_shm_offset;
7907 COMPILE_ASSERT(sizeof(VertexAttrib2fv) == 16,
7908 Sizeof_VertexAttrib2fv_is_not_16);
7909 COMPILE_ASSERT(offsetof(VertexAttrib2fv, header) == 0,
7910 OffsetOf_VertexAttrib2fv_header_not_0);
7911 COMPILE_ASSERT(offsetof(VertexAttrib2fv, indx) == 4,
7912 OffsetOf_VertexAttrib2fv_indx_not_4);
7913 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_id) == 8,
7914 OffsetOf_VertexAttrib2fv_values_shm_id_not_8);
7915 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_offset) == 12,
7916 OffsetOf_VertexAttrib2fv_values_shm_offset_not_12);
7918 struct VertexAttrib2fvImmediate {
7919 typedef VertexAttrib2fvImmediate ValueType;
7920 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
7921 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7923 static uint32 ComputeDataSize() {
7924 return static_cast<uint32>(
7925 sizeof(GLfloat) * 2); // NOLINT
7928 static uint32 ComputeSize() {
7929 return static_cast<uint32>(
7930 sizeof(ValueType) + ComputeDataSize()); // NOLINT
7933 void SetHeader() {
7934 header.SetCmdByTotalSize<ValueType>(ComputeSize());
7937 void Init(GLuint _indx, const GLfloat* _values) {
7938 SetHeader();
7939 indx = _indx;
7940 memcpy(ImmediateDataAddress(this),
7941 _values, ComputeDataSize());
7944 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7945 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7946 const uint32 size = ComputeSize();
7947 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7950 gpu::CommandHeader header;
7951 uint32 indx;
7954 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate) == 8,
7955 Sizeof_VertexAttrib2fvImmediate_is_not_8);
7956 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, header) == 0,
7957 OffsetOf_VertexAttrib2fvImmediate_header_not_0);
7958 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, indx) == 4,
7959 OffsetOf_VertexAttrib2fvImmediate_indx_not_4);
7961 struct VertexAttrib3f {
7962 typedef VertexAttrib3f ValueType;
7963 static const CommandId kCmdId = kVertexAttrib3f;
7964 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7966 static uint32 ComputeSize() {
7967 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7970 void SetHeader() {
7971 header.SetCmd<ValueType>();
7974 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
7975 SetHeader();
7976 indx = _indx;
7977 x = _x;
7978 y = _y;
7979 z = _z;
7982 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
7983 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
7984 return NextCmdAddress<ValueType>(cmd);
7987 gpu::CommandHeader header;
7988 uint32 indx;
7989 float x;
7990 float y;
7991 float z;
7994 COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20,
7995 Sizeof_VertexAttrib3f_is_not_20);
7996 COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0,
7997 OffsetOf_VertexAttrib3f_header_not_0);
7998 COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4,
7999 OffsetOf_VertexAttrib3f_indx_not_4);
8000 COMPILE_ASSERT(offsetof(VertexAttrib3f, x) == 8,
8001 OffsetOf_VertexAttrib3f_x_not_8);
8002 COMPILE_ASSERT(offsetof(VertexAttrib3f, y) == 12,
8003 OffsetOf_VertexAttrib3f_y_not_12);
8004 COMPILE_ASSERT(offsetof(VertexAttrib3f, z) == 16,
8005 OffsetOf_VertexAttrib3f_z_not_16);
8007 struct VertexAttrib3fv {
8008 typedef VertexAttrib3fv ValueType;
8009 static const CommandId kCmdId = kVertexAttrib3fv;
8010 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8012 static uint32 ComputeSize() {
8013 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8016 void SetHeader() {
8017 header.SetCmd<ValueType>();
8020 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
8021 SetHeader();
8022 indx = _indx;
8023 values_shm_id = _values_shm_id;
8024 values_shm_offset = _values_shm_offset;
8027 void* Set(
8028 void* cmd, GLuint _indx, uint32 _values_shm_id,
8029 uint32 _values_shm_offset) {
8030 static_cast<ValueType*>(
8031 cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
8032 return NextCmdAddress<ValueType>(cmd);
8035 gpu::CommandHeader header;
8036 uint32 indx;
8037 uint32 values_shm_id;
8038 uint32 values_shm_offset;
8041 COMPILE_ASSERT(sizeof(VertexAttrib3fv) == 16,
8042 Sizeof_VertexAttrib3fv_is_not_16);
8043 COMPILE_ASSERT(offsetof(VertexAttrib3fv, header) == 0,
8044 OffsetOf_VertexAttrib3fv_header_not_0);
8045 COMPILE_ASSERT(offsetof(VertexAttrib3fv, indx) == 4,
8046 OffsetOf_VertexAttrib3fv_indx_not_4);
8047 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_id) == 8,
8048 OffsetOf_VertexAttrib3fv_values_shm_id_not_8);
8049 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_offset) == 12,
8050 OffsetOf_VertexAttrib3fv_values_shm_offset_not_12);
8052 struct VertexAttrib3fvImmediate {
8053 typedef VertexAttrib3fvImmediate ValueType;
8054 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
8055 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8057 static uint32 ComputeDataSize() {
8058 return static_cast<uint32>(
8059 sizeof(GLfloat) * 3); // NOLINT
8062 static uint32 ComputeSize() {
8063 return static_cast<uint32>(
8064 sizeof(ValueType) + ComputeDataSize()); // NOLINT
8067 void SetHeader() {
8068 header.SetCmdByTotalSize<ValueType>(ComputeSize());
8071 void Init(GLuint _indx, const GLfloat* _values) {
8072 SetHeader();
8073 indx = _indx;
8074 memcpy(ImmediateDataAddress(this),
8075 _values, ComputeDataSize());
8078 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
8079 static_cast<ValueType*>(cmd)->Init(_indx, _values);
8080 const uint32 size = ComputeSize();
8081 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8084 gpu::CommandHeader header;
8085 uint32 indx;
8088 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate) == 8,
8089 Sizeof_VertexAttrib3fvImmediate_is_not_8);
8090 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, header) == 0,
8091 OffsetOf_VertexAttrib3fvImmediate_header_not_0);
8092 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, indx) == 4,
8093 OffsetOf_VertexAttrib3fvImmediate_indx_not_4);
8095 struct VertexAttrib4f {
8096 typedef VertexAttrib4f ValueType;
8097 static const CommandId kCmdId = kVertexAttrib4f;
8098 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8100 static uint32 ComputeSize() {
8101 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8104 void SetHeader() {
8105 header.SetCmd<ValueType>();
8108 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
8109 SetHeader();
8110 indx = _indx;
8111 x = _x;
8112 y = _y;
8113 z = _z;
8114 w = _w;
8117 void* Set(
8118 void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z,
8119 GLfloat _w) {
8120 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
8121 return NextCmdAddress<ValueType>(cmd);
8124 gpu::CommandHeader header;
8125 uint32 indx;
8126 float x;
8127 float y;
8128 float z;
8129 float w;
8132 COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24,
8133 Sizeof_VertexAttrib4f_is_not_24);
8134 COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0,
8135 OffsetOf_VertexAttrib4f_header_not_0);
8136 COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4,
8137 OffsetOf_VertexAttrib4f_indx_not_4);
8138 COMPILE_ASSERT(offsetof(VertexAttrib4f, x) == 8,
8139 OffsetOf_VertexAttrib4f_x_not_8);
8140 COMPILE_ASSERT(offsetof(VertexAttrib4f, y) == 12,
8141 OffsetOf_VertexAttrib4f_y_not_12);
8142 COMPILE_ASSERT(offsetof(VertexAttrib4f, z) == 16,
8143 OffsetOf_VertexAttrib4f_z_not_16);
8144 COMPILE_ASSERT(offsetof(VertexAttrib4f, w) == 20,
8145 OffsetOf_VertexAttrib4f_w_not_20);
8147 struct VertexAttrib4fv {
8148 typedef VertexAttrib4fv ValueType;
8149 static const CommandId kCmdId = kVertexAttrib4fv;
8150 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8152 static uint32 ComputeSize() {
8153 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8156 void SetHeader() {
8157 header.SetCmd<ValueType>();
8160 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
8161 SetHeader();
8162 indx = _indx;
8163 values_shm_id = _values_shm_id;
8164 values_shm_offset = _values_shm_offset;
8167 void* Set(
8168 void* cmd, GLuint _indx, uint32 _values_shm_id,
8169 uint32 _values_shm_offset) {
8170 static_cast<ValueType*>(
8171 cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
8172 return NextCmdAddress<ValueType>(cmd);
8175 gpu::CommandHeader header;
8176 uint32 indx;
8177 uint32 values_shm_id;
8178 uint32 values_shm_offset;
8181 COMPILE_ASSERT(sizeof(VertexAttrib4fv) == 16,
8182 Sizeof_VertexAttrib4fv_is_not_16);
8183 COMPILE_ASSERT(offsetof(VertexAttrib4fv, header) == 0,
8184 OffsetOf_VertexAttrib4fv_header_not_0);
8185 COMPILE_ASSERT(offsetof(VertexAttrib4fv, indx) == 4,
8186 OffsetOf_VertexAttrib4fv_indx_not_4);
8187 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_id) == 8,
8188 OffsetOf_VertexAttrib4fv_values_shm_id_not_8);
8189 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_offset) == 12,
8190 OffsetOf_VertexAttrib4fv_values_shm_offset_not_12);
8192 struct VertexAttrib4fvImmediate {
8193 typedef VertexAttrib4fvImmediate ValueType;
8194 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
8195 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8197 static uint32 ComputeDataSize() {
8198 return static_cast<uint32>(
8199 sizeof(GLfloat) * 4); // NOLINT
8202 static uint32 ComputeSize() {
8203 return static_cast<uint32>(
8204 sizeof(ValueType) + ComputeDataSize()); // NOLINT
8207 void SetHeader() {
8208 header.SetCmdByTotalSize<ValueType>(ComputeSize());
8211 void Init(GLuint _indx, const GLfloat* _values) {
8212 SetHeader();
8213 indx = _indx;
8214 memcpy(ImmediateDataAddress(this),
8215 _values, ComputeDataSize());
8218 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
8219 static_cast<ValueType*>(cmd)->Init(_indx, _values);
8220 const uint32 size = ComputeSize();
8221 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8224 gpu::CommandHeader header;
8225 uint32 indx;
8228 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8,
8229 Sizeof_VertexAttrib4fvImmediate_is_not_8);
8230 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0,
8231 OffsetOf_VertexAttrib4fvImmediate_header_not_0);
8232 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4,
8233 OffsetOf_VertexAttrib4fvImmediate_indx_not_4);
8235 struct VertexAttribPointer {
8236 typedef VertexAttribPointer ValueType;
8237 static const CommandId kCmdId = kVertexAttribPointer;
8238 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8240 static uint32 ComputeSize() {
8241 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8244 void SetHeader() {
8245 header.SetCmd<ValueType>();
8248 void Init(
8249 GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized,
8250 GLsizei _stride, GLuint _offset) {
8251 SetHeader();
8252 indx = _indx;
8253 size = _size;
8254 type = _type;
8255 normalized = _normalized;
8256 stride = _stride;
8257 offset = _offset;
8260 void* Set(
8261 void* cmd, GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized,
8262 GLsizei _stride, GLuint _offset) {
8263 static_cast<ValueType*>(
8264 cmd)->Init(_indx, _size, _type, _normalized, _stride, _offset);
8265 return NextCmdAddress<ValueType>(cmd);
8268 gpu::CommandHeader header;
8269 uint32 indx;
8270 int32 size;
8271 uint32 type;
8272 uint32 normalized;
8273 int32 stride;
8274 uint32 offset;
8277 COMPILE_ASSERT(sizeof(VertexAttribPointer) == 28,
8278 Sizeof_VertexAttribPointer_is_not_28);
8279 COMPILE_ASSERT(offsetof(VertexAttribPointer, header) == 0,
8280 OffsetOf_VertexAttribPointer_header_not_0);
8281 COMPILE_ASSERT(offsetof(VertexAttribPointer, indx) == 4,
8282 OffsetOf_VertexAttribPointer_indx_not_4);
8283 COMPILE_ASSERT(offsetof(VertexAttribPointer, size) == 8,
8284 OffsetOf_VertexAttribPointer_size_not_8);
8285 COMPILE_ASSERT(offsetof(VertexAttribPointer, type) == 12,
8286 OffsetOf_VertexAttribPointer_type_not_12);
8287 COMPILE_ASSERT(offsetof(VertexAttribPointer, normalized) == 16,
8288 OffsetOf_VertexAttribPointer_normalized_not_16);
8289 COMPILE_ASSERT(offsetof(VertexAttribPointer, stride) == 20,
8290 OffsetOf_VertexAttribPointer_stride_not_20);
8291 COMPILE_ASSERT(offsetof(VertexAttribPointer, offset) == 24,
8292 OffsetOf_VertexAttribPointer_offset_not_24);
8294 struct Viewport {
8295 typedef Viewport ValueType;
8296 static const CommandId kCmdId = kViewport;
8297 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8299 static uint32 ComputeSize() {
8300 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8303 void SetHeader() {
8304 header.SetCmd<ValueType>();
8307 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
8308 SetHeader();
8309 x = _x;
8310 y = _y;
8311 width = _width;
8312 height = _height;
8315 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
8316 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
8317 return NextCmdAddress<ValueType>(cmd);
8320 gpu::CommandHeader header;
8321 int32 x;
8322 int32 y;
8323 int32 width;
8324 int32 height;
8327 COMPILE_ASSERT(sizeof(Viewport) == 20,
8328 Sizeof_Viewport_is_not_20);
8329 COMPILE_ASSERT(offsetof(Viewport, header) == 0,
8330 OffsetOf_Viewport_header_not_0);
8331 COMPILE_ASSERT(offsetof(Viewport, x) == 4,
8332 OffsetOf_Viewport_x_not_4);
8333 COMPILE_ASSERT(offsetof(Viewport, y) == 8,
8334 OffsetOf_Viewport_y_not_8);
8335 COMPILE_ASSERT(offsetof(Viewport, width) == 12,
8336 OffsetOf_Viewport_width_not_12);
8337 COMPILE_ASSERT(offsetof(Viewport, height) == 16,
8338 OffsetOf_Viewport_height_not_16);
8340 struct BlitFramebufferEXT {
8341 typedef BlitFramebufferEXT ValueType;
8342 static const CommandId kCmdId = kBlitFramebufferEXT;
8343 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8345 static uint32 ComputeSize() {
8346 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8349 void SetHeader() {
8350 header.SetCmd<ValueType>();
8353 void Init(
8354 GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1, GLint _dstX0,
8355 GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask,
8356 GLenum _filter) {
8357 SetHeader();
8358 srcX0 = _srcX0;
8359 srcY0 = _srcY0;
8360 srcX1 = _srcX1;
8361 srcY1 = _srcY1;
8362 dstX0 = _dstX0;
8363 dstY0 = _dstY0;
8364 dstX1 = _dstX1;
8365 dstY1 = _dstY1;
8366 mask = _mask;
8367 filter = _filter;
8370 void* Set(
8371 void* cmd, GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1,
8372 GLint _dstX0, GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask,
8373 GLenum _filter) {
8374 static_cast<ValueType*>(
8375 cmd)->Init(
8376 _srcX0, _srcY0, _srcX1, _srcY1, _dstX0, _dstY0, _dstX1, _dstY1,
8377 _mask, _filter);
8378 return NextCmdAddress<ValueType>(cmd);
8381 gpu::CommandHeader header;
8382 int32 srcX0;
8383 int32 srcY0;
8384 int32 srcX1;
8385 int32 srcY1;
8386 int32 dstX0;
8387 int32 dstY0;
8388 int32 dstX1;
8389 int32 dstY1;
8390 uint32 mask;
8391 uint32 filter;
8394 COMPILE_ASSERT(sizeof(BlitFramebufferEXT) == 44,
8395 Sizeof_BlitFramebufferEXT_is_not_44);
8396 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, header) == 0,
8397 OffsetOf_BlitFramebufferEXT_header_not_0);
8398 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcX0) == 4,
8399 OffsetOf_BlitFramebufferEXT_srcX0_not_4);
8400 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcY0) == 8,
8401 OffsetOf_BlitFramebufferEXT_srcY0_not_8);
8402 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcX1) == 12,
8403 OffsetOf_BlitFramebufferEXT_srcX1_not_12);
8404 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcY1) == 16,
8405 OffsetOf_BlitFramebufferEXT_srcY1_not_16);
8406 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstX0) == 20,
8407 OffsetOf_BlitFramebufferEXT_dstX0_not_20);
8408 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstY0) == 24,
8409 OffsetOf_BlitFramebufferEXT_dstY0_not_24);
8410 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstX1) == 28,
8411 OffsetOf_BlitFramebufferEXT_dstX1_not_28);
8412 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstY1) == 32,
8413 OffsetOf_BlitFramebufferEXT_dstY1_not_32);
8414 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, mask) == 36,
8415 OffsetOf_BlitFramebufferEXT_mask_not_36);
8416 COMPILE_ASSERT(offsetof(BlitFramebufferEXT, filter) == 40,
8417 OffsetOf_BlitFramebufferEXT_filter_not_40);
8419 struct RenderbufferStorageMultisampleEXT {
8420 typedef RenderbufferStorageMultisampleEXT ValueType;
8421 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
8422 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8424 static uint32 ComputeSize() {
8425 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8428 void SetHeader() {
8429 header.SetCmd<ValueType>();
8432 void Init(
8433 GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width,
8434 GLsizei _height) {
8435 SetHeader();
8436 target = _target;
8437 samples = _samples;
8438 internalformat = _internalformat;
8439 width = _width;
8440 height = _height;
8443 void* Set(
8444 void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat,
8445 GLsizei _width, GLsizei _height) {
8446 static_cast<ValueType*>(
8447 cmd)->Init(_target, _samples, _internalformat, _width, _height);
8448 return NextCmdAddress<ValueType>(cmd);
8451 gpu::CommandHeader header;
8452 uint32 target;
8453 int32 samples;
8454 uint32 internalformat;
8455 int32 width;
8456 int32 height;
8459 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT) == 24,
8460 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24);
8461 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
8462 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0);
8463 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
8464 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4);
8465 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
8466 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8);
8467 COMPILE_ASSERT(
8468 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
8469 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12); // NOLINT
8470 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
8471 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16);
8472 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
8473 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20);
8475 struct FramebufferTexture2DMultisampleEXT {
8476 typedef FramebufferTexture2DMultisampleEXT ValueType;
8477 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
8478 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8480 static uint32 ComputeSize() {
8481 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8484 void SetHeader() {
8485 header.SetCmd<ValueType>();
8488 void Init(
8489 GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture,
8490 GLint _level, GLsizei _samples) {
8491 SetHeader();
8492 target = _target;
8493 attachment = _attachment;
8494 textarget = _textarget;
8495 texture = _texture;
8496 level = _level;
8497 samples = _samples;
8500 void* Set(
8501 void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget,
8502 GLuint _texture, GLint _level, GLsizei _samples) {
8503 static_cast<ValueType*>(
8504 cmd)->Init(
8505 _target, _attachment, _textarget, _texture, _level, _samples);
8506 return NextCmdAddress<ValueType>(cmd);
8509 gpu::CommandHeader header;
8510 uint32 target;
8511 uint32 attachment;
8512 uint32 textarget;
8513 uint32 texture;
8514 int32 level;
8515 int32 samples;
8518 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT) == 28,
8519 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_28);
8520 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
8521 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0);
8522 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
8523 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4);
8524 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
8525 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8);
8526 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
8527 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12);
8528 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
8529 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16);
8530 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, level) == 20,
8531 OffsetOf_FramebufferTexture2DMultisampleEXT_level_not_20);
8532 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, samples) == 24,
8533 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_24);
8535 struct TexStorage2DEXT {
8536 typedef TexStorage2DEXT ValueType;
8537 static const CommandId kCmdId = kTexStorage2DEXT;
8538 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8540 static uint32 ComputeSize() {
8541 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8544 void SetHeader() {
8545 header.SetCmd<ValueType>();
8548 void Init(
8549 GLenum _target, GLsizei _levels, GLenum _internalFormat, GLsizei _width,
8550 GLsizei _height) {
8551 SetHeader();
8552 target = _target;
8553 levels = _levels;
8554 internalFormat = _internalFormat;
8555 width = _width;
8556 height = _height;
8559 void* Set(
8560 void* cmd, GLenum _target, GLsizei _levels, GLenum _internalFormat,
8561 GLsizei _width, GLsizei _height) {
8562 static_cast<ValueType*>(
8563 cmd)->Init(_target, _levels, _internalFormat, _width, _height);
8564 return NextCmdAddress<ValueType>(cmd);
8567 gpu::CommandHeader header;
8568 uint32 target;
8569 int32 levels;
8570 uint32 internalFormat;
8571 int32 width;
8572 int32 height;
8575 COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24,
8576 Sizeof_TexStorage2DEXT_is_not_24);
8577 COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0,
8578 OffsetOf_TexStorage2DEXT_header_not_0);
8579 COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4,
8580 OffsetOf_TexStorage2DEXT_target_not_4);
8581 COMPILE_ASSERT(offsetof(TexStorage2DEXT, levels) == 8,
8582 OffsetOf_TexStorage2DEXT_levels_not_8);
8583 COMPILE_ASSERT(offsetof(TexStorage2DEXT, internalFormat) == 12,
8584 OffsetOf_TexStorage2DEXT_internalFormat_not_12);
8585 COMPILE_ASSERT(offsetof(TexStorage2DEXT, width) == 16,
8586 OffsetOf_TexStorage2DEXT_width_not_16);
8587 COMPILE_ASSERT(offsetof(TexStorage2DEXT, height) == 20,
8588 OffsetOf_TexStorage2DEXT_height_not_20);
8590 struct GenQueriesEXT {
8591 typedef GenQueriesEXT ValueType;
8592 static const CommandId kCmdId = kGenQueriesEXT;
8593 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8595 static uint32 ComputeSize() {
8596 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8599 void SetHeader() {
8600 header.SetCmd<ValueType>();
8603 void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
8604 SetHeader();
8605 n = _n;
8606 queries_shm_id = _queries_shm_id;
8607 queries_shm_offset = _queries_shm_offset;
8610 void* Set(
8611 void* cmd, GLsizei _n, uint32 _queries_shm_id,
8612 uint32 _queries_shm_offset) {
8613 static_cast<ValueType*>(
8614 cmd)->Init(_n, _queries_shm_id, _queries_shm_offset);
8615 return NextCmdAddress<ValueType>(cmd);
8618 gpu::CommandHeader header;
8619 int32 n;
8620 uint32 queries_shm_id;
8621 uint32 queries_shm_offset;
8624 COMPILE_ASSERT(sizeof(GenQueriesEXT) == 16,
8625 Sizeof_GenQueriesEXT_is_not_16);
8626 COMPILE_ASSERT(offsetof(GenQueriesEXT, header) == 0,
8627 OffsetOf_GenQueriesEXT_header_not_0);
8628 COMPILE_ASSERT(offsetof(GenQueriesEXT, n) == 4,
8629 OffsetOf_GenQueriesEXT_n_not_4);
8630 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_id) == 8,
8631 OffsetOf_GenQueriesEXT_queries_shm_id_not_8);
8632 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_offset) == 12,
8633 OffsetOf_GenQueriesEXT_queries_shm_offset_not_12);
8635 struct GenQueriesEXTImmediate {
8636 typedef GenQueriesEXTImmediate ValueType;
8637 static const CommandId kCmdId = kGenQueriesEXTImmediate;
8638 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8640 static uint32 ComputeDataSize(GLsizei n) {
8641 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8644 static uint32 ComputeSize(GLsizei n) {
8645 return static_cast<uint32>(
8646 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
8649 void SetHeader(GLsizei n) {
8650 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8653 void Init(GLsizei _n, GLuint* _queries) {
8654 SetHeader(_n);
8655 n = _n;
8656 memcpy(ImmediateDataAddress(this),
8657 _queries, ComputeDataSize(_n));
8660 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
8661 static_cast<ValueType*>(cmd)->Init(_n, _queries);
8662 const uint32 size = ComputeSize(_n);
8663 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8666 gpu::CommandHeader header;
8667 int32 n;
8670 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate) == 8,
8671 Sizeof_GenQueriesEXTImmediate_is_not_8);
8672 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, header) == 0,
8673 OffsetOf_GenQueriesEXTImmediate_header_not_0);
8674 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, n) == 4,
8675 OffsetOf_GenQueriesEXTImmediate_n_not_4);
8677 struct DeleteQueriesEXT {
8678 typedef DeleteQueriesEXT ValueType;
8679 static const CommandId kCmdId = kDeleteQueriesEXT;
8680 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8682 static uint32 ComputeSize() {
8683 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8686 void SetHeader() {
8687 header.SetCmd<ValueType>();
8690 void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
8691 SetHeader();
8692 n = _n;
8693 queries_shm_id = _queries_shm_id;
8694 queries_shm_offset = _queries_shm_offset;
8697 void* Set(
8698 void* cmd, GLsizei _n, uint32 _queries_shm_id,
8699 uint32 _queries_shm_offset) {
8700 static_cast<ValueType*>(
8701 cmd)->Init(_n, _queries_shm_id, _queries_shm_offset);
8702 return NextCmdAddress<ValueType>(cmd);
8705 gpu::CommandHeader header;
8706 int32 n;
8707 uint32 queries_shm_id;
8708 uint32 queries_shm_offset;
8711 COMPILE_ASSERT(sizeof(DeleteQueriesEXT) == 16,
8712 Sizeof_DeleteQueriesEXT_is_not_16);
8713 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, header) == 0,
8714 OffsetOf_DeleteQueriesEXT_header_not_0);
8715 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, n) == 4,
8716 OffsetOf_DeleteQueriesEXT_n_not_4);
8717 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_id) == 8,
8718 OffsetOf_DeleteQueriesEXT_queries_shm_id_not_8);
8719 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_offset) == 12,
8720 OffsetOf_DeleteQueriesEXT_queries_shm_offset_not_12);
8722 struct DeleteQueriesEXTImmediate {
8723 typedef DeleteQueriesEXTImmediate ValueType;
8724 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
8725 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8727 static uint32 ComputeDataSize(GLsizei n) {
8728 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8731 static uint32 ComputeSize(GLsizei n) {
8732 return static_cast<uint32>(
8733 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
8736 void SetHeader(GLsizei n) {
8737 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8740 void Init(GLsizei _n, const GLuint* _queries) {
8741 SetHeader(_n);
8742 n = _n;
8743 memcpy(ImmediateDataAddress(this),
8744 _queries, ComputeDataSize(_n));
8747 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
8748 static_cast<ValueType*>(cmd)->Init(_n, _queries);
8749 const uint32 size = ComputeSize(_n);
8750 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8753 gpu::CommandHeader header;
8754 int32 n;
8757 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate) == 8,
8758 Sizeof_DeleteQueriesEXTImmediate_is_not_8);
8759 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, header) == 0,
8760 OffsetOf_DeleteQueriesEXTImmediate_header_not_0);
8761 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, n) == 4,
8762 OffsetOf_DeleteQueriesEXTImmediate_n_not_4);
8764 struct BeginQueryEXT {
8765 typedef BeginQueryEXT ValueType;
8766 static const CommandId kCmdId = kBeginQueryEXT;
8767 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8769 static uint32 ComputeSize() {
8770 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8773 void SetHeader() {
8774 header.SetCmd<ValueType>();
8777 void Init(
8778 GLenum _target, GLuint _id, uint32 _sync_data_shm_id,
8779 uint32 _sync_data_shm_offset) {
8780 SetHeader();
8781 target = _target;
8782 id = _id;
8783 sync_data_shm_id = _sync_data_shm_id;
8784 sync_data_shm_offset = _sync_data_shm_offset;
8787 void* Set(
8788 void* cmd, GLenum _target, GLuint _id, uint32 _sync_data_shm_id,
8789 uint32 _sync_data_shm_offset) {
8790 static_cast<ValueType*>(
8791 cmd)->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
8792 return NextCmdAddress<ValueType>(cmd);
8795 gpu::CommandHeader header;
8796 uint32 target;
8797 uint32 id;
8798 uint32 sync_data_shm_id;
8799 uint32 sync_data_shm_offset;
8802 COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20,
8803 Sizeof_BeginQueryEXT_is_not_20);
8804 COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0,
8805 OffsetOf_BeginQueryEXT_header_not_0);
8806 COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4,
8807 OffsetOf_BeginQueryEXT_target_not_4);
8808 COMPILE_ASSERT(offsetof(BeginQueryEXT, id) == 8,
8809 OffsetOf_BeginQueryEXT_id_not_8);
8810 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
8811 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12);
8812 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
8813 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16);
8815 struct EndQueryEXT {
8816 typedef EndQueryEXT ValueType;
8817 static const CommandId kCmdId = kEndQueryEXT;
8818 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8820 static uint32 ComputeSize() {
8821 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8824 void SetHeader() {
8825 header.SetCmd<ValueType>();
8828 void Init(GLenum _target, GLuint _submit_count) {
8829 SetHeader();
8830 target = _target;
8831 submit_count = _submit_count;
8834 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
8835 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
8836 return NextCmdAddress<ValueType>(cmd);
8839 gpu::CommandHeader header;
8840 uint32 target;
8841 uint32 submit_count;
8844 COMPILE_ASSERT(sizeof(EndQueryEXT) == 12,
8845 Sizeof_EndQueryEXT_is_not_12);
8846 COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0,
8847 OffsetOf_EndQueryEXT_header_not_0);
8848 COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4,
8849 OffsetOf_EndQueryEXT_target_not_4);
8850 COMPILE_ASSERT(offsetof(EndQueryEXT, submit_count) == 8,
8851 OffsetOf_EndQueryEXT_submit_count_not_8);
8853 struct InsertEventMarkerEXT {
8854 typedef InsertEventMarkerEXT ValueType;
8855 static const CommandId kCmdId = kInsertEventMarkerEXT;
8856 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8858 static uint32 ComputeSize() {
8859 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8862 void SetHeader() {
8863 header.SetCmd<ValueType>();
8866 void Init(GLuint _bucket_id) {
8867 SetHeader();
8868 bucket_id = _bucket_id;
8871 void* Set(void* cmd, GLuint _bucket_id) {
8872 static_cast<ValueType*>(cmd)->Init(_bucket_id);
8873 return NextCmdAddress<ValueType>(cmd);
8876 gpu::CommandHeader header;
8877 uint32 bucket_id;
8880 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT) == 8,
8881 Sizeof_InsertEventMarkerEXT_is_not_8);
8882 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, header) == 0,
8883 OffsetOf_InsertEventMarkerEXT_header_not_0);
8884 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
8885 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4);
8887 struct PushGroupMarkerEXT {
8888 typedef PushGroupMarkerEXT ValueType;
8889 static const CommandId kCmdId = kPushGroupMarkerEXT;
8890 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8892 static uint32 ComputeSize() {
8893 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8896 void SetHeader() {
8897 header.SetCmd<ValueType>();
8900 void Init(GLuint _bucket_id) {
8901 SetHeader();
8902 bucket_id = _bucket_id;
8905 void* Set(void* cmd, GLuint _bucket_id) {
8906 static_cast<ValueType*>(cmd)->Init(_bucket_id);
8907 return NextCmdAddress<ValueType>(cmd);
8910 gpu::CommandHeader header;
8911 uint32 bucket_id;
8914 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT) == 8,
8915 Sizeof_PushGroupMarkerEXT_is_not_8);
8916 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, header) == 0,
8917 OffsetOf_PushGroupMarkerEXT_header_not_0);
8918 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
8919 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4);
8921 struct PopGroupMarkerEXT {
8922 typedef PopGroupMarkerEXT ValueType;
8923 static const CommandId kCmdId = kPopGroupMarkerEXT;
8924 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8926 static uint32 ComputeSize() {
8927 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8930 void SetHeader() {
8931 header.SetCmd<ValueType>();
8934 void Init() {
8935 SetHeader();
8938 void* Set(void* cmd) {
8939 static_cast<ValueType*>(cmd)->Init();
8940 return NextCmdAddress<ValueType>(cmd);
8943 gpu::CommandHeader header;
8946 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT) == 4,
8947 Sizeof_PopGroupMarkerEXT_is_not_4);
8948 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT, header) == 0,
8949 OffsetOf_PopGroupMarkerEXT_header_not_0);
8951 struct GenVertexArraysOES {
8952 typedef GenVertexArraysOES ValueType;
8953 static const CommandId kCmdId = kGenVertexArraysOES;
8954 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8956 static uint32 ComputeSize() {
8957 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8960 void SetHeader() {
8961 header.SetCmd<ValueType>();
8964 void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
8965 SetHeader();
8966 n = _n;
8967 arrays_shm_id = _arrays_shm_id;
8968 arrays_shm_offset = _arrays_shm_offset;
8971 void* Set(
8972 void* cmd, GLsizei _n, uint32 _arrays_shm_id,
8973 uint32 _arrays_shm_offset) {
8974 static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
8975 return NextCmdAddress<ValueType>(cmd);
8978 gpu::CommandHeader header;
8979 int32 n;
8980 uint32 arrays_shm_id;
8981 uint32 arrays_shm_offset;
8984 COMPILE_ASSERT(sizeof(GenVertexArraysOES) == 16,
8985 Sizeof_GenVertexArraysOES_is_not_16);
8986 COMPILE_ASSERT(offsetof(GenVertexArraysOES, header) == 0,
8987 OffsetOf_GenVertexArraysOES_header_not_0);
8988 COMPILE_ASSERT(offsetof(GenVertexArraysOES, n) == 4,
8989 OffsetOf_GenVertexArraysOES_n_not_4);
8990 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_id) == 8,
8991 OffsetOf_GenVertexArraysOES_arrays_shm_id_not_8);
8992 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_offset) == 12,
8993 OffsetOf_GenVertexArraysOES_arrays_shm_offset_not_12);
8995 struct GenVertexArraysOESImmediate {
8996 typedef GenVertexArraysOESImmediate ValueType;
8997 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
8998 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9000 static uint32 ComputeDataSize(GLsizei n) {
9001 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
9004 static uint32 ComputeSize(GLsizei n) {
9005 return static_cast<uint32>(
9006 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
9009 void SetHeader(GLsizei n) {
9010 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
9013 void Init(GLsizei _n, GLuint* _arrays) {
9014 SetHeader(_n);
9015 n = _n;
9016 memcpy(ImmediateDataAddress(this),
9017 _arrays, ComputeDataSize(_n));
9020 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
9021 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
9022 const uint32 size = ComputeSize(_n);
9023 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9026 gpu::CommandHeader header;
9027 int32 n;
9030 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate) == 8,
9031 Sizeof_GenVertexArraysOESImmediate_is_not_8);
9032 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, header) == 0,
9033 OffsetOf_GenVertexArraysOESImmediate_header_not_0);
9034 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, n) == 4,
9035 OffsetOf_GenVertexArraysOESImmediate_n_not_4);
9037 struct DeleteVertexArraysOES {
9038 typedef DeleteVertexArraysOES ValueType;
9039 static const CommandId kCmdId = kDeleteVertexArraysOES;
9040 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9042 static uint32 ComputeSize() {
9043 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9046 void SetHeader() {
9047 header.SetCmd<ValueType>();
9050 void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
9051 SetHeader();
9052 n = _n;
9053 arrays_shm_id = _arrays_shm_id;
9054 arrays_shm_offset = _arrays_shm_offset;
9057 void* Set(
9058 void* cmd, GLsizei _n, uint32 _arrays_shm_id,
9059 uint32 _arrays_shm_offset) {
9060 static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
9061 return NextCmdAddress<ValueType>(cmd);
9064 gpu::CommandHeader header;
9065 int32 n;
9066 uint32 arrays_shm_id;
9067 uint32 arrays_shm_offset;
9070 COMPILE_ASSERT(sizeof(DeleteVertexArraysOES) == 16,
9071 Sizeof_DeleteVertexArraysOES_is_not_16);
9072 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, header) == 0,
9073 OffsetOf_DeleteVertexArraysOES_header_not_0);
9074 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, n) == 4,
9075 OffsetOf_DeleteVertexArraysOES_n_not_4);
9076 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_id) == 8,
9077 OffsetOf_DeleteVertexArraysOES_arrays_shm_id_not_8);
9078 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_offset) == 12,
9079 OffsetOf_DeleteVertexArraysOES_arrays_shm_offset_not_12);
9081 struct DeleteVertexArraysOESImmediate {
9082 typedef DeleteVertexArraysOESImmediate ValueType;
9083 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
9084 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9086 static uint32 ComputeDataSize(GLsizei n) {
9087 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
9090 static uint32 ComputeSize(GLsizei n) {
9091 return static_cast<uint32>(
9092 sizeof(ValueType) + ComputeDataSize(n)); // NOLINT
9095 void SetHeader(GLsizei n) {
9096 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
9099 void Init(GLsizei _n, const GLuint* _arrays) {
9100 SetHeader(_n);
9101 n = _n;
9102 memcpy(ImmediateDataAddress(this),
9103 _arrays, ComputeDataSize(_n));
9106 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
9107 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
9108 const uint32 size = ComputeSize(_n);
9109 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9112 gpu::CommandHeader header;
9113 int32 n;
9116 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate) == 8,
9117 Sizeof_DeleteVertexArraysOESImmediate_is_not_8);
9118 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
9119 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0);
9120 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
9121 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4);
9123 struct IsVertexArrayOES {
9124 typedef IsVertexArrayOES ValueType;
9125 static const CommandId kCmdId = kIsVertexArrayOES;
9126 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9128 typedef uint32 Result;
9130 static uint32 ComputeSize() {
9131 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9134 void SetHeader() {
9135 header.SetCmd<ValueType>();
9138 void Init(GLuint _array, uint32 _result_shm_id, uint32 _result_shm_offset) {
9139 SetHeader();
9140 array = _array;
9141 result_shm_id = _result_shm_id;
9142 result_shm_offset = _result_shm_offset;
9145 void* Set(
9146 void* cmd, GLuint _array, uint32 _result_shm_id,
9147 uint32 _result_shm_offset) {
9148 static_cast<ValueType*>(
9149 cmd)->Init(_array, _result_shm_id, _result_shm_offset);
9150 return NextCmdAddress<ValueType>(cmd);
9153 gpu::CommandHeader header;
9154 uint32 array;
9155 uint32 result_shm_id;
9156 uint32 result_shm_offset;
9159 COMPILE_ASSERT(sizeof(IsVertexArrayOES) == 16,
9160 Sizeof_IsVertexArrayOES_is_not_16);
9161 COMPILE_ASSERT(offsetof(IsVertexArrayOES, header) == 0,
9162 OffsetOf_IsVertexArrayOES_header_not_0);
9163 COMPILE_ASSERT(offsetof(IsVertexArrayOES, array) == 4,
9164 OffsetOf_IsVertexArrayOES_array_not_4);
9165 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_id) == 8,
9166 OffsetOf_IsVertexArrayOES_result_shm_id_not_8);
9167 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
9168 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12);
9170 struct BindVertexArrayOES {
9171 typedef BindVertexArrayOES ValueType;
9172 static const CommandId kCmdId = kBindVertexArrayOES;
9173 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9175 static uint32 ComputeSize() {
9176 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9179 void SetHeader() {
9180 header.SetCmd<ValueType>();
9183 void Init(GLuint _array) {
9184 SetHeader();
9185 array = _array;
9188 void* Set(void* cmd, GLuint _array) {
9189 static_cast<ValueType*>(cmd)->Init(_array);
9190 return NextCmdAddress<ValueType>(cmd);
9193 gpu::CommandHeader header;
9194 uint32 array;
9197 COMPILE_ASSERT(sizeof(BindVertexArrayOES) == 8,
9198 Sizeof_BindVertexArrayOES_is_not_8);
9199 COMPILE_ASSERT(offsetof(BindVertexArrayOES, header) == 0,
9200 OffsetOf_BindVertexArrayOES_header_not_0);
9201 COMPILE_ASSERT(offsetof(BindVertexArrayOES, array) == 4,
9202 OffsetOf_BindVertexArrayOES_array_not_4);
9204 struct SwapBuffers {
9205 typedef SwapBuffers ValueType;
9206 static const CommandId kCmdId = kSwapBuffers;
9207 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9209 static uint32 ComputeSize() {
9210 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9213 void SetHeader() {
9214 header.SetCmd<ValueType>();
9217 void Init() {
9218 SetHeader();
9221 void* Set(void* cmd) {
9222 static_cast<ValueType*>(cmd)->Init();
9223 return NextCmdAddress<ValueType>(cmd);
9226 gpu::CommandHeader header;
9229 COMPILE_ASSERT(sizeof(SwapBuffers) == 4,
9230 Sizeof_SwapBuffers_is_not_4);
9231 COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0,
9232 OffsetOf_SwapBuffers_header_not_0);
9234 struct GetMaxValueInBufferCHROMIUM {
9235 typedef GetMaxValueInBufferCHROMIUM ValueType;
9236 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
9237 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9239 typedef GLuint Result;
9241 static uint32 ComputeSize() {
9242 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9245 void SetHeader() {
9246 header.SetCmd<ValueType>();
9249 void Init(
9250 GLuint _buffer_id, GLsizei _count, GLenum _type, GLuint _offset,
9251 uint32 _result_shm_id, uint32 _result_shm_offset) {
9252 SetHeader();
9253 buffer_id = _buffer_id;
9254 count = _count;
9255 type = _type;
9256 offset = _offset;
9257 result_shm_id = _result_shm_id;
9258 result_shm_offset = _result_shm_offset;
9261 void* Set(
9262 void* cmd, GLuint _buffer_id, GLsizei _count, GLenum _type,
9263 GLuint _offset, uint32 _result_shm_id, uint32 _result_shm_offset) {
9264 static_cast<ValueType*>(
9265 cmd)->Init(
9266 _buffer_id, _count, _type, _offset, _result_shm_id,
9267 _result_shm_offset);
9268 return NextCmdAddress<ValueType>(cmd);
9271 gpu::CommandHeader header;
9272 uint32 buffer_id;
9273 int32 count;
9274 uint32 type;
9275 uint32 offset;
9276 uint32 result_shm_id;
9277 uint32 result_shm_offset;
9280 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
9281 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28);
9282 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
9283 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0);
9284 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
9285 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4);
9286 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
9287 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8);
9288 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
9289 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12);
9290 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
9291 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16);
9292 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
9293 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20);
9294 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
9295 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24);
9297 struct GenSharedIdsCHROMIUM {
9298 typedef GenSharedIdsCHROMIUM ValueType;
9299 static const CommandId kCmdId = kGenSharedIdsCHROMIUM;
9300 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9302 static uint32 ComputeSize() {
9303 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9306 void SetHeader() {
9307 header.SetCmd<ValueType>();
9310 void Init(
9311 GLuint _namespace_id, GLuint _id_offset, GLsizei _n, uint32 _ids_shm_id,
9312 uint32 _ids_shm_offset) {
9313 SetHeader();
9314 namespace_id = _namespace_id;
9315 id_offset = _id_offset;
9316 n = _n;
9317 ids_shm_id = _ids_shm_id;
9318 ids_shm_offset = _ids_shm_offset;
9321 void* Set(
9322 void* cmd, GLuint _namespace_id, GLuint _id_offset, GLsizei _n,
9323 uint32 _ids_shm_id, uint32 _ids_shm_offset) {
9324 static_cast<ValueType*>(
9325 cmd)->Init(
9326 _namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset);
9327 return NextCmdAddress<ValueType>(cmd);
9330 gpu::CommandHeader header;
9331 uint32 namespace_id;
9332 uint32 id_offset;
9333 int32 n;
9334 uint32 ids_shm_id;
9335 uint32 ids_shm_offset;
9338 COMPILE_ASSERT(sizeof(GenSharedIdsCHROMIUM) == 24,
9339 Sizeof_GenSharedIdsCHROMIUM_is_not_24);
9340 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, header) == 0,
9341 OffsetOf_GenSharedIdsCHROMIUM_header_not_0);
9342 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, namespace_id) == 4,
9343 OffsetOf_GenSharedIdsCHROMIUM_namespace_id_not_4);
9344 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, id_offset) == 8,
9345 OffsetOf_GenSharedIdsCHROMIUM_id_offset_not_8);
9346 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, n) == 12,
9347 OffsetOf_GenSharedIdsCHROMIUM_n_not_12);
9348 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_id) == 16,
9349 OffsetOf_GenSharedIdsCHROMIUM_ids_shm_id_not_16);
9350 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_offset) == 20,
9351 OffsetOf_GenSharedIdsCHROMIUM_ids_shm_offset_not_20);
9353 struct DeleteSharedIdsCHROMIUM {
9354 typedef DeleteSharedIdsCHROMIUM ValueType;
9355 static const CommandId kCmdId = kDeleteSharedIdsCHROMIUM;
9356 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9358 static uint32 ComputeSize() {
9359 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9362 void SetHeader() {
9363 header.SetCmd<ValueType>();
9366 void Init(
9367 GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
9368 uint32 _ids_shm_offset) {
9369 SetHeader();
9370 namespace_id = _namespace_id;
9371 n = _n;
9372 ids_shm_id = _ids_shm_id;
9373 ids_shm_offset = _ids_shm_offset;
9376 void* Set(
9377 void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
9378 uint32 _ids_shm_offset) {
9379 static_cast<ValueType*>(
9380 cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
9381 return NextCmdAddress<ValueType>(cmd);
9384 gpu::CommandHeader header;
9385 uint32 namespace_id;
9386 int32 n;
9387 uint32 ids_shm_id;
9388 uint32 ids_shm_offset;
9391 COMPILE_ASSERT(sizeof(DeleteSharedIdsCHROMIUM) == 20,
9392 Sizeof_DeleteSharedIdsCHROMIUM_is_not_20);
9393 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, header) == 0,
9394 OffsetOf_DeleteSharedIdsCHROMIUM_header_not_0);
9395 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, namespace_id) == 4,
9396 OffsetOf_DeleteSharedIdsCHROMIUM_namespace_id_not_4);
9397 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, n) == 8,
9398 OffsetOf_DeleteSharedIdsCHROMIUM_n_not_8);
9399 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_id) == 12,
9400 OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_id_not_12);
9401 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_offset) == 16,
9402 OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_offset_not_16);
9404 struct RegisterSharedIdsCHROMIUM {
9405 typedef RegisterSharedIdsCHROMIUM ValueType;
9406 static const CommandId kCmdId = kRegisterSharedIdsCHROMIUM;
9407 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9409 static uint32 ComputeSize() {
9410 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9413 void SetHeader() {
9414 header.SetCmd<ValueType>();
9417 void Init(
9418 GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
9419 uint32 _ids_shm_offset) {
9420 SetHeader();
9421 namespace_id = _namespace_id;
9422 n = _n;
9423 ids_shm_id = _ids_shm_id;
9424 ids_shm_offset = _ids_shm_offset;
9427 void* Set(
9428 void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
9429 uint32 _ids_shm_offset) {
9430 static_cast<ValueType*>(
9431 cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
9432 return NextCmdAddress<ValueType>(cmd);
9435 gpu::CommandHeader header;
9436 uint32 namespace_id;
9437 int32 n;
9438 uint32 ids_shm_id;
9439 uint32 ids_shm_offset;
9442 COMPILE_ASSERT(sizeof(RegisterSharedIdsCHROMIUM) == 20,
9443 Sizeof_RegisterSharedIdsCHROMIUM_is_not_20);
9444 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, header) == 0,
9445 OffsetOf_RegisterSharedIdsCHROMIUM_header_not_0);
9446 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, namespace_id) == 4,
9447 OffsetOf_RegisterSharedIdsCHROMIUM_namespace_id_not_4);
9448 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, n) == 8,
9449 OffsetOf_RegisterSharedIdsCHROMIUM_n_not_8);
9450 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_id) == 12,
9451 OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_id_not_12);
9452 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_offset) == 16,
9453 OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_offset_not_16);
9455 struct EnableFeatureCHROMIUM {
9456 typedef EnableFeatureCHROMIUM ValueType;
9457 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
9458 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9460 typedef GLint Result;
9462 static uint32 ComputeSize() {
9463 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9466 void SetHeader() {
9467 header.SetCmd<ValueType>();
9470 void Init(
9471 GLuint _bucket_id, uint32 _result_shm_id, uint32 _result_shm_offset) {
9472 SetHeader();
9473 bucket_id = _bucket_id;
9474 result_shm_id = _result_shm_id;
9475 result_shm_offset = _result_shm_offset;
9478 void* Set(
9479 void* cmd, GLuint _bucket_id, uint32 _result_shm_id,
9480 uint32 _result_shm_offset) {
9481 static_cast<ValueType*>(
9482 cmd)->Init(_bucket_id, _result_shm_id, _result_shm_offset);
9483 return NextCmdAddress<ValueType>(cmd);
9486 gpu::CommandHeader header;
9487 uint32 bucket_id;
9488 uint32 result_shm_id;
9489 uint32 result_shm_offset;
9492 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16,
9493 Sizeof_EnableFeatureCHROMIUM_is_not_16);
9494 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0,
9495 OffsetOf_EnableFeatureCHROMIUM_header_not_0);
9496 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
9497 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4);
9498 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
9499 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8);
9500 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
9501 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12);
9503 struct ResizeCHROMIUM {
9504 typedef ResizeCHROMIUM ValueType;
9505 static const CommandId kCmdId = kResizeCHROMIUM;
9506 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9508 static uint32 ComputeSize() {
9509 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9512 void SetHeader() {
9513 header.SetCmd<ValueType>();
9516 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
9517 SetHeader();
9518 width = _width;
9519 height = _height;
9520 scale_factor = _scale_factor;
9523 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
9524 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
9525 return NextCmdAddress<ValueType>(cmd);
9528 gpu::CommandHeader header;
9529 uint32 width;
9530 uint32 height;
9531 float scale_factor;
9534 COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16,
9535 Sizeof_ResizeCHROMIUM_is_not_16);
9536 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0,
9537 OffsetOf_ResizeCHROMIUM_header_not_0);
9538 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4,
9539 OffsetOf_ResizeCHROMIUM_width_not_4);
9540 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, height) == 8,
9541 OffsetOf_ResizeCHROMIUM_height_not_8);
9542 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, scale_factor) == 12,
9543 OffsetOf_ResizeCHROMIUM_scale_factor_not_12);
9545 struct GetRequestableExtensionsCHROMIUM {
9546 typedef GetRequestableExtensionsCHROMIUM ValueType;
9547 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
9548 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9550 static uint32 ComputeSize() {
9551 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9554 void SetHeader() {
9555 header.SetCmd<ValueType>();
9558 void Init(uint32 _bucket_id) {
9559 SetHeader();
9560 bucket_id = _bucket_id;
9563 void* Set(void* cmd, uint32 _bucket_id) {
9564 static_cast<ValueType*>(cmd)->Init(_bucket_id);
9565 return NextCmdAddress<ValueType>(cmd);
9568 gpu::CommandHeader header;
9569 uint32 bucket_id;
9572 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
9573 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8);
9574 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
9575 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0);
9576 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
9577 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4);
9579 struct RequestExtensionCHROMIUM {
9580 typedef RequestExtensionCHROMIUM ValueType;
9581 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
9582 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9584 static uint32 ComputeSize() {
9585 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9588 void SetHeader() {
9589 header.SetCmd<ValueType>();
9592 void Init(uint32 _bucket_id) {
9593 SetHeader();
9594 bucket_id = _bucket_id;
9597 void* Set(void* cmd, uint32 _bucket_id) {
9598 static_cast<ValueType*>(cmd)->Init(_bucket_id);
9599 return NextCmdAddress<ValueType>(cmd);
9602 gpu::CommandHeader header;
9603 uint32 bucket_id;
9606 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM) == 8,
9607 Sizeof_RequestExtensionCHROMIUM_is_not_8);
9608 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0,
9609 OffsetOf_RequestExtensionCHROMIUM_header_not_0);
9610 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
9611 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4);
9613 struct GetMultipleIntegervCHROMIUM {
9614 typedef GetMultipleIntegervCHROMIUM ValueType;
9615 static const CommandId kCmdId = kGetMultipleIntegervCHROMIUM;
9616 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9618 static uint32 ComputeSize() {
9619 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9622 void SetHeader() {
9623 header.SetCmd<ValueType>();
9626 void Init(
9627 uint32 _pnames_shm_id, uint32 _pnames_shm_offset, GLuint _count,
9628 uint32 _results_shm_id, uint32 _results_shm_offset, GLsizeiptr _size) {
9629 SetHeader();
9630 pnames_shm_id = _pnames_shm_id;
9631 pnames_shm_offset = _pnames_shm_offset;
9632 count = _count;
9633 results_shm_id = _results_shm_id;
9634 results_shm_offset = _results_shm_offset;
9635 size = _size;
9638 void* Set(
9639 void* cmd, uint32 _pnames_shm_id, uint32 _pnames_shm_offset,
9640 GLuint _count, uint32 _results_shm_id, uint32 _results_shm_offset,
9641 GLsizeiptr _size) {
9642 static_cast<ValueType*>(
9643 cmd)->Init(
9644 _pnames_shm_id, _pnames_shm_offset, _count, _results_shm_id,
9645 _results_shm_offset, _size);
9646 return NextCmdAddress<ValueType>(cmd);
9649 gpu::CommandHeader header;
9650 uint32 pnames_shm_id;
9651 uint32 pnames_shm_offset;
9652 uint32 count;
9653 uint32 results_shm_id;
9654 uint32 results_shm_offset;
9655 int32 size;
9658 COMPILE_ASSERT(sizeof(GetMultipleIntegervCHROMIUM) == 28,
9659 Sizeof_GetMultipleIntegervCHROMIUM_is_not_28);
9660 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, header) == 0,
9661 OffsetOf_GetMultipleIntegervCHROMIUM_header_not_0);
9662 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_id) == 4,
9663 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_id_not_4);
9664 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_offset) == 8,
9665 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_offset_not_8);
9666 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, count) == 12,
9667 OffsetOf_GetMultipleIntegervCHROMIUM_count_not_12);
9668 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_id) == 16,
9669 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_id_not_16);
9670 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_offset) == 20,
9671 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_offset_not_20);
9672 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, size) == 24,
9673 OffsetOf_GetMultipleIntegervCHROMIUM_size_not_24);
9675 struct GetProgramInfoCHROMIUM {
9676 typedef GetProgramInfoCHROMIUM ValueType;
9677 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
9678 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9680 struct Result {
9681 uint32 link_status;
9682 uint32 num_attribs;
9683 uint32 num_uniforms;
9686 static uint32 ComputeSize() {
9687 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9690 void SetHeader() {
9691 header.SetCmd<ValueType>();
9694 void Init(GLuint _program, uint32 _bucket_id) {
9695 SetHeader();
9696 program = _program;
9697 bucket_id = _bucket_id;
9700 void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
9701 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
9702 return NextCmdAddress<ValueType>(cmd);
9705 gpu::CommandHeader header;
9706 uint32 program;
9707 uint32 bucket_id;
9710 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM) == 12,
9711 Sizeof_GetProgramInfoCHROMIUM_is_not_12);
9712 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, header) == 0,
9713 OffsetOf_GetProgramInfoCHROMIUM_header_not_0);
9714 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, program) == 4,
9715 OffsetOf_GetProgramInfoCHROMIUM_program_not_4);
9716 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
9717 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8);
9718 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
9719 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0);
9720 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
9721 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4);
9722 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
9723 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8);
9725 struct CreateStreamTextureCHROMIUM {
9726 typedef CreateStreamTextureCHROMIUM ValueType;
9727 static const CommandId kCmdId = kCreateStreamTextureCHROMIUM;
9728 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9730 typedef GLuint Result;
9732 static uint32 ComputeSize() {
9733 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9736 void SetHeader() {
9737 header.SetCmd<ValueType>();
9740 void Init(
9741 GLuint _client_id, uint32 _result_shm_id, uint32 _result_shm_offset) {
9742 SetHeader();
9743 client_id = _client_id;
9744 result_shm_id = _result_shm_id;
9745 result_shm_offset = _result_shm_offset;
9748 void* Set(
9749 void* cmd, GLuint _client_id, uint32 _result_shm_id,
9750 uint32 _result_shm_offset) {
9751 static_cast<ValueType*>(
9752 cmd)->Init(_client_id, _result_shm_id, _result_shm_offset);
9753 return NextCmdAddress<ValueType>(cmd);
9756 gpu::CommandHeader header;
9757 uint32 client_id;
9758 uint32 result_shm_id;
9759 uint32 result_shm_offset;
9762 COMPILE_ASSERT(sizeof(CreateStreamTextureCHROMIUM) == 16,
9763 Sizeof_CreateStreamTextureCHROMIUM_is_not_16);
9764 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, header) == 0,
9765 OffsetOf_CreateStreamTextureCHROMIUM_header_not_0);
9766 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, client_id) == 4,
9767 OffsetOf_CreateStreamTextureCHROMIUM_client_id_not_4);
9768 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, result_shm_id) == 8,
9769 OffsetOf_CreateStreamTextureCHROMIUM_result_shm_id_not_8);
9770 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, result_shm_offset) == 12,
9771 OffsetOf_CreateStreamTextureCHROMIUM_result_shm_offset_not_12);
9773 struct DestroyStreamTextureCHROMIUM {
9774 typedef DestroyStreamTextureCHROMIUM ValueType;
9775 static const CommandId kCmdId = kDestroyStreamTextureCHROMIUM;
9776 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9778 static uint32 ComputeSize() {
9779 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9782 void SetHeader() {
9783 header.SetCmd<ValueType>();
9786 void Init(GLuint _texture) {
9787 SetHeader();
9788 texture = _texture;
9791 void* Set(void* cmd, GLuint _texture) {
9792 static_cast<ValueType*>(cmd)->Init(_texture);
9793 return NextCmdAddress<ValueType>(cmd);
9796 gpu::CommandHeader header;
9797 uint32 texture;
9800 COMPILE_ASSERT(sizeof(DestroyStreamTextureCHROMIUM) == 8,
9801 Sizeof_DestroyStreamTextureCHROMIUM_is_not_8);
9802 COMPILE_ASSERT(offsetof(DestroyStreamTextureCHROMIUM, header) == 0,
9803 OffsetOf_DestroyStreamTextureCHROMIUM_header_not_0);
9804 COMPILE_ASSERT(offsetof(DestroyStreamTextureCHROMIUM, texture) == 4,
9805 OffsetOf_DestroyStreamTextureCHROMIUM_texture_not_4);
9807 struct GetTranslatedShaderSourceANGLE {
9808 typedef GetTranslatedShaderSourceANGLE ValueType;
9809 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
9810 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9812 static uint32 ComputeSize() {
9813 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9816 void SetHeader() {
9817 header.SetCmd<ValueType>();
9820 void Init(GLuint _shader, uint32 _bucket_id) {
9821 SetHeader();
9822 shader = _shader;
9823 bucket_id = _bucket_id;
9826 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
9827 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
9828 return NextCmdAddress<ValueType>(cmd);
9831 gpu::CommandHeader header;
9832 uint32 shader;
9833 uint32 bucket_id;
9836 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE) == 12,
9837 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12);
9838 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
9839 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0);
9840 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
9841 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4);
9842 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
9843 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8);
9845 struct PostSubBufferCHROMIUM {
9846 typedef PostSubBufferCHROMIUM ValueType;
9847 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
9848 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9850 static uint32 ComputeSize() {
9851 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9854 void SetHeader() {
9855 header.SetCmd<ValueType>();
9858 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
9859 SetHeader();
9860 x = _x;
9861 y = _y;
9862 width = _width;
9863 height = _height;
9866 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
9867 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
9868 return NextCmdAddress<ValueType>(cmd);
9871 gpu::CommandHeader header;
9872 int32 x;
9873 int32 y;
9874 int32 width;
9875 int32 height;
9878 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM) == 20,
9879 Sizeof_PostSubBufferCHROMIUM_is_not_20);
9880 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, header) == 0,
9881 OffsetOf_PostSubBufferCHROMIUM_header_not_0);
9882 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4,
9883 OffsetOf_PostSubBufferCHROMIUM_x_not_4);
9884 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8,
9885 OffsetOf_PostSubBufferCHROMIUM_y_not_8);
9886 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12,
9887 OffsetOf_PostSubBufferCHROMIUM_width_not_12);
9888 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
9889 OffsetOf_PostSubBufferCHROMIUM_height_not_16);
9891 struct TexImageIOSurface2DCHROMIUM {
9892 typedef TexImageIOSurface2DCHROMIUM ValueType;
9893 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
9894 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9896 static uint32 ComputeSize() {
9897 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9900 void SetHeader() {
9901 header.SetCmd<ValueType>();
9904 void Init(
9905 GLenum _target, GLsizei _width, GLsizei _height, GLuint _ioSurfaceId,
9906 GLuint _plane) {
9907 SetHeader();
9908 target = _target;
9909 width = _width;
9910 height = _height;
9911 ioSurfaceId = _ioSurfaceId;
9912 plane = _plane;
9915 void* Set(
9916 void* cmd, GLenum _target, GLsizei _width, GLsizei _height,
9917 GLuint _ioSurfaceId, GLuint _plane) {
9918 static_cast<ValueType*>(
9919 cmd)->Init(_target, _width, _height, _ioSurfaceId, _plane);
9920 return NextCmdAddress<ValueType>(cmd);
9923 gpu::CommandHeader header;
9924 uint32 target;
9925 int32 width;
9926 int32 height;
9927 uint32 ioSurfaceId;
9928 uint32 plane;
9931 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
9932 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24);
9933 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
9934 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0);
9935 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
9936 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4);
9937 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
9938 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8);
9939 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
9940 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12);
9941 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
9942 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16);
9943 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
9944 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20);
9946 struct CopyTextureCHROMIUM {
9947 typedef CopyTextureCHROMIUM ValueType;
9948 static const CommandId kCmdId = kCopyTextureCHROMIUM;
9949 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9951 static uint32 ComputeSize() {
9952 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9955 void SetHeader() {
9956 header.SetCmd<ValueType>();
9959 void Init(
9960 GLenum _target, GLenum _source_id, GLenum _dest_id, GLint _level,
9961 GLint _internalformat, GLenum _dest_type) {
9962 SetHeader();
9963 target = _target;
9964 source_id = _source_id;
9965 dest_id = _dest_id;
9966 level = _level;
9967 internalformat = _internalformat;
9968 dest_type = _dest_type;
9971 void* Set(
9972 void* cmd, GLenum _target, GLenum _source_id, GLenum _dest_id,
9973 GLint _level, GLint _internalformat, GLenum _dest_type) {
9974 static_cast<ValueType*>(
9975 cmd)->Init(
9976 _target, _source_id, _dest_id, _level, _internalformat,
9977 _dest_type);
9978 return NextCmdAddress<ValueType>(cmd);
9981 gpu::CommandHeader header;
9982 uint32 target;
9983 uint32 source_id;
9984 uint32 dest_id;
9985 int32 level;
9986 int32 internalformat;
9987 uint32 dest_type;
9990 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM) == 28,
9991 Sizeof_CopyTextureCHROMIUM_is_not_28);
9992 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, header) == 0,
9993 OffsetOf_CopyTextureCHROMIUM_header_not_0);
9994 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, target) == 4,
9995 OffsetOf_CopyTextureCHROMIUM_target_not_4);
9996 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, source_id) == 8,
9997 OffsetOf_CopyTextureCHROMIUM_source_id_not_8);
9998 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
9999 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12);
10000 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, level) == 16,
10001 OffsetOf_CopyTextureCHROMIUM_level_not_16);
10002 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, internalformat) == 20,
10003 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20);
10004 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_type) == 24,
10005 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24);
10007 struct DrawArraysInstancedANGLE {
10008 typedef DrawArraysInstancedANGLE ValueType;
10009 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
10010 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10012 static uint32 ComputeSize() {
10013 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10016 void SetHeader() {
10017 header.SetCmd<ValueType>();
10020 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
10021 SetHeader();
10022 mode = _mode;
10023 first = _first;
10024 count = _count;
10025 primcount = _primcount;
10028 void* Set(
10029 void* cmd, GLenum _mode, GLint _first, GLsizei _count,
10030 GLsizei _primcount) {
10031 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
10032 return NextCmdAddress<ValueType>(cmd);
10035 gpu::CommandHeader header;
10036 uint32 mode;
10037 int32 first;
10038 int32 count;
10039 int32 primcount;
10042 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE) == 20,
10043 Sizeof_DrawArraysInstancedANGLE_is_not_20);
10044 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, header) == 0,
10045 OffsetOf_DrawArraysInstancedANGLE_header_not_0);
10046 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, mode) == 4,
10047 OffsetOf_DrawArraysInstancedANGLE_mode_not_4);
10048 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, first) == 8,
10049 OffsetOf_DrawArraysInstancedANGLE_first_not_8);
10050 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, count) == 12,
10051 OffsetOf_DrawArraysInstancedANGLE_count_not_12);
10052 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
10053 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16);
10055 struct DrawElementsInstancedANGLE {
10056 typedef DrawElementsInstancedANGLE ValueType;
10057 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
10058 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10060 static uint32 ComputeSize() {
10061 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10064 void SetHeader() {
10065 header.SetCmd<ValueType>();
10068 void Init(
10069 GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset,
10070 GLsizei _primcount) {
10071 SetHeader();
10072 mode = _mode;
10073 count = _count;
10074 type = _type;
10075 index_offset = _index_offset;
10076 primcount = _primcount;
10079 void* Set(
10080 void* cmd, GLenum _mode, GLsizei _count, GLenum _type,
10081 GLuint _index_offset, GLsizei _primcount) {
10082 static_cast<ValueType*>(
10083 cmd)->Init(_mode, _count, _type, _index_offset, _primcount);
10084 return NextCmdAddress<ValueType>(cmd);
10087 gpu::CommandHeader header;
10088 uint32 mode;
10089 int32 count;
10090 uint32 type;
10091 uint32 index_offset;
10092 int32 primcount;
10095 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE) == 24,
10096 Sizeof_DrawElementsInstancedANGLE_is_not_24);
10097 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, header) == 0,
10098 OffsetOf_DrawElementsInstancedANGLE_header_not_0);
10099 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, mode) == 4,
10100 OffsetOf_DrawElementsInstancedANGLE_mode_not_4);
10101 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, count) == 8,
10102 OffsetOf_DrawElementsInstancedANGLE_count_not_8);
10103 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, type) == 12,
10104 OffsetOf_DrawElementsInstancedANGLE_type_not_12);
10105 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
10106 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16);
10107 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
10108 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20);
10110 struct VertexAttribDivisorANGLE {
10111 typedef VertexAttribDivisorANGLE ValueType;
10112 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
10113 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10115 static uint32 ComputeSize() {
10116 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10119 void SetHeader() {
10120 header.SetCmd<ValueType>();
10123 void Init(GLuint _index, GLuint _divisor) {
10124 SetHeader();
10125 index = _index;
10126 divisor = _divisor;
10129 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
10130 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
10131 return NextCmdAddress<ValueType>(cmd);
10134 gpu::CommandHeader header;
10135 uint32 index;
10136 uint32 divisor;
10139 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12,
10140 Sizeof_VertexAttribDivisorANGLE_is_not_12);
10141 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0,
10142 OffsetOf_VertexAttribDivisorANGLE_header_not_0);
10143 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4,
10144 OffsetOf_VertexAttribDivisorANGLE_index_not_4);
10145 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
10146 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8);
10148 struct GenMailboxCHROMIUM {
10149 typedef GenMailboxCHROMIUM ValueType;
10150 static const CommandId kCmdId = kGenMailboxCHROMIUM;
10151 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10153 typedef SizedResult<GLint> Result;
10155 static uint32 ComputeSize() {
10156 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10159 void SetHeader() {
10160 header.SetCmd<ValueType>();
10163 void Init(GLuint _bucket_id) {
10164 SetHeader();
10165 bucket_id = _bucket_id;
10168 void* Set(void* cmd, GLuint _bucket_id) {
10169 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10170 return NextCmdAddress<ValueType>(cmd);
10173 gpu::CommandHeader header;
10174 uint32 bucket_id;
10177 COMPILE_ASSERT(sizeof(GenMailboxCHROMIUM) == 8,
10178 Sizeof_GenMailboxCHROMIUM_is_not_8);
10179 COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, header) == 0,
10180 OffsetOf_GenMailboxCHROMIUM_header_not_0);
10181 COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, bucket_id) == 4,
10182 OffsetOf_GenMailboxCHROMIUM_bucket_id_not_4);
10184 struct ProduceTextureCHROMIUM {
10185 typedef ProduceTextureCHROMIUM ValueType;
10186 static const CommandId kCmdId = kProduceTextureCHROMIUM;
10187 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10189 static uint32 ComputeSize() {
10190 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10193 void SetHeader() {
10194 header.SetCmd<ValueType>();
10197 void Init(
10198 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
10199 SetHeader();
10200 target = _target;
10201 mailbox_shm_id = _mailbox_shm_id;
10202 mailbox_shm_offset = _mailbox_shm_offset;
10205 void* Set(
10206 void* cmd, GLenum _target, uint32 _mailbox_shm_id,
10207 uint32 _mailbox_shm_offset) {
10208 static_cast<ValueType*>(
10209 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
10210 return NextCmdAddress<ValueType>(cmd);
10213 gpu::CommandHeader header;
10214 uint32 target;
10215 uint32 mailbox_shm_id;
10216 uint32 mailbox_shm_offset;
10219 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUM) == 16,
10220 Sizeof_ProduceTextureCHROMIUM_is_not_16);
10221 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, header) == 0,
10222 OffsetOf_ProduceTextureCHROMIUM_header_not_0);
10223 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, target) == 4,
10224 OffsetOf_ProduceTextureCHROMIUM_target_not_4);
10225 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_id) == 8,
10226 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_id_not_8);
10227 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_offset) == 12,
10228 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_offset_not_12);
10230 struct ProduceTextureCHROMIUMImmediate {
10231 typedef ProduceTextureCHROMIUMImmediate ValueType;
10232 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
10233 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10235 static uint32 ComputeDataSize() {
10236 return static_cast<uint32>(
10237 sizeof(GLbyte) * 64); // NOLINT
10240 static uint32 ComputeSize() {
10241 return static_cast<uint32>(
10242 sizeof(ValueType) + ComputeDataSize()); // NOLINT
10245 void SetHeader() {
10246 header.SetCmdByTotalSize<ValueType>(ComputeSize());
10249 void Init(GLenum _target, const GLbyte* _mailbox) {
10250 SetHeader();
10251 target = _target;
10252 memcpy(ImmediateDataAddress(this),
10253 _mailbox, ComputeDataSize());
10256 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
10257 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
10258 const uint32 size = ComputeSize();
10259 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10262 gpu::CommandHeader header;
10263 uint32 target;
10266 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
10267 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
10268 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
10269 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
10270 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
10271 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
10273 struct ConsumeTextureCHROMIUM {
10274 typedef ConsumeTextureCHROMIUM ValueType;
10275 static const CommandId kCmdId = kConsumeTextureCHROMIUM;
10276 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10278 static uint32 ComputeSize() {
10279 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10282 void SetHeader() {
10283 header.SetCmd<ValueType>();
10286 void Init(
10287 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
10288 SetHeader();
10289 target = _target;
10290 mailbox_shm_id = _mailbox_shm_id;
10291 mailbox_shm_offset = _mailbox_shm_offset;
10294 void* Set(
10295 void* cmd, GLenum _target, uint32 _mailbox_shm_id,
10296 uint32 _mailbox_shm_offset) {
10297 static_cast<ValueType*>(
10298 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
10299 return NextCmdAddress<ValueType>(cmd);
10302 gpu::CommandHeader header;
10303 uint32 target;
10304 uint32 mailbox_shm_id;
10305 uint32 mailbox_shm_offset;
10308 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUM) == 16,
10309 Sizeof_ConsumeTextureCHROMIUM_is_not_16);
10310 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, header) == 0,
10311 OffsetOf_ConsumeTextureCHROMIUM_header_not_0);
10312 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, target) == 4,
10313 OffsetOf_ConsumeTextureCHROMIUM_target_not_4);
10314 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_id) == 8,
10315 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_id_not_8);
10316 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_offset) == 12,
10317 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_offset_not_12);
10319 struct ConsumeTextureCHROMIUMImmediate {
10320 typedef ConsumeTextureCHROMIUMImmediate ValueType;
10321 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
10322 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10324 static uint32 ComputeDataSize() {
10325 return static_cast<uint32>(
10326 sizeof(GLbyte) * 64); // NOLINT
10329 static uint32 ComputeSize() {
10330 return static_cast<uint32>(
10331 sizeof(ValueType) + ComputeDataSize()); // NOLINT
10334 void SetHeader() {
10335 header.SetCmdByTotalSize<ValueType>(ComputeSize());
10338 void Init(GLenum _target, const GLbyte* _mailbox) {
10339 SetHeader();
10340 target = _target;
10341 memcpy(ImmediateDataAddress(this),
10342 _mailbox, ComputeDataSize());
10345 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
10346 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
10347 const uint32 size = ComputeSize();
10348 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10351 gpu::CommandHeader header;
10352 uint32 target;
10355 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
10356 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
10357 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
10358 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
10359 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
10360 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
10362 struct BindUniformLocationCHROMIUM {
10363 typedef BindUniformLocationCHROMIUM ValueType;
10364 static const CommandId kCmdId = kBindUniformLocationCHROMIUM;
10365 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10367 static uint32 ComputeSize() {
10368 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10371 void SetHeader() {
10372 header.SetCmd<ValueType>();
10375 void Init(
10376 GLuint _program, GLint _location, uint32 _name_shm_id,
10377 uint32 _name_shm_offset, uint32 _data_size) {
10378 SetHeader();
10379 program = _program;
10380 location = _location;
10381 name_shm_id = _name_shm_id;
10382 name_shm_offset = _name_shm_offset;
10383 data_size = _data_size;
10386 void* Set(
10387 void* cmd, GLuint _program, GLint _location, uint32 _name_shm_id,
10388 uint32 _name_shm_offset, uint32 _data_size) {
10389 static_cast<ValueType*>(
10390 cmd)->Init(
10391 _program, _location, _name_shm_id, _name_shm_offset, _data_size);
10392 return NextCmdAddress<ValueType>(cmd);
10395 gpu::CommandHeader header;
10396 uint32 program;
10397 int32 location;
10398 uint32 name_shm_id;
10399 uint32 name_shm_offset;
10400 uint32 data_size;
10403 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUM) == 24,
10404 Sizeof_BindUniformLocationCHROMIUM_is_not_24);
10405 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, header) == 0,
10406 OffsetOf_BindUniformLocationCHROMIUM_header_not_0);
10407 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, program) == 4,
10408 OffsetOf_BindUniformLocationCHROMIUM_program_not_4);
10409 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, location) == 8,
10410 OffsetOf_BindUniformLocationCHROMIUM_location_not_8);
10411 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_id) == 12,
10412 OffsetOf_BindUniformLocationCHROMIUM_name_shm_id_not_12);
10413 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16,
10414 OffsetOf_BindUniformLocationCHROMIUM_name_shm_offset_not_16);
10415 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20,
10416 OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20);
10418 struct BindUniformLocationCHROMIUMImmediate {
10419 typedef BindUniformLocationCHROMIUMImmediate ValueType;
10420 static const CommandId kCmdId = kBindUniformLocationCHROMIUMImmediate;
10421 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10423 static uint32 ComputeSize(uint32 data_size) {
10424 return static_cast<uint32>(
10425 sizeof(ValueType) + data_size); // NOLINT
10428 void SetHeader(uint32 data_size) {
10429 header.SetCmdBySize<ValueType>(data_size);
10432 void Init(
10433 GLuint _program, GLint _location, const char* _name, uint32 _data_size) {
10434 SetHeader(_data_size);
10435 program = _program;
10436 location = _location;
10437 data_size = _data_size;
10438 memcpy(ImmediateDataAddress(this), _name, _data_size);
10441 void* Set(
10442 void* cmd, GLuint _program, GLint _location, const char* _name,
10443 uint32 _data_size) {
10444 static_cast<ValueType*>(cmd)->Init(_program, _location, _name, _data_size);
10445 return NextImmediateCmdAddress<ValueType>(cmd, _data_size);
10448 gpu::CommandHeader header;
10449 uint32 program;
10450 int32 location;
10451 uint32 data_size;
10454 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMImmediate) == 16,
10455 Sizeof_BindUniformLocationCHROMIUMImmediate_is_not_16);
10456 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, header) == 0,
10457 OffsetOf_BindUniformLocationCHROMIUMImmediate_header_not_0);
10458 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, program) == 4,
10459 OffsetOf_BindUniformLocationCHROMIUMImmediate_program_not_4);
10460 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, location) == 8,
10461 OffsetOf_BindUniformLocationCHROMIUMImmediate_location_not_8);
10462 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, data_size) == 12,
10463 OffsetOf_BindUniformLocationCHROMIUMImmediate_data_size_not_12);
10465 struct BindUniformLocationCHROMIUMBucket {
10466 typedef BindUniformLocationCHROMIUMBucket ValueType;
10467 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
10468 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10470 static uint32 ComputeSize() {
10471 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10474 void SetHeader() {
10475 header.SetCmd<ValueType>();
10478 void Init(GLuint _program, GLint _location, uint32 _name_bucket_id) {
10479 SetHeader();
10480 program = _program;
10481 location = _location;
10482 name_bucket_id = _name_bucket_id;
10485 void* Set(
10486 void* cmd, GLuint _program, GLint _location, uint32 _name_bucket_id) {
10487 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
10488 return NextCmdAddress<ValueType>(cmd);
10491 gpu::CommandHeader header;
10492 uint32 program;
10493 int32 location;
10494 uint32 name_bucket_id;
10497 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
10498 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16);
10499 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
10500 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0);
10501 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
10502 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4);
10503 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
10504 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8);
10505 COMPILE_ASSERT(
10506 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
10507 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); // NOLINT
10509 struct BindTexImage2DCHROMIUM {
10510 typedef BindTexImage2DCHROMIUM ValueType;
10511 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
10512 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10514 static uint32 ComputeSize() {
10515 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10518 void SetHeader() {
10519 header.SetCmd<ValueType>();
10522 void Init(GLenum _target, GLint _imageId) {
10523 SetHeader();
10524 target = _target;
10525 imageId = _imageId;
10528 void* Set(void* cmd, GLenum _target, GLint _imageId) {
10529 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
10530 return NextCmdAddress<ValueType>(cmd);
10533 gpu::CommandHeader header;
10534 uint32 target;
10535 int32 imageId;
10538 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM) == 12,
10539 Sizeof_BindTexImage2DCHROMIUM_is_not_12);
10540 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, header) == 0,
10541 OffsetOf_BindTexImage2DCHROMIUM_header_not_0);
10542 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, target) == 4,
10543 OffsetOf_BindTexImage2DCHROMIUM_target_not_4);
10544 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
10545 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8);
10547 struct ReleaseTexImage2DCHROMIUM {
10548 typedef ReleaseTexImage2DCHROMIUM ValueType;
10549 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
10550 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10552 static uint32 ComputeSize() {
10553 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10556 void SetHeader() {
10557 header.SetCmd<ValueType>();
10560 void Init(GLenum _target, GLint _imageId) {
10561 SetHeader();
10562 target = _target;
10563 imageId = _imageId;
10566 void* Set(void* cmd, GLenum _target, GLint _imageId) {
10567 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
10568 return NextCmdAddress<ValueType>(cmd);
10571 gpu::CommandHeader header;
10572 uint32 target;
10573 int32 imageId;
10576 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
10577 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12);
10578 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
10579 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0);
10580 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
10581 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4);
10582 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
10583 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8);
10585 struct TraceBeginCHROMIUM {
10586 typedef TraceBeginCHROMIUM ValueType;
10587 static const CommandId kCmdId = kTraceBeginCHROMIUM;
10588 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10590 static uint32 ComputeSize() {
10591 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10594 void SetHeader() {
10595 header.SetCmd<ValueType>();
10598 void Init(GLuint _bucket_id) {
10599 SetHeader();
10600 bucket_id = _bucket_id;
10603 void* Set(void* cmd, GLuint _bucket_id) {
10604 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10605 return NextCmdAddress<ValueType>(cmd);
10608 gpu::CommandHeader header;
10609 uint32 bucket_id;
10612 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM) == 8,
10613 Sizeof_TraceBeginCHROMIUM_is_not_8);
10614 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, header) == 0,
10615 OffsetOf_TraceBeginCHROMIUM_header_not_0);
10616 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, bucket_id) == 4,
10617 OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4);
10619 struct TraceEndCHROMIUM {
10620 typedef TraceEndCHROMIUM ValueType;
10621 static const CommandId kCmdId = kTraceEndCHROMIUM;
10622 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10624 static uint32 ComputeSize() {
10625 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10628 void SetHeader() {
10629 header.SetCmd<ValueType>();
10632 void Init() {
10633 SetHeader();
10636 void* Set(void* cmd) {
10637 static_cast<ValueType*>(cmd)->Init();
10638 return NextCmdAddress<ValueType>(cmd);
10641 gpu::CommandHeader header;
10644 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4,
10645 Sizeof_TraceEndCHROMIUM_is_not_4);
10646 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0,
10647 OffsetOf_TraceEndCHROMIUM_header_not_0);
10649 struct AsyncTexSubImage2DCHROMIUM {
10650 typedef AsyncTexSubImage2DCHROMIUM ValueType;
10651 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
10652 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10654 static uint32 ComputeSize() {
10655 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10658 void SetHeader() {
10659 header.SetCmd<ValueType>();
10662 void Init(
10663 GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
10664 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
10665 uint32 _data_shm_id, uint32 _data_shm_offset) {
10666 SetHeader();
10667 target = _target;
10668 level = _level;
10669 xoffset = _xoffset;
10670 yoffset = _yoffset;
10671 width = _width;
10672 height = _height;
10673 format = _format;
10674 type = _type;
10675 data_shm_id = _data_shm_id;
10676 data_shm_offset = _data_shm_offset;
10679 void* Set(
10680 void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
10681 GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
10682 uint32 _data_shm_id, uint32 _data_shm_offset) {
10683 static_cast<ValueType*>(
10684 cmd)->Init(
10685 _target, _level, _xoffset, _yoffset, _width, _height, _format,
10686 _type, _data_shm_id, _data_shm_offset);
10687 return NextCmdAddress<ValueType>(cmd);
10690 gpu::CommandHeader header;
10691 uint32 target;
10692 int32 level;
10693 int32 xoffset;
10694 int32 yoffset;
10695 int32 width;
10696 int32 height;
10697 uint32 format;
10698 uint32 type;
10699 uint32 data_shm_id;
10700 uint32 data_shm_offset;
10703 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM) == 44,
10704 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_44);
10705 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
10706 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0);
10707 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
10708 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4);
10709 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
10710 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8);
10711 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
10712 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12);
10713 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
10714 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16);
10715 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
10716 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20);
10717 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
10718 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24);
10719 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
10720 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28);
10721 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
10722 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32);
10723 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
10724 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36);
10725 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
10726 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40);
10728 struct AsyncTexImage2DCHROMIUM {
10729 typedef AsyncTexImage2DCHROMIUM ValueType;
10730 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
10731 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10733 static uint32 ComputeSize() {
10734 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10737 void SetHeader() {
10738 header.SetCmd<ValueType>();
10741 void Init(
10742 GLenum _target, GLint _level, GLint _internalformat, GLsizei _width,
10743 GLsizei _height, GLint _border, GLenum _format, GLenum _type,
10744 uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
10745 SetHeader();
10746 target = _target;
10747 level = _level;
10748 internalformat = _internalformat;
10749 width = _width;
10750 height = _height;
10751 border = _border;
10752 format = _format;
10753 type = _type;
10754 pixels_shm_id = _pixels_shm_id;
10755 pixels_shm_offset = _pixels_shm_offset;
10758 void* Set(
10759 void* cmd, GLenum _target, GLint _level, GLint _internalformat,
10760 GLsizei _width, GLsizei _height, GLint _border, GLenum _format,
10761 GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
10762 static_cast<ValueType*>(
10763 cmd)->Init(
10764 _target, _level, _internalformat, _width, _height, _border, _format,
10765 _type, _pixels_shm_id, _pixels_shm_offset);
10766 return NextCmdAddress<ValueType>(cmd);
10769 gpu::CommandHeader header;
10770 uint32 target;
10771 int32 level;
10772 int32 internalformat;
10773 int32 width;
10774 int32 height;
10775 int32 border;
10776 uint32 format;
10777 uint32 type;
10778 uint32 pixels_shm_id;
10779 uint32 pixels_shm_offset;
10782 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM) == 44,
10783 Sizeof_AsyncTexImage2DCHROMIUM_is_not_44);
10784 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
10785 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0);
10786 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
10787 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4);
10788 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
10789 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8);
10790 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
10791 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12);
10792 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
10793 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16);
10794 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
10795 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20);
10796 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, border) == 24,
10797 OffsetOf_AsyncTexImage2DCHROMIUM_border_not_24);
10798 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, format) == 28,
10799 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_28);
10800 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, type) == 32,
10801 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_32);
10802 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 36,
10803 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_36);
10804 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 40,
10805 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_40);
10807 struct WaitAsyncTexImage2DCHROMIUM {
10808 typedef WaitAsyncTexImage2DCHROMIUM ValueType;
10809 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
10810 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10812 static uint32 ComputeSize() {
10813 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10816 void SetHeader() {
10817 header.SetCmd<ValueType>();
10820 void Init(GLenum _target) {
10821 SetHeader();
10822 target = _target;
10825 void* Set(void* cmd, GLenum _target) {
10826 static_cast<ValueType*>(cmd)->Init(_target);
10827 return NextCmdAddress<ValueType>(cmd);
10830 gpu::CommandHeader header;
10831 uint32 target;
10834 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
10835 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8);
10836 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
10837 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0);
10838 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
10839 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4);
10841 struct DiscardFramebufferEXT {
10842 typedef DiscardFramebufferEXT ValueType;
10843 static const CommandId kCmdId = kDiscardFramebufferEXT;
10844 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10846 static uint32 ComputeSize() {
10847 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10850 void SetHeader() {
10851 header.SetCmd<ValueType>();
10854 void Init(
10855 GLenum _target, GLsizei _count, uint32 _attachments_shm_id,
10856 uint32 _attachments_shm_offset) {
10857 SetHeader();
10858 target = _target;
10859 count = _count;
10860 attachments_shm_id = _attachments_shm_id;
10861 attachments_shm_offset = _attachments_shm_offset;
10864 void* Set(
10865 void* cmd, GLenum _target, GLsizei _count, uint32 _attachments_shm_id,
10866 uint32 _attachments_shm_offset) {
10867 static_cast<ValueType*>(
10868 cmd)->Init(
10869 _target, _count, _attachments_shm_id, _attachments_shm_offset);
10870 return NextCmdAddress<ValueType>(cmd);
10873 gpu::CommandHeader header;
10874 uint32 target;
10875 int32 count;
10876 uint32 attachments_shm_id;
10877 uint32 attachments_shm_offset;
10880 COMPILE_ASSERT(sizeof(DiscardFramebufferEXT) == 20,
10881 Sizeof_DiscardFramebufferEXT_is_not_20);
10882 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, header) == 0,
10883 OffsetOf_DiscardFramebufferEXT_header_not_0);
10884 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, target) == 4,
10885 OffsetOf_DiscardFramebufferEXT_target_not_4);
10886 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, count) == 8,
10887 OffsetOf_DiscardFramebufferEXT_count_not_8);
10888 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_id) == 12,
10889 OffsetOf_DiscardFramebufferEXT_attachments_shm_id_not_12);
10890 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_offset) == 16,
10891 OffsetOf_DiscardFramebufferEXT_attachments_shm_offset_not_16);
10893 struct DiscardFramebufferEXTImmediate {
10894 typedef DiscardFramebufferEXTImmediate ValueType;
10895 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
10896 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10898 static uint32 ComputeDataSize(GLsizei count) {
10899 return static_cast<uint32>(
10900 sizeof(GLenum) * 1 * count); // NOLINT
10903 static uint32 ComputeSize(GLsizei count) {
10904 return static_cast<uint32>(
10905 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
10908 void SetHeader(GLsizei count) {
10909 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
10912 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
10913 SetHeader(_count);
10914 target = _target;
10915 count = _count;
10916 memcpy(ImmediateDataAddress(this),
10917 _attachments, ComputeDataSize(_count));
10920 void* Set(
10921 void* cmd, GLenum _target, GLsizei _count, const GLenum* _attachments) {
10922 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
10923 const uint32 size = ComputeSize(_count);
10924 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10927 gpu::CommandHeader header;
10928 uint32 target;
10929 int32 count;
10932 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate) == 12,
10933 Sizeof_DiscardFramebufferEXTImmediate_is_not_12);
10934 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
10935 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0);
10936 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
10937 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4);
10938 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
10939 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8);
10941 struct LoseContextCHROMIUM {
10942 typedef LoseContextCHROMIUM ValueType;
10943 static const CommandId kCmdId = kLoseContextCHROMIUM;
10944 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10946 static uint32 ComputeSize() {
10947 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10950 void SetHeader() {
10951 header.SetCmd<ValueType>();
10954 void Init(GLenum _current, GLenum _other) {
10955 SetHeader();
10956 current = _current;
10957 other = _other;
10960 void* Set(void* cmd, GLenum _current, GLenum _other) {
10961 static_cast<ValueType*>(cmd)->Init(_current, _other);
10962 return NextCmdAddress<ValueType>(cmd);
10965 gpu::CommandHeader header;
10966 uint32 current;
10967 uint32 other;
10970 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM) == 12,
10971 Sizeof_LoseContextCHROMIUM_is_not_12);
10972 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, header) == 0,
10973 OffsetOf_LoseContextCHROMIUM_header_not_0);
10974 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, current) == 4,
10975 OffsetOf_LoseContextCHROMIUM_current_not_4);
10976 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, other) == 8,
10977 OffsetOf_LoseContextCHROMIUM_other_not_8);
10979 struct WaitSyncPointCHROMIUM {
10980 typedef WaitSyncPointCHROMIUM ValueType;
10981 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
10982 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10984 static uint32 ComputeSize() {
10985 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10988 void SetHeader() {
10989 header.SetCmd<ValueType>();
10992 void Init(GLuint _sync_point) {
10993 SetHeader();
10994 sync_point = _sync_point;
10997 void* Set(void* cmd, GLuint _sync_point) {
10998 static_cast<ValueType*>(cmd)->Init(_sync_point);
10999 return NextCmdAddress<ValueType>(cmd);
11002 gpu::CommandHeader header;
11003 uint32 sync_point;
11006 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM) == 8,
11007 Sizeof_WaitSyncPointCHROMIUM_is_not_8);
11008 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0,
11009 OffsetOf_WaitSyncPointCHROMIUM_header_not_0);
11010 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
11011 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4);
11013 struct DrawBuffersEXT {
11014 typedef DrawBuffersEXT ValueType;
11015 static const CommandId kCmdId = kDrawBuffersEXT;
11016 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11018 static uint32 ComputeSize() {
11019 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
11022 void SetHeader() {
11023 header.SetCmd<ValueType>();
11026 void Init(GLsizei _count, uint32 _bufs_shm_id, uint32 _bufs_shm_offset) {
11027 SetHeader();
11028 count = _count;
11029 bufs_shm_id = _bufs_shm_id;
11030 bufs_shm_offset = _bufs_shm_offset;
11033 void* Set(
11034 void* cmd, GLsizei _count, uint32 _bufs_shm_id,
11035 uint32 _bufs_shm_offset) {
11036 static_cast<ValueType*>(cmd)->Init(_count, _bufs_shm_id, _bufs_shm_offset);
11037 return NextCmdAddress<ValueType>(cmd);
11040 gpu::CommandHeader header;
11041 int32 count;
11042 uint32 bufs_shm_id;
11043 uint32 bufs_shm_offset;
11046 COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16,
11047 Sizeof_DrawBuffersEXT_is_not_16);
11048 COMPILE_ASSERT(offsetof(DrawBuffersEXT, header) == 0,
11049 OffsetOf_DrawBuffersEXT_header_not_0);
11050 COMPILE_ASSERT(offsetof(DrawBuffersEXT, count) == 4,
11051 OffsetOf_DrawBuffersEXT_count_not_4);
11052 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_id) == 8,
11053 OffsetOf_DrawBuffersEXT_bufs_shm_id_not_8);
11054 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_offset) == 12,
11055 OffsetOf_DrawBuffersEXT_bufs_shm_offset_not_12);
11057 struct DrawBuffersEXTImmediate {
11058 typedef DrawBuffersEXTImmediate ValueType;
11059 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
11060 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11062 static uint32 ComputeDataSize(GLsizei count) {
11063 return static_cast<uint32>(
11064 sizeof(GLenum) * 1 * count); // NOLINT
11067 static uint32 ComputeSize(GLsizei count) {
11068 return static_cast<uint32>(
11069 sizeof(ValueType) + ComputeDataSize(count)); // NOLINT
11072 void SetHeader(GLsizei count) {
11073 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
11076 void Init(GLsizei _count, const GLenum* _bufs) {
11077 SetHeader(_count);
11078 count = _count;
11079 memcpy(ImmediateDataAddress(this),
11080 _bufs, ComputeDataSize(_count));
11083 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
11084 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
11085 const uint32 size = ComputeSize(_count);
11086 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11089 gpu::CommandHeader header;
11090 int32 count;
11093 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8,
11094 Sizeof_DrawBuffersEXTImmediate_is_not_8);
11095 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0,
11096 OffsetOf_DrawBuffersEXTImmediate_header_not_0);
11097 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4,
11098 OffsetOf_DrawBuffersEXTImmediate_count_not_4);
11101 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_