Format generated gpu files using clang-format.
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
bloba3b60252a220c7e84cb7d8f2e08bc965ee3bdaea
1 // Copyright (c) 2014 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 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT!
11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
14 struct ActiveTexture {
15 typedef ActiveTexture ValueType;
16 static const CommandId kCmdId = kActiveTexture;
17 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
18 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
20 static uint32 ComputeSize() {
21 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
24 void SetHeader() { header.SetCmd<ValueType>(); }
26 void Init(GLenum _texture) {
27 SetHeader();
28 texture = _texture;
31 void* Set(void* cmd, GLenum _texture) {
32 static_cast<ValueType*>(cmd)->Init(_texture);
33 return NextCmdAddress<ValueType>(cmd);
36 gpu::CommandHeader header;
37 uint32 texture;
40 COMPILE_ASSERT(sizeof(ActiveTexture) == 8, 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;
50 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
52 static uint32 ComputeSize() {
53 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
56 void SetHeader() { header.SetCmd<ValueType>(); }
58 void Init(GLuint _program, GLuint _shader) {
59 SetHeader();
60 program = _program;
61 shader = _shader;
64 void* Set(void* cmd, GLuint _program, GLuint _shader) {
65 static_cast<ValueType*>(cmd)->Init(_program, _shader);
66 return NextCmdAddress<ValueType>(cmd);
69 gpu::CommandHeader header;
70 uint32 program;
71 uint32 shader;
74 COMPILE_ASSERT(sizeof(AttachShader) == 12, Sizeof_AttachShader_is_not_12);
75 COMPILE_ASSERT(offsetof(AttachShader, header) == 0,
76 OffsetOf_AttachShader_header_not_0);
77 COMPILE_ASSERT(offsetof(AttachShader, program) == 4,
78 OffsetOf_AttachShader_program_not_4);
79 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8,
80 OffsetOf_AttachShader_shader_not_8);
82 struct BindAttribLocation {
83 typedef BindAttribLocation ValueType;
84 static const CommandId kCmdId = kBindAttribLocation;
85 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
88 static uint32 ComputeSize() {
89 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
92 void SetHeader() { header.SetCmd<ValueType>(); }
94 void Init(GLuint _program,
95 GLuint _index,
96 uint32 _name_shm_id,
97 uint32 _name_shm_offset,
98 uint32 _data_size) {
99 SetHeader();
100 program = _program;
101 index = _index;
102 name_shm_id = _name_shm_id;
103 name_shm_offset = _name_shm_offset;
104 data_size = _data_size;
107 void* Set(void* cmd,
108 GLuint _program,
109 GLuint _index,
110 uint32 _name_shm_id,
111 uint32 _name_shm_offset,
112 uint32 _data_size) {
113 static_cast<ValueType*>(cmd)
114 ->Init(_program, _index, _name_shm_id, _name_shm_offset, _data_size);
115 return NextCmdAddress<ValueType>(cmd);
118 gpu::CommandHeader header;
119 uint32 program;
120 uint32 index;
121 uint32 name_shm_id;
122 uint32 name_shm_offset;
123 uint32 data_size;
126 COMPILE_ASSERT(sizeof(BindAttribLocation) == 24,
127 Sizeof_BindAttribLocation_is_not_24);
128 COMPILE_ASSERT(offsetof(BindAttribLocation, header) == 0,
129 OffsetOf_BindAttribLocation_header_not_0);
130 COMPILE_ASSERT(offsetof(BindAttribLocation, program) == 4,
131 OffsetOf_BindAttribLocation_program_not_4);
132 COMPILE_ASSERT(offsetof(BindAttribLocation, index) == 8,
133 OffsetOf_BindAttribLocation_index_not_8);
134 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_id) == 12,
135 OffsetOf_BindAttribLocation_name_shm_id_not_12);
136 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_offset) == 16,
137 OffsetOf_BindAttribLocation_name_shm_offset_not_16);
138 COMPILE_ASSERT(offsetof(BindAttribLocation, data_size) == 20,
139 OffsetOf_BindAttribLocation_data_size_not_20);
141 struct BindAttribLocationBucket {
142 typedef BindAttribLocationBucket ValueType;
143 static const CommandId kCmdId = kBindAttribLocationBucket;
144 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
145 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
147 static uint32 ComputeSize() {
148 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
151 void SetHeader() { header.SetCmd<ValueType>(); }
153 void Init(GLuint _program, GLuint _index, uint32 _name_bucket_id) {
154 SetHeader();
155 program = _program;
156 index = _index;
157 name_bucket_id = _name_bucket_id;
160 void* Set(void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id) {
161 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
162 return NextCmdAddress<ValueType>(cmd);
165 gpu::CommandHeader header;
166 uint32 program;
167 uint32 index;
168 uint32 name_bucket_id;
171 COMPILE_ASSERT(sizeof(BindAttribLocationBucket) == 16,
172 Sizeof_BindAttribLocationBucket_is_not_16);
173 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, header) == 0,
174 OffsetOf_BindAttribLocationBucket_header_not_0);
175 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, program) == 4,
176 OffsetOf_BindAttribLocationBucket_program_not_4);
177 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, index) == 8,
178 OffsetOf_BindAttribLocationBucket_index_not_8);
179 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
180 OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12);
182 struct BindBuffer {
183 typedef BindBuffer ValueType;
184 static const CommandId kCmdId = kBindBuffer;
185 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
186 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
188 static uint32 ComputeSize() {
189 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
192 void SetHeader() { header.SetCmd<ValueType>(); }
194 void Init(GLenum _target, GLuint _buffer) {
195 SetHeader();
196 target = _target;
197 buffer = _buffer;
200 void* Set(void* cmd, GLenum _target, GLuint _buffer) {
201 static_cast<ValueType*>(cmd)->Init(_target, _buffer);
202 return NextCmdAddress<ValueType>(cmd);
205 gpu::CommandHeader header;
206 uint32 target;
207 uint32 buffer;
210 COMPILE_ASSERT(sizeof(BindBuffer) == 12, Sizeof_BindBuffer_is_not_12);
211 COMPILE_ASSERT(offsetof(BindBuffer, header) == 0,
212 OffsetOf_BindBuffer_header_not_0);
213 COMPILE_ASSERT(offsetof(BindBuffer, target) == 4,
214 OffsetOf_BindBuffer_target_not_4);
215 COMPILE_ASSERT(offsetof(BindBuffer, buffer) == 8,
216 OffsetOf_BindBuffer_buffer_not_8);
218 struct BindFramebuffer {
219 typedef BindFramebuffer ValueType;
220 static const CommandId kCmdId = kBindFramebuffer;
221 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
222 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
224 static uint32 ComputeSize() {
225 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
228 void SetHeader() { header.SetCmd<ValueType>(); }
230 void Init(GLenum _target, GLuint _framebuffer) {
231 SetHeader();
232 target = _target;
233 framebuffer = _framebuffer;
236 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
237 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
238 return NextCmdAddress<ValueType>(cmd);
241 gpu::CommandHeader header;
242 uint32 target;
243 uint32 framebuffer;
246 COMPILE_ASSERT(sizeof(BindFramebuffer) == 12, Sizeof_BindFramebuffer_is_not_12);
247 COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0,
248 OffsetOf_BindFramebuffer_header_not_0);
249 COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4,
250 OffsetOf_BindFramebuffer_target_not_4);
251 COMPILE_ASSERT(offsetof(BindFramebuffer, framebuffer) == 8,
252 OffsetOf_BindFramebuffer_framebuffer_not_8);
254 struct BindRenderbuffer {
255 typedef BindRenderbuffer ValueType;
256 static const CommandId kCmdId = kBindRenderbuffer;
257 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
258 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
260 static uint32 ComputeSize() {
261 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
264 void SetHeader() { header.SetCmd<ValueType>(); }
266 void Init(GLenum _target, GLuint _renderbuffer) {
267 SetHeader();
268 target = _target;
269 renderbuffer = _renderbuffer;
272 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
273 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
274 return NextCmdAddress<ValueType>(cmd);
277 gpu::CommandHeader header;
278 uint32 target;
279 uint32 renderbuffer;
282 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12,
283 Sizeof_BindRenderbuffer_is_not_12);
284 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0,
285 OffsetOf_BindRenderbuffer_header_not_0);
286 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4,
287 OffsetOf_BindRenderbuffer_target_not_4);
288 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8,
289 OffsetOf_BindRenderbuffer_renderbuffer_not_8);
291 struct BindTexture {
292 typedef BindTexture ValueType;
293 static const CommandId kCmdId = kBindTexture;
294 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
295 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
297 static uint32 ComputeSize() {
298 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
301 void SetHeader() { header.SetCmd<ValueType>(); }
303 void Init(GLenum _target, GLuint _texture) {
304 SetHeader();
305 target = _target;
306 texture = _texture;
309 void* Set(void* cmd, GLenum _target, GLuint _texture) {
310 static_cast<ValueType*>(cmd)->Init(_target, _texture);
311 return NextCmdAddress<ValueType>(cmd);
314 gpu::CommandHeader header;
315 uint32 target;
316 uint32 texture;
319 COMPILE_ASSERT(sizeof(BindTexture) == 12, Sizeof_BindTexture_is_not_12);
320 COMPILE_ASSERT(offsetof(BindTexture, header) == 0,
321 OffsetOf_BindTexture_header_not_0);
322 COMPILE_ASSERT(offsetof(BindTexture, target) == 4,
323 OffsetOf_BindTexture_target_not_4);
324 COMPILE_ASSERT(offsetof(BindTexture, texture) == 8,
325 OffsetOf_BindTexture_texture_not_8);
327 struct BlendColor {
328 typedef BlendColor ValueType;
329 static const CommandId kCmdId = kBlendColor;
330 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
331 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
333 static uint32 ComputeSize() {
334 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
337 void SetHeader() { header.SetCmd<ValueType>(); }
339 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
340 SetHeader();
341 red = _red;
342 green = _green;
343 blue = _blue;
344 alpha = _alpha;
347 void* Set(void* cmd,
348 GLclampf _red,
349 GLclampf _green,
350 GLclampf _blue,
351 GLclampf _alpha) {
352 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
353 return NextCmdAddress<ValueType>(cmd);
356 gpu::CommandHeader header;
357 float red;
358 float green;
359 float blue;
360 float alpha;
363 COMPILE_ASSERT(sizeof(BlendColor) == 20, Sizeof_BlendColor_is_not_20);
364 COMPILE_ASSERT(offsetof(BlendColor, header) == 0,
365 OffsetOf_BlendColor_header_not_0);
366 COMPILE_ASSERT(offsetof(BlendColor, red) == 4, OffsetOf_BlendColor_red_not_4);
367 COMPILE_ASSERT(offsetof(BlendColor, green) == 8,
368 OffsetOf_BlendColor_green_not_8);
369 COMPILE_ASSERT(offsetof(BlendColor, blue) == 12,
370 OffsetOf_BlendColor_blue_not_12);
371 COMPILE_ASSERT(offsetof(BlendColor, alpha) == 16,
372 OffsetOf_BlendColor_alpha_not_16);
374 struct BlendEquation {
375 typedef BlendEquation ValueType;
376 static const CommandId kCmdId = kBlendEquation;
377 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
378 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
380 static uint32 ComputeSize() {
381 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
384 void SetHeader() { header.SetCmd<ValueType>(); }
386 void Init(GLenum _mode) {
387 SetHeader();
388 mode = _mode;
391 void* Set(void* cmd, GLenum _mode) {
392 static_cast<ValueType*>(cmd)->Init(_mode);
393 return NextCmdAddress<ValueType>(cmd);
396 gpu::CommandHeader header;
397 uint32 mode;
400 COMPILE_ASSERT(sizeof(BlendEquation) == 8, Sizeof_BlendEquation_is_not_8);
401 COMPILE_ASSERT(offsetof(BlendEquation, header) == 0,
402 OffsetOf_BlendEquation_header_not_0);
403 COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4,
404 OffsetOf_BlendEquation_mode_not_4);
406 struct BlendEquationSeparate {
407 typedef BlendEquationSeparate ValueType;
408 static const CommandId kCmdId = kBlendEquationSeparate;
409 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
410 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
412 static uint32 ComputeSize() {
413 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
416 void SetHeader() { header.SetCmd<ValueType>(); }
418 void Init(GLenum _modeRGB, GLenum _modeAlpha) {
419 SetHeader();
420 modeRGB = _modeRGB;
421 modeAlpha = _modeAlpha;
424 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
425 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
426 return NextCmdAddress<ValueType>(cmd);
429 gpu::CommandHeader header;
430 uint32 modeRGB;
431 uint32 modeAlpha;
434 COMPILE_ASSERT(sizeof(BlendEquationSeparate) == 12,
435 Sizeof_BlendEquationSeparate_is_not_12);
436 COMPILE_ASSERT(offsetof(BlendEquationSeparate, header) == 0,
437 OffsetOf_BlendEquationSeparate_header_not_0);
438 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeRGB) == 4,
439 OffsetOf_BlendEquationSeparate_modeRGB_not_4);
440 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeAlpha) == 8,
441 OffsetOf_BlendEquationSeparate_modeAlpha_not_8);
443 struct BlendFunc {
444 typedef BlendFunc ValueType;
445 static const CommandId kCmdId = kBlendFunc;
446 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
447 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
449 static uint32 ComputeSize() {
450 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
453 void SetHeader() { header.SetCmd<ValueType>(); }
455 void Init(GLenum _sfactor, GLenum _dfactor) {
456 SetHeader();
457 sfactor = _sfactor;
458 dfactor = _dfactor;
461 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
462 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
463 return NextCmdAddress<ValueType>(cmd);
466 gpu::CommandHeader header;
467 uint32 sfactor;
468 uint32 dfactor;
471 COMPILE_ASSERT(sizeof(BlendFunc) == 12, Sizeof_BlendFunc_is_not_12);
472 COMPILE_ASSERT(offsetof(BlendFunc, header) == 0,
473 OffsetOf_BlendFunc_header_not_0);
474 COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4,
475 OffsetOf_BlendFunc_sfactor_not_4);
476 COMPILE_ASSERT(offsetof(BlendFunc, dfactor) == 8,
477 OffsetOf_BlendFunc_dfactor_not_8);
479 struct BlendFuncSeparate {
480 typedef BlendFuncSeparate ValueType;
481 static const CommandId kCmdId = kBlendFuncSeparate;
482 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
483 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
485 static uint32 ComputeSize() {
486 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
489 void SetHeader() { header.SetCmd<ValueType>(); }
491 void Init(GLenum _srcRGB,
492 GLenum _dstRGB,
493 GLenum _srcAlpha,
494 GLenum _dstAlpha) {
495 SetHeader();
496 srcRGB = _srcRGB;
497 dstRGB = _dstRGB;
498 srcAlpha = _srcAlpha;
499 dstAlpha = _dstAlpha;
502 void* Set(void* cmd,
503 GLenum _srcRGB,
504 GLenum _dstRGB,
505 GLenum _srcAlpha,
506 GLenum _dstAlpha) {
507 static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
508 return NextCmdAddress<ValueType>(cmd);
511 gpu::CommandHeader header;
512 uint32 srcRGB;
513 uint32 dstRGB;
514 uint32 srcAlpha;
515 uint32 dstAlpha;
518 COMPILE_ASSERT(sizeof(BlendFuncSeparate) == 20,
519 Sizeof_BlendFuncSeparate_is_not_20);
520 COMPILE_ASSERT(offsetof(BlendFuncSeparate, header) == 0,
521 OffsetOf_BlendFuncSeparate_header_not_0);
522 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcRGB) == 4,
523 OffsetOf_BlendFuncSeparate_srcRGB_not_4);
524 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstRGB) == 8,
525 OffsetOf_BlendFuncSeparate_dstRGB_not_8);
526 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcAlpha) == 12,
527 OffsetOf_BlendFuncSeparate_srcAlpha_not_12);
528 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstAlpha) == 16,
529 OffsetOf_BlendFuncSeparate_dstAlpha_not_16);
531 struct BufferData {
532 typedef BufferData ValueType;
533 static const CommandId kCmdId = kBufferData;
534 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
535 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
537 static uint32 ComputeSize() {
538 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
541 void SetHeader() { header.SetCmd<ValueType>(); }
543 void Init(GLenum _target,
544 GLsizeiptr _size,
545 uint32 _data_shm_id,
546 uint32 _data_shm_offset,
547 GLenum _usage) {
548 SetHeader();
549 target = _target;
550 size = _size;
551 data_shm_id = _data_shm_id;
552 data_shm_offset = _data_shm_offset;
553 usage = _usage;
556 void* Set(void* cmd,
557 GLenum _target,
558 GLsizeiptr _size,
559 uint32 _data_shm_id,
560 uint32 _data_shm_offset,
561 GLenum _usage) {
562 static_cast<ValueType*>(cmd)
563 ->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage);
564 return NextCmdAddress<ValueType>(cmd);
567 gpu::CommandHeader header;
568 uint32 target;
569 int32 size;
570 uint32 data_shm_id;
571 uint32 data_shm_offset;
572 uint32 usage;
575 COMPILE_ASSERT(sizeof(BufferData) == 24, Sizeof_BufferData_is_not_24);
576 COMPILE_ASSERT(offsetof(BufferData, header) == 0,
577 OffsetOf_BufferData_header_not_0);
578 COMPILE_ASSERT(offsetof(BufferData, target) == 4,
579 OffsetOf_BufferData_target_not_4);
580 COMPILE_ASSERT(offsetof(BufferData, size) == 8, OffsetOf_BufferData_size_not_8);
581 COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12,
582 OffsetOf_BufferData_data_shm_id_not_12);
583 COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16,
584 OffsetOf_BufferData_data_shm_offset_not_16);
585 COMPILE_ASSERT(offsetof(BufferData, usage) == 20,
586 OffsetOf_BufferData_usage_not_20);
588 struct BufferSubData {
589 typedef BufferSubData ValueType;
590 static const CommandId kCmdId = kBufferSubData;
591 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
592 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
594 static uint32 ComputeSize() {
595 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
598 void SetHeader() { header.SetCmd<ValueType>(); }
600 void Init(GLenum _target,
601 GLintptr _offset,
602 GLsizeiptr _size,
603 uint32 _data_shm_id,
604 uint32 _data_shm_offset) {
605 SetHeader();
606 target = _target;
607 offset = _offset;
608 size = _size;
609 data_shm_id = _data_shm_id;
610 data_shm_offset = _data_shm_offset;
613 void* Set(void* cmd,
614 GLenum _target,
615 GLintptr _offset,
616 GLsizeiptr _size,
617 uint32 _data_shm_id,
618 uint32 _data_shm_offset) {
619 static_cast<ValueType*>(cmd)
620 ->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset);
621 return NextCmdAddress<ValueType>(cmd);
624 gpu::CommandHeader header;
625 uint32 target;
626 int32 offset;
627 int32 size;
628 uint32 data_shm_id;
629 uint32 data_shm_offset;
632 COMPILE_ASSERT(sizeof(BufferSubData) == 24, Sizeof_BufferSubData_is_not_24);
633 COMPILE_ASSERT(offsetof(BufferSubData, header) == 0,
634 OffsetOf_BufferSubData_header_not_0);
635 COMPILE_ASSERT(offsetof(BufferSubData, target) == 4,
636 OffsetOf_BufferSubData_target_not_4);
637 COMPILE_ASSERT(offsetof(BufferSubData, offset) == 8,
638 OffsetOf_BufferSubData_offset_not_8);
639 COMPILE_ASSERT(offsetof(BufferSubData, size) == 12,
640 OffsetOf_BufferSubData_size_not_12);
641 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16,
642 OffsetOf_BufferSubData_data_shm_id_not_16);
643 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20,
644 OffsetOf_BufferSubData_data_shm_offset_not_20);
646 struct CheckFramebufferStatus {
647 typedef CheckFramebufferStatus ValueType;
648 static const CommandId kCmdId = kCheckFramebufferStatus;
649 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
650 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
652 typedef GLenum Result;
654 static uint32 ComputeSize() {
655 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
658 void SetHeader() { header.SetCmd<ValueType>(); }
660 void Init(GLenum _target, uint32 _result_shm_id, uint32 _result_shm_offset) {
661 SetHeader();
662 target = _target;
663 result_shm_id = _result_shm_id;
664 result_shm_offset = _result_shm_offset;
667 void* Set(void* cmd,
668 GLenum _target,
669 uint32 _result_shm_id,
670 uint32 _result_shm_offset) {
671 static_cast<ValueType*>(cmd)
672 ->Init(_target, _result_shm_id, _result_shm_offset);
673 return NextCmdAddress<ValueType>(cmd);
676 gpu::CommandHeader header;
677 uint32 target;
678 uint32 result_shm_id;
679 uint32 result_shm_offset;
682 COMPILE_ASSERT(sizeof(CheckFramebufferStatus) == 16,
683 Sizeof_CheckFramebufferStatus_is_not_16);
684 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, header) == 0,
685 OffsetOf_CheckFramebufferStatus_header_not_0);
686 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, target) == 4,
687 OffsetOf_CheckFramebufferStatus_target_not_4);
688 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
689 OffsetOf_CheckFramebufferStatus_result_shm_id_not_8);
690 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
691 OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12);
693 struct Clear {
694 typedef Clear ValueType;
695 static const CommandId kCmdId = kClear;
696 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
697 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
699 static uint32 ComputeSize() {
700 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
703 void SetHeader() { header.SetCmd<ValueType>(); }
705 void Init(GLbitfield _mask) {
706 SetHeader();
707 mask = _mask;
710 void* Set(void* cmd, GLbitfield _mask) {
711 static_cast<ValueType*>(cmd)->Init(_mask);
712 return NextCmdAddress<ValueType>(cmd);
715 gpu::CommandHeader header;
716 uint32 mask;
719 COMPILE_ASSERT(sizeof(Clear) == 8, Sizeof_Clear_is_not_8);
720 COMPILE_ASSERT(offsetof(Clear, header) == 0, OffsetOf_Clear_header_not_0);
721 COMPILE_ASSERT(offsetof(Clear, mask) == 4, OffsetOf_Clear_mask_not_4);
723 struct ClearColor {
724 typedef ClearColor ValueType;
725 static const CommandId kCmdId = kClearColor;
726 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
727 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
729 static uint32 ComputeSize() {
730 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
733 void SetHeader() { header.SetCmd<ValueType>(); }
735 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
736 SetHeader();
737 red = _red;
738 green = _green;
739 blue = _blue;
740 alpha = _alpha;
743 void* Set(void* cmd,
744 GLclampf _red,
745 GLclampf _green,
746 GLclampf _blue,
747 GLclampf _alpha) {
748 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
749 return NextCmdAddress<ValueType>(cmd);
752 gpu::CommandHeader header;
753 float red;
754 float green;
755 float blue;
756 float alpha;
759 COMPILE_ASSERT(sizeof(ClearColor) == 20, Sizeof_ClearColor_is_not_20);
760 COMPILE_ASSERT(offsetof(ClearColor, header) == 0,
761 OffsetOf_ClearColor_header_not_0);
762 COMPILE_ASSERT(offsetof(ClearColor, red) == 4, OffsetOf_ClearColor_red_not_4);
763 COMPILE_ASSERT(offsetof(ClearColor, green) == 8,
764 OffsetOf_ClearColor_green_not_8);
765 COMPILE_ASSERT(offsetof(ClearColor, blue) == 12,
766 OffsetOf_ClearColor_blue_not_12);
767 COMPILE_ASSERT(offsetof(ClearColor, alpha) == 16,
768 OffsetOf_ClearColor_alpha_not_16);
770 struct ClearDepthf {
771 typedef ClearDepthf ValueType;
772 static const CommandId kCmdId = kClearDepthf;
773 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
776 static uint32 ComputeSize() {
777 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
780 void SetHeader() { header.SetCmd<ValueType>(); }
782 void Init(GLclampf _depth) {
783 SetHeader();
784 depth = _depth;
787 void* Set(void* cmd, GLclampf _depth) {
788 static_cast<ValueType*>(cmd)->Init(_depth);
789 return NextCmdAddress<ValueType>(cmd);
792 gpu::CommandHeader header;
793 float depth;
796 COMPILE_ASSERT(sizeof(ClearDepthf) == 8, Sizeof_ClearDepthf_is_not_8);
797 COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0,
798 OffsetOf_ClearDepthf_header_not_0);
799 COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4,
800 OffsetOf_ClearDepthf_depth_not_4);
802 struct ClearStencil {
803 typedef ClearStencil ValueType;
804 static const CommandId kCmdId = kClearStencil;
805 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
806 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
808 static uint32 ComputeSize() {
809 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
812 void SetHeader() { header.SetCmd<ValueType>(); }
814 void Init(GLint _s) {
815 SetHeader();
816 s = _s;
819 void* Set(void* cmd, GLint _s) {
820 static_cast<ValueType*>(cmd)->Init(_s);
821 return NextCmdAddress<ValueType>(cmd);
824 gpu::CommandHeader header;
825 int32 s;
828 COMPILE_ASSERT(sizeof(ClearStencil) == 8, Sizeof_ClearStencil_is_not_8);
829 COMPILE_ASSERT(offsetof(ClearStencil, header) == 0,
830 OffsetOf_ClearStencil_header_not_0);
831 COMPILE_ASSERT(offsetof(ClearStencil, s) == 4, OffsetOf_ClearStencil_s_not_4);
833 struct ColorMask {
834 typedef ColorMask ValueType;
835 static const CommandId kCmdId = kColorMask;
836 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
837 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
839 static uint32 ComputeSize() {
840 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
843 void SetHeader() { header.SetCmd<ValueType>(); }
845 void Init(GLboolean _red,
846 GLboolean _green,
847 GLboolean _blue,
848 GLboolean _alpha) {
849 SetHeader();
850 red = _red;
851 green = _green;
852 blue = _blue;
853 alpha = _alpha;
856 void* Set(void* cmd,
857 GLboolean _red,
858 GLboolean _green,
859 GLboolean _blue,
860 GLboolean _alpha) {
861 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
862 return NextCmdAddress<ValueType>(cmd);
865 gpu::CommandHeader header;
866 uint32 red;
867 uint32 green;
868 uint32 blue;
869 uint32 alpha;
872 COMPILE_ASSERT(sizeof(ColorMask) == 20, Sizeof_ColorMask_is_not_20);
873 COMPILE_ASSERT(offsetof(ColorMask, header) == 0,
874 OffsetOf_ColorMask_header_not_0);
875 COMPILE_ASSERT(offsetof(ColorMask, red) == 4, OffsetOf_ColorMask_red_not_4);
876 COMPILE_ASSERT(offsetof(ColorMask, green) == 8, OffsetOf_ColorMask_green_not_8);
877 COMPILE_ASSERT(offsetof(ColorMask, blue) == 12, OffsetOf_ColorMask_blue_not_12);
878 COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16,
879 OffsetOf_ColorMask_alpha_not_16);
881 struct CompileShader {
882 typedef CompileShader ValueType;
883 static const CommandId kCmdId = kCompileShader;
884 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
885 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
887 static uint32 ComputeSize() {
888 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
891 void SetHeader() { header.SetCmd<ValueType>(); }
893 void Init(GLuint _shader) {
894 SetHeader();
895 shader = _shader;
898 void* Set(void* cmd, GLuint _shader) {
899 static_cast<ValueType*>(cmd)->Init(_shader);
900 return NextCmdAddress<ValueType>(cmd);
903 gpu::CommandHeader header;
904 uint32 shader;
907 COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8);
908 COMPILE_ASSERT(offsetof(CompileShader, header) == 0,
909 OffsetOf_CompileShader_header_not_0);
910 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4,
911 OffsetOf_CompileShader_shader_not_4);
913 struct CompressedTexImage2D {
914 typedef CompressedTexImage2D ValueType;
915 static const CommandId kCmdId = kCompressedTexImage2D;
916 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
917 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
919 static uint32 ComputeSize() {
920 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
923 void SetHeader() { header.SetCmd<ValueType>(); }
925 void Init(GLenum _target,
926 GLint _level,
927 GLenum _internalformat,
928 GLsizei _width,
929 GLsizei _height,
930 GLint _border,
931 GLsizei _imageSize,
932 uint32 _data_shm_id,
933 uint32 _data_shm_offset) {
934 SetHeader();
935 target = _target;
936 level = _level;
937 internalformat = _internalformat;
938 width = _width;
939 height = _height;
940 border = _border;
941 imageSize = _imageSize;
942 data_shm_id = _data_shm_id;
943 data_shm_offset = _data_shm_offset;
946 void* Set(void* cmd,
947 GLenum _target,
948 GLint _level,
949 GLenum _internalformat,
950 GLsizei _width,
951 GLsizei _height,
952 GLint _border,
953 GLsizei _imageSize,
954 uint32 _data_shm_id,
955 uint32 _data_shm_offset) {
956 static_cast<ValueType*>(cmd)->Init(_target,
957 _level,
958 _internalformat,
959 _width,
960 _height,
961 _border,
962 _imageSize,
963 _data_shm_id,
964 _data_shm_offset);
965 return NextCmdAddress<ValueType>(cmd);
968 gpu::CommandHeader header;
969 uint32 target;
970 int32 level;
971 uint32 internalformat;
972 int32 width;
973 int32 height;
974 int32 border;
975 int32 imageSize;
976 uint32 data_shm_id;
977 uint32 data_shm_offset;
980 COMPILE_ASSERT(sizeof(CompressedTexImage2D) == 40,
981 Sizeof_CompressedTexImage2D_is_not_40);
982 COMPILE_ASSERT(offsetof(CompressedTexImage2D, header) == 0,
983 OffsetOf_CompressedTexImage2D_header_not_0);
984 COMPILE_ASSERT(offsetof(CompressedTexImage2D, target) == 4,
985 OffsetOf_CompressedTexImage2D_target_not_4);
986 COMPILE_ASSERT(offsetof(CompressedTexImage2D, level) == 8,
987 OffsetOf_CompressedTexImage2D_level_not_8);
988 COMPILE_ASSERT(offsetof(CompressedTexImage2D, internalformat) == 12,
989 OffsetOf_CompressedTexImage2D_internalformat_not_12);
990 COMPILE_ASSERT(offsetof(CompressedTexImage2D, width) == 16,
991 OffsetOf_CompressedTexImage2D_width_not_16);
992 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20,
993 OffsetOf_CompressedTexImage2D_height_not_20);
994 COMPILE_ASSERT(offsetof(CompressedTexImage2D, border) == 24,
995 OffsetOf_CompressedTexImage2D_border_not_24);
996 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 28,
997 OffsetOf_CompressedTexImage2D_imageSize_not_28);
998 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 32,
999 OffsetOf_CompressedTexImage2D_data_shm_id_not_32);
1000 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 36,
1001 OffsetOf_CompressedTexImage2D_data_shm_offset_not_36);
1003 struct CompressedTexImage2DBucket {
1004 typedef CompressedTexImage2DBucket ValueType;
1005 static const CommandId kCmdId = kCompressedTexImage2DBucket;
1006 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1007 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1009 static uint32 ComputeSize() {
1010 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1013 void SetHeader() { header.SetCmd<ValueType>(); }
1015 void Init(GLenum _target,
1016 GLint _level,
1017 GLenum _internalformat,
1018 GLsizei _width,
1019 GLsizei _height,
1020 GLint _border,
1021 GLuint _bucket_id) {
1022 SetHeader();
1023 target = _target;
1024 level = _level;
1025 internalformat = _internalformat;
1026 width = _width;
1027 height = _height;
1028 border = _border;
1029 bucket_id = _bucket_id;
1032 void* Set(void* cmd,
1033 GLenum _target,
1034 GLint _level,
1035 GLenum _internalformat,
1036 GLsizei _width,
1037 GLsizei _height,
1038 GLint _border,
1039 GLuint _bucket_id) {
1040 static_cast<ValueType*>(cmd)->Init(
1041 _target, _level, _internalformat, _width, _height, _border, _bucket_id);
1042 return NextCmdAddress<ValueType>(cmd);
1045 gpu::CommandHeader header;
1046 uint32 target;
1047 int32 level;
1048 uint32 internalformat;
1049 int32 width;
1050 int32 height;
1051 int32 border;
1052 uint32 bucket_id;
1055 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 32,
1056 Sizeof_CompressedTexImage2DBucket_is_not_32);
1057 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0,
1058 OffsetOf_CompressedTexImage2DBucket_header_not_0);
1059 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4,
1060 OffsetOf_CompressedTexImage2DBucket_target_not_4);
1061 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8,
1062 OffsetOf_CompressedTexImage2DBucket_level_not_8);
1063 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12,
1064 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12);
1065 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16,
1066 OffsetOf_CompressedTexImage2DBucket_width_not_16);
1067 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20,
1068 OffsetOf_CompressedTexImage2DBucket_height_not_20);
1069 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, border) == 24,
1070 OffsetOf_CompressedTexImage2DBucket_border_not_24);
1071 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 28,
1072 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_28);
1074 struct CompressedTexSubImage2D {
1075 typedef CompressedTexSubImage2D ValueType;
1076 static const CommandId kCmdId = kCompressedTexSubImage2D;
1077 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1078 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1080 static uint32 ComputeSize() {
1081 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1084 void SetHeader() { header.SetCmd<ValueType>(); }
1086 void Init(GLenum _target,
1087 GLint _level,
1088 GLint _xoffset,
1089 GLint _yoffset,
1090 GLsizei _width,
1091 GLsizei _height,
1092 GLenum _format,
1093 GLsizei _imageSize,
1094 uint32 _data_shm_id,
1095 uint32 _data_shm_offset) {
1096 SetHeader();
1097 target = _target;
1098 level = _level;
1099 xoffset = _xoffset;
1100 yoffset = _yoffset;
1101 width = _width;
1102 height = _height;
1103 format = _format;
1104 imageSize = _imageSize;
1105 data_shm_id = _data_shm_id;
1106 data_shm_offset = _data_shm_offset;
1109 void* Set(void* cmd,
1110 GLenum _target,
1111 GLint _level,
1112 GLint _xoffset,
1113 GLint _yoffset,
1114 GLsizei _width,
1115 GLsizei _height,
1116 GLenum _format,
1117 GLsizei _imageSize,
1118 uint32 _data_shm_id,
1119 uint32 _data_shm_offset) {
1120 static_cast<ValueType*>(cmd)->Init(_target,
1121 _level,
1122 _xoffset,
1123 _yoffset,
1124 _width,
1125 _height,
1126 _format,
1127 _imageSize,
1128 _data_shm_id,
1129 _data_shm_offset);
1130 return NextCmdAddress<ValueType>(cmd);
1133 gpu::CommandHeader header;
1134 uint32 target;
1135 int32 level;
1136 int32 xoffset;
1137 int32 yoffset;
1138 int32 width;
1139 int32 height;
1140 uint32 format;
1141 int32 imageSize;
1142 uint32 data_shm_id;
1143 uint32 data_shm_offset;
1146 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D) == 44,
1147 Sizeof_CompressedTexSubImage2D_is_not_44);
1148 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, header) == 0,
1149 OffsetOf_CompressedTexSubImage2D_header_not_0);
1150 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, target) == 4,
1151 OffsetOf_CompressedTexSubImage2D_target_not_4);
1152 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, level) == 8,
1153 OffsetOf_CompressedTexSubImage2D_level_not_8);
1154 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, xoffset) == 12,
1155 OffsetOf_CompressedTexSubImage2D_xoffset_not_12);
1156 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, yoffset) == 16,
1157 OffsetOf_CompressedTexSubImage2D_yoffset_not_16);
1158 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, width) == 20,
1159 OffsetOf_CompressedTexSubImage2D_width_not_20);
1160 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, height) == 24,
1161 OffsetOf_CompressedTexSubImage2D_height_not_24);
1162 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28,
1163 OffsetOf_CompressedTexSubImage2D_format_not_28);
1164 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32,
1165 OffsetOf_CompressedTexSubImage2D_imageSize_not_32);
1166 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36,
1167 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36);
1168 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40,
1169 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40);
1171 struct CompressedTexSubImage2DBucket {
1172 typedef CompressedTexSubImage2DBucket ValueType;
1173 static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
1174 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1177 static uint32 ComputeSize() {
1178 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1181 void SetHeader() { header.SetCmd<ValueType>(); }
1183 void Init(GLenum _target,
1184 GLint _level,
1185 GLint _xoffset,
1186 GLint _yoffset,
1187 GLsizei _width,
1188 GLsizei _height,
1189 GLenum _format,
1190 GLuint _bucket_id) {
1191 SetHeader();
1192 target = _target;
1193 level = _level;
1194 xoffset = _xoffset;
1195 yoffset = _yoffset;
1196 width = _width;
1197 height = _height;
1198 format = _format;
1199 bucket_id = _bucket_id;
1202 void* Set(void* cmd,
1203 GLenum _target,
1204 GLint _level,
1205 GLint _xoffset,
1206 GLint _yoffset,
1207 GLsizei _width,
1208 GLsizei _height,
1209 GLenum _format,
1210 GLuint _bucket_id) {
1211 static_cast<ValueType*>(cmd)->Init(_target,
1212 _level,
1213 _xoffset,
1214 _yoffset,
1215 _width,
1216 _height,
1217 _format,
1218 _bucket_id);
1219 return NextCmdAddress<ValueType>(cmd);
1222 gpu::CommandHeader header;
1223 uint32 target;
1224 int32 level;
1225 int32 xoffset;
1226 int32 yoffset;
1227 int32 width;
1228 int32 height;
1229 uint32 format;
1230 uint32 bucket_id;
1233 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36,
1234 Sizeof_CompressedTexSubImage2DBucket_is_not_36);
1235 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0,
1236 OffsetOf_CompressedTexSubImage2DBucket_header_not_0);
1237 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4,
1238 OffsetOf_CompressedTexSubImage2DBucket_target_not_4);
1239 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8,
1240 OffsetOf_CompressedTexSubImage2DBucket_level_not_8);
1241 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
1242 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12);
1243 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
1244 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16);
1245 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20,
1246 OffsetOf_CompressedTexSubImage2DBucket_width_not_20);
1247 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24,
1248 OffsetOf_CompressedTexSubImage2DBucket_height_not_24);
1249 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28,
1250 OffsetOf_CompressedTexSubImage2DBucket_format_not_28);
1251 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
1252 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32);
1254 struct CopyTexImage2D {
1255 typedef CopyTexImage2D ValueType;
1256 static const CommandId kCmdId = kCopyTexImage2D;
1257 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1258 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1260 static uint32 ComputeSize() {
1261 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1264 void SetHeader() { header.SetCmd<ValueType>(); }
1266 void Init(GLenum _target,
1267 GLint _level,
1268 GLenum _internalformat,
1269 GLint _x,
1270 GLint _y,
1271 GLsizei _width,
1272 GLsizei _height,
1273 GLint _border) {
1274 SetHeader();
1275 target = _target;
1276 level = _level;
1277 internalformat = _internalformat;
1278 x = _x;
1279 y = _y;
1280 width = _width;
1281 height = _height;
1282 border = _border;
1285 void* Set(void* cmd,
1286 GLenum _target,
1287 GLint _level,
1288 GLenum _internalformat,
1289 GLint _x,
1290 GLint _y,
1291 GLsizei _width,
1292 GLsizei _height,
1293 GLint _border) {
1294 static_cast<ValueType*>(cmd)->Init(
1295 _target, _level, _internalformat, _x, _y, _width, _height, _border);
1296 return NextCmdAddress<ValueType>(cmd);
1299 gpu::CommandHeader header;
1300 uint32 target;
1301 int32 level;
1302 uint32 internalformat;
1303 int32 x;
1304 int32 y;
1305 int32 width;
1306 int32 height;
1307 int32 border;
1310 COMPILE_ASSERT(sizeof(CopyTexImage2D) == 36, Sizeof_CopyTexImage2D_is_not_36);
1311 COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0,
1312 OffsetOf_CopyTexImage2D_header_not_0);
1313 COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4,
1314 OffsetOf_CopyTexImage2D_target_not_4);
1315 COMPILE_ASSERT(offsetof(CopyTexImage2D, level) == 8,
1316 OffsetOf_CopyTexImage2D_level_not_8);
1317 COMPILE_ASSERT(offsetof(CopyTexImage2D, internalformat) == 12,
1318 OffsetOf_CopyTexImage2D_internalformat_not_12);
1319 COMPILE_ASSERT(offsetof(CopyTexImage2D, x) == 16,
1320 OffsetOf_CopyTexImage2D_x_not_16);
1321 COMPILE_ASSERT(offsetof(CopyTexImage2D, y) == 20,
1322 OffsetOf_CopyTexImage2D_y_not_20);
1323 COMPILE_ASSERT(offsetof(CopyTexImage2D, width) == 24,
1324 OffsetOf_CopyTexImage2D_width_not_24);
1325 COMPILE_ASSERT(offsetof(CopyTexImage2D, height) == 28,
1326 OffsetOf_CopyTexImage2D_height_not_28);
1327 COMPILE_ASSERT(offsetof(CopyTexImage2D, border) == 32,
1328 OffsetOf_CopyTexImage2D_border_not_32);
1330 struct CopyTexSubImage2D {
1331 typedef CopyTexSubImage2D ValueType;
1332 static const CommandId kCmdId = kCopyTexSubImage2D;
1333 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1334 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1336 static uint32 ComputeSize() {
1337 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1340 void SetHeader() { header.SetCmd<ValueType>(); }
1342 void Init(GLenum _target,
1343 GLint _level,
1344 GLint _xoffset,
1345 GLint _yoffset,
1346 GLint _x,
1347 GLint _y,
1348 GLsizei _width,
1349 GLsizei _height) {
1350 SetHeader();
1351 target = _target;
1352 level = _level;
1353 xoffset = _xoffset;
1354 yoffset = _yoffset;
1355 x = _x;
1356 y = _y;
1357 width = _width;
1358 height = _height;
1361 void* Set(void* cmd,
1362 GLenum _target,
1363 GLint _level,
1364 GLint _xoffset,
1365 GLint _yoffset,
1366 GLint _x,
1367 GLint _y,
1368 GLsizei _width,
1369 GLsizei _height) {
1370 static_cast<ValueType*>(cmd)
1371 ->Init(_target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
1372 return NextCmdAddress<ValueType>(cmd);
1375 gpu::CommandHeader header;
1376 uint32 target;
1377 int32 level;
1378 int32 xoffset;
1379 int32 yoffset;
1380 int32 x;
1381 int32 y;
1382 int32 width;
1383 int32 height;
1386 COMPILE_ASSERT(sizeof(CopyTexSubImage2D) == 36,
1387 Sizeof_CopyTexSubImage2D_is_not_36);
1388 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, header) == 0,
1389 OffsetOf_CopyTexSubImage2D_header_not_0);
1390 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, target) == 4,
1391 OffsetOf_CopyTexSubImage2D_target_not_4);
1392 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, level) == 8,
1393 OffsetOf_CopyTexSubImage2D_level_not_8);
1394 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, xoffset) == 12,
1395 OffsetOf_CopyTexSubImage2D_xoffset_not_12);
1396 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, yoffset) == 16,
1397 OffsetOf_CopyTexSubImage2D_yoffset_not_16);
1398 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, x) == 20,
1399 OffsetOf_CopyTexSubImage2D_x_not_20);
1400 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, y) == 24,
1401 OffsetOf_CopyTexSubImage2D_y_not_24);
1402 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, width) == 28,
1403 OffsetOf_CopyTexSubImage2D_width_not_28);
1404 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, height) == 32,
1405 OffsetOf_CopyTexSubImage2D_height_not_32);
1407 struct CreateProgram {
1408 typedef CreateProgram ValueType;
1409 static const CommandId kCmdId = kCreateProgram;
1410 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1411 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1413 static uint32 ComputeSize() {
1414 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1417 void SetHeader() { header.SetCmd<ValueType>(); }
1419 void Init(uint32 _client_id) {
1420 SetHeader();
1421 client_id = _client_id;
1424 void* Set(void* cmd, uint32 _client_id) {
1425 static_cast<ValueType*>(cmd)->Init(_client_id);
1426 return NextCmdAddress<ValueType>(cmd);
1429 gpu::CommandHeader header;
1430 uint32 client_id;
1433 COMPILE_ASSERT(sizeof(CreateProgram) == 8, Sizeof_CreateProgram_is_not_8);
1434 COMPILE_ASSERT(offsetof(CreateProgram, header) == 0,
1435 OffsetOf_CreateProgram_header_not_0);
1436 COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4,
1437 OffsetOf_CreateProgram_client_id_not_4);
1439 struct CreateShader {
1440 typedef CreateShader ValueType;
1441 static const CommandId kCmdId = kCreateShader;
1442 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1443 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1445 static uint32 ComputeSize() {
1446 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1449 void SetHeader() { header.SetCmd<ValueType>(); }
1451 void Init(GLenum _type, uint32 _client_id) {
1452 SetHeader();
1453 type = _type;
1454 client_id = _client_id;
1457 void* Set(void* cmd, GLenum _type, uint32 _client_id) {
1458 static_cast<ValueType*>(cmd)->Init(_type, _client_id);
1459 return NextCmdAddress<ValueType>(cmd);
1462 gpu::CommandHeader header;
1463 uint32 type;
1464 uint32 client_id;
1467 COMPILE_ASSERT(sizeof(CreateShader) == 12, Sizeof_CreateShader_is_not_12);
1468 COMPILE_ASSERT(offsetof(CreateShader, header) == 0,
1469 OffsetOf_CreateShader_header_not_0);
1470 COMPILE_ASSERT(offsetof(CreateShader, type) == 4,
1471 OffsetOf_CreateShader_type_not_4);
1472 COMPILE_ASSERT(offsetof(CreateShader, client_id) == 8,
1473 OffsetOf_CreateShader_client_id_not_8);
1475 struct CullFace {
1476 typedef CullFace ValueType;
1477 static const CommandId kCmdId = kCullFace;
1478 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1479 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1481 static uint32 ComputeSize() {
1482 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1485 void SetHeader() { header.SetCmd<ValueType>(); }
1487 void Init(GLenum _mode) {
1488 SetHeader();
1489 mode = _mode;
1492 void* Set(void* cmd, GLenum _mode) {
1493 static_cast<ValueType*>(cmd)->Init(_mode);
1494 return NextCmdAddress<ValueType>(cmd);
1497 gpu::CommandHeader header;
1498 uint32 mode;
1501 COMPILE_ASSERT(sizeof(CullFace) == 8, Sizeof_CullFace_is_not_8);
1502 COMPILE_ASSERT(offsetof(CullFace, header) == 0, OffsetOf_CullFace_header_not_0);
1503 COMPILE_ASSERT(offsetof(CullFace, mode) == 4, OffsetOf_CullFace_mode_not_4);
1505 struct DeleteBuffers {
1506 typedef DeleteBuffers ValueType;
1507 static const CommandId kCmdId = kDeleteBuffers;
1508 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1509 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1511 static uint32 ComputeSize() {
1512 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1515 void SetHeader() { header.SetCmd<ValueType>(); }
1517 void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
1518 SetHeader();
1519 n = _n;
1520 buffers_shm_id = _buffers_shm_id;
1521 buffers_shm_offset = _buffers_shm_offset;
1524 void* Set(void* cmd,
1525 GLsizei _n,
1526 uint32 _buffers_shm_id,
1527 uint32 _buffers_shm_offset) {
1528 static_cast<ValueType*>(cmd)
1529 ->Init(_n, _buffers_shm_id, _buffers_shm_offset);
1530 return NextCmdAddress<ValueType>(cmd);
1533 gpu::CommandHeader header;
1534 int32 n;
1535 uint32 buffers_shm_id;
1536 uint32 buffers_shm_offset;
1539 COMPILE_ASSERT(sizeof(DeleteBuffers) == 16, Sizeof_DeleteBuffers_is_not_16);
1540 COMPILE_ASSERT(offsetof(DeleteBuffers, header) == 0,
1541 OffsetOf_DeleteBuffers_header_not_0);
1542 COMPILE_ASSERT(offsetof(DeleteBuffers, n) == 4, OffsetOf_DeleteBuffers_n_not_4);
1543 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_id) == 8,
1544 OffsetOf_DeleteBuffers_buffers_shm_id_not_8);
1545 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_offset) == 12,
1546 OffsetOf_DeleteBuffers_buffers_shm_offset_not_12);
1548 struct DeleteBuffersImmediate {
1549 typedef DeleteBuffersImmediate ValueType;
1550 static const CommandId kCmdId = kDeleteBuffersImmediate;
1551 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1552 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1554 static uint32 ComputeDataSize(GLsizei n) {
1555 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1558 static uint32 ComputeSize(GLsizei n) {
1559 return static_cast<uint32>(sizeof(ValueType) +
1560 ComputeDataSize(n)); // NOLINT
1563 void SetHeader(GLsizei n) {
1564 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1567 void Init(GLsizei _n, const GLuint* _buffers) {
1568 SetHeader(_n);
1569 n = _n;
1570 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
1573 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
1574 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
1575 const uint32 size = ComputeSize(_n);
1576 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1579 gpu::CommandHeader header;
1580 int32 n;
1583 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate) == 8,
1584 Sizeof_DeleteBuffersImmediate_is_not_8);
1585 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, header) == 0,
1586 OffsetOf_DeleteBuffersImmediate_header_not_0);
1587 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, n) == 4,
1588 OffsetOf_DeleteBuffersImmediate_n_not_4);
1590 struct DeleteFramebuffers {
1591 typedef DeleteFramebuffers ValueType;
1592 static const CommandId kCmdId = kDeleteFramebuffers;
1593 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1594 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1596 static uint32 ComputeSize() {
1597 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1600 void SetHeader() { header.SetCmd<ValueType>(); }
1602 void Init(GLsizei _n,
1603 uint32 _framebuffers_shm_id,
1604 uint32 _framebuffers_shm_offset) {
1605 SetHeader();
1606 n = _n;
1607 framebuffers_shm_id = _framebuffers_shm_id;
1608 framebuffers_shm_offset = _framebuffers_shm_offset;
1611 void* Set(void* cmd,
1612 GLsizei _n,
1613 uint32 _framebuffers_shm_id,
1614 uint32 _framebuffers_shm_offset) {
1615 static_cast<ValueType*>(cmd)
1616 ->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
1617 return NextCmdAddress<ValueType>(cmd);
1620 gpu::CommandHeader header;
1621 int32 n;
1622 uint32 framebuffers_shm_id;
1623 uint32 framebuffers_shm_offset;
1626 COMPILE_ASSERT(sizeof(DeleteFramebuffers) == 16,
1627 Sizeof_DeleteFramebuffers_is_not_16);
1628 COMPILE_ASSERT(offsetof(DeleteFramebuffers, header) == 0,
1629 OffsetOf_DeleteFramebuffers_header_not_0);
1630 COMPILE_ASSERT(offsetof(DeleteFramebuffers, n) == 4,
1631 OffsetOf_DeleteFramebuffers_n_not_4);
1632 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_id) == 8,
1633 OffsetOf_DeleteFramebuffers_framebuffers_shm_id_not_8);
1634 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_offset) == 12,
1635 OffsetOf_DeleteFramebuffers_framebuffers_shm_offset_not_12);
1637 struct DeleteFramebuffersImmediate {
1638 typedef DeleteFramebuffersImmediate ValueType;
1639 static const CommandId kCmdId = kDeleteFramebuffersImmediate;
1640 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1641 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1643 static uint32 ComputeDataSize(GLsizei n) {
1644 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1647 static uint32 ComputeSize(GLsizei n) {
1648 return static_cast<uint32>(sizeof(ValueType) +
1649 ComputeDataSize(n)); // NOLINT
1652 void SetHeader(GLsizei n) {
1653 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1656 void Init(GLsizei _n, const GLuint* _framebuffers) {
1657 SetHeader(_n);
1658 n = _n;
1659 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
1662 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
1663 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
1664 const uint32 size = ComputeSize(_n);
1665 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1668 gpu::CommandHeader header;
1669 int32 n;
1672 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate) == 8,
1673 Sizeof_DeleteFramebuffersImmediate_is_not_8);
1674 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, header) == 0,
1675 OffsetOf_DeleteFramebuffersImmediate_header_not_0);
1676 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, n) == 4,
1677 OffsetOf_DeleteFramebuffersImmediate_n_not_4);
1679 struct DeleteProgram {
1680 typedef DeleteProgram ValueType;
1681 static const CommandId kCmdId = kDeleteProgram;
1682 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1683 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1685 static uint32 ComputeSize() {
1686 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1689 void SetHeader() { header.SetCmd<ValueType>(); }
1691 void Init(GLuint _program) {
1692 SetHeader();
1693 program = _program;
1696 void* Set(void* cmd, GLuint _program) {
1697 static_cast<ValueType*>(cmd)->Init(_program);
1698 return NextCmdAddress<ValueType>(cmd);
1701 gpu::CommandHeader header;
1702 uint32 program;
1705 COMPILE_ASSERT(sizeof(DeleteProgram) == 8, Sizeof_DeleteProgram_is_not_8);
1706 COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0,
1707 OffsetOf_DeleteProgram_header_not_0);
1708 COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4,
1709 OffsetOf_DeleteProgram_program_not_4);
1711 struct DeleteRenderbuffers {
1712 typedef DeleteRenderbuffers ValueType;
1713 static const CommandId kCmdId = kDeleteRenderbuffers;
1714 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1715 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1717 static uint32 ComputeSize() {
1718 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1721 void SetHeader() { header.SetCmd<ValueType>(); }
1723 void Init(GLsizei _n,
1724 uint32 _renderbuffers_shm_id,
1725 uint32 _renderbuffers_shm_offset) {
1726 SetHeader();
1727 n = _n;
1728 renderbuffers_shm_id = _renderbuffers_shm_id;
1729 renderbuffers_shm_offset = _renderbuffers_shm_offset;
1732 void* Set(void* cmd,
1733 GLsizei _n,
1734 uint32 _renderbuffers_shm_id,
1735 uint32 _renderbuffers_shm_offset) {
1736 static_cast<ValueType*>(cmd)
1737 ->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
1738 return NextCmdAddress<ValueType>(cmd);
1741 gpu::CommandHeader header;
1742 int32 n;
1743 uint32 renderbuffers_shm_id;
1744 uint32 renderbuffers_shm_offset;
1747 COMPILE_ASSERT(sizeof(DeleteRenderbuffers) == 16,
1748 Sizeof_DeleteRenderbuffers_is_not_16);
1749 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, header) == 0,
1750 OffsetOf_DeleteRenderbuffers_header_not_0);
1751 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, n) == 4,
1752 OffsetOf_DeleteRenderbuffers_n_not_4);
1753 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_id) == 8,
1754 OffsetOf_DeleteRenderbuffers_renderbuffers_shm_id_not_8);
1755 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_offset) == 12,
1756 OffsetOf_DeleteRenderbuffers_renderbuffers_shm_offset_not_12);
1758 struct DeleteRenderbuffersImmediate {
1759 typedef DeleteRenderbuffersImmediate ValueType;
1760 static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
1761 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1762 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1764 static uint32 ComputeDataSize(GLsizei n) {
1765 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1768 static uint32 ComputeSize(GLsizei n) {
1769 return static_cast<uint32>(sizeof(ValueType) +
1770 ComputeDataSize(n)); // NOLINT
1773 void SetHeader(GLsizei n) {
1774 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1777 void Init(GLsizei _n, const GLuint* _renderbuffers) {
1778 SetHeader(_n);
1779 n = _n;
1780 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
1783 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
1784 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
1785 const uint32 size = ComputeSize(_n);
1786 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1789 gpu::CommandHeader header;
1790 int32 n;
1793 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8,
1794 Sizeof_DeleteRenderbuffersImmediate_is_not_8);
1795 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0,
1796 OffsetOf_DeleteRenderbuffersImmediate_header_not_0);
1797 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4,
1798 OffsetOf_DeleteRenderbuffersImmediate_n_not_4);
1800 struct DeleteShader {
1801 typedef DeleteShader ValueType;
1802 static const CommandId kCmdId = kDeleteShader;
1803 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1804 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1806 static uint32 ComputeSize() {
1807 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1810 void SetHeader() { header.SetCmd<ValueType>(); }
1812 void Init(GLuint _shader) {
1813 SetHeader();
1814 shader = _shader;
1817 void* Set(void* cmd, GLuint _shader) {
1818 static_cast<ValueType*>(cmd)->Init(_shader);
1819 return NextCmdAddress<ValueType>(cmd);
1822 gpu::CommandHeader header;
1823 uint32 shader;
1826 COMPILE_ASSERT(sizeof(DeleteShader) == 8, Sizeof_DeleteShader_is_not_8);
1827 COMPILE_ASSERT(offsetof(DeleteShader, header) == 0,
1828 OffsetOf_DeleteShader_header_not_0);
1829 COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4,
1830 OffsetOf_DeleteShader_shader_not_4);
1832 struct DeleteTextures {
1833 typedef DeleteTextures ValueType;
1834 static const CommandId kCmdId = kDeleteTextures;
1835 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1836 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1838 static uint32 ComputeSize() {
1839 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1842 void SetHeader() { header.SetCmd<ValueType>(); }
1844 void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
1845 SetHeader();
1846 n = _n;
1847 textures_shm_id = _textures_shm_id;
1848 textures_shm_offset = _textures_shm_offset;
1851 void* Set(void* cmd,
1852 GLsizei _n,
1853 uint32 _textures_shm_id,
1854 uint32 _textures_shm_offset) {
1855 static_cast<ValueType*>(cmd)
1856 ->Init(_n, _textures_shm_id, _textures_shm_offset);
1857 return NextCmdAddress<ValueType>(cmd);
1860 gpu::CommandHeader header;
1861 int32 n;
1862 uint32 textures_shm_id;
1863 uint32 textures_shm_offset;
1866 COMPILE_ASSERT(sizeof(DeleteTextures) == 16, Sizeof_DeleteTextures_is_not_16);
1867 COMPILE_ASSERT(offsetof(DeleteTextures, header) == 0,
1868 OffsetOf_DeleteTextures_header_not_0);
1869 COMPILE_ASSERT(offsetof(DeleteTextures, n) == 4,
1870 OffsetOf_DeleteTextures_n_not_4);
1871 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_id) == 8,
1872 OffsetOf_DeleteTextures_textures_shm_id_not_8);
1873 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_offset) == 12,
1874 OffsetOf_DeleteTextures_textures_shm_offset_not_12);
1876 struct DeleteTexturesImmediate {
1877 typedef DeleteTexturesImmediate ValueType;
1878 static const CommandId kCmdId = kDeleteTexturesImmediate;
1879 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1880 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1882 static uint32 ComputeDataSize(GLsizei n) {
1883 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
1886 static uint32 ComputeSize(GLsizei n) {
1887 return static_cast<uint32>(sizeof(ValueType) +
1888 ComputeDataSize(n)); // NOLINT
1891 void SetHeader(GLsizei n) {
1892 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1895 void Init(GLsizei _n, const GLuint* _textures) {
1896 SetHeader(_n);
1897 n = _n;
1898 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
1901 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
1902 static_cast<ValueType*>(cmd)->Init(_n, _textures);
1903 const uint32 size = ComputeSize(_n);
1904 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1907 gpu::CommandHeader header;
1908 int32 n;
1911 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate) == 8,
1912 Sizeof_DeleteTexturesImmediate_is_not_8);
1913 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, header) == 0,
1914 OffsetOf_DeleteTexturesImmediate_header_not_0);
1915 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, n) == 4,
1916 OffsetOf_DeleteTexturesImmediate_n_not_4);
1918 struct DepthFunc {
1919 typedef DepthFunc ValueType;
1920 static const CommandId kCmdId = kDepthFunc;
1921 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1922 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1924 static uint32 ComputeSize() {
1925 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1928 void SetHeader() { header.SetCmd<ValueType>(); }
1930 void Init(GLenum _func) {
1931 SetHeader();
1932 func = _func;
1935 void* Set(void* cmd, GLenum _func) {
1936 static_cast<ValueType*>(cmd)->Init(_func);
1937 return NextCmdAddress<ValueType>(cmd);
1940 gpu::CommandHeader header;
1941 uint32 func;
1944 COMPILE_ASSERT(sizeof(DepthFunc) == 8, Sizeof_DepthFunc_is_not_8);
1945 COMPILE_ASSERT(offsetof(DepthFunc, header) == 0,
1946 OffsetOf_DepthFunc_header_not_0);
1947 COMPILE_ASSERT(offsetof(DepthFunc, func) == 4, OffsetOf_DepthFunc_func_not_4);
1949 struct DepthMask {
1950 typedef DepthMask ValueType;
1951 static const CommandId kCmdId = kDepthMask;
1952 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1953 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1955 static uint32 ComputeSize() {
1956 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1959 void SetHeader() { header.SetCmd<ValueType>(); }
1961 void Init(GLboolean _flag) {
1962 SetHeader();
1963 flag = _flag;
1966 void* Set(void* cmd, GLboolean _flag) {
1967 static_cast<ValueType*>(cmd)->Init(_flag);
1968 return NextCmdAddress<ValueType>(cmd);
1971 gpu::CommandHeader header;
1972 uint32 flag;
1975 COMPILE_ASSERT(sizeof(DepthMask) == 8, Sizeof_DepthMask_is_not_8);
1976 COMPILE_ASSERT(offsetof(DepthMask, header) == 0,
1977 OffsetOf_DepthMask_header_not_0);
1978 COMPILE_ASSERT(offsetof(DepthMask, flag) == 4, OffsetOf_DepthMask_flag_not_4);
1980 struct DepthRangef {
1981 typedef DepthRangef ValueType;
1982 static const CommandId kCmdId = kDepthRangef;
1983 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1984 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1986 static uint32 ComputeSize() {
1987 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
1990 void SetHeader() { header.SetCmd<ValueType>(); }
1992 void Init(GLclampf _zNear, GLclampf _zFar) {
1993 SetHeader();
1994 zNear = _zNear;
1995 zFar = _zFar;
1998 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
1999 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
2000 return NextCmdAddress<ValueType>(cmd);
2003 gpu::CommandHeader header;
2004 float zNear;
2005 float zFar;
2008 COMPILE_ASSERT(sizeof(DepthRangef) == 12, Sizeof_DepthRangef_is_not_12);
2009 COMPILE_ASSERT(offsetof(DepthRangef, header) == 0,
2010 OffsetOf_DepthRangef_header_not_0);
2011 COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4,
2012 OffsetOf_DepthRangef_zNear_not_4);
2013 COMPILE_ASSERT(offsetof(DepthRangef, zFar) == 8,
2014 OffsetOf_DepthRangef_zFar_not_8);
2016 struct DetachShader {
2017 typedef DetachShader ValueType;
2018 static const CommandId kCmdId = kDetachShader;
2019 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2020 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2022 static uint32 ComputeSize() {
2023 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2026 void SetHeader() { header.SetCmd<ValueType>(); }
2028 void Init(GLuint _program, GLuint _shader) {
2029 SetHeader();
2030 program = _program;
2031 shader = _shader;
2034 void* Set(void* cmd, GLuint _program, GLuint _shader) {
2035 static_cast<ValueType*>(cmd)->Init(_program, _shader);
2036 return NextCmdAddress<ValueType>(cmd);
2039 gpu::CommandHeader header;
2040 uint32 program;
2041 uint32 shader;
2044 COMPILE_ASSERT(sizeof(DetachShader) == 12, Sizeof_DetachShader_is_not_12);
2045 COMPILE_ASSERT(offsetof(DetachShader, header) == 0,
2046 OffsetOf_DetachShader_header_not_0);
2047 COMPILE_ASSERT(offsetof(DetachShader, program) == 4,
2048 OffsetOf_DetachShader_program_not_4);
2049 COMPILE_ASSERT(offsetof(DetachShader, shader) == 8,
2050 OffsetOf_DetachShader_shader_not_8);
2052 struct Disable {
2053 typedef Disable ValueType;
2054 static const CommandId kCmdId = kDisable;
2055 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2056 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2058 static uint32 ComputeSize() {
2059 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2062 void SetHeader() { header.SetCmd<ValueType>(); }
2064 void Init(GLenum _cap) {
2065 SetHeader();
2066 cap = _cap;
2069 void* Set(void* cmd, GLenum _cap) {
2070 static_cast<ValueType*>(cmd)->Init(_cap);
2071 return NextCmdAddress<ValueType>(cmd);
2074 gpu::CommandHeader header;
2075 uint32 cap;
2078 COMPILE_ASSERT(sizeof(Disable) == 8, Sizeof_Disable_is_not_8);
2079 COMPILE_ASSERT(offsetof(Disable, header) == 0, OffsetOf_Disable_header_not_0);
2080 COMPILE_ASSERT(offsetof(Disable, cap) == 4, OffsetOf_Disable_cap_not_4);
2082 struct DisableVertexAttribArray {
2083 typedef DisableVertexAttribArray ValueType;
2084 static const CommandId kCmdId = kDisableVertexAttribArray;
2085 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2086 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2088 static uint32 ComputeSize() {
2089 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2092 void SetHeader() { header.SetCmd<ValueType>(); }
2094 void Init(GLuint _index) {
2095 SetHeader();
2096 index = _index;
2099 void* Set(void* cmd, GLuint _index) {
2100 static_cast<ValueType*>(cmd)->Init(_index);
2101 return NextCmdAddress<ValueType>(cmd);
2104 gpu::CommandHeader header;
2105 uint32 index;
2108 COMPILE_ASSERT(sizeof(DisableVertexAttribArray) == 8,
2109 Sizeof_DisableVertexAttribArray_is_not_8);
2110 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, header) == 0,
2111 OffsetOf_DisableVertexAttribArray_header_not_0);
2112 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, index) == 4,
2113 OffsetOf_DisableVertexAttribArray_index_not_4);
2115 struct DrawArrays {
2116 typedef DrawArrays ValueType;
2117 static const CommandId kCmdId = kDrawArrays;
2118 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2119 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2121 static uint32 ComputeSize() {
2122 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2125 void SetHeader() { header.SetCmd<ValueType>(); }
2127 void Init(GLenum _mode, GLint _first, GLsizei _count) {
2128 SetHeader();
2129 mode = _mode;
2130 first = _first;
2131 count = _count;
2134 void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
2135 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
2136 return NextCmdAddress<ValueType>(cmd);
2139 gpu::CommandHeader header;
2140 uint32 mode;
2141 int32 first;
2142 int32 count;
2145 COMPILE_ASSERT(sizeof(DrawArrays) == 16, Sizeof_DrawArrays_is_not_16);
2146 COMPILE_ASSERT(offsetof(DrawArrays, header) == 0,
2147 OffsetOf_DrawArrays_header_not_0);
2148 COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4, OffsetOf_DrawArrays_mode_not_4);
2149 COMPILE_ASSERT(offsetof(DrawArrays, first) == 8,
2150 OffsetOf_DrawArrays_first_not_8);
2151 COMPILE_ASSERT(offsetof(DrawArrays, count) == 12,
2152 OffsetOf_DrawArrays_count_not_12);
2154 struct DrawElements {
2155 typedef DrawElements ValueType;
2156 static const CommandId kCmdId = kDrawElements;
2157 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2158 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2160 static uint32 ComputeSize() {
2161 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2164 void SetHeader() { header.SetCmd<ValueType>(); }
2166 void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
2167 SetHeader();
2168 mode = _mode;
2169 count = _count;
2170 type = _type;
2171 index_offset = _index_offset;
2174 void* Set(void* cmd,
2175 GLenum _mode,
2176 GLsizei _count,
2177 GLenum _type,
2178 GLuint _index_offset) {
2179 static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
2180 return NextCmdAddress<ValueType>(cmd);
2183 gpu::CommandHeader header;
2184 uint32 mode;
2185 int32 count;
2186 uint32 type;
2187 uint32 index_offset;
2190 COMPILE_ASSERT(sizeof(DrawElements) == 20, Sizeof_DrawElements_is_not_20);
2191 COMPILE_ASSERT(offsetof(DrawElements, header) == 0,
2192 OffsetOf_DrawElements_header_not_0);
2193 COMPILE_ASSERT(offsetof(DrawElements, mode) == 4,
2194 OffsetOf_DrawElements_mode_not_4);
2195 COMPILE_ASSERT(offsetof(DrawElements, count) == 8,
2196 OffsetOf_DrawElements_count_not_8);
2197 COMPILE_ASSERT(offsetof(DrawElements, type) == 12,
2198 OffsetOf_DrawElements_type_not_12);
2199 COMPILE_ASSERT(offsetof(DrawElements, index_offset) == 16,
2200 OffsetOf_DrawElements_index_offset_not_16);
2202 struct Enable {
2203 typedef Enable ValueType;
2204 static const CommandId kCmdId = kEnable;
2205 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2206 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2208 static uint32 ComputeSize() {
2209 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2212 void SetHeader() { header.SetCmd<ValueType>(); }
2214 void Init(GLenum _cap) {
2215 SetHeader();
2216 cap = _cap;
2219 void* Set(void* cmd, GLenum _cap) {
2220 static_cast<ValueType*>(cmd)->Init(_cap);
2221 return NextCmdAddress<ValueType>(cmd);
2224 gpu::CommandHeader header;
2225 uint32 cap;
2228 COMPILE_ASSERT(sizeof(Enable) == 8, Sizeof_Enable_is_not_8);
2229 COMPILE_ASSERT(offsetof(Enable, header) == 0, OffsetOf_Enable_header_not_0);
2230 COMPILE_ASSERT(offsetof(Enable, cap) == 4, OffsetOf_Enable_cap_not_4);
2232 struct EnableVertexAttribArray {
2233 typedef EnableVertexAttribArray ValueType;
2234 static const CommandId kCmdId = kEnableVertexAttribArray;
2235 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2236 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2238 static uint32 ComputeSize() {
2239 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2242 void SetHeader() { header.SetCmd<ValueType>(); }
2244 void Init(GLuint _index) {
2245 SetHeader();
2246 index = _index;
2249 void* Set(void* cmd, GLuint _index) {
2250 static_cast<ValueType*>(cmd)->Init(_index);
2251 return NextCmdAddress<ValueType>(cmd);
2254 gpu::CommandHeader header;
2255 uint32 index;
2258 COMPILE_ASSERT(sizeof(EnableVertexAttribArray) == 8,
2259 Sizeof_EnableVertexAttribArray_is_not_8);
2260 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, header) == 0,
2261 OffsetOf_EnableVertexAttribArray_header_not_0);
2262 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, index) == 4,
2263 OffsetOf_EnableVertexAttribArray_index_not_4);
2265 struct Finish {
2266 typedef Finish ValueType;
2267 static const CommandId kCmdId = kFinish;
2268 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2269 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2271 static uint32 ComputeSize() {
2272 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2275 void SetHeader() { header.SetCmd<ValueType>(); }
2277 void Init() { SetHeader(); }
2279 void* Set(void* cmd) {
2280 static_cast<ValueType*>(cmd)->Init();
2281 return NextCmdAddress<ValueType>(cmd);
2284 gpu::CommandHeader header;
2287 COMPILE_ASSERT(sizeof(Finish) == 4, Sizeof_Finish_is_not_4);
2288 COMPILE_ASSERT(offsetof(Finish, header) == 0, OffsetOf_Finish_header_not_0);
2290 struct Flush {
2291 typedef Flush ValueType;
2292 static const CommandId kCmdId = kFlush;
2293 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2294 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2296 static uint32 ComputeSize() {
2297 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2300 void SetHeader() { header.SetCmd<ValueType>(); }
2302 void Init() { SetHeader(); }
2304 void* Set(void* cmd) {
2305 static_cast<ValueType*>(cmd)->Init();
2306 return NextCmdAddress<ValueType>(cmd);
2309 gpu::CommandHeader header;
2312 COMPILE_ASSERT(sizeof(Flush) == 4, Sizeof_Flush_is_not_4);
2313 COMPILE_ASSERT(offsetof(Flush, header) == 0, OffsetOf_Flush_header_not_0);
2315 struct FramebufferRenderbuffer {
2316 typedef FramebufferRenderbuffer ValueType;
2317 static const CommandId kCmdId = kFramebufferRenderbuffer;
2318 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2319 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2321 static uint32 ComputeSize() {
2322 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2325 void SetHeader() { header.SetCmd<ValueType>(); }
2327 void Init(GLenum _target,
2328 GLenum _attachment,
2329 GLenum _renderbuffertarget,
2330 GLuint _renderbuffer) {
2331 SetHeader();
2332 target = _target;
2333 attachment = _attachment;
2334 renderbuffertarget = _renderbuffertarget;
2335 renderbuffer = _renderbuffer;
2338 void* Set(void* cmd,
2339 GLenum _target,
2340 GLenum _attachment,
2341 GLenum _renderbuffertarget,
2342 GLuint _renderbuffer) {
2343 static_cast<ValueType*>(cmd)
2344 ->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
2345 return NextCmdAddress<ValueType>(cmd);
2348 gpu::CommandHeader header;
2349 uint32 target;
2350 uint32 attachment;
2351 uint32 renderbuffertarget;
2352 uint32 renderbuffer;
2355 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer) == 20,
2356 Sizeof_FramebufferRenderbuffer_is_not_20);
2357 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, header) == 0,
2358 OffsetOf_FramebufferRenderbuffer_header_not_0);
2359 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, target) == 4,
2360 OffsetOf_FramebufferRenderbuffer_target_not_4);
2361 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, attachment) == 8,
2362 OffsetOf_FramebufferRenderbuffer_attachment_not_8);
2363 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
2364 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12);
2365 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
2366 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16);
2368 struct FramebufferTexture2D {
2369 typedef FramebufferTexture2D ValueType;
2370 static const CommandId kCmdId = kFramebufferTexture2D;
2371 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2372 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2374 static uint32 ComputeSize() {
2375 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2378 void SetHeader() { header.SetCmd<ValueType>(); }
2380 void Init(GLenum _target,
2381 GLenum _attachment,
2382 GLenum _textarget,
2383 GLuint _texture,
2384 GLint _level) {
2385 SetHeader();
2386 target = _target;
2387 attachment = _attachment;
2388 textarget = _textarget;
2389 texture = _texture;
2390 level = _level;
2393 void* Set(void* cmd,
2394 GLenum _target,
2395 GLenum _attachment,
2396 GLenum _textarget,
2397 GLuint _texture,
2398 GLint _level) {
2399 static_cast<ValueType*>(cmd)
2400 ->Init(_target, _attachment, _textarget, _texture, _level);
2401 return NextCmdAddress<ValueType>(cmd);
2404 gpu::CommandHeader header;
2405 uint32 target;
2406 uint32 attachment;
2407 uint32 textarget;
2408 uint32 texture;
2409 int32 level;
2412 COMPILE_ASSERT(sizeof(FramebufferTexture2D) == 24,
2413 Sizeof_FramebufferTexture2D_is_not_24);
2414 COMPILE_ASSERT(offsetof(FramebufferTexture2D, header) == 0,
2415 OffsetOf_FramebufferTexture2D_header_not_0);
2416 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4,
2417 OffsetOf_FramebufferTexture2D_target_not_4);
2418 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8,
2419 OffsetOf_FramebufferTexture2D_attachment_not_8);
2420 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12,
2421 OffsetOf_FramebufferTexture2D_textarget_not_12);
2422 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16,
2423 OffsetOf_FramebufferTexture2D_texture_not_16);
2424 COMPILE_ASSERT(offsetof(FramebufferTexture2D, level) == 20,
2425 OffsetOf_FramebufferTexture2D_level_not_20);
2427 struct FrontFace {
2428 typedef FrontFace ValueType;
2429 static const CommandId kCmdId = kFrontFace;
2430 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2431 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2433 static uint32 ComputeSize() {
2434 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2437 void SetHeader() { header.SetCmd<ValueType>(); }
2439 void Init(GLenum _mode) {
2440 SetHeader();
2441 mode = _mode;
2444 void* Set(void* cmd, GLenum _mode) {
2445 static_cast<ValueType*>(cmd)->Init(_mode);
2446 return NextCmdAddress<ValueType>(cmd);
2449 gpu::CommandHeader header;
2450 uint32 mode;
2453 COMPILE_ASSERT(sizeof(FrontFace) == 8, Sizeof_FrontFace_is_not_8);
2454 COMPILE_ASSERT(offsetof(FrontFace, header) == 0,
2455 OffsetOf_FrontFace_header_not_0);
2456 COMPILE_ASSERT(offsetof(FrontFace, mode) == 4, OffsetOf_FrontFace_mode_not_4);
2458 struct GenBuffers {
2459 typedef GenBuffers ValueType;
2460 static const CommandId kCmdId = kGenBuffers;
2461 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2462 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2464 static uint32 ComputeSize() {
2465 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2468 void SetHeader() { header.SetCmd<ValueType>(); }
2470 void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
2471 SetHeader();
2472 n = _n;
2473 buffers_shm_id = _buffers_shm_id;
2474 buffers_shm_offset = _buffers_shm_offset;
2477 void* Set(void* cmd,
2478 GLsizei _n,
2479 uint32 _buffers_shm_id,
2480 uint32 _buffers_shm_offset) {
2481 static_cast<ValueType*>(cmd)
2482 ->Init(_n, _buffers_shm_id, _buffers_shm_offset);
2483 return NextCmdAddress<ValueType>(cmd);
2486 gpu::CommandHeader header;
2487 int32 n;
2488 uint32 buffers_shm_id;
2489 uint32 buffers_shm_offset;
2492 COMPILE_ASSERT(sizeof(GenBuffers) == 16, Sizeof_GenBuffers_is_not_16);
2493 COMPILE_ASSERT(offsetof(GenBuffers, header) == 0,
2494 OffsetOf_GenBuffers_header_not_0);
2495 COMPILE_ASSERT(offsetof(GenBuffers, n) == 4, OffsetOf_GenBuffers_n_not_4);
2496 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_id) == 8,
2497 OffsetOf_GenBuffers_buffers_shm_id_not_8);
2498 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_offset) == 12,
2499 OffsetOf_GenBuffers_buffers_shm_offset_not_12);
2501 struct GenBuffersImmediate {
2502 typedef GenBuffersImmediate ValueType;
2503 static const CommandId kCmdId = kGenBuffersImmediate;
2504 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2505 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2507 static uint32 ComputeDataSize(GLsizei n) {
2508 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2511 static uint32 ComputeSize(GLsizei n) {
2512 return static_cast<uint32>(sizeof(ValueType) +
2513 ComputeDataSize(n)); // NOLINT
2516 void SetHeader(GLsizei n) {
2517 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2520 void Init(GLsizei _n, GLuint* _buffers) {
2521 SetHeader(_n);
2522 n = _n;
2523 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
2526 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
2527 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
2528 const uint32 size = ComputeSize(_n);
2529 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2532 gpu::CommandHeader header;
2533 int32 n;
2536 COMPILE_ASSERT(sizeof(GenBuffersImmediate) == 8,
2537 Sizeof_GenBuffersImmediate_is_not_8);
2538 COMPILE_ASSERT(offsetof(GenBuffersImmediate, header) == 0,
2539 OffsetOf_GenBuffersImmediate_header_not_0);
2540 COMPILE_ASSERT(offsetof(GenBuffersImmediate, n) == 4,
2541 OffsetOf_GenBuffersImmediate_n_not_4);
2543 struct GenerateMipmap {
2544 typedef GenerateMipmap ValueType;
2545 static const CommandId kCmdId = kGenerateMipmap;
2546 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2547 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2549 static uint32 ComputeSize() {
2550 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2553 void SetHeader() { header.SetCmd<ValueType>(); }
2555 void Init(GLenum _target) {
2556 SetHeader();
2557 target = _target;
2560 void* Set(void* cmd, GLenum _target) {
2561 static_cast<ValueType*>(cmd)->Init(_target);
2562 return NextCmdAddress<ValueType>(cmd);
2565 gpu::CommandHeader header;
2566 uint32 target;
2569 COMPILE_ASSERT(sizeof(GenerateMipmap) == 8, Sizeof_GenerateMipmap_is_not_8);
2570 COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0,
2571 OffsetOf_GenerateMipmap_header_not_0);
2572 COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4,
2573 OffsetOf_GenerateMipmap_target_not_4);
2575 struct GenFramebuffers {
2576 typedef GenFramebuffers ValueType;
2577 static const CommandId kCmdId = kGenFramebuffers;
2578 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2579 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2581 static uint32 ComputeSize() {
2582 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2585 void SetHeader() { header.SetCmd<ValueType>(); }
2587 void Init(GLsizei _n,
2588 uint32 _framebuffers_shm_id,
2589 uint32 _framebuffers_shm_offset) {
2590 SetHeader();
2591 n = _n;
2592 framebuffers_shm_id = _framebuffers_shm_id;
2593 framebuffers_shm_offset = _framebuffers_shm_offset;
2596 void* Set(void* cmd,
2597 GLsizei _n,
2598 uint32 _framebuffers_shm_id,
2599 uint32 _framebuffers_shm_offset) {
2600 static_cast<ValueType*>(cmd)
2601 ->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
2602 return NextCmdAddress<ValueType>(cmd);
2605 gpu::CommandHeader header;
2606 int32 n;
2607 uint32 framebuffers_shm_id;
2608 uint32 framebuffers_shm_offset;
2611 COMPILE_ASSERT(sizeof(GenFramebuffers) == 16, Sizeof_GenFramebuffers_is_not_16);
2612 COMPILE_ASSERT(offsetof(GenFramebuffers, header) == 0,
2613 OffsetOf_GenFramebuffers_header_not_0);
2614 COMPILE_ASSERT(offsetof(GenFramebuffers, n) == 4,
2615 OffsetOf_GenFramebuffers_n_not_4);
2616 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_id) == 8,
2617 OffsetOf_GenFramebuffers_framebuffers_shm_id_not_8);
2618 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_offset) == 12,
2619 OffsetOf_GenFramebuffers_framebuffers_shm_offset_not_12);
2621 struct GenFramebuffersImmediate {
2622 typedef GenFramebuffersImmediate ValueType;
2623 static const CommandId kCmdId = kGenFramebuffersImmediate;
2624 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2625 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2627 static uint32 ComputeDataSize(GLsizei n) {
2628 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2631 static uint32 ComputeSize(GLsizei n) {
2632 return static_cast<uint32>(sizeof(ValueType) +
2633 ComputeDataSize(n)); // NOLINT
2636 void SetHeader(GLsizei n) {
2637 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2640 void Init(GLsizei _n, GLuint* _framebuffers) {
2641 SetHeader(_n);
2642 n = _n;
2643 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
2646 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
2647 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
2648 const uint32 size = ComputeSize(_n);
2649 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2652 gpu::CommandHeader header;
2653 int32 n;
2656 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate) == 8,
2657 Sizeof_GenFramebuffersImmediate_is_not_8);
2658 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, header) == 0,
2659 OffsetOf_GenFramebuffersImmediate_header_not_0);
2660 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, n) == 4,
2661 OffsetOf_GenFramebuffersImmediate_n_not_4);
2663 struct GenRenderbuffers {
2664 typedef GenRenderbuffers ValueType;
2665 static const CommandId kCmdId = kGenRenderbuffers;
2666 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2667 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2669 static uint32 ComputeSize() {
2670 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2673 void SetHeader() { header.SetCmd<ValueType>(); }
2675 void Init(GLsizei _n,
2676 uint32 _renderbuffers_shm_id,
2677 uint32 _renderbuffers_shm_offset) {
2678 SetHeader();
2679 n = _n;
2680 renderbuffers_shm_id = _renderbuffers_shm_id;
2681 renderbuffers_shm_offset = _renderbuffers_shm_offset;
2684 void* Set(void* cmd,
2685 GLsizei _n,
2686 uint32 _renderbuffers_shm_id,
2687 uint32 _renderbuffers_shm_offset) {
2688 static_cast<ValueType*>(cmd)
2689 ->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
2690 return NextCmdAddress<ValueType>(cmd);
2693 gpu::CommandHeader header;
2694 int32 n;
2695 uint32 renderbuffers_shm_id;
2696 uint32 renderbuffers_shm_offset;
2699 COMPILE_ASSERT(sizeof(GenRenderbuffers) == 16,
2700 Sizeof_GenRenderbuffers_is_not_16);
2701 COMPILE_ASSERT(offsetof(GenRenderbuffers, header) == 0,
2702 OffsetOf_GenRenderbuffers_header_not_0);
2703 COMPILE_ASSERT(offsetof(GenRenderbuffers, n) == 4,
2704 OffsetOf_GenRenderbuffers_n_not_4);
2705 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_id) == 8,
2706 OffsetOf_GenRenderbuffers_renderbuffers_shm_id_not_8);
2707 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_offset) == 12,
2708 OffsetOf_GenRenderbuffers_renderbuffers_shm_offset_not_12);
2710 struct GenRenderbuffersImmediate {
2711 typedef GenRenderbuffersImmediate ValueType;
2712 static const CommandId kCmdId = kGenRenderbuffersImmediate;
2713 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2714 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2716 static uint32 ComputeDataSize(GLsizei n) {
2717 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2720 static uint32 ComputeSize(GLsizei n) {
2721 return static_cast<uint32>(sizeof(ValueType) +
2722 ComputeDataSize(n)); // NOLINT
2725 void SetHeader(GLsizei n) {
2726 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2729 void Init(GLsizei _n, GLuint* _renderbuffers) {
2730 SetHeader(_n);
2731 n = _n;
2732 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
2735 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
2736 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
2737 const uint32 size = ComputeSize(_n);
2738 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2741 gpu::CommandHeader header;
2742 int32 n;
2745 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8,
2746 Sizeof_GenRenderbuffersImmediate_is_not_8);
2747 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0,
2748 OffsetOf_GenRenderbuffersImmediate_header_not_0);
2749 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4,
2750 OffsetOf_GenRenderbuffersImmediate_n_not_4);
2752 struct GenTextures {
2753 typedef GenTextures ValueType;
2754 static const CommandId kCmdId = kGenTextures;
2755 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2756 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2758 static uint32 ComputeSize() {
2759 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2762 void SetHeader() { header.SetCmd<ValueType>(); }
2764 void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
2765 SetHeader();
2766 n = _n;
2767 textures_shm_id = _textures_shm_id;
2768 textures_shm_offset = _textures_shm_offset;
2771 void* Set(void* cmd,
2772 GLsizei _n,
2773 uint32 _textures_shm_id,
2774 uint32 _textures_shm_offset) {
2775 static_cast<ValueType*>(cmd)
2776 ->Init(_n, _textures_shm_id, _textures_shm_offset);
2777 return NextCmdAddress<ValueType>(cmd);
2780 gpu::CommandHeader header;
2781 int32 n;
2782 uint32 textures_shm_id;
2783 uint32 textures_shm_offset;
2786 COMPILE_ASSERT(sizeof(GenTextures) == 16, Sizeof_GenTextures_is_not_16);
2787 COMPILE_ASSERT(offsetof(GenTextures, header) == 0,
2788 OffsetOf_GenTextures_header_not_0);
2789 COMPILE_ASSERT(offsetof(GenTextures, n) == 4, OffsetOf_GenTextures_n_not_4);
2790 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_id) == 8,
2791 OffsetOf_GenTextures_textures_shm_id_not_8);
2792 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_offset) == 12,
2793 OffsetOf_GenTextures_textures_shm_offset_not_12);
2795 struct GenTexturesImmediate {
2796 typedef GenTexturesImmediate ValueType;
2797 static const CommandId kCmdId = kGenTexturesImmediate;
2798 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2801 static uint32 ComputeDataSize(GLsizei n) {
2802 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
2805 static uint32 ComputeSize(GLsizei n) {
2806 return static_cast<uint32>(sizeof(ValueType) +
2807 ComputeDataSize(n)); // NOLINT
2810 void SetHeader(GLsizei n) {
2811 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2814 void Init(GLsizei _n, GLuint* _textures) {
2815 SetHeader(_n);
2816 n = _n;
2817 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
2820 void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
2821 static_cast<ValueType*>(cmd)->Init(_n, _textures);
2822 const uint32 size = ComputeSize(_n);
2823 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2826 gpu::CommandHeader header;
2827 int32 n;
2830 COMPILE_ASSERT(sizeof(GenTexturesImmediate) == 8,
2831 Sizeof_GenTexturesImmediate_is_not_8);
2832 COMPILE_ASSERT(offsetof(GenTexturesImmediate, header) == 0,
2833 OffsetOf_GenTexturesImmediate_header_not_0);
2834 COMPILE_ASSERT(offsetof(GenTexturesImmediate, n) == 4,
2835 OffsetOf_GenTexturesImmediate_n_not_4);
2837 struct GetActiveAttrib {
2838 typedef GetActiveAttrib ValueType;
2839 static const CommandId kCmdId = kGetActiveAttrib;
2840 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2841 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2843 struct Result {
2844 int32 success;
2845 int32 size;
2846 uint32 type;
2849 static uint32 ComputeSize() {
2850 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2853 void SetHeader() { header.SetCmd<ValueType>(); }
2855 void Init(GLuint _program,
2856 GLuint _index,
2857 uint32 _name_bucket_id,
2858 uint32 _result_shm_id,
2859 uint32 _result_shm_offset) {
2860 SetHeader();
2861 program = _program;
2862 index = _index;
2863 name_bucket_id = _name_bucket_id;
2864 result_shm_id = _result_shm_id;
2865 result_shm_offset = _result_shm_offset;
2868 void* Set(void* cmd,
2869 GLuint _program,
2870 GLuint _index,
2871 uint32 _name_bucket_id,
2872 uint32 _result_shm_id,
2873 uint32 _result_shm_offset) {
2874 static_cast<ValueType*>(cmd)->Init(
2875 _program, _index, _name_bucket_id, _result_shm_id, _result_shm_offset);
2876 return NextCmdAddress<ValueType>(cmd);
2879 gpu::CommandHeader header;
2880 uint32 program;
2881 uint32 index;
2882 uint32 name_bucket_id;
2883 uint32 result_shm_id;
2884 uint32 result_shm_offset;
2887 COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24, Sizeof_GetActiveAttrib_is_not_24);
2888 COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0,
2889 OffsetOf_GetActiveAttrib_header_not_0);
2890 COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4,
2891 OffsetOf_GetActiveAttrib_program_not_4);
2892 COMPILE_ASSERT(offsetof(GetActiveAttrib, index) == 8,
2893 OffsetOf_GetActiveAttrib_index_not_8);
2894 COMPILE_ASSERT(offsetof(GetActiveAttrib, name_bucket_id) == 12,
2895 OffsetOf_GetActiveAttrib_name_bucket_id_not_12);
2896 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_id) == 16,
2897 OffsetOf_GetActiveAttrib_result_shm_id_not_16);
2898 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_offset) == 20,
2899 OffsetOf_GetActiveAttrib_result_shm_offset_not_20);
2900 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, success) == 0,
2901 OffsetOf_GetActiveAttrib_Result_success_not_0);
2902 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, size) == 4,
2903 OffsetOf_GetActiveAttrib_Result_size_not_4);
2904 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, type) == 8,
2905 OffsetOf_GetActiveAttrib_Result_type_not_8);
2907 struct GetActiveUniform {
2908 typedef GetActiveUniform ValueType;
2909 static const CommandId kCmdId = kGetActiveUniform;
2910 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2911 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2913 struct Result {
2914 int32 success;
2915 int32 size;
2916 uint32 type;
2919 static uint32 ComputeSize() {
2920 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2923 void SetHeader() { header.SetCmd<ValueType>(); }
2925 void Init(GLuint _program,
2926 GLuint _index,
2927 uint32 _name_bucket_id,
2928 uint32 _result_shm_id,
2929 uint32 _result_shm_offset) {
2930 SetHeader();
2931 program = _program;
2932 index = _index;
2933 name_bucket_id = _name_bucket_id;
2934 result_shm_id = _result_shm_id;
2935 result_shm_offset = _result_shm_offset;
2938 void* Set(void* cmd,
2939 GLuint _program,
2940 GLuint _index,
2941 uint32 _name_bucket_id,
2942 uint32 _result_shm_id,
2943 uint32 _result_shm_offset) {
2944 static_cast<ValueType*>(cmd)->Init(
2945 _program, _index, _name_bucket_id, _result_shm_id, _result_shm_offset);
2946 return NextCmdAddress<ValueType>(cmd);
2949 gpu::CommandHeader header;
2950 uint32 program;
2951 uint32 index;
2952 uint32 name_bucket_id;
2953 uint32 result_shm_id;
2954 uint32 result_shm_offset;
2957 COMPILE_ASSERT(sizeof(GetActiveUniform) == 24,
2958 Sizeof_GetActiveUniform_is_not_24);
2959 COMPILE_ASSERT(offsetof(GetActiveUniform, header) == 0,
2960 OffsetOf_GetActiveUniform_header_not_0);
2961 COMPILE_ASSERT(offsetof(GetActiveUniform, program) == 4,
2962 OffsetOf_GetActiveUniform_program_not_4);
2963 COMPILE_ASSERT(offsetof(GetActiveUniform, index) == 8,
2964 OffsetOf_GetActiveUniform_index_not_8);
2965 COMPILE_ASSERT(offsetof(GetActiveUniform, name_bucket_id) == 12,
2966 OffsetOf_GetActiveUniform_name_bucket_id_not_12);
2967 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_id) == 16,
2968 OffsetOf_GetActiveUniform_result_shm_id_not_16);
2969 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_offset) == 20,
2970 OffsetOf_GetActiveUniform_result_shm_offset_not_20);
2971 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, success) == 0,
2972 OffsetOf_GetActiveUniform_Result_success_not_0);
2973 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, size) == 4,
2974 OffsetOf_GetActiveUniform_Result_size_not_4);
2975 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, type) == 8,
2976 OffsetOf_GetActiveUniform_Result_type_not_8);
2978 struct GetAttachedShaders {
2979 typedef GetAttachedShaders ValueType;
2980 static const CommandId kCmdId = kGetAttachedShaders;
2981 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2982 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2984 typedef SizedResult<GLuint> Result;
2986 static uint32 ComputeSize() {
2987 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
2990 void SetHeader() { header.SetCmd<ValueType>(); }
2992 void Init(GLuint _program,
2993 uint32 _result_shm_id,
2994 uint32 _result_shm_offset,
2995 uint32 _result_size) {
2996 SetHeader();
2997 program = _program;
2998 result_shm_id = _result_shm_id;
2999 result_shm_offset = _result_shm_offset;
3000 result_size = _result_size;
3003 void* Set(void* cmd,
3004 GLuint _program,
3005 uint32 _result_shm_id,
3006 uint32 _result_shm_offset,
3007 uint32 _result_size) {
3008 static_cast<ValueType*>(cmd)
3009 ->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
3010 return NextCmdAddress<ValueType>(cmd);
3013 gpu::CommandHeader header;
3014 uint32 program;
3015 uint32 result_shm_id;
3016 uint32 result_shm_offset;
3017 uint32 result_size;
3020 COMPILE_ASSERT(sizeof(GetAttachedShaders) == 20,
3021 Sizeof_GetAttachedShaders_is_not_20);
3022 COMPILE_ASSERT(offsetof(GetAttachedShaders, header) == 0,
3023 OffsetOf_GetAttachedShaders_header_not_0);
3024 COMPILE_ASSERT(offsetof(GetAttachedShaders, program) == 4,
3025 OffsetOf_GetAttachedShaders_program_not_4);
3026 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_id) == 8,
3027 OffsetOf_GetAttachedShaders_result_shm_id_not_8);
3028 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_offset) == 12,
3029 OffsetOf_GetAttachedShaders_result_shm_offset_not_12);
3030 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_size) == 16,
3031 OffsetOf_GetAttachedShaders_result_size_not_16);
3033 struct GetBooleanv {
3034 typedef GetBooleanv ValueType;
3035 static const CommandId kCmdId = kGetBooleanv;
3036 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3037 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3039 typedef SizedResult<GLboolean> Result;
3041 static uint32 ComputeSize() {
3042 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3045 void SetHeader() { header.SetCmd<ValueType>(); }
3047 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3048 SetHeader();
3049 pname = _pname;
3050 params_shm_id = _params_shm_id;
3051 params_shm_offset = _params_shm_offset;
3054 void* Set(void* cmd,
3055 GLenum _pname,
3056 uint32 _params_shm_id,
3057 uint32 _params_shm_offset) {
3058 static_cast<ValueType*>(cmd)
3059 ->Init(_pname, _params_shm_id, _params_shm_offset);
3060 return NextCmdAddress<ValueType>(cmd);
3063 gpu::CommandHeader header;
3064 uint32 pname;
3065 uint32 params_shm_id;
3066 uint32 params_shm_offset;
3069 COMPILE_ASSERT(sizeof(GetBooleanv) == 16, Sizeof_GetBooleanv_is_not_16);
3070 COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0,
3071 OffsetOf_GetBooleanv_header_not_0);
3072 COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4,
3073 OffsetOf_GetBooleanv_pname_not_4);
3074 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_id) == 8,
3075 OffsetOf_GetBooleanv_params_shm_id_not_8);
3076 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_offset) == 12,
3077 OffsetOf_GetBooleanv_params_shm_offset_not_12);
3079 struct GetBufferParameteriv {
3080 typedef GetBufferParameteriv ValueType;
3081 static const CommandId kCmdId = kGetBufferParameteriv;
3082 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3083 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3085 typedef SizedResult<GLint> Result;
3087 static uint32 ComputeSize() {
3088 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3091 void SetHeader() { header.SetCmd<ValueType>(); }
3093 void Init(GLenum _target,
3094 GLenum _pname,
3095 uint32 _params_shm_id,
3096 uint32 _params_shm_offset) {
3097 SetHeader();
3098 target = _target;
3099 pname = _pname;
3100 params_shm_id = _params_shm_id;
3101 params_shm_offset = _params_shm_offset;
3104 void* Set(void* cmd,
3105 GLenum _target,
3106 GLenum _pname,
3107 uint32 _params_shm_id,
3108 uint32 _params_shm_offset) {
3109 static_cast<ValueType*>(cmd)
3110 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3111 return NextCmdAddress<ValueType>(cmd);
3114 gpu::CommandHeader header;
3115 uint32 target;
3116 uint32 pname;
3117 uint32 params_shm_id;
3118 uint32 params_shm_offset;
3121 COMPILE_ASSERT(sizeof(GetBufferParameteriv) == 20,
3122 Sizeof_GetBufferParameteriv_is_not_20);
3123 COMPILE_ASSERT(offsetof(GetBufferParameteriv, header) == 0,
3124 OffsetOf_GetBufferParameteriv_header_not_0);
3125 COMPILE_ASSERT(offsetof(GetBufferParameteriv, target) == 4,
3126 OffsetOf_GetBufferParameteriv_target_not_4);
3127 COMPILE_ASSERT(offsetof(GetBufferParameteriv, pname) == 8,
3128 OffsetOf_GetBufferParameteriv_pname_not_8);
3129 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_id) == 12,
3130 OffsetOf_GetBufferParameteriv_params_shm_id_not_12);
3131 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
3132 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16);
3134 struct GetError {
3135 typedef GetError ValueType;
3136 static const CommandId kCmdId = kGetError;
3137 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3138 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3140 typedef GLenum Result;
3142 static uint32 ComputeSize() {
3143 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3146 void SetHeader() { header.SetCmd<ValueType>(); }
3148 void Init(uint32 _result_shm_id, uint32 _result_shm_offset) {
3149 SetHeader();
3150 result_shm_id = _result_shm_id;
3151 result_shm_offset = _result_shm_offset;
3154 void* Set(void* cmd, uint32 _result_shm_id, uint32 _result_shm_offset) {
3155 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
3156 return NextCmdAddress<ValueType>(cmd);
3159 gpu::CommandHeader header;
3160 uint32 result_shm_id;
3161 uint32 result_shm_offset;
3164 COMPILE_ASSERT(sizeof(GetError) == 12, Sizeof_GetError_is_not_12);
3165 COMPILE_ASSERT(offsetof(GetError, header) == 0, OffsetOf_GetError_header_not_0);
3166 COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4,
3167 OffsetOf_GetError_result_shm_id_not_4);
3168 COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8,
3169 OffsetOf_GetError_result_shm_offset_not_8);
3171 struct GetFloatv {
3172 typedef GetFloatv ValueType;
3173 static const CommandId kCmdId = kGetFloatv;
3174 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3177 typedef SizedResult<GLfloat> Result;
3179 static uint32 ComputeSize() {
3180 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3183 void SetHeader() { header.SetCmd<ValueType>(); }
3185 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3186 SetHeader();
3187 pname = _pname;
3188 params_shm_id = _params_shm_id;
3189 params_shm_offset = _params_shm_offset;
3192 void* Set(void* cmd,
3193 GLenum _pname,
3194 uint32 _params_shm_id,
3195 uint32 _params_shm_offset) {
3196 static_cast<ValueType*>(cmd)
3197 ->Init(_pname, _params_shm_id, _params_shm_offset);
3198 return NextCmdAddress<ValueType>(cmd);
3201 gpu::CommandHeader header;
3202 uint32 pname;
3203 uint32 params_shm_id;
3204 uint32 params_shm_offset;
3207 COMPILE_ASSERT(sizeof(GetFloatv) == 16, Sizeof_GetFloatv_is_not_16);
3208 COMPILE_ASSERT(offsetof(GetFloatv, header) == 0,
3209 OffsetOf_GetFloatv_header_not_0);
3210 COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4, OffsetOf_GetFloatv_pname_not_4);
3211 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8,
3212 OffsetOf_GetFloatv_params_shm_id_not_8);
3213 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12,
3214 OffsetOf_GetFloatv_params_shm_offset_not_12);
3216 struct GetFramebufferAttachmentParameteriv {
3217 typedef GetFramebufferAttachmentParameteriv ValueType;
3218 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
3219 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3220 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3222 typedef SizedResult<GLint> Result;
3224 static uint32 ComputeSize() {
3225 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3228 void SetHeader() { header.SetCmd<ValueType>(); }
3230 void Init(GLenum _target,
3231 GLenum _attachment,
3232 GLenum _pname,
3233 uint32 _params_shm_id,
3234 uint32 _params_shm_offset) {
3235 SetHeader();
3236 target = _target;
3237 attachment = _attachment;
3238 pname = _pname;
3239 params_shm_id = _params_shm_id;
3240 params_shm_offset = _params_shm_offset;
3243 void* Set(void* cmd,
3244 GLenum _target,
3245 GLenum _attachment,
3246 GLenum _pname,
3247 uint32 _params_shm_id,
3248 uint32 _params_shm_offset) {
3249 static_cast<ValueType*>(cmd)->Init(
3250 _target, _attachment, _pname, _params_shm_id, _params_shm_offset);
3251 return NextCmdAddress<ValueType>(cmd);
3254 gpu::CommandHeader header;
3255 uint32 target;
3256 uint32 attachment;
3257 uint32 pname;
3258 uint32 params_shm_id;
3259 uint32 params_shm_offset;
3262 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv) == 24,
3263 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24);
3264 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
3265 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0);
3266 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
3267 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4);
3268 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
3269 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8);
3270 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
3271 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12);
3272 COMPILE_ASSERT(
3273 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
3274 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16); // NOLINT
3275 COMPILE_ASSERT(
3276 offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20,
3277 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20); // NOLINT
3279 struct GetIntegerv {
3280 typedef GetIntegerv ValueType;
3281 static const CommandId kCmdId = kGetIntegerv;
3282 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3283 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3285 typedef SizedResult<GLint> Result;
3287 static uint32 ComputeSize() {
3288 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3291 void SetHeader() { header.SetCmd<ValueType>(); }
3293 void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
3294 SetHeader();
3295 pname = _pname;
3296 params_shm_id = _params_shm_id;
3297 params_shm_offset = _params_shm_offset;
3300 void* Set(void* cmd,
3301 GLenum _pname,
3302 uint32 _params_shm_id,
3303 uint32 _params_shm_offset) {
3304 static_cast<ValueType*>(cmd)
3305 ->Init(_pname, _params_shm_id, _params_shm_offset);
3306 return NextCmdAddress<ValueType>(cmd);
3309 gpu::CommandHeader header;
3310 uint32 pname;
3311 uint32 params_shm_id;
3312 uint32 params_shm_offset;
3315 COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16);
3316 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0,
3317 OffsetOf_GetIntegerv_header_not_0);
3318 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4,
3319 OffsetOf_GetIntegerv_pname_not_4);
3320 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8,
3321 OffsetOf_GetIntegerv_params_shm_id_not_8);
3322 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12,
3323 OffsetOf_GetIntegerv_params_shm_offset_not_12);
3325 struct GetProgramiv {
3326 typedef GetProgramiv ValueType;
3327 static const CommandId kCmdId = kGetProgramiv;
3328 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3329 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3331 typedef SizedResult<GLint> Result;
3333 static uint32 ComputeSize() {
3334 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3337 void SetHeader() { header.SetCmd<ValueType>(); }
3339 void Init(GLuint _program,
3340 GLenum _pname,
3341 uint32 _params_shm_id,
3342 uint32 _params_shm_offset) {
3343 SetHeader();
3344 program = _program;
3345 pname = _pname;
3346 params_shm_id = _params_shm_id;
3347 params_shm_offset = _params_shm_offset;
3350 void* Set(void* cmd,
3351 GLuint _program,
3352 GLenum _pname,
3353 uint32 _params_shm_id,
3354 uint32 _params_shm_offset) {
3355 static_cast<ValueType*>(cmd)
3356 ->Init(_program, _pname, _params_shm_id, _params_shm_offset);
3357 return NextCmdAddress<ValueType>(cmd);
3360 gpu::CommandHeader header;
3361 uint32 program;
3362 uint32 pname;
3363 uint32 params_shm_id;
3364 uint32 params_shm_offset;
3367 COMPILE_ASSERT(sizeof(GetProgramiv) == 20, Sizeof_GetProgramiv_is_not_20);
3368 COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0,
3369 OffsetOf_GetProgramiv_header_not_0);
3370 COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4,
3371 OffsetOf_GetProgramiv_program_not_4);
3372 COMPILE_ASSERT(offsetof(GetProgramiv, pname) == 8,
3373 OffsetOf_GetProgramiv_pname_not_8);
3374 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_id) == 12,
3375 OffsetOf_GetProgramiv_params_shm_id_not_12);
3376 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_offset) == 16,
3377 OffsetOf_GetProgramiv_params_shm_offset_not_16);
3379 struct GetProgramInfoLog {
3380 typedef GetProgramInfoLog ValueType;
3381 static const CommandId kCmdId = kGetProgramInfoLog;
3382 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3383 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3385 static uint32 ComputeSize() {
3386 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3389 void SetHeader() { header.SetCmd<ValueType>(); }
3391 void Init(GLuint _program, uint32 _bucket_id) {
3392 SetHeader();
3393 program = _program;
3394 bucket_id = _bucket_id;
3397 void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
3398 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
3399 return NextCmdAddress<ValueType>(cmd);
3402 gpu::CommandHeader header;
3403 uint32 program;
3404 uint32 bucket_id;
3407 COMPILE_ASSERT(sizeof(GetProgramInfoLog) == 12,
3408 Sizeof_GetProgramInfoLog_is_not_12);
3409 COMPILE_ASSERT(offsetof(GetProgramInfoLog, header) == 0,
3410 OffsetOf_GetProgramInfoLog_header_not_0);
3411 COMPILE_ASSERT(offsetof(GetProgramInfoLog, program) == 4,
3412 OffsetOf_GetProgramInfoLog_program_not_4);
3413 COMPILE_ASSERT(offsetof(GetProgramInfoLog, bucket_id) == 8,
3414 OffsetOf_GetProgramInfoLog_bucket_id_not_8);
3416 struct GetRenderbufferParameteriv {
3417 typedef GetRenderbufferParameteriv ValueType;
3418 static const CommandId kCmdId = kGetRenderbufferParameteriv;
3419 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3420 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3422 typedef SizedResult<GLint> Result;
3424 static uint32 ComputeSize() {
3425 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3428 void SetHeader() { header.SetCmd<ValueType>(); }
3430 void Init(GLenum _target,
3431 GLenum _pname,
3432 uint32 _params_shm_id,
3433 uint32 _params_shm_offset) {
3434 SetHeader();
3435 target = _target;
3436 pname = _pname;
3437 params_shm_id = _params_shm_id;
3438 params_shm_offset = _params_shm_offset;
3441 void* Set(void* cmd,
3442 GLenum _target,
3443 GLenum _pname,
3444 uint32 _params_shm_id,
3445 uint32 _params_shm_offset) {
3446 static_cast<ValueType*>(cmd)
3447 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3448 return NextCmdAddress<ValueType>(cmd);
3451 gpu::CommandHeader header;
3452 uint32 target;
3453 uint32 pname;
3454 uint32 params_shm_id;
3455 uint32 params_shm_offset;
3458 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv) == 20,
3459 Sizeof_GetRenderbufferParameteriv_is_not_20);
3460 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, header) == 0,
3461 OffsetOf_GetRenderbufferParameteriv_header_not_0);
3462 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4,
3463 OffsetOf_GetRenderbufferParameteriv_target_not_4);
3464 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8,
3465 OffsetOf_GetRenderbufferParameteriv_pname_not_8);
3466 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
3467 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12);
3468 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
3469 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16);
3471 struct GetShaderiv {
3472 typedef GetShaderiv ValueType;
3473 static const CommandId kCmdId = kGetShaderiv;
3474 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3475 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3477 typedef SizedResult<GLint> Result;
3479 static uint32 ComputeSize() {
3480 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3483 void SetHeader() { header.SetCmd<ValueType>(); }
3485 void Init(GLuint _shader,
3486 GLenum _pname,
3487 uint32 _params_shm_id,
3488 uint32 _params_shm_offset) {
3489 SetHeader();
3490 shader = _shader;
3491 pname = _pname;
3492 params_shm_id = _params_shm_id;
3493 params_shm_offset = _params_shm_offset;
3496 void* Set(void* cmd,
3497 GLuint _shader,
3498 GLenum _pname,
3499 uint32 _params_shm_id,
3500 uint32 _params_shm_offset) {
3501 static_cast<ValueType*>(cmd)
3502 ->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
3503 return NextCmdAddress<ValueType>(cmd);
3506 gpu::CommandHeader header;
3507 uint32 shader;
3508 uint32 pname;
3509 uint32 params_shm_id;
3510 uint32 params_shm_offset;
3513 COMPILE_ASSERT(sizeof(GetShaderiv) == 20, Sizeof_GetShaderiv_is_not_20);
3514 COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0,
3515 OffsetOf_GetShaderiv_header_not_0);
3516 COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4,
3517 OffsetOf_GetShaderiv_shader_not_4);
3518 COMPILE_ASSERT(offsetof(GetShaderiv, pname) == 8,
3519 OffsetOf_GetShaderiv_pname_not_8);
3520 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_id) == 12,
3521 OffsetOf_GetShaderiv_params_shm_id_not_12);
3522 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_offset) == 16,
3523 OffsetOf_GetShaderiv_params_shm_offset_not_16);
3525 struct GetShaderInfoLog {
3526 typedef GetShaderInfoLog ValueType;
3527 static const CommandId kCmdId = kGetShaderInfoLog;
3528 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3529 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3531 static uint32 ComputeSize() {
3532 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3535 void SetHeader() { header.SetCmd<ValueType>(); }
3537 void Init(GLuint _shader, uint32 _bucket_id) {
3538 SetHeader();
3539 shader = _shader;
3540 bucket_id = _bucket_id;
3543 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
3544 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3545 return NextCmdAddress<ValueType>(cmd);
3548 gpu::CommandHeader header;
3549 uint32 shader;
3550 uint32 bucket_id;
3553 COMPILE_ASSERT(sizeof(GetShaderInfoLog) == 12,
3554 Sizeof_GetShaderInfoLog_is_not_12);
3555 COMPILE_ASSERT(offsetof(GetShaderInfoLog, header) == 0,
3556 OffsetOf_GetShaderInfoLog_header_not_0);
3557 COMPILE_ASSERT(offsetof(GetShaderInfoLog, shader) == 4,
3558 OffsetOf_GetShaderInfoLog_shader_not_4);
3559 COMPILE_ASSERT(offsetof(GetShaderInfoLog, bucket_id) == 8,
3560 OffsetOf_GetShaderInfoLog_bucket_id_not_8);
3562 struct GetShaderPrecisionFormat {
3563 typedef GetShaderPrecisionFormat ValueType;
3564 static const CommandId kCmdId = kGetShaderPrecisionFormat;
3565 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3568 struct Result {
3569 int32 success;
3570 int32 min_range;
3571 int32 max_range;
3572 int32 precision;
3575 static uint32 ComputeSize() {
3576 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3579 void SetHeader() { header.SetCmd<ValueType>(); }
3581 void Init(GLenum _shadertype,
3582 GLenum _precisiontype,
3583 uint32 _result_shm_id,
3584 uint32 _result_shm_offset) {
3585 SetHeader();
3586 shadertype = _shadertype;
3587 precisiontype = _precisiontype;
3588 result_shm_id = _result_shm_id;
3589 result_shm_offset = _result_shm_offset;
3592 void* Set(void* cmd,
3593 GLenum _shadertype,
3594 GLenum _precisiontype,
3595 uint32 _result_shm_id,
3596 uint32 _result_shm_offset) {
3597 static_cast<ValueType*>(cmd)
3598 ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
3599 return NextCmdAddress<ValueType>(cmd);
3602 gpu::CommandHeader header;
3603 uint32 shadertype;
3604 uint32 precisiontype;
3605 uint32 result_shm_id;
3606 uint32 result_shm_offset;
3609 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat) == 20,
3610 Sizeof_GetShaderPrecisionFormat_is_not_20);
3611 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, header) == 0,
3612 OffsetOf_GetShaderPrecisionFormat_header_not_0);
3613 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
3614 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4);
3615 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
3616 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8);
3617 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
3618 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12);
3619 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
3620 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16);
3621 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
3622 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0);
3623 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
3624 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4);
3625 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
3626 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8);
3627 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
3628 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12);
3630 struct GetShaderSource {
3631 typedef GetShaderSource ValueType;
3632 static const CommandId kCmdId = kGetShaderSource;
3633 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3634 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3636 static uint32 ComputeSize() {
3637 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3640 void SetHeader() { header.SetCmd<ValueType>(); }
3642 void Init(GLuint _shader, uint32 _bucket_id) {
3643 SetHeader();
3644 shader = _shader;
3645 bucket_id = _bucket_id;
3648 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
3649 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3650 return NextCmdAddress<ValueType>(cmd);
3653 gpu::CommandHeader header;
3654 uint32 shader;
3655 uint32 bucket_id;
3658 COMPILE_ASSERT(sizeof(GetShaderSource) == 12, Sizeof_GetShaderSource_is_not_12);
3659 COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0,
3660 OffsetOf_GetShaderSource_header_not_0);
3661 COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4,
3662 OffsetOf_GetShaderSource_shader_not_4);
3663 COMPILE_ASSERT(offsetof(GetShaderSource, bucket_id) == 8,
3664 OffsetOf_GetShaderSource_bucket_id_not_8);
3666 struct GetString {
3667 typedef GetString ValueType;
3668 static const CommandId kCmdId = kGetString;
3669 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3670 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3672 static uint32 ComputeSize() {
3673 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3676 void SetHeader() { header.SetCmd<ValueType>(); }
3678 void Init(GLenum _name, uint32 _bucket_id) {
3679 SetHeader();
3680 name = _name;
3681 bucket_id = _bucket_id;
3684 void* Set(void* cmd, GLenum _name, uint32 _bucket_id) {
3685 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
3686 return NextCmdAddress<ValueType>(cmd);
3689 gpu::CommandHeader header;
3690 uint32 name;
3691 uint32 bucket_id;
3694 COMPILE_ASSERT(sizeof(GetString) == 12, Sizeof_GetString_is_not_12);
3695 COMPILE_ASSERT(offsetof(GetString, header) == 0,
3696 OffsetOf_GetString_header_not_0);
3697 COMPILE_ASSERT(offsetof(GetString, name) == 4, OffsetOf_GetString_name_not_4);
3698 COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8,
3699 OffsetOf_GetString_bucket_id_not_8);
3701 struct GetTexParameterfv {
3702 typedef GetTexParameterfv ValueType;
3703 static const CommandId kCmdId = kGetTexParameterfv;
3704 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3705 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3707 typedef SizedResult<GLfloat> Result;
3709 static uint32 ComputeSize() {
3710 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3713 void SetHeader() { header.SetCmd<ValueType>(); }
3715 void Init(GLenum _target,
3716 GLenum _pname,
3717 uint32 _params_shm_id,
3718 uint32 _params_shm_offset) {
3719 SetHeader();
3720 target = _target;
3721 pname = _pname;
3722 params_shm_id = _params_shm_id;
3723 params_shm_offset = _params_shm_offset;
3726 void* Set(void* cmd,
3727 GLenum _target,
3728 GLenum _pname,
3729 uint32 _params_shm_id,
3730 uint32 _params_shm_offset) {
3731 static_cast<ValueType*>(cmd)
3732 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3733 return NextCmdAddress<ValueType>(cmd);
3736 gpu::CommandHeader header;
3737 uint32 target;
3738 uint32 pname;
3739 uint32 params_shm_id;
3740 uint32 params_shm_offset;
3743 COMPILE_ASSERT(sizeof(GetTexParameterfv) == 20,
3744 Sizeof_GetTexParameterfv_is_not_20);
3745 COMPILE_ASSERT(offsetof(GetTexParameterfv, header) == 0,
3746 OffsetOf_GetTexParameterfv_header_not_0);
3747 COMPILE_ASSERT(offsetof(GetTexParameterfv, target) == 4,
3748 OffsetOf_GetTexParameterfv_target_not_4);
3749 COMPILE_ASSERT(offsetof(GetTexParameterfv, pname) == 8,
3750 OffsetOf_GetTexParameterfv_pname_not_8);
3751 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_id) == 12,
3752 OffsetOf_GetTexParameterfv_params_shm_id_not_12);
3753 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_offset) == 16,
3754 OffsetOf_GetTexParameterfv_params_shm_offset_not_16);
3756 struct GetTexParameteriv {
3757 typedef GetTexParameteriv ValueType;
3758 static const CommandId kCmdId = kGetTexParameteriv;
3759 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3760 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3762 typedef SizedResult<GLint> Result;
3764 static uint32 ComputeSize() {
3765 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3768 void SetHeader() { header.SetCmd<ValueType>(); }
3770 void Init(GLenum _target,
3771 GLenum _pname,
3772 uint32 _params_shm_id,
3773 uint32 _params_shm_offset) {
3774 SetHeader();
3775 target = _target;
3776 pname = _pname;
3777 params_shm_id = _params_shm_id;
3778 params_shm_offset = _params_shm_offset;
3781 void* Set(void* cmd,
3782 GLenum _target,
3783 GLenum _pname,
3784 uint32 _params_shm_id,
3785 uint32 _params_shm_offset) {
3786 static_cast<ValueType*>(cmd)
3787 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3788 return NextCmdAddress<ValueType>(cmd);
3791 gpu::CommandHeader header;
3792 uint32 target;
3793 uint32 pname;
3794 uint32 params_shm_id;
3795 uint32 params_shm_offset;
3798 COMPILE_ASSERT(sizeof(GetTexParameteriv) == 20,
3799 Sizeof_GetTexParameteriv_is_not_20);
3800 COMPILE_ASSERT(offsetof(GetTexParameteriv, header) == 0,
3801 OffsetOf_GetTexParameteriv_header_not_0);
3802 COMPILE_ASSERT(offsetof(GetTexParameteriv, target) == 4,
3803 OffsetOf_GetTexParameteriv_target_not_4);
3804 COMPILE_ASSERT(offsetof(GetTexParameteriv, pname) == 8,
3805 OffsetOf_GetTexParameteriv_pname_not_8);
3806 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_id) == 12,
3807 OffsetOf_GetTexParameteriv_params_shm_id_not_12);
3808 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_offset) == 16,
3809 OffsetOf_GetTexParameteriv_params_shm_offset_not_16);
3811 struct GetUniformfv {
3812 typedef GetUniformfv ValueType;
3813 static const CommandId kCmdId = kGetUniformfv;
3814 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3815 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3817 typedef SizedResult<GLfloat> Result;
3819 static uint32 ComputeSize() {
3820 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3823 void SetHeader() { header.SetCmd<ValueType>(); }
3825 void Init(GLuint _program,
3826 GLint _location,
3827 uint32 _params_shm_id,
3828 uint32 _params_shm_offset) {
3829 SetHeader();
3830 program = _program;
3831 location = _location;
3832 params_shm_id = _params_shm_id;
3833 params_shm_offset = _params_shm_offset;
3836 void* Set(void* cmd,
3837 GLuint _program,
3838 GLint _location,
3839 uint32 _params_shm_id,
3840 uint32 _params_shm_offset) {
3841 static_cast<ValueType*>(cmd)
3842 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
3843 return NextCmdAddress<ValueType>(cmd);
3846 gpu::CommandHeader header;
3847 uint32 program;
3848 int32 location;
3849 uint32 params_shm_id;
3850 uint32 params_shm_offset;
3853 COMPILE_ASSERT(sizeof(GetUniformfv) == 20, Sizeof_GetUniformfv_is_not_20);
3854 COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0,
3855 OffsetOf_GetUniformfv_header_not_0);
3856 COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4,
3857 OffsetOf_GetUniformfv_program_not_4);
3858 COMPILE_ASSERT(offsetof(GetUniformfv, location) == 8,
3859 OffsetOf_GetUniformfv_location_not_8);
3860 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_id) == 12,
3861 OffsetOf_GetUniformfv_params_shm_id_not_12);
3862 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_offset) == 16,
3863 OffsetOf_GetUniformfv_params_shm_offset_not_16);
3865 struct GetUniformiv {
3866 typedef GetUniformiv ValueType;
3867 static const CommandId kCmdId = kGetUniformiv;
3868 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3869 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3871 typedef SizedResult<GLint> Result;
3873 static uint32 ComputeSize() {
3874 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3877 void SetHeader() { header.SetCmd<ValueType>(); }
3879 void Init(GLuint _program,
3880 GLint _location,
3881 uint32 _params_shm_id,
3882 uint32 _params_shm_offset) {
3883 SetHeader();
3884 program = _program;
3885 location = _location;
3886 params_shm_id = _params_shm_id;
3887 params_shm_offset = _params_shm_offset;
3890 void* Set(void* cmd,
3891 GLuint _program,
3892 GLint _location,
3893 uint32 _params_shm_id,
3894 uint32 _params_shm_offset) {
3895 static_cast<ValueType*>(cmd)
3896 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
3897 return NextCmdAddress<ValueType>(cmd);
3900 gpu::CommandHeader header;
3901 uint32 program;
3902 int32 location;
3903 uint32 params_shm_id;
3904 uint32 params_shm_offset;
3907 COMPILE_ASSERT(sizeof(GetUniformiv) == 20, Sizeof_GetUniformiv_is_not_20);
3908 COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0,
3909 OffsetOf_GetUniformiv_header_not_0);
3910 COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4,
3911 OffsetOf_GetUniformiv_program_not_4);
3912 COMPILE_ASSERT(offsetof(GetUniformiv, location) == 8,
3913 OffsetOf_GetUniformiv_location_not_8);
3914 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_id) == 12,
3915 OffsetOf_GetUniformiv_params_shm_id_not_12);
3916 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_offset) == 16,
3917 OffsetOf_GetUniformiv_params_shm_offset_not_16);
3919 struct GetVertexAttribfv {
3920 typedef GetVertexAttribfv ValueType;
3921 static const CommandId kCmdId = kGetVertexAttribfv;
3922 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3923 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3925 typedef SizedResult<GLfloat> Result;
3927 static uint32 ComputeSize() {
3928 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3931 void SetHeader() { header.SetCmd<ValueType>(); }
3933 void Init(GLuint _index,
3934 GLenum _pname,
3935 uint32 _params_shm_id,
3936 uint32 _params_shm_offset) {
3937 SetHeader();
3938 index = _index;
3939 pname = _pname;
3940 params_shm_id = _params_shm_id;
3941 params_shm_offset = _params_shm_offset;
3944 void* Set(void* cmd,
3945 GLuint _index,
3946 GLenum _pname,
3947 uint32 _params_shm_id,
3948 uint32 _params_shm_offset) {
3949 static_cast<ValueType*>(cmd)
3950 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
3951 return NextCmdAddress<ValueType>(cmd);
3954 gpu::CommandHeader header;
3955 uint32 index;
3956 uint32 pname;
3957 uint32 params_shm_id;
3958 uint32 params_shm_offset;
3961 COMPILE_ASSERT(sizeof(GetVertexAttribfv) == 20,
3962 Sizeof_GetVertexAttribfv_is_not_20);
3963 COMPILE_ASSERT(offsetof(GetVertexAttribfv, header) == 0,
3964 OffsetOf_GetVertexAttribfv_header_not_0);
3965 COMPILE_ASSERT(offsetof(GetVertexAttribfv, index) == 4,
3966 OffsetOf_GetVertexAttribfv_index_not_4);
3967 COMPILE_ASSERT(offsetof(GetVertexAttribfv, pname) == 8,
3968 OffsetOf_GetVertexAttribfv_pname_not_8);
3969 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_id) == 12,
3970 OffsetOf_GetVertexAttribfv_params_shm_id_not_12);
3971 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
3972 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16);
3974 struct GetVertexAttribiv {
3975 typedef GetVertexAttribiv ValueType;
3976 static const CommandId kCmdId = kGetVertexAttribiv;
3977 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3978 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3980 typedef SizedResult<GLint> Result;
3982 static uint32 ComputeSize() {
3983 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
3986 void SetHeader() { header.SetCmd<ValueType>(); }
3988 void Init(GLuint _index,
3989 GLenum _pname,
3990 uint32 _params_shm_id,
3991 uint32 _params_shm_offset) {
3992 SetHeader();
3993 index = _index;
3994 pname = _pname;
3995 params_shm_id = _params_shm_id;
3996 params_shm_offset = _params_shm_offset;
3999 void* Set(void* cmd,
4000 GLuint _index,
4001 GLenum _pname,
4002 uint32 _params_shm_id,
4003 uint32 _params_shm_offset) {
4004 static_cast<ValueType*>(cmd)
4005 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
4006 return NextCmdAddress<ValueType>(cmd);
4009 gpu::CommandHeader header;
4010 uint32 index;
4011 uint32 pname;
4012 uint32 params_shm_id;
4013 uint32 params_shm_offset;
4016 COMPILE_ASSERT(sizeof(GetVertexAttribiv) == 20,
4017 Sizeof_GetVertexAttribiv_is_not_20);
4018 COMPILE_ASSERT(offsetof(GetVertexAttribiv, header) == 0,
4019 OffsetOf_GetVertexAttribiv_header_not_0);
4020 COMPILE_ASSERT(offsetof(GetVertexAttribiv, index) == 4,
4021 OffsetOf_GetVertexAttribiv_index_not_4);
4022 COMPILE_ASSERT(offsetof(GetVertexAttribiv, pname) == 8,
4023 OffsetOf_GetVertexAttribiv_pname_not_8);
4024 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_id) == 12,
4025 OffsetOf_GetVertexAttribiv_params_shm_id_not_12);
4026 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
4027 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16);
4029 struct GetVertexAttribPointerv {
4030 typedef GetVertexAttribPointerv ValueType;
4031 static const CommandId kCmdId = kGetVertexAttribPointerv;
4032 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4035 typedef SizedResult<GLuint> Result;
4037 static uint32 ComputeSize() {
4038 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4041 void SetHeader() { header.SetCmd<ValueType>(); }
4043 void Init(GLuint _index,
4044 GLenum _pname,
4045 uint32 _pointer_shm_id,
4046 uint32 _pointer_shm_offset) {
4047 SetHeader();
4048 index = _index;
4049 pname = _pname;
4050 pointer_shm_id = _pointer_shm_id;
4051 pointer_shm_offset = _pointer_shm_offset;
4054 void* Set(void* cmd,
4055 GLuint _index,
4056 GLenum _pname,
4057 uint32 _pointer_shm_id,
4058 uint32 _pointer_shm_offset) {
4059 static_cast<ValueType*>(cmd)
4060 ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
4061 return NextCmdAddress<ValueType>(cmd);
4064 gpu::CommandHeader header;
4065 uint32 index;
4066 uint32 pname;
4067 uint32 pointer_shm_id;
4068 uint32 pointer_shm_offset;
4071 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv) == 20,
4072 Sizeof_GetVertexAttribPointerv_is_not_20);
4073 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, header) == 0,
4074 OffsetOf_GetVertexAttribPointerv_header_not_0);
4075 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, index) == 4,
4076 OffsetOf_GetVertexAttribPointerv_index_not_4);
4077 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pname) == 8,
4078 OffsetOf_GetVertexAttribPointerv_pname_not_8);
4079 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
4080 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12);
4081 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
4082 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16);
4084 struct Hint {
4085 typedef Hint ValueType;
4086 static const CommandId kCmdId = kHint;
4087 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4088 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4090 static uint32 ComputeSize() {
4091 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4094 void SetHeader() { header.SetCmd<ValueType>(); }
4096 void Init(GLenum _target, GLenum _mode) {
4097 SetHeader();
4098 target = _target;
4099 mode = _mode;
4102 void* Set(void* cmd, GLenum _target, GLenum _mode) {
4103 static_cast<ValueType*>(cmd)->Init(_target, _mode);
4104 return NextCmdAddress<ValueType>(cmd);
4107 gpu::CommandHeader header;
4108 uint32 target;
4109 uint32 mode;
4112 COMPILE_ASSERT(sizeof(Hint) == 12, Sizeof_Hint_is_not_12);
4113 COMPILE_ASSERT(offsetof(Hint, header) == 0, OffsetOf_Hint_header_not_0);
4114 COMPILE_ASSERT(offsetof(Hint, target) == 4, OffsetOf_Hint_target_not_4);
4115 COMPILE_ASSERT(offsetof(Hint, mode) == 8, OffsetOf_Hint_mode_not_8);
4117 struct IsBuffer {
4118 typedef IsBuffer ValueType;
4119 static const CommandId kCmdId = kIsBuffer;
4120 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4121 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4123 typedef uint32 Result;
4125 static uint32 ComputeSize() {
4126 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4129 void SetHeader() { header.SetCmd<ValueType>(); }
4131 void Init(GLuint _buffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
4132 SetHeader();
4133 buffer = _buffer;
4134 result_shm_id = _result_shm_id;
4135 result_shm_offset = _result_shm_offset;
4138 void* Set(void* cmd,
4139 GLuint _buffer,
4140 uint32 _result_shm_id,
4141 uint32 _result_shm_offset) {
4142 static_cast<ValueType*>(cmd)
4143 ->Init(_buffer, _result_shm_id, _result_shm_offset);
4144 return NextCmdAddress<ValueType>(cmd);
4147 gpu::CommandHeader header;
4148 uint32 buffer;
4149 uint32 result_shm_id;
4150 uint32 result_shm_offset;
4153 COMPILE_ASSERT(sizeof(IsBuffer) == 16, Sizeof_IsBuffer_is_not_16);
4154 COMPILE_ASSERT(offsetof(IsBuffer, header) == 0, OffsetOf_IsBuffer_header_not_0);
4155 COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4, OffsetOf_IsBuffer_buffer_not_4);
4156 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8,
4157 OffsetOf_IsBuffer_result_shm_id_not_8);
4158 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12,
4159 OffsetOf_IsBuffer_result_shm_offset_not_12);
4161 struct IsEnabled {
4162 typedef IsEnabled ValueType;
4163 static const CommandId kCmdId = kIsEnabled;
4164 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4165 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4167 typedef uint32 Result;
4169 static uint32 ComputeSize() {
4170 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4173 void SetHeader() { header.SetCmd<ValueType>(); }
4175 void Init(GLenum _cap, uint32 _result_shm_id, uint32 _result_shm_offset) {
4176 SetHeader();
4177 cap = _cap;
4178 result_shm_id = _result_shm_id;
4179 result_shm_offset = _result_shm_offset;
4182 void* Set(void* cmd,
4183 GLenum _cap,
4184 uint32 _result_shm_id,
4185 uint32 _result_shm_offset) {
4186 static_cast<ValueType*>(cmd)
4187 ->Init(_cap, _result_shm_id, _result_shm_offset);
4188 return NextCmdAddress<ValueType>(cmd);
4191 gpu::CommandHeader header;
4192 uint32 cap;
4193 uint32 result_shm_id;
4194 uint32 result_shm_offset;
4197 COMPILE_ASSERT(sizeof(IsEnabled) == 16, Sizeof_IsEnabled_is_not_16);
4198 COMPILE_ASSERT(offsetof(IsEnabled, header) == 0,
4199 OffsetOf_IsEnabled_header_not_0);
4200 COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4, OffsetOf_IsEnabled_cap_not_4);
4201 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8,
4202 OffsetOf_IsEnabled_result_shm_id_not_8);
4203 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12,
4204 OffsetOf_IsEnabled_result_shm_offset_not_12);
4206 struct IsFramebuffer {
4207 typedef IsFramebuffer ValueType;
4208 static const CommandId kCmdId = kIsFramebuffer;
4209 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4210 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4212 typedef uint32 Result;
4214 static uint32 ComputeSize() {
4215 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4218 void SetHeader() { header.SetCmd<ValueType>(); }
4220 void Init(GLuint _framebuffer,
4221 uint32 _result_shm_id,
4222 uint32 _result_shm_offset) {
4223 SetHeader();
4224 framebuffer = _framebuffer;
4225 result_shm_id = _result_shm_id;
4226 result_shm_offset = _result_shm_offset;
4229 void* Set(void* cmd,
4230 GLuint _framebuffer,
4231 uint32 _result_shm_id,
4232 uint32 _result_shm_offset) {
4233 static_cast<ValueType*>(cmd)
4234 ->Init(_framebuffer, _result_shm_id, _result_shm_offset);
4235 return NextCmdAddress<ValueType>(cmd);
4238 gpu::CommandHeader header;
4239 uint32 framebuffer;
4240 uint32 result_shm_id;
4241 uint32 result_shm_offset;
4244 COMPILE_ASSERT(sizeof(IsFramebuffer) == 16, Sizeof_IsFramebuffer_is_not_16);
4245 COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0,
4246 OffsetOf_IsFramebuffer_header_not_0);
4247 COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4,
4248 OffsetOf_IsFramebuffer_framebuffer_not_4);
4249 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_id) == 8,
4250 OffsetOf_IsFramebuffer_result_shm_id_not_8);
4251 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_offset) == 12,
4252 OffsetOf_IsFramebuffer_result_shm_offset_not_12);
4254 struct IsProgram {
4255 typedef IsProgram ValueType;
4256 static const CommandId kCmdId = kIsProgram;
4257 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4258 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4260 typedef uint32 Result;
4262 static uint32 ComputeSize() {
4263 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4266 void SetHeader() { header.SetCmd<ValueType>(); }
4268 void Init(GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset) {
4269 SetHeader();
4270 program = _program;
4271 result_shm_id = _result_shm_id;
4272 result_shm_offset = _result_shm_offset;
4275 void* Set(void* cmd,
4276 GLuint _program,
4277 uint32 _result_shm_id,
4278 uint32 _result_shm_offset) {
4279 static_cast<ValueType*>(cmd)
4280 ->Init(_program, _result_shm_id, _result_shm_offset);
4281 return NextCmdAddress<ValueType>(cmd);
4284 gpu::CommandHeader header;
4285 uint32 program;
4286 uint32 result_shm_id;
4287 uint32 result_shm_offset;
4290 COMPILE_ASSERT(sizeof(IsProgram) == 16, Sizeof_IsProgram_is_not_16);
4291 COMPILE_ASSERT(offsetof(IsProgram, header) == 0,
4292 OffsetOf_IsProgram_header_not_0);
4293 COMPILE_ASSERT(offsetof(IsProgram, program) == 4,
4294 OffsetOf_IsProgram_program_not_4);
4295 COMPILE_ASSERT(offsetof(IsProgram, result_shm_id) == 8,
4296 OffsetOf_IsProgram_result_shm_id_not_8);
4297 COMPILE_ASSERT(offsetof(IsProgram, result_shm_offset) == 12,
4298 OffsetOf_IsProgram_result_shm_offset_not_12);
4300 struct IsRenderbuffer {
4301 typedef IsRenderbuffer ValueType;
4302 static const CommandId kCmdId = kIsRenderbuffer;
4303 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4304 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4306 typedef uint32 Result;
4308 static uint32 ComputeSize() {
4309 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4312 void SetHeader() { header.SetCmd<ValueType>(); }
4314 void Init(GLuint _renderbuffer,
4315 uint32 _result_shm_id,
4316 uint32 _result_shm_offset) {
4317 SetHeader();
4318 renderbuffer = _renderbuffer;
4319 result_shm_id = _result_shm_id;
4320 result_shm_offset = _result_shm_offset;
4323 void* Set(void* cmd,
4324 GLuint _renderbuffer,
4325 uint32 _result_shm_id,
4326 uint32 _result_shm_offset) {
4327 static_cast<ValueType*>(cmd)
4328 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
4329 return NextCmdAddress<ValueType>(cmd);
4332 gpu::CommandHeader header;
4333 uint32 renderbuffer;
4334 uint32 result_shm_id;
4335 uint32 result_shm_offset;
4338 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16);
4339 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0,
4340 OffsetOf_IsRenderbuffer_header_not_0);
4341 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4,
4342 OffsetOf_IsRenderbuffer_renderbuffer_not_4);
4343 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8,
4344 OffsetOf_IsRenderbuffer_result_shm_id_not_8);
4345 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12,
4346 OffsetOf_IsRenderbuffer_result_shm_offset_not_12);
4348 struct IsShader {
4349 typedef IsShader ValueType;
4350 static const CommandId kCmdId = kIsShader;
4351 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4352 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4354 typedef uint32 Result;
4356 static uint32 ComputeSize() {
4357 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4360 void SetHeader() { header.SetCmd<ValueType>(); }
4362 void Init(GLuint _shader, uint32 _result_shm_id, uint32 _result_shm_offset) {
4363 SetHeader();
4364 shader = _shader;
4365 result_shm_id = _result_shm_id;
4366 result_shm_offset = _result_shm_offset;
4369 void* Set(void* cmd,
4370 GLuint _shader,
4371 uint32 _result_shm_id,
4372 uint32 _result_shm_offset) {
4373 static_cast<ValueType*>(cmd)
4374 ->Init(_shader, _result_shm_id, _result_shm_offset);
4375 return NextCmdAddress<ValueType>(cmd);
4378 gpu::CommandHeader header;
4379 uint32 shader;
4380 uint32 result_shm_id;
4381 uint32 result_shm_offset;
4384 COMPILE_ASSERT(sizeof(IsShader) == 16, Sizeof_IsShader_is_not_16);
4385 COMPILE_ASSERT(offsetof(IsShader, header) == 0, OffsetOf_IsShader_header_not_0);
4386 COMPILE_ASSERT(offsetof(IsShader, shader) == 4, OffsetOf_IsShader_shader_not_4);
4387 COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8,
4388 OffsetOf_IsShader_result_shm_id_not_8);
4389 COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12,
4390 OffsetOf_IsShader_result_shm_offset_not_12);
4392 struct IsTexture {
4393 typedef IsTexture ValueType;
4394 static const CommandId kCmdId = kIsTexture;
4395 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4396 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4398 typedef uint32 Result;
4400 static uint32 ComputeSize() {
4401 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4404 void SetHeader() { header.SetCmd<ValueType>(); }
4406 void Init(GLuint _texture, uint32 _result_shm_id, uint32 _result_shm_offset) {
4407 SetHeader();
4408 texture = _texture;
4409 result_shm_id = _result_shm_id;
4410 result_shm_offset = _result_shm_offset;
4413 void* Set(void* cmd,
4414 GLuint _texture,
4415 uint32 _result_shm_id,
4416 uint32 _result_shm_offset) {
4417 static_cast<ValueType*>(cmd)
4418 ->Init(_texture, _result_shm_id, _result_shm_offset);
4419 return NextCmdAddress<ValueType>(cmd);
4422 gpu::CommandHeader header;
4423 uint32 texture;
4424 uint32 result_shm_id;
4425 uint32 result_shm_offset;
4428 COMPILE_ASSERT(sizeof(IsTexture) == 16, Sizeof_IsTexture_is_not_16);
4429 COMPILE_ASSERT(offsetof(IsTexture, header) == 0,
4430 OffsetOf_IsTexture_header_not_0);
4431 COMPILE_ASSERT(offsetof(IsTexture, texture) == 4,
4432 OffsetOf_IsTexture_texture_not_4);
4433 COMPILE_ASSERT(offsetof(IsTexture, result_shm_id) == 8,
4434 OffsetOf_IsTexture_result_shm_id_not_8);
4435 COMPILE_ASSERT(offsetof(IsTexture, result_shm_offset) == 12,
4436 OffsetOf_IsTexture_result_shm_offset_not_12);
4438 struct LineWidth {
4439 typedef LineWidth ValueType;
4440 static const CommandId kCmdId = kLineWidth;
4441 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4442 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4444 static uint32 ComputeSize() {
4445 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4448 void SetHeader() { header.SetCmd<ValueType>(); }
4450 void Init(GLfloat _width) {
4451 SetHeader();
4452 width = _width;
4455 void* Set(void* cmd, GLfloat _width) {
4456 static_cast<ValueType*>(cmd)->Init(_width);
4457 return NextCmdAddress<ValueType>(cmd);
4460 gpu::CommandHeader header;
4461 float width;
4464 COMPILE_ASSERT(sizeof(LineWidth) == 8, Sizeof_LineWidth_is_not_8);
4465 COMPILE_ASSERT(offsetof(LineWidth, header) == 0,
4466 OffsetOf_LineWidth_header_not_0);
4467 COMPILE_ASSERT(offsetof(LineWidth, width) == 4, OffsetOf_LineWidth_width_not_4);
4469 struct LinkProgram {
4470 typedef LinkProgram ValueType;
4471 static const CommandId kCmdId = kLinkProgram;
4472 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4473 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4475 static uint32 ComputeSize() {
4476 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4479 void SetHeader() { header.SetCmd<ValueType>(); }
4481 void Init(GLuint _program) {
4482 SetHeader();
4483 program = _program;
4486 void* Set(void* cmd, GLuint _program) {
4487 static_cast<ValueType*>(cmd)->Init(_program);
4488 return NextCmdAddress<ValueType>(cmd);
4491 gpu::CommandHeader header;
4492 uint32 program;
4495 COMPILE_ASSERT(sizeof(LinkProgram) == 8, Sizeof_LinkProgram_is_not_8);
4496 COMPILE_ASSERT(offsetof(LinkProgram, header) == 0,
4497 OffsetOf_LinkProgram_header_not_0);
4498 COMPILE_ASSERT(offsetof(LinkProgram, program) == 4,
4499 OffsetOf_LinkProgram_program_not_4);
4501 struct PixelStorei {
4502 typedef PixelStorei ValueType;
4503 static const CommandId kCmdId = kPixelStorei;
4504 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4505 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4507 static uint32 ComputeSize() {
4508 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4511 void SetHeader() { header.SetCmd<ValueType>(); }
4513 void Init(GLenum _pname, GLint _param) {
4514 SetHeader();
4515 pname = _pname;
4516 param = _param;
4519 void* Set(void* cmd, GLenum _pname, GLint _param) {
4520 static_cast<ValueType*>(cmd)->Init(_pname, _param);
4521 return NextCmdAddress<ValueType>(cmd);
4524 gpu::CommandHeader header;
4525 uint32 pname;
4526 int32 param;
4529 COMPILE_ASSERT(sizeof(PixelStorei) == 12, Sizeof_PixelStorei_is_not_12);
4530 COMPILE_ASSERT(offsetof(PixelStorei, header) == 0,
4531 OffsetOf_PixelStorei_header_not_0);
4532 COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4,
4533 OffsetOf_PixelStorei_pname_not_4);
4534 COMPILE_ASSERT(offsetof(PixelStorei, param) == 8,
4535 OffsetOf_PixelStorei_param_not_8);
4537 struct PolygonOffset {
4538 typedef PolygonOffset ValueType;
4539 static const CommandId kCmdId = kPolygonOffset;
4540 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4541 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4543 static uint32 ComputeSize() {
4544 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4547 void SetHeader() { header.SetCmd<ValueType>(); }
4549 void Init(GLfloat _factor, GLfloat _units) {
4550 SetHeader();
4551 factor = _factor;
4552 units = _units;
4555 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
4556 static_cast<ValueType*>(cmd)->Init(_factor, _units);
4557 return NextCmdAddress<ValueType>(cmd);
4560 gpu::CommandHeader header;
4561 float factor;
4562 float units;
4565 COMPILE_ASSERT(sizeof(PolygonOffset) == 12, Sizeof_PolygonOffset_is_not_12);
4566 COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0,
4567 OffsetOf_PolygonOffset_header_not_0);
4568 COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4,
4569 OffsetOf_PolygonOffset_factor_not_4);
4570 COMPILE_ASSERT(offsetof(PolygonOffset, units) == 8,
4571 OffsetOf_PolygonOffset_units_not_8);
4573 // ReadPixels has the result separated from the pixel buffer so that
4574 // it is easier to specify the result going to some specific place
4575 // that exactly fits the rectangle of pixels.
4576 struct ReadPixels {
4577 typedef ReadPixels ValueType;
4578 static const CommandId kCmdId = kReadPixels;
4579 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4580 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4582 typedef uint32 Result;
4584 static uint32 ComputeSize() {
4585 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4588 void SetHeader() { header.SetCmd<ValueType>(); }
4590 void Init(GLint _x,
4591 GLint _y,
4592 GLsizei _width,
4593 GLsizei _height,
4594 GLenum _format,
4595 GLenum _type,
4596 uint32 _pixels_shm_id,
4597 uint32 _pixels_shm_offset,
4598 uint32 _result_shm_id,
4599 uint32 _result_shm_offset,
4600 GLboolean _async) {
4601 SetHeader();
4602 x = _x;
4603 y = _y;
4604 width = _width;
4605 height = _height;
4606 format = _format;
4607 type = _type;
4608 pixels_shm_id = _pixels_shm_id;
4609 pixels_shm_offset = _pixels_shm_offset;
4610 result_shm_id = _result_shm_id;
4611 result_shm_offset = _result_shm_offset;
4612 async = _async;
4615 void* Set(void* cmd,
4616 GLint _x,
4617 GLint _y,
4618 GLsizei _width,
4619 GLsizei _height,
4620 GLenum _format,
4621 GLenum _type,
4622 uint32 _pixels_shm_id,
4623 uint32 _pixels_shm_offset,
4624 uint32 _result_shm_id,
4625 uint32 _result_shm_offset,
4626 GLboolean _async) {
4627 static_cast<ValueType*>(cmd)->Init(_x,
4629 _width,
4630 _height,
4631 _format,
4632 _type,
4633 _pixels_shm_id,
4634 _pixels_shm_offset,
4635 _result_shm_id,
4636 _result_shm_offset,
4637 _async);
4638 return NextCmdAddress<ValueType>(cmd);
4641 gpu::CommandHeader header;
4642 int32 x;
4643 int32 y;
4644 int32 width;
4645 int32 height;
4646 uint32 format;
4647 uint32 type;
4648 uint32 pixels_shm_id;
4649 uint32 pixels_shm_offset;
4650 uint32 result_shm_id;
4651 uint32 result_shm_offset;
4652 uint32 async;
4655 COMPILE_ASSERT(sizeof(ReadPixels) == 48, Sizeof_ReadPixels_is_not_48);
4656 COMPILE_ASSERT(offsetof(ReadPixels, header) == 0,
4657 OffsetOf_ReadPixels_header_not_0);
4658 COMPILE_ASSERT(offsetof(ReadPixels, x) == 4, OffsetOf_ReadPixels_x_not_4);
4659 COMPILE_ASSERT(offsetof(ReadPixels, y) == 8, OffsetOf_ReadPixels_y_not_8);
4660 COMPILE_ASSERT(offsetof(ReadPixels, width) == 12,
4661 OffsetOf_ReadPixels_width_not_12);
4662 COMPILE_ASSERT(offsetof(ReadPixels, height) == 16,
4663 OffsetOf_ReadPixels_height_not_16);
4664 COMPILE_ASSERT(offsetof(ReadPixels, format) == 20,
4665 OffsetOf_ReadPixels_format_not_20);
4666 COMPILE_ASSERT(offsetof(ReadPixels, type) == 24,
4667 OffsetOf_ReadPixels_type_not_24);
4668 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_id) == 28,
4669 OffsetOf_ReadPixels_pixels_shm_id_not_28);
4670 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_offset) == 32,
4671 OffsetOf_ReadPixels_pixels_shm_offset_not_32);
4672 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_id) == 36,
4673 OffsetOf_ReadPixels_result_shm_id_not_36);
4674 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_offset) == 40,
4675 OffsetOf_ReadPixels_result_shm_offset_not_40);
4676 COMPILE_ASSERT(offsetof(ReadPixels, async) == 44,
4677 OffsetOf_ReadPixels_async_not_44);
4679 struct ReleaseShaderCompiler {
4680 typedef ReleaseShaderCompiler ValueType;
4681 static const CommandId kCmdId = kReleaseShaderCompiler;
4682 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4683 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4685 static uint32 ComputeSize() {
4686 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4689 void SetHeader() { header.SetCmd<ValueType>(); }
4691 void Init() { SetHeader(); }
4693 void* Set(void* cmd) {
4694 static_cast<ValueType*>(cmd)->Init();
4695 return NextCmdAddress<ValueType>(cmd);
4698 gpu::CommandHeader header;
4701 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler) == 4,
4702 Sizeof_ReleaseShaderCompiler_is_not_4);
4703 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler, header) == 0,
4704 OffsetOf_ReleaseShaderCompiler_header_not_0);
4706 struct RenderbufferStorage {
4707 typedef RenderbufferStorage ValueType;
4708 static const CommandId kCmdId = kRenderbufferStorage;
4709 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4710 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4712 static uint32 ComputeSize() {
4713 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4716 void SetHeader() { header.SetCmd<ValueType>(); }
4718 void Init(GLenum _target,
4719 GLenum _internalformat,
4720 GLsizei _width,
4721 GLsizei _height) {
4722 SetHeader();
4723 target = _target;
4724 internalformat = _internalformat;
4725 width = _width;
4726 height = _height;
4729 void* Set(void* cmd,
4730 GLenum _target,
4731 GLenum _internalformat,
4732 GLsizei _width,
4733 GLsizei _height) {
4734 static_cast<ValueType*>(cmd)
4735 ->Init(_target, _internalformat, _width, _height);
4736 return NextCmdAddress<ValueType>(cmd);
4739 gpu::CommandHeader header;
4740 uint32 target;
4741 uint32 internalformat;
4742 int32 width;
4743 int32 height;
4746 COMPILE_ASSERT(sizeof(RenderbufferStorage) == 20,
4747 Sizeof_RenderbufferStorage_is_not_20);
4748 COMPILE_ASSERT(offsetof(RenderbufferStorage, header) == 0,
4749 OffsetOf_RenderbufferStorage_header_not_0);
4750 COMPILE_ASSERT(offsetof(RenderbufferStorage, target) == 4,
4751 OffsetOf_RenderbufferStorage_target_not_4);
4752 COMPILE_ASSERT(offsetof(RenderbufferStorage, internalformat) == 8,
4753 OffsetOf_RenderbufferStorage_internalformat_not_8);
4754 COMPILE_ASSERT(offsetof(RenderbufferStorage, width) == 12,
4755 OffsetOf_RenderbufferStorage_width_not_12);
4756 COMPILE_ASSERT(offsetof(RenderbufferStorage, height) == 16,
4757 OffsetOf_RenderbufferStorage_height_not_16);
4759 struct SampleCoverage {
4760 typedef SampleCoverage ValueType;
4761 static const CommandId kCmdId = kSampleCoverage;
4762 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4763 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4765 static uint32 ComputeSize() {
4766 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4769 void SetHeader() { header.SetCmd<ValueType>(); }
4771 void Init(GLclampf _value, GLboolean _invert) {
4772 SetHeader();
4773 value = _value;
4774 invert = _invert;
4777 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
4778 static_cast<ValueType*>(cmd)->Init(_value, _invert);
4779 return NextCmdAddress<ValueType>(cmd);
4782 gpu::CommandHeader header;
4783 float value;
4784 uint32 invert;
4787 COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12);
4788 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0,
4789 OffsetOf_SampleCoverage_header_not_0);
4790 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4,
4791 OffsetOf_SampleCoverage_value_not_4);
4792 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8,
4793 OffsetOf_SampleCoverage_invert_not_8);
4795 struct Scissor {
4796 typedef Scissor ValueType;
4797 static const CommandId kCmdId = kScissor;
4798 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4801 static uint32 ComputeSize() {
4802 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4805 void SetHeader() { header.SetCmd<ValueType>(); }
4807 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
4808 SetHeader();
4809 x = _x;
4810 y = _y;
4811 width = _width;
4812 height = _height;
4815 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
4816 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
4817 return NextCmdAddress<ValueType>(cmd);
4820 gpu::CommandHeader header;
4821 int32 x;
4822 int32 y;
4823 int32 width;
4824 int32 height;
4827 COMPILE_ASSERT(sizeof(Scissor) == 20, Sizeof_Scissor_is_not_20);
4828 COMPILE_ASSERT(offsetof(Scissor, header) == 0, OffsetOf_Scissor_header_not_0);
4829 COMPILE_ASSERT(offsetof(Scissor, x) == 4, OffsetOf_Scissor_x_not_4);
4830 COMPILE_ASSERT(offsetof(Scissor, y) == 8, OffsetOf_Scissor_y_not_8);
4831 COMPILE_ASSERT(offsetof(Scissor, width) == 12, OffsetOf_Scissor_width_not_12);
4832 COMPILE_ASSERT(offsetof(Scissor, height) == 16, OffsetOf_Scissor_height_not_16);
4834 struct ShaderBinary {
4835 typedef ShaderBinary ValueType;
4836 static const CommandId kCmdId = kShaderBinary;
4837 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4838 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4840 static uint32 ComputeSize() {
4841 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4844 void SetHeader() { header.SetCmd<ValueType>(); }
4846 void Init(GLsizei _n,
4847 uint32 _shaders_shm_id,
4848 uint32 _shaders_shm_offset,
4849 GLenum _binaryformat,
4850 uint32 _binary_shm_id,
4851 uint32 _binary_shm_offset,
4852 GLsizei _length) {
4853 SetHeader();
4854 n = _n;
4855 shaders_shm_id = _shaders_shm_id;
4856 shaders_shm_offset = _shaders_shm_offset;
4857 binaryformat = _binaryformat;
4858 binary_shm_id = _binary_shm_id;
4859 binary_shm_offset = _binary_shm_offset;
4860 length = _length;
4863 void* Set(void* cmd,
4864 GLsizei _n,
4865 uint32 _shaders_shm_id,
4866 uint32 _shaders_shm_offset,
4867 GLenum _binaryformat,
4868 uint32 _binary_shm_id,
4869 uint32 _binary_shm_offset,
4870 GLsizei _length) {
4871 static_cast<ValueType*>(cmd)->Init(_n,
4872 _shaders_shm_id,
4873 _shaders_shm_offset,
4874 _binaryformat,
4875 _binary_shm_id,
4876 _binary_shm_offset,
4877 _length);
4878 return NextCmdAddress<ValueType>(cmd);
4881 gpu::CommandHeader header;
4882 int32 n;
4883 uint32 shaders_shm_id;
4884 uint32 shaders_shm_offset;
4885 uint32 binaryformat;
4886 uint32 binary_shm_id;
4887 uint32 binary_shm_offset;
4888 int32 length;
4891 COMPILE_ASSERT(sizeof(ShaderBinary) == 32, Sizeof_ShaderBinary_is_not_32);
4892 COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0,
4893 OffsetOf_ShaderBinary_header_not_0);
4894 COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4, OffsetOf_ShaderBinary_n_not_4);
4895 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8,
4896 OffsetOf_ShaderBinary_shaders_shm_id_not_8);
4897 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12,
4898 OffsetOf_ShaderBinary_shaders_shm_offset_not_12);
4899 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16,
4900 OffsetOf_ShaderBinary_binaryformat_not_16);
4901 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20,
4902 OffsetOf_ShaderBinary_binary_shm_id_not_20);
4903 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24,
4904 OffsetOf_ShaderBinary_binary_shm_offset_not_24);
4905 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28,
4906 OffsetOf_ShaderBinary_length_not_28);
4908 struct ShaderSource {
4909 typedef ShaderSource ValueType;
4910 static const CommandId kCmdId = kShaderSource;
4911 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4912 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4914 static uint32 ComputeSize() {
4915 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4918 void SetHeader() { header.SetCmd<ValueType>(); }
4920 void Init(GLuint _shader,
4921 uint32 _data_shm_id,
4922 uint32 _data_shm_offset,
4923 uint32 _data_size) {
4924 SetHeader();
4925 shader = _shader;
4926 data_shm_id = _data_shm_id;
4927 data_shm_offset = _data_shm_offset;
4928 data_size = _data_size;
4931 void* Set(void* cmd,
4932 GLuint _shader,
4933 uint32 _data_shm_id,
4934 uint32 _data_shm_offset,
4935 uint32 _data_size) {
4936 static_cast<ValueType*>(cmd)
4937 ->Init(_shader, _data_shm_id, _data_shm_offset, _data_size);
4938 return NextCmdAddress<ValueType>(cmd);
4941 gpu::CommandHeader header;
4942 uint32 shader;
4943 uint32 data_shm_id;
4944 uint32 data_shm_offset;
4945 uint32 data_size;
4948 COMPILE_ASSERT(sizeof(ShaderSource) == 20, Sizeof_ShaderSource_is_not_20);
4949 COMPILE_ASSERT(offsetof(ShaderSource, header) == 0,
4950 OffsetOf_ShaderSource_header_not_0);
4951 COMPILE_ASSERT(offsetof(ShaderSource, shader) == 4,
4952 OffsetOf_ShaderSource_shader_not_4);
4953 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_id) == 8,
4954 OffsetOf_ShaderSource_data_shm_id_not_8);
4955 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_offset) == 12,
4956 OffsetOf_ShaderSource_data_shm_offset_not_12);
4957 COMPILE_ASSERT(offsetof(ShaderSource, data_size) == 16,
4958 OffsetOf_ShaderSource_data_size_not_16);
4960 struct ShaderSourceBucket {
4961 typedef ShaderSourceBucket ValueType;
4962 static const CommandId kCmdId = kShaderSourceBucket;
4963 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4964 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4966 static uint32 ComputeSize() {
4967 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
4970 void SetHeader() { header.SetCmd<ValueType>(); }
4972 void Init(GLuint _shader, uint32 _data_bucket_id) {
4973 SetHeader();
4974 shader = _shader;
4975 data_bucket_id = _data_bucket_id;
4978 void* Set(void* cmd, GLuint _shader, uint32 _data_bucket_id) {
4979 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id);
4980 return NextCmdAddress<ValueType>(cmd);
4983 gpu::CommandHeader header;
4984 uint32 shader;
4985 uint32 data_bucket_id;
4988 COMPILE_ASSERT(sizeof(ShaderSourceBucket) == 12,
4989 Sizeof_ShaderSourceBucket_is_not_12);
4990 COMPILE_ASSERT(offsetof(ShaderSourceBucket, header) == 0,
4991 OffsetOf_ShaderSourceBucket_header_not_0);
4992 COMPILE_ASSERT(offsetof(ShaderSourceBucket, shader) == 4,
4993 OffsetOf_ShaderSourceBucket_shader_not_4);
4994 COMPILE_ASSERT(offsetof(ShaderSourceBucket, data_bucket_id) == 8,
4995 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8);
4997 struct StencilFunc {
4998 typedef StencilFunc ValueType;
4999 static const CommandId kCmdId = kStencilFunc;
5000 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5001 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5003 static uint32 ComputeSize() {
5004 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5007 void SetHeader() { header.SetCmd<ValueType>(); }
5009 void Init(GLenum _func, GLint _ref, GLuint _mask) {
5010 SetHeader();
5011 func = _func;
5012 ref = _ref;
5013 mask = _mask;
5016 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
5017 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
5018 return NextCmdAddress<ValueType>(cmd);
5021 gpu::CommandHeader header;
5022 uint32 func;
5023 int32 ref;
5024 uint32 mask;
5027 COMPILE_ASSERT(sizeof(StencilFunc) == 16, Sizeof_StencilFunc_is_not_16);
5028 COMPILE_ASSERT(offsetof(StencilFunc, header) == 0,
5029 OffsetOf_StencilFunc_header_not_0);
5030 COMPILE_ASSERT(offsetof(StencilFunc, func) == 4,
5031 OffsetOf_StencilFunc_func_not_4);
5032 COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8, OffsetOf_StencilFunc_ref_not_8);
5033 COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12,
5034 OffsetOf_StencilFunc_mask_not_12);
5036 struct StencilFuncSeparate {
5037 typedef StencilFuncSeparate ValueType;
5038 static const CommandId kCmdId = kStencilFuncSeparate;
5039 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5040 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5042 static uint32 ComputeSize() {
5043 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5046 void SetHeader() { header.SetCmd<ValueType>(); }
5048 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
5049 SetHeader();
5050 face = _face;
5051 func = _func;
5052 ref = _ref;
5053 mask = _mask;
5056 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
5057 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
5058 return NextCmdAddress<ValueType>(cmd);
5061 gpu::CommandHeader header;
5062 uint32 face;
5063 uint32 func;
5064 int32 ref;
5065 uint32 mask;
5068 COMPILE_ASSERT(sizeof(StencilFuncSeparate) == 20,
5069 Sizeof_StencilFuncSeparate_is_not_20);
5070 COMPILE_ASSERT(offsetof(StencilFuncSeparate, header) == 0,
5071 OffsetOf_StencilFuncSeparate_header_not_0);
5072 COMPILE_ASSERT(offsetof(StencilFuncSeparate, face) == 4,
5073 OffsetOf_StencilFuncSeparate_face_not_4);
5074 COMPILE_ASSERT(offsetof(StencilFuncSeparate, func) == 8,
5075 OffsetOf_StencilFuncSeparate_func_not_8);
5076 COMPILE_ASSERT(offsetof(StencilFuncSeparate, ref) == 12,
5077 OffsetOf_StencilFuncSeparate_ref_not_12);
5078 COMPILE_ASSERT(offsetof(StencilFuncSeparate, mask) == 16,
5079 OffsetOf_StencilFuncSeparate_mask_not_16);
5081 struct StencilMask {
5082 typedef StencilMask ValueType;
5083 static const CommandId kCmdId = kStencilMask;
5084 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5085 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5087 static uint32 ComputeSize() {
5088 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5091 void SetHeader() { header.SetCmd<ValueType>(); }
5093 void Init(GLuint _mask) {
5094 SetHeader();
5095 mask = _mask;
5098 void* Set(void* cmd, GLuint _mask) {
5099 static_cast<ValueType*>(cmd)->Init(_mask);
5100 return NextCmdAddress<ValueType>(cmd);
5103 gpu::CommandHeader header;
5104 uint32 mask;
5107 COMPILE_ASSERT(sizeof(StencilMask) == 8, Sizeof_StencilMask_is_not_8);
5108 COMPILE_ASSERT(offsetof(StencilMask, header) == 0,
5109 OffsetOf_StencilMask_header_not_0);
5110 COMPILE_ASSERT(offsetof(StencilMask, mask) == 4,
5111 OffsetOf_StencilMask_mask_not_4);
5113 struct StencilMaskSeparate {
5114 typedef StencilMaskSeparate ValueType;
5115 static const CommandId kCmdId = kStencilMaskSeparate;
5116 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5117 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5119 static uint32 ComputeSize() {
5120 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5123 void SetHeader() { header.SetCmd<ValueType>(); }
5125 void Init(GLenum _face, GLuint _mask) {
5126 SetHeader();
5127 face = _face;
5128 mask = _mask;
5131 void* Set(void* cmd, GLenum _face, GLuint _mask) {
5132 static_cast<ValueType*>(cmd)->Init(_face, _mask);
5133 return NextCmdAddress<ValueType>(cmd);
5136 gpu::CommandHeader header;
5137 uint32 face;
5138 uint32 mask;
5141 COMPILE_ASSERT(sizeof(StencilMaskSeparate) == 12,
5142 Sizeof_StencilMaskSeparate_is_not_12);
5143 COMPILE_ASSERT(offsetof(StencilMaskSeparate, header) == 0,
5144 OffsetOf_StencilMaskSeparate_header_not_0);
5145 COMPILE_ASSERT(offsetof(StencilMaskSeparate, face) == 4,
5146 OffsetOf_StencilMaskSeparate_face_not_4);
5147 COMPILE_ASSERT(offsetof(StencilMaskSeparate, mask) == 8,
5148 OffsetOf_StencilMaskSeparate_mask_not_8);
5150 struct StencilOp {
5151 typedef StencilOp ValueType;
5152 static const CommandId kCmdId = kStencilOp;
5153 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5154 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5156 static uint32 ComputeSize() {
5157 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5160 void SetHeader() { header.SetCmd<ValueType>(); }
5162 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
5163 SetHeader();
5164 fail = _fail;
5165 zfail = _zfail;
5166 zpass = _zpass;
5169 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
5170 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
5171 return NextCmdAddress<ValueType>(cmd);
5174 gpu::CommandHeader header;
5175 uint32 fail;
5176 uint32 zfail;
5177 uint32 zpass;
5180 COMPILE_ASSERT(sizeof(StencilOp) == 16, Sizeof_StencilOp_is_not_16);
5181 COMPILE_ASSERT(offsetof(StencilOp, header) == 0,
5182 OffsetOf_StencilOp_header_not_0);
5183 COMPILE_ASSERT(offsetof(StencilOp, fail) == 4, OffsetOf_StencilOp_fail_not_4);
5184 COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8, OffsetOf_StencilOp_zfail_not_8);
5185 COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12,
5186 OffsetOf_StencilOp_zpass_not_12);
5188 struct StencilOpSeparate {
5189 typedef StencilOpSeparate ValueType;
5190 static const CommandId kCmdId = kStencilOpSeparate;
5191 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5192 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5194 static uint32 ComputeSize() {
5195 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5198 void SetHeader() { header.SetCmd<ValueType>(); }
5200 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
5201 SetHeader();
5202 face = _face;
5203 fail = _fail;
5204 zfail = _zfail;
5205 zpass = _zpass;
5208 void* Set(void* cmd,
5209 GLenum _face,
5210 GLenum _fail,
5211 GLenum _zfail,
5212 GLenum _zpass) {
5213 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
5214 return NextCmdAddress<ValueType>(cmd);
5217 gpu::CommandHeader header;
5218 uint32 face;
5219 uint32 fail;
5220 uint32 zfail;
5221 uint32 zpass;
5224 COMPILE_ASSERT(sizeof(StencilOpSeparate) == 20,
5225 Sizeof_StencilOpSeparate_is_not_20);
5226 COMPILE_ASSERT(offsetof(StencilOpSeparate, header) == 0,
5227 OffsetOf_StencilOpSeparate_header_not_0);
5228 COMPILE_ASSERT(offsetof(StencilOpSeparate, face) == 4,
5229 OffsetOf_StencilOpSeparate_face_not_4);
5230 COMPILE_ASSERT(offsetof(StencilOpSeparate, fail) == 8,
5231 OffsetOf_StencilOpSeparate_fail_not_8);
5232 COMPILE_ASSERT(offsetof(StencilOpSeparate, zfail) == 12,
5233 OffsetOf_StencilOpSeparate_zfail_not_12);
5234 COMPILE_ASSERT(offsetof(StencilOpSeparate, zpass) == 16,
5235 OffsetOf_StencilOpSeparate_zpass_not_16);
5237 struct TexImage2D {
5238 typedef TexImage2D ValueType;
5239 static const CommandId kCmdId = kTexImage2D;
5240 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5241 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5243 static uint32 ComputeSize() {
5244 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5247 void SetHeader() { header.SetCmd<ValueType>(); }
5249 void Init(GLenum _target,
5250 GLint _level,
5251 GLint _internalformat,
5252 GLsizei _width,
5253 GLsizei _height,
5254 GLint _border,
5255 GLenum _format,
5256 GLenum _type,
5257 uint32 _pixels_shm_id,
5258 uint32 _pixels_shm_offset) {
5259 SetHeader();
5260 target = _target;
5261 level = _level;
5262 internalformat = _internalformat;
5263 width = _width;
5264 height = _height;
5265 border = _border;
5266 format = _format;
5267 type = _type;
5268 pixels_shm_id = _pixels_shm_id;
5269 pixels_shm_offset = _pixels_shm_offset;
5272 void* Set(void* cmd,
5273 GLenum _target,
5274 GLint _level,
5275 GLint _internalformat,
5276 GLsizei _width,
5277 GLsizei _height,
5278 GLint _border,
5279 GLenum _format,
5280 GLenum _type,
5281 uint32 _pixels_shm_id,
5282 uint32 _pixels_shm_offset) {
5283 static_cast<ValueType*>(cmd)->Init(_target,
5284 _level,
5285 _internalformat,
5286 _width,
5287 _height,
5288 _border,
5289 _format,
5290 _type,
5291 _pixels_shm_id,
5292 _pixels_shm_offset);
5293 return NextCmdAddress<ValueType>(cmd);
5296 gpu::CommandHeader header;
5297 uint32 target;
5298 int32 level;
5299 int32 internalformat;
5300 int32 width;
5301 int32 height;
5302 int32 border;
5303 uint32 format;
5304 uint32 type;
5305 uint32 pixels_shm_id;
5306 uint32 pixels_shm_offset;
5309 COMPILE_ASSERT(sizeof(TexImage2D) == 44, Sizeof_TexImage2D_is_not_44);
5310 COMPILE_ASSERT(offsetof(TexImage2D, header) == 0,
5311 OffsetOf_TexImage2D_header_not_0);
5312 COMPILE_ASSERT(offsetof(TexImage2D, target) == 4,
5313 OffsetOf_TexImage2D_target_not_4);
5314 COMPILE_ASSERT(offsetof(TexImage2D, level) == 8,
5315 OffsetOf_TexImage2D_level_not_8);
5316 COMPILE_ASSERT(offsetof(TexImage2D, internalformat) == 12,
5317 OffsetOf_TexImage2D_internalformat_not_12);
5318 COMPILE_ASSERT(offsetof(TexImage2D, width) == 16,
5319 OffsetOf_TexImage2D_width_not_16);
5320 COMPILE_ASSERT(offsetof(TexImage2D, height) == 20,
5321 OffsetOf_TexImage2D_height_not_20);
5322 COMPILE_ASSERT(offsetof(TexImage2D, border) == 24,
5323 OffsetOf_TexImage2D_border_not_24);
5324 COMPILE_ASSERT(offsetof(TexImage2D, format) == 28,
5325 OffsetOf_TexImage2D_format_not_28);
5326 COMPILE_ASSERT(offsetof(TexImage2D, type) == 32,
5327 OffsetOf_TexImage2D_type_not_32);
5328 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 36,
5329 OffsetOf_TexImage2D_pixels_shm_id_not_36);
5330 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 40,
5331 OffsetOf_TexImage2D_pixels_shm_offset_not_40);
5333 struct TexParameterf {
5334 typedef TexParameterf ValueType;
5335 static const CommandId kCmdId = kTexParameterf;
5336 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5337 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5339 static uint32 ComputeSize() {
5340 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5343 void SetHeader() { header.SetCmd<ValueType>(); }
5345 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
5346 SetHeader();
5347 target = _target;
5348 pname = _pname;
5349 param = _param;
5352 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
5353 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
5354 return NextCmdAddress<ValueType>(cmd);
5357 gpu::CommandHeader header;
5358 uint32 target;
5359 uint32 pname;
5360 float param;
5363 COMPILE_ASSERT(sizeof(TexParameterf) == 16, Sizeof_TexParameterf_is_not_16);
5364 COMPILE_ASSERT(offsetof(TexParameterf, header) == 0,
5365 OffsetOf_TexParameterf_header_not_0);
5366 COMPILE_ASSERT(offsetof(TexParameterf, target) == 4,
5367 OffsetOf_TexParameterf_target_not_4);
5368 COMPILE_ASSERT(offsetof(TexParameterf, pname) == 8,
5369 OffsetOf_TexParameterf_pname_not_8);
5370 COMPILE_ASSERT(offsetof(TexParameterf, param) == 12,
5371 OffsetOf_TexParameterf_param_not_12);
5373 struct TexParameterfv {
5374 typedef TexParameterfv ValueType;
5375 static const CommandId kCmdId = kTexParameterfv;
5376 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5377 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5379 static uint32 ComputeSize() {
5380 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5383 void SetHeader() { header.SetCmd<ValueType>(); }
5385 void Init(GLenum _target,
5386 GLenum _pname,
5387 uint32 _params_shm_id,
5388 uint32 _params_shm_offset) {
5389 SetHeader();
5390 target = _target;
5391 pname = _pname;
5392 params_shm_id = _params_shm_id;
5393 params_shm_offset = _params_shm_offset;
5396 void* Set(void* cmd,
5397 GLenum _target,
5398 GLenum _pname,
5399 uint32 _params_shm_id,
5400 uint32 _params_shm_offset) {
5401 static_cast<ValueType*>(cmd)
5402 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5403 return NextCmdAddress<ValueType>(cmd);
5406 gpu::CommandHeader header;
5407 uint32 target;
5408 uint32 pname;
5409 uint32 params_shm_id;
5410 uint32 params_shm_offset;
5413 COMPILE_ASSERT(sizeof(TexParameterfv) == 20, Sizeof_TexParameterfv_is_not_20);
5414 COMPILE_ASSERT(offsetof(TexParameterfv, header) == 0,
5415 OffsetOf_TexParameterfv_header_not_0);
5416 COMPILE_ASSERT(offsetof(TexParameterfv, target) == 4,
5417 OffsetOf_TexParameterfv_target_not_4);
5418 COMPILE_ASSERT(offsetof(TexParameterfv, pname) == 8,
5419 OffsetOf_TexParameterfv_pname_not_8);
5420 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_id) == 12,
5421 OffsetOf_TexParameterfv_params_shm_id_not_12);
5422 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_offset) == 16,
5423 OffsetOf_TexParameterfv_params_shm_offset_not_16);
5425 struct TexParameterfvImmediate {
5426 typedef TexParameterfvImmediate ValueType;
5427 static const CommandId kCmdId = kTexParameterfvImmediate;
5428 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5429 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5431 static uint32 ComputeDataSize() {
5432 return static_cast<uint32>(sizeof(GLfloat) * 1); // NOLINT
5435 static uint32 ComputeSize() {
5436 return static_cast<uint32>(sizeof(ValueType) +
5437 ComputeDataSize()); // NOLINT
5440 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
5442 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
5443 SetHeader();
5444 target = _target;
5445 pname = _pname;
5446 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
5449 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
5450 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
5451 const uint32 size = ComputeSize();
5452 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5455 gpu::CommandHeader header;
5456 uint32 target;
5457 uint32 pname;
5460 COMPILE_ASSERT(sizeof(TexParameterfvImmediate) == 12,
5461 Sizeof_TexParameterfvImmediate_is_not_12);
5462 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, header) == 0,
5463 OffsetOf_TexParameterfvImmediate_header_not_0);
5464 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, target) == 4,
5465 OffsetOf_TexParameterfvImmediate_target_not_4);
5466 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, pname) == 8,
5467 OffsetOf_TexParameterfvImmediate_pname_not_8);
5469 struct TexParameteri {
5470 typedef TexParameteri ValueType;
5471 static const CommandId kCmdId = kTexParameteri;
5472 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5473 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5475 static uint32 ComputeSize() {
5476 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5479 void SetHeader() { header.SetCmd<ValueType>(); }
5481 void Init(GLenum _target, GLenum _pname, GLint _param) {
5482 SetHeader();
5483 target = _target;
5484 pname = _pname;
5485 param = _param;
5488 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
5489 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
5490 return NextCmdAddress<ValueType>(cmd);
5493 gpu::CommandHeader header;
5494 uint32 target;
5495 uint32 pname;
5496 int32 param;
5499 COMPILE_ASSERT(sizeof(TexParameteri) == 16, Sizeof_TexParameteri_is_not_16);
5500 COMPILE_ASSERT(offsetof(TexParameteri, header) == 0,
5501 OffsetOf_TexParameteri_header_not_0);
5502 COMPILE_ASSERT(offsetof(TexParameteri, target) == 4,
5503 OffsetOf_TexParameteri_target_not_4);
5504 COMPILE_ASSERT(offsetof(TexParameteri, pname) == 8,
5505 OffsetOf_TexParameteri_pname_not_8);
5506 COMPILE_ASSERT(offsetof(TexParameteri, param) == 12,
5507 OffsetOf_TexParameteri_param_not_12);
5509 struct TexParameteriv {
5510 typedef TexParameteriv ValueType;
5511 static const CommandId kCmdId = kTexParameteriv;
5512 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5513 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5515 static uint32 ComputeSize() {
5516 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5519 void SetHeader() { header.SetCmd<ValueType>(); }
5521 void Init(GLenum _target,
5522 GLenum _pname,
5523 uint32 _params_shm_id,
5524 uint32 _params_shm_offset) {
5525 SetHeader();
5526 target = _target;
5527 pname = _pname;
5528 params_shm_id = _params_shm_id;
5529 params_shm_offset = _params_shm_offset;
5532 void* Set(void* cmd,
5533 GLenum _target,
5534 GLenum _pname,
5535 uint32 _params_shm_id,
5536 uint32 _params_shm_offset) {
5537 static_cast<ValueType*>(cmd)
5538 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5539 return NextCmdAddress<ValueType>(cmd);
5542 gpu::CommandHeader header;
5543 uint32 target;
5544 uint32 pname;
5545 uint32 params_shm_id;
5546 uint32 params_shm_offset;
5549 COMPILE_ASSERT(sizeof(TexParameteriv) == 20, Sizeof_TexParameteriv_is_not_20);
5550 COMPILE_ASSERT(offsetof(TexParameteriv, header) == 0,
5551 OffsetOf_TexParameteriv_header_not_0);
5552 COMPILE_ASSERT(offsetof(TexParameteriv, target) == 4,
5553 OffsetOf_TexParameteriv_target_not_4);
5554 COMPILE_ASSERT(offsetof(TexParameteriv, pname) == 8,
5555 OffsetOf_TexParameteriv_pname_not_8);
5556 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_id) == 12,
5557 OffsetOf_TexParameteriv_params_shm_id_not_12);
5558 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_offset) == 16,
5559 OffsetOf_TexParameteriv_params_shm_offset_not_16);
5561 struct TexParameterivImmediate {
5562 typedef TexParameterivImmediate ValueType;
5563 static const CommandId kCmdId = kTexParameterivImmediate;
5564 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5565 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5567 static uint32 ComputeDataSize() {
5568 return static_cast<uint32>(sizeof(GLint) * 1); // NOLINT
5571 static uint32 ComputeSize() {
5572 return static_cast<uint32>(sizeof(ValueType) +
5573 ComputeDataSize()); // NOLINT
5576 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
5578 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
5579 SetHeader();
5580 target = _target;
5581 pname = _pname;
5582 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
5585 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
5586 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
5587 const uint32 size = ComputeSize();
5588 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5591 gpu::CommandHeader header;
5592 uint32 target;
5593 uint32 pname;
5596 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12,
5597 Sizeof_TexParameterivImmediate_is_not_12);
5598 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0,
5599 OffsetOf_TexParameterivImmediate_header_not_0);
5600 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4,
5601 OffsetOf_TexParameterivImmediate_target_not_4);
5602 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8,
5603 OffsetOf_TexParameterivImmediate_pname_not_8);
5605 struct TexSubImage2D {
5606 typedef TexSubImage2D ValueType;
5607 static const CommandId kCmdId = kTexSubImage2D;
5608 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5609 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5611 static uint32 ComputeSize() {
5612 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5615 void SetHeader() { header.SetCmd<ValueType>(); }
5617 void Init(GLenum _target,
5618 GLint _level,
5619 GLint _xoffset,
5620 GLint _yoffset,
5621 GLsizei _width,
5622 GLsizei _height,
5623 GLenum _format,
5624 GLenum _type,
5625 uint32 _pixels_shm_id,
5626 uint32 _pixels_shm_offset,
5627 GLboolean _internal) {
5628 SetHeader();
5629 target = _target;
5630 level = _level;
5631 xoffset = _xoffset;
5632 yoffset = _yoffset;
5633 width = _width;
5634 height = _height;
5635 format = _format;
5636 type = _type;
5637 pixels_shm_id = _pixels_shm_id;
5638 pixels_shm_offset = _pixels_shm_offset;
5639 internal = _internal;
5642 void* Set(void* cmd,
5643 GLenum _target,
5644 GLint _level,
5645 GLint _xoffset,
5646 GLint _yoffset,
5647 GLsizei _width,
5648 GLsizei _height,
5649 GLenum _format,
5650 GLenum _type,
5651 uint32 _pixels_shm_id,
5652 uint32 _pixels_shm_offset,
5653 GLboolean _internal) {
5654 static_cast<ValueType*>(cmd)->Init(_target,
5655 _level,
5656 _xoffset,
5657 _yoffset,
5658 _width,
5659 _height,
5660 _format,
5661 _type,
5662 _pixels_shm_id,
5663 _pixels_shm_offset,
5664 _internal);
5665 return NextCmdAddress<ValueType>(cmd);
5668 gpu::CommandHeader header;
5669 uint32 target;
5670 int32 level;
5671 int32 xoffset;
5672 int32 yoffset;
5673 int32 width;
5674 int32 height;
5675 uint32 format;
5676 uint32 type;
5677 uint32 pixels_shm_id;
5678 uint32 pixels_shm_offset;
5679 uint32 internal;
5682 COMPILE_ASSERT(sizeof(TexSubImage2D) == 48, Sizeof_TexSubImage2D_is_not_48);
5683 COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0,
5684 OffsetOf_TexSubImage2D_header_not_0);
5685 COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4,
5686 OffsetOf_TexSubImage2D_target_not_4);
5687 COMPILE_ASSERT(offsetof(TexSubImage2D, level) == 8,
5688 OffsetOf_TexSubImage2D_level_not_8);
5689 COMPILE_ASSERT(offsetof(TexSubImage2D, xoffset) == 12,
5690 OffsetOf_TexSubImage2D_xoffset_not_12);
5691 COMPILE_ASSERT(offsetof(TexSubImage2D, yoffset) == 16,
5692 OffsetOf_TexSubImage2D_yoffset_not_16);
5693 COMPILE_ASSERT(offsetof(TexSubImage2D, width) == 20,
5694 OffsetOf_TexSubImage2D_width_not_20);
5695 COMPILE_ASSERT(offsetof(TexSubImage2D, height) == 24,
5696 OffsetOf_TexSubImage2D_height_not_24);
5697 COMPILE_ASSERT(offsetof(TexSubImage2D, format) == 28,
5698 OffsetOf_TexSubImage2D_format_not_28);
5699 COMPILE_ASSERT(offsetof(TexSubImage2D, type) == 32,
5700 OffsetOf_TexSubImage2D_type_not_32);
5701 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_id) == 36,
5702 OffsetOf_TexSubImage2D_pixels_shm_id_not_36);
5703 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
5704 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40);
5705 COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44,
5706 OffsetOf_TexSubImage2D_internal_not_44);
5708 struct Uniform1f {
5709 typedef Uniform1f ValueType;
5710 static const CommandId kCmdId = kUniform1f;
5711 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5712 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5714 static uint32 ComputeSize() {
5715 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5718 void SetHeader() { header.SetCmd<ValueType>(); }
5720 void Init(GLint _location, GLfloat _x) {
5721 SetHeader();
5722 location = _location;
5723 x = _x;
5726 void* Set(void* cmd, GLint _location, GLfloat _x) {
5727 static_cast<ValueType*>(cmd)->Init(_location, _x);
5728 return NextCmdAddress<ValueType>(cmd);
5731 gpu::CommandHeader header;
5732 int32 location;
5733 float x;
5736 COMPILE_ASSERT(sizeof(Uniform1f) == 12, Sizeof_Uniform1f_is_not_12);
5737 COMPILE_ASSERT(offsetof(Uniform1f, header) == 0,
5738 OffsetOf_Uniform1f_header_not_0);
5739 COMPILE_ASSERT(offsetof(Uniform1f, location) == 4,
5740 OffsetOf_Uniform1f_location_not_4);
5741 COMPILE_ASSERT(offsetof(Uniform1f, x) == 8, OffsetOf_Uniform1f_x_not_8);
5743 struct Uniform1fv {
5744 typedef Uniform1fv ValueType;
5745 static const CommandId kCmdId = kUniform1fv;
5746 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5747 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5749 static uint32 ComputeSize() {
5750 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5753 void SetHeader() { header.SetCmd<ValueType>(); }
5755 void Init(GLint _location,
5756 GLsizei _count,
5757 uint32 _v_shm_id,
5758 uint32 _v_shm_offset) {
5759 SetHeader();
5760 location = _location;
5761 count = _count;
5762 v_shm_id = _v_shm_id;
5763 v_shm_offset = _v_shm_offset;
5766 void* Set(void* cmd,
5767 GLint _location,
5768 GLsizei _count,
5769 uint32 _v_shm_id,
5770 uint32 _v_shm_offset) {
5771 static_cast<ValueType*>(cmd)
5772 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
5773 return NextCmdAddress<ValueType>(cmd);
5776 gpu::CommandHeader header;
5777 int32 location;
5778 int32 count;
5779 uint32 v_shm_id;
5780 uint32 v_shm_offset;
5783 COMPILE_ASSERT(sizeof(Uniform1fv) == 20, Sizeof_Uniform1fv_is_not_20);
5784 COMPILE_ASSERT(offsetof(Uniform1fv, header) == 0,
5785 OffsetOf_Uniform1fv_header_not_0);
5786 COMPILE_ASSERT(offsetof(Uniform1fv, location) == 4,
5787 OffsetOf_Uniform1fv_location_not_4);
5788 COMPILE_ASSERT(offsetof(Uniform1fv, count) == 8,
5789 OffsetOf_Uniform1fv_count_not_8);
5790 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_id) == 12,
5791 OffsetOf_Uniform1fv_v_shm_id_not_12);
5792 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_offset) == 16,
5793 OffsetOf_Uniform1fv_v_shm_offset_not_16);
5795 struct Uniform1fvImmediate {
5796 typedef Uniform1fvImmediate ValueType;
5797 static const CommandId kCmdId = kUniform1fvImmediate;
5798 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5801 static uint32 ComputeDataSize(GLsizei count) {
5802 return static_cast<uint32>(sizeof(GLfloat) * 1 * count); // NOLINT
5805 static uint32 ComputeSize(GLsizei count) {
5806 return static_cast<uint32>(sizeof(ValueType) +
5807 ComputeDataSize(count)); // NOLINT
5810 void SetHeader(GLsizei count) {
5811 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5814 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
5815 SetHeader(_count);
5816 location = _location;
5817 count = _count;
5818 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5821 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
5822 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5823 const uint32 size = ComputeSize(_count);
5824 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5827 gpu::CommandHeader header;
5828 int32 location;
5829 int32 count;
5832 COMPILE_ASSERT(sizeof(Uniform1fvImmediate) == 12,
5833 Sizeof_Uniform1fvImmediate_is_not_12);
5834 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, header) == 0,
5835 OffsetOf_Uniform1fvImmediate_header_not_0);
5836 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, location) == 4,
5837 OffsetOf_Uniform1fvImmediate_location_not_4);
5838 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, count) == 8,
5839 OffsetOf_Uniform1fvImmediate_count_not_8);
5841 struct Uniform1i {
5842 typedef Uniform1i ValueType;
5843 static const CommandId kCmdId = kUniform1i;
5844 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5845 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5847 static uint32 ComputeSize() {
5848 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5851 void SetHeader() { header.SetCmd<ValueType>(); }
5853 void Init(GLint _location, GLint _x) {
5854 SetHeader();
5855 location = _location;
5856 x = _x;
5859 void* Set(void* cmd, GLint _location, GLint _x) {
5860 static_cast<ValueType*>(cmd)->Init(_location, _x);
5861 return NextCmdAddress<ValueType>(cmd);
5864 gpu::CommandHeader header;
5865 int32 location;
5866 int32 x;
5869 COMPILE_ASSERT(sizeof(Uniform1i) == 12, Sizeof_Uniform1i_is_not_12);
5870 COMPILE_ASSERT(offsetof(Uniform1i, header) == 0,
5871 OffsetOf_Uniform1i_header_not_0);
5872 COMPILE_ASSERT(offsetof(Uniform1i, location) == 4,
5873 OffsetOf_Uniform1i_location_not_4);
5874 COMPILE_ASSERT(offsetof(Uniform1i, x) == 8, OffsetOf_Uniform1i_x_not_8);
5876 struct Uniform1iv {
5877 typedef Uniform1iv ValueType;
5878 static const CommandId kCmdId = kUniform1iv;
5879 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5880 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5882 static uint32 ComputeSize() {
5883 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5886 void SetHeader() { header.SetCmd<ValueType>(); }
5888 void Init(GLint _location,
5889 GLsizei _count,
5890 uint32 _v_shm_id,
5891 uint32 _v_shm_offset) {
5892 SetHeader();
5893 location = _location;
5894 count = _count;
5895 v_shm_id = _v_shm_id;
5896 v_shm_offset = _v_shm_offset;
5899 void* Set(void* cmd,
5900 GLint _location,
5901 GLsizei _count,
5902 uint32 _v_shm_id,
5903 uint32 _v_shm_offset) {
5904 static_cast<ValueType*>(cmd)
5905 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
5906 return NextCmdAddress<ValueType>(cmd);
5909 gpu::CommandHeader header;
5910 int32 location;
5911 int32 count;
5912 uint32 v_shm_id;
5913 uint32 v_shm_offset;
5916 COMPILE_ASSERT(sizeof(Uniform1iv) == 20, Sizeof_Uniform1iv_is_not_20);
5917 COMPILE_ASSERT(offsetof(Uniform1iv, header) == 0,
5918 OffsetOf_Uniform1iv_header_not_0);
5919 COMPILE_ASSERT(offsetof(Uniform1iv, location) == 4,
5920 OffsetOf_Uniform1iv_location_not_4);
5921 COMPILE_ASSERT(offsetof(Uniform1iv, count) == 8,
5922 OffsetOf_Uniform1iv_count_not_8);
5923 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_id) == 12,
5924 OffsetOf_Uniform1iv_v_shm_id_not_12);
5925 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_offset) == 16,
5926 OffsetOf_Uniform1iv_v_shm_offset_not_16);
5928 struct Uniform1ivImmediate {
5929 typedef Uniform1ivImmediate ValueType;
5930 static const CommandId kCmdId = kUniform1ivImmediate;
5931 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5932 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5934 static uint32 ComputeDataSize(GLsizei count) {
5935 return static_cast<uint32>(sizeof(GLint) * 1 * count); // NOLINT
5938 static uint32 ComputeSize(GLsizei count) {
5939 return static_cast<uint32>(sizeof(ValueType) +
5940 ComputeDataSize(count)); // NOLINT
5943 void SetHeader(GLsizei count) {
5944 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5947 void Init(GLint _location, GLsizei _count, const GLint* _v) {
5948 SetHeader(_count);
5949 location = _location;
5950 count = _count;
5951 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5954 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
5955 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5956 const uint32 size = ComputeSize(_count);
5957 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5960 gpu::CommandHeader header;
5961 int32 location;
5962 int32 count;
5965 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12,
5966 Sizeof_Uniform1ivImmediate_is_not_12);
5967 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0,
5968 OffsetOf_Uniform1ivImmediate_header_not_0);
5969 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4,
5970 OffsetOf_Uniform1ivImmediate_location_not_4);
5971 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8,
5972 OffsetOf_Uniform1ivImmediate_count_not_8);
5974 struct Uniform2f {
5975 typedef Uniform2f ValueType;
5976 static const CommandId kCmdId = kUniform2f;
5977 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5978 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5980 static uint32 ComputeSize() {
5981 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
5984 void SetHeader() { header.SetCmd<ValueType>(); }
5986 void Init(GLint _location, GLfloat _x, GLfloat _y) {
5987 SetHeader();
5988 location = _location;
5989 x = _x;
5990 y = _y;
5993 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
5994 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
5995 return NextCmdAddress<ValueType>(cmd);
5998 gpu::CommandHeader header;
5999 int32 location;
6000 float x;
6001 float y;
6004 COMPILE_ASSERT(sizeof(Uniform2f) == 16, Sizeof_Uniform2f_is_not_16);
6005 COMPILE_ASSERT(offsetof(Uniform2f, header) == 0,
6006 OffsetOf_Uniform2f_header_not_0);
6007 COMPILE_ASSERT(offsetof(Uniform2f, location) == 4,
6008 OffsetOf_Uniform2f_location_not_4);
6009 COMPILE_ASSERT(offsetof(Uniform2f, x) == 8, OffsetOf_Uniform2f_x_not_8);
6010 COMPILE_ASSERT(offsetof(Uniform2f, y) == 12, OffsetOf_Uniform2f_y_not_12);
6012 struct Uniform2fv {
6013 typedef Uniform2fv ValueType;
6014 static const CommandId kCmdId = kUniform2fv;
6015 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6016 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6018 static uint32 ComputeSize() {
6019 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6022 void SetHeader() { header.SetCmd<ValueType>(); }
6024 void Init(GLint _location,
6025 GLsizei _count,
6026 uint32 _v_shm_id,
6027 uint32 _v_shm_offset) {
6028 SetHeader();
6029 location = _location;
6030 count = _count;
6031 v_shm_id = _v_shm_id;
6032 v_shm_offset = _v_shm_offset;
6035 void* Set(void* cmd,
6036 GLint _location,
6037 GLsizei _count,
6038 uint32 _v_shm_id,
6039 uint32 _v_shm_offset) {
6040 static_cast<ValueType*>(cmd)
6041 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6042 return NextCmdAddress<ValueType>(cmd);
6045 gpu::CommandHeader header;
6046 int32 location;
6047 int32 count;
6048 uint32 v_shm_id;
6049 uint32 v_shm_offset;
6052 COMPILE_ASSERT(sizeof(Uniform2fv) == 20, Sizeof_Uniform2fv_is_not_20);
6053 COMPILE_ASSERT(offsetof(Uniform2fv, header) == 0,
6054 OffsetOf_Uniform2fv_header_not_0);
6055 COMPILE_ASSERT(offsetof(Uniform2fv, location) == 4,
6056 OffsetOf_Uniform2fv_location_not_4);
6057 COMPILE_ASSERT(offsetof(Uniform2fv, count) == 8,
6058 OffsetOf_Uniform2fv_count_not_8);
6059 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_id) == 12,
6060 OffsetOf_Uniform2fv_v_shm_id_not_12);
6061 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_offset) == 16,
6062 OffsetOf_Uniform2fv_v_shm_offset_not_16);
6064 struct Uniform2fvImmediate {
6065 typedef Uniform2fvImmediate ValueType;
6066 static const CommandId kCmdId = kUniform2fvImmediate;
6067 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6068 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6070 static uint32 ComputeDataSize(GLsizei count) {
6071 return static_cast<uint32>(sizeof(GLfloat) * 2 * count); // NOLINT
6074 static uint32 ComputeSize(GLsizei count) {
6075 return static_cast<uint32>(sizeof(ValueType) +
6076 ComputeDataSize(count)); // NOLINT
6079 void SetHeader(GLsizei count) {
6080 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6083 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6084 SetHeader(_count);
6085 location = _location;
6086 count = _count;
6087 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6090 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6091 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6092 const uint32 size = ComputeSize(_count);
6093 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6096 gpu::CommandHeader header;
6097 int32 location;
6098 int32 count;
6101 COMPILE_ASSERT(sizeof(Uniform2fvImmediate) == 12,
6102 Sizeof_Uniform2fvImmediate_is_not_12);
6103 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, header) == 0,
6104 OffsetOf_Uniform2fvImmediate_header_not_0);
6105 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, location) == 4,
6106 OffsetOf_Uniform2fvImmediate_location_not_4);
6107 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, count) == 8,
6108 OffsetOf_Uniform2fvImmediate_count_not_8);
6110 struct Uniform2i {
6111 typedef Uniform2i ValueType;
6112 static const CommandId kCmdId = kUniform2i;
6113 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6114 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6116 static uint32 ComputeSize() {
6117 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6120 void SetHeader() { header.SetCmd<ValueType>(); }
6122 void Init(GLint _location, GLint _x, GLint _y) {
6123 SetHeader();
6124 location = _location;
6125 x = _x;
6126 y = _y;
6129 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
6130 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
6131 return NextCmdAddress<ValueType>(cmd);
6134 gpu::CommandHeader header;
6135 int32 location;
6136 int32 x;
6137 int32 y;
6140 COMPILE_ASSERT(sizeof(Uniform2i) == 16, Sizeof_Uniform2i_is_not_16);
6141 COMPILE_ASSERT(offsetof(Uniform2i, header) == 0,
6142 OffsetOf_Uniform2i_header_not_0);
6143 COMPILE_ASSERT(offsetof(Uniform2i, location) == 4,
6144 OffsetOf_Uniform2i_location_not_4);
6145 COMPILE_ASSERT(offsetof(Uniform2i, x) == 8, OffsetOf_Uniform2i_x_not_8);
6146 COMPILE_ASSERT(offsetof(Uniform2i, y) == 12, OffsetOf_Uniform2i_y_not_12);
6148 struct Uniform2iv {
6149 typedef Uniform2iv ValueType;
6150 static const CommandId kCmdId = kUniform2iv;
6151 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6152 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6154 static uint32 ComputeSize() {
6155 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6158 void SetHeader() { header.SetCmd<ValueType>(); }
6160 void Init(GLint _location,
6161 GLsizei _count,
6162 uint32 _v_shm_id,
6163 uint32 _v_shm_offset) {
6164 SetHeader();
6165 location = _location;
6166 count = _count;
6167 v_shm_id = _v_shm_id;
6168 v_shm_offset = _v_shm_offset;
6171 void* Set(void* cmd,
6172 GLint _location,
6173 GLsizei _count,
6174 uint32 _v_shm_id,
6175 uint32 _v_shm_offset) {
6176 static_cast<ValueType*>(cmd)
6177 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6178 return NextCmdAddress<ValueType>(cmd);
6181 gpu::CommandHeader header;
6182 int32 location;
6183 int32 count;
6184 uint32 v_shm_id;
6185 uint32 v_shm_offset;
6188 COMPILE_ASSERT(sizeof(Uniform2iv) == 20, Sizeof_Uniform2iv_is_not_20);
6189 COMPILE_ASSERT(offsetof(Uniform2iv, header) == 0,
6190 OffsetOf_Uniform2iv_header_not_0);
6191 COMPILE_ASSERT(offsetof(Uniform2iv, location) == 4,
6192 OffsetOf_Uniform2iv_location_not_4);
6193 COMPILE_ASSERT(offsetof(Uniform2iv, count) == 8,
6194 OffsetOf_Uniform2iv_count_not_8);
6195 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_id) == 12,
6196 OffsetOf_Uniform2iv_v_shm_id_not_12);
6197 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_offset) == 16,
6198 OffsetOf_Uniform2iv_v_shm_offset_not_16);
6200 struct Uniform2ivImmediate {
6201 typedef Uniform2ivImmediate ValueType;
6202 static const CommandId kCmdId = kUniform2ivImmediate;
6203 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6204 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6206 static uint32 ComputeDataSize(GLsizei count) {
6207 return static_cast<uint32>(sizeof(GLint) * 2 * count); // NOLINT
6210 static uint32 ComputeSize(GLsizei count) {
6211 return static_cast<uint32>(sizeof(ValueType) +
6212 ComputeDataSize(count)); // NOLINT
6215 void SetHeader(GLsizei count) {
6216 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6219 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6220 SetHeader(_count);
6221 location = _location;
6222 count = _count;
6223 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6226 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6227 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6228 const uint32 size = ComputeSize(_count);
6229 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6232 gpu::CommandHeader header;
6233 int32 location;
6234 int32 count;
6237 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12,
6238 Sizeof_Uniform2ivImmediate_is_not_12);
6239 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0,
6240 OffsetOf_Uniform2ivImmediate_header_not_0);
6241 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4,
6242 OffsetOf_Uniform2ivImmediate_location_not_4);
6243 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8,
6244 OffsetOf_Uniform2ivImmediate_count_not_8);
6246 struct Uniform3f {
6247 typedef Uniform3f ValueType;
6248 static const CommandId kCmdId = kUniform3f;
6249 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6250 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6252 static uint32 ComputeSize() {
6253 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6256 void SetHeader() { header.SetCmd<ValueType>(); }
6258 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
6259 SetHeader();
6260 location = _location;
6261 x = _x;
6262 y = _y;
6263 z = _z;
6266 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
6267 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
6268 return NextCmdAddress<ValueType>(cmd);
6271 gpu::CommandHeader header;
6272 int32 location;
6273 float x;
6274 float y;
6275 float z;
6278 COMPILE_ASSERT(sizeof(Uniform3f) == 20, Sizeof_Uniform3f_is_not_20);
6279 COMPILE_ASSERT(offsetof(Uniform3f, header) == 0,
6280 OffsetOf_Uniform3f_header_not_0);
6281 COMPILE_ASSERT(offsetof(Uniform3f, location) == 4,
6282 OffsetOf_Uniform3f_location_not_4);
6283 COMPILE_ASSERT(offsetof(Uniform3f, x) == 8, OffsetOf_Uniform3f_x_not_8);
6284 COMPILE_ASSERT(offsetof(Uniform3f, y) == 12, OffsetOf_Uniform3f_y_not_12);
6285 COMPILE_ASSERT(offsetof(Uniform3f, z) == 16, OffsetOf_Uniform3f_z_not_16);
6287 struct Uniform3fv {
6288 typedef Uniform3fv ValueType;
6289 static const CommandId kCmdId = kUniform3fv;
6290 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6291 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6293 static uint32 ComputeSize() {
6294 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6297 void SetHeader() { header.SetCmd<ValueType>(); }
6299 void Init(GLint _location,
6300 GLsizei _count,
6301 uint32 _v_shm_id,
6302 uint32 _v_shm_offset) {
6303 SetHeader();
6304 location = _location;
6305 count = _count;
6306 v_shm_id = _v_shm_id;
6307 v_shm_offset = _v_shm_offset;
6310 void* Set(void* cmd,
6311 GLint _location,
6312 GLsizei _count,
6313 uint32 _v_shm_id,
6314 uint32 _v_shm_offset) {
6315 static_cast<ValueType*>(cmd)
6316 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6317 return NextCmdAddress<ValueType>(cmd);
6320 gpu::CommandHeader header;
6321 int32 location;
6322 int32 count;
6323 uint32 v_shm_id;
6324 uint32 v_shm_offset;
6327 COMPILE_ASSERT(sizeof(Uniform3fv) == 20, Sizeof_Uniform3fv_is_not_20);
6328 COMPILE_ASSERT(offsetof(Uniform3fv, header) == 0,
6329 OffsetOf_Uniform3fv_header_not_0);
6330 COMPILE_ASSERT(offsetof(Uniform3fv, location) == 4,
6331 OffsetOf_Uniform3fv_location_not_4);
6332 COMPILE_ASSERT(offsetof(Uniform3fv, count) == 8,
6333 OffsetOf_Uniform3fv_count_not_8);
6334 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_id) == 12,
6335 OffsetOf_Uniform3fv_v_shm_id_not_12);
6336 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_offset) == 16,
6337 OffsetOf_Uniform3fv_v_shm_offset_not_16);
6339 struct Uniform3fvImmediate {
6340 typedef Uniform3fvImmediate ValueType;
6341 static const CommandId kCmdId = kUniform3fvImmediate;
6342 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6343 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6345 static uint32 ComputeDataSize(GLsizei count) {
6346 return static_cast<uint32>(sizeof(GLfloat) * 3 * count); // NOLINT
6349 static uint32 ComputeSize(GLsizei count) {
6350 return static_cast<uint32>(sizeof(ValueType) +
6351 ComputeDataSize(count)); // NOLINT
6354 void SetHeader(GLsizei count) {
6355 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6358 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6359 SetHeader(_count);
6360 location = _location;
6361 count = _count;
6362 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6365 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6366 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6367 const uint32 size = ComputeSize(_count);
6368 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6371 gpu::CommandHeader header;
6372 int32 location;
6373 int32 count;
6376 COMPILE_ASSERT(sizeof(Uniform3fvImmediate) == 12,
6377 Sizeof_Uniform3fvImmediate_is_not_12);
6378 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, header) == 0,
6379 OffsetOf_Uniform3fvImmediate_header_not_0);
6380 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, location) == 4,
6381 OffsetOf_Uniform3fvImmediate_location_not_4);
6382 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, count) == 8,
6383 OffsetOf_Uniform3fvImmediate_count_not_8);
6385 struct Uniform3i {
6386 typedef Uniform3i ValueType;
6387 static const CommandId kCmdId = kUniform3i;
6388 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6389 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6391 static uint32 ComputeSize() {
6392 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6395 void SetHeader() { header.SetCmd<ValueType>(); }
6397 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
6398 SetHeader();
6399 location = _location;
6400 x = _x;
6401 y = _y;
6402 z = _z;
6405 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
6406 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
6407 return NextCmdAddress<ValueType>(cmd);
6410 gpu::CommandHeader header;
6411 int32 location;
6412 int32 x;
6413 int32 y;
6414 int32 z;
6417 COMPILE_ASSERT(sizeof(Uniform3i) == 20, Sizeof_Uniform3i_is_not_20);
6418 COMPILE_ASSERT(offsetof(Uniform3i, header) == 0,
6419 OffsetOf_Uniform3i_header_not_0);
6420 COMPILE_ASSERT(offsetof(Uniform3i, location) == 4,
6421 OffsetOf_Uniform3i_location_not_4);
6422 COMPILE_ASSERT(offsetof(Uniform3i, x) == 8, OffsetOf_Uniform3i_x_not_8);
6423 COMPILE_ASSERT(offsetof(Uniform3i, y) == 12, OffsetOf_Uniform3i_y_not_12);
6424 COMPILE_ASSERT(offsetof(Uniform3i, z) == 16, OffsetOf_Uniform3i_z_not_16);
6426 struct Uniform3iv {
6427 typedef Uniform3iv ValueType;
6428 static const CommandId kCmdId = kUniform3iv;
6429 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6430 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6432 static uint32 ComputeSize() {
6433 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6436 void SetHeader() { header.SetCmd<ValueType>(); }
6438 void Init(GLint _location,
6439 GLsizei _count,
6440 uint32 _v_shm_id,
6441 uint32 _v_shm_offset) {
6442 SetHeader();
6443 location = _location;
6444 count = _count;
6445 v_shm_id = _v_shm_id;
6446 v_shm_offset = _v_shm_offset;
6449 void* Set(void* cmd,
6450 GLint _location,
6451 GLsizei _count,
6452 uint32 _v_shm_id,
6453 uint32 _v_shm_offset) {
6454 static_cast<ValueType*>(cmd)
6455 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6456 return NextCmdAddress<ValueType>(cmd);
6459 gpu::CommandHeader header;
6460 int32 location;
6461 int32 count;
6462 uint32 v_shm_id;
6463 uint32 v_shm_offset;
6466 COMPILE_ASSERT(sizeof(Uniform3iv) == 20, Sizeof_Uniform3iv_is_not_20);
6467 COMPILE_ASSERT(offsetof(Uniform3iv, header) == 0,
6468 OffsetOf_Uniform3iv_header_not_0);
6469 COMPILE_ASSERT(offsetof(Uniform3iv, location) == 4,
6470 OffsetOf_Uniform3iv_location_not_4);
6471 COMPILE_ASSERT(offsetof(Uniform3iv, count) == 8,
6472 OffsetOf_Uniform3iv_count_not_8);
6473 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_id) == 12,
6474 OffsetOf_Uniform3iv_v_shm_id_not_12);
6475 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_offset) == 16,
6476 OffsetOf_Uniform3iv_v_shm_offset_not_16);
6478 struct Uniform3ivImmediate {
6479 typedef Uniform3ivImmediate ValueType;
6480 static const CommandId kCmdId = kUniform3ivImmediate;
6481 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6482 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6484 static uint32 ComputeDataSize(GLsizei count) {
6485 return static_cast<uint32>(sizeof(GLint) * 3 * count); // NOLINT
6488 static uint32 ComputeSize(GLsizei count) {
6489 return static_cast<uint32>(sizeof(ValueType) +
6490 ComputeDataSize(count)); // NOLINT
6493 void SetHeader(GLsizei count) {
6494 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6497 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6498 SetHeader(_count);
6499 location = _location;
6500 count = _count;
6501 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6504 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6505 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6506 const uint32 size = ComputeSize(_count);
6507 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6510 gpu::CommandHeader header;
6511 int32 location;
6512 int32 count;
6515 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12,
6516 Sizeof_Uniform3ivImmediate_is_not_12);
6517 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0,
6518 OffsetOf_Uniform3ivImmediate_header_not_0);
6519 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4,
6520 OffsetOf_Uniform3ivImmediate_location_not_4);
6521 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8,
6522 OffsetOf_Uniform3ivImmediate_count_not_8);
6524 struct Uniform4f {
6525 typedef Uniform4f ValueType;
6526 static const CommandId kCmdId = kUniform4f;
6527 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6528 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6530 static uint32 ComputeSize() {
6531 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6534 void SetHeader() { header.SetCmd<ValueType>(); }
6536 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
6537 SetHeader();
6538 location = _location;
6539 x = _x;
6540 y = _y;
6541 z = _z;
6542 w = _w;
6545 void* Set(void* cmd,
6546 GLint _location,
6547 GLfloat _x,
6548 GLfloat _y,
6549 GLfloat _z,
6550 GLfloat _w) {
6551 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
6552 return NextCmdAddress<ValueType>(cmd);
6555 gpu::CommandHeader header;
6556 int32 location;
6557 float x;
6558 float y;
6559 float z;
6560 float w;
6563 COMPILE_ASSERT(sizeof(Uniform4f) == 24, Sizeof_Uniform4f_is_not_24);
6564 COMPILE_ASSERT(offsetof(Uniform4f, header) == 0,
6565 OffsetOf_Uniform4f_header_not_0);
6566 COMPILE_ASSERT(offsetof(Uniform4f, location) == 4,
6567 OffsetOf_Uniform4f_location_not_4);
6568 COMPILE_ASSERT(offsetof(Uniform4f, x) == 8, OffsetOf_Uniform4f_x_not_8);
6569 COMPILE_ASSERT(offsetof(Uniform4f, y) == 12, OffsetOf_Uniform4f_y_not_12);
6570 COMPILE_ASSERT(offsetof(Uniform4f, z) == 16, OffsetOf_Uniform4f_z_not_16);
6571 COMPILE_ASSERT(offsetof(Uniform4f, w) == 20, OffsetOf_Uniform4f_w_not_20);
6573 struct Uniform4fv {
6574 typedef Uniform4fv ValueType;
6575 static const CommandId kCmdId = kUniform4fv;
6576 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6577 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6579 static uint32 ComputeSize() {
6580 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6583 void SetHeader() { header.SetCmd<ValueType>(); }
6585 void Init(GLint _location,
6586 GLsizei _count,
6587 uint32 _v_shm_id,
6588 uint32 _v_shm_offset) {
6589 SetHeader();
6590 location = _location;
6591 count = _count;
6592 v_shm_id = _v_shm_id;
6593 v_shm_offset = _v_shm_offset;
6596 void* Set(void* cmd,
6597 GLint _location,
6598 GLsizei _count,
6599 uint32 _v_shm_id,
6600 uint32 _v_shm_offset) {
6601 static_cast<ValueType*>(cmd)
6602 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6603 return NextCmdAddress<ValueType>(cmd);
6606 gpu::CommandHeader header;
6607 int32 location;
6608 int32 count;
6609 uint32 v_shm_id;
6610 uint32 v_shm_offset;
6613 COMPILE_ASSERT(sizeof(Uniform4fv) == 20, Sizeof_Uniform4fv_is_not_20);
6614 COMPILE_ASSERT(offsetof(Uniform4fv, header) == 0,
6615 OffsetOf_Uniform4fv_header_not_0);
6616 COMPILE_ASSERT(offsetof(Uniform4fv, location) == 4,
6617 OffsetOf_Uniform4fv_location_not_4);
6618 COMPILE_ASSERT(offsetof(Uniform4fv, count) == 8,
6619 OffsetOf_Uniform4fv_count_not_8);
6620 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_id) == 12,
6621 OffsetOf_Uniform4fv_v_shm_id_not_12);
6622 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_offset) == 16,
6623 OffsetOf_Uniform4fv_v_shm_offset_not_16);
6625 struct Uniform4fvImmediate {
6626 typedef Uniform4fvImmediate ValueType;
6627 static const CommandId kCmdId = kUniform4fvImmediate;
6628 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6629 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6631 static uint32 ComputeDataSize(GLsizei count) {
6632 return static_cast<uint32>(sizeof(GLfloat) * 4 * count); // NOLINT
6635 static uint32 ComputeSize(GLsizei count) {
6636 return static_cast<uint32>(sizeof(ValueType) +
6637 ComputeDataSize(count)); // NOLINT
6640 void SetHeader(GLsizei count) {
6641 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6644 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
6645 SetHeader(_count);
6646 location = _location;
6647 count = _count;
6648 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6651 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
6652 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6653 const uint32 size = ComputeSize(_count);
6654 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6657 gpu::CommandHeader header;
6658 int32 location;
6659 int32 count;
6662 COMPILE_ASSERT(sizeof(Uniform4fvImmediate) == 12,
6663 Sizeof_Uniform4fvImmediate_is_not_12);
6664 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, header) == 0,
6665 OffsetOf_Uniform4fvImmediate_header_not_0);
6666 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, location) == 4,
6667 OffsetOf_Uniform4fvImmediate_location_not_4);
6668 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, count) == 8,
6669 OffsetOf_Uniform4fvImmediate_count_not_8);
6671 struct Uniform4i {
6672 typedef Uniform4i ValueType;
6673 static const CommandId kCmdId = kUniform4i;
6674 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6675 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6677 static uint32 ComputeSize() {
6678 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6681 void SetHeader() { header.SetCmd<ValueType>(); }
6683 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
6684 SetHeader();
6685 location = _location;
6686 x = _x;
6687 y = _y;
6688 z = _z;
6689 w = _w;
6692 void* Set(void* cmd,
6693 GLint _location,
6694 GLint _x,
6695 GLint _y,
6696 GLint _z,
6697 GLint _w) {
6698 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
6699 return NextCmdAddress<ValueType>(cmd);
6702 gpu::CommandHeader header;
6703 int32 location;
6704 int32 x;
6705 int32 y;
6706 int32 z;
6707 int32 w;
6710 COMPILE_ASSERT(sizeof(Uniform4i) == 24, Sizeof_Uniform4i_is_not_24);
6711 COMPILE_ASSERT(offsetof(Uniform4i, header) == 0,
6712 OffsetOf_Uniform4i_header_not_0);
6713 COMPILE_ASSERT(offsetof(Uniform4i, location) == 4,
6714 OffsetOf_Uniform4i_location_not_4);
6715 COMPILE_ASSERT(offsetof(Uniform4i, x) == 8, OffsetOf_Uniform4i_x_not_8);
6716 COMPILE_ASSERT(offsetof(Uniform4i, y) == 12, OffsetOf_Uniform4i_y_not_12);
6717 COMPILE_ASSERT(offsetof(Uniform4i, z) == 16, OffsetOf_Uniform4i_z_not_16);
6718 COMPILE_ASSERT(offsetof(Uniform4i, w) == 20, OffsetOf_Uniform4i_w_not_20);
6720 struct Uniform4iv {
6721 typedef Uniform4iv ValueType;
6722 static const CommandId kCmdId = kUniform4iv;
6723 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6724 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6726 static uint32 ComputeSize() {
6727 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6730 void SetHeader() { header.SetCmd<ValueType>(); }
6732 void Init(GLint _location,
6733 GLsizei _count,
6734 uint32 _v_shm_id,
6735 uint32 _v_shm_offset) {
6736 SetHeader();
6737 location = _location;
6738 count = _count;
6739 v_shm_id = _v_shm_id;
6740 v_shm_offset = _v_shm_offset;
6743 void* Set(void* cmd,
6744 GLint _location,
6745 GLsizei _count,
6746 uint32 _v_shm_id,
6747 uint32 _v_shm_offset) {
6748 static_cast<ValueType*>(cmd)
6749 ->Init(_location, _count, _v_shm_id, _v_shm_offset);
6750 return NextCmdAddress<ValueType>(cmd);
6753 gpu::CommandHeader header;
6754 int32 location;
6755 int32 count;
6756 uint32 v_shm_id;
6757 uint32 v_shm_offset;
6760 COMPILE_ASSERT(sizeof(Uniform4iv) == 20, Sizeof_Uniform4iv_is_not_20);
6761 COMPILE_ASSERT(offsetof(Uniform4iv, header) == 0,
6762 OffsetOf_Uniform4iv_header_not_0);
6763 COMPILE_ASSERT(offsetof(Uniform4iv, location) == 4,
6764 OffsetOf_Uniform4iv_location_not_4);
6765 COMPILE_ASSERT(offsetof(Uniform4iv, count) == 8,
6766 OffsetOf_Uniform4iv_count_not_8);
6767 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_id) == 12,
6768 OffsetOf_Uniform4iv_v_shm_id_not_12);
6769 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_offset) == 16,
6770 OffsetOf_Uniform4iv_v_shm_offset_not_16);
6772 struct Uniform4ivImmediate {
6773 typedef Uniform4ivImmediate ValueType;
6774 static const CommandId kCmdId = kUniform4ivImmediate;
6775 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6776 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6778 static uint32 ComputeDataSize(GLsizei count) {
6779 return static_cast<uint32>(sizeof(GLint) * 4 * count); // NOLINT
6782 static uint32 ComputeSize(GLsizei count) {
6783 return static_cast<uint32>(sizeof(ValueType) +
6784 ComputeDataSize(count)); // NOLINT
6787 void SetHeader(GLsizei count) {
6788 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6791 void Init(GLint _location, GLsizei _count, const GLint* _v) {
6792 SetHeader(_count);
6793 location = _location;
6794 count = _count;
6795 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
6798 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
6799 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
6800 const uint32 size = ComputeSize(_count);
6801 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6804 gpu::CommandHeader header;
6805 int32 location;
6806 int32 count;
6809 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12,
6810 Sizeof_Uniform4ivImmediate_is_not_12);
6811 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0,
6812 OffsetOf_Uniform4ivImmediate_header_not_0);
6813 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4,
6814 OffsetOf_Uniform4ivImmediate_location_not_4);
6815 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8,
6816 OffsetOf_Uniform4ivImmediate_count_not_8);
6818 struct UniformMatrix2fv {
6819 typedef UniformMatrix2fv ValueType;
6820 static const CommandId kCmdId = kUniformMatrix2fv;
6821 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6822 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6824 static uint32 ComputeSize() {
6825 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6828 void SetHeader() { header.SetCmd<ValueType>(); }
6830 void Init(GLint _location,
6831 GLsizei _count,
6832 GLboolean _transpose,
6833 uint32 _value_shm_id,
6834 uint32 _value_shm_offset) {
6835 SetHeader();
6836 location = _location;
6837 count = _count;
6838 transpose = _transpose;
6839 value_shm_id = _value_shm_id;
6840 value_shm_offset = _value_shm_offset;
6843 void* Set(void* cmd,
6844 GLint _location,
6845 GLsizei _count,
6846 GLboolean _transpose,
6847 uint32 _value_shm_id,
6848 uint32 _value_shm_offset) {
6849 static_cast<ValueType*>(cmd)
6850 ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset);
6851 return NextCmdAddress<ValueType>(cmd);
6854 gpu::CommandHeader header;
6855 int32 location;
6856 int32 count;
6857 uint32 transpose;
6858 uint32 value_shm_id;
6859 uint32 value_shm_offset;
6862 COMPILE_ASSERT(sizeof(UniformMatrix2fv) == 24,
6863 Sizeof_UniformMatrix2fv_is_not_24);
6864 COMPILE_ASSERT(offsetof(UniformMatrix2fv, header) == 0,
6865 OffsetOf_UniformMatrix2fv_header_not_0);
6866 COMPILE_ASSERT(offsetof(UniformMatrix2fv, location) == 4,
6867 OffsetOf_UniformMatrix2fv_location_not_4);
6868 COMPILE_ASSERT(offsetof(UniformMatrix2fv, count) == 8,
6869 OffsetOf_UniformMatrix2fv_count_not_8);
6870 COMPILE_ASSERT(offsetof(UniformMatrix2fv, transpose) == 12,
6871 OffsetOf_UniformMatrix2fv_transpose_not_12);
6872 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_id) == 16,
6873 OffsetOf_UniformMatrix2fv_value_shm_id_not_16);
6874 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_offset) == 20,
6875 OffsetOf_UniformMatrix2fv_value_shm_offset_not_20);
6877 struct UniformMatrix2fvImmediate {
6878 typedef UniformMatrix2fvImmediate ValueType;
6879 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
6880 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6881 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6883 static uint32 ComputeDataSize(GLsizei count) {
6884 return static_cast<uint32>(sizeof(GLfloat) * 4 * count); // NOLINT
6887 static uint32 ComputeSize(GLsizei count) {
6888 return static_cast<uint32>(sizeof(ValueType) +
6889 ComputeDataSize(count)); // NOLINT
6892 void SetHeader(GLsizei count) {
6893 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6896 void Init(GLint _location,
6897 GLsizei _count,
6898 GLboolean _transpose,
6899 const GLfloat* _value) {
6900 SetHeader(_count);
6901 location = _location;
6902 count = _count;
6903 transpose = _transpose;
6904 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
6907 void* Set(void* cmd,
6908 GLint _location,
6909 GLsizei _count,
6910 GLboolean _transpose,
6911 const GLfloat* _value) {
6912 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
6913 const uint32 size = ComputeSize(_count);
6914 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6917 gpu::CommandHeader header;
6918 int32 location;
6919 int32 count;
6920 uint32 transpose;
6923 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 16,
6924 Sizeof_UniformMatrix2fvImmediate_is_not_16);
6925 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0,
6926 OffsetOf_UniformMatrix2fvImmediate_header_not_0);
6927 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4,
6928 OffsetOf_UniformMatrix2fvImmediate_location_not_4);
6929 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8,
6930 OffsetOf_UniformMatrix2fvImmediate_count_not_8);
6931 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, transpose) == 12,
6932 OffsetOf_UniformMatrix2fvImmediate_transpose_not_12);
6934 struct UniformMatrix3fv {
6935 typedef UniformMatrix3fv ValueType;
6936 static const CommandId kCmdId = kUniformMatrix3fv;
6937 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6938 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6940 static uint32 ComputeSize() {
6941 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
6944 void SetHeader() { header.SetCmd<ValueType>(); }
6946 void Init(GLint _location,
6947 GLsizei _count,
6948 GLboolean _transpose,
6949 uint32 _value_shm_id,
6950 uint32 _value_shm_offset) {
6951 SetHeader();
6952 location = _location;
6953 count = _count;
6954 transpose = _transpose;
6955 value_shm_id = _value_shm_id;
6956 value_shm_offset = _value_shm_offset;
6959 void* Set(void* cmd,
6960 GLint _location,
6961 GLsizei _count,
6962 GLboolean _transpose,
6963 uint32 _value_shm_id,
6964 uint32 _value_shm_offset) {
6965 static_cast<ValueType*>(cmd)
6966 ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset);
6967 return NextCmdAddress<ValueType>(cmd);
6970 gpu::CommandHeader header;
6971 int32 location;
6972 int32 count;
6973 uint32 transpose;
6974 uint32 value_shm_id;
6975 uint32 value_shm_offset;
6978 COMPILE_ASSERT(sizeof(UniformMatrix3fv) == 24,
6979 Sizeof_UniformMatrix3fv_is_not_24);
6980 COMPILE_ASSERT(offsetof(UniformMatrix3fv, header) == 0,
6981 OffsetOf_UniformMatrix3fv_header_not_0);
6982 COMPILE_ASSERT(offsetof(UniformMatrix3fv, location) == 4,
6983 OffsetOf_UniformMatrix3fv_location_not_4);
6984 COMPILE_ASSERT(offsetof(UniformMatrix3fv, count) == 8,
6985 OffsetOf_UniformMatrix3fv_count_not_8);
6986 COMPILE_ASSERT(offsetof(UniformMatrix3fv, transpose) == 12,
6987 OffsetOf_UniformMatrix3fv_transpose_not_12);
6988 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_id) == 16,
6989 OffsetOf_UniformMatrix3fv_value_shm_id_not_16);
6990 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_offset) == 20,
6991 OffsetOf_UniformMatrix3fv_value_shm_offset_not_20);
6993 struct UniformMatrix3fvImmediate {
6994 typedef UniformMatrix3fvImmediate ValueType;
6995 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
6996 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6997 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6999 static uint32 ComputeDataSize(GLsizei count) {
7000 return static_cast<uint32>(sizeof(GLfloat) * 9 * count); // NOLINT
7003 static uint32 ComputeSize(GLsizei count) {
7004 return static_cast<uint32>(sizeof(ValueType) +
7005 ComputeDataSize(count)); // NOLINT
7008 void SetHeader(GLsizei count) {
7009 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7012 void Init(GLint _location,
7013 GLsizei _count,
7014 GLboolean _transpose,
7015 const GLfloat* _value) {
7016 SetHeader(_count);
7017 location = _location;
7018 count = _count;
7019 transpose = _transpose;
7020 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
7023 void* Set(void* cmd,
7024 GLint _location,
7025 GLsizei _count,
7026 GLboolean _transpose,
7027 const GLfloat* _value) {
7028 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
7029 const uint32 size = ComputeSize(_count);
7030 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7033 gpu::CommandHeader header;
7034 int32 location;
7035 int32 count;
7036 uint32 transpose;
7039 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 16,
7040 Sizeof_UniformMatrix3fvImmediate_is_not_16);
7041 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0,
7042 OffsetOf_UniformMatrix3fvImmediate_header_not_0);
7043 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4,
7044 OffsetOf_UniformMatrix3fvImmediate_location_not_4);
7045 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8,
7046 OffsetOf_UniformMatrix3fvImmediate_count_not_8);
7047 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, transpose) == 12,
7048 OffsetOf_UniformMatrix3fvImmediate_transpose_not_12);
7050 struct UniformMatrix4fv {
7051 typedef UniformMatrix4fv ValueType;
7052 static const CommandId kCmdId = kUniformMatrix4fv;
7053 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7054 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7056 static uint32 ComputeSize() {
7057 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7060 void SetHeader() { header.SetCmd<ValueType>(); }
7062 void Init(GLint _location,
7063 GLsizei _count,
7064 GLboolean _transpose,
7065 uint32 _value_shm_id,
7066 uint32 _value_shm_offset) {
7067 SetHeader();
7068 location = _location;
7069 count = _count;
7070 transpose = _transpose;
7071 value_shm_id = _value_shm_id;
7072 value_shm_offset = _value_shm_offset;
7075 void* Set(void* cmd,
7076 GLint _location,
7077 GLsizei _count,
7078 GLboolean _transpose,
7079 uint32 _value_shm_id,
7080 uint32 _value_shm_offset) {
7081 static_cast<ValueType*>(cmd)
7082 ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset);
7083 return NextCmdAddress<ValueType>(cmd);
7086 gpu::CommandHeader header;
7087 int32 location;
7088 int32 count;
7089 uint32 transpose;
7090 uint32 value_shm_id;
7091 uint32 value_shm_offset;
7094 COMPILE_ASSERT(sizeof(UniformMatrix4fv) == 24,
7095 Sizeof_UniformMatrix4fv_is_not_24);
7096 COMPILE_ASSERT(offsetof(UniformMatrix4fv, header) == 0,
7097 OffsetOf_UniformMatrix4fv_header_not_0);
7098 COMPILE_ASSERT(offsetof(UniformMatrix4fv, location) == 4,
7099 OffsetOf_UniformMatrix4fv_location_not_4);
7100 COMPILE_ASSERT(offsetof(UniformMatrix4fv, count) == 8,
7101 OffsetOf_UniformMatrix4fv_count_not_8);
7102 COMPILE_ASSERT(offsetof(UniformMatrix4fv, transpose) == 12,
7103 OffsetOf_UniformMatrix4fv_transpose_not_12);
7104 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_id) == 16,
7105 OffsetOf_UniformMatrix4fv_value_shm_id_not_16);
7106 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_offset) == 20,
7107 OffsetOf_UniformMatrix4fv_value_shm_offset_not_20);
7109 struct UniformMatrix4fvImmediate {
7110 typedef UniformMatrix4fvImmediate ValueType;
7111 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
7112 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7115 static uint32 ComputeDataSize(GLsizei count) {
7116 return static_cast<uint32>(sizeof(GLfloat) * 16 * count); // NOLINT
7119 static uint32 ComputeSize(GLsizei count) {
7120 return static_cast<uint32>(sizeof(ValueType) +
7121 ComputeDataSize(count)); // NOLINT
7124 void SetHeader(GLsizei count) {
7125 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7128 void Init(GLint _location,
7129 GLsizei _count,
7130 GLboolean _transpose,
7131 const GLfloat* _value) {
7132 SetHeader(_count);
7133 location = _location;
7134 count = _count;
7135 transpose = _transpose;
7136 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
7139 void* Set(void* cmd,
7140 GLint _location,
7141 GLsizei _count,
7142 GLboolean _transpose,
7143 const GLfloat* _value) {
7144 static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
7145 const uint32 size = ComputeSize(_count);
7146 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7149 gpu::CommandHeader header;
7150 int32 location;
7151 int32 count;
7152 uint32 transpose;
7155 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 16,
7156 Sizeof_UniformMatrix4fvImmediate_is_not_16);
7157 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0,
7158 OffsetOf_UniformMatrix4fvImmediate_header_not_0);
7159 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4,
7160 OffsetOf_UniformMatrix4fvImmediate_location_not_4);
7161 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8,
7162 OffsetOf_UniformMatrix4fvImmediate_count_not_8);
7163 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, transpose) == 12,
7164 OffsetOf_UniformMatrix4fvImmediate_transpose_not_12);
7166 struct UseProgram {
7167 typedef UseProgram ValueType;
7168 static const CommandId kCmdId = kUseProgram;
7169 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7170 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7172 static uint32 ComputeSize() {
7173 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7176 void SetHeader() { header.SetCmd<ValueType>(); }
7178 void Init(GLuint _program) {
7179 SetHeader();
7180 program = _program;
7183 void* Set(void* cmd, GLuint _program) {
7184 static_cast<ValueType*>(cmd)->Init(_program);
7185 return NextCmdAddress<ValueType>(cmd);
7188 gpu::CommandHeader header;
7189 uint32 program;
7192 COMPILE_ASSERT(sizeof(UseProgram) == 8, Sizeof_UseProgram_is_not_8);
7193 COMPILE_ASSERT(offsetof(UseProgram, header) == 0,
7194 OffsetOf_UseProgram_header_not_0);
7195 COMPILE_ASSERT(offsetof(UseProgram, program) == 4,
7196 OffsetOf_UseProgram_program_not_4);
7198 struct ValidateProgram {
7199 typedef ValidateProgram ValueType;
7200 static const CommandId kCmdId = kValidateProgram;
7201 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7202 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7204 static uint32 ComputeSize() {
7205 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7208 void SetHeader() { header.SetCmd<ValueType>(); }
7210 void Init(GLuint _program) {
7211 SetHeader();
7212 program = _program;
7215 void* Set(void* cmd, GLuint _program) {
7216 static_cast<ValueType*>(cmd)->Init(_program);
7217 return NextCmdAddress<ValueType>(cmd);
7220 gpu::CommandHeader header;
7221 uint32 program;
7224 COMPILE_ASSERT(sizeof(ValidateProgram) == 8, Sizeof_ValidateProgram_is_not_8);
7225 COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0,
7226 OffsetOf_ValidateProgram_header_not_0);
7227 COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4,
7228 OffsetOf_ValidateProgram_program_not_4);
7230 struct VertexAttrib1f {
7231 typedef VertexAttrib1f ValueType;
7232 static const CommandId kCmdId = kVertexAttrib1f;
7233 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7234 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7236 static uint32 ComputeSize() {
7237 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7240 void SetHeader() { header.SetCmd<ValueType>(); }
7242 void Init(GLuint _indx, GLfloat _x) {
7243 SetHeader();
7244 indx = _indx;
7245 x = _x;
7248 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
7249 static_cast<ValueType*>(cmd)->Init(_indx, _x);
7250 return NextCmdAddress<ValueType>(cmd);
7253 gpu::CommandHeader header;
7254 uint32 indx;
7255 float x;
7258 COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12, Sizeof_VertexAttrib1f_is_not_12);
7259 COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0,
7260 OffsetOf_VertexAttrib1f_header_not_0);
7261 COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4,
7262 OffsetOf_VertexAttrib1f_indx_not_4);
7263 COMPILE_ASSERT(offsetof(VertexAttrib1f, x) == 8,
7264 OffsetOf_VertexAttrib1f_x_not_8);
7266 struct VertexAttrib1fv {
7267 typedef VertexAttrib1fv ValueType;
7268 static const CommandId kCmdId = kVertexAttrib1fv;
7269 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7270 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7272 static uint32 ComputeSize() {
7273 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7276 void SetHeader() { header.SetCmd<ValueType>(); }
7278 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7279 SetHeader();
7280 indx = _indx;
7281 values_shm_id = _values_shm_id;
7282 values_shm_offset = _values_shm_offset;
7285 void* Set(void* cmd,
7286 GLuint _indx,
7287 uint32 _values_shm_id,
7288 uint32 _values_shm_offset) {
7289 static_cast<ValueType*>(cmd)
7290 ->Init(_indx, _values_shm_id, _values_shm_offset);
7291 return NextCmdAddress<ValueType>(cmd);
7294 gpu::CommandHeader header;
7295 uint32 indx;
7296 uint32 values_shm_id;
7297 uint32 values_shm_offset;
7300 COMPILE_ASSERT(sizeof(VertexAttrib1fv) == 16, Sizeof_VertexAttrib1fv_is_not_16);
7301 COMPILE_ASSERT(offsetof(VertexAttrib1fv, header) == 0,
7302 OffsetOf_VertexAttrib1fv_header_not_0);
7303 COMPILE_ASSERT(offsetof(VertexAttrib1fv, indx) == 4,
7304 OffsetOf_VertexAttrib1fv_indx_not_4);
7305 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_id) == 8,
7306 OffsetOf_VertexAttrib1fv_values_shm_id_not_8);
7307 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_offset) == 12,
7308 OffsetOf_VertexAttrib1fv_values_shm_offset_not_12);
7310 struct VertexAttrib1fvImmediate {
7311 typedef VertexAttrib1fvImmediate ValueType;
7312 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
7313 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7314 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7316 static uint32 ComputeDataSize() {
7317 return static_cast<uint32>(sizeof(GLfloat) * 1); // NOLINT
7320 static uint32 ComputeSize() {
7321 return static_cast<uint32>(sizeof(ValueType) +
7322 ComputeDataSize()); // NOLINT
7325 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7327 void Init(GLuint _indx, const GLfloat* _values) {
7328 SetHeader();
7329 indx = _indx;
7330 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
7333 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7334 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7335 const uint32 size = ComputeSize();
7336 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7339 gpu::CommandHeader header;
7340 uint32 indx;
7343 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate) == 8,
7344 Sizeof_VertexAttrib1fvImmediate_is_not_8);
7345 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, header) == 0,
7346 OffsetOf_VertexAttrib1fvImmediate_header_not_0);
7347 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, indx) == 4,
7348 OffsetOf_VertexAttrib1fvImmediate_indx_not_4);
7350 struct VertexAttrib2f {
7351 typedef VertexAttrib2f ValueType;
7352 static const CommandId kCmdId = kVertexAttrib2f;
7353 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7354 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7356 static uint32 ComputeSize() {
7357 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7360 void SetHeader() { header.SetCmd<ValueType>(); }
7362 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
7363 SetHeader();
7364 indx = _indx;
7365 x = _x;
7366 y = _y;
7369 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
7370 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
7371 return NextCmdAddress<ValueType>(cmd);
7374 gpu::CommandHeader header;
7375 uint32 indx;
7376 float x;
7377 float y;
7380 COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16, Sizeof_VertexAttrib2f_is_not_16);
7381 COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0,
7382 OffsetOf_VertexAttrib2f_header_not_0);
7383 COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4,
7384 OffsetOf_VertexAttrib2f_indx_not_4);
7385 COMPILE_ASSERT(offsetof(VertexAttrib2f, x) == 8,
7386 OffsetOf_VertexAttrib2f_x_not_8);
7387 COMPILE_ASSERT(offsetof(VertexAttrib2f, y) == 12,
7388 OffsetOf_VertexAttrib2f_y_not_12);
7390 struct VertexAttrib2fv {
7391 typedef VertexAttrib2fv ValueType;
7392 static const CommandId kCmdId = kVertexAttrib2fv;
7393 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7394 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7396 static uint32 ComputeSize() {
7397 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7400 void SetHeader() { header.SetCmd<ValueType>(); }
7402 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7403 SetHeader();
7404 indx = _indx;
7405 values_shm_id = _values_shm_id;
7406 values_shm_offset = _values_shm_offset;
7409 void* Set(void* cmd,
7410 GLuint _indx,
7411 uint32 _values_shm_id,
7412 uint32 _values_shm_offset) {
7413 static_cast<ValueType*>(cmd)
7414 ->Init(_indx, _values_shm_id, _values_shm_offset);
7415 return NextCmdAddress<ValueType>(cmd);
7418 gpu::CommandHeader header;
7419 uint32 indx;
7420 uint32 values_shm_id;
7421 uint32 values_shm_offset;
7424 COMPILE_ASSERT(sizeof(VertexAttrib2fv) == 16, Sizeof_VertexAttrib2fv_is_not_16);
7425 COMPILE_ASSERT(offsetof(VertexAttrib2fv, header) == 0,
7426 OffsetOf_VertexAttrib2fv_header_not_0);
7427 COMPILE_ASSERT(offsetof(VertexAttrib2fv, indx) == 4,
7428 OffsetOf_VertexAttrib2fv_indx_not_4);
7429 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_id) == 8,
7430 OffsetOf_VertexAttrib2fv_values_shm_id_not_8);
7431 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_offset) == 12,
7432 OffsetOf_VertexAttrib2fv_values_shm_offset_not_12);
7434 struct VertexAttrib2fvImmediate {
7435 typedef VertexAttrib2fvImmediate ValueType;
7436 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
7437 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7438 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7440 static uint32 ComputeDataSize() {
7441 return static_cast<uint32>(sizeof(GLfloat) * 2); // NOLINT
7444 static uint32 ComputeSize() {
7445 return static_cast<uint32>(sizeof(ValueType) +
7446 ComputeDataSize()); // NOLINT
7449 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7451 void Init(GLuint _indx, const GLfloat* _values) {
7452 SetHeader();
7453 indx = _indx;
7454 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
7457 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7458 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7459 const uint32 size = ComputeSize();
7460 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7463 gpu::CommandHeader header;
7464 uint32 indx;
7467 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate) == 8,
7468 Sizeof_VertexAttrib2fvImmediate_is_not_8);
7469 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, header) == 0,
7470 OffsetOf_VertexAttrib2fvImmediate_header_not_0);
7471 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, indx) == 4,
7472 OffsetOf_VertexAttrib2fvImmediate_indx_not_4);
7474 struct VertexAttrib3f {
7475 typedef VertexAttrib3f ValueType;
7476 static const CommandId kCmdId = kVertexAttrib3f;
7477 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7478 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7480 static uint32 ComputeSize() {
7481 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7484 void SetHeader() { header.SetCmd<ValueType>(); }
7486 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
7487 SetHeader();
7488 indx = _indx;
7489 x = _x;
7490 y = _y;
7491 z = _z;
7494 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
7495 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
7496 return NextCmdAddress<ValueType>(cmd);
7499 gpu::CommandHeader header;
7500 uint32 indx;
7501 float x;
7502 float y;
7503 float z;
7506 COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20, Sizeof_VertexAttrib3f_is_not_20);
7507 COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0,
7508 OffsetOf_VertexAttrib3f_header_not_0);
7509 COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4,
7510 OffsetOf_VertexAttrib3f_indx_not_4);
7511 COMPILE_ASSERT(offsetof(VertexAttrib3f, x) == 8,
7512 OffsetOf_VertexAttrib3f_x_not_8);
7513 COMPILE_ASSERT(offsetof(VertexAttrib3f, y) == 12,
7514 OffsetOf_VertexAttrib3f_y_not_12);
7515 COMPILE_ASSERT(offsetof(VertexAttrib3f, z) == 16,
7516 OffsetOf_VertexAttrib3f_z_not_16);
7518 struct VertexAttrib3fv {
7519 typedef VertexAttrib3fv ValueType;
7520 static const CommandId kCmdId = kVertexAttrib3fv;
7521 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7522 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7524 static uint32 ComputeSize() {
7525 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7528 void SetHeader() { header.SetCmd<ValueType>(); }
7530 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7531 SetHeader();
7532 indx = _indx;
7533 values_shm_id = _values_shm_id;
7534 values_shm_offset = _values_shm_offset;
7537 void* Set(void* cmd,
7538 GLuint _indx,
7539 uint32 _values_shm_id,
7540 uint32 _values_shm_offset) {
7541 static_cast<ValueType*>(cmd)
7542 ->Init(_indx, _values_shm_id, _values_shm_offset);
7543 return NextCmdAddress<ValueType>(cmd);
7546 gpu::CommandHeader header;
7547 uint32 indx;
7548 uint32 values_shm_id;
7549 uint32 values_shm_offset;
7552 COMPILE_ASSERT(sizeof(VertexAttrib3fv) == 16, Sizeof_VertexAttrib3fv_is_not_16);
7553 COMPILE_ASSERT(offsetof(VertexAttrib3fv, header) == 0,
7554 OffsetOf_VertexAttrib3fv_header_not_0);
7555 COMPILE_ASSERT(offsetof(VertexAttrib3fv, indx) == 4,
7556 OffsetOf_VertexAttrib3fv_indx_not_4);
7557 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_id) == 8,
7558 OffsetOf_VertexAttrib3fv_values_shm_id_not_8);
7559 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_offset) == 12,
7560 OffsetOf_VertexAttrib3fv_values_shm_offset_not_12);
7562 struct VertexAttrib3fvImmediate {
7563 typedef VertexAttrib3fvImmediate ValueType;
7564 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
7565 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7568 static uint32 ComputeDataSize() {
7569 return static_cast<uint32>(sizeof(GLfloat) * 3); // NOLINT
7572 static uint32 ComputeSize() {
7573 return static_cast<uint32>(sizeof(ValueType) +
7574 ComputeDataSize()); // NOLINT
7577 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7579 void Init(GLuint _indx, const GLfloat* _values) {
7580 SetHeader();
7581 indx = _indx;
7582 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
7585 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7586 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7587 const uint32 size = ComputeSize();
7588 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7591 gpu::CommandHeader header;
7592 uint32 indx;
7595 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate) == 8,
7596 Sizeof_VertexAttrib3fvImmediate_is_not_8);
7597 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, header) == 0,
7598 OffsetOf_VertexAttrib3fvImmediate_header_not_0);
7599 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, indx) == 4,
7600 OffsetOf_VertexAttrib3fvImmediate_indx_not_4);
7602 struct VertexAttrib4f {
7603 typedef VertexAttrib4f ValueType;
7604 static const CommandId kCmdId = kVertexAttrib4f;
7605 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7606 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7608 static uint32 ComputeSize() {
7609 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7612 void SetHeader() { header.SetCmd<ValueType>(); }
7614 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
7615 SetHeader();
7616 indx = _indx;
7617 x = _x;
7618 y = _y;
7619 z = _z;
7620 w = _w;
7623 void* Set(void* cmd,
7624 GLuint _indx,
7625 GLfloat _x,
7626 GLfloat _y,
7627 GLfloat _z,
7628 GLfloat _w) {
7629 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
7630 return NextCmdAddress<ValueType>(cmd);
7633 gpu::CommandHeader header;
7634 uint32 indx;
7635 float x;
7636 float y;
7637 float z;
7638 float w;
7641 COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24, Sizeof_VertexAttrib4f_is_not_24);
7642 COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0,
7643 OffsetOf_VertexAttrib4f_header_not_0);
7644 COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4,
7645 OffsetOf_VertexAttrib4f_indx_not_4);
7646 COMPILE_ASSERT(offsetof(VertexAttrib4f, x) == 8,
7647 OffsetOf_VertexAttrib4f_x_not_8);
7648 COMPILE_ASSERT(offsetof(VertexAttrib4f, y) == 12,
7649 OffsetOf_VertexAttrib4f_y_not_12);
7650 COMPILE_ASSERT(offsetof(VertexAttrib4f, z) == 16,
7651 OffsetOf_VertexAttrib4f_z_not_16);
7652 COMPILE_ASSERT(offsetof(VertexAttrib4f, w) == 20,
7653 OffsetOf_VertexAttrib4f_w_not_20);
7655 struct VertexAttrib4fv {
7656 typedef VertexAttrib4fv ValueType;
7657 static const CommandId kCmdId = kVertexAttrib4fv;
7658 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7659 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7661 static uint32 ComputeSize() {
7662 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7665 void SetHeader() { header.SetCmd<ValueType>(); }
7667 void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
7668 SetHeader();
7669 indx = _indx;
7670 values_shm_id = _values_shm_id;
7671 values_shm_offset = _values_shm_offset;
7674 void* Set(void* cmd,
7675 GLuint _indx,
7676 uint32 _values_shm_id,
7677 uint32 _values_shm_offset) {
7678 static_cast<ValueType*>(cmd)
7679 ->Init(_indx, _values_shm_id, _values_shm_offset);
7680 return NextCmdAddress<ValueType>(cmd);
7683 gpu::CommandHeader header;
7684 uint32 indx;
7685 uint32 values_shm_id;
7686 uint32 values_shm_offset;
7689 COMPILE_ASSERT(sizeof(VertexAttrib4fv) == 16, Sizeof_VertexAttrib4fv_is_not_16);
7690 COMPILE_ASSERT(offsetof(VertexAttrib4fv, header) == 0,
7691 OffsetOf_VertexAttrib4fv_header_not_0);
7692 COMPILE_ASSERT(offsetof(VertexAttrib4fv, indx) == 4,
7693 OffsetOf_VertexAttrib4fv_indx_not_4);
7694 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_id) == 8,
7695 OffsetOf_VertexAttrib4fv_values_shm_id_not_8);
7696 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_offset) == 12,
7697 OffsetOf_VertexAttrib4fv_values_shm_offset_not_12);
7699 struct VertexAttrib4fvImmediate {
7700 typedef VertexAttrib4fvImmediate ValueType;
7701 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
7702 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7703 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7705 static uint32 ComputeDataSize() {
7706 return static_cast<uint32>(sizeof(GLfloat) * 4); // NOLINT
7709 static uint32 ComputeSize() {
7710 return static_cast<uint32>(sizeof(ValueType) +
7711 ComputeDataSize()); // NOLINT
7714 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7716 void Init(GLuint _indx, const GLfloat* _values) {
7717 SetHeader();
7718 indx = _indx;
7719 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
7722 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
7723 static_cast<ValueType*>(cmd)->Init(_indx, _values);
7724 const uint32 size = ComputeSize();
7725 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7728 gpu::CommandHeader header;
7729 uint32 indx;
7732 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8,
7733 Sizeof_VertexAttrib4fvImmediate_is_not_8);
7734 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0,
7735 OffsetOf_VertexAttrib4fvImmediate_header_not_0);
7736 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4,
7737 OffsetOf_VertexAttrib4fvImmediate_indx_not_4);
7739 struct VertexAttribPointer {
7740 typedef VertexAttribPointer ValueType;
7741 static const CommandId kCmdId = kVertexAttribPointer;
7742 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7743 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7745 static uint32 ComputeSize() {
7746 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7749 void SetHeader() { header.SetCmd<ValueType>(); }
7751 void Init(GLuint _indx,
7752 GLint _size,
7753 GLenum _type,
7754 GLboolean _normalized,
7755 GLsizei _stride,
7756 GLuint _offset) {
7757 SetHeader();
7758 indx = _indx;
7759 size = _size;
7760 type = _type;
7761 normalized = _normalized;
7762 stride = _stride;
7763 offset = _offset;
7766 void* Set(void* cmd,
7767 GLuint _indx,
7768 GLint _size,
7769 GLenum _type,
7770 GLboolean _normalized,
7771 GLsizei _stride,
7772 GLuint _offset) {
7773 static_cast<ValueType*>(cmd)
7774 ->Init(_indx, _size, _type, _normalized, _stride, _offset);
7775 return NextCmdAddress<ValueType>(cmd);
7778 gpu::CommandHeader header;
7779 uint32 indx;
7780 int32 size;
7781 uint32 type;
7782 uint32 normalized;
7783 int32 stride;
7784 uint32 offset;
7787 COMPILE_ASSERT(sizeof(VertexAttribPointer) == 28,
7788 Sizeof_VertexAttribPointer_is_not_28);
7789 COMPILE_ASSERT(offsetof(VertexAttribPointer, header) == 0,
7790 OffsetOf_VertexAttribPointer_header_not_0);
7791 COMPILE_ASSERT(offsetof(VertexAttribPointer, indx) == 4,
7792 OffsetOf_VertexAttribPointer_indx_not_4);
7793 COMPILE_ASSERT(offsetof(VertexAttribPointer, size) == 8,
7794 OffsetOf_VertexAttribPointer_size_not_8);
7795 COMPILE_ASSERT(offsetof(VertexAttribPointer, type) == 12,
7796 OffsetOf_VertexAttribPointer_type_not_12);
7797 COMPILE_ASSERT(offsetof(VertexAttribPointer, normalized) == 16,
7798 OffsetOf_VertexAttribPointer_normalized_not_16);
7799 COMPILE_ASSERT(offsetof(VertexAttribPointer, stride) == 20,
7800 OffsetOf_VertexAttribPointer_stride_not_20);
7801 COMPILE_ASSERT(offsetof(VertexAttribPointer, offset) == 24,
7802 OffsetOf_VertexAttribPointer_offset_not_24);
7804 struct Viewport {
7805 typedef Viewport ValueType;
7806 static const CommandId kCmdId = kViewport;
7807 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7808 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7810 static uint32 ComputeSize() {
7811 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7814 void SetHeader() { header.SetCmd<ValueType>(); }
7816 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7817 SetHeader();
7818 x = _x;
7819 y = _y;
7820 width = _width;
7821 height = _height;
7824 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7825 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
7826 return NextCmdAddress<ValueType>(cmd);
7829 gpu::CommandHeader header;
7830 int32 x;
7831 int32 y;
7832 int32 width;
7833 int32 height;
7836 COMPILE_ASSERT(sizeof(Viewport) == 20, Sizeof_Viewport_is_not_20);
7837 COMPILE_ASSERT(offsetof(Viewport, header) == 0, OffsetOf_Viewport_header_not_0);
7838 COMPILE_ASSERT(offsetof(Viewport, x) == 4, OffsetOf_Viewport_x_not_4);
7839 COMPILE_ASSERT(offsetof(Viewport, y) == 8, OffsetOf_Viewport_y_not_8);
7840 COMPILE_ASSERT(offsetof(Viewport, width) == 12, OffsetOf_Viewport_width_not_12);
7841 COMPILE_ASSERT(offsetof(Viewport, height) == 16,
7842 OffsetOf_Viewport_height_not_16);
7844 struct BlitFramebufferCHROMIUM {
7845 typedef BlitFramebufferCHROMIUM ValueType;
7846 static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
7847 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
7850 static uint32 ComputeSize() {
7851 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7854 void SetHeader() { header.SetCmd<ValueType>(); }
7856 void Init(GLint _srcX0,
7857 GLint _srcY0,
7858 GLint _srcX1,
7859 GLint _srcY1,
7860 GLint _dstX0,
7861 GLint _dstY0,
7862 GLint _dstX1,
7863 GLint _dstY1,
7864 GLbitfield _mask,
7865 GLenum _filter) {
7866 SetHeader();
7867 srcX0 = _srcX0;
7868 srcY0 = _srcY0;
7869 srcX1 = _srcX1;
7870 srcY1 = _srcY1;
7871 dstX0 = _dstX0;
7872 dstY0 = _dstY0;
7873 dstX1 = _dstX1;
7874 dstY1 = _dstY1;
7875 mask = _mask;
7876 filter = _filter;
7879 void* Set(void* cmd,
7880 GLint _srcX0,
7881 GLint _srcY0,
7882 GLint _srcX1,
7883 GLint _srcY1,
7884 GLint _dstX0,
7885 GLint _dstY0,
7886 GLint _dstX1,
7887 GLint _dstY1,
7888 GLbitfield _mask,
7889 GLenum _filter) {
7890 static_cast<ValueType*>(cmd)->Init(_srcX0,
7891 _srcY0,
7892 _srcX1,
7893 _srcY1,
7894 _dstX0,
7895 _dstY0,
7896 _dstX1,
7897 _dstY1,
7898 _mask,
7899 _filter);
7900 return NextCmdAddress<ValueType>(cmd);
7903 gpu::CommandHeader header;
7904 int32 srcX0;
7905 int32 srcY0;
7906 int32 srcX1;
7907 int32 srcY1;
7908 int32 dstX0;
7909 int32 dstY0;
7910 int32 dstX1;
7911 int32 dstY1;
7912 uint32 mask;
7913 uint32 filter;
7916 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM) == 44,
7917 Sizeof_BlitFramebufferCHROMIUM_is_not_44);
7918 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, header) == 0,
7919 OffsetOf_BlitFramebufferCHROMIUM_header_not_0);
7920 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
7921 OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4);
7922 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
7923 OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8);
7924 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
7925 OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12);
7926 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
7927 OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16);
7928 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
7929 OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20);
7930 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
7931 OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24);
7932 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
7933 OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28);
7934 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
7935 OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32);
7936 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
7937 OffsetOf_BlitFramebufferCHROMIUM_mask_not_36);
7938 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
7939 OffsetOf_BlitFramebufferCHROMIUM_filter_not_40);
7941 // GL_CHROMIUM_framebuffer_multisample
7942 struct RenderbufferStorageMultisampleCHROMIUM {
7943 typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
7944 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
7945 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7946 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7948 static uint32 ComputeSize() {
7949 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
7952 void SetHeader() { header.SetCmd<ValueType>(); }
7954 void Init(GLenum _target,
7955 GLsizei _samples,
7956 GLenum _internalformat,
7957 GLsizei _width,
7958 GLsizei _height) {
7959 SetHeader();
7960 target = _target;
7961 samples = _samples;
7962 internalformat = _internalformat;
7963 width = _width;
7964 height = _height;
7967 void* Set(void* cmd,
7968 GLenum _target,
7969 GLsizei _samples,
7970 GLenum _internalformat,
7971 GLsizei _width,
7972 GLsizei _height) {
7973 static_cast<ValueType*>(cmd)
7974 ->Init(_target, _samples, _internalformat, _width, _height);
7975 return NextCmdAddress<ValueType>(cmd);
7978 gpu::CommandHeader header;
7979 uint32 target;
7980 int32 samples;
7981 uint32 internalformat;
7982 int32 width;
7983 int32 height;
7986 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
7987 Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24);
7988 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
7989 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0);
7990 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
7991 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4);
7992 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
7993 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8);
7994 COMPILE_ASSERT(
7995 offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12,
7996 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12); // NOLINT
7997 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
7998 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16);
7999 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
8000 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20);
8002 // GL_EXT_multisampled_render_to_texture
8003 struct RenderbufferStorageMultisampleEXT {
8004 typedef RenderbufferStorageMultisampleEXT ValueType;
8005 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
8006 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8007 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8009 static uint32 ComputeSize() {
8010 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8013 void SetHeader() { header.SetCmd<ValueType>(); }
8015 void Init(GLenum _target,
8016 GLsizei _samples,
8017 GLenum _internalformat,
8018 GLsizei _width,
8019 GLsizei _height) {
8020 SetHeader();
8021 target = _target;
8022 samples = _samples;
8023 internalformat = _internalformat;
8024 width = _width;
8025 height = _height;
8028 void* Set(void* cmd,
8029 GLenum _target,
8030 GLsizei _samples,
8031 GLenum _internalformat,
8032 GLsizei _width,
8033 GLsizei _height) {
8034 static_cast<ValueType*>(cmd)
8035 ->Init(_target, _samples, _internalformat, _width, _height);
8036 return NextCmdAddress<ValueType>(cmd);
8039 gpu::CommandHeader header;
8040 uint32 target;
8041 int32 samples;
8042 uint32 internalformat;
8043 int32 width;
8044 int32 height;
8047 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT) == 24,
8048 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24);
8049 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
8050 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0);
8051 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
8052 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4);
8053 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
8054 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8);
8055 COMPILE_ASSERT(
8056 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
8057 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12); // NOLINT
8058 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
8059 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16);
8060 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
8061 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20);
8063 struct FramebufferTexture2DMultisampleEXT {
8064 typedef FramebufferTexture2DMultisampleEXT ValueType;
8065 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
8066 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8067 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
8069 static uint32 ComputeSize() {
8070 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8073 void SetHeader() { header.SetCmd<ValueType>(); }
8075 void Init(GLenum _target,
8076 GLenum _attachment,
8077 GLenum _textarget,
8078 GLuint _texture,
8079 GLint _level,
8080 GLsizei _samples) {
8081 SetHeader();
8082 target = _target;
8083 attachment = _attachment;
8084 textarget = _textarget;
8085 texture = _texture;
8086 level = _level;
8087 samples = _samples;
8090 void* Set(void* cmd,
8091 GLenum _target,
8092 GLenum _attachment,
8093 GLenum _textarget,
8094 GLuint _texture,
8095 GLint _level,
8096 GLsizei _samples) {
8097 static_cast<ValueType*>(cmd)
8098 ->Init(_target, _attachment, _textarget, _texture, _level, _samples);
8099 return NextCmdAddress<ValueType>(cmd);
8102 gpu::CommandHeader header;
8103 uint32 target;
8104 uint32 attachment;
8105 uint32 textarget;
8106 uint32 texture;
8107 int32 level;
8108 int32 samples;
8111 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT) == 28,
8112 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_28);
8113 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
8114 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0);
8115 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
8116 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4);
8117 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
8118 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8);
8119 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
8120 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12);
8121 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
8122 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16);
8123 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, level) == 20,
8124 OffsetOf_FramebufferTexture2DMultisampleEXT_level_not_20);
8125 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, samples) == 24,
8126 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_24);
8128 struct TexStorage2DEXT {
8129 typedef TexStorage2DEXT ValueType;
8130 static const CommandId kCmdId = kTexStorage2DEXT;
8131 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8132 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8134 static uint32 ComputeSize() {
8135 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8138 void SetHeader() { header.SetCmd<ValueType>(); }
8140 void Init(GLenum _target,
8141 GLsizei _levels,
8142 GLenum _internalFormat,
8143 GLsizei _width,
8144 GLsizei _height) {
8145 SetHeader();
8146 target = _target;
8147 levels = _levels;
8148 internalFormat = _internalFormat;
8149 width = _width;
8150 height = _height;
8153 void* Set(void* cmd,
8154 GLenum _target,
8155 GLsizei _levels,
8156 GLenum _internalFormat,
8157 GLsizei _width,
8158 GLsizei _height) {
8159 static_cast<ValueType*>(cmd)
8160 ->Init(_target, _levels, _internalFormat, _width, _height);
8161 return NextCmdAddress<ValueType>(cmd);
8164 gpu::CommandHeader header;
8165 uint32 target;
8166 int32 levels;
8167 uint32 internalFormat;
8168 int32 width;
8169 int32 height;
8172 COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24, Sizeof_TexStorage2DEXT_is_not_24);
8173 COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0,
8174 OffsetOf_TexStorage2DEXT_header_not_0);
8175 COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4,
8176 OffsetOf_TexStorage2DEXT_target_not_4);
8177 COMPILE_ASSERT(offsetof(TexStorage2DEXT, levels) == 8,
8178 OffsetOf_TexStorage2DEXT_levels_not_8);
8179 COMPILE_ASSERT(offsetof(TexStorage2DEXT, internalFormat) == 12,
8180 OffsetOf_TexStorage2DEXT_internalFormat_not_12);
8181 COMPILE_ASSERT(offsetof(TexStorage2DEXT, width) == 16,
8182 OffsetOf_TexStorage2DEXT_width_not_16);
8183 COMPILE_ASSERT(offsetof(TexStorage2DEXT, height) == 20,
8184 OffsetOf_TexStorage2DEXT_height_not_20);
8186 struct GenQueriesEXT {
8187 typedef GenQueriesEXT ValueType;
8188 static const CommandId kCmdId = kGenQueriesEXT;
8189 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8190 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8192 static uint32 ComputeSize() {
8193 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8196 void SetHeader() { header.SetCmd<ValueType>(); }
8198 void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
8199 SetHeader();
8200 n = _n;
8201 queries_shm_id = _queries_shm_id;
8202 queries_shm_offset = _queries_shm_offset;
8205 void* Set(void* cmd,
8206 GLsizei _n,
8207 uint32 _queries_shm_id,
8208 uint32 _queries_shm_offset) {
8209 static_cast<ValueType*>(cmd)
8210 ->Init(_n, _queries_shm_id, _queries_shm_offset);
8211 return NextCmdAddress<ValueType>(cmd);
8214 gpu::CommandHeader header;
8215 int32 n;
8216 uint32 queries_shm_id;
8217 uint32 queries_shm_offset;
8220 COMPILE_ASSERT(sizeof(GenQueriesEXT) == 16, Sizeof_GenQueriesEXT_is_not_16);
8221 COMPILE_ASSERT(offsetof(GenQueriesEXT, header) == 0,
8222 OffsetOf_GenQueriesEXT_header_not_0);
8223 COMPILE_ASSERT(offsetof(GenQueriesEXT, n) == 4, OffsetOf_GenQueriesEXT_n_not_4);
8224 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_id) == 8,
8225 OffsetOf_GenQueriesEXT_queries_shm_id_not_8);
8226 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_offset) == 12,
8227 OffsetOf_GenQueriesEXT_queries_shm_offset_not_12);
8229 struct GenQueriesEXTImmediate {
8230 typedef GenQueriesEXTImmediate ValueType;
8231 static const CommandId kCmdId = kGenQueriesEXTImmediate;
8232 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8233 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8235 static uint32 ComputeDataSize(GLsizei n) {
8236 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8239 static uint32 ComputeSize(GLsizei n) {
8240 return static_cast<uint32>(sizeof(ValueType) +
8241 ComputeDataSize(n)); // NOLINT
8244 void SetHeader(GLsizei n) {
8245 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8248 void Init(GLsizei _n, GLuint* _queries) {
8249 SetHeader(_n);
8250 n = _n;
8251 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
8254 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
8255 static_cast<ValueType*>(cmd)->Init(_n, _queries);
8256 const uint32 size = ComputeSize(_n);
8257 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8260 gpu::CommandHeader header;
8261 int32 n;
8264 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate) == 8,
8265 Sizeof_GenQueriesEXTImmediate_is_not_8);
8266 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, header) == 0,
8267 OffsetOf_GenQueriesEXTImmediate_header_not_0);
8268 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, n) == 4,
8269 OffsetOf_GenQueriesEXTImmediate_n_not_4);
8271 struct DeleteQueriesEXT {
8272 typedef DeleteQueriesEXT ValueType;
8273 static const CommandId kCmdId = kDeleteQueriesEXT;
8274 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8277 static uint32 ComputeSize() {
8278 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8281 void SetHeader() { header.SetCmd<ValueType>(); }
8283 void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
8284 SetHeader();
8285 n = _n;
8286 queries_shm_id = _queries_shm_id;
8287 queries_shm_offset = _queries_shm_offset;
8290 void* Set(void* cmd,
8291 GLsizei _n,
8292 uint32 _queries_shm_id,
8293 uint32 _queries_shm_offset) {
8294 static_cast<ValueType*>(cmd)
8295 ->Init(_n, _queries_shm_id, _queries_shm_offset);
8296 return NextCmdAddress<ValueType>(cmd);
8299 gpu::CommandHeader header;
8300 int32 n;
8301 uint32 queries_shm_id;
8302 uint32 queries_shm_offset;
8305 COMPILE_ASSERT(sizeof(DeleteQueriesEXT) == 16,
8306 Sizeof_DeleteQueriesEXT_is_not_16);
8307 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, header) == 0,
8308 OffsetOf_DeleteQueriesEXT_header_not_0);
8309 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, n) == 4,
8310 OffsetOf_DeleteQueriesEXT_n_not_4);
8311 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_id) == 8,
8312 OffsetOf_DeleteQueriesEXT_queries_shm_id_not_8);
8313 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_offset) == 12,
8314 OffsetOf_DeleteQueriesEXT_queries_shm_offset_not_12);
8316 struct DeleteQueriesEXTImmediate {
8317 typedef DeleteQueriesEXTImmediate ValueType;
8318 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
8319 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8320 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8322 static uint32 ComputeDataSize(GLsizei n) {
8323 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8326 static uint32 ComputeSize(GLsizei n) {
8327 return static_cast<uint32>(sizeof(ValueType) +
8328 ComputeDataSize(n)); // NOLINT
8331 void SetHeader(GLsizei n) {
8332 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8335 void Init(GLsizei _n, const GLuint* _queries) {
8336 SetHeader(_n);
8337 n = _n;
8338 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
8341 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
8342 static_cast<ValueType*>(cmd)->Init(_n, _queries);
8343 const uint32 size = ComputeSize(_n);
8344 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8347 gpu::CommandHeader header;
8348 int32 n;
8351 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate) == 8,
8352 Sizeof_DeleteQueriesEXTImmediate_is_not_8);
8353 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, header) == 0,
8354 OffsetOf_DeleteQueriesEXTImmediate_header_not_0);
8355 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, n) == 4,
8356 OffsetOf_DeleteQueriesEXTImmediate_n_not_4);
8358 struct BeginQueryEXT {
8359 typedef BeginQueryEXT ValueType;
8360 static const CommandId kCmdId = kBeginQueryEXT;
8361 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8362 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8364 static uint32 ComputeSize() {
8365 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8368 void SetHeader() { header.SetCmd<ValueType>(); }
8370 void Init(GLenum _target,
8371 GLuint _id,
8372 uint32 _sync_data_shm_id,
8373 uint32 _sync_data_shm_offset) {
8374 SetHeader();
8375 target = _target;
8376 id = _id;
8377 sync_data_shm_id = _sync_data_shm_id;
8378 sync_data_shm_offset = _sync_data_shm_offset;
8381 void* Set(void* cmd,
8382 GLenum _target,
8383 GLuint _id,
8384 uint32 _sync_data_shm_id,
8385 uint32 _sync_data_shm_offset) {
8386 static_cast<ValueType*>(cmd)
8387 ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
8388 return NextCmdAddress<ValueType>(cmd);
8391 gpu::CommandHeader header;
8392 uint32 target;
8393 uint32 id;
8394 uint32 sync_data_shm_id;
8395 uint32 sync_data_shm_offset;
8398 COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20, Sizeof_BeginQueryEXT_is_not_20);
8399 COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0,
8400 OffsetOf_BeginQueryEXT_header_not_0);
8401 COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4,
8402 OffsetOf_BeginQueryEXT_target_not_4);
8403 COMPILE_ASSERT(offsetof(BeginQueryEXT, id) == 8,
8404 OffsetOf_BeginQueryEXT_id_not_8);
8405 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
8406 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12);
8407 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
8408 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16);
8410 struct EndQueryEXT {
8411 typedef EndQueryEXT ValueType;
8412 static const CommandId kCmdId = kEndQueryEXT;
8413 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8414 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8416 static uint32 ComputeSize() {
8417 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8420 void SetHeader() { header.SetCmd<ValueType>(); }
8422 void Init(GLenum _target, GLuint _submit_count) {
8423 SetHeader();
8424 target = _target;
8425 submit_count = _submit_count;
8428 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
8429 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
8430 return NextCmdAddress<ValueType>(cmd);
8433 gpu::CommandHeader header;
8434 uint32 target;
8435 uint32 submit_count;
8438 COMPILE_ASSERT(sizeof(EndQueryEXT) == 12, Sizeof_EndQueryEXT_is_not_12);
8439 COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0,
8440 OffsetOf_EndQueryEXT_header_not_0);
8441 COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4,
8442 OffsetOf_EndQueryEXT_target_not_4);
8443 COMPILE_ASSERT(offsetof(EndQueryEXT, submit_count) == 8,
8444 OffsetOf_EndQueryEXT_submit_count_not_8);
8446 struct InsertEventMarkerEXT {
8447 typedef InsertEventMarkerEXT ValueType;
8448 static const CommandId kCmdId = kInsertEventMarkerEXT;
8449 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8450 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8452 static uint32 ComputeSize() {
8453 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8456 void SetHeader() { header.SetCmd<ValueType>(); }
8458 void Init(GLuint _bucket_id) {
8459 SetHeader();
8460 bucket_id = _bucket_id;
8463 void* Set(void* cmd, GLuint _bucket_id) {
8464 static_cast<ValueType*>(cmd)->Init(_bucket_id);
8465 return NextCmdAddress<ValueType>(cmd);
8468 gpu::CommandHeader header;
8469 uint32 bucket_id;
8472 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT) == 8,
8473 Sizeof_InsertEventMarkerEXT_is_not_8);
8474 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, header) == 0,
8475 OffsetOf_InsertEventMarkerEXT_header_not_0);
8476 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
8477 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4);
8479 struct PushGroupMarkerEXT {
8480 typedef PushGroupMarkerEXT ValueType;
8481 static const CommandId kCmdId = kPushGroupMarkerEXT;
8482 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8483 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8485 static uint32 ComputeSize() {
8486 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8489 void SetHeader() { header.SetCmd<ValueType>(); }
8491 void Init(GLuint _bucket_id) {
8492 SetHeader();
8493 bucket_id = _bucket_id;
8496 void* Set(void* cmd, GLuint _bucket_id) {
8497 static_cast<ValueType*>(cmd)->Init(_bucket_id);
8498 return NextCmdAddress<ValueType>(cmd);
8501 gpu::CommandHeader header;
8502 uint32 bucket_id;
8505 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT) == 8,
8506 Sizeof_PushGroupMarkerEXT_is_not_8);
8507 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, header) == 0,
8508 OffsetOf_PushGroupMarkerEXT_header_not_0);
8509 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
8510 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4);
8512 struct PopGroupMarkerEXT {
8513 typedef PopGroupMarkerEXT ValueType;
8514 static const CommandId kCmdId = kPopGroupMarkerEXT;
8515 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8516 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8518 static uint32 ComputeSize() {
8519 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8522 void SetHeader() { header.SetCmd<ValueType>(); }
8524 void Init() { SetHeader(); }
8526 void* Set(void* cmd) {
8527 static_cast<ValueType*>(cmd)->Init();
8528 return NextCmdAddress<ValueType>(cmd);
8531 gpu::CommandHeader header;
8534 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT) == 4,
8535 Sizeof_PopGroupMarkerEXT_is_not_4);
8536 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT, header) == 0,
8537 OffsetOf_PopGroupMarkerEXT_header_not_0);
8539 struct GenVertexArraysOES {
8540 typedef GenVertexArraysOES ValueType;
8541 static const CommandId kCmdId = kGenVertexArraysOES;
8542 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8543 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8545 static uint32 ComputeSize() {
8546 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8549 void SetHeader() { header.SetCmd<ValueType>(); }
8551 void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
8552 SetHeader();
8553 n = _n;
8554 arrays_shm_id = _arrays_shm_id;
8555 arrays_shm_offset = _arrays_shm_offset;
8558 void* Set(void* cmd,
8559 GLsizei _n,
8560 uint32 _arrays_shm_id,
8561 uint32 _arrays_shm_offset) {
8562 static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
8563 return NextCmdAddress<ValueType>(cmd);
8566 gpu::CommandHeader header;
8567 int32 n;
8568 uint32 arrays_shm_id;
8569 uint32 arrays_shm_offset;
8572 COMPILE_ASSERT(sizeof(GenVertexArraysOES) == 16,
8573 Sizeof_GenVertexArraysOES_is_not_16);
8574 COMPILE_ASSERT(offsetof(GenVertexArraysOES, header) == 0,
8575 OffsetOf_GenVertexArraysOES_header_not_0);
8576 COMPILE_ASSERT(offsetof(GenVertexArraysOES, n) == 4,
8577 OffsetOf_GenVertexArraysOES_n_not_4);
8578 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_id) == 8,
8579 OffsetOf_GenVertexArraysOES_arrays_shm_id_not_8);
8580 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_offset) == 12,
8581 OffsetOf_GenVertexArraysOES_arrays_shm_offset_not_12);
8583 struct GenVertexArraysOESImmediate {
8584 typedef GenVertexArraysOESImmediate ValueType;
8585 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
8586 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8587 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8589 static uint32 ComputeDataSize(GLsizei n) {
8590 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8593 static uint32 ComputeSize(GLsizei n) {
8594 return static_cast<uint32>(sizeof(ValueType) +
8595 ComputeDataSize(n)); // NOLINT
8598 void SetHeader(GLsizei n) {
8599 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8602 void Init(GLsizei _n, GLuint* _arrays) {
8603 SetHeader(_n);
8604 n = _n;
8605 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
8608 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
8609 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
8610 const uint32 size = ComputeSize(_n);
8611 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8614 gpu::CommandHeader header;
8615 int32 n;
8618 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate) == 8,
8619 Sizeof_GenVertexArraysOESImmediate_is_not_8);
8620 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, header) == 0,
8621 OffsetOf_GenVertexArraysOESImmediate_header_not_0);
8622 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, n) == 4,
8623 OffsetOf_GenVertexArraysOESImmediate_n_not_4);
8625 struct DeleteVertexArraysOES {
8626 typedef DeleteVertexArraysOES ValueType;
8627 static const CommandId kCmdId = kDeleteVertexArraysOES;
8628 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8629 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8631 static uint32 ComputeSize() {
8632 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8635 void SetHeader() { header.SetCmd<ValueType>(); }
8637 void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
8638 SetHeader();
8639 n = _n;
8640 arrays_shm_id = _arrays_shm_id;
8641 arrays_shm_offset = _arrays_shm_offset;
8644 void* Set(void* cmd,
8645 GLsizei _n,
8646 uint32 _arrays_shm_id,
8647 uint32 _arrays_shm_offset) {
8648 static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
8649 return NextCmdAddress<ValueType>(cmd);
8652 gpu::CommandHeader header;
8653 int32 n;
8654 uint32 arrays_shm_id;
8655 uint32 arrays_shm_offset;
8658 COMPILE_ASSERT(sizeof(DeleteVertexArraysOES) == 16,
8659 Sizeof_DeleteVertexArraysOES_is_not_16);
8660 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, header) == 0,
8661 OffsetOf_DeleteVertexArraysOES_header_not_0);
8662 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, n) == 4,
8663 OffsetOf_DeleteVertexArraysOES_n_not_4);
8664 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_id) == 8,
8665 OffsetOf_DeleteVertexArraysOES_arrays_shm_id_not_8);
8666 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_offset) == 12,
8667 OffsetOf_DeleteVertexArraysOES_arrays_shm_offset_not_12);
8669 struct DeleteVertexArraysOESImmediate {
8670 typedef DeleteVertexArraysOESImmediate ValueType;
8671 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
8672 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8673 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8675 static uint32 ComputeDataSize(GLsizei n) {
8676 return static_cast<uint32>(sizeof(GLuint) * n); // NOLINT
8679 static uint32 ComputeSize(GLsizei n) {
8680 return static_cast<uint32>(sizeof(ValueType) +
8681 ComputeDataSize(n)); // NOLINT
8684 void SetHeader(GLsizei n) {
8685 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8688 void Init(GLsizei _n, const GLuint* _arrays) {
8689 SetHeader(_n);
8690 n = _n;
8691 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
8694 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
8695 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
8696 const uint32 size = ComputeSize(_n);
8697 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8700 gpu::CommandHeader header;
8701 int32 n;
8704 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate) == 8,
8705 Sizeof_DeleteVertexArraysOESImmediate_is_not_8);
8706 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
8707 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0);
8708 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
8709 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4);
8711 struct IsVertexArrayOES {
8712 typedef IsVertexArrayOES ValueType;
8713 static const CommandId kCmdId = kIsVertexArrayOES;
8714 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8715 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8717 typedef uint32 Result;
8719 static uint32 ComputeSize() {
8720 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8723 void SetHeader() { header.SetCmd<ValueType>(); }
8725 void Init(GLuint _array, uint32 _result_shm_id, uint32 _result_shm_offset) {
8726 SetHeader();
8727 array = _array;
8728 result_shm_id = _result_shm_id;
8729 result_shm_offset = _result_shm_offset;
8732 void* Set(void* cmd,
8733 GLuint _array,
8734 uint32 _result_shm_id,
8735 uint32 _result_shm_offset) {
8736 static_cast<ValueType*>(cmd)
8737 ->Init(_array, _result_shm_id, _result_shm_offset);
8738 return NextCmdAddress<ValueType>(cmd);
8741 gpu::CommandHeader header;
8742 uint32 array;
8743 uint32 result_shm_id;
8744 uint32 result_shm_offset;
8747 COMPILE_ASSERT(sizeof(IsVertexArrayOES) == 16,
8748 Sizeof_IsVertexArrayOES_is_not_16);
8749 COMPILE_ASSERT(offsetof(IsVertexArrayOES, header) == 0,
8750 OffsetOf_IsVertexArrayOES_header_not_0);
8751 COMPILE_ASSERT(offsetof(IsVertexArrayOES, array) == 4,
8752 OffsetOf_IsVertexArrayOES_array_not_4);
8753 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_id) == 8,
8754 OffsetOf_IsVertexArrayOES_result_shm_id_not_8);
8755 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
8756 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12);
8758 struct BindVertexArrayOES {
8759 typedef BindVertexArrayOES ValueType;
8760 static const CommandId kCmdId = kBindVertexArrayOES;
8761 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8762 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8764 static uint32 ComputeSize() {
8765 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8768 void SetHeader() { header.SetCmd<ValueType>(); }
8770 void Init(GLuint _array) {
8771 SetHeader();
8772 array = _array;
8775 void* Set(void* cmd, GLuint _array) {
8776 static_cast<ValueType*>(cmd)->Init(_array);
8777 return NextCmdAddress<ValueType>(cmd);
8780 gpu::CommandHeader header;
8781 uint32 array;
8784 COMPILE_ASSERT(sizeof(BindVertexArrayOES) == 8,
8785 Sizeof_BindVertexArrayOES_is_not_8);
8786 COMPILE_ASSERT(offsetof(BindVertexArrayOES, header) == 0,
8787 OffsetOf_BindVertexArrayOES_header_not_0);
8788 COMPILE_ASSERT(offsetof(BindVertexArrayOES, array) == 4,
8789 OffsetOf_BindVertexArrayOES_array_not_4);
8791 struct SwapBuffers {
8792 typedef SwapBuffers ValueType;
8793 static const CommandId kCmdId = kSwapBuffers;
8794 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8795 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
8797 static uint32 ComputeSize() {
8798 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8801 void SetHeader() { header.SetCmd<ValueType>(); }
8803 void Init() { SetHeader(); }
8805 void* Set(void* cmd) {
8806 static_cast<ValueType*>(cmd)->Init();
8807 return NextCmdAddress<ValueType>(cmd);
8810 gpu::CommandHeader header;
8813 COMPILE_ASSERT(sizeof(SwapBuffers) == 4, Sizeof_SwapBuffers_is_not_4);
8814 COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0,
8815 OffsetOf_SwapBuffers_header_not_0);
8817 struct GetMaxValueInBufferCHROMIUM {
8818 typedef GetMaxValueInBufferCHROMIUM ValueType;
8819 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
8820 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8821 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8823 typedef GLuint Result;
8825 static uint32 ComputeSize() {
8826 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8829 void SetHeader() { header.SetCmd<ValueType>(); }
8831 void Init(GLuint _buffer_id,
8832 GLsizei _count,
8833 GLenum _type,
8834 GLuint _offset,
8835 uint32 _result_shm_id,
8836 uint32 _result_shm_offset) {
8837 SetHeader();
8838 buffer_id = _buffer_id;
8839 count = _count;
8840 type = _type;
8841 offset = _offset;
8842 result_shm_id = _result_shm_id;
8843 result_shm_offset = _result_shm_offset;
8846 void* Set(void* cmd,
8847 GLuint _buffer_id,
8848 GLsizei _count,
8849 GLenum _type,
8850 GLuint _offset,
8851 uint32 _result_shm_id,
8852 uint32 _result_shm_offset) {
8853 static_cast<ValueType*>(cmd)->Init(
8854 _buffer_id, _count, _type, _offset, _result_shm_id, _result_shm_offset);
8855 return NextCmdAddress<ValueType>(cmd);
8858 gpu::CommandHeader header;
8859 uint32 buffer_id;
8860 int32 count;
8861 uint32 type;
8862 uint32 offset;
8863 uint32 result_shm_id;
8864 uint32 result_shm_offset;
8867 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
8868 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28);
8869 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
8870 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0);
8871 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
8872 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4);
8873 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
8874 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8);
8875 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
8876 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12);
8877 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
8878 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16);
8879 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
8880 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20);
8881 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
8882 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24);
8884 struct GenSharedIdsCHROMIUM {
8885 typedef GenSharedIdsCHROMIUM ValueType;
8886 static const CommandId kCmdId = kGenSharedIdsCHROMIUM;
8887 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8888 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8890 static uint32 ComputeSize() {
8891 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8894 void SetHeader() { header.SetCmd<ValueType>(); }
8896 void Init(GLuint _namespace_id,
8897 GLuint _id_offset,
8898 GLsizei _n,
8899 uint32 _ids_shm_id,
8900 uint32 _ids_shm_offset) {
8901 SetHeader();
8902 namespace_id = _namespace_id;
8903 id_offset = _id_offset;
8904 n = _n;
8905 ids_shm_id = _ids_shm_id;
8906 ids_shm_offset = _ids_shm_offset;
8909 void* Set(void* cmd,
8910 GLuint _namespace_id,
8911 GLuint _id_offset,
8912 GLsizei _n,
8913 uint32 _ids_shm_id,
8914 uint32 _ids_shm_offset) {
8915 static_cast<ValueType*>(cmd)
8916 ->Init(_namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset);
8917 return NextCmdAddress<ValueType>(cmd);
8920 gpu::CommandHeader header;
8921 uint32 namespace_id;
8922 uint32 id_offset;
8923 int32 n;
8924 uint32 ids_shm_id;
8925 uint32 ids_shm_offset;
8928 COMPILE_ASSERT(sizeof(GenSharedIdsCHROMIUM) == 24,
8929 Sizeof_GenSharedIdsCHROMIUM_is_not_24);
8930 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, header) == 0,
8931 OffsetOf_GenSharedIdsCHROMIUM_header_not_0);
8932 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, namespace_id) == 4,
8933 OffsetOf_GenSharedIdsCHROMIUM_namespace_id_not_4);
8934 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, id_offset) == 8,
8935 OffsetOf_GenSharedIdsCHROMIUM_id_offset_not_8);
8936 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, n) == 12,
8937 OffsetOf_GenSharedIdsCHROMIUM_n_not_12);
8938 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_id) == 16,
8939 OffsetOf_GenSharedIdsCHROMIUM_ids_shm_id_not_16);
8940 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_offset) == 20,
8941 OffsetOf_GenSharedIdsCHROMIUM_ids_shm_offset_not_20);
8943 struct DeleteSharedIdsCHROMIUM {
8944 typedef DeleteSharedIdsCHROMIUM ValueType;
8945 static const CommandId kCmdId = kDeleteSharedIdsCHROMIUM;
8946 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8947 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8949 static uint32 ComputeSize() {
8950 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
8953 void SetHeader() { header.SetCmd<ValueType>(); }
8955 void Init(GLuint _namespace_id,
8956 GLsizei _n,
8957 uint32 _ids_shm_id,
8958 uint32 _ids_shm_offset) {
8959 SetHeader();
8960 namespace_id = _namespace_id;
8961 n = _n;
8962 ids_shm_id = _ids_shm_id;
8963 ids_shm_offset = _ids_shm_offset;
8966 void* Set(void* cmd,
8967 GLuint _namespace_id,
8968 GLsizei _n,
8969 uint32 _ids_shm_id,
8970 uint32 _ids_shm_offset) {
8971 static_cast<ValueType*>(cmd)
8972 ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
8973 return NextCmdAddress<ValueType>(cmd);
8976 gpu::CommandHeader header;
8977 uint32 namespace_id;
8978 int32 n;
8979 uint32 ids_shm_id;
8980 uint32 ids_shm_offset;
8983 COMPILE_ASSERT(sizeof(DeleteSharedIdsCHROMIUM) == 20,
8984 Sizeof_DeleteSharedIdsCHROMIUM_is_not_20);
8985 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, header) == 0,
8986 OffsetOf_DeleteSharedIdsCHROMIUM_header_not_0);
8987 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, namespace_id) == 4,
8988 OffsetOf_DeleteSharedIdsCHROMIUM_namespace_id_not_4);
8989 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, n) == 8,
8990 OffsetOf_DeleteSharedIdsCHROMIUM_n_not_8);
8991 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_id) == 12,
8992 OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_id_not_12);
8993 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_offset) == 16,
8994 OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_offset_not_16);
8996 struct RegisterSharedIdsCHROMIUM {
8997 typedef RegisterSharedIdsCHROMIUM ValueType;
8998 static const CommandId kCmdId = kRegisterSharedIdsCHROMIUM;
8999 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9002 static uint32 ComputeSize() {
9003 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9006 void SetHeader() { header.SetCmd<ValueType>(); }
9008 void Init(GLuint _namespace_id,
9009 GLsizei _n,
9010 uint32 _ids_shm_id,
9011 uint32 _ids_shm_offset) {
9012 SetHeader();
9013 namespace_id = _namespace_id;
9014 n = _n;
9015 ids_shm_id = _ids_shm_id;
9016 ids_shm_offset = _ids_shm_offset;
9019 void* Set(void* cmd,
9020 GLuint _namespace_id,
9021 GLsizei _n,
9022 uint32 _ids_shm_id,
9023 uint32 _ids_shm_offset) {
9024 static_cast<ValueType*>(cmd)
9025 ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
9026 return NextCmdAddress<ValueType>(cmd);
9029 gpu::CommandHeader header;
9030 uint32 namespace_id;
9031 int32 n;
9032 uint32 ids_shm_id;
9033 uint32 ids_shm_offset;
9036 COMPILE_ASSERT(sizeof(RegisterSharedIdsCHROMIUM) == 20,
9037 Sizeof_RegisterSharedIdsCHROMIUM_is_not_20);
9038 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, header) == 0,
9039 OffsetOf_RegisterSharedIdsCHROMIUM_header_not_0);
9040 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, namespace_id) == 4,
9041 OffsetOf_RegisterSharedIdsCHROMIUM_namespace_id_not_4);
9042 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, n) == 8,
9043 OffsetOf_RegisterSharedIdsCHROMIUM_n_not_8);
9044 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_id) == 12,
9045 OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_id_not_12);
9046 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_offset) == 16,
9047 OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_offset_not_16);
9049 struct EnableFeatureCHROMIUM {
9050 typedef EnableFeatureCHROMIUM ValueType;
9051 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
9052 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9053 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9055 typedef GLint Result;
9057 static uint32 ComputeSize() {
9058 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9061 void SetHeader() { header.SetCmd<ValueType>(); }
9063 void Init(GLuint _bucket_id,
9064 uint32 _result_shm_id,
9065 uint32 _result_shm_offset) {
9066 SetHeader();
9067 bucket_id = _bucket_id;
9068 result_shm_id = _result_shm_id;
9069 result_shm_offset = _result_shm_offset;
9072 void* Set(void* cmd,
9073 GLuint _bucket_id,
9074 uint32 _result_shm_id,
9075 uint32 _result_shm_offset) {
9076 static_cast<ValueType*>(cmd)
9077 ->Init(_bucket_id, _result_shm_id, _result_shm_offset);
9078 return NextCmdAddress<ValueType>(cmd);
9081 gpu::CommandHeader header;
9082 uint32 bucket_id;
9083 uint32 result_shm_id;
9084 uint32 result_shm_offset;
9087 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16,
9088 Sizeof_EnableFeatureCHROMIUM_is_not_16);
9089 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0,
9090 OffsetOf_EnableFeatureCHROMIUM_header_not_0);
9091 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
9092 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4);
9093 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
9094 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8);
9095 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
9096 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12);
9098 struct ResizeCHROMIUM {
9099 typedef ResizeCHROMIUM ValueType;
9100 static const CommandId kCmdId = kResizeCHROMIUM;
9101 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9102 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9104 static uint32 ComputeSize() {
9105 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9108 void SetHeader() { header.SetCmd<ValueType>(); }
9110 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
9111 SetHeader();
9112 width = _width;
9113 height = _height;
9114 scale_factor = _scale_factor;
9117 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
9118 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
9119 return NextCmdAddress<ValueType>(cmd);
9122 gpu::CommandHeader header;
9123 uint32 width;
9124 uint32 height;
9125 float scale_factor;
9128 COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16, Sizeof_ResizeCHROMIUM_is_not_16);
9129 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0,
9130 OffsetOf_ResizeCHROMIUM_header_not_0);
9131 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4,
9132 OffsetOf_ResizeCHROMIUM_width_not_4);
9133 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, height) == 8,
9134 OffsetOf_ResizeCHROMIUM_height_not_8);
9135 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, scale_factor) == 12,
9136 OffsetOf_ResizeCHROMIUM_scale_factor_not_12);
9138 struct GetRequestableExtensionsCHROMIUM {
9139 typedef GetRequestableExtensionsCHROMIUM ValueType;
9140 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
9141 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9142 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9144 static uint32 ComputeSize() {
9145 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9148 void SetHeader() { header.SetCmd<ValueType>(); }
9150 void Init(uint32 _bucket_id) {
9151 SetHeader();
9152 bucket_id = _bucket_id;
9155 void* Set(void* cmd, uint32 _bucket_id) {
9156 static_cast<ValueType*>(cmd)->Init(_bucket_id);
9157 return NextCmdAddress<ValueType>(cmd);
9160 gpu::CommandHeader header;
9161 uint32 bucket_id;
9164 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
9165 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8);
9166 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
9167 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0);
9168 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
9169 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4);
9171 struct RequestExtensionCHROMIUM {
9172 typedef RequestExtensionCHROMIUM ValueType;
9173 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
9174 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9177 static uint32 ComputeSize() {
9178 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9181 void SetHeader() { header.SetCmd<ValueType>(); }
9183 void Init(uint32 _bucket_id) {
9184 SetHeader();
9185 bucket_id = _bucket_id;
9188 void* Set(void* cmd, uint32 _bucket_id) {
9189 static_cast<ValueType*>(cmd)->Init(_bucket_id);
9190 return NextCmdAddress<ValueType>(cmd);
9193 gpu::CommandHeader header;
9194 uint32 bucket_id;
9197 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM) == 8,
9198 Sizeof_RequestExtensionCHROMIUM_is_not_8);
9199 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0,
9200 OffsetOf_RequestExtensionCHROMIUM_header_not_0);
9201 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
9202 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4);
9204 struct GetMultipleIntegervCHROMIUM {
9205 typedef GetMultipleIntegervCHROMIUM ValueType;
9206 static const CommandId kCmdId = kGetMultipleIntegervCHROMIUM;
9207 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9208 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9210 static uint32 ComputeSize() {
9211 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9214 void SetHeader() { header.SetCmd<ValueType>(); }
9216 void Init(uint32 _pnames_shm_id,
9217 uint32 _pnames_shm_offset,
9218 GLuint _count,
9219 uint32 _results_shm_id,
9220 uint32 _results_shm_offset,
9221 GLsizeiptr _size) {
9222 SetHeader();
9223 pnames_shm_id = _pnames_shm_id;
9224 pnames_shm_offset = _pnames_shm_offset;
9225 count = _count;
9226 results_shm_id = _results_shm_id;
9227 results_shm_offset = _results_shm_offset;
9228 size = _size;
9231 void* Set(void* cmd,
9232 uint32 _pnames_shm_id,
9233 uint32 _pnames_shm_offset,
9234 GLuint _count,
9235 uint32 _results_shm_id,
9236 uint32 _results_shm_offset,
9237 GLsizeiptr _size) {
9238 static_cast<ValueType*>(cmd)->Init(_pnames_shm_id,
9239 _pnames_shm_offset,
9240 _count,
9241 _results_shm_id,
9242 _results_shm_offset,
9243 _size);
9244 return NextCmdAddress<ValueType>(cmd);
9247 gpu::CommandHeader header;
9248 uint32 pnames_shm_id;
9249 uint32 pnames_shm_offset;
9250 uint32 count;
9251 uint32 results_shm_id;
9252 uint32 results_shm_offset;
9253 int32 size;
9256 COMPILE_ASSERT(sizeof(GetMultipleIntegervCHROMIUM) == 28,
9257 Sizeof_GetMultipleIntegervCHROMIUM_is_not_28);
9258 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, header) == 0,
9259 OffsetOf_GetMultipleIntegervCHROMIUM_header_not_0);
9260 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_id) == 4,
9261 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_id_not_4);
9262 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_offset) == 8,
9263 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_offset_not_8);
9264 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, count) == 12,
9265 OffsetOf_GetMultipleIntegervCHROMIUM_count_not_12);
9266 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_id) == 16,
9267 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_id_not_16);
9268 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_offset) == 20,
9269 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_offset_not_20);
9270 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, size) == 24,
9271 OffsetOf_GetMultipleIntegervCHROMIUM_size_not_24);
9273 struct GetProgramInfoCHROMIUM {
9274 typedef GetProgramInfoCHROMIUM ValueType;
9275 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
9276 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9277 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9279 struct Result {
9280 uint32 link_status;
9281 uint32 num_attribs;
9282 uint32 num_uniforms;
9285 static uint32 ComputeSize() {
9286 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9289 void SetHeader() { header.SetCmd<ValueType>(); }
9291 void Init(GLuint _program, uint32 _bucket_id) {
9292 SetHeader();
9293 program = _program;
9294 bucket_id = _bucket_id;
9297 void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
9298 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
9299 return NextCmdAddress<ValueType>(cmd);
9302 gpu::CommandHeader header;
9303 uint32 program;
9304 uint32 bucket_id;
9307 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM) == 12,
9308 Sizeof_GetProgramInfoCHROMIUM_is_not_12);
9309 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, header) == 0,
9310 OffsetOf_GetProgramInfoCHROMIUM_header_not_0);
9311 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, program) == 4,
9312 OffsetOf_GetProgramInfoCHROMIUM_program_not_4);
9313 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
9314 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8);
9315 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
9316 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0);
9317 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
9318 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4);
9319 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
9320 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8);
9322 struct GetTranslatedShaderSourceANGLE {
9323 typedef GetTranslatedShaderSourceANGLE ValueType;
9324 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
9325 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9326 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9328 static uint32 ComputeSize() {
9329 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9332 void SetHeader() { header.SetCmd<ValueType>(); }
9334 void Init(GLuint _shader, uint32 _bucket_id) {
9335 SetHeader();
9336 shader = _shader;
9337 bucket_id = _bucket_id;
9340 void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
9341 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
9342 return NextCmdAddress<ValueType>(cmd);
9345 gpu::CommandHeader header;
9346 uint32 shader;
9347 uint32 bucket_id;
9350 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE) == 12,
9351 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12);
9352 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
9353 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0);
9354 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
9355 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4);
9356 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
9357 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8);
9359 struct PostSubBufferCHROMIUM {
9360 typedef PostSubBufferCHROMIUM ValueType;
9361 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
9362 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9363 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9365 static uint32 ComputeSize() {
9366 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9369 void SetHeader() { header.SetCmd<ValueType>(); }
9371 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
9372 SetHeader();
9373 x = _x;
9374 y = _y;
9375 width = _width;
9376 height = _height;
9379 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
9380 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
9381 return NextCmdAddress<ValueType>(cmd);
9384 gpu::CommandHeader header;
9385 int32 x;
9386 int32 y;
9387 int32 width;
9388 int32 height;
9391 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM) == 20,
9392 Sizeof_PostSubBufferCHROMIUM_is_not_20);
9393 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, header) == 0,
9394 OffsetOf_PostSubBufferCHROMIUM_header_not_0);
9395 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4,
9396 OffsetOf_PostSubBufferCHROMIUM_x_not_4);
9397 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8,
9398 OffsetOf_PostSubBufferCHROMIUM_y_not_8);
9399 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12,
9400 OffsetOf_PostSubBufferCHROMIUM_width_not_12);
9401 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
9402 OffsetOf_PostSubBufferCHROMIUM_height_not_16);
9404 struct TexImageIOSurface2DCHROMIUM {
9405 typedef TexImageIOSurface2DCHROMIUM ValueType;
9406 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
9407 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9408 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9410 static uint32 ComputeSize() {
9411 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9414 void SetHeader() { header.SetCmd<ValueType>(); }
9416 void Init(GLenum _target,
9417 GLsizei _width,
9418 GLsizei _height,
9419 GLuint _ioSurfaceId,
9420 GLuint _plane) {
9421 SetHeader();
9422 target = _target;
9423 width = _width;
9424 height = _height;
9425 ioSurfaceId = _ioSurfaceId;
9426 plane = _plane;
9429 void* Set(void* cmd,
9430 GLenum _target,
9431 GLsizei _width,
9432 GLsizei _height,
9433 GLuint _ioSurfaceId,
9434 GLuint _plane) {
9435 static_cast<ValueType*>(cmd)
9436 ->Init(_target, _width, _height, _ioSurfaceId, _plane);
9437 return NextCmdAddress<ValueType>(cmd);
9440 gpu::CommandHeader header;
9441 uint32 target;
9442 int32 width;
9443 int32 height;
9444 uint32 ioSurfaceId;
9445 uint32 plane;
9448 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
9449 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24);
9450 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
9451 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0);
9452 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
9453 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4);
9454 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
9455 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8);
9456 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
9457 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12);
9458 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
9459 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16);
9460 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
9461 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20);
9463 struct CopyTextureCHROMIUM {
9464 typedef CopyTextureCHROMIUM ValueType;
9465 static const CommandId kCmdId = kCopyTextureCHROMIUM;
9466 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9467 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9469 static uint32 ComputeSize() {
9470 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9473 void SetHeader() { header.SetCmd<ValueType>(); }
9475 void Init(GLenum _target,
9476 GLenum _source_id,
9477 GLenum _dest_id,
9478 GLint _level,
9479 GLint _internalformat,
9480 GLenum _dest_type) {
9481 SetHeader();
9482 target = _target;
9483 source_id = _source_id;
9484 dest_id = _dest_id;
9485 level = _level;
9486 internalformat = _internalformat;
9487 dest_type = _dest_type;
9490 void* Set(void* cmd,
9491 GLenum _target,
9492 GLenum _source_id,
9493 GLenum _dest_id,
9494 GLint _level,
9495 GLint _internalformat,
9496 GLenum _dest_type) {
9497 static_cast<ValueType*>(cmd)->Init(
9498 _target, _source_id, _dest_id, _level, _internalformat, _dest_type);
9499 return NextCmdAddress<ValueType>(cmd);
9502 gpu::CommandHeader header;
9503 uint32 target;
9504 uint32 source_id;
9505 uint32 dest_id;
9506 int32 level;
9507 int32 internalformat;
9508 uint32 dest_type;
9511 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM) == 28,
9512 Sizeof_CopyTextureCHROMIUM_is_not_28);
9513 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, header) == 0,
9514 OffsetOf_CopyTextureCHROMIUM_header_not_0);
9515 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, target) == 4,
9516 OffsetOf_CopyTextureCHROMIUM_target_not_4);
9517 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, source_id) == 8,
9518 OffsetOf_CopyTextureCHROMIUM_source_id_not_8);
9519 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
9520 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12);
9521 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, level) == 16,
9522 OffsetOf_CopyTextureCHROMIUM_level_not_16);
9523 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, internalformat) == 20,
9524 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20);
9525 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_type) == 24,
9526 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24);
9528 struct DrawArraysInstancedANGLE {
9529 typedef DrawArraysInstancedANGLE ValueType;
9530 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
9531 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9534 static uint32 ComputeSize() {
9535 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9538 void SetHeader() { header.SetCmd<ValueType>(); }
9540 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
9541 SetHeader();
9542 mode = _mode;
9543 first = _first;
9544 count = _count;
9545 primcount = _primcount;
9548 void* Set(void* cmd,
9549 GLenum _mode,
9550 GLint _first,
9551 GLsizei _count,
9552 GLsizei _primcount) {
9553 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
9554 return NextCmdAddress<ValueType>(cmd);
9557 gpu::CommandHeader header;
9558 uint32 mode;
9559 int32 first;
9560 int32 count;
9561 int32 primcount;
9564 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE) == 20,
9565 Sizeof_DrawArraysInstancedANGLE_is_not_20);
9566 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, header) == 0,
9567 OffsetOf_DrawArraysInstancedANGLE_header_not_0);
9568 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, mode) == 4,
9569 OffsetOf_DrawArraysInstancedANGLE_mode_not_4);
9570 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, first) == 8,
9571 OffsetOf_DrawArraysInstancedANGLE_first_not_8);
9572 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, count) == 12,
9573 OffsetOf_DrawArraysInstancedANGLE_count_not_12);
9574 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
9575 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16);
9577 struct DrawElementsInstancedANGLE {
9578 typedef DrawElementsInstancedANGLE ValueType;
9579 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
9580 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9581 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9583 static uint32 ComputeSize() {
9584 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9587 void SetHeader() { header.SetCmd<ValueType>(); }
9589 void Init(GLenum _mode,
9590 GLsizei _count,
9591 GLenum _type,
9592 GLuint _index_offset,
9593 GLsizei _primcount) {
9594 SetHeader();
9595 mode = _mode;
9596 count = _count;
9597 type = _type;
9598 index_offset = _index_offset;
9599 primcount = _primcount;
9602 void* Set(void* cmd,
9603 GLenum _mode,
9604 GLsizei _count,
9605 GLenum _type,
9606 GLuint _index_offset,
9607 GLsizei _primcount) {
9608 static_cast<ValueType*>(cmd)
9609 ->Init(_mode, _count, _type, _index_offset, _primcount);
9610 return NextCmdAddress<ValueType>(cmd);
9613 gpu::CommandHeader header;
9614 uint32 mode;
9615 int32 count;
9616 uint32 type;
9617 uint32 index_offset;
9618 int32 primcount;
9621 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE) == 24,
9622 Sizeof_DrawElementsInstancedANGLE_is_not_24);
9623 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, header) == 0,
9624 OffsetOf_DrawElementsInstancedANGLE_header_not_0);
9625 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, mode) == 4,
9626 OffsetOf_DrawElementsInstancedANGLE_mode_not_4);
9627 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, count) == 8,
9628 OffsetOf_DrawElementsInstancedANGLE_count_not_8);
9629 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, type) == 12,
9630 OffsetOf_DrawElementsInstancedANGLE_type_not_12);
9631 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
9632 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16);
9633 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
9634 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20);
9636 struct VertexAttribDivisorANGLE {
9637 typedef VertexAttribDivisorANGLE ValueType;
9638 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
9639 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9640 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9642 static uint32 ComputeSize() {
9643 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9646 void SetHeader() { header.SetCmd<ValueType>(); }
9648 void Init(GLuint _index, GLuint _divisor) {
9649 SetHeader();
9650 index = _index;
9651 divisor = _divisor;
9654 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
9655 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
9656 return NextCmdAddress<ValueType>(cmd);
9659 gpu::CommandHeader header;
9660 uint32 index;
9661 uint32 divisor;
9664 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12,
9665 Sizeof_VertexAttribDivisorANGLE_is_not_12);
9666 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0,
9667 OffsetOf_VertexAttribDivisorANGLE_header_not_0);
9668 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4,
9669 OffsetOf_VertexAttribDivisorANGLE_index_not_4);
9670 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
9671 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8);
9673 struct ProduceTextureCHROMIUM {
9674 typedef ProduceTextureCHROMIUM ValueType;
9675 static const CommandId kCmdId = kProduceTextureCHROMIUM;
9676 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9677 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9679 static uint32 ComputeSize() {
9680 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9683 void SetHeader() { header.SetCmd<ValueType>(); }
9685 void Init(GLenum _target,
9686 uint32 _mailbox_shm_id,
9687 uint32 _mailbox_shm_offset) {
9688 SetHeader();
9689 target = _target;
9690 mailbox_shm_id = _mailbox_shm_id;
9691 mailbox_shm_offset = _mailbox_shm_offset;
9694 void* Set(void* cmd,
9695 GLenum _target,
9696 uint32 _mailbox_shm_id,
9697 uint32 _mailbox_shm_offset) {
9698 static_cast<ValueType*>(cmd)
9699 ->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
9700 return NextCmdAddress<ValueType>(cmd);
9703 gpu::CommandHeader header;
9704 uint32 target;
9705 uint32 mailbox_shm_id;
9706 uint32 mailbox_shm_offset;
9709 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUM) == 16,
9710 Sizeof_ProduceTextureCHROMIUM_is_not_16);
9711 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, header) == 0,
9712 OffsetOf_ProduceTextureCHROMIUM_header_not_0);
9713 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, target) == 4,
9714 OffsetOf_ProduceTextureCHROMIUM_target_not_4);
9715 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_id) == 8,
9716 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_id_not_8);
9717 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_offset) == 12,
9718 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_offset_not_12);
9720 struct ProduceTextureCHROMIUMImmediate {
9721 typedef ProduceTextureCHROMIUMImmediate ValueType;
9722 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
9723 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9724 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9726 static uint32 ComputeDataSize() {
9727 return static_cast<uint32>(sizeof(GLbyte) * 64); // NOLINT
9730 static uint32 ComputeSize() {
9731 return static_cast<uint32>(sizeof(ValueType) +
9732 ComputeDataSize()); // NOLINT
9735 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9737 void Init(GLenum _target, const GLbyte* _mailbox) {
9738 SetHeader();
9739 target = _target;
9740 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
9743 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
9744 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
9745 const uint32 size = ComputeSize();
9746 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9749 gpu::CommandHeader header;
9750 uint32 target;
9753 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
9754 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
9755 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
9756 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
9757 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
9758 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
9760 struct ConsumeTextureCHROMIUM {
9761 typedef ConsumeTextureCHROMIUM ValueType;
9762 static const CommandId kCmdId = kConsumeTextureCHROMIUM;
9763 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9764 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9766 static uint32 ComputeSize() {
9767 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9770 void SetHeader() { header.SetCmd<ValueType>(); }
9772 void Init(GLenum _target,
9773 uint32 _mailbox_shm_id,
9774 uint32 _mailbox_shm_offset) {
9775 SetHeader();
9776 target = _target;
9777 mailbox_shm_id = _mailbox_shm_id;
9778 mailbox_shm_offset = _mailbox_shm_offset;
9781 void* Set(void* cmd,
9782 GLenum _target,
9783 uint32 _mailbox_shm_id,
9784 uint32 _mailbox_shm_offset) {
9785 static_cast<ValueType*>(cmd)
9786 ->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
9787 return NextCmdAddress<ValueType>(cmd);
9790 gpu::CommandHeader header;
9791 uint32 target;
9792 uint32 mailbox_shm_id;
9793 uint32 mailbox_shm_offset;
9796 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUM) == 16,
9797 Sizeof_ConsumeTextureCHROMIUM_is_not_16);
9798 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, header) == 0,
9799 OffsetOf_ConsumeTextureCHROMIUM_header_not_0);
9800 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, target) == 4,
9801 OffsetOf_ConsumeTextureCHROMIUM_target_not_4);
9802 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_id) == 8,
9803 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_id_not_8);
9804 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_offset) == 12,
9805 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_offset_not_12);
9807 struct ConsumeTextureCHROMIUMImmediate {
9808 typedef ConsumeTextureCHROMIUMImmediate ValueType;
9809 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
9810 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9811 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9813 static uint32 ComputeDataSize() {
9814 return static_cast<uint32>(sizeof(GLbyte) * 64); // NOLINT
9817 static uint32 ComputeSize() {
9818 return static_cast<uint32>(sizeof(ValueType) +
9819 ComputeDataSize()); // NOLINT
9822 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9824 void Init(GLenum _target, const GLbyte* _mailbox) {
9825 SetHeader();
9826 target = _target;
9827 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
9830 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
9831 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
9832 const uint32 size = ComputeSize();
9833 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9836 gpu::CommandHeader header;
9837 uint32 target;
9840 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
9841 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
9842 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
9843 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
9844 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
9845 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
9847 struct BindUniformLocationCHROMIUM {
9848 typedef BindUniformLocationCHROMIUM ValueType;
9849 static const CommandId kCmdId = kBindUniformLocationCHROMIUM;
9850 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9851 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9853 static uint32 ComputeSize() {
9854 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9857 void SetHeader() { header.SetCmd<ValueType>(); }
9859 void Init(GLuint _program,
9860 GLint _location,
9861 uint32 _name_shm_id,
9862 uint32 _name_shm_offset,
9863 uint32 _data_size) {
9864 SetHeader();
9865 program = _program;
9866 location = _location;
9867 name_shm_id = _name_shm_id;
9868 name_shm_offset = _name_shm_offset;
9869 data_size = _data_size;
9872 void* Set(void* cmd,
9873 GLuint _program,
9874 GLint _location,
9875 uint32 _name_shm_id,
9876 uint32 _name_shm_offset,
9877 uint32 _data_size) {
9878 static_cast<ValueType*>(cmd)
9879 ->Init(_program, _location, _name_shm_id, _name_shm_offset, _data_size);
9880 return NextCmdAddress<ValueType>(cmd);
9883 gpu::CommandHeader header;
9884 uint32 program;
9885 int32 location;
9886 uint32 name_shm_id;
9887 uint32 name_shm_offset;
9888 uint32 data_size;
9891 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUM) == 24,
9892 Sizeof_BindUniformLocationCHROMIUM_is_not_24);
9893 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, header) == 0,
9894 OffsetOf_BindUniformLocationCHROMIUM_header_not_0);
9895 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, program) == 4,
9896 OffsetOf_BindUniformLocationCHROMIUM_program_not_4);
9897 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, location) == 8,
9898 OffsetOf_BindUniformLocationCHROMIUM_location_not_8);
9899 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_id) == 12,
9900 OffsetOf_BindUniformLocationCHROMIUM_name_shm_id_not_12);
9901 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16,
9902 OffsetOf_BindUniformLocationCHROMIUM_name_shm_offset_not_16);
9903 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20,
9904 OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20);
9906 struct BindUniformLocationCHROMIUMBucket {
9907 typedef BindUniformLocationCHROMIUMBucket ValueType;
9908 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
9909 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9910 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9912 static uint32 ComputeSize() {
9913 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9916 void SetHeader() { header.SetCmd<ValueType>(); }
9918 void Init(GLuint _program, GLint _location, uint32 _name_bucket_id) {
9919 SetHeader();
9920 program = _program;
9921 location = _location;
9922 name_bucket_id = _name_bucket_id;
9925 void* Set(void* cmd,
9926 GLuint _program,
9927 GLint _location,
9928 uint32 _name_bucket_id) {
9929 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
9930 return NextCmdAddress<ValueType>(cmd);
9933 gpu::CommandHeader header;
9934 uint32 program;
9935 int32 location;
9936 uint32 name_bucket_id;
9939 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
9940 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16);
9941 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
9942 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0);
9943 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
9944 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4);
9945 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
9946 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8);
9947 COMPILE_ASSERT(
9948 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
9949 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); // NOLINT
9951 struct BindTexImage2DCHROMIUM {
9952 typedef BindTexImage2DCHROMIUM ValueType;
9953 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
9954 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9955 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9957 static uint32 ComputeSize() {
9958 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9961 void SetHeader() { header.SetCmd<ValueType>(); }
9963 void Init(GLenum _target, GLint _imageId) {
9964 SetHeader();
9965 target = _target;
9966 imageId = _imageId;
9969 void* Set(void* cmd, GLenum _target, GLint _imageId) {
9970 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
9971 return NextCmdAddress<ValueType>(cmd);
9974 gpu::CommandHeader header;
9975 uint32 target;
9976 int32 imageId;
9979 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM) == 12,
9980 Sizeof_BindTexImage2DCHROMIUM_is_not_12);
9981 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, header) == 0,
9982 OffsetOf_BindTexImage2DCHROMIUM_header_not_0);
9983 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, target) == 4,
9984 OffsetOf_BindTexImage2DCHROMIUM_target_not_4);
9985 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
9986 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8);
9988 struct ReleaseTexImage2DCHROMIUM {
9989 typedef ReleaseTexImage2DCHROMIUM ValueType;
9990 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
9991 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9992 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9994 static uint32 ComputeSize() {
9995 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9998 void SetHeader() { header.SetCmd<ValueType>(); }
10000 void Init(GLenum _target, GLint _imageId) {
10001 SetHeader();
10002 target = _target;
10003 imageId = _imageId;
10006 void* Set(void* cmd, GLenum _target, GLint _imageId) {
10007 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
10008 return NextCmdAddress<ValueType>(cmd);
10011 gpu::CommandHeader header;
10012 uint32 target;
10013 int32 imageId;
10016 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
10017 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12);
10018 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
10019 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0);
10020 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
10021 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4);
10022 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
10023 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8);
10025 struct TraceBeginCHROMIUM {
10026 typedef TraceBeginCHROMIUM ValueType;
10027 static const CommandId kCmdId = kTraceBeginCHROMIUM;
10028 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10029 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10031 static uint32 ComputeSize() {
10032 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10035 void SetHeader() { header.SetCmd<ValueType>(); }
10037 void Init(GLuint _bucket_id) {
10038 SetHeader();
10039 bucket_id = _bucket_id;
10042 void* Set(void* cmd, GLuint _bucket_id) {
10043 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10044 return NextCmdAddress<ValueType>(cmd);
10047 gpu::CommandHeader header;
10048 uint32 bucket_id;
10051 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM) == 8,
10052 Sizeof_TraceBeginCHROMIUM_is_not_8);
10053 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, header) == 0,
10054 OffsetOf_TraceBeginCHROMIUM_header_not_0);
10055 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, bucket_id) == 4,
10056 OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4);
10058 struct TraceEndCHROMIUM {
10059 typedef TraceEndCHROMIUM ValueType;
10060 static const CommandId kCmdId = kTraceEndCHROMIUM;
10061 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10062 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10064 static uint32 ComputeSize() {
10065 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10068 void SetHeader() { header.SetCmd<ValueType>(); }
10070 void Init() { SetHeader(); }
10072 void* Set(void* cmd) {
10073 static_cast<ValueType*>(cmd)->Init();
10074 return NextCmdAddress<ValueType>(cmd);
10077 gpu::CommandHeader header;
10080 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4, Sizeof_TraceEndCHROMIUM_is_not_4);
10081 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0,
10082 OffsetOf_TraceEndCHROMIUM_header_not_0);
10084 struct AsyncTexSubImage2DCHROMIUM {
10085 typedef AsyncTexSubImage2DCHROMIUM ValueType;
10086 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
10087 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10088 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10090 static uint32 ComputeSize() {
10091 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10094 void SetHeader() { header.SetCmd<ValueType>(); }
10096 void Init(GLenum _target,
10097 GLint _level,
10098 GLint _xoffset,
10099 GLint _yoffset,
10100 GLsizei _width,
10101 GLsizei _height,
10102 GLenum _format,
10103 GLenum _type,
10104 uint32 _data_shm_id,
10105 uint32 _data_shm_offset) {
10106 SetHeader();
10107 target = _target;
10108 level = _level;
10109 xoffset = _xoffset;
10110 yoffset = _yoffset;
10111 width = _width;
10112 height = _height;
10113 format = _format;
10114 type = _type;
10115 data_shm_id = _data_shm_id;
10116 data_shm_offset = _data_shm_offset;
10119 void* Set(void* cmd,
10120 GLenum _target,
10121 GLint _level,
10122 GLint _xoffset,
10123 GLint _yoffset,
10124 GLsizei _width,
10125 GLsizei _height,
10126 GLenum _format,
10127 GLenum _type,
10128 uint32 _data_shm_id,
10129 uint32 _data_shm_offset) {
10130 static_cast<ValueType*>(cmd)->Init(_target,
10131 _level,
10132 _xoffset,
10133 _yoffset,
10134 _width,
10135 _height,
10136 _format,
10137 _type,
10138 _data_shm_id,
10139 _data_shm_offset);
10140 return NextCmdAddress<ValueType>(cmd);
10143 gpu::CommandHeader header;
10144 uint32 target;
10145 int32 level;
10146 int32 xoffset;
10147 int32 yoffset;
10148 int32 width;
10149 int32 height;
10150 uint32 format;
10151 uint32 type;
10152 uint32 data_shm_id;
10153 uint32 data_shm_offset;
10156 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM) == 44,
10157 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_44);
10158 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
10159 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0);
10160 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
10161 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4);
10162 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
10163 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8);
10164 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
10165 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12);
10166 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
10167 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16);
10168 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
10169 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20);
10170 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
10171 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24);
10172 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
10173 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28);
10174 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
10175 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32);
10176 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
10177 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36);
10178 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
10179 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40);
10181 struct AsyncTexImage2DCHROMIUM {
10182 typedef AsyncTexImage2DCHROMIUM ValueType;
10183 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
10184 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10185 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10187 static uint32 ComputeSize() {
10188 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10191 void SetHeader() { header.SetCmd<ValueType>(); }
10193 void Init(GLenum _target,
10194 GLint _level,
10195 GLint _internalformat,
10196 GLsizei _width,
10197 GLsizei _height,
10198 GLint _border,
10199 GLenum _format,
10200 GLenum _type,
10201 uint32 _pixels_shm_id,
10202 uint32 _pixels_shm_offset) {
10203 SetHeader();
10204 target = _target;
10205 level = _level;
10206 internalformat = _internalformat;
10207 width = _width;
10208 height = _height;
10209 border = _border;
10210 format = _format;
10211 type = _type;
10212 pixels_shm_id = _pixels_shm_id;
10213 pixels_shm_offset = _pixels_shm_offset;
10216 void* Set(void* cmd,
10217 GLenum _target,
10218 GLint _level,
10219 GLint _internalformat,
10220 GLsizei _width,
10221 GLsizei _height,
10222 GLint _border,
10223 GLenum _format,
10224 GLenum _type,
10225 uint32 _pixels_shm_id,
10226 uint32 _pixels_shm_offset) {
10227 static_cast<ValueType*>(cmd)->Init(_target,
10228 _level,
10229 _internalformat,
10230 _width,
10231 _height,
10232 _border,
10233 _format,
10234 _type,
10235 _pixels_shm_id,
10236 _pixels_shm_offset);
10237 return NextCmdAddress<ValueType>(cmd);
10240 gpu::CommandHeader header;
10241 uint32 target;
10242 int32 level;
10243 int32 internalformat;
10244 int32 width;
10245 int32 height;
10246 int32 border;
10247 uint32 format;
10248 uint32 type;
10249 uint32 pixels_shm_id;
10250 uint32 pixels_shm_offset;
10253 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM) == 44,
10254 Sizeof_AsyncTexImage2DCHROMIUM_is_not_44);
10255 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
10256 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0);
10257 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
10258 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4);
10259 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
10260 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8);
10261 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
10262 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12);
10263 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
10264 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16);
10265 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
10266 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20);
10267 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, border) == 24,
10268 OffsetOf_AsyncTexImage2DCHROMIUM_border_not_24);
10269 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, format) == 28,
10270 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_28);
10271 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, type) == 32,
10272 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_32);
10273 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 36,
10274 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_36);
10275 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 40,
10276 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_40);
10278 struct WaitAsyncTexImage2DCHROMIUM {
10279 typedef WaitAsyncTexImage2DCHROMIUM ValueType;
10280 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
10281 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10282 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10284 static uint32 ComputeSize() {
10285 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10288 void SetHeader() { header.SetCmd<ValueType>(); }
10290 void Init(GLenum _target) {
10291 SetHeader();
10292 target = _target;
10295 void* Set(void* cmd, GLenum _target) {
10296 static_cast<ValueType*>(cmd)->Init(_target);
10297 return NextCmdAddress<ValueType>(cmd);
10300 gpu::CommandHeader header;
10301 uint32 target;
10304 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
10305 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8);
10306 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
10307 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0);
10308 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
10309 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4);
10311 struct DiscardFramebufferEXT {
10312 typedef DiscardFramebufferEXT ValueType;
10313 static const CommandId kCmdId = kDiscardFramebufferEXT;
10314 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10315 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10317 static uint32 ComputeSize() {
10318 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10321 void SetHeader() { header.SetCmd<ValueType>(); }
10323 void Init(GLenum _target,
10324 GLsizei _count,
10325 uint32 _attachments_shm_id,
10326 uint32 _attachments_shm_offset) {
10327 SetHeader();
10328 target = _target;
10329 count = _count;
10330 attachments_shm_id = _attachments_shm_id;
10331 attachments_shm_offset = _attachments_shm_offset;
10334 void* Set(void* cmd,
10335 GLenum _target,
10336 GLsizei _count,
10337 uint32 _attachments_shm_id,
10338 uint32 _attachments_shm_offset) {
10339 static_cast<ValueType*>(cmd)
10340 ->Init(_target, _count, _attachments_shm_id, _attachments_shm_offset);
10341 return NextCmdAddress<ValueType>(cmd);
10344 gpu::CommandHeader header;
10345 uint32 target;
10346 int32 count;
10347 uint32 attachments_shm_id;
10348 uint32 attachments_shm_offset;
10351 COMPILE_ASSERT(sizeof(DiscardFramebufferEXT) == 20,
10352 Sizeof_DiscardFramebufferEXT_is_not_20);
10353 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, header) == 0,
10354 OffsetOf_DiscardFramebufferEXT_header_not_0);
10355 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, target) == 4,
10356 OffsetOf_DiscardFramebufferEXT_target_not_4);
10357 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, count) == 8,
10358 OffsetOf_DiscardFramebufferEXT_count_not_8);
10359 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_id) == 12,
10360 OffsetOf_DiscardFramebufferEXT_attachments_shm_id_not_12);
10361 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_offset) == 16,
10362 OffsetOf_DiscardFramebufferEXT_attachments_shm_offset_not_16);
10364 struct DiscardFramebufferEXTImmediate {
10365 typedef DiscardFramebufferEXTImmediate ValueType;
10366 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
10367 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10368 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10370 static uint32 ComputeDataSize(GLsizei count) {
10371 return static_cast<uint32>(sizeof(GLenum) * 1 * count); // NOLINT
10374 static uint32 ComputeSize(GLsizei count) {
10375 return static_cast<uint32>(sizeof(ValueType) +
10376 ComputeDataSize(count)); // NOLINT
10379 void SetHeader(GLsizei count) {
10380 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
10383 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
10384 SetHeader(_count);
10385 target = _target;
10386 count = _count;
10387 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
10390 void* Set(void* cmd,
10391 GLenum _target,
10392 GLsizei _count,
10393 const GLenum* _attachments) {
10394 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
10395 const uint32 size = ComputeSize(_count);
10396 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10399 gpu::CommandHeader header;
10400 uint32 target;
10401 int32 count;
10404 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate) == 12,
10405 Sizeof_DiscardFramebufferEXTImmediate_is_not_12);
10406 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
10407 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0);
10408 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
10409 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4);
10410 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
10411 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8);
10413 struct LoseContextCHROMIUM {
10414 typedef LoseContextCHROMIUM ValueType;
10415 static const CommandId kCmdId = kLoseContextCHROMIUM;
10416 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10417 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10419 static uint32 ComputeSize() {
10420 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10423 void SetHeader() { header.SetCmd<ValueType>(); }
10425 void Init(GLenum _current, GLenum _other) {
10426 SetHeader();
10427 current = _current;
10428 other = _other;
10431 void* Set(void* cmd, GLenum _current, GLenum _other) {
10432 static_cast<ValueType*>(cmd)->Init(_current, _other);
10433 return NextCmdAddress<ValueType>(cmd);
10436 gpu::CommandHeader header;
10437 uint32 current;
10438 uint32 other;
10441 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM) == 12,
10442 Sizeof_LoseContextCHROMIUM_is_not_12);
10443 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, header) == 0,
10444 OffsetOf_LoseContextCHROMIUM_header_not_0);
10445 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, current) == 4,
10446 OffsetOf_LoseContextCHROMIUM_current_not_4);
10447 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, other) == 8,
10448 OffsetOf_LoseContextCHROMIUM_other_not_8);
10450 struct WaitSyncPointCHROMIUM {
10451 typedef WaitSyncPointCHROMIUM ValueType;
10452 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
10453 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10454 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10456 static uint32 ComputeSize() {
10457 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10460 void SetHeader() { header.SetCmd<ValueType>(); }
10462 void Init(GLuint _sync_point) {
10463 SetHeader();
10464 sync_point = _sync_point;
10467 void* Set(void* cmd, GLuint _sync_point) {
10468 static_cast<ValueType*>(cmd)->Init(_sync_point);
10469 return NextCmdAddress<ValueType>(cmd);
10472 gpu::CommandHeader header;
10473 uint32 sync_point;
10476 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM) == 8,
10477 Sizeof_WaitSyncPointCHROMIUM_is_not_8);
10478 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0,
10479 OffsetOf_WaitSyncPointCHROMIUM_header_not_0);
10480 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
10481 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4);
10483 struct DrawBuffersEXT {
10484 typedef DrawBuffersEXT ValueType;
10485 static const CommandId kCmdId = kDrawBuffersEXT;
10486 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10489 static uint32 ComputeSize() {
10490 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10493 void SetHeader() { header.SetCmd<ValueType>(); }
10495 void Init(GLsizei _count, uint32 _bufs_shm_id, uint32 _bufs_shm_offset) {
10496 SetHeader();
10497 count = _count;
10498 bufs_shm_id = _bufs_shm_id;
10499 bufs_shm_offset = _bufs_shm_offset;
10502 void* Set(void* cmd,
10503 GLsizei _count,
10504 uint32 _bufs_shm_id,
10505 uint32 _bufs_shm_offset) {
10506 static_cast<ValueType*>(cmd)->Init(_count, _bufs_shm_id, _bufs_shm_offset);
10507 return NextCmdAddress<ValueType>(cmd);
10510 gpu::CommandHeader header;
10511 int32 count;
10512 uint32 bufs_shm_id;
10513 uint32 bufs_shm_offset;
10516 COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16, Sizeof_DrawBuffersEXT_is_not_16);
10517 COMPILE_ASSERT(offsetof(DrawBuffersEXT, header) == 0,
10518 OffsetOf_DrawBuffersEXT_header_not_0);
10519 COMPILE_ASSERT(offsetof(DrawBuffersEXT, count) == 4,
10520 OffsetOf_DrawBuffersEXT_count_not_4);
10521 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_id) == 8,
10522 OffsetOf_DrawBuffersEXT_bufs_shm_id_not_8);
10523 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_offset) == 12,
10524 OffsetOf_DrawBuffersEXT_bufs_shm_offset_not_12);
10526 struct DrawBuffersEXTImmediate {
10527 typedef DrawBuffersEXTImmediate ValueType;
10528 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
10529 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10530 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10532 static uint32 ComputeDataSize(GLsizei count) {
10533 return static_cast<uint32>(sizeof(GLenum) * 1 * count); // NOLINT
10536 static uint32 ComputeSize(GLsizei count) {
10537 return static_cast<uint32>(sizeof(ValueType) +
10538 ComputeDataSize(count)); // NOLINT
10541 void SetHeader(GLsizei count) {
10542 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
10545 void Init(GLsizei _count, const GLenum* _bufs) {
10546 SetHeader(_count);
10547 count = _count;
10548 memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count));
10551 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
10552 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
10553 const uint32 size = ComputeSize(_count);
10554 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10557 gpu::CommandHeader header;
10558 int32 count;
10561 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8,
10562 Sizeof_DrawBuffersEXTImmediate_is_not_8);
10563 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0,
10564 OffsetOf_DrawBuffersEXTImmediate_header_not_0);
10565 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4,
10566 OffsetOf_DrawBuffersEXTImmediate_count_not_4);
10568 struct DiscardBackbufferCHROMIUM {
10569 typedef DiscardBackbufferCHROMIUM ValueType;
10570 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
10571 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10572 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10574 static uint32 ComputeSize() {
10575 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
10578 void SetHeader() { header.SetCmd<ValueType>(); }
10580 void Init() { SetHeader(); }
10582 void* Set(void* cmd) {
10583 static_cast<ValueType*>(cmd)->Init();
10584 return NextCmdAddress<ValueType>(cmd);
10587 gpu::CommandHeader header;
10590 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4,
10591 Sizeof_DiscardBackbufferCHROMIUM_is_not_4);
10592 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
10593 OffsetOf_DiscardBackbufferCHROMIUM_header_not_0);
10595 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_