Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
blob14f07282789ea29a0ddd7327d4489544924bd3d2
1 // Copyright 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_t ComputeSize() {
21 return static_cast<uint32_t>(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_t 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_t ComputeSize() {
53 return static_cast<uint32_t>(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_t program;
71 uint32_t 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 BindAttribLocationBucket {
83 typedef BindAttribLocationBucket ValueType;
84 static const CommandId kCmdId = kBindAttribLocationBucket;
85 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
88 static uint32_t ComputeSize() {
89 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
92 void SetHeader() { header.SetCmd<ValueType>(); }
94 void Init(GLuint _program, GLuint _index, uint32_t _name_bucket_id) {
95 SetHeader();
96 program = _program;
97 index = _index;
98 name_bucket_id = _name_bucket_id;
101 void* Set(void* cmd,
102 GLuint _program,
103 GLuint _index,
104 uint32_t _name_bucket_id) {
105 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
106 return NextCmdAddress<ValueType>(cmd);
109 gpu::CommandHeader header;
110 uint32_t program;
111 uint32_t index;
112 uint32_t name_bucket_id;
115 COMPILE_ASSERT(sizeof(BindAttribLocationBucket) == 16,
116 Sizeof_BindAttribLocationBucket_is_not_16);
117 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, header) == 0,
118 OffsetOf_BindAttribLocationBucket_header_not_0);
119 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, program) == 4,
120 OffsetOf_BindAttribLocationBucket_program_not_4);
121 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, index) == 8,
122 OffsetOf_BindAttribLocationBucket_index_not_8);
123 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
124 OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12);
126 struct BindBuffer {
127 typedef BindBuffer ValueType;
128 static const CommandId kCmdId = kBindBuffer;
129 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
130 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
132 static uint32_t ComputeSize() {
133 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
136 void SetHeader() { header.SetCmd<ValueType>(); }
138 void Init(GLenum _target, GLuint _buffer) {
139 SetHeader();
140 target = _target;
141 buffer = _buffer;
144 void* Set(void* cmd, GLenum _target, GLuint _buffer) {
145 static_cast<ValueType*>(cmd)->Init(_target, _buffer);
146 return NextCmdAddress<ValueType>(cmd);
149 gpu::CommandHeader header;
150 uint32_t target;
151 uint32_t buffer;
154 COMPILE_ASSERT(sizeof(BindBuffer) == 12, Sizeof_BindBuffer_is_not_12);
155 COMPILE_ASSERT(offsetof(BindBuffer, header) == 0,
156 OffsetOf_BindBuffer_header_not_0);
157 COMPILE_ASSERT(offsetof(BindBuffer, target) == 4,
158 OffsetOf_BindBuffer_target_not_4);
159 COMPILE_ASSERT(offsetof(BindBuffer, buffer) == 8,
160 OffsetOf_BindBuffer_buffer_not_8);
162 struct BindFramebuffer {
163 typedef BindFramebuffer ValueType;
164 static const CommandId kCmdId = kBindFramebuffer;
165 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
168 static uint32_t ComputeSize() {
169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
172 void SetHeader() { header.SetCmd<ValueType>(); }
174 void Init(GLenum _target, GLuint _framebuffer) {
175 SetHeader();
176 target = _target;
177 framebuffer = _framebuffer;
180 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
181 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
182 return NextCmdAddress<ValueType>(cmd);
185 gpu::CommandHeader header;
186 uint32_t target;
187 uint32_t framebuffer;
190 COMPILE_ASSERT(sizeof(BindFramebuffer) == 12, Sizeof_BindFramebuffer_is_not_12);
191 COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0,
192 OffsetOf_BindFramebuffer_header_not_0);
193 COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4,
194 OffsetOf_BindFramebuffer_target_not_4);
195 COMPILE_ASSERT(offsetof(BindFramebuffer, framebuffer) == 8,
196 OffsetOf_BindFramebuffer_framebuffer_not_8);
198 struct BindRenderbuffer {
199 typedef BindRenderbuffer ValueType;
200 static const CommandId kCmdId = kBindRenderbuffer;
201 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
202 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
204 static uint32_t ComputeSize() {
205 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
208 void SetHeader() { header.SetCmd<ValueType>(); }
210 void Init(GLenum _target, GLuint _renderbuffer) {
211 SetHeader();
212 target = _target;
213 renderbuffer = _renderbuffer;
216 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
217 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
218 return NextCmdAddress<ValueType>(cmd);
221 gpu::CommandHeader header;
222 uint32_t target;
223 uint32_t renderbuffer;
226 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12,
227 Sizeof_BindRenderbuffer_is_not_12);
228 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0,
229 OffsetOf_BindRenderbuffer_header_not_0);
230 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4,
231 OffsetOf_BindRenderbuffer_target_not_4);
232 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8,
233 OffsetOf_BindRenderbuffer_renderbuffer_not_8);
235 struct BindTexture {
236 typedef BindTexture ValueType;
237 static const CommandId kCmdId = kBindTexture;
238 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
239 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
241 static uint32_t ComputeSize() {
242 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
245 void SetHeader() { header.SetCmd<ValueType>(); }
247 void Init(GLenum _target, GLuint _texture) {
248 SetHeader();
249 target = _target;
250 texture = _texture;
253 void* Set(void* cmd, GLenum _target, GLuint _texture) {
254 static_cast<ValueType*>(cmd)->Init(_target, _texture);
255 return NextCmdAddress<ValueType>(cmd);
258 gpu::CommandHeader header;
259 uint32_t target;
260 uint32_t texture;
263 COMPILE_ASSERT(sizeof(BindTexture) == 12, Sizeof_BindTexture_is_not_12);
264 COMPILE_ASSERT(offsetof(BindTexture, header) == 0,
265 OffsetOf_BindTexture_header_not_0);
266 COMPILE_ASSERT(offsetof(BindTexture, target) == 4,
267 OffsetOf_BindTexture_target_not_4);
268 COMPILE_ASSERT(offsetof(BindTexture, texture) == 8,
269 OffsetOf_BindTexture_texture_not_8);
271 struct BlendColor {
272 typedef BlendColor ValueType;
273 static const CommandId kCmdId = kBlendColor;
274 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
277 static uint32_t ComputeSize() {
278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
281 void SetHeader() { header.SetCmd<ValueType>(); }
283 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
284 SetHeader();
285 red = _red;
286 green = _green;
287 blue = _blue;
288 alpha = _alpha;
291 void* Set(void* cmd,
292 GLclampf _red,
293 GLclampf _green,
294 GLclampf _blue,
295 GLclampf _alpha) {
296 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
297 return NextCmdAddress<ValueType>(cmd);
300 gpu::CommandHeader header;
301 float red;
302 float green;
303 float blue;
304 float alpha;
307 COMPILE_ASSERT(sizeof(BlendColor) == 20, Sizeof_BlendColor_is_not_20);
308 COMPILE_ASSERT(offsetof(BlendColor, header) == 0,
309 OffsetOf_BlendColor_header_not_0);
310 COMPILE_ASSERT(offsetof(BlendColor, red) == 4, OffsetOf_BlendColor_red_not_4);
311 COMPILE_ASSERT(offsetof(BlendColor, green) == 8,
312 OffsetOf_BlendColor_green_not_8);
313 COMPILE_ASSERT(offsetof(BlendColor, blue) == 12,
314 OffsetOf_BlendColor_blue_not_12);
315 COMPILE_ASSERT(offsetof(BlendColor, alpha) == 16,
316 OffsetOf_BlendColor_alpha_not_16);
318 struct BlendEquation {
319 typedef BlendEquation ValueType;
320 static const CommandId kCmdId = kBlendEquation;
321 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
322 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
324 static uint32_t ComputeSize() {
325 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
328 void SetHeader() { header.SetCmd<ValueType>(); }
330 void Init(GLenum _mode) {
331 SetHeader();
332 mode = _mode;
335 void* Set(void* cmd, GLenum _mode) {
336 static_cast<ValueType*>(cmd)->Init(_mode);
337 return NextCmdAddress<ValueType>(cmd);
340 gpu::CommandHeader header;
341 uint32_t mode;
344 COMPILE_ASSERT(sizeof(BlendEquation) == 8, Sizeof_BlendEquation_is_not_8);
345 COMPILE_ASSERT(offsetof(BlendEquation, header) == 0,
346 OffsetOf_BlendEquation_header_not_0);
347 COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4,
348 OffsetOf_BlendEquation_mode_not_4);
350 struct BlendEquationSeparate {
351 typedef BlendEquationSeparate ValueType;
352 static const CommandId kCmdId = kBlendEquationSeparate;
353 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
354 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
356 static uint32_t ComputeSize() {
357 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
360 void SetHeader() { header.SetCmd<ValueType>(); }
362 void Init(GLenum _modeRGB, GLenum _modeAlpha) {
363 SetHeader();
364 modeRGB = _modeRGB;
365 modeAlpha = _modeAlpha;
368 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
369 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
370 return NextCmdAddress<ValueType>(cmd);
373 gpu::CommandHeader header;
374 uint32_t modeRGB;
375 uint32_t modeAlpha;
378 COMPILE_ASSERT(sizeof(BlendEquationSeparate) == 12,
379 Sizeof_BlendEquationSeparate_is_not_12);
380 COMPILE_ASSERT(offsetof(BlendEquationSeparate, header) == 0,
381 OffsetOf_BlendEquationSeparate_header_not_0);
382 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeRGB) == 4,
383 OffsetOf_BlendEquationSeparate_modeRGB_not_4);
384 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeAlpha) == 8,
385 OffsetOf_BlendEquationSeparate_modeAlpha_not_8);
387 struct BlendFunc {
388 typedef BlendFunc ValueType;
389 static const CommandId kCmdId = kBlendFunc;
390 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
391 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
393 static uint32_t ComputeSize() {
394 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
397 void SetHeader() { header.SetCmd<ValueType>(); }
399 void Init(GLenum _sfactor, GLenum _dfactor) {
400 SetHeader();
401 sfactor = _sfactor;
402 dfactor = _dfactor;
405 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
406 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
407 return NextCmdAddress<ValueType>(cmd);
410 gpu::CommandHeader header;
411 uint32_t sfactor;
412 uint32_t dfactor;
415 COMPILE_ASSERT(sizeof(BlendFunc) == 12, Sizeof_BlendFunc_is_not_12);
416 COMPILE_ASSERT(offsetof(BlendFunc, header) == 0,
417 OffsetOf_BlendFunc_header_not_0);
418 COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4,
419 OffsetOf_BlendFunc_sfactor_not_4);
420 COMPILE_ASSERT(offsetof(BlendFunc, dfactor) == 8,
421 OffsetOf_BlendFunc_dfactor_not_8);
423 struct BlendFuncSeparate {
424 typedef BlendFuncSeparate ValueType;
425 static const CommandId kCmdId = kBlendFuncSeparate;
426 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
427 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
429 static uint32_t ComputeSize() {
430 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
433 void SetHeader() { header.SetCmd<ValueType>(); }
435 void Init(GLenum _srcRGB,
436 GLenum _dstRGB,
437 GLenum _srcAlpha,
438 GLenum _dstAlpha) {
439 SetHeader();
440 srcRGB = _srcRGB;
441 dstRGB = _dstRGB;
442 srcAlpha = _srcAlpha;
443 dstAlpha = _dstAlpha;
446 void* Set(void* cmd,
447 GLenum _srcRGB,
448 GLenum _dstRGB,
449 GLenum _srcAlpha,
450 GLenum _dstAlpha) {
451 static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
452 return NextCmdAddress<ValueType>(cmd);
455 gpu::CommandHeader header;
456 uint32_t srcRGB;
457 uint32_t dstRGB;
458 uint32_t srcAlpha;
459 uint32_t dstAlpha;
462 COMPILE_ASSERT(sizeof(BlendFuncSeparate) == 20,
463 Sizeof_BlendFuncSeparate_is_not_20);
464 COMPILE_ASSERT(offsetof(BlendFuncSeparate, header) == 0,
465 OffsetOf_BlendFuncSeparate_header_not_0);
466 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcRGB) == 4,
467 OffsetOf_BlendFuncSeparate_srcRGB_not_4);
468 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstRGB) == 8,
469 OffsetOf_BlendFuncSeparate_dstRGB_not_8);
470 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcAlpha) == 12,
471 OffsetOf_BlendFuncSeparate_srcAlpha_not_12);
472 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstAlpha) == 16,
473 OffsetOf_BlendFuncSeparate_dstAlpha_not_16);
475 struct BufferData {
476 typedef BufferData ValueType;
477 static const CommandId kCmdId = kBufferData;
478 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
479 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
481 static uint32_t ComputeSize() {
482 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
485 void SetHeader() { header.SetCmd<ValueType>(); }
487 void Init(GLenum _target,
488 GLsizeiptr _size,
489 uint32_t _data_shm_id,
490 uint32_t _data_shm_offset,
491 GLenum _usage) {
492 SetHeader();
493 target = _target;
494 size = _size;
495 data_shm_id = _data_shm_id;
496 data_shm_offset = _data_shm_offset;
497 usage = _usage;
500 void* Set(void* cmd,
501 GLenum _target,
502 GLsizeiptr _size,
503 uint32_t _data_shm_id,
504 uint32_t _data_shm_offset,
505 GLenum _usage) {
506 static_cast<ValueType*>(cmd)
507 ->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage);
508 return NextCmdAddress<ValueType>(cmd);
511 gpu::CommandHeader header;
512 uint32_t target;
513 int32_t size;
514 uint32_t data_shm_id;
515 uint32_t data_shm_offset;
516 uint32_t usage;
519 COMPILE_ASSERT(sizeof(BufferData) == 24, Sizeof_BufferData_is_not_24);
520 COMPILE_ASSERT(offsetof(BufferData, header) == 0,
521 OffsetOf_BufferData_header_not_0);
522 COMPILE_ASSERT(offsetof(BufferData, target) == 4,
523 OffsetOf_BufferData_target_not_4);
524 COMPILE_ASSERT(offsetof(BufferData, size) == 8, OffsetOf_BufferData_size_not_8);
525 COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12,
526 OffsetOf_BufferData_data_shm_id_not_12);
527 COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16,
528 OffsetOf_BufferData_data_shm_offset_not_16);
529 COMPILE_ASSERT(offsetof(BufferData, usage) == 20,
530 OffsetOf_BufferData_usage_not_20);
532 struct BufferSubData {
533 typedef BufferSubData ValueType;
534 static const CommandId kCmdId = kBufferSubData;
535 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
538 static uint32_t ComputeSize() {
539 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
542 void SetHeader() { header.SetCmd<ValueType>(); }
544 void Init(GLenum _target,
545 GLintptr _offset,
546 GLsizeiptr _size,
547 uint32_t _data_shm_id,
548 uint32_t _data_shm_offset) {
549 SetHeader();
550 target = _target;
551 offset = _offset;
552 size = _size;
553 data_shm_id = _data_shm_id;
554 data_shm_offset = _data_shm_offset;
557 void* Set(void* cmd,
558 GLenum _target,
559 GLintptr _offset,
560 GLsizeiptr _size,
561 uint32_t _data_shm_id,
562 uint32_t _data_shm_offset) {
563 static_cast<ValueType*>(cmd)
564 ->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset);
565 return NextCmdAddress<ValueType>(cmd);
568 gpu::CommandHeader header;
569 uint32_t target;
570 int32_t offset;
571 int32_t size;
572 uint32_t data_shm_id;
573 uint32_t data_shm_offset;
576 COMPILE_ASSERT(sizeof(BufferSubData) == 24, Sizeof_BufferSubData_is_not_24);
577 COMPILE_ASSERT(offsetof(BufferSubData, header) == 0,
578 OffsetOf_BufferSubData_header_not_0);
579 COMPILE_ASSERT(offsetof(BufferSubData, target) == 4,
580 OffsetOf_BufferSubData_target_not_4);
581 COMPILE_ASSERT(offsetof(BufferSubData, offset) == 8,
582 OffsetOf_BufferSubData_offset_not_8);
583 COMPILE_ASSERT(offsetof(BufferSubData, size) == 12,
584 OffsetOf_BufferSubData_size_not_12);
585 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16,
586 OffsetOf_BufferSubData_data_shm_id_not_16);
587 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20,
588 OffsetOf_BufferSubData_data_shm_offset_not_20);
590 struct CheckFramebufferStatus {
591 typedef CheckFramebufferStatus ValueType;
592 static const CommandId kCmdId = kCheckFramebufferStatus;
593 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
594 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
596 typedef GLenum Result;
598 static uint32_t ComputeSize() {
599 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
602 void SetHeader() { header.SetCmd<ValueType>(); }
604 void Init(GLenum _target,
605 uint32_t _result_shm_id,
606 uint32_t _result_shm_offset) {
607 SetHeader();
608 target = _target;
609 result_shm_id = _result_shm_id;
610 result_shm_offset = _result_shm_offset;
613 void* Set(void* cmd,
614 GLenum _target,
615 uint32_t _result_shm_id,
616 uint32_t _result_shm_offset) {
617 static_cast<ValueType*>(cmd)
618 ->Init(_target, _result_shm_id, _result_shm_offset);
619 return NextCmdAddress<ValueType>(cmd);
622 gpu::CommandHeader header;
623 uint32_t target;
624 uint32_t result_shm_id;
625 uint32_t result_shm_offset;
628 COMPILE_ASSERT(sizeof(CheckFramebufferStatus) == 16,
629 Sizeof_CheckFramebufferStatus_is_not_16);
630 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, header) == 0,
631 OffsetOf_CheckFramebufferStatus_header_not_0);
632 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, target) == 4,
633 OffsetOf_CheckFramebufferStatus_target_not_4);
634 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
635 OffsetOf_CheckFramebufferStatus_result_shm_id_not_8);
636 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
637 OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12);
639 struct Clear {
640 typedef Clear ValueType;
641 static const CommandId kCmdId = kClear;
642 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
643 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
645 static uint32_t ComputeSize() {
646 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
649 void SetHeader() { header.SetCmd<ValueType>(); }
651 void Init(GLbitfield _mask) {
652 SetHeader();
653 mask = _mask;
656 void* Set(void* cmd, GLbitfield _mask) {
657 static_cast<ValueType*>(cmd)->Init(_mask);
658 return NextCmdAddress<ValueType>(cmd);
661 gpu::CommandHeader header;
662 uint32_t mask;
665 COMPILE_ASSERT(sizeof(Clear) == 8, Sizeof_Clear_is_not_8);
666 COMPILE_ASSERT(offsetof(Clear, header) == 0, OffsetOf_Clear_header_not_0);
667 COMPILE_ASSERT(offsetof(Clear, mask) == 4, OffsetOf_Clear_mask_not_4);
669 struct ClearColor {
670 typedef ClearColor ValueType;
671 static const CommandId kCmdId = kClearColor;
672 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
673 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
675 static uint32_t ComputeSize() {
676 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
679 void SetHeader() { header.SetCmd<ValueType>(); }
681 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
682 SetHeader();
683 red = _red;
684 green = _green;
685 blue = _blue;
686 alpha = _alpha;
689 void* Set(void* cmd,
690 GLclampf _red,
691 GLclampf _green,
692 GLclampf _blue,
693 GLclampf _alpha) {
694 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
695 return NextCmdAddress<ValueType>(cmd);
698 gpu::CommandHeader header;
699 float red;
700 float green;
701 float blue;
702 float alpha;
705 COMPILE_ASSERT(sizeof(ClearColor) == 20, Sizeof_ClearColor_is_not_20);
706 COMPILE_ASSERT(offsetof(ClearColor, header) == 0,
707 OffsetOf_ClearColor_header_not_0);
708 COMPILE_ASSERT(offsetof(ClearColor, red) == 4, OffsetOf_ClearColor_red_not_4);
709 COMPILE_ASSERT(offsetof(ClearColor, green) == 8,
710 OffsetOf_ClearColor_green_not_8);
711 COMPILE_ASSERT(offsetof(ClearColor, blue) == 12,
712 OffsetOf_ClearColor_blue_not_12);
713 COMPILE_ASSERT(offsetof(ClearColor, alpha) == 16,
714 OffsetOf_ClearColor_alpha_not_16);
716 struct ClearDepthf {
717 typedef ClearDepthf ValueType;
718 static const CommandId kCmdId = kClearDepthf;
719 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
720 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
722 static uint32_t ComputeSize() {
723 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
726 void SetHeader() { header.SetCmd<ValueType>(); }
728 void Init(GLclampf _depth) {
729 SetHeader();
730 depth = _depth;
733 void* Set(void* cmd, GLclampf _depth) {
734 static_cast<ValueType*>(cmd)->Init(_depth);
735 return NextCmdAddress<ValueType>(cmd);
738 gpu::CommandHeader header;
739 float depth;
742 COMPILE_ASSERT(sizeof(ClearDepthf) == 8, Sizeof_ClearDepthf_is_not_8);
743 COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0,
744 OffsetOf_ClearDepthf_header_not_0);
745 COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4,
746 OffsetOf_ClearDepthf_depth_not_4);
748 struct ClearStencil {
749 typedef ClearStencil ValueType;
750 static const CommandId kCmdId = kClearStencil;
751 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
752 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
754 static uint32_t ComputeSize() {
755 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
758 void SetHeader() { header.SetCmd<ValueType>(); }
760 void Init(GLint _s) {
761 SetHeader();
762 s = _s;
765 void* Set(void* cmd, GLint _s) {
766 static_cast<ValueType*>(cmd)->Init(_s);
767 return NextCmdAddress<ValueType>(cmd);
770 gpu::CommandHeader header;
771 int32_t s;
774 COMPILE_ASSERT(sizeof(ClearStencil) == 8, Sizeof_ClearStencil_is_not_8);
775 COMPILE_ASSERT(offsetof(ClearStencil, header) == 0,
776 OffsetOf_ClearStencil_header_not_0);
777 COMPILE_ASSERT(offsetof(ClearStencil, s) == 4, OffsetOf_ClearStencil_s_not_4);
779 struct ColorMask {
780 typedef ColorMask ValueType;
781 static const CommandId kCmdId = kColorMask;
782 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
783 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
785 static uint32_t ComputeSize() {
786 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
789 void SetHeader() { header.SetCmd<ValueType>(); }
791 void Init(GLboolean _red,
792 GLboolean _green,
793 GLboolean _blue,
794 GLboolean _alpha) {
795 SetHeader();
796 red = _red;
797 green = _green;
798 blue = _blue;
799 alpha = _alpha;
802 void* Set(void* cmd,
803 GLboolean _red,
804 GLboolean _green,
805 GLboolean _blue,
806 GLboolean _alpha) {
807 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
808 return NextCmdAddress<ValueType>(cmd);
811 gpu::CommandHeader header;
812 uint32_t red;
813 uint32_t green;
814 uint32_t blue;
815 uint32_t alpha;
818 COMPILE_ASSERT(sizeof(ColorMask) == 20, Sizeof_ColorMask_is_not_20);
819 COMPILE_ASSERT(offsetof(ColorMask, header) == 0,
820 OffsetOf_ColorMask_header_not_0);
821 COMPILE_ASSERT(offsetof(ColorMask, red) == 4, OffsetOf_ColorMask_red_not_4);
822 COMPILE_ASSERT(offsetof(ColorMask, green) == 8, OffsetOf_ColorMask_green_not_8);
823 COMPILE_ASSERT(offsetof(ColorMask, blue) == 12, OffsetOf_ColorMask_blue_not_12);
824 COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16,
825 OffsetOf_ColorMask_alpha_not_16);
827 struct CompileShader {
828 typedef CompileShader ValueType;
829 static const CommandId kCmdId = kCompileShader;
830 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
831 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
833 static uint32_t ComputeSize() {
834 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
837 void SetHeader() { header.SetCmd<ValueType>(); }
839 void Init(GLuint _shader) {
840 SetHeader();
841 shader = _shader;
844 void* Set(void* cmd, GLuint _shader) {
845 static_cast<ValueType*>(cmd)->Init(_shader);
846 return NextCmdAddress<ValueType>(cmd);
849 gpu::CommandHeader header;
850 uint32_t shader;
853 COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8);
854 COMPILE_ASSERT(offsetof(CompileShader, header) == 0,
855 OffsetOf_CompileShader_header_not_0);
856 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4,
857 OffsetOf_CompileShader_shader_not_4);
859 struct CompressedTexImage2DBucket {
860 typedef CompressedTexImage2DBucket ValueType;
861 static const CommandId kCmdId = kCompressedTexImage2DBucket;
862 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
863 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
865 static uint32_t ComputeSize() {
866 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
869 void SetHeader() { header.SetCmd<ValueType>(); }
871 void Init(GLenum _target,
872 GLint _level,
873 GLenum _internalformat,
874 GLsizei _width,
875 GLsizei _height,
876 GLuint _bucket_id) {
877 SetHeader();
878 target = _target;
879 level = _level;
880 internalformat = _internalformat;
881 width = _width;
882 height = _height;
883 bucket_id = _bucket_id;
886 void* Set(void* cmd,
887 GLenum _target,
888 GLint _level,
889 GLenum _internalformat,
890 GLsizei _width,
891 GLsizei _height,
892 GLuint _bucket_id) {
893 static_cast<ValueType*>(cmd)
894 ->Init(_target, _level, _internalformat, _width, _height, _bucket_id);
895 return NextCmdAddress<ValueType>(cmd);
898 gpu::CommandHeader header;
899 uint32_t target;
900 int32_t level;
901 uint32_t internalformat;
902 int32_t width;
903 int32_t height;
904 uint32_t bucket_id;
905 static const int32_t border = 0;
908 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 28,
909 Sizeof_CompressedTexImage2DBucket_is_not_28);
910 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0,
911 OffsetOf_CompressedTexImage2DBucket_header_not_0);
912 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4,
913 OffsetOf_CompressedTexImage2DBucket_target_not_4);
914 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8,
915 OffsetOf_CompressedTexImage2DBucket_level_not_8);
916 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12,
917 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12);
918 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16,
919 OffsetOf_CompressedTexImage2DBucket_width_not_16);
920 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20,
921 OffsetOf_CompressedTexImage2DBucket_height_not_20);
922 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 24,
923 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_24);
925 struct CompressedTexImage2D {
926 typedef CompressedTexImage2D ValueType;
927 static const CommandId kCmdId = kCompressedTexImage2D;
928 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
929 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
931 static uint32_t ComputeSize() {
932 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
935 void SetHeader() { header.SetCmd<ValueType>(); }
937 void Init(GLenum _target,
938 GLint _level,
939 GLenum _internalformat,
940 GLsizei _width,
941 GLsizei _height,
942 GLsizei _imageSize,
943 uint32_t _data_shm_id,
944 uint32_t _data_shm_offset) {
945 SetHeader();
946 target = _target;
947 level = _level;
948 internalformat = _internalformat;
949 width = _width;
950 height = _height;
951 imageSize = _imageSize;
952 data_shm_id = _data_shm_id;
953 data_shm_offset = _data_shm_offset;
956 void* Set(void* cmd,
957 GLenum _target,
958 GLint _level,
959 GLenum _internalformat,
960 GLsizei _width,
961 GLsizei _height,
962 GLsizei _imageSize,
963 uint32_t _data_shm_id,
964 uint32_t _data_shm_offset) {
965 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
966 _height, _imageSize, _data_shm_id,
967 _data_shm_offset);
968 return NextCmdAddress<ValueType>(cmd);
971 gpu::CommandHeader header;
972 uint32_t target;
973 int32_t level;
974 uint32_t internalformat;
975 int32_t width;
976 int32_t height;
977 int32_t imageSize;
978 uint32_t data_shm_id;
979 uint32_t data_shm_offset;
980 static const int32_t border = 0;
983 COMPILE_ASSERT(sizeof(CompressedTexImage2D) == 36,
984 Sizeof_CompressedTexImage2D_is_not_36);
985 COMPILE_ASSERT(offsetof(CompressedTexImage2D, header) == 0,
986 OffsetOf_CompressedTexImage2D_header_not_0);
987 COMPILE_ASSERT(offsetof(CompressedTexImage2D, target) == 4,
988 OffsetOf_CompressedTexImage2D_target_not_4);
989 COMPILE_ASSERT(offsetof(CompressedTexImage2D, level) == 8,
990 OffsetOf_CompressedTexImage2D_level_not_8);
991 COMPILE_ASSERT(offsetof(CompressedTexImage2D, internalformat) == 12,
992 OffsetOf_CompressedTexImage2D_internalformat_not_12);
993 COMPILE_ASSERT(offsetof(CompressedTexImage2D, width) == 16,
994 OffsetOf_CompressedTexImage2D_width_not_16);
995 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20,
996 OffsetOf_CompressedTexImage2D_height_not_20);
997 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 24,
998 OffsetOf_CompressedTexImage2D_imageSize_not_24);
999 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 28,
1000 OffsetOf_CompressedTexImage2D_data_shm_id_not_28);
1001 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 32,
1002 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32);
1004 struct CompressedTexSubImage2DBucket {
1005 typedef CompressedTexSubImage2DBucket ValueType;
1006 static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
1007 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1008 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1010 static uint32_t ComputeSize() {
1011 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1014 void SetHeader() { header.SetCmd<ValueType>(); }
1016 void Init(GLenum _target,
1017 GLint _level,
1018 GLint _xoffset,
1019 GLint _yoffset,
1020 GLsizei _width,
1021 GLsizei _height,
1022 GLenum _format,
1023 GLuint _bucket_id) {
1024 SetHeader();
1025 target = _target;
1026 level = _level;
1027 xoffset = _xoffset;
1028 yoffset = _yoffset;
1029 width = _width;
1030 height = _height;
1031 format = _format;
1032 bucket_id = _bucket_id;
1035 void* Set(void* cmd,
1036 GLenum _target,
1037 GLint _level,
1038 GLint _xoffset,
1039 GLint _yoffset,
1040 GLsizei _width,
1041 GLsizei _height,
1042 GLenum _format,
1043 GLuint _bucket_id) {
1044 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1045 _width, _height, _format, _bucket_id);
1046 return NextCmdAddress<ValueType>(cmd);
1049 gpu::CommandHeader header;
1050 uint32_t target;
1051 int32_t level;
1052 int32_t xoffset;
1053 int32_t yoffset;
1054 int32_t width;
1055 int32_t height;
1056 uint32_t format;
1057 uint32_t bucket_id;
1060 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36,
1061 Sizeof_CompressedTexSubImage2DBucket_is_not_36);
1062 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0,
1063 OffsetOf_CompressedTexSubImage2DBucket_header_not_0);
1064 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4,
1065 OffsetOf_CompressedTexSubImage2DBucket_target_not_4);
1066 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8,
1067 OffsetOf_CompressedTexSubImage2DBucket_level_not_8);
1068 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
1069 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12);
1070 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
1071 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16);
1072 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20,
1073 OffsetOf_CompressedTexSubImage2DBucket_width_not_20);
1074 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24,
1075 OffsetOf_CompressedTexSubImage2DBucket_height_not_24);
1076 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28,
1077 OffsetOf_CompressedTexSubImage2DBucket_format_not_28);
1078 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
1079 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32);
1081 struct CompressedTexSubImage2D {
1082 typedef CompressedTexSubImage2D ValueType;
1083 static const CommandId kCmdId = kCompressedTexSubImage2D;
1084 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1085 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1087 static uint32_t ComputeSize() {
1088 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1091 void SetHeader() { header.SetCmd<ValueType>(); }
1093 void Init(GLenum _target,
1094 GLint _level,
1095 GLint _xoffset,
1096 GLint _yoffset,
1097 GLsizei _width,
1098 GLsizei _height,
1099 GLenum _format,
1100 GLsizei _imageSize,
1101 uint32_t _data_shm_id,
1102 uint32_t _data_shm_offset) {
1103 SetHeader();
1104 target = _target;
1105 level = _level;
1106 xoffset = _xoffset;
1107 yoffset = _yoffset;
1108 width = _width;
1109 height = _height;
1110 format = _format;
1111 imageSize = _imageSize;
1112 data_shm_id = _data_shm_id;
1113 data_shm_offset = _data_shm_offset;
1116 void* Set(void* cmd,
1117 GLenum _target,
1118 GLint _level,
1119 GLint _xoffset,
1120 GLint _yoffset,
1121 GLsizei _width,
1122 GLsizei _height,
1123 GLenum _format,
1124 GLsizei _imageSize,
1125 uint32_t _data_shm_id,
1126 uint32_t _data_shm_offset) {
1127 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1128 _width, _height, _format, _imageSize,
1129 _data_shm_id, _data_shm_offset);
1130 return NextCmdAddress<ValueType>(cmd);
1133 gpu::CommandHeader header;
1134 uint32_t target;
1135 int32_t level;
1136 int32_t xoffset;
1137 int32_t yoffset;
1138 int32_t width;
1139 int32_t height;
1140 uint32_t format;
1141 int32_t imageSize;
1142 uint32_t data_shm_id;
1143 uint32_t 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 CopyTexImage2D {
1172 typedef CopyTexImage2D ValueType;
1173 static const CommandId kCmdId = kCopyTexImage2D;
1174 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1177 static uint32_t ComputeSize() {
1178 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1181 void SetHeader() { header.SetCmd<ValueType>(); }
1183 void Init(GLenum _target,
1184 GLint _level,
1185 GLenum _internalformat,
1186 GLint _x,
1187 GLint _y,
1188 GLsizei _width,
1189 GLsizei _height) {
1190 SetHeader();
1191 target = _target;
1192 level = _level;
1193 internalformat = _internalformat;
1194 x = _x;
1195 y = _y;
1196 width = _width;
1197 height = _height;
1200 void* Set(void* cmd,
1201 GLenum _target,
1202 GLint _level,
1203 GLenum _internalformat,
1204 GLint _x,
1205 GLint _y,
1206 GLsizei _width,
1207 GLsizei _height) {
1208 static_cast<ValueType*>(cmd)
1209 ->Init(_target, _level, _internalformat, _x, _y, _width, _height);
1210 return NextCmdAddress<ValueType>(cmd);
1213 gpu::CommandHeader header;
1214 uint32_t target;
1215 int32_t level;
1216 uint32_t internalformat;
1217 int32_t x;
1218 int32_t y;
1219 int32_t width;
1220 int32_t height;
1221 static const int32_t border = 0;
1224 COMPILE_ASSERT(sizeof(CopyTexImage2D) == 32, Sizeof_CopyTexImage2D_is_not_32);
1225 COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0,
1226 OffsetOf_CopyTexImage2D_header_not_0);
1227 COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4,
1228 OffsetOf_CopyTexImage2D_target_not_4);
1229 COMPILE_ASSERT(offsetof(CopyTexImage2D, level) == 8,
1230 OffsetOf_CopyTexImage2D_level_not_8);
1231 COMPILE_ASSERT(offsetof(CopyTexImage2D, internalformat) == 12,
1232 OffsetOf_CopyTexImage2D_internalformat_not_12);
1233 COMPILE_ASSERT(offsetof(CopyTexImage2D, x) == 16,
1234 OffsetOf_CopyTexImage2D_x_not_16);
1235 COMPILE_ASSERT(offsetof(CopyTexImage2D, y) == 20,
1236 OffsetOf_CopyTexImage2D_y_not_20);
1237 COMPILE_ASSERT(offsetof(CopyTexImage2D, width) == 24,
1238 OffsetOf_CopyTexImage2D_width_not_24);
1239 COMPILE_ASSERT(offsetof(CopyTexImage2D, height) == 28,
1240 OffsetOf_CopyTexImage2D_height_not_28);
1242 struct CopyTexSubImage2D {
1243 typedef CopyTexSubImage2D ValueType;
1244 static const CommandId kCmdId = kCopyTexSubImage2D;
1245 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1246 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1248 static uint32_t ComputeSize() {
1249 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1252 void SetHeader() { header.SetCmd<ValueType>(); }
1254 void Init(GLenum _target,
1255 GLint _level,
1256 GLint _xoffset,
1257 GLint _yoffset,
1258 GLint _x,
1259 GLint _y,
1260 GLsizei _width,
1261 GLsizei _height) {
1262 SetHeader();
1263 target = _target;
1264 level = _level;
1265 xoffset = _xoffset;
1266 yoffset = _yoffset;
1267 x = _x;
1268 y = _y;
1269 width = _width;
1270 height = _height;
1273 void* Set(void* cmd,
1274 GLenum _target,
1275 GLint _level,
1276 GLint _xoffset,
1277 GLint _yoffset,
1278 GLint _x,
1279 GLint _y,
1280 GLsizei _width,
1281 GLsizei _height) {
1282 static_cast<ValueType*>(cmd)
1283 ->Init(_target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
1284 return NextCmdAddress<ValueType>(cmd);
1287 gpu::CommandHeader header;
1288 uint32_t target;
1289 int32_t level;
1290 int32_t xoffset;
1291 int32_t yoffset;
1292 int32_t x;
1293 int32_t y;
1294 int32_t width;
1295 int32_t height;
1298 COMPILE_ASSERT(sizeof(CopyTexSubImage2D) == 36,
1299 Sizeof_CopyTexSubImage2D_is_not_36);
1300 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, header) == 0,
1301 OffsetOf_CopyTexSubImage2D_header_not_0);
1302 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, target) == 4,
1303 OffsetOf_CopyTexSubImage2D_target_not_4);
1304 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, level) == 8,
1305 OffsetOf_CopyTexSubImage2D_level_not_8);
1306 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, xoffset) == 12,
1307 OffsetOf_CopyTexSubImage2D_xoffset_not_12);
1308 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, yoffset) == 16,
1309 OffsetOf_CopyTexSubImage2D_yoffset_not_16);
1310 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, x) == 20,
1311 OffsetOf_CopyTexSubImage2D_x_not_20);
1312 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, y) == 24,
1313 OffsetOf_CopyTexSubImage2D_y_not_24);
1314 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, width) == 28,
1315 OffsetOf_CopyTexSubImage2D_width_not_28);
1316 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, height) == 32,
1317 OffsetOf_CopyTexSubImage2D_height_not_32);
1319 struct CreateProgram {
1320 typedef CreateProgram ValueType;
1321 static const CommandId kCmdId = kCreateProgram;
1322 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1323 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1325 static uint32_t ComputeSize() {
1326 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1329 void SetHeader() { header.SetCmd<ValueType>(); }
1331 void Init(uint32_t _client_id) {
1332 SetHeader();
1333 client_id = _client_id;
1336 void* Set(void* cmd, uint32_t _client_id) {
1337 static_cast<ValueType*>(cmd)->Init(_client_id);
1338 return NextCmdAddress<ValueType>(cmd);
1341 gpu::CommandHeader header;
1342 uint32_t client_id;
1345 COMPILE_ASSERT(sizeof(CreateProgram) == 8, Sizeof_CreateProgram_is_not_8);
1346 COMPILE_ASSERT(offsetof(CreateProgram, header) == 0,
1347 OffsetOf_CreateProgram_header_not_0);
1348 COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4,
1349 OffsetOf_CreateProgram_client_id_not_4);
1351 struct CreateShader {
1352 typedef CreateShader ValueType;
1353 static const CommandId kCmdId = kCreateShader;
1354 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1355 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1357 static uint32_t ComputeSize() {
1358 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1361 void SetHeader() { header.SetCmd<ValueType>(); }
1363 void Init(GLenum _type, uint32_t _client_id) {
1364 SetHeader();
1365 type = _type;
1366 client_id = _client_id;
1369 void* Set(void* cmd, GLenum _type, uint32_t _client_id) {
1370 static_cast<ValueType*>(cmd)->Init(_type, _client_id);
1371 return NextCmdAddress<ValueType>(cmd);
1374 gpu::CommandHeader header;
1375 uint32_t type;
1376 uint32_t client_id;
1379 COMPILE_ASSERT(sizeof(CreateShader) == 12, Sizeof_CreateShader_is_not_12);
1380 COMPILE_ASSERT(offsetof(CreateShader, header) == 0,
1381 OffsetOf_CreateShader_header_not_0);
1382 COMPILE_ASSERT(offsetof(CreateShader, type) == 4,
1383 OffsetOf_CreateShader_type_not_4);
1384 COMPILE_ASSERT(offsetof(CreateShader, client_id) == 8,
1385 OffsetOf_CreateShader_client_id_not_8);
1387 struct CullFace {
1388 typedef CullFace ValueType;
1389 static const CommandId kCmdId = kCullFace;
1390 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1391 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1393 static uint32_t ComputeSize() {
1394 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1397 void SetHeader() { header.SetCmd<ValueType>(); }
1399 void Init(GLenum _mode) {
1400 SetHeader();
1401 mode = _mode;
1404 void* Set(void* cmd, GLenum _mode) {
1405 static_cast<ValueType*>(cmd)->Init(_mode);
1406 return NextCmdAddress<ValueType>(cmd);
1409 gpu::CommandHeader header;
1410 uint32_t mode;
1413 COMPILE_ASSERT(sizeof(CullFace) == 8, Sizeof_CullFace_is_not_8);
1414 COMPILE_ASSERT(offsetof(CullFace, header) == 0, OffsetOf_CullFace_header_not_0);
1415 COMPILE_ASSERT(offsetof(CullFace, mode) == 4, OffsetOf_CullFace_mode_not_4);
1417 struct DeleteBuffersImmediate {
1418 typedef DeleteBuffersImmediate ValueType;
1419 static const CommandId kCmdId = kDeleteBuffersImmediate;
1420 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1421 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1423 static uint32_t ComputeDataSize(GLsizei n) {
1424 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
1427 static uint32_t ComputeSize(GLsizei n) {
1428 return static_cast<uint32_t>(sizeof(ValueType) +
1429 ComputeDataSize(n)); // NOLINT
1432 void SetHeader(GLsizei n) {
1433 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1436 void Init(GLsizei _n, const GLuint* _buffers) {
1437 SetHeader(_n);
1438 n = _n;
1439 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
1442 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
1443 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
1444 const uint32_t size = ComputeSize(_n);
1445 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1448 gpu::CommandHeader header;
1449 int32_t n;
1452 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate) == 8,
1453 Sizeof_DeleteBuffersImmediate_is_not_8);
1454 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, header) == 0,
1455 OffsetOf_DeleteBuffersImmediate_header_not_0);
1456 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, n) == 4,
1457 OffsetOf_DeleteBuffersImmediate_n_not_4);
1459 struct DeleteFramebuffersImmediate {
1460 typedef DeleteFramebuffersImmediate ValueType;
1461 static const CommandId kCmdId = kDeleteFramebuffersImmediate;
1462 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1463 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1465 static uint32_t ComputeDataSize(GLsizei n) {
1466 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
1469 static uint32_t ComputeSize(GLsizei n) {
1470 return static_cast<uint32_t>(sizeof(ValueType) +
1471 ComputeDataSize(n)); // NOLINT
1474 void SetHeader(GLsizei n) {
1475 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1478 void Init(GLsizei _n, const GLuint* _framebuffers) {
1479 SetHeader(_n);
1480 n = _n;
1481 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
1484 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
1485 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
1486 const uint32_t size = ComputeSize(_n);
1487 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1490 gpu::CommandHeader header;
1491 int32_t n;
1494 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate) == 8,
1495 Sizeof_DeleteFramebuffersImmediate_is_not_8);
1496 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, header) == 0,
1497 OffsetOf_DeleteFramebuffersImmediate_header_not_0);
1498 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, n) == 4,
1499 OffsetOf_DeleteFramebuffersImmediate_n_not_4);
1501 struct DeleteProgram {
1502 typedef DeleteProgram ValueType;
1503 static const CommandId kCmdId = kDeleteProgram;
1504 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1505 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1507 static uint32_t ComputeSize() {
1508 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1511 void SetHeader() { header.SetCmd<ValueType>(); }
1513 void Init(GLuint _program) {
1514 SetHeader();
1515 program = _program;
1518 void* Set(void* cmd, GLuint _program) {
1519 static_cast<ValueType*>(cmd)->Init(_program);
1520 return NextCmdAddress<ValueType>(cmd);
1523 gpu::CommandHeader header;
1524 uint32_t program;
1527 COMPILE_ASSERT(sizeof(DeleteProgram) == 8, Sizeof_DeleteProgram_is_not_8);
1528 COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0,
1529 OffsetOf_DeleteProgram_header_not_0);
1530 COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4,
1531 OffsetOf_DeleteProgram_program_not_4);
1533 struct DeleteRenderbuffersImmediate {
1534 typedef DeleteRenderbuffersImmediate ValueType;
1535 static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
1536 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1537 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1539 static uint32_t ComputeDataSize(GLsizei n) {
1540 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
1543 static uint32_t ComputeSize(GLsizei n) {
1544 return static_cast<uint32_t>(sizeof(ValueType) +
1545 ComputeDataSize(n)); // NOLINT
1548 void SetHeader(GLsizei n) {
1549 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1552 void Init(GLsizei _n, const GLuint* _renderbuffers) {
1553 SetHeader(_n);
1554 n = _n;
1555 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
1558 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
1559 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
1560 const uint32_t size = ComputeSize(_n);
1561 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1564 gpu::CommandHeader header;
1565 int32_t n;
1568 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8,
1569 Sizeof_DeleteRenderbuffersImmediate_is_not_8);
1570 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0,
1571 OffsetOf_DeleteRenderbuffersImmediate_header_not_0);
1572 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4,
1573 OffsetOf_DeleteRenderbuffersImmediate_n_not_4);
1575 struct DeleteShader {
1576 typedef DeleteShader ValueType;
1577 static const CommandId kCmdId = kDeleteShader;
1578 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1579 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1581 static uint32_t ComputeSize() {
1582 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1585 void SetHeader() { header.SetCmd<ValueType>(); }
1587 void Init(GLuint _shader) {
1588 SetHeader();
1589 shader = _shader;
1592 void* Set(void* cmd, GLuint _shader) {
1593 static_cast<ValueType*>(cmd)->Init(_shader);
1594 return NextCmdAddress<ValueType>(cmd);
1597 gpu::CommandHeader header;
1598 uint32_t shader;
1601 COMPILE_ASSERT(sizeof(DeleteShader) == 8, Sizeof_DeleteShader_is_not_8);
1602 COMPILE_ASSERT(offsetof(DeleteShader, header) == 0,
1603 OffsetOf_DeleteShader_header_not_0);
1604 COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4,
1605 OffsetOf_DeleteShader_shader_not_4);
1607 struct DeleteTexturesImmediate {
1608 typedef DeleteTexturesImmediate ValueType;
1609 static const CommandId kCmdId = kDeleteTexturesImmediate;
1610 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1611 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1613 static uint32_t ComputeDataSize(GLsizei n) {
1614 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
1617 static uint32_t ComputeSize(GLsizei n) {
1618 return static_cast<uint32_t>(sizeof(ValueType) +
1619 ComputeDataSize(n)); // NOLINT
1622 void SetHeader(GLsizei n) {
1623 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
1626 void Init(GLsizei _n, const GLuint* _textures) {
1627 SetHeader(_n);
1628 n = _n;
1629 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
1632 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
1633 static_cast<ValueType*>(cmd)->Init(_n, _textures);
1634 const uint32_t size = ComputeSize(_n);
1635 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1638 gpu::CommandHeader header;
1639 int32_t n;
1642 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate) == 8,
1643 Sizeof_DeleteTexturesImmediate_is_not_8);
1644 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, header) == 0,
1645 OffsetOf_DeleteTexturesImmediate_header_not_0);
1646 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, n) == 4,
1647 OffsetOf_DeleteTexturesImmediate_n_not_4);
1649 struct DepthFunc {
1650 typedef DepthFunc ValueType;
1651 static const CommandId kCmdId = kDepthFunc;
1652 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1653 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1655 static uint32_t ComputeSize() {
1656 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1659 void SetHeader() { header.SetCmd<ValueType>(); }
1661 void Init(GLenum _func) {
1662 SetHeader();
1663 func = _func;
1666 void* Set(void* cmd, GLenum _func) {
1667 static_cast<ValueType*>(cmd)->Init(_func);
1668 return NextCmdAddress<ValueType>(cmd);
1671 gpu::CommandHeader header;
1672 uint32_t func;
1675 COMPILE_ASSERT(sizeof(DepthFunc) == 8, Sizeof_DepthFunc_is_not_8);
1676 COMPILE_ASSERT(offsetof(DepthFunc, header) == 0,
1677 OffsetOf_DepthFunc_header_not_0);
1678 COMPILE_ASSERT(offsetof(DepthFunc, func) == 4, OffsetOf_DepthFunc_func_not_4);
1680 struct DepthMask {
1681 typedef DepthMask ValueType;
1682 static const CommandId kCmdId = kDepthMask;
1683 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1684 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1686 static uint32_t ComputeSize() {
1687 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1690 void SetHeader() { header.SetCmd<ValueType>(); }
1692 void Init(GLboolean _flag) {
1693 SetHeader();
1694 flag = _flag;
1697 void* Set(void* cmd, GLboolean _flag) {
1698 static_cast<ValueType*>(cmd)->Init(_flag);
1699 return NextCmdAddress<ValueType>(cmd);
1702 gpu::CommandHeader header;
1703 uint32_t flag;
1706 COMPILE_ASSERT(sizeof(DepthMask) == 8, Sizeof_DepthMask_is_not_8);
1707 COMPILE_ASSERT(offsetof(DepthMask, header) == 0,
1708 OffsetOf_DepthMask_header_not_0);
1709 COMPILE_ASSERT(offsetof(DepthMask, flag) == 4, OffsetOf_DepthMask_flag_not_4);
1711 struct DepthRangef {
1712 typedef DepthRangef ValueType;
1713 static const CommandId kCmdId = kDepthRangef;
1714 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1715 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1717 static uint32_t ComputeSize() {
1718 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1721 void SetHeader() { header.SetCmd<ValueType>(); }
1723 void Init(GLclampf _zNear, GLclampf _zFar) {
1724 SetHeader();
1725 zNear = _zNear;
1726 zFar = _zFar;
1729 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
1730 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
1731 return NextCmdAddress<ValueType>(cmd);
1734 gpu::CommandHeader header;
1735 float zNear;
1736 float zFar;
1739 COMPILE_ASSERT(sizeof(DepthRangef) == 12, Sizeof_DepthRangef_is_not_12);
1740 COMPILE_ASSERT(offsetof(DepthRangef, header) == 0,
1741 OffsetOf_DepthRangef_header_not_0);
1742 COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4,
1743 OffsetOf_DepthRangef_zNear_not_4);
1744 COMPILE_ASSERT(offsetof(DepthRangef, zFar) == 8,
1745 OffsetOf_DepthRangef_zFar_not_8);
1747 struct DetachShader {
1748 typedef DetachShader ValueType;
1749 static const CommandId kCmdId = kDetachShader;
1750 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1751 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1753 static uint32_t ComputeSize() {
1754 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1757 void SetHeader() { header.SetCmd<ValueType>(); }
1759 void Init(GLuint _program, GLuint _shader) {
1760 SetHeader();
1761 program = _program;
1762 shader = _shader;
1765 void* Set(void* cmd, GLuint _program, GLuint _shader) {
1766 static_cast<ValueType*>(cmd)->Init(_program, _shader);
1767 return NextCmdAddress<ValueType>(cmd);
1770 gpu::CommandHeader header;
1771 uint32_t program;
1772 uint32_t shader;
1775 COMPILE_ASSERT(sizeof(DetachShader) == 12, Sizeof_DetachShader_is_not_12);
1776 COMPILE_ASSERT(offsetof(DetachShader, header) == 0,
1777 OffsetOf_DetachShader_header_not_0);
1778 COMPILE_ASSERT(offsetof(DetachShader, program) == 4,
1779 OffsetOf_DetachShader_program_not_4);
1780 COMPILE_ASSERT(offsetof(DetachShader, shader) == 8,
1781 OffsetOf_DetachShader_shader_not_8);
1783 struct Disable {
1784 typedef Disable ValueType;
1785 static const CommandId kCmdId = kDisable;
1786 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1787 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1789 static uint32_t ComputeSize() {
1790 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1793 void SetHeader() { header.SetCmd<ValueType>(); }
1795 void Init(GLenum _cap) {
1796 SetHeader();
1797 cap = _cap;
1800 void* Set(void* cmd, GLenum _cap) {
1801 static_cast<ValueType*>(cmd)->Init(_cap);
1802 return NextCmdAddress<ValueType>(cmd);
1805 gpu::CommandHeader header;
1806 uint32_t cap;
1809 COMPILE_ASSERT(sizeof(Disable) == 8, Sizeof_Disable_is_not_8);
1810 COMPILE_ASSERT(offsetof(Disable, header) == 0, OffsetOf_Disable_header_not_0);
1811 COMPILE_ASSERT(offsetof(Disable, cap) == 4, OffsetOf_Disable_cap_not_4);
1813 struct DisableVertexAttribArray {
1814 typedef DisableVertexAttribArray ValueType;
1815 static const CommandId kCmdId = kDisableVertexAttribArray;
1816 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1817 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1819 static uint32_t ComputeSize() {
1820 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1823 void SetHeader() { header.SetCmd<ValueType>(); }
1825 void Init(GLuint _index) {
1826 SetHeader();
1827 index = _index;
1830 void* Set(void* cmd, GLuint _index) {
1831 static_cast<ValueType*>(cmd)->Init(_index);
1832 return NextCmdAddress<ValueType>(cmd);
1835 gpu::CommandHeader header;
1836 uint32_t index;
1839 COMPILE_ASSERT(sizeof(DisableVertexAttribArray) == 8,
1840 Sizeof_DisableVertexAttribArray_is_not_8);
1841 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, header) == 0,
1842 OffsetOf_DisableVertexAttribArray_header_not_0);
1843 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, index) == 4,
1844 OffsetOf_DisableVertexAttribArray_index_not_4);
1846 struct DrawArrays {
1847 typedef DrawArrays ValueType;
1848 static const CommandId kCmdId = kDrawArrays;
1849 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1850 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
1852 static uint32_t ComputeSize() {
1853 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1856 void SetHeader() { header.SetCmd<ValueType>(); }
1858 void Init(GLenum _mode, GLint _first, GLsizei _count) {
1859 SetHeader();
1860 mode = _mode;
1861 first = _first;
1862 count = _count;
1865 void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
1866 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
1867 return NextCmdAddress<ValueType>(cmd);
1870 gpu::CommandHeader header;
1871 uint32_t mode;
1872 int32_t first;
1873 int32_t count;
1876 COMPILE_ASSERT(sizeof(DrawArrays) == 16, Sizeof_DrawArrays_is_not_16);
1877 COMPILE_ASSERT(offsetof(DrawArrays, header) == 0,
1878 OffsetOf_DrawArrays_header_not_0);
1879 COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4, OffsetOf_DrawArrays_mode_not_4);
1880 COMPILE_ASSERT(offsetof(DrawArrays, first) == 8,
1881 OffsetOf_DrawArrays_first_not_8);
1882 COMPILE_ASSERT(offsetof(DrawArrays, count) == 12,
1883 OffsetOf_DrawArrays_count_not_12);
1885 struct DrawElements {
1886 typedef DrawElements ValueType;
1887 static const CommandId kCmdId = kDrawElements;
1888 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
1891 static uint32_t ComputeSize() {
1892 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1895 void SetHeader() { header.SetCmd<ValueType>(); }
1897 void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
1898 SetHeader();
1899 mode = _mode;
1900 count = _count;
1901 type = _type;
1902 index_offset = _index_offset;
1905 void* Set(void* cmd,
1906 GLenum _mode,
1907 GLsizei _count,
1908 GLenum _type,
1909 GLuint _index_offset) {
1910 static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
1911 return NextCmdAddress<ValueType>(cmd);
1914 gpu::CommandHeader header;
1915 uint32_t mode;
1916 int32_t count;
1917 uint32_t type;
1918 uint32_t index_offset;
1921 COMPILE_ASSERT(sizeof(DrawElements) == 20, Sizeof_DrawElements_is_not_20);
1922 COMPILE_ASSERT(offsetof(DrawElements, header) == 0,
1923 OffsetOf_DrawElements_header_not_0);
1924 COMPILE_ASSERT(offsetof(DrawElements, mode) == 4,
1925 OffsetOf_DrawElements_mode_not_4);
1926 COMPILE_ASSERT(offsetof(DrawElements, count) == 8,
1927 OffsetOf_DrawElements_count_not_8);
1928 COMPILE_ASSERT(offsetof(DrawElements, type) == 12,
1929 OffsetOf_DrawElements_type_not_12);
1930 COMPILE_ASSERT(offsetof(DrawElements, index_offset) == 16,
1931 OffsetOf_DrawElements_index_offset_not_16);
1933 struct Enable {
1934 typedef Enable ValueType;
1935 static const CommandId kCmdId = kEnable;
1936 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1937 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1939 static uint32_t ComputeSize() {
1940 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1943 void SetHeader() { header.SetCmd<ValueType>(); }
1945 void Init(GLenum _cap) {
1946 SetHeader();
1947 cap = _cap;
1950 void* Set(void* cmd, GLenum _cap) {
1951 static_cast<ValueType*>(cmd)->Init(_cap);
1952 return NextCmdAddress<ValueType>(cmd);
1955 gpu::CommandHeader header;
1956 uint32_t cap;
1959 COMPILE_ASSERT(sizeof(Enable) == 8, Sizeof_Enable_is_not_8);
1960 COMPILE_ASSERT(offsetof(Enable, header) == 0, OffsetOf_Enable_header_not_0);
1961 COMPILE_ASSERT(offsetof(Enable, cap) == 4, OffsetOf_Enable_cap_not_4);
1963 struct EnableVertexAttribArray {
1964 typedef EnableVertexAttribArray ValueType;
1965 static const CommandId kCmdId = kEnableVertexAttribArray;
1966 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1967 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1969 static uint32_t ComputeSize() {
1970 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1973 void SetHeader() { header.SetCmd<ValueType>(); }
1975 void Init(GLuint _index) {
1976 SetHeader();
1977 index = _index;
1980 void* Set(void* cmd, GLuint _index) {
1981 static_cast<ValueType*>(cmd)->Init(_index);
1982 return NextCmdAddress<ValueType>(cmd);
1985 gpu::CommandHeader header;
1986 uint32_t index;
1989 COMPILE_ASSERT(sizeof(EnableVertexAttribArray) == 8,
1990 Sizeof_EnableVertexAttribArray_is_not_8);
1991 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, header) == 0,
1992 OffsetOf_EnableVertexAttribArray_header_not_0);
1993 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, index) == 4,
1994 OffsetOf_EnableVertexAttribArray_index_not_4);
1996 struct Finish {
1997 typedef Finish ValueType;
1998 static const CommandId kCmdId = kFinish;
1999 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2002 static uint32_t ComputeSize() {
2003 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2006 void SetHeader() { header.SetCmd<ValueType>(); }
2008 void Init() { SetHeader(); }
2010 void* Set(void* cmd) {
2011 static_cast<ValueType*>(cmd)->Init();
2012 return NextCmdAddress<ValueType>(cmd);
2015 gpu::CommandHeader header;
2018 COMPILE_ASSERT(sizeof(Finish) == 4, Sizeof_Finish_is_not_4);
2019 COMPILE_ASSERT(offsetof(Finish, header) == 0, OffsetOf_Finish_header_not_0);
2021 struct Flush {
2022 typedef Flush ValueType;
2023 static const CommandId kCmdId = kFlush;
2024 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2025 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2027 static uint32_t ComputeSize() {
2028 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2031 void SetHeader() { header.SetCmd<ValueType>(); }
2033 void Init() { SetHeader(); }
2035 void* Set(void* cmd) {
2036 static_cast<ValueType*>(cmd)->Init();
2037 return NextCmdAddress<ValueType>(cmd);
2040 gpu::CommandHeader header;
2043 COMPILE_ASSERT(sizeof(Flush) == 4, Sizeof_Flush_is_not_4);
2044 COMPILE_ASSERT(offsetof(Flush, header) == 0, OffsetOf_Flush_header_not_0);
2046 struct FramebufferRenderbuffer {
2047 typedef FramebufferRenderbuffer ValueType;
2048 static const CommandId kCmdId = kFramebufferRenderbuffer;
2049 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2050 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2052 static uint32_t ComputeSize() {
2053 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2056 void SetHeader() { header.SetCmd<ValueType>(); }
2058 void Init(GLenum _target,
2059 GLenum _attachment,
2060 GLenum _renderbuffertarget,
2061 GLuint _renderbuffer) {
2062 SetHeader();
2063 target = _target;
2064 attachment = _attachment;
2065 renderbuffertarget = _renderbuffertarget;
2066 renderbuffer = _renderbuffer;
2069 void* Set(void* cmd,
2070 GLenum _target,
2071 GLenum _attachment,
2072 GLenum _renderbuffertarget,
2073 GLuint _renderbuffer) {
2074 static_cast<ValueType*>(cmd)
2075 ->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
2076 return NextCmdAddress<ValueType>(cmd);
2079 gpu::CommandHeader header;
2080 uint32_t target;
2081 uint32_t attachment;
2082 uint32_t renderbuffertarget;
2083 uint32_t renderbuffer;
2086 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer) == 20,
2087 Sizeof_FramebufferRenderbuffer_is_not_20);
2088 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, header) == 0,
2089 OffsetOf_FramebufferRenderbuffer_header_not_0);
2090 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, target) == 4,
2091 OffsetOf_FramebufferRenderbuffer_target_not_4);
2092 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, attachment) == 8,
2093 OffsetOf_FramebufferRenderbuffer_attachment_not_8);
2094 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
2095 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12);
2096 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
2097 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16);
2099 struct FramebufferTexture2D {
2100 typedef FramebufferTexture2D ValueType;
2101 static const CommandId kCmdId = kFramebufferTexture2D;
2102 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2103 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2105 static uint32_t ComputeSize() {
2106 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2109 void SetHeader() { header.SetCmd<ValueType>(); }
2111 void Init(GLenum _target,
2112 GLenum _attachment,
2113 GLenum _textarget,
2114 GLuint _texture) {
2115 SetHeader();
2116 target = _target;
2117 attachment = _attachment;
2118 textarget = _textarget;
2119 texture = _texture;
2122 void* Set(void* cmd,
2123 GLenum _target,
2124 GLenum _attachment,
2125 GLenum _textarget,
2126 GLuint _texture) {
2127 static_cast<ValueType*>(cmd)
2128 ->Init(_target, _attachment, _textarget, _texture);
2129 return NextCmdAddress<ValueType>(cmd);
2132 gpu::CommandHeader header;
2133 uint32_t target;
2134 uint32_t attachment;
2135 uint32_t textarget;
2136 uint32_t texture;
2137 static const int32_t level = 0;
2140 COMPILE_ASSERT(sizeof(FramebufferTexture2D) == 20,
2141 Sizeof_FramebufferTexture2D_is_not_20);
2142 COMPILE_ASSERT(offsetof(FramebufferTexture2D, header) == 0,
2143 OffsetOf_FramebufferTexture2D_header_not_0);
2144 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4,
2145 OffsetOf_FramebufferTexture2D_target_not_4);
2146 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8,
2147 OffsetOf_FramebufferTexture2D_attachment_not_8);
2148 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12,
2149 OffsetOf_FramebufferTexture2D_textarget_not_12);
2150 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16,
2151 OffsetOf_FramebufferTexture2D_texture_not_16);
2153 struct FrontFace {
2154 typedef FrontFace ValueType;
2155 static const CommandId kCmdId = kFrontFace;
2156 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2157 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2159 static uint32_t ComputeSize() {
2160 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2163 void SetHeader() { header.SetCmd<ValueType>(); }
2165 void Init(GLenum _mode) {
2166 SetHeader();
2167 mode = _mode;
2170 void* Set(void* cmd, GLenum _mode) {
2171 static_cast<ValueType*>(cmd)->Init(_mode);
2172 return NextCmdAddress<ValueType>(cmd);
2175 gpu::CommandHeader header;
2176 uint32_t mode;
2179 COMPILE_ASSERT(sizeof(FrontFace) == 8, Sizeof_FrontFace_is_not_8);
2180 COMPILE_ASSERT(offsetof(FrontFace, header) == 0,
2181 OffsetOf_FrontFace_header_not_0);
2182 COMPILE_ASSERT(offsetof(FrontFace, mode) == 4, OffsetOf_FrontFace_mode_not_4);
2184 struct GenBuffersImmediate {
2185 typedef GenBuffersImmediate ValueType;
2186 static const CommandId kCmdId = kGenBuffersImmediate;
2187 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2188 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2190 static uint32_t ComputeDataSize(GLsizei n) {
2191 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2194 static uint32_t ComputeSize(GLsizei n) {
2195 return static_cast<uint32_t>(sizeof(ValueType) +
2196 ComputeDataSize(n)); // NOLINT
2199 void SetHeader(GLsizei n) {
2200 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2203 void Init(GLsizei _n, GLuint* _buffers) {
2204 SetHeader(_n);
2205 n = _n;
2206 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
2209 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
2210 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
2211 const uint32_t size = ComputeSize(_n);
2212 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2215 gpu::CommandHeader header;
2216 int32_t n;
2219 COMPILE_ASSERT(sizeof(GenBuffersImmediate) == 8,
2220 Sizeof_GenBuffersImmediate_is_not_8);
2221 COMPILE_ASSERT(offsetof(GenBuffersImmediate, header) == 0,
2222 OffsetOf_GenBuffersImmediate_header_not_0);
2223 COMPILE_ASSERT(offsetof(GenBuffersImmediate, n) == 4,
2224 OffsetOf_GenBuffersImmediate_n_not_4);
2226 struct GenerateMipmap {
2227 typedef GenerateMipmap ValueType;
2228 static const CommandId kCmdId = kGenerateMipmap;
2229 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2232 static uint32_t ComputeSize() {
2233 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2236 void SetHeader() { header.SetCmd<ValueType>(); }
2238 void Init(GLenum _target) {
2239 SetHeader();
2240 target = _target;
2243 void* Set(void* cmd, GLenum _target) {
2244 static_cast<ValueType*>(cmd)->Init(_target);
2245 return NextCmdAddress<ValueType>(cmd);
2248 gpu::CommandHeader header;
2249 uint32_t target;
2252 COMPILE_ASSERT(sizeof(GenerateMipmap) == 8, Sizeof_GenerateMipmap_is_not_8);
2253 COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0,
2254 OffsetOf_GenerateMipmap_header_not_0);
2255 COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4,
2256 OffsetOf_GenerateMipmap_target_not_4);
2258 struct GenFramebuffersImmediate {
2259 typedef GenFramebuffersImmediate ValueType;
2260 static const CommandId kCmdId = kGenFramebuffersImmediate;
2261 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2262 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2264 static uint32_t ComputeDataSize(GLsizei n) {
2265 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2268 static uint32_t ComputeSize(GLsizei n) {
2269 return static_cast<uint32_t>(sizeof(ValueType) +
2270 ComputeDataSize(n)); // NOLINT
2273 void SetHeader(GLsizei n) {
2274 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2277 void Init(GLsizei _n, GLuint* _framebuffers) {
2278 SetHeader(_n);
2279 n = _n;
2280 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
2283 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
2284 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
2285 const uint32_t size = ComputeSize(_n);
2286 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2289 gpu::CommandHeader header;
2290 int32_t n;
2293 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate) == 8,
2294 Sizeof_GenFramebuffersImmediate_is_not_8);
2295 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, header) == 0,
2296 OffsetOf_GenFramebuffersImmediate_header_not_0);
2297 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, n) == 4,
2298 OffsetOf_GenFramebuffersImmediate_n_not_4);
2300 struct GenRenderbuffersImmediate {
2301 typedef GenRenderbuffersImmediate ValueType;
2302 static const CommandId kCmdId = kGenRenderbuffersImmediate;
2303 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2304 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2306 static uint32_t ComputeDataSize(GLsizei n) {
2307 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2310 static uint32_t ComputeSize(GLsizei n) {
2311 return static_cast<uint32_t>(sizeof(ValueType) +
2312 ComputeDataSize(n)); // NOLINT
2315 void SetHeader(GLsizei n) {
2316 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2319 void Init(GLsizei _n, GLuint* _renderbuffers) {
2320 SetHeader(_n);
2321 n = _n;
2322 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
2325 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
2326 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
2327 const uint32_t size = ComputeSize(_n);
2328 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2331 gpu::CommandHeader header;
2332 int32_t n;
2335 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8,
2336 Sizeof_GenRenderbuffersImmediate_is_not_8);
2337 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0,
2338 OffsetOf_GenRenderbuffersImmediate_header_not_0);
2339 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4,
2340 OffsetOf_GenRenderbuffersImmediate_n_not_4);
2342 struct GenTexturesImmediate {
2343 typedef GenTexturesImmediate ValueType;
2344 static const CommandId kCmdId = kGenTexturesImmediate;
2345 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2346 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2348 static uint32_t ComputeDataSize(GLsizei n) {
2349 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2352 static uint32_t ComputeSize(GLsizei n) {
2353 return static_cast<uint32_t>(sizeof(ValueType) +
2354 ComputeDataSize(n)); // NOLINT
2357 void SetHeader(GLsizei n) {
2358 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2361 void Init(GLsizei _n, GLuint* _textures) {
2362 SetHeader(_n);
2363 n = _n;
2364 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
2367 void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
2368 static_cast<ValueType*>(cmd)->Init(_n, _textures);
2369 const uint32_t size = ComputeSize(_n);
2370 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2373 gpu::CommandHeader header;
2374 int32_t n;
2377 COMPILE_ASSERT(sizeof(GenTexturesImmediate) == 8,
2378 Sizeof_GenTexturesImmediate_is_not_8);
2379 COMPILE_ASSERT(offsetof(GenTexturesImmediate, header) == 0,
2380 OffsetOf_GenTexturesImmediate_header_not_0);
2381 COMPILE_ASSERT(offsetof(GenTexturesImmediate, n) == 4,
2382 OffsetOf_GenTexturesImmediate_n_not_4);
2384 struct GetActiveAttrib {
2385 typedef GetActiveAttrib ValueType;
2386 static const CommandId kCmdId = kGetActiveAttrib;
2387 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2388 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2390 struct Result {
2391 int32_t success;
2392 int32_t size;
2393 uint32_t type;
2396 static uint32_t ComputeSize() {
2397 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2400 void SetHeader() { header.SetCmd<ValueType>(); }
2402 void Init(GLuint _program,
2403 GLuint _index,
2404 uint32_t _name_bucket_id,
2405 uint32_t _result_shm_id,
2406 uint32_t _result_shm_offset) {
2407 SetHeader();
2408 program = _program;
2409 index = _index;
2410 name_bucket_id = _name_bucket_id;
2411 result_shm_id = _result_shm_id;
2412 result_shm_offset = _result_shm_offset;
2415 void* Set(void* cmd,
2416 GLuint _program,
2417 GLuint _index,
2418 uint32_t _name_bucket_id,
2419 uint32_t _result_shm_id,
2420 uint32_t _result_shm_offset) {
2421 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
2422 _result_shm_id, _result_shm_offset);
2423 return NextCmdAddress<ValueType>(cmd);
2426 gpu::CommandHeader header;
2427 uint32_t program;
2428 uint32_t index;
2429 uint32_t name_bucket_id;
2430 uint32_t result_shm_id;
2431 uint32_t result_shm_offset;
2434 COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24, Sizeof_GetActiveAttrib_is_not_24);
2435 COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0,
2436 OffsetOf_GetActiveAttrib_header_not_0);
2437 COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4,
2438 OffsetOf_GetActiveAttrib_program_not_4);
2439 COMPILE_ASSERT(offsetof(GetActiveAttrib, index) == 8,
2440 OffsetOf_GetActiveAttrib_index_not_8);
2441 COMPILE_ASSERT(offsetof(GetActiveAttrib, name_bucket_id) == 12,
2442 OffsetOf_GetActiveAttrib_name_bucket_id_not_12);
2443 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_id) == 16,
2444 OffsetOf_GetActiveAttrib_result_shm_id_not_16);
2445 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_offset) == 20,
2446 OffsetOf_GetActiveAttrib_result_shm_offset_not_20);
2447 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, success) == 0,
2448 OffsetOf_GetActiveAttrib_Result_success_not_0);
2449 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, size) == 4,
2450 OffsetOf_GetActiveAttrib_Result_size_not_4);
2451 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, type) == 8,
2452 OffsetOf_GetActiveAttrib_Result_type_not_8);
2454 struct GetActiveUniform {
2455 typedef GetActiveUniform ValueType;
2456 static const CommandId kCmdId = kGetActiveUniform;
2457 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2458 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2460 struct Result {
2461 int32_t success;
2462 int32_t size;
2463 uint32_t type;
2466 static uint32_t ComputeSize() {
2467 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2470 void SetHeader() { header.SetCmd<ValueType>(); }
2472 void Init(GLuint _program,
2473 GLuint _index,
2474 uint32_t _name_bucket_id,
2475 uint32_t _result_shm_id,
2476 uint32_t _result_shm_offset) {
2477 SetHeader();
2478 program = _program;
2479 index = _index;
2480 name_bucket_id = _name_bucket_id;
2481 result_shm_id = _result_shm_id;
2482 result_shm_offset = _result_shm_offset;
2485 void* Set(void* cmd,
2486 GLuint _program,
2487 GLuint _index,
2488 uint32_t _name_bucket_id,
2489 uint32_t _result_shm_id,
2490 uint32_t _result_shm_offset) {
2491 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
2492 _result_shm_id, _result_shm_offset);
2493 return NextCmdAddress<ValueType>(cmd);
2496 gpu::CommandHeader header;
2497 uint32_t program;
2498 uint32_t index;
2499 uint32_t name_bucket_id;
2500 uint32_t result_shm_id;
2501 uint32_t result_shm_offset;
2504 COMPILE_ASSERT(sizeof(GetActiveUniform) == 24,
2505 Sizeof_GetActiveUniform_is_not_24);
2506 COMPILE_ASSERT(offsetof(GetActiveUniform, header) == 0,
2507 OffsetOf_GetActiveUniform_header_not_0);
2508 COMPILE_ASSERT(offsetof(GetActiveUniform, program) == 4,
2509 OffsetOf_GetActiveUniform_program_not_4);
2510 COMPILE_ASSERT(offsetof(GetActiveUniform, index) == 8,
2511 OffsetOf_GetActiveUniform_index_not_8);
2512 COMPILE_ASSERT(offsetof(GetActiveUniform, name_bucket_id) == 12,
2513 OffsetOf_GetActiveUniform_name_bucket_id_not_12);
2514 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_id) == 16,
2515 OffsetOf_GetActiveUniform_result_shm_id_not_16);
2516 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_offset) == 20,
2517 OffsetOf_GetActiveUniform_result_shm_offset_not_20);
2518 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, success) == 0,
2519 OffsetOf_GetActiveUniform_Result_success_not_0);
2520 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, size) == 4,
2521 OffsetOf_GetActiveUniform_Result_size_not_4);
2522 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, type) == 8,
2523 OffsetOf_GetActiveUniform_Result_type_not_8);
2525 struct GetAttachedShaders {
2526 typedef GetAttachedShaders ValueType;
2527 static const CommandId kCmdId = kGetAttachedShaders;
2528 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2529 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2531 typedef SizedResult<GLuint> Result;
2533 static uint32_t ComputeSize() {
2534 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2537 void SetHeader() { header.SetCmd<ValueType>(); }
2539 void Init(GLuint _program,
2540 uint32_t _result_shm_id,
2541 uint32_t _result_shm_offset,
2542 uint32_t _result_size) {
2543 SetHeader();
2544 program = _program;
2545 result_shm_id = _result_shm_id;
2546 result_shm_offset = _result_shm_offset;
2547 result_size = _result_size;
2550 void* Set(void* cmd,
2551 GLuint _program,
2552 uint32_t _result_shm_id,
2553 uint32_t _result_shm_offset,
2554 uint32_t _result_size) {
2555 static_cast<ValueType*>(cmd)
2556 ->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
2557 return NextCmdAddress<ValueType>(cmd);
2560 gpu::CommandHeader header;
2561 uint32_t program;
2562 uint32_t result_shm_id;
2563 uint32_t result_shm_offset;
2564 uint32_t result_size;
2567 COMPILE_ASSERT(sizeof(GetAttachedShaders) == 20,
2568 Sizeof_GetAttachedShaders_is_not_20);
2569 COMPILE_ASSERT(offsetof(GetAttachedShaders, header) == 0,
2570 OffsetOf_GetAttachedShaders_header_not_0);
2571 COMPILE_ASSERT(offsetof(GetAttachedShaders, program) == 4,
2572 OffsetOf_GetAttachedShaders_program_not_4);
2573 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_id) == 8,
2574 OffsetOf_GetAttachedShaders_result_shm_id_not_8);
2575 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_offset) == 12,
2576 OffsetOf_GetAttachedShaders_result_shm_offset_not_12);
2577 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_size) == 16,
2578 OffsetOf_GetAttachedShaders_result_size_not_16);
2580 struct GetAttribLocation {
2581 typedef GetAttribLocation ValueType;
2582 static const CommandId kCmdId = kGetAttribLocation;
2583 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2584 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2586 typedef GLint Result;
2588 static uint32_t ComputeSize() {
2589 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2592 void SetHeader() { header.SetCmd<ValueType>(); }
2594 void Init(GLuint _program,
2595 uint32_t _name_bucket_id,
2596 uint32_t _location_shm_id,
2597 uint32_t _location_shm_offset) {
2598 SetHeader();
2599 program = _program;
2600 name_bucket_id = _name_bucket_id;
2601 location_shm_id = _location_shm_id;
2602 location_shm_offset = _location_shm_offset;
2605 void* Set(void* cmd,
2606 GLuint _program,
2607 uint32_t _name_bucket_id,
2608 uint32_t _location_shm_id,
2609 uint32_t _location_shm_offset) {
2610 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
2611 _location_shm_id, _location_shm_offset);
2612 return NextCmdAddress<ValueType>(cmd);
2615 gpu::CommandHeader header;
2616 uint32_t program;
2617 uint32_t name_bucket_id;
2618 uint32_t location_shm_id;
2619 uint32_t location_shm_offset;
2622 COMPILE_ASSERT(sizeof(GetAttribLocation) == 20,
2623 Sizeof_GetAttribLocation_is_not_20);
2624 COMPILE_ASSERT(offsetof(GetAttribLocation, header) == 0,
2625 OffsetOf_GetAttribLocation_header_not_0);
2626 COMPILE_ASSERT(offsetof(GetAttribLocation, program) == 4,
2627 OffsetOf_GetAttribLocation_program_not_4);
2628 COMPILE_ASSERT(offsetof(GetAttribLocation, name_bucket_id) == 8,
2629 OffsetOf_GetAttribLocation_name_bucket_id_not_8);
2630 COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_id) == 12,
2631 OffsetOf_GetAttribLocation_location_shm_id_not_12);
2632 COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_offset) == 16,
2633 OffsetOf_GetAttribLocation_location_shm_offset_not_16);
2635 struct GetBooleanv {
2636 typedef GetBooleanv ValueType;
2637 static const CommandId kCmdId = kGetBooleanv;
2638 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2639 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2641 typedef SizedResult<GLboolean> Result;
2643 static uint32_t ComputeSize() {
2644 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2647 void SetHeader() { header.SetCmd<ValueType>(); }
2649 void Init(GLenum _pname,
2650 uint32_t _params_shm_id,
2651 uint32_t _params_shm_offset) {
2652 SetHeader();
2653 pname = _pname;
2654 params_shm_id = _params_shm_id;
2655 params_shm_offset = _params_shm_offset;
2658 void* Set(void* cmd,
2659 GLenum _pname,
2660 uint32_t _params_shm_id,
2661 uint32_t _params_shm_offset) {
2662 static_cast<ValueType*>(cmd)
2663 ->Init(_pname, _params_shm_id, _params_shm_offset);
2664 return NextCmdAddress<ValueType>(cmd);
2667 gpu::CommandHeader header;
2668 uint32_t pname;
2669 uint32_t params_shm_id;
2670 uint32_t params_shm_offset;
2673 COMPILE_ASSERT(sizeof(GetBooleanv) == 16, Sizeof_GetBooleanv_is_not_16);
2674 COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0,
2675 OffsetOf_GetBooleanv_header_not_0);
2676 COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4,
2677 OffsetOf_GetBooleanv_pname_not_4);
2678 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_id) == 8,
2679 OffsetOf_GetBooleanv_params_shm_id_not_8);
2680 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_offset) == 12,
2681 OffsetOf_GetBooleanv_params_shm_offset_not_12);
2683 struct GetBufferParameteriv {
2684 typedef GetBufferParameteriv ValueType;
2685 static const CommandId kCmdId = kGetBufferParameteriv;
2686 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2687 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2689 typedef SizedResult<GLint> Result;
2691 static uint32_t ComputeSize() {
2692 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2695 void SetHeader() { header.SetCmd<ValueType>(); }
2697 void Init(GLenum _target,
2698 GLenum _pname,
2699 uint32_t _params_shm_id,
2700 uint32_t _params_shm_offset) {
2701 SetHeader();
2702 target = _target;
2703 pname = _pname;
2704 params_shm_id = _params_shm_id;
2705 params_shm_offset = _params_shm_offset;
2708 void* Set(void* cmd,
2709 GLenum _target,
2710 GLenum _pname,
2711 uint32_t _params_shm_id,
2712 uint32_t _params_shm_offset) {
2713 static_cast<ValueType*>(cmd)
2714 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
2715 return NextCmdAddress<ValueType>(cmd);
2718 gpu::CommandHeader header;
2719 uint32_t target;
2720 uint32_t pname;
2721 uint32_t params_shm_id;
2722 uint32_t params_shm_offset;
2725 COMPILE_ASSERT(sizeof(GetBufferParameteriv) == 20,
2726 Sizeof_GetBufferParameteriv_is_not_20);
2727 COMPILE_ASSERT(offsetof(GetBufferParameteriv, header) == 0,
2728 OffsetOf_GetBufferParameteriv_header_not_0);
2729 COMPILE_ASSERT(offsetof(GetBufferParameteriv, target) == 4,
2730 OffsetOf_GetBufferParameteriv_target_not_4);
2731 COMPILE_ASSERT(offsetof(GetBufferParameteriv, pname) == 8,
2732 OffsetOf_GetBufferParameteriv_pname_not_8);
2733 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_id) == 12,
2734 OffsetOf_GetBufferParameteriv_params_shm_id_not_12);
2735 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
2736 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16);
2738 struct GetError {
2739 typedef GetError ValueType;
2740 static const CommandId kCmdId = kGetError;
2741 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2742 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2744 typedef GLenum Result;
2746 static uint32_t ComputeSize() {
2747 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2750 void SetHeader() { header.SetCmd<ValueType>(); }
2752 void Init(uint32_t _result_shm_id, uint32_t _result_shm_offset) {
2753 SetHeader();
2754 result_shm_id = _result_shm_id;
2755 result_shm_offset = _result_shm_offset;
2758 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
2759 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
2760 return NextCmdAddress<ValueType>(cmd);
2763 gpu::CommandHeader header;
2764 uint32_t result_shm_id;
2765 uint32_t result_shm_offset;
2768 COMPILE_ASSERT(sizeof(GetError) == 12, Sizeof_GetError_is_not_12);
2769 COMPILE_ASSERT(offsetof(GetError, header) == 0, OffsetOf_GetError_header_not_0);
2770 COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4,
2771 OffsetOf_GetError_result_shm_id_not_4);
2772 COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8,
2773 OffsetOf_GetError_result_shm_offset_not_8);
2775 struct GetFloatv {
2776 typedef GetFloatv ValueType;
2777 static const CommandId kCmdId = kGetFloatv;
2778 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2779 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2781 typedef SizedResult<GLfloat> Result;
2783 static uint32_t ComputeSize() {
2784 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2787 void SetHeader() { header.SetCmd<ValueType>(); }
2789 void Init(GLenum _pname,
2790 uint32_t _params_shm_id,
2791 uint32_t _params_shm_offset) {
2792 SetHeader();
2793 pname = _pname;
2794 params_shm_id = _params_shm_id;
2795 params_shm_offset = _params_shm_offset;
2798 void* Set(void* cmd,
2799 GLenum _pname,
2800 uint32_t _params_shm_id,
2801 uint32_t _params_shm_offset) {
2802 static_cast<ValueType*>(cmd)
2803 ->Init(_pname, _params_shm_id, _params_shm_offset);
2804 return NextCmdAddress<ValueType>(cmd);
2807 gpu::CommandHeader header;
2808 uint32_t pname;
2809 uint32_t params_shm_id;
2810 uint32_t params_shm_offset;
2813 COMPILE_ASSERT(sizeof(GetFloatv) == 16, Sizeof_GetFloatv_is_not_16);
2814 COMPILE_ASSERT(offsetof(GetFloatv, header) == 0,
2815 OffsetOf_GetFloatv_header_not_0);
2816 COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4, OffsetOf_GetFloatv_pname_not_4);
2817 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8,
2818 OffsetOf_GetFloatv_params_shm_id_not_8);
2819 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12,
2820 OffsetOf_GetFloatv_params_shm_offset_not_12);
2822 struct GetFramebufferAttachmentParameteriv {
2823 typedef GetFramebufferAttachmentParameteriv ValueType;
2824 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
2825 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2826 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2828 typedef SizedResult<GLint> Result;
2830 static uint32_t ComputeSize() {
2831 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2834 void SetHeader() { header.SetCmd<ValueType>(); }
2836 void Init(GLenum _target,
2837 GLenum _attachment,
2838 GLenum _pname,
2839 uint32_t _params_shm_id,
2840 uint32_t _params_shm_offset) {
2841 SetHeader();
2842 target = _target;
2843 attachment = _attachment;
2844 pname = _pname;
2845 params_shm_id = _params_shm_id;
2846 params_shm_offset = _params_shm_offset;
2849 void* Set(void* cmd,
2850 GLenum _target,
2851 GLenum _attachment,
2852 GLenum _pname,
2853 uint32_t _params_shm_id,
2854 uint32_t _params_shm_offset) {
2855 static_cast<ValueType*>(cmd)->Init(_target, _attachment, _pname,
2856 _params_shm_id, _params_shm_offset);
2857 return NextCmdAddress<ValueType>(cmd);
2860 gpu::CommandHeader header;
2861 uint32_t target;
2862 uint32_t attachment;
2863 uint32_t pname;
2864 uint32_t params_shm_id;
2865 uint32_t params_shm_offset;
2868 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv) == 24,
2869 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24);
2870 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
2871 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0);
2872 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
2873 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4);
2874 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
2875 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8);
2876 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
2877 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12);
2878 COMPILE_ASSERT(
2879 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
2880 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16);
2881 COMPILE_ASSERT(
2882 offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20,
2883 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20);
2885 struct GetIntegerv {
2886 typedef GetIntegerv ValueType;
2887 static const CommandId kCmdId = kGetIntegerv;
2888 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2891 typedef SizedResult<GLint> Result;
2893 static uint32_t ComputeSize() {
2894 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2897 void SetHeader() { header.SetCmd<ValueType>(); }
2899 void Init(GLenum _pname,
2900 uint32_t _params_shm_id,
2901 uint32_t _params_shm_offset) {
2902 SetHeader();
2903 pname = _pname;
2904 params_shm_id = _params_shm_id;
2905 params_shm_offset = _params_shm_offset;
2908 void* Set(void* cmd,
2909 GLenum _pname,
2910 uint32_t _params_shm_id,
2911 uint32_t _params_shm_offset) {
2912 static_cast<ValueType*>(cmd)
2913 ->Init(_pname, _params_shm_id, _params_shm_offset);
2914 return NextCmdAddress<ValueType>(cmd);
2917 gpu::CommandHeader header;
2918 uint32_t pname;
2919 uint32_t params_shm_id;
2920 uint32_t params_shm_offset;
2923 COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16);
2924 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0,
2925 OffsetOf_GetIntegerv_header_not_0);
2926 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4,
2927 OffsetOf_GetIntegerv_pname_not_4);
2928 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8,
2929 OffsetOf_GetIntegerv_params_shm_id_not_8);
2930 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12,
2931 OffsetOf_GetIntegerv_params_shm_offset_not_12);
2933 struct GetProgramiv {
2934 typedef GetProgramiv ValueType;
2935 static const CommandId kCmdId = kGetProgramiv;
2936 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2937 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2939 typedef SizedResult<GLint> Result;
2941 static uint32_t ComputeSize() {
2942 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2945 void SetHeader() { header.SetCmd<ValueType>(); }
2947 void Init(GLuint _program,
2948 GLenum _pname,
2949 uint32_t _params_shm_id,
2950 uint32_t _params_shm_offset) {
2951 SetHeader();
2952 program = _program;
2953 pname = _pname;
2954 params_shm_id = _params_shm_id;
2955 params_shm_offset = _params_shm_offset;
2958 void* Set(void* cmd,
2959 GLuint _program,
2960 GLenum _pname,
2961 uint32_t _params_shm_id,
2962 uint32_t _params_shm_offset) {
2963 static_cast<ValueType*>(cmd)
2964 ->Init(_program, _pname, _params_shm_id, _params_shm_offset);
2965 return NextCmdAddress<ValueType>(cmd);
2968 gpu::CommandHeader header;
2969 uint32_t program;
2970 uint32_t pname;
2971 uint32_t params_shm_id;
2972 uint32_t params_shm_offset;
2975 COMPILE_ASSERT(sizeof(GetProgramiv) == 20, Sizeof_GetProgramiv_is_not_20);
2976 COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0,
2977 OffsetOf_GetProgramiv_header_not_0);
2978 COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4,
2979 OffsetOf_GetProgramiv_program_not_4);
2980 COMPILE_ASSERT(offsetof(GetProgramiv, pname) == 8,
2981 OffsetOf_GetProgramiv_pname_not_8);
2982 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_id) == 12,
2983 OffsetOf_GetProgramiv_params_shm_id_not_12);
2984 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_offset) == 16,
2985 OffsetOf_GetProgramiv_params_shm_offset_not_16);
2987 struct GetProgramInfoLog {
2988 typedef GetProgramInfoLog ValueType;
2989 static const CommandId kCmdId = kGetProgramInfoLog;
2990 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2991 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2993 static uint32_t ComputeSize() {
2994 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2997 void SetHeader() { header.SetCmd<ValueType>(); }
2999 void Init(GLuint _program, uint32_t _bucket_id) {
3000 SetHeader();
3001 program = _program;
3002 bucket_id = _bucket_id;
3005 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
3006 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
3007 return NextCmdAddress<ValueType>(cmd);
3010 gpu::CommandHeader header;
3011 uint32_t program;
3012 uint32_t bucket_id;
3015 COMPILE_ASSERT(sizeof(GetProgramInfoLog) == 12,
3016 Sizeof_GetProgramInfoLog_is_not_12);
3017 COMPILE_ASSERT(offsetof(GetProgramInfoLog, header) == 0,
3018 OffsetOf_GetProgramInfoLog_header_not_0);
3019 COMPILE_ASSERT(offsetof(GetProgramInfoLog, program) == 4,
3020 OffsetOf_GetProgramInfoLog_program_not_4);
3021 COMPILE_ASSERT(offsetof(GetProgramInfoLog, bucket_id) == 8,
3022 OffsetOf_GetProgramInfoLog_bucket_id_not_8);
3024 struct GetRenderbufferParameteriv {
3025 typedef GetRenderbufferParameteriv ValueType;
3026 static const CommandId kCmdId = kGetRenderbufferParameteriv;
3027 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3028 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3030 typedef SizedResult<GLint> Result;
3032 static uint32_t ComputeSize() {
3033 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3036 void SetHeader() { header.SetCmd<ValueType>(); }
3038 void Init(GLenum _target,
3039 GLenum _pname,
3040 uint32_t _params_shm_id,
3041 uint32_t _params_shm_offset) {
3042 SetHeader();
3043 target = _target;
3044 pname = _pname;
3045 params_shm_id = _params_shm_id;
3046 params_shm_offset = _params_shm_offset;
3049 void* Set(void* cmd,
3050 GLenum _target,
3051 GLenum _pname,
3052 uint32_t _params_shm_id,
3053 uint32_t _params_shm_offset) {
3054 static_cast<ValueType*>(cmd)
3055 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3056 return NextCmdAddress<ValueType>(cmd);
3059 gpu::CommandHeader header;
3060 uint32_t target;
3061 uint32_t pname;
3062 uint32_t params_shm_id;
3063 uint32_t params_shm_offset;
3066 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv) == 20,
3067 Sizeof_GetRenderbufferParameteriv_is_not_20);
3068 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, header) == 0,
3069 OffsetOf_GetRenderbufferParameteriv_header_not_0);
3070 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4,
3071 OffsetOf_GetRenderbufferParameteriv_target_not_4);
3072 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8,
3073 OffsetOf_GetRenderbufferParameteriv_pname_not_8);
3074 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
3075 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12);
3076 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
3077 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16);
3079 struct GetShaderiv {
3080 typedef GetShaderiv ValueType;
3081 static const CommandId kCmdId = kGetShaderiv;
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_t ComputeSize() {
3088 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3091 void SetHeader() { header.SetCmd<ValueType>(); }
3093 void Init(GLuint _shader,
3094 GLenum _pname,
3095 uint32_t _params_shm_id,
3096 uint32_t _params_shm_offset) {
3097 SetHeader();
3098 shader = _shader;
3099 pname = _pname;
3100 params_shm_id = _params_shm_id;
3101 params_shm_offset = _params_shm_offset;
3104 void* Set(void* cmd,
3105 GLuint _shader,
3106 GLenum _pname,
3107 uint32_t _params_shm_id,
3108 uint32_t _params_shm_offset) {
3109 static_cast<ValueType*>(cmd)
3110 ->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
3111 return NextCmdAddress<ValueType>(cmd);
3114 gpu::CommandHeader header;
3115 uint32_t shader;
3116 uint32_t pname;
3117 uint32_t params_shm_id;
3118 uint32_t params_shm_offset;
3121 COMPILE_ASSERT(sizeof(GetShaderiv) == 20, Sizeof_GetShaderiv_is_not_20);
3122 COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0,
3123 OffsetOf_GetShaderiv_header_not_0);
3124 COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4,
3125 OffsetOf_GetShaderiv_shader_not_4);
3126 COMPILE_ASSERT(offsetof(GetShaderiv, pname) == 8,
3127 OffsetOf_GetShaderiv_pname_not_8);
3128 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_id) == 12,
3129 OffsetOf_GetShaderiv_params_shm_id_not_12);
3130 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_offset) == 16,
3131 OffsetOf_GetShaderiv_params_shm_offset_not_16);
3133 struct GetShaderInfoLog {
3134 typedef GetShaderInfoLog ValueType;
3135 static const CommandId kCmdId = kGetShaderInfoLog;
3136 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3137 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3139 static uint32_t ComputeSize() {
3140 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3143 void SetHeader() { header.SetCmd<ValueType>(); }
3145 void Init(GLuint _shader, uint32_t _bucket_id) {
3146 SetHeader();
3147 shader = _shader;
3148 bucket_id = _bucket_id;
3151 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
3152 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3153 return NextCmdAddress<ValueType>(cmd);
3156 gpu::CommandHeader header;
3157 uint32_t shader;
3158 uint32_t bucket_id;
3161 COMPILE_ASSERT(sizeof(GetShaderInfoLog) == 12,
3162 Sizeof_GetShaderInfoLog_is_not_12);
3163 COMPILE_ASSERT(offsetof(GetShaderInfoLog, header) == 0,
3164 OffsetOf_GetShaderInfoLog_header_not_0);
3165 COMPILE_ASSERT(offsetof(GetShaderInfoLog, shader) == 4,
3166 OffsetOf_GetShaderInfoLog_shader_not_4);
3167 COMPILE_ASSERT(offsetof(GetShaderInfoLog, bucket_id) == 8,
3168 OffsetOf_GetShaderInfoLog_bucket_id_not_8);
3170 struct GetShaderPrecisionFormat {
3171 typedef GetShaderPrecisionFormat ValueType;
3172 static const CommandId kCmdId = kGetShaderPrecisionFormat;
3173 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3174 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3176 struct Result {
3177 int32_t success;
3178 int32_t min_range;
3179 int32_t max_range;
3180 int32_t precision;
3183 static uint32_t ComputeSize() {
3184 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3187 void SetHeader() { header.SetCmd<ValueType>(); }
3189 void Init(GLenum _shadertype,
3190 GLenum _precisiontype,
3191 uint32_t _result_shm_id,
3192 uint32_t _result_shm_offset) {
3193 SetHeader();
3194 shadertype = _shadertype;
3195 precisiontype = _precisiontype;
3196 result_shm_id = _result_shm_id;
3197 result_shm_offset = _result_shm_offset;
3200 void* Set(void* cmd,
3201 GLenum _shadertype,
3202 GLenum _precisiontype,
3203 uint32_t _result_shm_id,
3204 uint32_t _result_shm_offset) {
3205 static_cast<ValueType*>(cmd)
3206 ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
3207 return NextCmdAddress<ValueType>(cmd);
3210 gpu::CommandHeader header;
3211 uint32_t shadertype;
3212 uint32_t precisiontype;
3213 uint32_t result_shm_id;
3214 uint32_t result_shm_offset;
3217 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat) == 20,
3218 Sizeof_GetShaderPrecisionFormat_is_not_20);
3219 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, header) == 0,
3220 OffsetOf_GetShaderPrecisionFormat_header_not_0);
3221 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
3222 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4);
3223 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
3224 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8);
3225 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
3226 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12);
3227 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
3228 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16);
3229 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
3230 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0);
3231 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
3232 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4);
3233 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
3234 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8);
3235 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
3236 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12);
3238 struct GetShaderSource {
3239 typedef GetShaderSource ValueType;
3240 static const CommandId kCmdId = kGetShaderSource;
3241 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3242 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3244 static uint32_t ComputeSize() {
3245 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3248 void SetHeader() { header.SetCmd<ValueType>(); }
3250 void Init(GLuint _shader, uint32_t _bucket_id) {
3251 SetHeader();
3252 shader = _shader;
3253 bucket_id = _bucket_id;
3256 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
3257 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
3258 return NextCmdAddress<ValueType>(cmd);
3261 gpu::CommandHeader header;
3262 uint32_t shader;
3263 uint32_t bucket_id;
3266 COMPILE_ASSERT(sizeof(GetShaderSource) == 12, Sizeof_GetShaderSource_is_not_12);
3267 COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0,
3268 OffsetOf_GetShaderSource_header_not_0);
3269 COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4,
3270 OffsetOf_GetShaderSource_shader_not_4);
3271 COMPILE_ASSERT(offsetof(GetShaderSource, bucket_id) == 8,
3272 OffsetOf_GetShaderSource_bucket_id_not_8);
3274 struct GetString {
3275 typedef GetString ValueType;
3276 static const CommandId kCmdId = kGetString;
3277 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3278 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3280 static uint32_t ComputeSize() {
3281 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3284 void SetHeader() { header.SetCmd<ValueType>(); }
3286 void Init(GLenum _name, uint32_t _bucket_id) {
3287 SetHeader();
3288 name = _name;
3289 bucket_id = _bucket_id;
3292 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) {
3293 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
3294 return NextCmdAddress<ValueType>(cmd);
3297 gpu::CommandHeader header;
3298 uint32_t name;
3299 uint32_t bucket_id;
3302 COMPILE_ASSERT(sizeof(GetString) == 12, Sizeof_GetString_is_not_12);
3303 COMPILE_ASSERT(offsetof(GetString, header) == 0,
3304 OffsetOf_GetString_header_not_0);
3305 COMPILE_ASSERT(offsetof(GetString, name) == 4, OffsetOf_GetString_name_not_4);
3306 COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8,
3307 OffsetOf_GetString_bucket_id_not_8);
3309 struct GetTexParameterfv {
3310 typedef GetTexParameterfv ValueType;
3311 static const CommandId kCmdId = kGetTexParameterfv;
3312 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3313 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3315 typedef SizedResult<GLfloat> Result;
3317 static uint32_t ComputeSize() {
3318 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3321 void SetHeader() { header.SetCmd<ValueType>(); }
3323 void Init(GLenum _target,
3324 GLenum _pname,
3325 uint32_t _params_shm_id,
3326 uint32_t _params_shm_offset) {
3327 SetHeader();
3328 target = _target;
3329 pname = _pname;
3330 params_shm_id = _params_shm_id;
3331 params_shm_offset = _params_shm_offset;
3334 void* Set(void* cmd,
3335 GLenum _target,
3336 GLenum _pname,
3337 uint32_t _params_shm_id,
3338 uint32_t _params_shm_offset) {
3339 static_cast<ValueType*>(cmd)
3340 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3341 return NextCmdAddress<ValueType>(cmd);
3344 gpu::CommandHeader header;
3345 uint32_t target;
3346 uint32_t pname;
3347 uint32_t params_shm_id;
3348 uint32_t params_shm_offset;
3351 COMPILE_ASSERT(sizeof(GetTexParameterfv) == 20,
3352 Sizeof_GetTexParameterfv_is_not_20);
3353 COMPILE_ASSERT(offsetof(GetTexParameterfv, header) == 0,
3354 OffsetOf_GetTexParameterfv_header_not_0);
3355 COMPILE_ASSERT(offsetof(GetTexParameterfv, target) == 4,
3356 OffsetOf_GetTexParameterfv_target_not_4);
3357 COMPILE_ASSERT(offsetof(GetTexParameterfv, pname) == 8,
3358 OffsetOf_GetTexParameterfv_pname_not_8);
3359 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_id) == 12,
3360 OffsetOf_GetTexParameterfv_params_shm_id_not_12);
3361 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_offset) == 16,
3362 OffsetOf_GetTexParameterfv_params_shm_offset_not_16);
3364 struct GetTexParameteriv {
3365 typedef GetTexParameteriv ValueType;
3366 static const CommandId kCmdId = kGetTexParameteriv;
3367 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3368 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3370 typedef SizedResult<GLint> Result;
3372 static uint32_t ComputeSize() {
3373 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3376 void SetHeader() { header.SetCmd<ValueType>(); }
3378 void Init(GLenum _target,
3379 GLenum _pname,
3380 uint32_t _params_shm_id,
3381 uint32_t _params_shm_offset) {
3382 SetHeader();
3383 target = _target;
3384 pname = _pname;
3385 params_shm_id = _params_shm_id;
3386 params_shm_offset = _params_shm_offset;
3389 void* Set(void* cmd,
3390 GLenum _target,
3391 GLenum _pname,
3392 uint32_t _params_shm_id,
3393 uint32_t _params_shm_offset) {
3394 static_cast<ValueType*>(cmd)
3395 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3396 return NextCmdAddress<ValueType>(cmd);
3399 gpu::CommandHeader header;
3400 uint32_t target;
3401 uint32_t pname;
3402 uint32_t params_shm_id;
3403 uint32_t params_shm_offset;
3406 COMPILE_ASSERT(sizeof(GetTexParameteriv) == 20,
3407 Sizeof_GetTexParameteriv_is_not_20);
3408 COMPILE_ASSERT(offsetof(GetTexParameteriv, header) == 0,
3409 OffsetOf_GetTexParameteriv_header_not_0);
3410 COMPILE_ASSERT(offsetof(GetTexParameteriv, target) == 4,
3411 OffsetOf_GetTexParameteriv_target_not_4);
3412 COMPILE_ASSERT(offsetof(GetTexParameteriv, pname) == 8,
3413 OffsetOf_GetTexParameteriv_pname_not_8);
3414 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_id) == 12,
3415 OffsetOf_GetTexParameteriv_params_shm_id_not_12);
3416 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_offset) == 16,
3417 OffsetOf_GetTexParameteriv_params_shm_offset_not_16);
3419 struct GetUniformfv {
3420 typedef GetUniformfv ValueType;
3421 static const CommandId kCmdId = kGetUniformfv;
3422 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3423 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3425 typedef SizedResult<GLfloat> Result;
3427 static uint32_t ComputeSize() {
3428 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3431 void SetHeader() { header.SetCmd<ValueType>(); }
3433 void Init(GLuint _program,
3434 GLint _location,
3435 uint32_t _params_shm_id,
3436 uint32_t _params_shm_offset) {
3437 SetHeader();
3438 program = _program;
3439 location = _location;
3440 params_shm_id = _params_shm_id;
3441 params_shm_offset = _params_shm_offset;
3444 void* Set(void* cmd,
3445 GLuint _program,
3446 GLint _location,
3447 uint32_t _params_shm_id,
3448 uint32_t _params_shm_offset) {
3449 static_cast<ValueType*>(cmd)
3450 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
3451 return NextCmdAddress<ValueType>(cmd);
3454 gpu::CommandHeader header;
3455 uint32_t program;
3456 int32_t location;
3457 uint32_t params_shm_id;
3458 uint32_t params_shm_offset;
3461 COMPILE_ASSERT(sizeof(GetUniformfv) == 20, Sizeof_GetUniformfv_is_not_20);
3462 COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0,
3463 OffsetOf_GetUniformfv_header_not_0);
3464 COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4,
3465 OffsetOf_GetUniformfv_program_not_4);
3466 COMPILE_ASSERT(offsetof(GetUniformfv, location) == 8,
3467 OffsetOf_GetUniformfv_location_not_8);
3468 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_id) == 12,
3469 OffsetOf_GetUniformfv_params_shm_id_not_12);
3470 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_offset) == 16,
3471 OffsetOf_GetUniformfv_params_shm_offset_not_16);
3473 struct GetUniformiv {
3474 typedef GetUniformiv ValueType;
3475 static const CommandId kCmdId = kGetUniformiv;
3476 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3477 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3479 typedef SizedResult<GLint> Result;
3481 static uint32_t ComputeSize() {
3482 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3485 void SetHeader() { header.SetCmd<ValueType>(); }
3487 void Init(GLuint _program,
3488 GLint _location,
3489 uint32_t _params_shm_id,
3490 uint32_t _params_shm_offset) {
3491 SetHeader();
3492 program = _program;
3493 location = _location;
3494 params_shm_id = _params_shm_id;
3495 params_shm_offset = _params_shm_offset;
3498 void* Set(void* cmd,
3499 GLuint _program,
3500 GLint _location,
3501 uint32_t _params_shm_id,
3502 uint32_t _params_shm_offset) {
3503 static_cast<ValueType*>(cmd)
3504 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
3505 return NextCmdAddress<ValueType>(cmd);
3508 gpu::CommandHeader header;
3509 uint32_t program;
3510 int32_t location;
3511 uint32_t params_shm_id;
3512 uint32_t params_shm_offset;
3515 COMPILE_ASSERT(sizeof(GetUniformiv) == 20, Sizeof_GetUniformiv_is_not_20);
3516 COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0,
3517 OffsetOf_GetUniformiv_header_not_0);
3518 COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4,
3519 OffsetOf_GetUniformiv_program_not_4);
3520 COMPILE_ASSERT(offsetof(GetUniformiv, location) == 8,
3521 OffsetOf_GetUniformiv_location_not_8);
3522 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_id) == 12,
3523 OffsetOf_GetUniformiv_params_shm_id_not_12);
3524 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_offset) == 16,
3525 OffsetOf_GetUniformiv_params_shm_offset_not_16);
3527 struct GetUniformLocation {
3528 typedef GetUniformLocation ValueType;
3529 static const CommandId kCmdId = kGetUniformLocation;
3530 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3531 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3533 typedef GLint Result;
3535 static uint32_t ComputeSize() {
3536 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3539 void SetHeader() { header.SetCmd<ValueType>(); }
3541 void Init(GLuint _program,
3542 uint32_t _name_bucket_id,
3543 uint32_t _location_shm_id,
3544 uint32_t _location_shm_offset) {
3545 SetHeader();
3546 program = _program;
3547 name_bucket_id = _name_bucket_id;
3548 location_shm_id = _location_shm_id;
3549 location_shm_offset = _location_shm_offset;
3552 void* Set(void* cmd,
3553 GLuint _program,
3554 uint32_t _name_bucket_id,
3555 uint32_t _location_shm_id,
3556 uint32_t _location_shm_offset) {
3557 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
3558 _location_shm_id, _location_shm_offset);
3559 return NextCmdAddress<ValueType>(cmd);
3562 gpu::CommandHeader header;
3563 uint32_t program;
3564 uint32_t name_bucket_id;
3565 uint32_t location_shm_id;
3566 uint32_t location_shm_offset;
3569 COMPILE_ASSERT(sizeof(GetUniformLocation) == 20,
3570 Sizeof_GetUniformLocation_is_not_20);
3571 COMPILE_ASSERT(offsetof(GetUniformLocation, header) == 0,
3572 OffsetOf_GetUniformLocation_header_not_0);
3573 COMPILE_ASSERT(offsetof(GetUniformLocation, program) == 4,
3574 OffsetOf_GetUniformLocation_program_not_4);
3575 COMPILE_ASSERT(offsetof(GetUniformLocation, name_bucket_id) == 8,
3576 OffsetOf_GetUniformLocation_name_bucket_id_not_8);
3577 COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_id) == 12,
3578 OffsetOf_GetUniformLocation_location_shm_id_not_12);
3579 COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_offset) == 16,
3580 OffsetOf_GetUniformLocation_location_shm_offset_not_16);
3582 struct GetVertexAttribfv {
3583 typedef GetVertexAttribfv ValueType;
3584 static const CommandId kCmdId = kGetVertexAttribfv;
3585 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3586 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3588 typedef SizedResult<GLfloat> Result;
3590 static uint32_t ComputeSize() {
3591 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3594 void SetHeader() { header.SetCmd<ValueType>(); }
3596 void Init(GLuint _index,
3597 GLenum _pname,
3598 uint32_t _params_shm_id,
3599 uint32_t _params_shm_offset) {
3600 SetHeader();
3601 index = _index;
3602 pname = _pname;
3603 params_shm_id = _params_shm_id;
3604 params_shm_offset = _params_shm_offset;
3607 void* Set(void* cmd,
3608 GLuint _index,
3609 GLenum _pname,
3610 uint32_t _params_shm_id,
3611 uint32_t _params_shm_offset) {
3612 static_cast<ValueType*>(cmd)
3613 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
3614 return NextCmdAddress<ValueType>(cmd);
3617 gpu::CommandHeader header;
3618 uint32_t index;
3619 uint32_t pname;
3620 uint32_t params_shm_id;
3621 uint32_t params_shm_offset;
3624 COMPILE_ASSERT(sizeof(GetVertexAttribfv) == 20,
3625 Sizeof_GetVertexAttribfv_is_not_20);
3626 COMPILE_ASSERT(offsetof(GetVertexAttribfv, header) == 0,
3627 OffsetOf_GetVertexAttribfv_header_not_0);
3628 COMPILE_ASSERT(offsetof(GetVertexAttribfv, index) == 4,
3629 OffsetOf_GetVertexAttribfv_index_not_4);
3630 COMPILE_ASSERT(offsetof(GetVertexAttribfv, pname) == 8,
3631 OffsetOf_GetVertexAttribfv_pname_not_8);
3632 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_id) == 12,
3633 OffsetOf_GetVertexAttribfv_params_shm_id_not_12);
3634 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
3635 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16);
3637 struct GetVertexAttribiv {
3638 typedef GetVertexAttribiv ValueType;
3639 static const CommandId kCmdId = kGetVertexAttribiv;
3640 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3641 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3643 typedef SizedResult<GLint> Result;
3645 static uint32_t ComputeSize() {
3646 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3649 void SetHeader() { header.SetCmd<ValueType>(); }
3651 void Init(GLuint _index,
3652 GLenum _pname,
3653 uint32_t _params_shm_id,
3654 uint32_t _params_shm_offset) {
3655 SetHeader();
3656 index = _index;
3657 pname = _pname;
3658 params_shm_id = _params_shm_id;
3659 params_shm_offset = _params_shm_offset;
3662 void* Set(void* cmd,
3663 GLuint _index,
3664 GLenum _pname,
3665 uint32_t _params_shm_id,
3666 uint32_t _params_shm_offset) {
3667 static_cast<ValueType*>(cmd)
3668 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
3669 return NextCmdAddress<ValueType>(cmd);
3672 gpu::CommandHeader header;
3673 uint32_t index;
3674 uint32_t pname;
3675 uint32_t params_shm_id;
3676 uint32_t params_shm_offset;
3679 COMPILE_ASSERT(sizeof(GetVertexAttribiv) == 20,
3680 Sizeof_GetVertexAttribiv_is_not_20);
3681 COMPILE_ASSERT(offsetof(GetVertexAttribiv, header) == 0,
3682 OffsetOf_GetVertexAttribiv_header_not_0);
3683 COMPILE_ASSERT(offsetof(GetVertexAttribiv, index) == 4,
3684 OffsetOf_GetVertexAttribiv_index_not_4);
3685 COMPILE_ASSERT(offsetof(GetVertexAttribiv, pname) == 8,
3686 OffsetOf_GetVertexAttribiv_pname_not_8);
3687 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_id) == 12,
3688 OffsetOf_GetVertexAttribiv_params_shm_id_not_12);
3689 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
3690 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16);
3692 struct GetVertexAttribPointerv {
3693 typedef GetVertexAttribPointerv ValueType;
3694 static const CommandId kCmdId = kGetVertexAttribPointerv;
3695 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3696 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3698 typedef SizedResult<GLuint> Result;
3700 static uint32_t ComputeSize() {
3701 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3704 void SetHeader() { header.SetCmd<ValueType>(); }
3706 void Init(GLuint _index,
3707 GLenum _pname,
3708 uint32_t _pointer_shm_id,
3709 uint32_t _pointer_shm_offset) {
3710 SetHeader();
3711 index = _index;
3712 pname = _pname;
3713 pointer_shm_id = _pointer_shm_id;
3714 pointer_shm_offset = _pointer_shm_offset;
3717 void* Set(void* cmd,
3718 GLuint _index,
3719 GLenum _pname,
3720 uint32_t _pointer_shm_id,
3721 uint32_t _pointer_shm_offset) {
3722 static_cast<ValueType*>(cmd)
3723 ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
3724 return NextCmdAddress<ValueType>(cmd);
3727 gpu::CommandHeader header;
3728 uint32_t index;
3729 uint32_t pname;
3730 uint32_t pointer_shm_id;
3731 uint32_t pointer_shm_offset;
3734 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv) == 20,
3735 Sizeof_GetVertexAttribPointerv_is_not_20);
3736 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, header) == 0,
3737 OffsetOf_GetVertexAttribPointerv_header_not_0);
3738 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, index) == 4,
3739 OffsetOf_GetVertexAttribPointerv_index_not_4);
3740 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pname) == 8,
3741 OffsetOf_GetVertexAttribPointerv_pname_not_8);
3742 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
3743 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12);
3744 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
3745 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16);
3747 struct Hint {
3748 typedef Hint ValueType;
3749 static const CommandId kCmdId = kHint;
3750 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3751 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3753 static uint32_t ComputeSize() {
3754 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3757 void SetHeader() { header.SetCmd<ValueType>(); }
3759 void Init(GLenum _target, GLenum _mode) {
3760 SetHeader();
3761 target = _target;
3762 mode = _mode;
3765 void* Set(void* cmd, GLenum _target, GLenum _mode) {
3766 static_cast<ValueType*>(cmd)->Init(_target, _mode);
3767 return NextCmdAddress<ValueType>(cmd);
3770 gpu::CommandHeader header;
3771 uint32_t target;
3772 uint32_t mode;
3775 COMPILE_ASSERT(sizeof(Hint) == 12, Sizeof_Hint_is_not_12);
3776 COMPILE_ASSERT(offsetof(Hint, header) == 0, OffsetOf_Hint_header_not_0);
3777 COMPILE_ASSERT(offsetof(Hint, target) == 4, OffsetOf_Hint_target_not_4);
3778 COMPILE_ASSERT(offsetof(Hint, mode) == 8, OffsetOf_Hint_mode_not_8);
3780 struct IsBuffer {
3781 typedef IsBuffer ValueType;
3782 static const CommandId kCmdId = kIsBuffer;
3783 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3784 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3786 typedef uint32_t Result;
3788 static uint32_t ComputeSize() {
3789 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3792 void SetHeader() { header.SetCmd<ValueType>(); }
3794 void Init(GLuint _buffer,
3795 uint32_t _result_shm_id,
3796 uint32_t _result_shm_offset) {
3797 SetHeader();
3798 buffer = _buffer;
3799 result_shm_id = _result_shm_id;
3800 result_shm_offset = _result_shm_offset;
3803 void* Set(void* cmd,
3804 GLuint _buffer,
3805 uint32_t _result_shm_id,
3806 uint32_t _result_shm_offset) {
3807 static_cast<ValueType*>(cmd)
3808 ->Init(_buffer, _result_shm_id, _result_shm_offset);
3809 return NextCmdAddress<ValueType>(cmd);
3812 gpu::CommandHeader header;
3813 uint32_t buffer;
3814 uint32_t result_shm_id;
3815 uint32_t result_shm_offset;
3818 COMPILE_ASSERT(sizeof(IsBuffer) == 16, Sizeof_IsBuffer_is_not_16);
3819 COMPILE_ASSERT(offsetof(IsBuffer, header) == 0, OffsetOf_IsBuffer_header_not_0);
3820 COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4, OffsetOf_IsBuffer_buffer_not_4);
3821 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8,
3822 OffsetOf_IsBuffer_result_shm_id_not_8);
3823 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12,
3824 OffsetOf_IsBuffer_result_shm_offset_not_12);
3826 struct IsEnabled {
3827 typedef IsEnabled ValueType;
3828 static const CommandId kCmdId = kIsEnabled;
3829 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3830 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3832 typedef uint32_t Result;
3834 static uint32_t ComputeSize() {
3835 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3838 void SetHeader() { header.SetCmd<ValueType>(); }
3840 void Init(GLenum _cap, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
3841 SetHeader();
3842 cap = _cap;
3843 result_shm_id = _result_shm_id;
3844 result_shm_offset = _result_shm_offset;
3847 void* Set(void* cmd,
3848 GLenum _cap,
3849 uint32_t _result_shm_id,
3850 uint32_t _result_shm_offset) {
3851 static_cast<ValueType*>(cmd)
3852 ->Init(_cap, _result_shm_id, _result_shm_offset);
3853 return NextCmdAddress<ValueType>(cmd);
3856 gpu::CommandHeader header;
3857 uint32_t cap;
3858 uint32_t result_shm_id;
3859 uint32_t result_shm_offset;
3862 COMPILE_ASSERT(sizeof(IsEnabled) == 16, Sizeof_IsEnabled_is_not_16);
3863 COMPILE_ASSERT(offsetof(IsEnabled, header) == 0,
3864 OffsetOf_IsEnabled_header_not_0);
3865 COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4, OffsetOf_IsEnabled_cap_not_4);
3866 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8,
3867 OffsetOf_IsEnabled_result_shm_id_not_8);
3868 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12,
3869 OffsetOf_IsEnabled_result_shm_offset_not_12);
3871 struct IsFramebuffer {
3872 typedef IsFramebuffer ValueType;
3873 static const CommandId kCmdId = kIsFramebuffer;
3874 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3875 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3877 typedef uint32_t Result;
3879 static uint32_t ComputeSize() {
3880 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3883 void SetHeader() { header.SetCmd<ValueType>(); }
3885 void Init(GLuint _framebuffer,
3886 uint32_t _result_shm_id,
3887 uint32_t _result_shm_offset) {
3888 SetHeader();
3889 framebuffer = _framebuffer;
3890 result_shm_id = _result_shm_id;
3891 result_shm_offset = _result_shm_offset;
3894 void* Set(void* cmd,
3895 GLuint _framebuffer,
3896 uint32_t _result_shm_id,
3897 uint32_t _result_shm_offset) {
3898 static_cast<ValueType*>(cmd)
3899 ->Init(_framebuffer, _result_shm_id, _result_shm_offset);
3900 return NextCmdAddress<ValueType>(cmd);
3903 gpu::CommandHeader header;
3904 uint32_t framebuffer;
3905 uint32_t result_shm_id;
3906 uint32_t result_shm_offset;
3909 COMPILE_ASSERT(sizeof(IsFramebuffer) == 16, Sizeof_IsFramebuffer_is_not_16);
3910 COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0,
3911 OffsetOf_IsFramebuffer_header_not_0);
3912 COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4,
3913 OffsetOf_IsFramebuffer_framebuffer_not_4);
3914 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_id) == 8,
3915 OffsetOf_IsFramebuffer_result_shm_id_not_8);
3916 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_offset) == 12,
3917 OffsetOf_IsFramebuffer_result_shm_offset_not_12);
3919 struct IsProgram {
3920 typedef IsProgram ValueType;
3921 static const CommandId kCmdId = kIsProgram;
3922 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3923 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3925 typedef uint32_t Result;
3927 static uint32_t ComputeSize() {
3928 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3931 void SetHeader() { header.SetCmd<ValueType>(); }
3933 void Init(GLuint _program,
3934 uint32_t _result_shm_id,
3935 uint32_t _result_shm_offset) {
3936 SetHeader();
3937 program = _program;
3938 result_shm_id = _result_shm_id;
3939 result_shm_offset = _result_shm_offset;
3942 void* Set(void* cmd,
3943 GLuint _program,
3944 uint32_t _result_shm_id,
3945 uint32_t _result_shm_offset) {
3946 static_cast<ValueType*>(cmd)
3947 ->Init(_program, _result_shm_id, _result_shm_offset);
3948 return NextCmdAddress<ValueType>(cmd);
3951 gpu::CommandHeader header;
3952 uint32_t program;
3953 uint32_t result_shm_id;
3954 uint32_t result_shm_offset;
3957 COMPILE_ASSERT(sizeof(IsProgram) == 16, Sizeof_IsProgram_is_not_16);
3958 COMPILE_ASSERT(offsetof(IsProgram, header) == 0,
3959 OffsetOf_IsProgram_header_not_0);
3960 COMPILE_ASSERT(offsetof(IsProgram, program) == 4,
3961 OffsetOf_IsProgram_program_not_4);
3962 COMPILE_ASSERT(offsetof(IsProgram, result_shm_id) == 8,
3963 OffsetOf_IsProgram_result_shm_id_not_8);
3964 COMPILE_ASSERT(offsetof(IsProgram, result_shm_offset) == 12,
3965 OffsetOf_IsProgram_result_shm_offset_not_12);
3967 struct IsRenderbuffer {
3968 typedef IsRenderbuffer ValueType;
3969 static const CommandId kCmdId = kIsRenderbuffer;
3970 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3971 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3973 typedef uint32_t Result;
3975 static uint32_t ComputeSize() {
3976 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3979 void SetHeader() { header.SetCmd<ValueType>(); }
3981 void Init(GLuint _renderbuffer,
3982 uint32_t _result_shm_id,
3983 uint32_t _result_shm_offset) {
3984 SetHeader();
3985 renderbuffer = _renderbuffer;
3986 result_shm_id = _result_shm_id;
3987 result_shm_offset = _result_shm_offset;
3990 void* Set(void* cmd,
3991 GLuint _renderbuffer,
3992 uint32_t _result_shm_id,
3993 uint32_t _result_shm_offset) {
3994 static_cast<ValueType*>(cmd)
3995 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
3996 return NextCmdAddress<ValueType>(cmd);
3999 gpu::CommandHeader header;
4000 uint32_t renderbuffer;
4001 uint32_t result_shm_id;
4002 uint32_t result_shm_offset;
4005 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16);
4006 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0,
4007 OffsetOf_IsRenderbuffer_header_not_0);
4008 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4,
4009 OffsetOf_IsRenderbuffer_renderbuffer_not_4);
4010 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8,
4011 OffsetOf_IsRenderbuffer_result_shm_id_not_8);
4012 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12,
4013 OffsetOf_IsRenderbuffer_result_shm_offset_not_12);
4015 struct IsShader {
4016 typedef IsShader ValueType;
4017 static const CommandId kCmdId = kIsShader;
4018 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4019 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4021 typedef uint32_t Result;
4023 static uint32_t ComputeSize() {
4024 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4027 void SetHeader() { header.SetCmd<ValueType>(); }
4029 void Init(GLuint _shader,
4030 uint32_t _result_shm_id,
4031 uint32_t _result_shm_offset) {
4032 SetHeader();
4033 shader = _shader;
4034 result_shm_id = _result_shm_id;
4035 result_shm_offset = _result_shm_offset;
4038 void* Set(void* cmd,
4039 GLuint _shader,
4040 uint32_t _result_shm_id,
4041 uint32_t _result_shm_offset) {
4042 static_cast<ValueType*>(cmd)
4043 ->Init(_shader, _result_shm_id, _result_shm_offset);
4044 return NextCmdAddress<ValueType>(cmd);
4047 gpu::CommandHeader header;
4048 uint32_t shader;
4049 uint32_t result_shm_id;
4050 uint32_t result_shm_offset;
4053 COMPILE_ASSERT(sizeof(IsShader) == 16, Sizeof_IsShader_is_not_16);
4054 COMPILE_ASSERT(offsetof(IsShader, header) == 0, OffsetOf_IsShader_header_not_0);
4055 COMPILE_ASSERT(offsetof(IsShader, shader) == 4, OffsetOf_IsShader_shader_not_4);
4056 COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8,
4057 OffsetOf_IsShader_result_shm_id_not_8);
4058 COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12,
4059 OffsetOf_IsShader_result_shm_offset_not_12);
4061 struct IsTexture {
4062 typedef IsTexture ValueType;
4063 static const CommandId kCmdId = kIsTexture;
4064 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4065 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4067 typedef uint32_t Result;
4069 static uint32_t ComputeSize() {
4070 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4073 void SetHeader() { header.SetCmd<ValueType>(); }
4075 void Init(GLuint _texture,
4076 uint32_t _result_shm_id,
4077 uint32_t _result_shm_offset) {
4078 SetHeader();
4079 texture = _texture;
4080 result_shm_id = _result_shm_id;
4081 result_shm_offset = _result_shm_offset;
4084 void* Set(void* cmd,
4085 GLuint _texture,
4086 uint32_t _result_shm_id,
4087 uint32_t _result_shm_offset) {
4088 static_cast<ValueType*>(cmd)
4089 ->Init(_texture, _result_shm_id, _result_shm_offset);
4090 return NextCmdAddress<ValueType>(cmd);
4093 gpu::CommandHeader header;
4094 uint32_t texture;
4095 uint32_t result_shm_id;
4096 uint32_t result_shm_offset;
4099 COMPILE_ASSERT(sizeof(IsTexture) == 16, Sizeof_IsTexture_is_not_16);
4100 COMPILE_ASSERT(offsetof(IsTexture, header) == 0,
4101 OffsetOf_IsTexture_header_not_0);
4102 COMPILE_ASSERT(offsetof(IsTexture, texture) == 4,
4103 OffsetOf_IsTexture_texture_not_4);
4104 COMPILE_ASSERT(offsetof(IsTexture, result_shm_id) == 8,
4105 OffsetOf_IsTexture_result_shm_id_not_8);
4106 COMPILE_ASSERT(offsetof(IsTexture, result_shm_offset) == 12,
4107 OffsetOf_IsTexture_result_shm_offset_not_12);
4109 struct LineWidth {
4110 typedef LineWidth ValueType;
4111 static const CommandId kCmdId = kLineWidth;
4112 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4115 static uint32_t ComputeSize() {
4116 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4119 void SetHeader() { header.SetCmd<ValueType>(); }
4121 void Init(GLfloat _width) {
4122 SetHeader();
4123 width = _width;
4126 void* Set(void* cmd, GLfloat _width) {
4127 static_cast<ValueType*>(cmd)->Init(_width);
4128 return NextCmdAddress<ValueType>(cmd);
4131 gpu::CommandHeader header;
4132 float width;
4135 COMPILE_ASSERT(sizeof(LineWidth) == 8, Sizeof_LineWidth_is_not_8);
4136 COMPILE_ASSERT(offsetof(LineWidth, header) == 0,
4137 OffsetOf_LineWidth_header_not_0);
4138 COMPILE_ASSERT(offsetof(LineWidth, width) == 4, OffsetOf_LineWidth_width_not_4);
4140 struct LinkProgram {
4141 typedef LinkProgram ValueType;
4142 static const CommandId kCmdId = kLinkProgram;
4143 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4144 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4146 static uint32_t ComputeSize() {
4147 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4150 void SetHeader() { header.SetCmd<ValueType>(); }
4152 void Init(GLuint _program) {
4153 SetHeader();
4154 program = _program;
4157 void* Set(void* cmd, GLuint _program) {
4158 static_cast<ValueType*>(cmd)->Init(_program);
4159 return NextCmdAddress<ValueType>(cmd);
4162 gpu::CommandHeader header;
4163 uint32_t program;
4166 COMPILE_ASSERT(sizeof(LinkProgram) == 8, Sizeof_LinkProgram_is_not_8);
4167 COMPILE_ASSERT(offsetof(LinkProgram, header) == 0,
4168 OffsetOf_LinkProgram_header_not_0);
4169 COMPILE_ASSERT(offsetof(LinkProgram, program) == 4,
4170 OffsetOf_LinkProgram_program_not_4);
4172 struct PixelStorei {
4173 typedef PixelStorei ValueType;
4174 static const CommandId kCmdId = kPixelStorei;
4175 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4176 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4178 static uint32_t ComputeSize() {
4179 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4182 void SetHeader() { header.SetCmd<ValueType>(); }
4184 void Init(GLenum _pname, GLint _param) {
4185 SetHeader();
4186 pname = _pname;
4187 param = _param;
4190 void* Set(void* cmd, GLenum _pname, GLint _param) {
4191 static_cast<ValueType*>(cmd)->Init(_pname, _param);
4192 return NextCmdAddress<ValueType>(cmd);
4195 gpu::CommandHeader header;
4196 uint32_t pname;
4197 int32_t param;
4200 COMPILE_ASSERT(sizeof(PixelStorei) == 12, Sizeof_PixelStorei_is_not_12);
4201 COMPILE_ASSERT(offsetof(PixelStorei, header) == 0,
4202 OffsetOf_PixelStorei_header_not_0);
4203 COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4,
4204 OffsetOf_PixelStorei_pname_not_4);
4205 COMPILE_ASSERT(offsetof(PixelStorei, param) == 8,
4206 OffsetOf_PixelStorei_param_not_8);
4208 struct PolygonOffset {
4209 typedef PolygonOffset ValueType;
4210 static const CommandId kCmdId = kPolygonOffset;
4211 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4212 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4214 static uint32_t ComputeSize() {
4215 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4218 void SetHeader() { header.SetCmd<ValueType>(); }
4220 void Init(GLfloat _factor, GLfloat _units) {
4221 SetHeader();
4222 factor = _factor;
4223 units = _units;
4226 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
4227 static_cast<ValueType*>(cmd)->Init(_factor, _units);
4228 return NextCmdAddress<ValueType>(cmd);
4231 gpu::CommandHeader header;
4232 float factor;
4233 float units;
4236 COMPILE_ASSERT(sizeof(PolygonOffset) == 12, Sizeof_PolygonOffset_is_not_12);
4237 COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0,
4238 OffsetOf_PolygonOffset_header_not_0);
4239 COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4,
4240 OffsetOf_PolygonOffset_factor_not_4);
4241 COMPILE_ASSERT(offsetof(PolygonOffset, units) == 8,
4242 OffsetOf_PolygonOffset_units_not_8);
4244 // ReadPixels has the result separated from the pixel buffer so that
4245 // it is easier to specify the result going to some specific place
4246 // that exactly fits the rectangle of pixels.
4247 struct ReadPixels {
4248 typedef ReadPixels ValueType;
4249 static const CommandId kCmdId = kReadPixels;
4250 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4251 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4253 typedef uint32_t Result;
4255 static uint32_t ComputeSize() {
4256 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4259 void SetHeader() { header.SetCmd<ValueType>(); }
4261 void Init(GLint _x,
4262 GLint _y,
4263 GLsizei _width,
4264 GLsizei _height,
4265 GLenum _format,
4266 GLenum _type,
4267 uint32_t _pixels_shm_id,
4268 uint32_t _pixels_shm_offset,
4269 uint32_t _result_shm_id,
4270 uint32_t _result_shm_offset,
4271 GLboolean _async) {
4272 SetHeader();
4273 x = _x;
4274 y = _y;
4275 width = _width;
4276 height = _height;
4277 format = _format;
4278 type = _type;
4279 pixels_shm_id = _pixels_shm_id;
4280 pixels_shm_offset = _pixels_shm_offset;
4281 result_shm_id = _result_shm_id;
4282 result_shm_offset = _result_shm_offset;
4283 async = _async;
4286 void* Set(void* cmd,
4287 GLint _x,
4288 GLint _y,
4289 GLsizei _width,
4290 GLsizei _height,
4291 GLenum _format,
4292 GLenum _type,
4293 uint32_t _pixels_shm_id,
4294 uint32_t _pixels_shm_offset,
4295 uint32_t _result_shm_id,
4296 uint32_t _result_shm_offset,
4297 GLboolean _async) {
4298 static_cast<ValueType*>(cmd)
4299 ->Init(_x, _y, _width, _height, _format, _type, _pixels_shm_id,
4300 _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
4301 return NextCmdAddress<ValueType>(cmd);
4304 gpu::CommandHeader header;
4305 int32_t x;
4306 int32_t y;
4307 int32_t width;
4308 int32_t height;
4309 uint32_t format;
4310 uint32_t type;
4311 uint32_t pixels_shm_id;
4312 uint32_t pixels_shm_offset;
4313 uint32_t result_shm_id;
4314 uint32_t result_shm_offset;
4315 uint32_t async;
4318 COMPILE_ASSERT(sizeof(ReadPixels) == 48, Sizeof_ReadPixels_is_not_48);
4319 COMPILE_ASSERT(offsetof(ReadPixels, header) == 0,
4320 OffsetOf_ReadPixels_header_not_0);
4321 COMPILE_ASSERT(offsetof(ReadPixels, x) == 4, OffsetOf_ReadPixels_x_not_4);
4322 COMPILE_ASSERT(offsetof(ReadPixels, y) == 8, OffsetOf_ReadPixels_y_not_8);
4323 COMPILE_ASSERT(offsetof(ReadPixels, width) == 12,
4324 OffsetOf_ReadPixels_width_not_12);
4325 COMPILE_ASSERT(offsetof(ReadPixels, height) == 16,
4326 OffsetOf_ReadPixels_height_not_16);
4327 COMPILE_ASSERT(offsetof(ReadPixels, format) == 20,
4328 OffsetOf_ReadPixels_format_not_20);
4329 COMPILE_ASSERT(offsetof(ReadPixels, type) == 24,
4330 OffsetOf_ReadPixels_type_not_24);
4331 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_id) == 28,
4332 OffsetOf_ReadPixels_pixels_shm_id_not_28);
4333 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_offset) == 32,
4334 OffsetOf_ReadPixels_pixels_shm_offset_not_32);
4335 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_id) == 36,
4336 OffsetOf_ReadPixels_result_shm_id_not_36);
4337 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_offset) == 40,
4338 OffsetOf_ReadPixels_result_shm_offset_not_40);
4339 COMPILE_ASSERT(offsetof(ReadPixels, async) == 44,
4340 OffsetOf_ReadPixels_async_not_44);
4342 struct ReleaseShaderCompiler {
4343 typedef ReleaseShaderCompiler ValueType;
4344 static const CommandId kCmdId = kReleaseShaderCompiler;
4345 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4346 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4348 static uint32_t ComputeSize() {
4349 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4352 void SetHeader() { header.SetCmd<ValueType>(); }
4354 void Init() { SetHeader(); }
4356 void* Set(void* cmd) {
4357 static_cast<ValueType*>(cmd)->Init();
4358 return NextCmdAddress<ValueType>(cmd);
4361 gpu::CommandHeader header;
4364 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler) == 4,
4365 Sizeof_ReleaseShaderCompiler_is_not_4);
4366 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler, header) == 0,
4367 OffsetOf_ReleaseShaderCompiler_header_not_0);
4369 struct RenderbufferStorage {
4370 typedef RenderbufferStorage ValueType;
4371 static const CommandId kCmdId = kRenderbufferStorage;
4372 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4373 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4375 static uint32_t ComputeSize() {
4376 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4379 void SetHeader() { header.SetCmd<ValueType>(); }
4381 void Init(GLenum _target,
4382 GLenum _internalformat,
4383 GLsizei _width,
4384 GLsizei _height) {
4385 SetHeader();
4386 target = _target;
4387 internalformat = _internalformat;
4388 width = _width;
4389 height = _height;
4392 void* Set(void* cmd,
4393 GLenum _target,
4394 GLenum _internalformat,
4395 GLsizei _width,
4396 GLsizei _height) {
4397 static_cast<ValueType*>(cmd)
4398 ->Init(_target, _internalformat, _width, _height);
4399 return NextCmdAddress<ValueType>(cmd);
4402 gpu::CommandHeader header;
4403 uint32_t target;
4404 uint32_t internalformat;
4405 int32_t width;
4406 int32_t height;
4409 COMPILE_ASSERT(sizeof(RenderbufferStorage) == 20,
4410 Sizeof_RenderbufferStorage_is_not_20);
4411 COMPILE_ASSERT(offsetof(RenderbufferStorage, header) == 0,
4412 OffsetOf_RenderbufferStorage_header_not_0);
4413 COMPILE_ASSERT(offsetof(RenderbufferStorage, target) == 4,
4414 OffsetOf_RenderbufferStorage_target_not_4);
4415 COMPILE_ASSERT(offsetof(RenderbufferStorage, internalformat) == 8,
4416 OffsetOf_RenderbufferStorage_internalformat_not_8);
4417 COMPILE_ASSERT(offsetof(RenderbufferStorage, width) == 12,
4418 OffsetOf_RenderbufferStorage_width_not_12);
4419 COMPILE_ASSERT(offsetof(RenderbufferStorage, height) == 16,
4420 OffsetOf_RenderbufferStorage_height_not_16);
4422 struct SampleCoverage {
4423 typedef SampleCoverage ValueType;
4424 static const CommandId kCmdId = kSampleCoverage;
4425 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4426 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4428 static uint32_t ComputeSize() {
4429 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4432 void SetHeader() { header.SetCmd<ValueType>(); }
4434 void Init(GLclampf _value, GLboolean _invert) {
4435 SetHeader();
4436 value = _value;
4437 invert = _invert;
4440 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
4441 static_cast<ValueType*>(cmd)->Init(_value, _invert);
4442 return NextCmdAddress<ValueType>(cmd);
4445 gpu::CommandHeader header;
4446 float value;
4447 uint32_t invert;
4450 COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12);
4451 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0,
4452 OffsetOf_SampleCoverage_header_not_0);
4453 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4,
4454 OffsetOf_SampleCoverage_value_not_4);
4455 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8,
4456 OffsetOf_SampleCoverage_invert_not_8);
4458 struct Scissor {
4459 typedef Scissor ValueType;
4460 static const CommandId kCmdId = kScissor;
4461 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4462 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4464 static uint32_t ComputeSize() {
4465 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4468 void SetHeader() { header.SetCmd<ValueType>(); }
4470 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
4471 SetHeader();
4472 x = _x;
4473 y = _y;
4474 width = _width;
4475 height = _height;
4478 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
4479 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
4480 return NextCmdAddress<ValueType>(cmd);
4483 gpu::CommandHeader header;
4484 int32_t x;
4485 int32_t y;
4486 int32_t width;
4487 int32_t height;
4490 COMPILE_ASSERT(sizeof(Scissor) == 20, Sizeof_Scissor_is_not_20);
4491 COMPILE_ASSERT(offsetof(Scissor, header) == 0, OffsetOf_Scissor_header_not_0);
4492 COMPILE_ASSERT(offsetof(Scissor, x) == 4, OffsetOf_Scissor_x_not_4);
4493 COMPILE_ASSERT(offsetof(Scissor, y) == 8, OffsetOf_Scissor_y_not_8);
4494 COMPILE_ASSERT(offsetof(Scissor, width) == 12, OffsetOf_Scissor_width_not_12);
4495 COMPILE_ASSERT(offsetof(Scissor, height) == 16, OffsetOf_Scissor_height_not_16);
4497 struct ShaderBinary {
4498 typedef ShaderBinary ValueType;
4499 static const CommandId kCmdId = kShaderBinary;
4500 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4501 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4503 static uint32_t ComputeSize() {
4504 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4507 void SetHeader() { header.SetCmd<ValueType>(); }
4509 void Init(GLsizei _n,
4510 uint32_t _shaders_shm_id,
4511 uint32_t _shaders_shm_offset,
4512 GLenum _binaryformat,
4513 uint32_t _binary_shm_id,
4514 uint32_t _binary_shm_offset,
4515 GLsizei _length) {
4516 SetHeader();
4517 n = _n;
4518 shaders_shm_id = _shaders_shm_id;
4519 shaders_shm_offset = _shaders_shm_offset;
4520 binaryformat = _binaryformat;
4521 binary_shm_id = _binary_shm_id;
4522 binary_shm_offset = _binary_shm_offset;
4523 length = _length;
4526 void* Set(void* cmd,
4527 GLsizei _n,
4528 uint32_t _shaders_shm_id,
4529 uint32_t _shaders_shm_offset,
4530 GLenum _binaryformat,
4531 uint32_t _binary_shm_id,
4532 uint32_t _binary_shm_offset,
4533 GLsizei _length) {
4534 static_cast<ValueType*>(cmd)->Init(_n, _shaders_shm_id, _shaders_shm_offset,
4535 _binaryformat, _binary_shm_id,
4536 _binary_shm_offset, _length);
4537 return NextCmdAddress<ValueType>(cmd);
4540 gpu::CommandHeader header;
4541 int32_t n;
4542 uint32_t shaders_shm_id;
4543 uint32_t shaders_shm_offset;
4544 uint32_t binaryformat;
4545 uint32_t binary_shm_id;
4546 uint32_t binary_shm_offset;
4547 int32_t length;
4550 COMPILE_ASSERT(sizeof(ShaderBinary) == 32, Sizeof_ShaderBinary_is_not_32);
4551 COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0,
4552 OffsetOf_ShaderBinary_header_not_0);
4553 COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4, OffsetOf_ShaderBinary_n_not_4);
4554 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8,
4555 OffsetOf_ShaderBinary_shaders_shm_id_not_8);
4556 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12,
4557 OffsetOf_ShaderBinary_shaders_shm_offset_not_12);
4558 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16,
4559 OffsetOf_ShaderBinary_binaryformat_not_16);
4560 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20,
4561 OffsetOf_ShaderBinary_binary_shm_id_not_20);
4562 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24,
4563 OffsetOf_ShaderBinary_binary_shm_offset_not_24);
4564 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28,
4565 OffsetOf_ShaderBinary_length_not_28);
4567 struct ShaderSourceBucket {
4568 typedef ShaderSourceBucket ValueType;
4569 static const CommandId kCmdId = kShaderSourceBucket;
4570 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4571 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4573 static uint32_t ComputeSize() {
4574 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4577 void SetHeader() { header.SetCmd<ValueType>(); }
4579 void Init(GLuint _shader, uint32_t _data_bucket_id) {
4580 SetHeader();
4581 shader = _shader;
4582 data_bucket_id = _data_bucket_id;
4585 void* Set(void* cmd, GLuint _shader, uint32_t _data_bucket_id) {
4586 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id);
4587 return NextCmdAddress<ValueType>(cmd);
4590 gpu::CommandHeader header;
4591 uint32_t shader;
4592 uint32_t data_bucket_id;
4595 COMPILE_ASSERT(sizeof(ShaderSourceBucket) == 12,
4596 Sizeof_ShaderSourceBucket_is_not_12);
4597 COMPILE_ASSERT(offsetof(ShaderSourceBucket, header) == 0,
4598 OffsetOf_ShaderSourceBucket_header_not_0);
4599 COMPILE_ASSERT(offsetof(ShaderSourceBucket, shader) == 4,
4600 OffsetOf_ShaderSourceBucket_shader_not_4);
4601 COMPILE_ASSERT(offsetof(ShaderSourceBucket, data_bucket_id) == 8,
4602 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8);
4604 struct StencilFunc {
4605 typedef StencilFunc ValueType;
4606 static const CommandId kCmdId = kStencilFunc;
4607 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4608 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4610 static uint32_t ComputeSize() {
4611 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4614 void SetHeader() { header.SetCmd<ValueType>(); }
4616 void Init(GLenum _func, GLint _ref, GLuint _mask) {
4617 SetHeader();
4618 func = _func;
4619 ref = _ref;
4620 mask = _mask;
4623 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
4624 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
4625 return NextCmdAddress<ValueType>(cmd);
4628 gpu::CommandHeader header;
4629 uint32_t func;
4630 int32_t ref;
4631 uint32_t mask;
4634 COMPILE_ASSERT(sizeof(StencilFunc) == 16, Sizeof_StencilFunc_is_not_16);
4635 COMPILE_ASSERT(offsetof(StencilFunc, header) == 0,
4636 OffsetOf_StencilFunc_header_not_0);
4637 COMPILE_ASSERT(offsetof(StencilFunc, func) == 4,
4638 OffsetOf_StencilFunc_func_not_4);
4639 COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8, OffsetOf_StencilFunc_ref_not_8);
4640 COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12,
4641 OffsetOf_StencilFunc_mask_not_12);
4643 struct StencilFuncSeparate {
4644 typedef StencilFuncSeparate ValueType;
4645 static const CommandId kCmdId = kStencilFuncSeparate;
4646 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4647 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4649 static uint32_t ComputeSize() {
4650 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4653 void SetHeader() { header.SetCmd<ValueType>(); }
4655 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
4656 SetHeader();
4657 face = _face;
4658 func = _func;
4659 ref = _ref;
4660 mask = _mask;
4663 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
4664 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
4665 return NextCmdAddress<ValueType>(cmd);
4668 gpu::CommandHeader header;
4669 uint32_t face;
4670 uint32_t func;
4671 int32_t ref;
4672 uint32_t mask;
4675 COMPILE_ASSERT(sizeof(StencilFuncSeparate) == 20,
4676 Sizeof_StencilFuncSeparate_is_not_20);
4677 COMPILE_ASSERT(offsetof(StencilFuncSeparate, header) == 0,
4678 OffsetOf_StencilFuncSeparate_header_not_0);
4679 COMPILE_ASSERT(offsetof(StencilFuncSeparate, face) == 4,
4680 OffsetOf_StencilFuncSeparate_face_not_4);
4681 COMPILE_ASSERT(offsetof(StencilFuncSeparate, func) == 8,
4682 OffsetOf_StencilFuncSeparate_func_not_8);
4683 COMPILE_ASSERT(offsetof(StencilFuncSeparate, ref) == 12,
4684 OffsetOf_StencilFuncSeparate_ref_not_12);
4685 COMPILE_ASSERT(offsetof(StencilFuncSeparate, mask) == 16,
4686 OffsetOf_StencilFuncSeparate_mask_not_16);
4688 struct StencilMask {
4689 typedef StencilMask ValueType;
4690 static const CommandId kCmdId = kStencilMask;
4691 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4692 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4694 static uint32_t ComputeSize() {
4695 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4698 void SetHeader() { header.SetCmd<ValueType>(); }
4700 void Init(GLuint _mask) {
4701 SetHeader();
4702 mask = _mask;
4705 void* Set(void* cmd, GLuint _mask) {
4706 static_cast<ValueType*>(cmd)->Init(_mask);
4707 return NextCmdAddress<ValueType>(cmd);
4710 gpu::CommandHeader header;
4711 uint32_t mask;
4714 COMPILE_ASSERT(sizeof(StencilMask) == 8, Sizeof_StencilMask_is_not_8);
4715 COMPILE_ASSERT(offsetof(StencilMask, header) == 0,
4716 OffsetOf_StencilMask_header_not_0);
4717 COMPILE_ASSERT(offsetof(StencilMask, mask) == 4,
4718 OffsetOf_StencilMask_mask_not_4);
4720 struct StencilMaskSeparate {
4721 typedef StencilMaskSeparate ValueType;
4722 static const CommandId kCmdId = kStencilMaskSeparate;
4723 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4724 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4726 static uint32_t ComputeSize() {
4727 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4730 void SetHeader() { header.SetCmd<ValueType>(); }
4732 void Init(GLenum _face, GLuint _mask) {
4733 SetHeader();
4734 face = _face;
4735 mask = _mask;
4738 void* Set(void* cmd, GLenum _face, GLuint _mask) {
4739 static_cast<ValueType*>(cmd)->Init(_face, _mask);
4740 return NextCmdAddress<ValueType>(cmd);
4743 gpu::CommandHeader header;
4744 uint32_t face;
4745 uint32_t mask;
4748 COMPILE_ASSERT(sizeof(StencilMaskSeparate) == 12,
4749 Sizeof_StencilMaskSeparate_is_not_12);
4750 COMPILE_ASSERT(offsetof(StencilMaskSeparate, header) == 0,
4751 OffsetOf_StencilMaskSeparate_header_not_0);
4752 COMPILE_ASSERT(offsetof(StencilMaskSeparate, face) == 4,
4753 OffsetOf_StencilMaskSeparate_face_not_4);
4754 COMPILE_ASSERT(offsetof(StencilMaskSeparate, mask) == 8,
4755 OffsetOf_StencilMaskSeparate_mask_not_8);
4757 struct StencilOp {
4758 typedef StencilOp ValueType;
4759 static const CommandId kCmdId = kStencilOp;
4760 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4761 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4763 static uint32_t ComputeSize() {
4764 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4767 void SetHeader() { header.SetCmd<ValueType>(); }
4769 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
4770 SetHeader();
4771 fail = _fail;
4772 zfail = _zfail;
4773 zpass = _zpass;
4776 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
4777 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
4778 return NextCmdAddress<ValueType>(cmd);
4781 gpu::CommandHeader header;
4782 uint32_t fail;
4783 uint32_t zfail;
4784 uint32_t zpass;
4787 COMPILE_ASSERT(sizeof(StencilOp) == 16, Sizeof_StencilOp_is_not_16);
4788 COMPILE_ASSERT(offsetof(StencilOp, header) == 0,
4789 OffsetOf_StencilOp_header_not_0);
4790 COMPILE_ASSERT(offsetof(StencilOp, fail) == 4, OffsetOf_StencilOp_fail_not_4);
4791 COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8, OffsetOf_StencilOp_zfail_not_8);
4792 COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12,
4793 OffsetOf_StencilOp_zpass_not_12);
4795 struct StencilOpSeparate {
4796 typedef StencilOpSeparate ValueType;
4797 static const CommandId kCmdId = kStencilOpSeparate;
4798 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4801 static uint32_t ComputeSize() {
4802 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4805 void SetHeader() { header.SetCmd<ValueType>(); }
4807 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
4808 SetHeader();
4809 face = _face;
4810 fail = _fail;
4811 zfail = _zfail;
4812 zpass = _zpass;
4815 void* Set(void* cmd,
4816 GLenum _face,
4817 GLenum _fail,
4818 GLenum _zfail,
4819 GLenum _zpass) {
4820 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
4821 return NextCmdAddress<ValueType>(cmd);
4824 gpu::CommandHeader header;
4825 uint32_t face;
4826 uint32_t fail;
4827 uint32_t zfail;
4828 uint32_t zpass;
4831 COMPILE_ASSERT(sizeof(StencilOpSeparate) == 20,
4832 Sizeof_StencilOpSeparate_is_not_20);
4833 COMPILE_ASSERT(offsetof(StencilOpSeparate, header) == 0,
4834 OffsetOf_StencilOpSeparate_header_not_0);
4835 COMPILE_ASSERT(offsetof(StencilOpSeparate, face) == 4,
4836 OffsetOf_StencilOpSeparate_face_not_4);
4837 COMPILE_ASSERT(offsetof(StencilOpSeparate, fail) == 8,
4838 OffsetOf_StencilOpSeparate_fail_not_8);
4839 COMPILE_ASSERT(offsetof(StencilOpSeparate, zfail) == 12,
4840 OffsetOf_StencilOpSeparate_zfail_not_12);
4841 COMPILE_ASSERT(offsetof(StencilOpSeparate, zpass) == 16,
4842 OffsetOf_StencilOpSeparate_zpass_not_16);
4844 struct TexImage2D {
4845 typedef TexImage2D ValueType;
4846 static const CommandId kCmdId = kTexImage2D;
4847 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4850 static uint32_t ComputeSize() {
4851 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4854 void SetHeader() { header.SetCmd<ValueType>(); }
4856 void Init(GLenum _target,
4857 GLint _level,
4858 GLint _internalformat,
4859 GLsizei _width,
4860 GLsizei _height,
4861 GLenum _format,
4862 GLenum _type,
4863 uint32_t _pixels_shm_id,
4864 uint32_t _pixels_shm_offset) {
4865 SetHeader();
4866 target = _target;
4867 level = _level;
4868 internalformat = _internalformat;
4869 width = _width;
4870 height = _height;
4871 format = _format;
4872 type = _type;
4873 pixels_shm_id = _pixels_shm_id;
4874 pixels_shm_offset = _pixels_shm_offset;
4877 void* Set(void* cmd,
4878 GLenum _target,
4879 GLint _level,
4880 GLint _internalformat,
4881 GLsizei _width,
4882 GLsizei _height,
4883 GLenum _format,
4884 GLenum _type,
4885 uint32_t _pixels_shm_id,
4886 uint32_t _pixels_shm_offset) {
4887 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
4888 _height, _format, _type, _pixels_shm_id,
4889 _pixels_shm_offset);
4890 return NextCmdAddress<ValueType>(cmd);
4893 gpu::CommandHeader header;
4894 uint32_t target;
4895 int32_t level;
4896 int32_t internalformat;
4897 int32_t width;
4898 int32_t height;
4899 uint32_t format;
4900 uint32_t type;
4901 uint32_t pixels_shm_id;
4902 uint32_t pixels_shm_offset;
4903 static const int32_t border = 0;
4906 COMPILE_ASSERT(sizeof(TexImage2D) == 40, Sizeof_TexImage2D_is_not_40);
4907 COMPILE_ASSERT(offsetof(TexImage2D, header) == 0,
4908 OffsetOf_TexImage2D_header_not_0);
4909 COMPILE_ASSERT(offsetof(TexImage2D, target) == 4,
4910 OffsetOf_TexImage2D_target_not_4);
4911 COMPILE_ASSERT(offsetof(TexImage2D, level) == 8,
4912 OffsetOf_TexImage2D_level_not_8);
4913 COMPILE_ASSERT(offsetof(TexImage2D, internalformat) == 12,
4914 OffsetOf_TexImage2D_internalformat_not_12);
4915 COMPILE_ASSERT(offsetof(TexImage2D, width) == 16,
4916 OffsetOf_TexImage2D_width_not_16);
4917 COMPILE_ASSERT(offsetof(TexImage2D, height) == 20,
4918 OffsetOf_TexImage2D_height_not_20);
4919 COMPILE_ASSERT(offsetof(TexImage2D, format) == 24,
4920 OffsetOf_TexImage2D_format_not_24);
4921 COMPILE_ASSERT(offsetof(TexImage2D, type) == 28,
4922 OffsetOf_TexImage2D_type_not_28);
4923 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 32,
4924 OffsetOf_TexImage2D_pixels_shm_id_not_32);
4925 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 36,
4926 OffsetOf_TexImage2D_pixels_shm_offset_not_36);
4928 struct TexParameterf {
4929 typedef TexParameterf ValueType;
4930 static const CommandId kCmdId = kTexParameterf;
4931 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4932 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4934 static uint32_t ComputeSize() {
4935 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4938 void SetHeader() { header.SetCmd<ValueType>(); }
4940 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
4941 SetHeader();
4942 target = _target;
4943 pname = _pname;
4944 param = _param;
4947 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
4948 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
4949 return NextCmdAddress<ValueType>(cmd);
4952 gpu::CommandHeader header;
4953 uint32_t target;
4954 uint32_t pname;
4955 float param;
4958 COMPILE_ASSERT(sizeof(TexParameterf) == 16, Sizeof_TexParameterf_is_not_16);
4959 COMPILE_ASSERT(offsetof(TexParameterf, header) == 0,
4960 OffsetOf_TexParameterf_header_not_0);
4961 COMPILE_ASSERT(offsetof(TexParameterf, target) == 4,
4962 OffsetOf_TexParameterf_target_not_4);
4963 COMPILE_ASSERT(offsetof(TexParameterf, pname) == 8,
4964 OffsetOf_TexParameterf_pname_not_8);
4965 COMPILE_ASSERT(offsetof(TexParameterf, param) == 12,
4966 OffsetOf_TexParameterf_param_not_12);
4968 struct TexParameterfvImmediate {
4969 typedef TexParameterfvImmediate ValueType;
4970 static const CommandId kCmdId = kTexParameterfvImmediate;
4971 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
4972 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4974 static uint32_t ComputeDataSize() {
4975 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT
4978 static uint32_t ComputeSize() {
4979 return static_cast<uint32_t>(sizeof(ValueType) +
4980 ComputeDataSize()); // NOLINT
4983 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
4985 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
4986 SetHeader();
4987 target = _target;
4988 pname = _pname;
4989 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
4992 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
4993 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
4994 const uint32_t size = ComputeSize();
4995 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
4998 gpu::CommandHeader header;
4999 uint32_t target;
5000 uint32_t pname;
5003 COMPILE_ASSERT(sizeof(TexParameterfvImmediate) == 12,
5004 Sizeof_TexParameterfvImmediate_is_not_12);
5005 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, header) == 0,
5006 OffsetOf_TexParameterfvImmediate_header_not_0);
5007 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, target) == 4,
5008 OffsetOf_TexParameterfvImmediate_target_not_4);
5009 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, pname) == 8,
5010 OffsetOf_TexParameterfvImmediate_pname_not_8);
5012 struct TexParameteri {
5013 typedef TexParameteri ValueType;
5014 static const CommandId kCmdId = kTexParameteri;
5015 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5016 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5018 static uint32_t ComputeSize() {
5019 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5022 void SetHeader() { header.SetCmd<ValueType>(); }
5024 void Init(GLenum _target, GLenum _pname, GLint _param) {
5025 SetHeader();
5026 target = _target;
5027 pname = _pname;
5028 param = _param;
5031 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
5032 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
5033 return NextCmdAddress<ValueType>(cmd);
5036 gpu::CommandHeader header;
5037 uint32_t target;
5038 uint32_t pname;
5039 int32_t param;
5042 COMPILE_ASSERT(sizeof(TexParameteri) == 16, Sizeof_TexParameteri_is_not_16);
5043 COMPILE_ASSERT(offsetof(TexParameteri, header) == 0,
5044 OffsetOf_TexParameteri_header_not_0);
5045 COMPILE_ASSERT(offsetof(TexParameteri, target) == 4,
5046 OffsetOf_TexParameteri_target_not_4);
5047 COMPILE_ASSERT(offsetof(TexParameteri, pname) == 8,
5048 OffsetOf_TexParameteri_pname_not_8);
5049 COMPILE_ASSERT(offsetof(TexParameteri, param) == 12,
5050 OffsetOf_TexParameteri_param_not_12);
5052 struct TexParameterivImmediate {
5053 typedef TexParameterivImmediate ValueType;
5054 static const CommandId kCmdId = kTexParameterivImmediate;
5055 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5056 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5058 static uint32_t ComputeDataSize() {
5059 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT
5062 static uint32_t ComputeSize() {
5063 return static_cast<uint32_t>(sizeof(ValueType) +
5064 ComputeDataSize()); // NOLINT
5067 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
5069 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
5070 SetHeader();
5071 target = _target;
5072 pname = _pname;
5073 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
5076 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
5077 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
5078 const uint32_t size = ComputeSize();
5079 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5082 gpu::CommandHeader header;
5083 uint32_t target;
5084 uint32_t pname;
5087 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12,
5088 Sizeof_TexParameterivImmediate_is_not_12);
5089 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0,
5090 OffsetOf_TexParameterivImmediate_header_not_0);
5091 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4,
5092 OffsetOf_TexParameterivImmediate_target_not_4);
5093 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8,
5094 OffsetOf_TexParameterivImmediate_pname_not_8);
5096 struct TexSubImage2D {
5097 typedef TexSubImage2D ValueType;
5098 static const CommandId kCmdId = kTexSubImage2D;
5099 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5100 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5102 static uint32_t ComputeSize() {
5103 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5106 void SetHeader() { header.SetCmd<ValueType>(); }
5108 void Init(GLenum _target,
5109 GLint _level,
5110 GLint _xoffset,
5111 GLint _yoffset,
5112 GLsizei _width,
5113 GLsizei _height,
5114 GLenum _format,
5115 GLenum _type,
5116 uint32_t _pixels_shm_id,
5117 uint32_t _pixels_shm_offset,
5118 GLboolean _internal) {
5119 SetHeader();
5120 target = _target;
5121 level = _level;
5122 xoffset = _xoffset;
5123 yoffset = _yoffset;
5124 width = _width;
5125 height = _height;
5126 format = _format;
5127 type = _type;
5128 pixels_shm_id = _pixels_shm_id;
5129 pixels_shm_offset = _pixels_shm_offset;
5130 internal = _internal;
5133 void* Set(void* cmd,
5134 GLenum _target,
5135 GLint _level,
5136 GLint _xoffset,
5137 GLint _yoffset,
5138 GLsizei _width,
5139 GLsizei _height,
5140 GLenum _format,
5141 GLenum _type,
5142 uint32_t _pixels_shm_id,
5143 uint32_t _pixels_shm_offset,
5144 GLboolean _internal) {
5145 static_cast<ValueType*>(cmd)
5146 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
5147 _type, _pixels_shm_id, _pixels_shm_offset, _internal);
5148 return NextCmdAddress<ValueType>(cmd);
5151 gpu::CommandHeader header;
5152 uint32_t target;
5153 int32_t level;
5154 int32_t xoffset;
5155 int32_t yoffset;
5156 int32_t width;
5157 int32_t height;
5158 uint32_t format;
5159 uint32_t type;
5160 uint32_t pixels_shm_id;
5161 uint32_t pixels_shm_offset;
5162 uint32_t internal;
5165 COMPILE_ASSERT(sizeof(TexSubImage2D) == 48, Sizeof_TexSubImage2D_is_not_48);
5166 COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0,
5167 OffsetOf_TexSubImage2D_header_not_0);
5168 COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4,
5169 OffsetOf_TexSubImage2D_target_not_4);
5170 COMPILE_ASSERT(offsetof(TexSubImage2D, level) == 8,
5171 OffsetOf_TexSubImage2D_level_not_8);
5172 COMPILE_ASSERT(offsetof(TexSubImage2D, xoffset) == 12,
5173 OffsetOf_TexSubImage2D_xoffset_not_12);
5174 COMPILE_ASSERT(offsetof(TexSubImage2D, yoffset) == 16,
5175 OffsetOf_TexSubImage2D_yoffset_not_16);
5176 COMPILE_ASSERT(offsetof(TexSubImage2D, width) == 20,
5177 OffsetOf_TexSubImage2D_width_not_20);
5178 COMPILE_ASSERT(offsetof(TexSubImage2D, height) == 24,
5179 OffsetOf_TexSubImage2D_height_not_24);
5180 COMPILE_ASSERT(offsetof(TexSubImage2D, format) == 28,
5181 OffsetOf_TexSubImage2D_format_not_28);
5182 COMPILE_ASSERT(offsetof(TexSubImage2D, type) == 32,
5183 OffsetOf_TexSubImage2D_type_not_32);
5184 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_id) == 36,
5185 OffsetOf_TexSubImage2D_pixels_shm_id_not_36);
5186 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
5187 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40);
5188 COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44,
5189 OffsetOf_TexSubImage2D_internal_not_44);
5191 struct Uniform1f {
5192 typedef Uniform1f ValueType;
5193 static const CommandId kCmdId = kUniform1f;
5194 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5195 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5197 static uint32_t ComputeSize() {
5198 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5201 void SetHeader() { header.SetCmd<ValueType>(); }
5203 void Init(GLint _location, GLfloat _x) {
5204 SetHeader();
5205 location = _location;
5206 x = _x;
5209 void* Set(void* cmd, GLint _location, GLfloat _x) {
5210 static_cast<ValueType*>(cmd)->Init(_location, _x);
5211 return NextCmdAddress<ValueType>(cmd);
5214 gpu::CommandHeader header;
5215 int32_t location;
5216 float x;
5219 COMPILE_ASSERT(sizeof(Uniform1f) == 12, Sizeof_Uniform1f_is_not_12);
5220 COMPILE_ASSERT(offsetof(Uniform1f, header) == 0,
5221 OffsetOf_Uniform1f_header_not_0);
5222 COMPILE_ASSERT(offsetof(Uniform1f, location) == 4,
5223 OffsetOf_Uniform1f_location_not_4);
5224 COMPILE_ASSERT(offsetof(Uniform1f, x) == 8, OffsetOf_Uniform1f_x_not_8);
5226 struct Uniform1fvImmediate {
5227 typedef Uniform1fvImmediate ValueType;
5228 static const CommandId kCmdId = kUniform1fvImmediate;
5229 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5232 static uint32_t ComputeDataSize(GLsizei count) {
5233 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT
5236 static uint32_t ComputeSize(GLsizei count) {
5237 return static_cast<uint32_t>(sizeof(ValueType) +
5238 ComputeDataSize(count)); // NOLINT
5241 void SetHeader(GLsizei count) {
5242 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5245 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
5246 SetHeader(_count);
5247 location = _location;
5248 count = _count;
5249 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5252 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
5253 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5254 const uint32_t size = ComputeSize(_count);
5255 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5258 gpu::CommandHeader header;
5259 int32_t location;
5260 int32_t count;
5263 COMPILE_ASSERT(sizeof(Uniform1fvImmediate) == 12,
5264 Sizeof_Uniform1fvImmediate_is_not_12);
5265 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, header) == 0,
5266 OffsetOf_Uniform1fvImmediate_header_not_0);
5267 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, location) == 4,
5268 OffsetOf_Uniform1fvImmediate_location_not_4);
5269 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, count) == 8,
5270 OffsetOf_Uniform1fvImmediate_count_not_8);
5272 struct Uniform1i {
5273 typedef Uniform1i ValueType;
5274 static const CommandId kCmdId = kUniform1i;
5275 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5276 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5278 static uint32_t ComputeSize() {
5279 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5282 void SetHeader() { header.SetCmd<ValueType>(); }
5284 void Init(GLint _location, GLint _x) {
5285 SetHeader();
5286 location = _location;
5287 x = _x;
5290 void* Set(void* cmd, GLint _location, GLint _x) {
5291 static_cast<ValueType*>(cmd)->Init(_location, _x);
5292 return NextCmdAddress<ValueType>(cmd);
5295 gpu::CommandHeader header;
5296 int32_t location;
5297 int32_t x;
5300 COMPILE_ASSERT(sizeof(Uniform1i) == 12, Sizeof_Uniform1i_is_not_12);
5301 COMPILE_ASSERT(offsetof(Uniform1i, header) == 0,
5302 OffsetOf_Uniform1i_header_not_0);
5303 COMPILE_ASSERT(offsetof(Uniform1i, location) == 4,
5304 OffsetOf_Uniform1i_location_not_4);
5305 COMPILE_ASSERT(offsetof(Uniform1i, x) == 8, OffsetOf_Uniform1i_x_not_8);
5307 struct Uniform1ivImmediate {
5308 typedef Uniform1ivImmediate ValueType;
5309 static const CommandId kCmdId = kUniform1ivImmediate;
5310 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5311 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5313 static uint32_t ComputeDataSize(GLsizei count) {
5314 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT
5317 static uint32_t ComputeSize(GLsizei count) {
5318 return static_cast<uint32_t>(sizeof(ValueType) +
5319 ComputeDataSize(count)); // NOLINT
5322 void SetHeader(GLsizei count) {
5323 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5326 void Init(GLint _location, GLsizei _count, const GLint* _v) {
5327 SetHeader(_count);
5328 location = _location;
5329 count = _count;
5330 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5333 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
5334 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5335 const uint32_t size = ComputeSize(_count);
5336 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5339 gpu::CommandHeader header;
5340 int32_t location;
5341 int32_t count;
5344 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12,
5345 Sizeof_Uniform1ivImmediate_is_not_12);
5346 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0,
5347 OffsetOf_Uniform1ivImmediate_header_not_0);
5348 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4,
5349 OffsetOf_Uniform1ivImmediate_location_not_4);
5350 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8,
5351 OffsetOf_Uniform1ivImmediate_count_not_8);
5353 struct Uniform2f {
5354 typedef Uniform2f ValueType;
5355 static const CommandId kCmdId = kUniform2f;
5356 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5357 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5359 static uint32_t ComputeSize() {
5360 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5363 void SetHeader() { header.SetCmd<ValueType>(); }
5365 void Init(GLint _location, GLfloat _x, GLfloat _y) {
5366 SetHeader();
5367 location = _location;
5368 x = _x;
5369 y = _y;
5372 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
5373 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
5374 return NextCmdAddress<ValueType>(cmd);
5377 gpu::CommandHeader header;
5378 int32_t location;
5379 float x;
5380 float y;
5383 COMPILE_ASSERT(sizeof(Uniform2f) == 16, Sizeof_Uniform2f_is_not_16);
5384 COMPILE_ASSERT(offsetof(Uniform2f, header) == 0,
5385 OffsetOf_Uniform2f_header_not_0);
5386 COMPILE_ASSERT(offsetof(Uniform2f, location) == 4,
5387 OffsetOf_Uniform2f_location_not_4);
5388 COMPILE_ASSERT(offsetof(Uniform2f, x) == 8, OffsetOf_Uniform2f_x_not_8);
5389 COMPILE_ASSERT(offsetof(Uniform2f, y) == 12, OffsetOf_Uniform2f_y_not_12);
5391 struct Uniform2fvImmediate {
5392 typedef Uniform2fvImmediate ValueType;
5393 static const CommandId kCmdId = kUniform2fvImmediate;
5394 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5395 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5397 static uint32_t ComputeDataSize(GLsizei count) {
5398 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT
5401 static uint32_t ComputeSize(GLsizei count) {
5402 return static_cast<uint32_t>(sizeof(ValueType) +
5403 ComputeDataSize(count)); // NOLINT
5406 void SetHeader(GLsizei count) {
5407 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5410 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
5411 SetHeader(_count);
5412 location = _location;
5413 count = _count;
5414 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5417 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
5418 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5419 const uint32_t size = ComputeSize(_count);
5420 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5423 gpu::CommandHeader header;
5424 int32_t location;
5425 int32_t count;
5428 COMPILE_ASSERT(sizeof(Uniform2fvImmediate) == 12,
5429 Sizeof_Uniform2fvImmediate_is_not_12);
5430 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, header) == 0,
5431 OffsetOf_Uniform2fvImmediate_header_not_0);
5432 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, location) == 4,
5433 OffsetOf_Uniform2fvImmediate_location_not_4);
5434 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, count) == 8,
5435 OffsetOf_Uniform2fvImmediate_count_not_8);
5437 struct Uniform2i {
5438 typedef Uniform2i ValueType;
5439 static const CommandId kCmdId = kUniform2i;
5440 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5441 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5443 static uint32_t ComputeSize() {
5444 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5447 void SetHeader() { header.SetCmd<ValueType>(); }
5449 void Init(GLint _location, GLint _x, GLint _y) {
5450 SetHeader();
5451 location = _location;
5452 x = _x;
5453 y = _y;
5456 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
5457 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
5458 return NextCmdAddress<ValueType>(cmd);
5461 gpu::CommandHeader header;
5462 int32_t location;
5463 int32_t x;
5464 int32_t y;
5467 COMPILE_ASSERT(sizeof(Uniform2i) == 16, Sizeof_Uniform2i_is_not_16);
5468 COMPILE_ASSERT(offsetof(Uniform2i, header) == 0,
5469 OffsetOf_Uniform2i_header_not_0);
5470 COMPILE_ASSERT(offsetof(Uniform2i, location) == 4,
5471 OffsetOf_Uniform2i_location_not_4);
5472 COMPILE_ASSERT(offsetof(Uniform2i, x) == 8, OffsetOf_Uniform2i_x_not_8);
5473 COMPILE_ASSERT(offsetof(Uniform2i, y) == 12, OffsetOf_Uniform2i_y_not_12);
5475 struct Uniform2ivImmediate {
5476 typedef Uniform2ivImmediate ValueType;
5477 static const CommandId kCmdId = kUniform2ivImmediate;
5478 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5479 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5481 static uint32_t ComputeDataSize(GLsizei count) {
5482 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT
5485 static uint32_t ComputeSize(GLsizei count) {
5486 return static_cast<uint32_t>(sizeof(ValueType) +
5487 ComputeDataSize(count)); // NOLINT
5490 void SetHeader(GLsizei count) {
5491 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5494 void Init(GLint _location, GLsizei _count, const GLint* _v) {
5495 SetHeader(_count);
5496 location = _location;
5497 count = _count;
5498 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5501 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
5502 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5503 const uint32_t size = ComputeSize(_count);
5504 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5507 gpu::CommandHeader header;
5508 int32_t location;
5509 int32_t count;
5512 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12,
5513 Sizeof_Uniform2ivImmediate_is_not_12);
5514 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0,
5515 OffsetOf_Uniform2ivImmediate_header_not_0);
5516 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4,
5517 OffsetOf_Uniform2ivImmediate_location_not_4);
5518 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8,
5519 OffsetOf_Uniform2ivImmediate_count_not_8);
5521 struct Uniform3f {
5522 typedef Uniform3f ValueType;
5523 static const CommandId kCmdId = kUniform3f;
5524 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5525 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5527 static uint32_t ComputeSize() {
5528 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5531 void SetHeader() { header.SetCmd<ValueType>(); }
5533 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
5534 SetHeader();
5535 location = _location;
5536 x = _x;
5537 y = _y;
5538 z = _z;
5541 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
5542 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
5543 return NextCmdAddress<ValueType>(cmd);
5546 gpu::CommandHeader header;
5547 int32_t location;
5548 float x;
5549 float y;
5550 float z;
5553 COMPILE_ASSERT(sizeof(Uniform3f) == 20, Sizeof_Uniform3f_is_not_20);
5554 COMPILE_ASSERT(offsetof(Uniform3f, header) == 0,
5555 OffsetOf_Uniform3f_header_not_0);
5556 COMPILE_ASSERT(offsetof(Uniform3f, location) == 4,
5557 OffsetOf_Uniform3f_location_not_4);
5558 COMPILE_ASSERT(offsetof(Uniform3f, x) == 8, OffsetOf_Uniform3f_x_not_8);
5559 COMPILE_ASSERT(offsetof(Uniform3f, y) == 12, OffsetOf_Uniform3f_y_not_12);
5560 COMPILE_ASSERT(offsetof(Uniform3f, z) == 16, OffsetOf_Uniform3f_z_not_16);
5562 struct Uniform3fvImmediate {
5563 typedef Uniform3fvImmediate ValueType;
5564 static const CommandId kCmdId = kUniform3fvImmediate;
5565 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5568 static uint32_t ComputeDataSize(GLsizei count) {
5569 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT
5572 static uint32_t ComputeSize(GLsizei count) {
5573 return static_cast<uint32_t>(sizeof(ValueType) +
5574 ComputeDataSize(count)); // NOLINT
5577 void SetHeader(GLsizei count) {
5578 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5581 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
5582 SetHeader(_count);
5583 location = _location;
5584 count = _count;
5585 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5588 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
5589 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5590 const uint32_t size = ComputeSize(_count);
5591 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5594 gpu::CommandHeader header;
5595 int32_t location;
5596 int32_t count;
5599 COMPILE_ASSERT(sizeof(Uniform3fvImmediate) == 12,
5600 Sizeof_Uniform3fvImmediate_is_not_12);
5601 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, header) == 0,
5602 OffsetOf_Uniform3fvImmediate_header_not_0);
5603 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, location) == 4,
5604 OffsetOf_Uniform3fvImmediate_location_not_4);
5605 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, count) == 8,
5606 OffsetOf_Uniform3fvImmediate_count_not_8);
5608 struct Uniform3i {
5609 typedef Uniform3i ValueType;
5610 static const CommandId kCmdId = kUniform3i;
5611 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5612 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5614 static uint32_t ComputeSize() {
5615 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5618 void SetHeader() { header.SetCmd<ValueType>(); }
5620 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
5621 SetHeader();
5622 location = _location;
5623 x = _x;
5624 y = _y;
5625 z = _z;
5628 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
5629 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
5630 return NextCmdAddress<ValueType>(cmd);
5633 gpu::CommandHeader header;
5634 int32_t location;
5635 int32_t x;
5636 int32_t y;
5637 int32_t z;
5640 COMPILE_ASSERT(sizeof(Uniform3i) == 20, Sizeof_Uniform3i_is_not_20);
5641 COMPILE_ASSERT(offsetof(Uniform3i, header) == 0,
5642 OffsetOf_Uniform3i_header_not_0);
5643 COMPILE_ASSERT(offsetof(Uniform3i, location) == 4,
5644 OffsetOf_Uniform3i_location_not_4);
5645 COMPILE_ASSERT(offsetof(Uniform3i, x) == 8, OffsetOf_Uniform3i_x_not_8);
5646 COMPILE_ASSERT(offsetof(Uniform3i, y) == 12, OffsetOf_Uniform3i_y_not_12);
5647 COMPILE_ASSERT(offsetof(Uniform3i, z) == 16, OffsetOf_Uniform3i_z_not_16);
5649 struct Uniform3ivImmediate {
5650 typedef Uniform3ivImmediate ValueType;
5651 static const CommandId kCmdId = kUniform3ivImmediate;
5652 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5653 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5655 static uint32_t ComputeDataSize(GLsizei count) {
5656 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT
5659 static uint32_t ComputeSize(GLsizei count) {
5660 return static_cast<uint32_t>(sizeof(ValueType) +
5661 ComputeDataSize(count)); // NOLINT
5664 void SetHeader(GLsizei count) {
5665 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5668 void Init(GLint _location, GLsizei _count, const GLint* _v) {
5669 SetHeader(_count);
5670 location = _location;
5671 count = _count;
5672 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5675 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
5676 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5677 const uint32_t size = ComputeSize(_count);
5678 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5681 gpu::CommandHeader header;
5682 int32_t location;
5683 int32_t count;
5686 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12,
5687 Sizeof_Uniform3ivImmediate_is_not_12);
5688 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0,
5689 OffsetOf_Uniform3ivImmediate_header_not_0);
5690 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4,
5691 OffsetOf_Uniform3ivImmediate_location_not_4);
5692 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8,
5693 OffsetOf_Uniform3ivImmediate_count_not_8);
5695 struct Uniform4f {
5696 typedef Uniform4f ValueType;
5697 static const CommandId kCmdId = kUniform4f;
5698 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5699 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5701 static uint32_t ComputeSize() {
5702 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5705 void SetHeader() { header.SetCmd<ValueType>(); }
5707 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
5708 SetHeader();
5709 location = _location;
5710 x = _x;
5711 y = _y;
5712 z = _z;
5713 w = _w;
5716 void* Set(void* cmd,
5717 GLint _location,
5718 GLfloat _x,
5719 GLfloat _y,
5720 GLfloat _z,
5721 GLfloat _w) {
5722 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
5723 return NextCmdAddress<ValueType>(cmd);
5726 gpu::CommandHeader header;
5727 int32_t location;
5728 float x;
5729 float y;
5730 float z;
5731 float w;
5734 COMPILE_ASSERT(sizeof(Uniform4f) == 24, Sizeof_Uniform4f_is_not_24);
5735 COMPILE_ASSERT(offsetof(Uniform4f, header) == 0,
5736 OffsetOf_Uniform4f_header_not_0);
5737 COMPILE_ASSERT(offsetof(Uniform4f, location) == 4,
5738 OffsetOf_Uniform4f_location_not_4);
5739 COMPILE_ASSERT(offsetof(Uniform4f, x) == 8, OffsetOf_Uniform4f_x_not_8);
5740 COMPILE_ASSERT(offsetof(Uniform4f, y) == 12, OffsetOf_Uniform4f_y_not_12);
5741 COMPILE_ASSERT(offsetof(Uniform4f, z) == 16, OffsetOf_Uniform4f_z_not_16);
5742 COMPILE_ASSERT(offsetof(Uniform4f, w) == 20, OffsetOf_Uniform4f_w_not_20);
5744 struct Uniform4fvImmediate {
5745 typedef Uniform4fvImmediate ValueType;
5746 static const CommandId kCmdId = kUniform4fvImmediate;
5747 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5748 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5750 static uint32_t ComputeDataSize(GLsizei count) {
5751 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
5754 static uint32_t ComputeSize(GLsizei count) {
5755 return static_cast<uint32_t>(sizeof(ValueType) +
5756 ComputeDataSize(count)); // NOLINT
5759 void SetHeader(GLsizei count) {
5760 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5763 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
5764 SetHeader(_count);
5765 location = _location;
5766 count = _count;
5767 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5770 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
5771 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5772 const uint32_t size = ComputeSize(_count);
5773 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5776 gpu::CommandHeader header;
5777 int32_t location;
5778 int32_t count;
5781 COMPILE_ASSERT(sizeof(Uniform4fvImmediate) == 12,
5782 Sizeof_Uniform4fvImmediate_is_not_12);
5783 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, header) == 0,
5784 OffsetOf_Uniform4fvImmediate_header_not_0);
5785 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, location) == 4,
5786 OffsetOf_Uniform4fvImmediate_location_not_4);
5787 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, count) == 8,
5788 OffsetOf_Uniform4fvImmediate_count_not_8);
5790 struct Uniform4i {
5791 typedef Uniform4i ValueType;
5792 static const CommandId kCmdId = kUniform4i;
5793 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5794 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5796 static uint32_t ComputeSize() {
5797 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5800 void SetHeader() { header.SetCmd<ValueType>(); }
5802 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
5803 SetHeader();
5804 location = _location;
5805 x = _x;
5806 y = _y;
5807 z = _z;
5808 w = _w;
5811 void* Set(void* cmd,
5812 GLint _location,
5813 GLint _x,
5814 GLint _y,
5815 GLint _z,
5816 GLint _w) {
5817 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
5818 return NextCmdAddress<ValueType>(cmd);
5821 gpu::CommandHeader header;
5822 int32_t location;
5823 int32_t x;
5824 int32_t y;
5825 int32_t z;
5826 int32_t w;
5829 COMPILE_ASSERT(sizeof(Uniform4i) == 24, Sizeof_Uniform4i_is_not_24);
5830 COMPILE_ASSERT(offsetof(Uniform4i, header) == 0,
5831 OffsetOf_Uniform4i_header_not_0);
5832 COMPILE_ASSERT(offsetof(Uniform4i, location) == 4,
5833 OffsetOf_Uniform4i_location_not_4);
5834 COMPILE_ASSERT(offsetof(Uniform4i, x) == 8, OffsetOf_Uniform4i_x_not_8);
5835 COMPILE_ASSERT(offsetof(Uniform4i, y) == 12, OffsetOf_Uniform4i_y_not_12);
5836 COMPILE_ASSERT(offsetof(Uniform4i, z) == 16, OffsetOf_Uniform4i_z_not_16);
5837 COMPILE_ASSERT(offsetof(Uniform4i, w) == 20, OffsetOf_Uniform4i_w_not_20);
5839 struct Uniform4ivImmediate {
5840 typedef Uniform4ivImmediate ValueType;
5841 static const CommandId kCmdId = kUniform4ivImmediate;
5842 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5843 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5845 static uint32_t ComputeDataSize(GLsizei count) {
5846 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT
5849 static uint32_t ComputeSize(GLsizei count) {
5850 return static_cast<uint32_t>(sizeof(ValueType) +
5851 ComputeDataSize(count)); // NOLINT
5854 void SetHeader(GLsizei count) {
5855 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5858 void Init(GLint _location, GLsizei _count, const GLint* _v) {
5859 SetHeader(_count);
5860 location = _location;
5861 count = _count;
5862 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
5865 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
5866 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
5867 const uint32_t size = ComputeSize(_count);
5868 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5871 gpu::CommandHeader header;
5872 int32_t location;
5873 int32_t count;
5876 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12,
5877 Sizeof_Uniform4ivImmediate_is_not_12);
5878 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0,
5879 OffsetOf_Uniform4ivImmediate_header_not_0);
5880 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4,
5881 OffsetOf_Uniform4ivImmediate_location_not_4);
5882 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8,
5883 OffsetOf_Uniform4ivImmediate_count_not_8);
5885 struct UniformMatrix2fvImmediate {
5886 typedef UniformMatrix2fvImmediate ValueType;
5887 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
5888 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5891 static uint32_t ComputeDataSize(GLsizei count) {
5892 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
5895 static uint32_t ComputeSize(GLsizei count) {
5896 return static_cast<uint32_t>(sizeof(ValueType) +
5897 ComputeDataSize(count)); // NOLINT
5900 void SetHeader(GLsizei count) {
5901 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5904 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
5905 SetHeader(_count);
5906 location = _location;
5907 count = _count;
5908 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
5911 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
5912 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
5913 const uint32_t size = ComputeSize(_count);
5914 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5917 gpu::CommandHeader header;
5918 int32_t location;
5919 int32_t count;
5920 static const uint32_t transpose = false;
5923 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 12,
5924 Sizeof_UniformMatrix2fvImmediate_is_not_12);
5925 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0,
5926 OffsetOf_UniformMatrix2fvImmediate_header_not_0);
5927 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4,
5928 OffsetOf_UniformMatrix2fvImmediate_location_not_4);
5929 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8,
5930 OffsetOf_UniformMatrix2fvImmediate_count_not_8);
5932 struct UniformMatrix3fvImmediate {
5933 typedef UniformMatrix3fvImmediate ValueType;
5934 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
5935 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5936 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5938 static uint32_t ComputeDataSize(GLsizei count) {
5939 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT
5942 static uint32_t ComputeSize(GLsizei count) {
5943 return static_cast<uint32_t>(sizeof(ValueType) +
5944 ComputeDataSize(count)); // NOLINT
5947 void SetHeader(GLsizei count) {
5948 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5951 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
5952 SetHeader(_count);
5953 location = _location;
5954 count = _count;
5955 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
5958 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
5959 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
5960 const uint32_t size = ComputeSize(_count);
5961 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5964 gpu::CommandHeader header;
5965 int32_t location;
5966 int32_t count;
5967 static const uint32_t transpose = false;
5970 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 12,
5971 Sizeof_UniformMatrix3fvImmediate_is_not_12);
5972 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0,
5973 OffsetOf_UniformMatrix3fvImmediate_header_not_0);
5974 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4,
5975 OffsetOf_UniformMatrix3fvImmediate_location_not_4);
5976 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8,
5977 OffsetOf_UniformMatrix3fvImmediate_count_not_8);
5979 struct UniformMatrix4fvImmediate {
5980 typedef UniformMatrix4fvImmediate ValueType;
5981 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
5982 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5983 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5985 static uint32_t ComputeDataSize(GLsizei count) {
5986 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT
5989 static uint32_t ComputeSize(GLsizei count) {
5990 return static_cast<uint32_t>(sizeof(ValueType) +
5991 ComputeDataSize(count)); // NOLINT
5994 void SetHeader(GLsizei count) {
5995 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5998 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
5999 SetHeader(_count);
6000 location = _location;
6001 count = _count;
6002 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
6005 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
6006 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
6007 const uint32_t size = ComputeSize(_count);
6008 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6011 gpu::CommandHeader header;
6012 int32_t location;
6013 int32_t count;
6014 static const uint32_t transpose = false;
6017 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 12,
6018 Sizeof_UniformMatrix4fvImmediate_is_not_12);
6019 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0,
6020 OffsetOf_UniformMatrix4fvImmediate_header_not_0);
6021 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4,
6022 OffsetOf_UniformMatrix4fvImmediate_location_not_4);
6023 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8,
6024 OffsetOf_UniformMatrix4fvImmediate_count_not_8);
6026 struct UseProgram {
6027 typedef UseProgram ValueType;
6028 static const CommandId kCmdId = kUseProgram;
6029 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6030 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6032 static uint32_t ComputeSize() {
6033 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6036 void SetHeader() { header.SetCmd<ValueType>(); }
6038 void Init(GLuint _program) {
6039 SetHeader();
6040 program = _program;
6043 void* Set(void* cmd, GLuint _program) {
6044 static_cast<ValueType*>(cmd)->Init(_program);
6045 return NextCmdAddress<ValueType>(cmd);
6048 gpu::CommandHeader header;
6049 uint32_t program;
6052 COMPILE_ASSERT(sizeof(UseProgram) == 8, Sizeof_UseProgram_is_not_8);
6053 COMPILE_ASSERT(offsetof(UseProgram, header) == 0,
6054 OffsetOf_UseProgram_header_not_0);
6055 COMPILE_ASSERT(offsetof(UseProgram, program) == 4,
6056 OffsetOf_UseProgram_program_not_4);
6058 struct ValidateProgram {
6059 typedef ValidateProgram ValueType;
6060 static const CommandId kCmdId = kValidateProgram;
6061 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6062 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6064 static uint32_t ComputeSize() {
6065 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6068 void SetHeader() { header.SetCmd<ValueType>(); }
6070 void Init(GLuint _program) {
6071 SetHeader();
6072 program = _program;
6075 void* Set(void* cmd, GLuint _program) {
6076 static_cast<ValueType*>(cmd)->Init(_program);
6077 return NextCmdAddress<ValueType>(cmd);
6080 gpu::CommandHeader header;
6081 uint32_t program;
6084 COMPILE_ASSERT(sizeof(ValidateProgram) == 8, Sizeof_ValidateProgram_is_not_8);
6085 COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0,
6086 OffsetOf_ValidateProgram_header_not_0);
6087 COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4,
6088 OffsetOf_ValidateProgram_program_not_4);
6090 struct VertexAttrib1f {
6091 typedef VertexAttrib1f ValueType;
6092 static const CommandId kCmdId = kVertexAttrib1f;
6093 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6094 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6096 static uint32_t ComputeSize() {
6097 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6100 void SetHeader() { header.SetCmd<ValueType>(); }
6102 void Init(GLuint _indx, GLfloat _x) {
6103 SetHeader();
6104 indx = _indx;
6105 x = _x;
6108 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
6109 static_cast<ValueType*>(cmd)->Init(_indx, _x);
6110 return NextCmdAddress<ValueType>(cmd);
6113 gpu::CommandHeader header;
6114 uint32_t indx;
6115 float x;
6118 COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12, Sizeof_VertexAttrib1f_is_not_12);
6119 COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0,
6120 OffsetOf_VertexAttrib1f_header_not_0);
6121 COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4,
6122 OffsetOf_VertexAttrib1f_indx_not_4);
6123 COMPILE_ASSERT(offsetof(VertexAttrib1f, x) == 8,
6124 OffsetOf_VertexAttrib1f_x_not_8);
6126 struct VertexAttrib1fvImmediate {
6127 typedef VertexAttrib1fvImmediate ValueType;
6128 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
6129 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6130 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6132 static uint32_t ComputeDataSize() {
6133 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT
6136 static uint32_t ComputeSize() {
6137 return static_cast<uint32_t>(sizeof(ValueType) +
6138 ComputeDataSize()); // NOLINT
6141 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6143 void Init(GLuint _indx, const GLfloat* _values) {
6144 SetHeader();
6145 indx = _indx;
6146 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
6149 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
6150 static_cast<ValueType*>(cmd)->Init(_indx, _values);
6151 const uint32_t size = ComputeSize();
6152 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6155 gpu::CommandHeader header;
6156 uint32_t indx;
6159 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate) == 8,
6160 Sizeof_VertexAttrib1fvImmediate_is_not_8);
6161 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, header) == 0,
6162 OffsetOf_VertexAttrib1fvImmediate_header_not_0);
6163 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, indx) == 4,
6164 OffsetOf_VertexAttrib1fvImmediate_indx_not_4);
6166 struct VertexAttrib2f {
6167 typedef VertexAttrib2f ValueType;
6168 static const CommandId kCmdId = kVertexAttrib2f;
6169 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6170 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6172 static uint32_t ComputeSize() {
6173 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6176 void SetHeader() { header.SetCmd<ValueType>(); }
6178 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
6179 SetHeader();
6180 indx = _indx;
6181 x = _x;
6182 y = _y;
6185 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
6186 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
6187 return NextCmdAddress<ValueType>(cmd);
6190 gpu::CommandHeader header;
6191 uint32_t indx;
6192 float x;
6193 float y;
6196 COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16, Sizeof_VertexAttrib2f_is_not_16);
6197 COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0,
6198 OffsetOf_VertexAttrib2f_header_not_0);
6199 COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4,
6200 OffsetOf_VertexAttrib2f_indx_not_4);
6201 COMPILE_ASSERT(offsetof(VertexAttrib2f, x) == 8,
6202 OffsetOf_VertexAttrib2f_x_not_8);
6203 COMPILE_ASSERT(offsetof(VertexAttrib2f, y) == 12,
6204 OffsetOf_VertexAttrib2f_y_not_12);
6206 struct VertexAttrib2fvImmediate {
6207 typedef VertexAttrib2fvImmediate ValueType;
6208 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
6209 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6210 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6212 static uint32_t ComputeDataSize() {
6213 return static_cast<uint32_t>(sizeof(GLfloat) * 2); // NOLINT
6216 static uint32_t ComputeSize() {
6217 return static_cast<uint32_t>(sizeof(ValueType) +
6218 ComputeDataSize()); // NOLINT
6221 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6223 void Init(GLuint _indx, const GLfloat* _values) {
6224 SetHeader();
6225 indx = _indx;
6226 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
6229 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
6230 static_cast<ValueType*>(cmd)->Init(_indx, _values);
6231 const uint32_t size = ComputeSize();
6232 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6235 gpu::CommandHeader header;
6236 uint32_t indx;
6239 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate) == 8,
6240 Sizeof_VertexAttrib2fvImmediate_is_not_8);
6241 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, header) == 0,
6242 OffsetOf_VertexAttrib2fvImmediate_header_not_0);
6243 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, indx) == 4,
6244 OffsetOf_VertexAttrib2fvImmediate_indx_not_4);
6246 struct VertexAttrib3f {
6247 typedef VertexAttrib3f ValueType;
6248 static const CommandId kCmdId = kVertexAttrib3f;
6249 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6250 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6252 static uint32_t ComputeSize() {
6253 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6256 void SetHeader() { header.SetCmd<ValueType>(); }
6258 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
6259 SetHeader();
6260 indx = _indx;
6261 x = _x;
6262 y = _y;
6263 z = _z;
6266 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
6267 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
6268 return NextCmdAddress<ValueType>(cmd);
6271 gpu::CommandHeader header;
6272 uint32_t indx;
6273 float x;
6274 float y;
6275 float z;
6278 COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20, Sizeof_VertexAttrib3f_is_not_20);
6279 COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0,
6280 OffsetOf_VertexAttrib3f_header_not_0);
6281 COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4,
6282 OffsetOf_VertexAttrib3f_indx_not_4);
6283 COMPILE_ASSERT(offsetof(VertexAttrib3f, x) == 8,
6284 OffsetOf_VertexAttrib3f_x_not_8);
6285 COMPILE_ASSERT(offsetof(VertexAttrib3f, y) == 12,
6286 OffsetOf_VertexAttrib3f_y_not_12);
6287 COMPILE_ASSERT(offsetof(VertexAttrib3f, z) == 16,
6288 OffsetOf_VertexAttrib3f_z_not_16);
6290 struct VertexAttrib3fvImmediate {
6291 typedef VertexAttrib3fvImmediate ValueType;
6292 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
6293 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6294 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6296 static uint32_t ComputeDataSize() {
6297 return static_cast<uint32_t>(sizeof(GLfloat) * 3); // NOLINT
6300 static uint32_t ComputeSize() {
6301 return static_cast<uint32_t>(sizeof(ValueType) +
6302 ComputeDataSize()); // NOLINT
6305 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6307 void Init(GLuint _indx, const GLfloat* _values) {
6308 SetHeader();
6309 indx = _indx;
6310 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
6313 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
6314 static_cast<ValueType*>(cmd)->Init(_indx, _values);
6315 const uint32_t size = ComputeSize();
6316 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6319 gpu::CommandHeader header;
6320 uint32_t indx;
6323 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate) == 8,
6324 Sizeof_VertexAttrib3fvImmediate_is_not_8);
6325 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, header) == 0,
6326 OffsetOf_VertexAttrib3fvImmediate_header_not_0);
6327 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, indx) == 4,
6328 OffsetOf_VertexAttrib3fvImmediate_indx_not_4);
6330 struct VertexAttrib4f {
6331 typedef VertexAttrib4f ValueType;
6332 static const CommandId kCmdId = kVertexAttrib4f;
6333 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6334 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6336 static uint32_t ComputeSize() {
6337 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6340 void SetHeader() { header.SetCmd<ValueType>(); }
6342 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
6343 SetHeader();
6344 indx = _indx;
6345 x = _x;
6346 y = _y;
6347 z = _z;
6348 w = _w;
6351 void* Set(void* cmd,
6352 GLuint _indx,
6353 GLfloat _x,
6354 GLfloat _y,
6355 GLfloat _z,
6356 GLfloat _w) {
6357 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
6358 return NextCmdAddress<ValueType>(cmd);
6361 gpu::CommandHeader header;
6362 uint32_t indx;
6363 float x;
6364 float y;
6365 float z;
6366 float w;
6369 COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24, Sizeof_VertexAttrib4f_is_not_24);
6370 COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0,
6371 OffsetOf_VertexAttrib4f_header_not_0);
6372 COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4,
6373 OffsetOf_VertexAttrib4f_indx_not_4);
6374 COMPILE_ASSERT(offsetof(VertexAttrib4f, x) == 8,
6375 OffsetOf_VertexAttrib4f_x_not_8);
6376 COMPILE_ASSERT(offsetof(VertexAttrib4f, y) == 12,
6377 OffsetOf_VertexAttrib4f_y_not_12);
6378 COMPILE_ASSERT(offsetof(VertexAttrib4f, z) == 16,
6379 OffsetOf_VertexAttrib4f_z_not_16);
6380 COMPILE_ASSERT(offsetof(VertexAttrib4f, w) == 20,
6381 OffsetOf_VertexAttrib4f_w_not_20);
6383 struct VertexAttrib4fvImmediate {
6384 typedef VertexAttrib4fvImmediate ValueType;
6385 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
6386 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6387 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6389 static uint32_t ComputeDataSize() {
6390 return static_cast<uint32_t>(sizeof(GLfloat) * 4); // NOLINT
6393 static uint32_t ComputeSize() {
6394 return static_cast<uint32_t>(sizeof(ValueType) +
6395 ComputeDataSize()); // NOLINT
6398 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6400 void Init(GLuint _indx, const GLfloat* _values) {
6401 SetHeader();
6402 indx = _indx;
6403 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
6406 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
6407 static_cast<ValueType*>(cmd)->Init(_indx, _values);
6408 const uint32_t size = ComputeSize();
6409 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6412 gpu::CommandHeader header;
6413 uint32_t indx;
6416 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8,
6417 Sizeof_VertexAttrib4fvImmediate_is_not_8);
6418 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0,
6419 OffsetOf_VertexAttrib4fvImmediate_header_not_0);
6420 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4,
6421 OffsetOf_VertexAttrib4fvImmediate_indx_not_4);
6423 struct VertexAttribPointer {
6424 typedef VertexAttribPointer ValueType;
6425 static const CommandId kCmdId = kVertexAttribPointer;
6426 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6427 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6429 static uint32_t ComputeSize() {
6430 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6433 void SetHeader() { header.SetCmd<ValueType>(); }
6435 void Init(GLuint _indx,
6436 GLint _size,
6437 GLenum _type,
6438 GLboolean _normalized,
6439 GLsizei _stride,
6440 GLuint _offset) {
6441 SetHeader();
6442 indx = _indx;
6443 size = _size;
6444 type = _type;
6445 normalized = _normalized;
6446 stride = _stride;
6447 offset = _offset;
6450 void* Set(void* cmd,
6451 GLuint _indx,
6452 GLint _size,
6453 GLenum _type,
6454 GLboolean _normalized,
6455 GLsizei _stride,
6456 GLuint _offset) {
6457 static_cast<ValueType*>(cmd)
6458 ->Init(_indx, _size, _type, _normalized, _stride, _offset);
6459 return NextCmdAddress<ValueType>(cmd);
6462 gpu::CommandHeader header;
6463 uint32_t indx;
6464 int32_t size;
6465 uint32_t type;
6466 uint32_t normalized;
6467 int32_t stride;
6468 uint32_t offset;
6471 COMPILE_ASSERT(sizeof(VertexAttribPointer) == 28,
6472 Sizeof_VertexAttribPointer_is_not_28);
6473 COMPILE_ASSERT(offsetof(VertexAttribPointer, header) == 0,
6474 OffsetOf_VertexAttribPointer_header_not_0);
6475 COMPILE_ASSERT(offsetof(VertexAttribPointer, indx) == 4,
6476 OffsetOf_VertexAttribPointer_indx_not_4);
6477 COMPILE_ASSERT(offsetof(VertexAttribPointer, size) == 8,
6478 OffsetOf_VertexAttribPointer_size_not_8);
6479 COMPILE_ASSERT(offsetof(VertexAttribPointer, type) == 12,
6480 OffsetOf_VertexAttribPointer_type_not_12);
6481 COMPILE_ASSERT(offsetof(VertexAttribPointer, normalized) == 16,
6482 OffsetOf_VertexAttribPointer_normalized_not_16);
6483 COMPILE_ASSERT(offsetof(VertexAttribPointer, stride) == 20,
6484 OffsetOf_VertexAttribPointer_stride_not_20);
6485 COMPILE_ASSERT(offsetof(VertexAttribPointer, offset) == 24,
6486 OffsetOf_VertexAttribPointer_offset_not_24);
6488 struct Viewport {
6489 typedef Viewport ValueType;
6490 static const CommandId kCmdId = kViewport;
6491 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6492 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6494 static uint32_t ComputeSize() {
6495 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6498 void SetHeader() { header.SetCmd<ValueType>(); }
6500 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
6501 SetHeader();
6502 x = _x;
6503 y = _y;
6504 width = _width;
6505 height = _height;
6508 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
6509 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
6510 return NextCmdAddress<ValueType>(cmd);
6513 gpu::CommandHeader header;
6514 int32_t x;
6515 int32_t y;
6516 int32_t width;
6517 int32_t height;
6520 COMPILE_ASSERT(sizeof(Viewport) == 20, Sizeof_Viewport_is_not_20);
6521 COMPILE_ASSERT(offsetof(Viewport, header) == 0, OffsetOf_Viewport_header_not_0);
6522 COMPILE_ASSERT(offsetof(Viewport, x) == 4, OffsetOf_Viewport_x_not_4);
6523 COMPILE_ASSERT(offsetof(Viewport, y) == 8, OffsetOf_Viewport_y_not_8);
6524 COMPILE_ASSERT(offsetof(Viewport, width) == 12, OffsetOf_Viewport_width_not_12);
6525 COMPILE_ASSERT(offsetof(Viewport, height) == 16,
6526 OffsetOf_Viewport_height_not_16);
6528 struct BlitFramebufferCHROMIUM {
6529 typedef BlitFramebufferCHROMIUM ValueType;
6530 static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
6531 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
6534 static uint32_t ComputeSize() {
6535 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6538 void SetHeader() { header.SetCmd<ValueType>(); }
6540 void Init(GLint _srcX0,
6541 GLint _srcY0,
6542 GLint _srcX1,
6543 GLint _srcY1,
6544 GLint _dstX0,
6545 GLint _dstY0,
6546 GLint _dstX1,
6547 GLint _dstY1,
6548 GLbitfield _mask,
6549 GLenum _filter) {
6550 SetHeader();
6551 srcX0 = _srcX0;
6552 srcY0 = _srcY0;
6553 srcX1 = _srcX1;
6554 srcY1 = _srcY1;
6555 dstX0 = _dstX0;
6556 dstY0 = _dstY0;
6557 dstX1 = _dstX1;
6558 dstY1 = _dstY1;
6559 mask = _mask;
6560 filter = _filter;
6563 void* Set(void* cmd,
6564 GLint _srcX0,
6565 GLint _srcY0,
6566 GLint _srcX1,
6567 GLint _srcY1,
6568 GLint _dstX0,
6569 GLint _dstY0,
6570 GLint _dstX1,
6571 GLint _dstY1,
6572 GLbitfield _mask,
6573 GLenum _filter) {
6574 static_cast<ValueType*>(cmd)->Init(_srcX0, _srcY0, _srcX1, _srcY1, _dstX0,
6575 _dstY0, _dstX1, _dstY1, _mask, _filter);
6576 return NextCmdAddress<ValueType>(cmd);
6579 gpu::CommandHeader header;
6580 int32_t srcX0;
6581 int32_t srcY0;
6582 int32_t srcX1;
6583 int32_t srcY1;
6584 int32_t dstX0;
6585 int32_t dstY0;
6586 int32_t dstX1;
6587 int32_t dstY1;
6588 uint32_t mask;
6589 uint32_t filter;
6592 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM) == 44,
6593 Sizeof_BlitFramebufferCHROMIUM_is_not_44);
6594 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, header) == 0,
6595 OffsetOf_BlitFramebufferCHROMIUM_header_not_0);
6596 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
6597 OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4);
6598 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
6599 OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8);
6600 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
6601 OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12);
6602 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
6603 OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16);
6604 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
6605 OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20);
6606 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
6607 OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24);
6608 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
6609 OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28);
6610 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
6611 OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32);
6612 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
6613 OffsetOf_BlitFramebufferCHROMIUM_mask_not_36);
6614 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
6615 OffsetOf_BlitFramebufferCHROMIUM_filter_not_40);
6617 // GL_CHROMIUM_framebuffer_multisample
6618 struct RenderbufferStorageMultisampleCHROMIUM {
6619 typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
6620 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
6621 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6622 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6624 static uint32_t ComputeSize() {
6625 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6628 void SetHeader() { header.SetCmd<ValueType>(); }
6630 void Init(GLenum _target,
6631 GLsizei _samples,
6632 GLenum _internalformat,
6633 GLsizei _width,
6634 GLsizei _height) {
6635 SetHeader();
6636 target = _target;
6637 samples = _samples;
6638 internalformat = _internalformat;
6639 width = _width;
6640 height = _height;
6643 void* Set(void* cmd,
6644 GLenum _target,
6645 GLsizei _samples,
6646 GLenum _internalformat,
6647 GLsizei _width,
6648 GLsizei _height) {
6649 static_cast<ValueType*>(cmd)
6650 ->Init(_target, _samples, _internalformat, _width, _height);
6651 return NextCmdAddress<ValueType>(cmd);
6654 gpu::CommandHeader header;
6655 uint32_t target;
6656 int32_t samples;
6657 uint32_t internalformat;
6658 int32_t width;
6659 int32_t height;
6662 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
6663 Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24);
6664 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
6665 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0);
6666 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
6667 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4);
6668 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
6669 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8);
6670 COMPILE_ASSERT(
6671 offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12,
6672 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12);
6673 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
6674 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16);
6675 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
6676 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20);
6678 // GL_EXT_multisampled_render_to_texture
6679 struct RenderbufferStorageMultisampleEXT {
6680 typedef RenderbufferStorageMultisampleEXT ValueType;
6681 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
6682 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6683 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6685 static uint32_t ComputeSize() {
6686 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6689 void SetHeader() { header.SetCmd<ValueType>(); }
6691 void Init(GLenum _target,
6692 GLsizei _samples,
6693 GLenum _internalformat,
6694 GLsizei _width,
6695 GLsizei _height) {
6696 SetHeader();
6697 target = _target;
6698 samples = _samples;
6699 internalformat = _internalformat;
6700 width = _width;
6701 height = _height;
6704 void* Set(void* cmd,
6705 GLenum _target,
6706 GLsizei _samples,
6707 GLenum _internalformat,
6708 GLsizei _width,
6709 GLsizei _height) {
6710 static_cast<ValueType*>(cmd)
6711 ->Init(_target, _samples, _internalformat, _width, _height);
6712 return NextCmdAddress<ValueType>(cmd);
6715 gpu::CommandHeader header;
6716 uint32_t target;
6717 int32_t samples;
6718 uint32_t internalformat;
6719 int32_t width;
6720 int32_t height;
6723 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT) == 24,
6724 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24);
6725 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
6726 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0);
6727 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
6728 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4);
6729 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
6730 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8);
6731 COMPILE_ASSERT(
6732 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
6733 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12);
6734 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
6735 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16);
6736 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
6737 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20);
6739 struct FramebufferTexture2DMultisampleEXT {
6740 typedef FramebufferTexture2DMultisampleEXT ValueType;
6741 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
6742 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6743 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
6745 static uint32_t ComputeSize() {
6746 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6749 void SetHeader() { header.SetCmd<ValueType>(); }
6751 void Init(GLenum _target,
6752 GLenum _attachment,
6753 GLenum _textarget,
6754 GLuint _texture,
6755 GLsizei _samples) {
6756 SetHeader();
6757 target = _target;
6758 attachment = _attachment;
6759 textarget = _textarget;
6760 texture = _texture;
6761 samples = _samples;
6764 void* Set(void* cmd,
6765 GLenum _target,
6766 GLenum _attachment,
6767 GLenum _textarget,
6768 GLuint _texture,
6769 GLsizei _samples) {
6770 static_cast<ValueType*>(cmd)
6771 ->Init(_target, _attachment, _textarget, _texture, _samples);
6772 return NextCmdAddress<ValueType>(cmd);
6775 gpu::CommandHeader header;
6776 uint32_t target;
6777 uint32_t attachment;
6778 uint32_t textarget;
6779 uint32_t texture;
6780 int32_t samples;
6781 static const int32_t level = 0;
6784 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT) == 24,
6785 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_24);
6786 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
6787 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0);
6788 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
6789 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4);
6790 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
6791 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8);
6792 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
6793 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12);
6794 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
6795 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16);
6796 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20,
6797 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_20);
6799 struct TexStorage2DEXT {
6800 typedef TexStorage2DEXT ValueType;
6801 static const CommandId kCmdId = kTexStorage2DEXT;
6802 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6803 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6805 static uint32_t ComputeSize() {
6806 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6809 void SetHeader() { header.SetCmd<ValueType>(); }
6811 void Init(GLenum _target,
6812 GLsizei _levels,
6813 GLenum _internalFormat,
6814 GLsizei _width,
6815 GLsizei _height) {
6816 SetHeader();
6817 target = _target;
6818 levels = _levels;
6819 internalFormat = _internalFormat;
6820 width = _width;
6821 height = _height;
6824 void* Set(void* cmd,
6825 GLenum _target,
6826 GLsizei _levels,
6827 GLenum _internalFormat,
6828 GLsizei _width,
6829 GLsizei _height) {
6830 static_cast<ValueType*>(cmd)
6831 ->Init(_target, _levels, _internalFormat, _width, _height);
6832 return NextCmdAddress<ValueType>(cmd);
6835 gpu::CommandHeader header;
6836 uint32_t target;
6837 int32_t levels;
6838 uint32_t internalFormat;
6839 int32_t width;
6840 int32_t height;
6843 COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24, Sizeof_TexStorage2DEXT_is_not_24);
6844 COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0,
6845 OffsetOf_TexStorage2DEXT_header_not_0);
6846 COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4,
6847 OffsetOf_TexStorage2DEXT_target_not_4);
6848 COMPILE_ASSERT(offsetof(TexStorage2DEXT, levels) == 8,
6849 OffsetOf_TexStorage2DEXT_levels_not_8);
6850 COMPILE_ASSERT(offsetof(TexStorage2DEXT, internalFormat) == 12,
6851 OffsetOf_TexStorage2DEXT_internalFormat_not_12);
6852 COMPILE_ASSERT(offsetof(TexStorage2DEXT, width) == 16,
6853 OffsetOf_TexStorage2DEXT_width_not_16);
6854 COMPILE_ASSERT(offsetof(TexStorage2DEXT, height) == 20,
6855 OffsetOf_TexStorage2DEXT_height_not_20);
6857 struct GenQueriesEXTImmediate {
6858 typedef GenQueriesEXTImmediate ValueType;
6859 static const CommandId kCmdId = kGenQueriesEXTImmediate;
6860 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6863 static uint32_t ComputeDataSize(GLsizei n) {
6864 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
6867 static uint32_t ComputeSize(GLsizei n) {
6868 return static_cast<uint32_t>(sizeof(ValueType) +
6869 ComputeDataSize(n)); // NOLINT
6872 void SetHeader(GLsizei n) {
6873 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
6876 void Init(GLsizei _n, GLuint* _queries) {
6877 SetHeader(_n);
6878 n = _n;
6879 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
6882 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
6883 static_cast<ValueType*>(cmd)->Init(_n, _queries);
6884 const uint32_t size = ComputeSize(_n);
6885 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6888 gpu::CommandHeader header;
6889 int32_t n;
6892 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate) == 8,
6893 Sizeof_GenQueriesEXTImmediate_is_not_8);
6894 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, header) == 0,
6895 OffsetOf_GenQueriesEXTImmediate_header_not_0);
6896 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, n) == 4,
6897 OffsetOf_GenQueriesEXTImmediate_n_not_4);
6899 struct DeleteQueriesEXTImmediate {
6900 typedef DeleteQueriesEXTImmediate ValueType;
6901 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
6902 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6903 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6905 static uint32_t ComputeDataSize(GLsizei n) {
6906 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
6909 static uint32_t ComputeSize(GLsizei n) {
6910 return static_cast<uint32_t>(sizeof(ValueType) +
6911 ComputeDataSize(n)); // NOLINT
6914 void SetHeader(GLsizei n) {
6915 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
6918 void Init(GLsizei _n, const GLuint* _queries) {
6919 SetHeader(_n);
6920 n = _n;
6921 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
6924 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
6925 static_cast<ValueType*>(cmd)->Init(_n, _queries);
6926 const uint32_t size = ComputeSize(_n);
6927 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6930 gpu::CommandHeader header;
6931 int32_t n;
6934 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate) == 8,
6935 Sizeof_DeleteQueriesEXTImmediate_is_not_8);
6936 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, header) == 0,
6937 OffsetOf_DeleteQueriesEXTImmediate_header_not_0);
6938 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, n) == 4,
6939 OffsetOf_DeleteQueriesEXTImmediate_n_not_4);
6941 struct BeginQueryEXT {
6942 typedef BeginQueryEXT ValueType;
6943 static const CommandId kCmdId = kBeginQueryEXT;
6944 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6945 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6947 static uint32_t ComputeSize() {
6948 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6951 void SetHeader() { header.SetCmd<ValueType>(); }
6953 void Init(GLenum _target,
6954 GLuint _id,
6955 uint32_t _sync_data_shm_id,
6956 uint32_t _sync_data_shm_offset) {
6957 SetHeader();
6958 target = _target;
6959 id = _id;
6960 sync_data_shm_id = _sync_data_shm_id;
6961 sync_data_shm_offset = _sync_data_shm_offset;
6964 void* Set(void* cmd,
6965 GLenum _target,
6966 GLuint _id,
6967 uint32_t _sync_data_shm_id,
6968 uint32_t _sync_data_shm_offset) {
6969 static_cast<ValueType*>(cmd)
6970 ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
6971 return NextCmdAddress<ValueType>(cmd);
6974 gpu::CommandHeader header;
6975 uint32_t target;
6976 uint32_t id;
6977 uint32_t sync_data_shm_id;
6978 uint32_t sync_data_shm_offset;
6981 COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20, Sizeof_BeginQueryEXT_is_not_20);
6982 COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0,
6983 OffsetOf_BeginQueryEXT_header_not_0);
6984 COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4,
6985 OffsetOf_BeginQueryEXT_target_not_4);
6986 COMPILE_ASSERT(offsetof(BeginQueryEXT, id) == 8,
6987 OffsetOf_BeginQueryEXT_id_not_8);
6988 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
6989 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12);
6990 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
6991 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16);
6993 struct EndQueryEXT {
6994 typedef EndQueryEXT ValueType;
6995 static const CommandId kCmdId = kEndQueryEXT;
6996 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6997 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6999 static uint32_t ComputeSize() {
7000 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7003 void SetHeader() { header.SetCmd<ValueType>(); }
7005 void Init(GLenum _target, GLuint _submit_count) {
7006 SetHeader();
7007 target = _target;
7008 submit_count = _submit_count;
7011 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
7012 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
7013 return NextCmdAddress<ValueType>(cmd);
7016 gpu::CommandHeader header;
7017 uint32_t target;
7018 uint32_t submit_count;
7021 COMPILE_ASSERT(sizeof(EndQueryEXT) == 12, Sizeof_EndQueryEXT_is_not_12);
7022 COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0,
7023 OffsetOf_EndQueryEXT_header_not_0);
7024 COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4,
7025 OffsetOf_EndQueryEXT_target_not_4);
7026 COMPILE_ASSERT(offsetof(EndQueryEXT, submit_count) == 8,
7027 OffsetOf_EndQueryEXT_submit_count_not_8);
7029 struct InsertEventMarkerEXT {
7030 typedef InsertEventMarkerEXT ValueType;
7031 static const CommandId kCmdId = kInsertEventMarkerEXT;
7032 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7035 static uint32_t ComputeSize() {
7036 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7039 void SetHeader() { header.SetCmd<ValueType>(); }
7041 void Init(GLuint _bucket_id) {
7042 SetHeader();
7043 bucket_id = _bucket_id;
7046 void* Set(void* cmd, GLuint _bucket_id) {
7047 static_cast<ValueType*>(cmd)->Init(_bucket_id);
7048 return NextCmdAddress<ValueType>(cmd);
7051 gpu::CommandHeader header;
7052 uint32_t bucket_id;
7055 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT) == 8,
7056 Sizeof_InsertEventMarkerEXT_is_not_8);
7057 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, header) == 0,
7058 OffsetOf_InsertEventMarkerEXT_header_not_0);
7059 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
7060 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4);
7062 struct PushGroupMarkerEXT {
7063 typedef PushGroupMarkerEXT ValueType;
7064 static const CommandId kCmdId = kPushGroupMarkerEXT;
7065 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7066 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7068 static uint32_t ComputeSize() {
7069 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7072 void SetHeader() { header.SetCmd<ValueType>(); }
7074 void Init(GLuint _bucket_id) {
7075 SetHeader();
7076 bucket_id = _bucket_id;
7079 void* Set(void* cmd, GLuint _bucket_id) {
7080 static_cast<ValueType*>(cmd)->Init(_bucket_id);
7081 return NextCmdAddress<ValueType>(cmd);
7084 gpu::CommandHeader header;
7085 uint32_t bucket_id;
7088 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT) == 8,
7089 Sizeof_PushGroupMarkerEXT_is_not_8);
7090 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, header) == 0,
7091 OffsetOf_PushGroupMarkerEXT_header_not_0);
7092 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
7093 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4);
7095 struct PopGroupMarkerEXT {
7096 typedef PopGroupMarkerEXT ValueType;
7097 static const CommandId kCmdId = kPopGroupMarkerEXT;
7098 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7099 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7101 static uint32_t ComputeSize() {
7102 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7105 void SetHeader() { header.SetCmd<ValueType>(); }
7107 void Init() { SetHeader(); }
7109 void* Set(void* cmd) {
7110 static_cast<ValueType*>(cmd)->Init();
7111 return NextCmdAddress<ValueType>(cmd);
7114 gpu::CommandHeader header;
7117 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT) == 4,
7118 Sizeof_PopGroupMarkerEXT_is_not_4);
7119 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT, header) == 0,
7120 OffsetOf_PopGroupMarkerEXT_header_not_0);
7122 struct GenVertexArraysOESImmediate {
7123 typedef GenVertexArraysOESImmediate ValueType;
7124 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
7125 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7126 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7128 static uint32_t ComputeDataSize(GLsizei n) {
7129 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
7132 static uint32_t ComputeSize(GLsizei n) {
7133 return static_cast<uint32_t>(sizeof(ValueType) +
7134 ComputeDataSize(n)); // NOLINT
7137 void SetHeader(GLsizei n) {
7138 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
7141 void Init(GLsizei _n, GLuint* _arrays) {
7142 SetHeader(_n);
7143 n = _n;
7144 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
7147 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
7148 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
7149 const uint32_t size = ComputeSize(_n);
7150 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7153 gpu::CommandHeader header;
7154 int32_t n;
7157 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate) == 8,
7158 Sizeof_GenVertexArraysOESImmediate_is_not_8);
7159 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, header) == 0,
7160 OffsetOf_GenVertexArraysOESImmediate_header_not_0);
7161 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, n) == 4,
7162 OffsetOf_GenVertexArraysOESImmediate_n_not_4);
7164 struct DeleteVertexArraysOESImmediate {
7165 typedef DeleteVertexArraysOESImmediate ValueType;
7166 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
7167 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7168 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7170 static uint32_t ComputeDataSize(GLsizei n) {
7171 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
7174 static uint32_t ComputeSize(GLsizei n) {
7175 return static_cast<uint32_t>(sizeof(ValueType) +
7176 ComputeDataSize(n)); // NOLINT
7179 void SetHeader(GLsizei n) {
7180 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
7183 void Init(GLsizei _n, const GLuint* _arrays) {
7184 SetHeader(_n);
7185 n = _n;
7186 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
7189 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
7190 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
7191 const uint32_t size = ComputeSize(_n);
7192 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7195 gpu::CommandHeader header;
7196 int32_t n;
7199 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate) == 8,
7200 Sizeof_DeleteVertexArraysOESImmediate_is_not_8);
7201 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
7202 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0);
7203 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
7204 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4);
7206 struct IsVertexArrayOES {
7207 typedef IsVertexArrayOES ValueType;
7208 static const CommandId kCmdId = kIsVertexArrayOES;
7209 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7210 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7212 typedef uint32_t Result;
7214 static uint32_t ComputeSize() {
7215 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7218 void SetHeader() { header.SetCmd<ValueType>(); }
7220 void Init(GLuint _array,
7221 uint32_t _result_shm_id,
7222 uint32_t _result_shm_offset) {
7223 SetHeader();
7224 array = _array;
7225 result_shm_id = _result_shm_id;
7226 result_shm_offset = _result_shm_offset;
7229 void* Set(void* cmd,
7230 GLuint _array,
7231 uint32_t _result_shm_id,
7232 uint32_t _result_shm_offset) {
7233 static_cast<ValueType*>(cmd)
7234 ->Init(_array, _result_shm_id, _result_shm_offset);
7235 return NextCmdAddress<ValueType>(cmd);
7238 gpu::CommandHeader header;
7239 uint32_t array;
7240 uint32_t result_shm_id;
7241 uint32_t result_shm_offset;
7244 COMPILE_ASSERT(sizeof(IsVertexArrayOES) == 16,
7245 Sizeof_IsVertexArrayOES_is_not_16);
7246 COMPILE_ASSERT(offsetof(IsVertexArrayOES, header) == 0,
7247 OffsetOf_IsVertexArrayOES_header_not_0);
7248 COMPILE_ASSERT(offsetof(IsVertexArrayOES, array) == 4,
7249 OffsetOf_IsVertexArrayOES_array_not_4);
7250 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_id) == 8,
7251 OffsetOf_IsVertexArrayOES_result_shm_id_not_8);
7252 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
7253 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12);
7255 struct BindVertexArrayOES {
7256 typedef BindVertexArrayOES ValueType;
7257 static const CommandId kCmdId = kBindVertexArrayOES;
7258 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7259 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7261 static uint32_t ComputeSize() {
7262 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7265 void SetHeader() { header.SetCmd<ValueType>(); }
7267 void Init(GLuint _array) {
7268 SetHeader();
7269 array = _array;
7272 void* Set(void* cmd, GLuint _array) {
7273 static_cast<ValueType*>(cmd)->Init(_array);
7274 return NextCmdAddress<ValueType>(cmd);
7277 gpu::CommandHeader header;
7278 uint32_t array;
7281 COMPILE_ASSERT(sizeof(BindVertexArrayOES) == 8,
7282 Sizeof_BindVertexArrayOES_is_not_8);
7283 COMPILE_ASSERT(offsetof(BindVertexArrayOES, header) == 0,
7284 OffsetOf_BindVertexArrayOES_header_not_0);
7285 COMPILE_ASSERT(offsetof(BindVertexArrayOES, array) == 4,
7286 OffsetOf_BindVertexArrayOES_array_not_4);
7288 struct SwapBuffers {
7289 typedef SwapBuffers ValueType;
7290 static const CommandId kCmdId = kSwapBuffers;
7291 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7292 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
7294 static uint32_t ComputeSize() {
7295 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7298 void SetHeader() { header.SetCmd<ValueType>(); }
7300 void Init() { SetHeader(); }
7302 void* Set(void* cmd) {
7303 static_cast<ValueType*>(cmd)->Init();
7304 return NextCmdAddress<ValueType>(cmd);
7307 gpu::CommandHeader header;
7310 COMPILE_ASSERT(sizeof(SwapBuffers) == 4, Sizeof_SwapBuffers_is_not_4);
7311 COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0,
7312 OffsetOf_SwapBuffers_header_not_0);
7314 struct GetMaxValueInBufferCHROMIUM {
7315 typedef GetMaxValueInBufferCHROMIUM ValueType;
7316 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
7317 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7318 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7320 typedef GLuint Result;
7322 static uint32_t ComputeSize() {
7323 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7326 void SetHeader() { header.SetCmd<ValueType>(); }
7328 void Init(GLuint _buffer_id,
7329 GLsizei _count,
7330 GLenum _type,
7331 GLuint _offset,
7332 uint32_t _result_shm_id,
7333 uint32_t _result_shm_offset) {
7334 SetHeader();
7335 buffer_id = _buffer_id;
7336 count = _count;
7337 type = _type;
7338 offset = _offset;
7339 result_shm_id = _result_shm_id;
7340 result_shm_offset = _result_shm_offset;
7343 void* Set(void* cmd,
7344 GLuint _buffer_id,
7345 GLsizei _count,
7346 GLenum _type,
7347 GLuint _offset,
7348 uint32_t _result_shm_id,
7349 uint32_t _result_shm_offset) {
7350 static_cast<ValueType*>(cmd)->Init(_buffer_id, _count, _type, _offset,
7351 _result_shm_id, _result_shm_offset);
7352 return NextCmdAddress<ValueType>(cmd);
7355 gpu::CommandHeader header;
7356 uint32_t buffer_id;
7357 int32_t count;
7358 uint32_t type;
7359 uint32_t offset;
7360 uint32_t result_shm_id;
7361 uint32_t result_shm_offset;
7364 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
7365 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28);
7366 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
7367 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0);
7368 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
7369 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4);
7370 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
7371 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8);
7372 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
7373 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12);
7374 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
7375 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16);
7376 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
7377 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20);
7378 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
7379 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24);
7381 struct EnableFeatureCHROMIUM {
7382 typedef EnableFeatureCHROMIUM ValueType;
7383 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
7384 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7385 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7387 typedef GLint Result;
7389 static uint32_t ComputeSize() {
7390 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7393 void SetHeader() { header.SetCmd<ValueType>(); }
7395 void Init(GLuint _bucket_id,
7396 uint32_t _result_shm_id,
7397 uint32_t _result_shm_offset) {
7398 SetHeader();
7399 bucket_id = _bucket_id;
7400 result_shm_id = _result_shm_id;
7401 result_shm_offset = _result_shm_offset;
7404 void* Set(void* cmd,
7405 GLuint _bucket_id,
7406 uint32_t _result_shm_id,
7407 uint32_t _result_shm_offset) {
7408 static_cast<ValueType*>(cmd)
7409 ->Init(_bucket_id, _result_shm_id, _result_shm_offset);
7410 return NextCmdAddress<ValueType>(cmd);
7413 gpu::CommandHeader header;
7414 uint32_t bucket_id;
7415 uint32_t result_shm_id;
7416 uint32_t result_shm_offset;
7419 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16,
7420 Sizeof_EnableFeatureCHROMIUM_is_not_16);
7421 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0,
7422 OffsetOf_EnableFeatureCHROMIUM_header_not_0);
7423 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
7424 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4);
7425 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
7426 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8);
7427 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
7428 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12);
7430 struct ResizeCHROMIUM {
7431 typedef ResizeCHROMIUM ValueType;
7432 static const CommandId kCmdId = kResizeCHROMIUM;
7433 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7434 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7436 static uint32_t ComputeSize() {
7437 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7440 void SetHeader() { header.SetCmd<ValueType>(); }
7442 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
7443 SetHeader();
7444 width = _width;
7445 height = _height;
7446 scale_factor = _scale_factor;
7449 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
7450 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
7451 return NextCmdAddress<ValueType>(cmd);
7454 gpu::CommandHeader header;
7455 uint32_t width;
7456 uint32_t height;
7457 float scale_factor;
7460 COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16, Sizeof_ResizeCHROMIUM_is_not_16);
7461 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0,
7462 OffsetOf_ResizeCHROMIUM_header_not_0);
7463 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4,
7464 OffsetOf_ResizeCHROMIUM_width_not_4);
7465 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, height) == 8,
7466 OffsetOf_ResizeCHROMIUM_height_not_8);
7467 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, scale_factor) == 12,
7468 OffsetOf_ResizeCHROMIUM_scale_factor_not_12);
7470 struct GetRequestableExtensionsCHROMIUM {
7471 typedef GetRequestableExtensionsCHROMIUM ValueType;
7472 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
7473 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7474 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7476 static uint32_t ComputeSize() {
7477 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7480 void SetHeader() { header.SetCmd<ValueType>(); }
7482 void Init(uint32_t _bucket_id) {
7483 SetHeader();
7484 bucket_id = _bucket_id;
7487 void* Set(void* cmd, uint32_t _bucket_id) {
7488 static_cast<ValueType*>(cmd)->Init(_bucket_id);
7489 return NextCmdAddress<ValueType>(cmd);
7492 gpu::CommandHeader header;
7493 uint32_t bucket_id;
7496 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
7497 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8);
7498 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
7499 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0);
7500 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
7501 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4);
7503 struct RequestExtensionCHROMIUM {
7504 typedef RequestExtensionCHROMIUM ValueType;
7505 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
7506 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7507 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7509 static uint32_t ComputeSize() {
7510 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7513 void SetHeader() { header.SetCmd<ValueType>(); }
7515 void Init(uint32_t _bucket_id) {
7516 SetHeader();
7517 bucket_id = _bucket_id;
7520 void* Set(void* cmd, uint32_t _bucket_id) {
7521 static_cast<ValueType*>(cmd)->Init(_bucket_id);
7522 return NextCmdAddress<ValueType>(cmd);
7525 gpu::CommandHeader header;
7526 uint32_t bucket_id;
7529 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM) == 8,
7530 Sizeof_RequestExtensionCHROMIUM_is_not_8);
7531 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0,
7532 OffsetOf_RequestExtensionCHROMIUM_header_not_0);
7533 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
7534 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4);
7536 struct GetProgramInfoCHROMIUM {
7537 typedef GetProgramInfoCHROMIUM ValueType;
7538 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
7539 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7540 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7542 struct Result {
7543 uint32_t link_status;
7544 uint32_t num_attribs;
7545 uint32_t num_uniforms;
7548 static uint32_t ComputeSize() {
7549 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7552 void SetHeader() { header.SetCmd<ValueType>(); }
7554 void Init(GLuint _program, uint32_t _bucket_id) {
7555 SetHeader();
7556 program = _program;
7557 bucket_id = _bucket_id;
7560 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
7561 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
7562 return NextCmdAddress<ValueType>(cmd);
7565 gpu::CommandHeader header;
7566 uint32_t program;
7567 uint32_t bucket_id;
7570 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM) == 12,
7571 Sizeof_GetProgramInfoCHROMIUM_is_not_12);
7572 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, header) == 0,
7573 OffsetOf_GetProgramInfoCHROMIUM_header_not_0);
7574 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, program) == 4,
7575 OffsetOf_GetProgramInfoCHROMIUM_program_not_4);
7576 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
7577 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8);
7578 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
7579 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0);
7580 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
7581 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4);
7582 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
7583 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8);
7585 struct GetTranslatedShaderSourceANGLE {
7586 typedef GetTranslatedShaderSourceANGLE ValueType;
7587 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
7588 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7589 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7591 static uint32_t ComputeSize() {
7592 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7595 void SetHeader() { header.SetCmd<ValueType>(); }
7597 void Init(GLuint _shader, uint32_t _bucket_id) {
7598 SetHeader();
7599 shader = _shader;
7600 bucket_id = _bucket_id;
7603 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
7604 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
7605 return NextCmdAddress<ValueType>(cmd);
7608 gpu::CommandHeader header;
7609 uint32_t shader;
7610 uint32_t bucket_id;
7613 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE) == 12,
7614 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12);
7615 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
7616 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0);
7617 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
7618 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4);
7619 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
7620 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8);
7622 struct PostSubBufferCHROMIUM {
7623 typedef PostSubBufferCHROMIUM ValueType;
7624 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
7625 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7626 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7628 static uint32_t ComputeSize() {
7629 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7632 void SetHeader() { header.SetCmd<ValueType>(); }
7634 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
7635 SetHeader();
7636 x = _x;
7637 y = _y;
7638 width = _width;
7639 height = _height;
7642 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
7643 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
7644 return NextCmdAddress<ValueType>(cmd);
7647 gpu::CommandHeader header;
7648 int32_t x;
7649 int32_t y;
7650 int32_t width;
7651 int32_t height;
7654 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM) == 20,
7655 Sizeof_PostSubBufferCHROMIUM_is_not_20);
7656 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, header) == 0,
7657 OffsetOf_PostSubBufferCHROMIUM_header_not_0);
7658 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4,
7659 OffsetOf_PostSubBufferCHROMIUM_x_not_4);
7660 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8,
7661 OffsetOf_PostSubBufferCHROMIUM_y_not_8);
7662 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12,
7663 OffsetOf_PostSubBufferCHROMIUM_width_not_12);
7664 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
7665 OffsetOf_PostSubBufferCHROMIUM_height_not_16);
7667 struct TexImageIOSurface2DCHROMIUM {
7668 typedef TexImageIOSurface2DCHROMIUM ValueType;
7669 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
7670 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7671 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7673 static uint32_t ComputeSize() {
7674 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7677 void SetHeader() { header.SetCmd<ValueType>(); }
7679 void Init(GLenum _target,
7680 GLsizei _width,
7681 GLsizei _height,
7682 GLuint _ioSurfaceId,
7683 GLuint _plane) {
7684 SetHeader();
7685 target = _target;
7686 width = _width;
7687 height = _height;
7688 ioSurfaceId = _ioSurfaceId;
7689 plane = _plane;
7692 void* Set(void* cmd,
7693 GLenum _target,
7694 GLsizei _width,
7695 GLsizei _height,
7696 GLuint _ioSurfaceId,
7697 GLuint _plane) {
7698 static_cast<ValueType*>(cmd)
7699 ->Init(_target, _width, _height, _ioSurfaceId, _plane);
7700 return NextCmdAddress<ValueType>(cmd);
7703 gpu::CommandHeader header;
7704 uint32_t target;
7705 int32_t width;
7706 int32_t height;
7707 uint32_t ioSurfaceId;
7708 uint32_t plane;
7711 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
7712 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24);
7713 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
7714 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0);
7715 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
7716 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4);
7717 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
7718 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8);
7719 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
7720 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12);
7721 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
7722 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16);
7723 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
7724 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20);
7726 struct CopyTextureCHROMIUM {
7727 typedef CopyTextureCHROMIUM ValueType;
7728 static const CommandId kCmdId = kCopyTextureCHROMIUM;
7729 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7730 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7732 static uint32_t ComputeSize() {
7733 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7736 void SetHeader() { header.SetCmd<ValueType>(); }
7738 void Init(GLenum _target,
7739 GLenum _source_id,
7740 GLenum _dest_id,
7741 GLint _level,
7742 GLint _internalformat,
7743 GLenum _dest_type) {
7744 SetHeader();
7745 target = _target;
7746 source_id = _source_id;
7747 dest_id = _dest_id;
7748 level = _level;
7749 internalformat = _internalformat;
7750 dest_type = _dest_type;
7753 void* Set(void* cmd,
7754 GLenum _target,
7755 GLenum _source_id,
7756 GLenum _dest_id,
7757 GLint _level,
7758 GLint _internalformat,
7759 GLenum _dest_type) {
7760 static_cast<ValueType*>(cmd)->Init(_target, _source_id, _dest_id, _level,
7761 _internalformat, _dest_type);
7762 return NextCmdAddress<ValueType>(cmd);
7765 gpu::CommandHeader header;
7766 uint32_t target;
7767 uint32_t source_id;
7768 uint32_t dest_id;
7769 int32_t level;
7770 int32_t internalformat;
7771 uint32_t dest_type;
7774 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM) == 28,
7775 Sizeof_CopyTextureCHROMIUM_is_not_28);
7776 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, header) == 0,
7777 OffsetOf_CopyTextureCHROMIUM_header_not_0);
7778 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, target) == 4,
7779 OffsetOf_CopyTextureCHROMIUM_target_not_4);
7780 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, source_id) == 8,
7781 OffsetOf_CopyTextureCHROMIUM_source_id_not_8);
7782 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
7783 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12);
7784 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, level) == 16,
7785 OffsetOf_CopyTextureCHROMIUM_level_not_16);
7786 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, internalformat) == 20,
7787 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20);
7788 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_type) == 24,
7789 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24);
7791 struct DrawArraysInstancedANGLE {
7792 typedef DrawArraysInstancedANGLE ValueType;
7793 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
7794 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7795 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7797 static uint32_t ComputeSize() {
7798 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7801 void SetHeader() { header.SetCmd<ValueType>(); }
7803 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
7804 SetHeader();
7805 mode = _mode;
7806 first = _first;
7807 count = _count;
7808 primcount = _primcount;
7811 void* Set(void* cmd,
7812 GLenum _mode,
7813 GLint _first,
7814 GLsizei _count,
7815 GLsizei _primcount) {
7816 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
7817 return NextCmdAddress<ValueType>(cmd);
7820 gpu::CommandHeader header;
7821 uint32_t mode;
7822 int32_t first;
7823 int32_t count;
7824 int32_t primcount;
7827 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE) == 20,
7828 Sizeof_DrawArraysInstancedANGLE_is_not_20);
7829 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, header) == 0,
7830 OffsetOf_DrawArraysInstancedANGLE_header_not_0);
7831 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, mode) == 4,
7832 OffsetOf_DrawArraysInstancedANGLE_mode_not_4);
7833 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, first) == 8,
7834 OffsetOf_DrawArraysInstancedANGLE_first_not_8);
7835 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, count) == 12,
7836 OffsetOf_DrawArraysInstancedANGLE_count_not_12);
7837 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
7838 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16);
7840 struct DrawElementsInstancedANGLE {
7841 typedef DrawElementsInstancedANGLE ValueType;
7842 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
7843 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7844 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7846 static uint32_t ComputeSize() {
7847 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7850 void SetHeader() { header.SetCmd<ValueType>(); }
7852 void Init(GLenum _mode,
7853 GLsizei _count,
7854 GLenum _type,
7855 GLuint _index_offset,
7856 GLsizei _primcount) {
7857 SetHeader();
7858 mode = _mode;
7859 count = _count;
7860 type = _type;
7861 index_offset = _index_offset;
7862 primcount = _primcount;
7865 void* Set(void* cmd,
7866 GLenum _mode,
7867 GLsizei _count,
7868 GLenum _type,
7869 GLuint _index_offset,
7870 GLsizei _primcount) {
7871 static_cast<ValueType*>(cmd)
7872 ->Init(_mode, _count, _type, _index_offset, _primcount);
7873 return NextCmdAddress<ValueType>(cmd);
7876 gpu::CommandHeader header;
7877 uint32_t mode;
7878 int32_t count;
7879 uint32_t type;
7880 uint32_t index_offset;
7881 int32_t primcount;
7884 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE) == 24,
7885 Sizeof_DrawElementsInstancedANGLE_is_not_24);
7886 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, header) == 0,
7887 OffsetOf_DrawElementsInstancedANGLE_header_not_0);
7888 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, mode) == 4,
7889 OffsetOf_DrawElementsInstancedANGLE_mode_not_4);
7890 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, count) == 8,
7891 OffsetOf_DrawElementsInstancedANGLE_count_not_8);
7892 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, type) == 12,
7893 OffsetOf_DrawElementsInstancedANGLE_type_not_12);
7894 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
7895 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16);
7896 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
7897 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20);
7899 struct VertexAttribDivisorANGLE {
7900 typedef VertexAttribDivisorANGLE ValueType;
7901 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
7902 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7903 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7905 static uint32_t ComputeSize() {
7906 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7909 void SetHeader() { header.SetCmd<ValueType>(); }
7911 void Init(GLuint _index, GLuint _divisor) {
7912 SetHeader();
7913 index = _index;
7914 divisor = _divisor;
7917 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
7918 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
7919 return NextCmdAddress<ValueType>(cmd);
7922 gpu::CommandHeader header;
7923 uint32_t index;
7924 uint32_t divisor;
7927 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12,
7928 Sizeof_VertexAttribDivisorANGLE_is_not_12);
7929 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0,
7930 OffsetOf_VertexAttribDivisorANGLE_header_not_0);
7931 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4,
7932 OffsetOf_VertexAttribDivisorANGLE_index_not_4);
7933 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
7934 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8);
7936 struct ProduceTextureCHROMIUMImmediate {
7937 typedef ProduceTextureCHROMIUMImmediate ValueType;
7938 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
7939 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7940 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
7942 static uint32_t ComputeDataSize() {
7943 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
7946 static uint32_t ComputeSize() {
7947 return static_cast<uint32_t>(sizeof(ValueType) +
7948 ComputeDataSize()); // NOLINT
7951 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7953 void Init(GLenum _target, const GLbyte* _mailbox) {
7954 SetHeader();
7955 target = _target;
7956 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
7959 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
7960 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
7961 const uint32_t size = ComputeSize();
7962 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7965 gpu::CommandHeader header;
7966 uint32_t target;
7969 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
7970 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
7971 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
7972 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
7973 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
7974 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
7976 struct ProduceTextureDirectCHROMIUMImmediate {
7977 typedef ProduceTextureDirectCHROMIUMImmediate ValueType;
7978 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate;
7979 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7980 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
7982 static uint32_t ComputeDataSize() {
7983 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
7986 static uint32_t ComputeSize() {
7987 return static_cast<uint32_t>(sizeof(ValueType) +
7988 ComputeDataSize()); // NOLINT
7991 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7993 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) {
7994 SetHeader();
7995 texture = _texture;
7996 target = _target;
7997 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
8000 void* Set(void* cmd,
8001 GLuint _texture,
8002 GLenum _target,
8003 const GLbyte* _mailbox) {
8004 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox);
8005 const uint32_t size = ComputeSize();
8006 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8009 gpu::CommandHeader header;
8010 uint32_t texture;
8011 uint32_t target;
8014 COMPILE_ASSERT(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12,
8015 Sizeof_ProduceTextureDirectCHROMIUMImmediate_is_not_12);
8016 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0,
8017 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_header_not_0);
8018 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4,
8019 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_texture_not_4);
8020 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8,
8021 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_target_not_8);
8023 struct ConsumeTextureCHROMIUMImmediate {
8024 typedef ConsumeTextureCHROMIUMImmediate ValueType;
8025 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
8026 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8027 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
8029 static uint32_t ComputeDataSize() {
8030 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
8033 static uint32_t ComputeSize() {
8034 return static_cast<uint32_t>(sizeof(ValueType) +
8035 ComputeDataSize()); // NOLINT
8038 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
8040 void Init(GLenum _target, const GLbyte* _mailbox) {
8041 SetHeader();
8042 target = _target;
8043 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
8046 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
8047 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
8048 const uint32_t size = ComputeSize();
8049 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8052 gpu::CommandHeader header;
8053 uint32_t target;
8056 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
8057 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
8058 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
8059 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
8060 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
8061 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
8063 struct BindUniformLocationCHROMIUMBucket {
8064 typedef BindUniformLocationCHROMIUMBucket ValueType;
8065 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
8066 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8067 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8069 static uint32_t ComputeSize() {
8070 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8073 void SetHeader() { header.SetCmd<ValueType>(); }
8075 void Init(GLuint _program, GLint _location, uint32_t _name_bucket_id) {
8076 SetHeader();
8077 program = _program;
8078 location = _location;
8079 name_bucket_id = _name_bucket_id;
8082 void* Set(void* cmd,
8083 GLuint _program,
8084 GLint _location,
8085 uint32_t _name_bucket_id) {
8086 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
8087 return NextCmdAddress<ValueType>(cmd);
8090 gpu::CommandHeader header;
8091 uint32_t program;
8092 int32_t location;
8093 uint32_t name_bucket_id;
8096 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
8097 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16);
8098 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
8099 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0);
8100 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
8101 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4);
8102 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
8103 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8);
8104 COMPILE_ASSERT(
8105 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
8106 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12);
8108 struct GenValuebuffersCHROMIUMImmediate {
8109 typedef GenValuebuffersCHROMIUMImmediate ValueType;
8110 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate;
8111 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8112 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8114 static uint32_t ComputeDataSize(GLsizei n) {
8115 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
8118 static uint32_t ComputeSize(GLsizei n) {
8119 return static_cast<uint32_t>(sizeof(ValueType) +
8120 ComputeDataSize(n)); // NOLINT
8123 void SetHeader(GLsizei n) {
8124 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8127 void Init(GLsizei _n, GLuint* _buffers) {
8128 SetHeader(_n);
8129 n = _n;
8130 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
8133 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
8134 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
8135 const uint32_t size = ComputeSize(_n);
8136 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8139 gpu::CommandHeader header;
8140 int32_t n;
8143 COMPILE_ASSERT(sizeof(GenValuebuffersCHROMIUMImmediate) == 8,
8144 Sizeof_GenValuebuffersCHROMIUMImmediate_is_not_8);
8145 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0,
8146 OffsetOf_GenValuebuffersCHROMIUMImmediate_header_not_0);
8147 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4,
8148 OffsetOf_GenValuebuffersCHROMIUMImmediate_n_not_4);
8150 struct DeleteValuebuffersCHROMIUMImmediate {
8151 typedef DeleteValuebuffersCHROMIUMImmediate ValueType;
8152 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate;
8153 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8154 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8156 static uint32_t ComputeDataSize(GLsizei n) {
8157 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
8160 static uint32_t ComputeSize(GLsizei n) {
8161 return static_cast<uint32_t>(sizeof(ValueType) +
8162 ComputeDataSize(n)); // NOLINT
8165 void SetHeader(GLsizei n) {
8166 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
8169 void Init(GLsizei _n, const GLuint* _valuebuffers) {
8170 SetHeader(_n);
8171 n = _n;
8172 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n));
8175 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) {
8176 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers);
8177 const uint32_t size = ComputeSize(_n);
8178 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8181 gpu::CommandHeader header;
8182 int32_t n;
8185 COMPILE_ASSERT(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8,
8186 Sizeof_DeleteValuebuffersCHROMIUMImmediate_is_not_8);
8187 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0,
8188 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_header_not_0);
8189 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4,
8190 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_n_not_4);
8192 struct IsValuebufferCHROMIUM {
8193 typedef IsValuebufferCHROMIUM ValueType;
8194 static const CommandId kCmdId = kIsValuebufferCHROMIUM;
8195 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8196 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8198 typedef uint32_t Result;
8200 static uint32_t ComputeSize() {
8201 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8204 void SetHeader() { header.SetCmd<ValueType>(); }
8206 void Init(GLuint _valuebuffer,
8207 uint32_t _result_shm_id,
8208 uint32_t _result_shm_offset) {
8209 SetHeader();
8210 valuebuffer = _valuebuffer;
8211 result_shm_id = _result_shm_id;
8212 result_shm_offset = _result_shm_offset;
8215 void* Set(void* cmd,
8216 GLuint _valuebuffer,
8217 uint32_t _result_shm_id,
8218 uint32_t _result_shm_offset) {
8219 static_cast<ValueType*>(cmd)
8220 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset);
8221 return NextCmdAddress<ValueType>(cmd);
8224 gpu::CommandHeader header;
8225 uint32_t valuebuffer;
8226 uint32_t result_shm_id;
8227 uint32_t result_shm_offset;
8230 COMPILE_ASSERT(sizeof(IsValuebufferCHROMIUM) == 16,
8231 Sizeof_IsValuebufferCHROMIUM_is_not_16);
8232 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, header) == 0,
8233 OffsetOf_IsValuebufferCHROMIUM_header_not_0);
8234 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4,
8235 OffsetOf_IsValuebufferCHROMIUM_valuebuffer_not_4);
8236 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8,
8237 OffsetOf_IsValuebufferCHROMIUM_result_shm_id_not_8);
8238 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12,
8239 OffsetOf_IsValuebufferCHROMIUM_result_shm_offset_not_12);
8241 struct BindValuebufferCHROMIUM {
8242 typedef BindValuebufferCHROMIUM ValueType;
8243 static const CommandId kCmdId = kBindValuebufferCHROMIUM;
8244 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8245 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8247 static uint32_t ComputeSize() {
8248 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8251 void SetHeader() { header.SetCmd<ValueType>(); }
8253 void Init(GLenum _target, GLuint _valuebuffer) {
8254 SetHeader();
8255 target = _target;
8256 valuebuffer = _valuebuffer;
8259 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) {
8260 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer);
8261 return NextCmdAddress<ValueType>(cmd);
8264 gpu::CommandHeader header;
8265 uint32_t target;
8266 uint32_t valuebuffer;
8269 COMPILE_ASSERT(sizeof(BindValuebufferCHROMIUM) == 12,
8270 Sizeof_BindValuebufferCHROMIUM_is_not_12);
8271 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, header) == 0,
8272 OffsetOf_BindValuebufferCHROMIUM_header_not_0);
8273 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, target) == 4,
8274 OffsetOf_BindValuebufferCHROMIUM_target_not_4);
8275 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8,
8276 OffsetOf_BindValuebufferCHROMIUM_valuebuffer_not_8);
8278 struct SubscribeValueCHROMIUM {
8279 typedef SubscribeValueCHROMIUM ValueType;
8280 static const CommandId kCmdId = kSubscribeValueCHROMIUM;
8281 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8282 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8284 static uint32_t ComputeSize() {
8285 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8288 void SetHeader() { header.SetCmd<ValueType>(); }
8290 void Init(GLenum _target, GLenum _subscription) {
8291 SetHeader();
8292 target = _target;
8293 subscription = _subscription;
8296 void* Set(void* cmd, GLenum _target, GLenum _subscription) {
8297 static_cast<ValueType*>(cmd)->Init(_target, _subscription);
8298 return NextCmdAddress<ValueType>(cmd);
8301 gpu::CommandHeader header;
8302 uint32_t target;
8303 uint32_t subscription;
8306 COMPILE_ASSERT(sizeof(SubscribeValueCHROMIUM) == 12,
8307 Sizeof_SubscribeValueCHROMIUM_is_not_12);
8308 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, header) == 0,
8309 OffsetOf_SubscribeValueCHROMIUM_header_not_0);
8310 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, target) == 4,
8311 OffsetOf_SubscribeValueCHROMIUM_target_not_4);
8312 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, subscription) == 8,
8313 OffsetOf_SubscribeValueCHROMIUM_subscription_not_8);
8315 struct PopulateSubscribedValuesCHROMIUM {
8316 typedef PopulateSubscribedValuesCHROMIUM ValueType;
8317 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM;
8318 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8319 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8321 static uint32_t ComputeSize() {
8322 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8325 void SetHeader() { header.SetCmd<ValueType>(); }
8327 void Init(GLenum _target) {
8328 SetHeader();
8329 target = _target;
8332 void* Set(void* cmd, GLenum _target) {
8333 static_cast<ValueType*>(cmd)->Init(_target);
8334 return NextCmdAddress<ValueType>(cmd);
8337 gpu::CommandHeader header;
8338 uint32_t target;
8341 COMPILE_ASSERT(sizeof(PopulateSubscribedValuesCHROMIUM) == 8,
8342 Sizeof_PopulateSubscribedValuesCHROMIUM_is_not_8);
8343 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0,
8344 OffsetOf_PopulateSubscribedValuesCHROMIUM_header_not_0);
8345 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4,
8346 OffsetOf_PopulateSubscribedValuesCHROMIUM_target_not_4);
8348 struct UniformValuebufferCHROMIUM {
8349 typedef UniformValuebufferCHROMIUM ValueType;
8350 static const CommandId kCmdId = kUniformValuebufferCHROMIUM;
8351 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8352 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8354 static uint32_t ComputeSize() {
8355 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8358 void SetHeader() { header.SetCmd<ValueType>(); }
8360 void Init(GLint _location, GLenum _target, GLenum _subscription) {
8361 SetHeader();
8362 location = _location;
8363 target = _target;
8364 subscription = _subscription;
8367 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) {
8368 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription);
8369 return NextCmdAddress<ValueType>(cmd);
8372 gpu::CommandHeader header;
8373 int32_t location;
8374 uint32_t target;
8375 uint32_t subscription;
8378 COMPILE_ASSERT(sizeof(UniformValuebufferCHROMIUM) == 16,
8379 Sizeof_UniformValuebufferCHROMIUM_is_not_16);
8380 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, header) == 0,
8381 OffsetOf_UniformValuebufferCHROMIUM_header_not_0);
8382 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, location) == 4,
8383 OffsetOf_UniformValuebufferCHROMIUM_location_not_4);
8384 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, target) == 8,
8385 OffsetOf_UniformValuebufferCHROMIUM_target_not_8);
8386 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, subscription) == 12,
8387 OffsetOf_UniformValuebufferCHROMIUM_subscription_not_12);
8389 struct BindTexImage2DCHROMIUM {
8390 typedef BindTexImage2DCHROMIUM ValueType;
8391 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
8392 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8393 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8395 static uint32_t ComputeSize() {
8396 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8399 void SetHeader() { header.SetCmd<ValueType>(); }
8401 void Init(GLenum _target, GLint _imageId) {
8402 SetHeader();
8403 target = _target;
8404 imageId = _imageId;
8407 void* Set(void* cmd, GLenum _target, GLint _imageId) {
8408 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
8409 return NextCmdAddress<ValueType>(cmd);
8412 gpu::CommandHeader header;
8413 uint32_t target;
8414 int32_t imageId;
8417 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM) == 12,
8418 Sizeof_BindTexImage2DCHROMIUM_is_not_12);
8419 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, header) == 0,
8420 OffsetOf_BindTexImage2DCHROMIUM_header_not_0);
8421 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, target) == 4,
8422 OffsetOf_BindTexImage2DCHROMIUM_target_not_4);
8423 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
8424 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8);
8426 struct ReleaseTexImage2DCHROMIUM {
8427 typedef ReleaseTexImage2DCHROMIUM ValueType;
8428 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
8429 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8430 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8432 static uint32_t ComputeSize() {
8433 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8436 void SetHeader() { header.SetCmd<ValueType>(); }
8438 void Init(GLenum _target, GLint _imageId) {
8439 SetHeader();
8440 target = _target;
8441 imageId = _imageId;
8444 void* Set(void* cmd, GLenum _target, GLint _imageId) {
8445 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
8446 return NextCmdAddress<ValueType>(cmd);
8449 gpu::CommandHeader header;
8450 uint32_t target;
8451 int32_t imageId;
8454 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
8455 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12);
8456 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
8457 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0);
8458 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
8459 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4);
8460 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
8461 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8);
8463 struct TraceBeginCHROMIUM {
8464 typedef TraceBeginCHROMIUM ValueType;
8465 static const CommandId kCmdId = kTraceBeginCHROMIUM;
8466 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8467 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8469 static uint32_t ComputeSize() {
8470 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8473 void SetHeader() { header.SetCmd<ValueType>(); }
8475 void Init(GLuint _bucket_id) {
8476 SetHeader();
8477 bucket_id = _bucket_id;
8480 void* Set(void* cmd, GLuint _bucket_id) {
8481 static_cast<ValueType*>(cmd)->Init(_bucket_id);
8482 return NextCmdAddress<ValueType>(cmd);
8485 gpu::CommandHeader header;
8486 uint32_t bucket_id;
8489 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM) == 8,
8490 Sizeof_TraceBeginCHROMIUM_is_not_8);
8491 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, header) == 0,
8492 OffsetOf_TraceBeginCHROMIUM_header_not_0);
8493 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, bucket_id) == 4,
8494 OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4);
8496 struct TraceEndCHROMIUM {
8497 typedef TraceEndCHROMIUM ValueType;
8498 static const CommandId kCmdId = kTraceEndCHROMIUM;
8499 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8502 static uint32_t ComputeSize() {
8503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8506 void SetHeader() { header.SetCmd<ValueType>(); }
8508 void Init() { SetHeader(); }
8510 void* Set(void* cmd) {
8511 static_cast<ValueType*>(cmd)->Init();
8512 return NextCmdAddress<ValueType>(cmd);
8515 gpu::CommandHeader header;
8518 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4, Sizeof_TraceEndCHROMIUM_is_not_4);
8519 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0,
8520 OffsetOf_TraceEndCHROMIUM_header_not_0);
8522 struct AsyncTexSubImage2DCHROMIUM {
8523 typedef AsyncTexSubImage2DCHROMIUM ValueType;
8524 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
8525 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8526 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8528 static uint32_t ComputeSize() {
8529 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8532 void SetHeader() { header.SetCmd<ValueType>(); }
8534 void Init(GLenum _target,
8535 GLint _level,
8536 GLint _xoffset,
8537 GLint _yoffset,
8538 GLsizei _width,
8539 GLsizei _height,
8540 GLenum _format,
8541 GLenum _type,
8542 uint32_t _data_shm_id,
8543 uint32_t _data_shm_offset,
8544 uint32_t _async_upload_token,
8545 uint32_t _sync_data_shm_id,
8546 uint32_t _sync_data_shm_offset) {
8547 SetHeader();
8548 target = _target;
8549 level = _level;
8550 xoffset = _xoffset;
8551 yoffset = _yoffset;
8552 width = _width;
8553 height = _height;
8554 format = _format;
8555 type = _type;
8556 data_shm_id = _data_shm_id;
8557 data_shm_offset = _data_shm_offset;
8558 async_upload_token = _async_upload_token;
8559 sync_data_shm_id = _sync_data_shm_id;
8560 sync_data_shm_offset = _sync_data_shm_offset;
8563 void* Set(void* cmd,
8564 GLenum _target,
8565 GLint _level,
8566 GLint _xoffset,
8567 GLint _yoffset,
8568 GLsizei _width,
8569 GLsizei _height,
8570 GLenum _format,
8571 GLenum _type,
8572 uint32_t _data_shm_id,
8573 uint32_t _data_shm_offset,
8574 uint32_t _async_upload_token,
8575 uint32_t _sync_data_shm_id,
8576 uint32_t _sync_data_shm_offset) {
8577 static_cast<ValueType*>(cmd)
8578 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
8579 _type, _data_shm_id, _data_shm_offset, _async_upload_token,
8580 _sync_data_shm_id, _sync_data_shm_offset);
8581 return NextCmdAddress<ValueType>(cmd);
8584 gpu::CommandHeader header;
8585 uint32_t target;
8586 int32_t level;
8587 int32_t xoffset;
8588 int32_t yoffset;
8589 int32_t width;
8590 int32_t height;
8591 uint32_t format;
8592 uint32_t type;
8593 uint32_t data_shm_id;
8594 uint32_t data_shm_offset;
8595 uint32_t async_upload_token;
8596 uint32_t sync_data_shm_id;
8597 uint32_t sync_data_shm_offset;
8600 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM) == 56,
8601 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_56);
8602 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
8603 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0);
8604 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
8605 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4);
8606 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
8607 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8);
8608 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
8609 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12);
8610 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
8611 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16);
8612 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
8613 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20);
8614 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
8615 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24);
8616 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
8617 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28);
8618 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
8619 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32);
8620 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
8621 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36);
8622 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
8623 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40);
8624 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, async_upload_token) == 44,
8625 OffsetOf_AsyncTexSubImage2DCHROMIUM_async_upload_token_not_44);
8626 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_id) == 48,
8627 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_id_not_48);
8628 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_offset) == 52,
8629 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_offset_not_52);
8631 struct AsyncTexImage2DCHROMIUM {
8632 typedef AsyncTexImage2DCHROMIUM ValueType;
8633 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
8634 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8635 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8637 static uint32_t ComputeSize() {
8638 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8641 void SetHeader() { header.SetCmd<ValueType>(); }
8643 void Init(GLenum _target,
8644 GLint _level,
8645 GLint _internalformat,
8646 GLsizei _width,
8647 GLsizei _height,
8648 GLenum _format,
8649 GLenum _type,
8650 uint32_t _pixels_shm_id,
8651 uint32_t _pixels_shm_offset,
8652 uint32_t _async_upload_token,
8653 uint32_t _sync_data_shm_id,
8654 uint32_t _sync_data_shm_offset) {
8655 SetHeader();
8656 target = _target;
8657 level = _level;
8658 internalformat = _internalformat;
8659 width = _width;
8660 height = _height;
8661 format = _format;
8662 type = _type;
8663 pixels_shm_id = _pixels_shm_id;
8664 pixels_shm_offset = _pixels_shm_offset;
8665 async_upload_token = _async_upload_token;
8666 sync_data_shm_id = _sync_data_shm_id;
8667 sync_data_shm_offset = _sync_data_shm_offset;
8670 void* Set(void* cmd,
8671 GLenum _target,
8672 GLint _level,
8673 GLint _internalformat,
8674 GLsizei _width,
8675 GLsizei _height,
8676 GLenum _format,
8677 GLenum _type,
8678 uint32_t _pixels_shm_id,
8679 uint32_t _pixels_shm_offset,
8680 uint32_t _async_upload_token,
8681 uint32_t _sync_data_shm_id,
8682 uint32_t _sync_data_shm_offset) {
8683 static_cast<ValueType*>(cmd)
8684 ->Init(_target, _level, _internalformat, _width, _height, _format,
8685 _type, _pixels_shm_id, _pixels_shm_offset, _async_upload_token,
8686 _sync_data_shm_id, _sync_data_shm_offset);
8687 return NextCmdAddress<ValueType>(cmd);
8690 gpu::CommandHeader header;
8691 uint32_t target;
8692 int32_t level;
8693 int32_t internalformat;
8694 int32_t width;
8695 int32_t height;
8696 uint32_t format;
8697 uint32_t type;
8698 uint32_t pixels_shm_id;
8699 uint32_t pixels_shm_offset;
8700 uint32_t async_upload_token;
8701 uint32_t sync_data_shm_id;
8702 uint32_t sync_data_shm_offset;
8703 static const int32_t border = 0;
8706 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM) == 52,
8707 Sizeof_AsyncTexImage2DCHROMIUM_is_not_52);
8708 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
8709 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0);
8710 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
8711 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4);
8712 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
8713 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8);
8714 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
8715 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12);
8716 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
8717 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16);
8718 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
8719 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20);
8720 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, format) == 24,
8721 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_24);
8722 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, type) == 28,
8723 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_28);
8724 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 32,
8725 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_32);
8726 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 36,
8727 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_36);
8728 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, async_upload_token) == 40,
8729 OffsetOf_AsyncTexImage2DCHROMIUM_async_upload_token_not_40);
8730 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_id) == 44,
8731 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_id_not_44);
8732 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_offset) == 48,
8733 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_offset_not_48);
8735 struct WaitAsyncTexImage2DCHROMIUM {
8736 typedef WaitAsyncTexImage2DCHROMIUM ValueType;
8737 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
8738 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8739 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8741 static uint32_t ComputeSize() {
8742 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8745 void SetHeader() { header.SetCmd<ValueType>(); }
8747 void Init(GLenum _target) {
8748 SetHeader();
8749 target = _target;
8752 void* Set(void* cmd, GLenum _target) {
8753 static_cast<ValueType*>(cmd)->Init(_target);
8754 return NextCmdAddress<ValueType>(cmd);
8757 gpu::CommandHeader header;
8758 uint32_t target;
8761 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
8762 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8);
8763 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
8764 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0);
8765 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
8766 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4);
8768 struct WaitAllAsyncTexImage2DCHROMIUM {
8769 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType;
8770 static const CommandId kCmdId = kWaitAllAsyncTexImage2DCHROMIUM;
8771 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8772 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8774 static uint32_t ComputeSize() {
8775 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8778 void SetHeader() { header.SetCmd<ValueType>(); }
8780 void Init() { SetHeader(); }
8782 void* Set(void* cmd) {
8783 static_cast<ValueType*>(cmd)->Init();
8784 return NextCmdAddress<ValueType>(cmd);
8787 gpu::CommandHeader header;
8790 COMPILE_ASSERT(sizeof(WaitAllAsyncTexImage2DCHROMIUM) == 4,
8791 Sizeof_WaitAllAsyncTexImage2DCHROMIUM_is_not_4);
8792 COMPILE_ASSERT(offsetof(WaitAllAsyncTexImage2DCHROMIUM, header) == 0,
8793 OffsetOf_WaitAllAsyncTexImage2DCHROMIUM_header_not_0);
8795 struct DiscardFramebufferEXTImmediate {
8796 typedef DiscardFramebufferEXTImmediate ValueType;
8797 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
8798 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8801 static uint32_t ComputeDataSize(GLsizei count) {
8802 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
8805 static uint32_t ComputeSize(GLsizei count) {
8806 return static_cast<uint32_t>(sizeof(ValueType) +
8807 ComputeDataSize(count)); // NOLINT
8810 void SetHeader(GLsizei count) {
8811 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8814 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
8815 SetHeader(_count);
8816 target = _target;
8817 count = _count;
8818 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
8821 void* Set(void* cmd,
8822 GLenum _target,
8823 GLsizei _count,
8824 const GLenum* _attachments) {
8825 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
8826 const uint32_t size = ComputeSize(_count);
8827 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8830 gpu::CommandHeader header;
8831 uint32_t target;
8832 int32_t count;
8835 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate) == 12,
8836 Sizeof_DiscardFramebufferEXTImmediate_is_not_12);
8837 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
8838 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0);
8839 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
8840 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4);
8841 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
8842 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8);
8844 struct LoseContextCHROMIUM {
8845 typedef LoseContextCHROMIUM ValueType;
8846 static const CommandId kCmdId = kLoseContextCHROMIUM;
8847 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8850 static uint32_t ComputeSize() {
8851 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8854 void SetHeader() { header.SetCmd<ValueType>(); }
8856 void Init(GLenum _current, GLenum _other) {
8857 SetHeader();
8858 current = _current;
8859 other = _other;
8862 void* Set(void* cmd, GLenum _current, GLenum _other) {
8863 static_cast<ValueType*>(cmd)->Init(_current, _other);
8864 return NextCmdAddress<ValueType>(cmd);
8867 gpu::CommandHeader header;
8868 uint32_t current;
8869 uint32_t other;
8872 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM) == 12,
8873 Sizeof_LoseContextCHROMIUM_is_not_12);
8874 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, header) == 0,
8875 OffsetOf_LoseContextCHROMIUM_header_not_0);
8876 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, current) == 4,
8877 OffsetOf_LoseContextCHROMIUM_current_not_4);
8878 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, other) == 8,
8879 OffsetOf_LoseContextCHROMIUM_other_not_8);
8881 struct WaitSyncPointCHROMIUM {
8882 typedef WaitSyncPointCHROMIUM ValueType;
8883 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
8884 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8885 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
8887 static uint32_t ComputeSize() {
8888 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8891 void SetHeader() { header.SetCmd<ValueType>(); }
8893 void Init(GLuint _sync_point) {
8894 SetHeader();
8895 sync_point = _sync_point;
8898 void* Set(void* cmd, GLuint _sync_point) {
8899 static_cast<ValueType*>(cmd)->Init(_sync_point);
8900 return NextCmdAddress<ValueType>(cmd);
8903 gpu::CommandHeader header;
8904 uint32_t sync_point;
8907 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM) == 8,
8908 Sizeof_WaitSyncPointCHROMIUM_is_not_8);
8909 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0,
8910 OffsetOf_WaitSyncPointCHROMIUM_header_not_0);
8911 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
8912 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4);
8914 struct DrawBuffersEXTImmediate {
8915 typedef DrawBuffersEXTImmediate ValueType;
8916 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
8917 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8918 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8920 static uint32_t ComputeDataSize(GLsizei count) {
8921 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
8924 static uint32_t ComputeSize(GLsizei count) {
8925 return static_cast<uint32_t>(sizeof(ValueType) +
8926 ComputeDataSize(count)); // NOLINT
8929 void SetHeader(GLsizei count) {
8930 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8933 void Init(GLsizei _count, const GLenum* _bufs) {
8934 SetHeader(_count);
8935 count = _count;
8936 memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count));
8939 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
8940 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
8941 const uint32_t size = ComputeSize(_count);
8942 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8945 gpu::CommandHeader header;
8946 int32_t count;
8949 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8,
8950 Sizeof_DrawBuffersEXTImmediate_is_not_8);
8951 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0,
8952 OffsetOf_DrawBuffersEXTImmediate_header_not_0);
8953 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4,
8954 OffsetOf_DrawBuffersEXTImmediate_count_not_4);
8956 struct DiscardBackbufferCHROMIUM {
8957 typedef DiscardBackbufferCHROMIUM ValueType;
8958 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
8959 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8960 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8962 static uint32_t ComputeSize() {
8963 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8966 void SetHeader() { header.SetCmd<ValueType>(); }
8968 void Init() { SetHeader(); }
8970 void* Set(void* cmd) {
8971 static_cast<ValueType*>(cmd)->Init();
8972 return NextCmdAddress<ValueType>(cmd);
8975 gpu::CommandHeader header;
8978 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4,
8979 Sizeof_DiscardBackbufferCHROMIUM_is_not_4);
8980 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
8981 OffsetOf_DiscardBackbufferCHROMIUM_header_not_0);
8983 struct ScheduleOverlayPlaneCHROMIUM {
8984 typedef ScheduleOverlayPlaneCHROMIUM ValueType;
8985 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM;
8986 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8987 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8989 static uint32_t ComputeSize() {
8990 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8993 void SetHeader() { header.SetCmd<ValueType>(); }
8995 void Init(GLint _plane_z_order,
8996 GLenum _plane_transform,
8997 GLuint _overlay_texture_id,
8998 GLint _bounds_x,
8999 GLint _bounds_y,
9000 GLint _bounds_width,
9001 GLint _bounds_height,
9002 GLfloat _uv_x,
9003 GLfloat _uv_y,
9004 GLfloat _uv_width,
9005 GLfloat _uv_height) {
9006 SetHeader();
9007 plane_z_order = _plane_z_order;
9008 plane_transform = _plane_transform;
9009 overlay_texture_id = _overlay_texture_id;
9010 bounds_x = _bounds_x;
9011 bounds_y = _bounds_y;
9012 bounds_width = _bounds_width;
9013 bounds_height = _bounds_height;
9014 uv_x = _uv_x;
9015 uv_y = _uv_y;
9016 uv_width = _uv_width;
9017 uv_height = _uv_height;
9020 void* Set(void* cmd,
9021 GLint _plane_z_order,
9022 GLenum _plane_transform,
9023 GLuint _overlay_texture_id,
9024 GLint _bounds_x,
9025 GLint _bounds_y,
9026 GLint _bounds_width,
9027 GLint _bounds_height,
9028 GLfloat _uv_x,
9029 GLfloat _uv_y,
9030 GLfloat _uv_width,
9031 GLfloat _uv_height) {
9032 static_cast<ValueType*>(cmd)->Init(_plane_z_order, _plane_transform,
9033 _overlay_texture_id, _bounds_x,
9034 _bounds_y, _bounds_width, _bounds_height,
9035 _uv_x, _uv_y, _uv_width, _uv_height);
9036 return NextCmdAddress<ValueType>(cmd);
9039 gpu::CommandHeader header;
9040 int32_t plane_z_order;
9041 uint32_t plane_transform;
9042 uint32_t overlay_texture_id;
9043 int32_t bounds_x;
9044 int32_t bounds_y;
9045 int32_t bounds_width;
9046 int32_t bounds_height;
9047 float uv_x;
9048 float uv_y;
9049 float uv_width;
9050 float uv_height;
9053 COMPILE_ASSERT(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48,
9054 Sizeof_ScheduleOverlayPlaneCHROMIUM_is_not_48);
9055 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0,
9056 OffsetOf_ScheduleOverlayPlaneCHROMIUM_header_not_0);
9057 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4,
9058 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_z_order_not_4);
9059 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8,
9060 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_transform_not_8);
9061 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12,
9062 OffsetOf_ScheduleOverlayPlaneCHROMIUM_overlay_texture_id_not_12);
9063 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16,
9064 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_x_not_16);
9065 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20,
9066 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_y_not_20);
9067 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24,
9068 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_width_not_24);
9069 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28,
9070 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28);
9071 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32,
9072 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32);
9073 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36,
9074 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36);
9075 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
9076 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40);
9077 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
9078 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44);
9080 struct MatrixLoadfCHROMIUMImmediate {
9081 typedef MatrixLoadfCHROMIUMImmediate ValueType;
9082 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
9083 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9084 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9086 static uint32_t ComputeDataSize() {
9087 return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT
9090 static uint32_t ComputeSize() {
9091 return static_cast<uint32_t>(sizeof(ValueType) +
9092 ComputeDataSize()); // NOLINT
9095 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9097 void Init(GLenum _matrixMode, const GLfloat* _m) {
9098 SetHeader();
9099 matrixMode = _matrixMode;
9100 memcpy(ImmediateDataAddress(this), _m, ComputeDataSize());
9103 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) {
9104 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m);
9105 const uint32_t size = ComputeSize();
9106 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9109 gpu::CommandHeader header;
9110 uint32_t matrixMode;
9113 COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate) == 8,
9114 Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8);
9115 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0,
9116 OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0);
9117 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4,
9118 OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4);
9120 struct MatrixLoadIdentityCHROMIUM {
9121 typedef MatrixLoadIdentityCHROMIUM ValueType;
9122 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM;
9123 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9124 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9126 static uint32_t ComputeSize() {
9127 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9130 void SetHeader() { header.SetCmd<ValueType>(); }
9132 void Init(GLenum _matrixMode) {
9133 SetHeader();
9134 matrixMode = _matrixMode;
9137 void* Set(void* cmd, GLenum _matrixMode) {
9138 static_cast<ValueType*>(cmd)->Init(_matrixMode);
9139 return NextCmdAddress<ValueType>(cmd);
9142 gpu::CommandHeader header;
9143 uint32_t matrixMode;
9146 COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM) == 8,
9147 Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8);
9148 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0,
9149 OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0);
9150 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4,
9151 OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_4);
9153 struct BlendBarrierKHR {
9154 typedef BlendBarrierKHR ValueType;
9155 static const CommandId kCmdId = kBlendBarrierKHR;
9156 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9157 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9159 static uint32_t ComputeSize() {
9160 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9163 void SetHeader() { header.SetCmd<ValueType>(); }
9165 void Init() { SetHeader(); }
9167 void* Set(void* cmd) {
9168 static_cast<ValueType*>(cmd)->Init();
9169 return NextCmdAddress<ValueType>(cmd);
9172 gpu::CommandHeader header;
9175 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4);
9176 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0,
9177 OffsetOf_BlendBarrierKHR_header_not_0);
9179 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_