Fix crash in SpeechRecognizerImpl introduced in AudioParams refactor.
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
blob69a0d5e3d377177d93a445abcf0c9249b64d44ac
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 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
15 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
17 struct ActiveTexture {
18 typedef ActiveTexture ValueType;
19 static const CommandId kCmdId = kActiveTexture;
20 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
21 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
23 static uint32_t ComputeSize() {
24 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
27 void SetHeader() { header.SetCmd<ValueType>(); }
29 void Init(GLenum _texture) {
30 SetHeader();
31 texture = _texture;
34 void* Set(void* cmd, GLenum _texture) {
35 static_cast<ValueType*>(cmd)->Init(_texture);
36 return NextCmdAddress<ValueType>(cmd);
39 gpu::CommandHeader header;
40 uint32_t texture;
43 static_assert(sizeof(ActiveTexture) == 8, "size of ActiveTexture should be 8");
44 static_assert(offsetof(ActiveTexture, header) == 0,
45 "offset of ActiveTexture header should be 0");
46 static_assert(offsetof(ActiveTexture, texture) == 4,
47 "offset of ActiveTexture texture should be 4");
49 struct AttachShader {
50 typedef AttachShader ValueType;
51 static const CommandId kCmdId = kAttachShader;
52 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
53 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
55 static uint32_t ComputeSize() {
56 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
59 void SetHeader() { header.SetCmd<ValueType>(); }
61 void Init(GLuint _program, GLuint _shader) {
62 SetHeader();
63 program = _program;
64 shader = _shader;
67 void* Set(void* cmd, GLuint _program, GLuint _shader) {
68 static_cast<ValueType*>(cmd)->Init(_program, _shader);
69 return NextCmdAddress<ValueType>(cmd);
72 gpu::CommandHeader header;
73 uint32_t program;
74 uint32_t shader;
77 static_assert(sizeof(AttachShader) == 12, "size of AttachShader should be 12");
78 static_assert(offsetof(AttachShader, header) == 0,
79 "offset of AttachShader header should be 0");
80 static_assert(offsetof(AttachShader, program) == 4,
81 "offset of AttachShader program should be 4");
82 static_assert(offsetof(AttachShader, shader) == 8,
83 "offset of AttachShader shader should be 8");
85 struct BindAttribLocationBucket {
86 typedef BindAttribLocationBucket ValueType;
87 static const CommandId kCmdId = kBindAttribLocationBucket;
88 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
89 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
91 static uint32_t ComputeSize() {
92 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
95 void SetHeader() { header.SetCmd<ValueType>(); }
97 void Init(GLuint _program, GLuint _index, uint32_t _name_bucket_id) {
98 SetHeader();
99 program = _program;
100 index = _index;
101 name_bucket_id = _name_bucket_id;
104 void* Set(void* cmd,
105 GLuint _program,
106 GLuint _index,
107 uint32_t _name_bucket_id) {
108 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
109 return NextCmdAddress<ValueType>(cmd);
112 gpu::CommandHeader header;
113 uint32_t program;
114 uint32_t index;
115 uint32_t name_bucket_id;
118 static_assert(sizeof(BindAttribLocationBucket) == 16,
119 "size of BindAttribLocationBucket should be 16");
120 static_assert(offsetof(BindAttribLocationBucket, header) == 0,
121 "offset of BindAttribLocationBucket header should be 0");
122 static_assert(offsetof(BindAttribLocationBucket, program) == 4,
123 "offset of BindAttribLocationBucket program should be 4");
124 static_assert(offsetof(BindAttribLocationBucket, index) == 8,
125 "offset of BindAttribLocationBucket index should be 8");
126 static_assert(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
127 "offset of BindAttribLocationBucket name_bucket_id should be 12");
129 struct BindBuffer {
130 typedef BindBuffer ValueType;
131 static const CommandId kCmdId = kBindBuffer;
132 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
133 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
135 static uint32_t ComputeSize() {
136 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
139 void SetHeader() { header.SetCmd<ValueType>(); }
141 void Init(GLenum _target, GLuint _buffer) {
142 SetHeader();
143 target = _target;
144 buffer = _buffer;
147 void* Set(void* cmd, GLenum _target, GLuint _buffer) {
148 static_cast<ValueType*>(cmd)->Init(_target, _buffer);
149 return NextCmdAddress<ValueType>(cmd);
152 gpu::CommandHeader header;
153 uint32_t target;
154 uint32_t buffer;
157 static_assert(sizeof(BindBuffer) == 12, "size of BindBuffer should be 12");
158 static_assert(offsetof(BindBuffer, header) == 0,
159 "offset of BindBuffer header should be 0");
160 static_assert(offsetof(BindBuffer, target) == 4,
161 "offset of BindBuffer target should be 4");
162 static_assert(offsetof(BindBuffer, buffer) == 8,
163 "offset of BindBuffer buffer should be 8");
165 struct BindBufferBase {
166 typedef BindBufferBase ValueType;
167 static const CommandId kCmdId = kBindBufferBase;
168 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
169 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
171 static uint32_t ComputeSize() {
172 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
175 void SetHeader() { header.SetCmd<ValueType>(); }
177 void Init(GLenum _target, GLuint _index, GLuint _buffer) {
178 SetHeader();
179 target = _target;
180 index = _index;
181 buffer = _buffer;
184 void* Set(void* cmd, GLenum _target, GLuint _index, GLuint _buffer) {
185 static_cast<ValueType*>(cmd)->Init(_target, _index, _buffer);
186 return NextCmdAddress<ValueType>(cmd);
189 gpu::CommandHeader header;
190 uint32_t target;
191 uint32_t index;
192 uint32_t buffer;
195 static_assert(sizeof(BindBufferBase) == 16,
196 "size of BindBufferBase should be 16");
197 static_assert(offsetof(BindBufferBase, header) == 0,
198 "offset of BindBufferBase header should be 0");
199 static_assert(offsetof(BindBufferBase, target) == 4,
200 "offset of BindBufferBase target should be 4");
201 static_assert(offsetof(BindBufferBase, index) == 8,
202 "offset of BindBufferBase index should be 8");
203 static_assert(offsetof(BindBufferBase, buffer) == 12,
204 "offset of BindBufferBase buffer should be 12");
206 struct BindBufferRange {
207 typedef BindBufferRange ValueType;
208 static const CommandId kCmdId = kBindBufferRange;
209 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
210 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
212 static uint32_t ComputeSize() {
213 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
216 void SetHeader() { header.SetCmd<ValueType>(); }
218 void Init(GLenum _target,
219 GLuint _index,
220 GLuint _buffer,
221 GLintptr _offset,
222 GLsizeiptr _size) {
223 SetHeader();
224 target = _target;
225 index = _index;
226 buffer = _buffer;
227 offset = _offset;
228 size = _size;
231 void* Set(void* cmd,
232 GLenum _target,
233 GLuint _index,
234 GLuint _buffer,
235 GLintptr _offset,
236 GLsizeiptr _size) {
237 static_cast<ValueType*>(cmd)
238 ->Init(_target, _index, _buffer, _offset, _size);
239 return NextCmdAddress<ValueType>(cmd);
242 gpu::CommandHeader header;
243 uint32_t target;
244 uint32_t index;
245 uint32_t buffer;
246 int32_t offset;
247 int32_t size;
250 static_assert(sizeof(BindBufferRange) == 24,
251 "size of BindBufferRange should be 24");
252 static_assert(offsetof(BindBufferRange, header) == 0,
253 "offset of BindBufferRange header should be 0");
254 static_assert(offsetof(BindBufferRange, target) == 4,
255 "offset of BindBufferRange target should be 4");
256 static_assert(offsetof(BindBufferRange, index) == 8,
257 "offset of BindBufferRange index should be 8");
258 static_assert(offsetof(BindBufferRange, buffer) == 12,
259 "offset of BindBufferRange buffer should be 12");
260 static_assert(offsetof(BindBufferRange, offset) == 16,
261 "offset of BindBufferRange offset should be 16");
262 static_assert(offsetof(BindBufferRange, size) == 20,
263 "offset of BindBufferRange size should be 20");
265 struct BindFramebuffer {
266 typedef BindFramebuffer ValueType;
267 static const CommandId kCmdId = kBindFramebuffer;
268 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
269 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
271 static uint32_t ComputeSize() {
272 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
275 void SetHeader() { header.SetCmd<ValueType>(); }
277 void Init(GLenum _target, GLuint _framebuffer) {
278 SetHeader();
279 target = _target;
280 framebuffer = _framebuffer;
283 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
284 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
285 return NextCmdAddress<ValueType>(cmd);
288 gpu::CommandHeader header;
289 uint32_t target;
290 uint32_t framebuffer;
293 static_assert(sizeof(BindFramebuffer) == 12,
294 "size of BindFramebuffer should be 12");
295 static_assert(offsetof(BindFramebuffer, header) == 0,
296 "offset of BindFramebuffer header should be 0");
297 static_assert(offsetof(BindFramebuffer, target) == 4,
298 "offset of BindFramebuffer target should be 4");
299 static_assert(offsetof(BindFramebuffer, framebuffer) == 8,
300 "offset of BindFramebuffer framebuffer should be 8");
302 struct BindRenderbuffer {
303 typedef BindRenderbuffer ValueType;
304 static const CommandId kCmdId = kBindRenderbuffer;
305 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
306 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
308 static uint32_t ComputeSize() {
309 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
312 void SetHeader() { header.SetCmd<ValueType>(); }
314 void Init(GLenum _target, GLuint _renderbuffer) {
315 SetHeader();
316 target = _target;
317 renderbuffer = _renderbuffer;
320 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
321 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
322 return NextCmdAddress<ValueType>(cmd);
325 gpu::CommandHeader header;
326 uint32_t target;
327 uint32_t renderbuffer;
330 static_assert(sizeof(BindRenderbuffer) == 12,
331 "size of BindRenderbuffer should be 12");
332 static_assert(offsetof(BindRenderbuffer, header) == 0,
333 "offset of BindRenderbuffer header should be 0");
334 static_assert(offsetof(BindRenderbuffer, target) == 4,
335 "offset of BindRenderbuffer target should be 4");
336 static_assert(offsetof(BindRenderbuffer, renderbuffer) == 8,
337 "offset of BindRenderbuffer renderbuffer should be 8");
339 struct BindSampler {
340 typedef BindSampler ValueType;
341 static const CommandId kCmdId = kBindSampler;
342 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
343 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
345 static uint32_t ComputeSize() {
346 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
349 void SetHeader() { header.SetCmd<ValueType>(); }
351 void Init(GLuint _unit, GLuint _sampler) {
352 SetHeader();
353 unit = _unit;
354 sampler = _sampler;
357 void* Set(void* cmd, GLuint _unit, GLuint _sampler) {
358 static_cast<ValueType*>(cmd)->Init(_unit, _sampler);
359 return NextCmdAddress<ValueType>(cmd);
362 gpu::CommandHeader header;
363 uint32_t unit;
364 uint32_t sampler;
367 static_assert(sizeof(BindSampler) == 12, "size of BindSampler should be 12");
368 static_assert(offsetof(BindSampler, header) == 0,
369 "offset of BindSampler header should be 0");
370 static_assert(offsetof(BindSampler, unit) == 4,
371 "offset of BindSampler unit should be 4");
372 static_assert(offsetof(BindSampler, sampler) == 8,
373 "offset of BindSampler sampler should be 8");
375 struct BindTexture {
376 typedef BindTexture ValueType;
377 static const CommandId kCmdId = kBindTexture;
378 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
379 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
381 static uint32_t ComputeSize() {
382 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
385 void SetHeader() { header.SetCmd<ValueType>(); }
387 void Init(GLenum _target, GLuint _texture) {
388 SetHeader();
389 target = _target;
390 texture = _texture;
393 void* Set(void* cmd, GLenum _target, GLuint _texture) {
394 static_cast<ValueType*>(cmd)->Init(_target, _texture);
395 return NextCmdAddress<ValueType>(cmd);
398 gpu::CommandHeader header;
399 uint32_t target;
400 uint32_t texture;
403 static_assert(sizeof(BindTexture) == 12, "size of BindTexture should be 12");
404 static_assert(offsetof(BindTexture, header) == 0,
405 "offset of BindTexture header should be 0");
406 static_assert(offsetof(BindTexture, target) == 4,
407 "offset of BindTexture target should be 4");
408 static_assert(offsetof(BindTexture, texture) == 8,
409 "offset of BindTexture texture should be 8");
411 struct BindTransformFeedback {
412 typedef BindTransformFeedback ValueType;
413 static const CommandId kCmdId = kBindTransformFeedback;
414 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
415 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
417 static uint32_t ComputeSize() {
418 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
421 void SetHeader() { header.SetCmd<ValueType>(); }
423 void Init(GLenum _target, GLuint _transformfeedback) {
424 SetHeader();
425 target = _target;
426 transformfeedback = _transformfeedback;
429 void* Set(void* cmd, GLenum _target, GLuint _transformfeedback) {
430 static_cast<ValueType*>(cmd)->Init(_target, _transformfeedback);
431 return NextCmdAddress<ValueType>(cmd);
434 gpu::CommandHeader header;
435 uint32_t target;
436 uint32_t transformfeedback;
439 static_assert(sizeof(BindTransformFeedback) == 12,
440 "size of BindTransformFeedback should be 12");
441 static_assert(offsetof(BindTransformFeedback, header) == 0,
442 "offset of BindTransformFeedback header should be 0");
443 static_assert(offsetof(BindTransformFeedback, target) == 4,
444 "offset of BindTransformFeedback target should be 4");
445 static_assert(offsetof(BindTransformFeedback, transformfeedback) == 8,
446 "offset of BindTransformFeedback transformfeedback should be 8");
448 struct BlendColor {
449 typedef BlendColor ValueType;
450 static const CommandId kCmdId = kBlendColor;
451 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
452 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
454 static uint32_t ComputeSize() {
455 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
458 void SetHeader() { header.SetCmd<ValueType>(); }
460 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
461 SetHeader();
462 red = _red;
463 green = _green;
464 blue = _blue;
465 alpha = _alpha;
468 void* Set(void* cmd,
469 GLclampf _red,
470 GLclampf _green,
471 GLclampf _blue,
472 GLclampf _alpha) {
473 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
474 return NextCmdAddress<ValueType>(cmd);
477 gpu::CommandHeader header;
478 float red;
479 float green;
480 float blue;
481 float alpha;
484 static_assert(sizeof(BlendColor) == 20, "size of BlendColor should be 20");
485 static_assert(offsetof(BlendColor, header) == 0,
486 "offset of BlendColor header should be 0");
487 static_assert(offsetof(BlendColor, red) == 4,
488 "offset of BlendColor red should be 4");
489 static_assert(offsetof(BlendColor, green) == 8,
490 "offset of BlendColor green should be 8");
491 static_assert(offsetof(BlendColor, blue) == 12,
492 "offset of BlendColor blue should be 12");
493 static_assert(offsetof(BlendColor, alpha) == 16,
494 "offset of BlendColor alpha should be 16");
496 struct BlendEquation {
497 typedef BlendEquation ValueType;
498 static const CommandId kCmdId = kBlendEquation;
499 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
502 static uint32_t ComputeSize() {
503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
506 void SetHeader() { header.SetCmd<ValueType>(); }
508 void Init(GLenum _mode) {
509 SetHeader();
510 mode = _mode;
513 void* Set(void* cmd, GLenum _mode) {
514 static_cast<ValueType*>(cmd)->Init(_mode);
515 return NextCmdAddress<ValueType>(cmd);
518 gpu::CommandHeader header;
519 uint32_t mode;
522 static_assert(sizeof(BlendEquation) == 8, "size of BlendEquation should be 8");
523 static_assert(offsetof(BlendEquation, header) == 0,
524 "offset of BlendEquation header should be 0");
525 static_assert(offsetof(BlendEquation, mode) == 4,
526 "offset of BlendEquation mode should be 4");
528 struct BlendEquationSeparate {
529 typedef BlendEquationSeparate ValueType;
530 static const CommandId kCmdId = kBlendEquationSeparate;
531 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
534 static uint32_t ComputeSize() {
535 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
538 void SetHeader() { header.SetCmd<ValueType>(); }
540 void Init(GLenum _modeRGB, GLenum _modeAlpha) {
541 SetHeader();
542 modeRGB = _modeRGB;
543 modeAlpha = _modeAlpha;
546 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
547 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
548 return NextCmdAddress<ValueType>(cmd);
551 gpu::CommandHeader header;
552 uint32_t modeRGB;
553 uint32_t modeAlpha;
556 static_assert(sizeof(BlendEquationSeparate) == 12,
557 "size of BlendEquationSeparate should be 12");
558 static_assert(offsetof(BlendEquationSeparate, header) == 0,
559 "offset of BlendEquationSeparate header should be 0");
560 static_assert(offsetof(BlendEquationSeparate, modeRGB) == 4,
561 "offset of BlendEquationSeparate modeRGB should be 4");
562 static_assert(offsetof(BlendEquationSeparate, modeAlpha) == 8,
563 "offset of BlendEquationSeparate modeAlpha should be 8");
565 struct BlendFunc {
566 typedef BlendFunc ValueType;
567 static const CommandId kCmdId = kBlendFunc;
568 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
569 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
571 static uint32_t ComputeSize() {
572 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
575 void SetHeader() { header.SetCmd<ValueType>(); }
577 void Init(GLenum _sfactor, GLenum _dfactor) {
578 SetHeader();
579 sfactor = _sfactor;
580 dfactor = _dfactor;
583 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
584 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
585 return NextCmdAddress<ValueType>(cmd);
588 gpu::CommandHeader header;
589 uint32_t sfactor;
590 uint32_t dfactor;
593 static_assert(sizeof(BlendFunc) == 12, "size of BlendFunc should be 12");
594 static_assert(offsetof(BlendFunc, header) == 0,
595 "offset of BlendFunc header should be 0");
596 static_assert(offsetof(BlendFunc, sfactor) == 4,
597 "offset of BlendFunc sfactor should be 4");
598 static_assert(offsetof(BlendFunc, dfactor) == 8,
599 "offset of BlendFunc dfactor should be 8");
601 struct BlendFuncSeparate {
602 typedef BlendFuncSeparate ValueType;
603 static const CommandId kCmdId = kBlendFuncSeparate;
604 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
605 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
607 static uint32_t ComputeSize() {
608 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
611 void SetHeader() { header.SetCmd<ValueType>(); }
613 void Init(GLenum _srcRGB,
614 GLenum _dstRGB,
615 GLenum _srcAlpha,
616 GLenum _dstAlpha) {
617 SetHeader();
618 srcRGB = _srcRGB;
619 dstRGB = _dstRGB;
620 srcAlpha = _srcAlpha;
621 dstAlpha = _dstAlpha;
624 void* Set(void* cmd,
625 GLenum _srcRGB,
626 GLenum _dstRGB,
627 GLenum _srcAlpha,
628 GLenum _dstAlpha) {
629 static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
630 return NextCmdAddress<ValueType>(cmd);
633 gpu::CommandHeader header;
634 uint32_t srcRGB;
635 uint32_t dstRGB;
636 uint32_t srcAlpha;
637 uint32_t dstAlpha;
640 static_assert(sizeof(BlendFuncSeparate) == 20,
641 "size of BlendFuncSeparate should be 20");
642 static_assert(offsetof(BlendFuncSeparate, header) == 0,
643 "offset of BlendFuncSeparate header should be 0");
644 static_assert(offsetof(BlendFuncSeparate, srcRGB) == 4,
645 "offset of BlendFuncSeparate srcRGB should be 4");
646 static_assert(offsetof(BlendFuncSeparate, dstRGB) == 8,
647 "offset of BlendFuncSeparate dstRGB should be 8");
648 static_assert(offsetof(BlendFuncSeparate, srcAlpha) == 12,
649 "offset of BlendFuncSeparate srcAlpha should be 12");
650 static_assert(offsetof(BlendFuncSeparate, dstAlpha) == 16,
651 "offset of BlendFuncSeparate dstAlpha should be 16");
653 struct BufferData {
654 typedef BufferData ValueType;
655 static const CommandId kCmdId = kBufferData;
656 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
657 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
659 static uint32_t ComputeSize() {
660 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
663 void SetHeader() { header.SetCmd<ValueType>(); }
665 void Init(GLenum _target,
666 GLsizeiptr _size,
667 uint32_t _data_shm_id,
668 uint32_t _data_shm_offset,
669 GLenum _usage) {
670 SetHeader();
671 target = _target;
672 size = _size;
673 data_shm_id = _data_shm_id;
674 data_shm_offset = _data_shm_offset;
675 usage = _usage;
678 void* Set(void* cmd,
679 GLenum _target,
680 GLsizeiptr _size,
681 uint32_t _data_shm_id,
682 uint32_t _data_shm_offset,
683 GLenum _usage) {
684 static_cast<ValueType*>(cmd)
685 ->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage);
686 return NextCmdAddress<ValueType>(cmd);
689 gpu::CommandHeader header;
690 uint32_t target;
691 int32_t size;
692 uint32_t data_shm_id;
693 uint32_t data_shm_offset;
694 uint32_t usage;
697 static_assert(sizeof(BufferData) == 24, "size of BufferData should be 24");
698 static_assert(offsetof(BufferData, header) == 0,
699 "offset of BufferData header should be 0");
700 static_assert(offsetof(BufferData, target) == 4,
701 "offset of BufferData target should be 4");
702 static_assert(offsetof(BufferData, size) == 8,
703 "offset of BufferData size should be 8");
704 static_assert(offsetof(BufferData, data_shm_id) == 12,
705 "offset of BufferData data_shm_id should be 12");
706 static_assert(offsetof(BufferData, data_shm_offset) == 16,
707 "offset of BufferData data_shm_offset should be 16");
708 static_assert(offsetof(BufferData, usage) == 20,
709 "offset of BufferData usage should be 20");
711 struct BufferSubData {
712 typedef BufferSubData ValueType;
713 static const CommandId kCmdId = kBufferSubData;
714 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
715 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
717 static uint32_t ComputeSize() {
718 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
721 void SetHeader() { header.SetCmd<ValueType>(); }
723 void Init(GLenum _target,
724 GLintptr _offset,
725 GLsizeiptr _size,
726 uint32_t _data_shm_id,
727 uint32_t _data_shm_offset) {
728 SetHeader();
729 target = _target;
730 offset = _offset;
731 size = _size;
732 data_shm_id = _data_shm_id;
733 data_shm_offset = _data_shm_offset;
736 void* Set(void* cmd,
737 GLenum _target,
738 GLintptr _offset,
739 GLsizeiptr _size,
740 uint32_t _data_shm_id,
741 uint32_t _data_shm_offset) {
742 static_cast<ValueType*>(cmd)
743 ->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset);
744 return NextCmdAddress<ValueType>(cmd);
747 gpu::CommandHeader header;
748 uint32_t target;
749 int32_t offset;
750 int32_t size;
751 uint32_t data_shm_id;
752 uint32_t data_shm_offset;
755 static_assert(sizeof(BufferSubData) == 24,
756 "size of BufferSubData should be 24");
757 static_assert(offsetof(BufferSubData, header) == 0,
758 "offset of BufferSubData header should be 0");
759 static_assert(offsetof(BufferSubData, target) == 4,
760 "offset of BufferSubData target should be 4");
761 static_assert(offsetof(BufferSubData, offset) == 8,
762 "offset of BufferSubData offset should be 8");
763 static_assert(offsetof(BufferSubData, size) == 12,
764 "offset of BufferSubData size should be 12");
765 static_assert(offsetof(BufferSubData, data_shm_id) == 16,
766 "offset of BufferSubData data_shm_id should be 16");
767 static_assert(offsetof(BufferSubData, data_shm_offset) == 20,
768 "offset of BufferSubData data_shm_offset should be 20");
770 struct CheckFramebufferStatus {
771 typedef CheckFramebufferStatus ValueType;
772 static const CommandId kCmdId = kCheckFramebufferStatus;
773 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
776 typedef GLenum Result;
778 static uint32_t ComputeSize() {
779 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
782 void SetHeader() { header.SetCmd<ValueType>(); }
784 void Init(GLenum _target,
785 uint32_t _result_shm_id,
786 uint32_t _result_shm_offset) {
787 SetHeader();
788 target = _target;
789 result_shm_id = _result_shm_id;
790 result_shm_offset = _result_shm_offset;
793 void* Set(void* cmd,
794 GLenum _target,
795 uint32_t _result_shm_id,
796 uint32_t _result_shm_offset) {
797 static_cast<ValueType*>(cmd)
798 ->Init(_target, _result_shm_id, _result_shm_offset);
799 return NextCmdAddress<ValueType>(cmd);
802 gpu::CommandHeader header;
803 uint32_t target;
804 uint32_t result_shm_id;
805 uint32_t result_shm_offset;
808 static_assert(sizeof(CheckFramebufferStatus) == 16,
809 "size of CheckFramebufferStatus should be 16");
810 static_assert(offsetof(CheckFramebufferStatus, header) == 0,
811 "offset of CheckFramebufferStatus header should be 0");
812 static_assert(offsetof(CheckFramebufferStatus, target) == 4,
813 "offset of CheckFramebufferStatus target should be 4");
814 static_assert(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
815 "offset of CheckFramebufferStatus result_shm_id should be 8");
816 static_assert(
817 offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
818 "offset of CheckFramebufferStatus result_shm_offset should be 12");
820 struct Clear {
821 typedef Clear ValueType;
822 static const CommandId kCmdId = kClear;
823 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
824 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
826 static uint32_t ComputeSize() {
827 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
830 void SetHeader() { header.SetCmd<ValueType>(); }
832 void Init(GLbitfield _mask) {
833 SetHeader();
834 mask = _mask;
837 void* Set(void* cmd, GLbitfield _mask) {
838 static_cast<ValueType*>(cmd)->Init(_mask);
839 return NextCmdAddress<ValueType>(cmd);
842 gpu::CommandHeader header;
843 uint32_t mask;
846 static_assert(sizeof(Clear) == 8, "size of Clear should be 8");
847 static_assert(offsetof(Clear, header) == 0,
848 "offset of Clear header should be 0");
849 static_assert(offsetof(Clear, mask) == 4, "offset of Clear mask should be 4");
851 struct ClearBufferfi {
852 typedef ClearBufferfi ValueType;
853 static const CommandId kCmdId = kClearBufferfi;
854 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
855 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
857 static uint32_t ComputeSize() {
858 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
861 void SetHeader() { header.SetCmd<ValueType>(); }
863 void Init(GLenum _buffer,
864 GLint _drawbuffers,
865 GLfloat _depth,
866 GLint _stencil) {
867 SetHeader();
868 buffer = _buffer;
869 drawbuffers = _drawbuffers;
870 depth = _depth;
871 stencil = _stencil;
874 void* Set(void* cmd,
875 GLenum _buffer,
876 GLint _drawbuffers,
877 GLfloat _depth,
878 GLint _stencil) {
879 static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _depth, _stencil);
880 return NextCmdAddress<ValueType>(cmd);
883 gpu::CommandHeader header;
884 uint32_t buffer;
885 int32_t drawbuffers;
886 float depth;
887 int32_t stencil;
890 static_assert(sizeof(ClearBufferfi) == 20,
891 "size of ClearBufferfi should be 20");
892 static_assert(offsetof(ClearBufferfi, header) == 0,
893 "offset of ClearBufferfi header should be 0");
894 static_assert(offsetof(ClearBufferfi, buffer) == 4,
895 "offset of ClearBufferfi buffer should be 4");
896 static_assert(offsetof(ClearBufferfi, drawbuffers) == 8,
897 "offset of ClearBufferfi drawbuffers should be 8");
898 static_assert(offsetof(ClearBufferfi, depth) == 12,
899 "offset of ClearBufferfi depth should be 12");
900 static_assert(offsetof(ClearBufferfi, stencil) == 16,
901 "offset of ClearBufferfi stencil should be 16");
903 struct ClearBufferfvImmediate {
904 typedef ClearBufferfvImmediate ValueType;
905 static const CommandId kCmdId = kClearBufferfvImmediate;
906 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
907 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
909 static uint32_t ComputeDataSize() {
910 return static_cast<uint32_t>(sizeof(GLfloat) * 4);
913 static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
914 return static_cast<uint32_t>(sizeof(GLfloat) *
915 GLES2Util::CalcClearBufferfvDataCount(buffer));
918 static uint32_t ComputeSize() {
919 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
922 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
924 void Init(GLenum _buffer, GLint _drawbuffers, const GLfloat* _value) {
925 SetHeader();
926 buffer = _buffer;
927 drawbuffers = _drawbuffers;
928 memcpy(ImmediateDataAddress(this), _value,
929 ComputeEffectiveDataSize(buffer));
930 DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
931 char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
932 ComputeEffectiveDataSize(buffer);
933 memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
936 void* Set(void* cmd,
937 GLenum _buffer,
938 GLint _drawbuffers,
939 const GLfloat* _value) {
940 static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
941 const uint32_t size = ComputeSize();
942 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
945 gpu::CommandHeader header;
946 uint32_t buffer;
947 int32_t drawbuffers;
950 static_assert(sizeof(ClearBufferfvImmediate) == 12,
951 "size of ClearBufferfvImmediate should be 12");
952 static_assert(offsetof(ClearBufferfvImmediate, header) == 0,
953 "offset of ClearBufferfvImmediate header should be 0");
954 static_assert(offsetof(ClearBufferfvImmediate, buffer) == 4,
955 "offset of ClearBufferfvImmediate buffer should be 4");
956 static_assert(offsetof(ClearBufferfvImmediate, drawbuffers) == 8,
957 "offset of ClearBufferfvImmediate drawbuffers should be 8");
959 struct ClearBufferivImmediate {
960 typedef ClearBufferivImmediate ValueType;
961 static const CommandId kCmdId = kClearBufferivImmediate;
962 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
963 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
965 static uint32_t ComputeDataSize() {
966 return static_cast<uint32_t>(sizeof(GLint) * 4);
969 static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
970 return static_cast<uint32_t>(sizeof(GLint) *
971 GLES2Util::CalcClearBufferivDataCount(buffer));
974 static uint32_t ComputeSize() {
975 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
978 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
980 void Init(GLenum _buffer, GLint _drawbuffers, const GLint* _value) {
981 SetHeader();
982 buffer = _buffer;
983 drawbuffers = _drawbuffers;
984 memcpy(ImmediateDataAddress(this), _value,
985 ComputeEffectiveDataSize(buffer));
986 DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
987 char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
988 ComputeEffectiveDataSize(buffer);
989 memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
992 void* Set(void* cmd,
993 GLenum _buffer,
994 GLint _drawbuffers,
995 const GLint* _value) {
996 static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
997 const uint32_t size = ComputeSize();
998 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1001 gpu::CommandHeader header;
1002 uint32_t buffer;
1003 int32_t drawbuffers;
1006 static_assert(sizeof(ClearBufferivImmediate) == 12,
1007 "size of ClearBufferivImmediate should be 12");
1008 static_assert(offsetof(ClearBufferivImmediate, header) == 0,
1009 "offset of ClearBufferivImmediate header should be 0");
1010 static_assert(offsetof(ClearBufferivImmediate, buffer) == 4,
1011 "offset of ClearBufferivImmediate buffer should be 4");
1012 static_assert(offsetof(ClearBufferivImmediate, drawbuffers) == 8,
1013 "offset of ClearBufferivImmediate drawbuffers should be 8");
1015 struct ClearBufferuivImmediate {
1016 typedef ClearBufferuivImmediate ValueType;
1017 static const CommandId kCmdId = kClearBufferuivImmediate;
1018 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
1019 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
1021 static uint32_t ComputeDataSize() {
1022 return static_cast<uint32_t>(sizeof(GLuint) * 4);
1025 static uint32_t ComputeSize() {
1026 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
1029 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
1031 void Init(GLenum _buffer, GLint _drawbuffers, const GLuint* _value) {
1032 SetHeader();
1033 buffer = _buffer;
1034 drawbuffers = _drawbuffers;
1035 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize());
1038 void* Set(void* cmd,
1039 GLenum _buffer,
1040 GLint _drawbuffers,
1041 const GLuint* _value) {
1042 static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
1043 const uint32_t size = ComputeSize();
1044 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
1047 gpu::CommandHeader header;
1048 uint32_t buffer;
1049 int32_t drawbuffers;
1052 static_assert(sizeof(ClearBufferuivImmediate) == 12,
1053 "size of ClearBufferuivImmediate should be 12");
1054 static_assert(offsetof(ClearBufferuivImmediate, header) == 0,
1055 "offset of ClearBufferuivImmediate header should be 0");
1056 static_assert(offsetof(ClearBufferuivImmediate, buffer) == 4,
1057 "offset of ClearBufferuivImmediate buffer should be 4");
1058 static_assert(offsetof(ClearBufferuivImmediate, drawbuffers) == 8,
1059 "offset of ClearBufferuivImmediate drawbuffers should be 8");
1061 struct ClearColor {
1062 typedef ClearColor ValueType;
1063 static const CommandId kCmdId = kClearColor;
1064 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1065 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1067 static uint32_t ComputeSize() {
1068 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1071 void SetHeader() { header.SetCmd<ValueType>(); }
1073 void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
1074 SetHeader();
1075 red = _red;
1076 green = _green;
1077 blue = _blue;
1078 alpha = _alpha;
1081 void* Set(void* cmd,
1082 GLclampf _red,
1083 GLclampf _green,
1084 GLclampf _blue,
1085 GLclampf _alpha) {
1086 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
1087 return NextCmdAddress<ValueType>(cmd);
1090 gpu::CommandHeader header;
1091 float red;
1092 float green;
1093 float blue;
1094 float alpha;
1097 static_assert(sizeof(ClearColor) == 20, "size of ClearColor should be 20");
1098 static_assert(offsetof(ClearColor, header) == 0,
1099 "offset of ClearColor header should be 0");
1100 static_assert(offsetof(ClearColor, red) == 4,
1101 "offset of ClearColor red should be 4");
1102 static_assert(offsetof(ClearColor, green) == 8,
1103 "offset of ClearColor green should be 8");
1104 static_assert(offsetof(ClearColor, blue) == 12,
1105 "offset of ClearColor blue should be 12");
1106 static_assert(offsetof(ClearColor, alpha) == 16,
1107 "offset of ClearColor alpha should be 16");
1109 struct ClearDepthf {
1110 typedef ClearDepthf ValueType;
1111 static const CommandId kCmdId = kClearDepthf;
1112 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1115 static uint32_t ComputeSize() {
1116 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1119 void SetHeader() { header.SetCmd<ValueType>(); }
1121 void Init(GLclampf _depth) {
1122 SetHeader();
1123 depth = _depth;
1126 void* Set(void* cmd, GLclampf _depth) {
1127 static_cast<ValueType*>(cmd)->Init(_depth);
1128 return NextCmdAddress<ValueType>(cmd);
1131 gpu::CommandHeader header;
1132 float depth;
1135 static_assert(sizeof(ClearDepthf) == 8, "size of ClearDepthf should be 8");
1136 static_assert(offsetof(ClearDepthf, header) == 0,
1137 "offset of ClearDepthf header should be 0");
1138 static_assert(offsetof(ClearDepthf, depth) == 4,
1139 "offset of ClearDepthf depth should be 4");
1141 struct ClearStencil {
1142 typedef ClearStencil ValueType;
1143 static const CommandId kCmdId = kClearStencil;
1144 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1145 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1147 static uint32_t ComputeSize() {
1148 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1151 void SetHeader() { header.SetCmd<ValueType>(); }
1153 void Init(GLint _s) {
1154 SetHeader();
1155 s = _s;
1158 void* Set(void* cmd, GLint _s) {
1159 static_cast<ValueType*>(cmd)->Init(_s);
1160 return NextCmdAddress<ValueType>(cmd);
1163 gpu::CommandHeader header;
1164 int32_t s;
1167 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8");
1168 static_assert(offsetof(ClearStencil, header) == 0,
1169 "offset of ClearStencil header should be 0");
1170 static_assert(offsetof(ClearStencil, s) == 4,
1171 "offset of ClearStencil s should be 4");
1173 struct ClientWaitSync {
1174 typedef ClientWaitSync ValueType;
1175 static const CommandId kCmdId = kClientWaitSync;
1176 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
1179 typedef GLenum Result;
1181 static uint32_t ComputeSize() {
1182 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1185 void SetHeader() { header.SetCmd<ValueType>(); }
1187 void Init(GLuint _sync,
1188 GLbitfield _flags,
1189 GLuint _timeout_0,
1190 GLuint _timeout_1,
1191 uint32_t _result_shm_id,
1192 uint32_t _result_shm_offset) {
1193 SetHeader();
1194 sync = _sync;
1195 flags = _flags;
1196 timeout_0 = _timeout_0;
1197 timeout_1 = _timeout_1;
1198 result_shm_id = _result_shm_id;
1199 result_shm_offset = _result_shm_offset;
1202 void* Set(void* cmd,
1203 GLuint _sync,
1204 GLbitfield _flags,
1205 GLuint _timeout_0,
1206 GLuint _timeout_1,
1207 uint32_t _result_shm_id,
1208 uint32_t _result_shm_offset) {
1209 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1,
1210 _result_shm_id, _result_shm_offset);
1211 return NextCmdAddress<ValueType>(cmd);
1214 gpu::CommandHeader header;
1215 uint32_t sync;
1216 uint32_t flags;
1217 uint32_t timeout_0;
1218 uint32_t timeout_1;
1219 uint32_t result_shm_id;
1220 uint32_t result_shm_offset;
1223 static_assert(sizeof(ClientWaitSync) == 28,
1224 "size of ClientWaitSync should be 28");
1225 static_assert(offsetof(ClientWaitSync, header) == 0,
1226 "offset of ClientWaitSync header should be 0");
1227 static_assert(offsetof(ClientWaitSync, sync) == 4,
1228 "offset of ClientWaitSync sync should be 4");
1229 static_assert(offsetof(ClientWaitSync, flags) == 8,
1230 "offset of ClientWaitSync flags should be 8");
1231 static_assert(offsetof(ClientWaitSync, timeout_0) == 12,
1232 "offset of ClientWaitSync timeout_0 should be 12");
1233 static_assert(offsetof(ClientWaitSync, timeout_1) == 16,
1234 "offset of ClientWaitSync timeout_1 should be 16");
1235 static_assert(offsetof(ClientWaitSync, result_shm_id) == 20,
1236 "offset of ClientWaitSync result_shm_id should be 20");
1237 static_assert(offsetof(ClientWaitSync, result_shm_offset) == 24,
1238 "offset of ClientWaitSync result_shm_offset should be 24");
1240 struct ColorMask {
1241 typedef ColorMask ValueType;
1242 static const CommandId kCmdId = kColorMask;
1243 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1244 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1246 static uint32_t ComputeSize() {
1247 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1250 void SetHeader() { header.SetCmd<ValueType>(); }
1252 void Init(GLboolean _red,
1253 GLboolean _green,
1254 GLboolean _blue,
1255 GLboolean _alpha) {
1256 SetHeader();
1257 red = _red;
1258 green = _green;
1259 blue = _blue;
1260 alpha = _alpha;
1263 void* Set(void* cmd,
1264 GLboolean _red,
1265 GLboolean _green,
1266 GLboolean _blue,
1267 GLboolean _alpha) {
1268 static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
1269 return NextCmdAddress<ValueType>(cmd);
1272 gpu::CommandHeader header;
1273 uint32_t red;
1274 uint32_t green;
1275 uint32_t blue;
1276 uint32_t alpha;
1279 static_assert(sizeof(ColorMask) == 20, "size of ColorMask should be 20");
1280 static_assert(offsetof(ColorMask, header) == 0,
1281 "offset of ColorMask header should be 0");
1282 static_assert(offsetof(ColorMask, red) == 4,
1283 "offset of ColorMask red should be 4");
1284 static_assert(offsetof(ColorMask, green) == 8,
1285 "offset of ColorMask green should be 8");
1286 static_assert(offsetof(ColorMask, blue) == 12,
1287 "offset of ColorMask blue should be 12");
1288 static_assert(offsetof(ColorMask, alpha) == 16,
1289 "offset of ColorMask alpha should be 16");
1291 struct CompileShader {
1292 typedef CompileShader ValueType;
1293 static const CommandId kCmdId = kCompileShader;
1294 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1295 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1297 static uint32_t ComputeSize() {
1298 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1301 void SetHeader() { header.SetCmd<ValueType>(); }
1303 void Init(GLuint _shader) {
1304 SetHeader();
1305 shader = _shader;
1308 void* Set(void* cmd, GLuint _shader) {
1309 static_cast<ValueType*>(cmd)->Init(_shader);
1310 return NextCmdAddress<ValueType>(cmd);
1313 gpu::CommandHeader header;
1314 uint32_t shader;
1317 static_assert(sizeof(CompileShader) == 8, "size of CompileShader should be 8");
1318 static_assert(offsetof(CompileShader, header) == 0,
1319 "offset of CompileShader header should be 0");
1320 static_assert(offsetof(CompileShader, shader) == 4,
1321 "offset of CompileShader shader should be 4");
1323 struct CompressedTexImage2DBucket {
1324 typedef CompressedTexImage2DBucket ValueType;
1325 static const CommandId kCmdId = kCompressedTexImage2DBucket;
1326 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1327 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1329 static uint32_t ComputeSize() {
1330 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1333 void SetHeader() { header.SetCmd<ValueType>(); }
1335 void Init(GLenum _target,
1336 GLint _level,
1337 GLenum _internalformat,
1338 GLsizei _width,
1339 GLsizei _height,
1340 GLuint _bucket_id) {
1341 SetHeader();
1342 target = _target;
1343 level = _level;
1344 internalformat = _internalformat;
1345 width = _width;
1346 height = _height;
1347 bucket_id = _bucket_id;
1350 void* Set(void* cmd,
1351 GLenum _target,
1352 GLint _level,
1353 GLenum _internalformat,
1354 GLsizei _width,
1355 GLsizei _height,
1356 GLuint _bucket_id) {
1357 static_cast<ValueType*>(cmd)
1358 ->Init(_target, _level, _internalformat, _width, _height, _bucket_id);
1359 return NextCmdAddress<ValueType>(cmd);
1362 gpu::CommandHeader header;
1363 uint32_t target;
1364 int32_t level;
1365 uint32_t internalformat;
1366 int32_t width;
1367 int32_t height;
1368 uint32_t bucket_id;
1369 static const int32_t border = 0;
1372 static_assert(sizeof(CompressedTexImage2DBucket) == 28,
1373 "size of CompressedTexImage2DBucket should be 28");
1374 static_assert(offsetof(CompressedTexImage2DBucket, header) == 0,
1375 "offset of CompressedTexImage2DBucket header should be 0");
1376 static_assert(offsetof(CompressedTexImage2DBucket, target) == 4,
1377 "offset of CompressedTexImage2DBucket target should be 4");
1378 static_assert(offsetof(CompressedTexImage2DBucket, level) == 8,
1379 "offset of CompressedTexImage2DBucket level should be 8");
1380 static_assert(
1381 offsetof(CompressedTexImage2DBucket, internalformat) == 12,
1382 "offset of CompressedTexImage2DBucket internalformat should be 12");
1383 static_assert(offsetof(CompressedTexImage2DBucket, width) == 16,
1384 "offset of CompressedTexImage2DBucket width should be 16");
1385 static_assert(offsetof(CompressedTexImage2DBucket, height) == 20,
1386 "offset of CompressedTexImage2DBucket height should be 20");
1387 static_assert(offsetof(CompressedTexImage2DBucket, bucket_id) == 24,
1388 "offset of CompressedTexImage2DBucket bucket_id should be 24");
1390 struct CompressedTexImage2D {
1391 typedef CompressedTexImage2D ValueType;
1392 static const CommandId kCmdId = kCompressedTexImage2D;
1393 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1394 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1396 static uint32_t ComputeSize() {
1397 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1400 void SetHeader() { header.SetCmd<ValueType>(); }
1402 void Init(GLenum _target,
1403 GLint _level,
1404 GLenum _internalformat,
1405 GLsizei _width,
1406 GLsizei _height,
1407 GLsizei _imageSize,
1408 uint32_t _data_shm_id,
1409 uint32_t _data_shm_offset) {
1410 SetHeader();
1411 target = _target;
1412 level = _level;
1413 internalformat = _internalformat;
1414 width = _width;
1415 height = _height;
1416 imageSize = _imageSize;
1417 data_shm_id = _data_shm_id;
1418 data_shm_offset = _data_shm_offset;
1421 void* Set(void* cmd,
1422 GLenum _target,
1423 GLint _level,
1424 GLenum _internalformat,
1425 GLsizei _width,
1426 GLsizei _height,
1427 GLsizei _imageSize,
1428 uint32_t _data_shm_id,
1429 uint32_t _data_shm_offset) {
1430 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
1431 _height, _imageSize, _data_shm_id,
1432 _data_shm_offset);
1433 return NextCmdAddress<ValueType>(cmd);
1436 gpu::CommandHeader header;
1437 uint32_t target;
1438 int32_t level;
1439 uint32_t internalformat;
1440 int32_t width;
1441 int32_t height;
1442 int32_t imageSize;
1443 uint32_t data_shm_id;
1444 uint32_t data_shm_offset;
1445 static const int32_t border = 0;
1448 static_assert(sizeof(CompressedTexImage2D) == 36,
1449 "size of CompressedTexImage2D should be 36");
1450 static_assert(offsetof(CompressedTexImage2D, header) == 0,
1451 "offset of CompressedTexImage2D header should be 0");
1452 static_assert(offsetof(CompressedTexImage2D, target) == 4,
1453 "offset of CompressedTexImage2D target should be 4");
1454 static_assert(offsetof(CompressedTexImage2D, level) == 8,
1455 "offset of CompressedTexImage2D level should be 8");
1456 static_assert(offsetof(CompressedTexImage2D, internalformat) == 12,
1457 "offset of CompressedTexImage2D internalformat should be 12");
1458 static_assert(offsetof(CompressedTexImage2D, width) == 16,
1459 "offset of CompressedTexImage2D width should be 16");
1460 static_assert(offsetof(CompressedTexImage2D, height) == 20,
1461 "offset of CompressedTexImage2D height should be 20");
1462 static_assert(offsetof(CompressedTexImage2D, imageSize) == 24,
1463 "offset of CompressedTexImage2D imageSize should be 24");
1464 static_assert(offsetof(CompressedTexImage2D, data_shm_id) == 28,
1465 "offset of CompressedTexImage2D data_shm_id should be 28");
1466 static_assert(offsetof(CompressedTexImage2D, data_shm_offset) == 32,
1467 "offset of CompressedTexImage2D data_shm_offset should be 32");
1469 struct CompressedTexSubImage2DBucket {
1470 typedef CompressedTexSubImage2DBucket ValueType;
1471 static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
1472 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1473 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1475 static uint32_t ComputeSize() {
1476 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1479 void SetHeader() { header.SetCmd<ValueType>(); }
1481 void Init(GLenum _target,
1482 GLint _level,
1483 GLint _xoffset,
1484 GLint _yoffset,
1485 GLsizei _width,
1486 GLsizei _height,
1487 GLenum _format,
1488 GLuint _bucket_id) {
1489 SetHeader();
1490 target = _target;
1491 level = _level;
1492 xoffset = _xoffset;
1493 yoffset = _yoffset;
1494 width = _width;
1495 height = _height;
1496 format = _format;
1497 bucket_id = _bucket_id;
1500 void* Set(void* cmd,
1501 GLenum _target,
1502 GLint _level,
1503 GLint _xoffset,
1504 GLint _yoffset,
1505 GLsizei _width,
1506 GLsizei _height,
1507 GLenum _format,
1508 GLuint _bucket_id) {
1509 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1510 _width, _height, _format, _bucket_id);
1511 return NextCmdAddress<ValueType>(cmd);
1514 gpu::CommandHeader header;
1515 uint32_t target;
1516 int32_t level;
1517 int32_t xoffset;
1518 int32_t yoffset;
1519 int32_t width;
1520 int32_t height;
1521 uint32_t format;
1522 uint32_t bucket_id;
1525 static_assert(sizeof(CompressedTexSubImage2DBucket) == 36,
1526 "size of CompressedTexSubImage2DBucket should be 36");
1527 static_assert(offsetof(CompressedTexSubImage2DBucket, header) == 0,
1528 "offset of CompressedTexSubImage2DBucket header should be 0");
1529 static_assert(offsetof(CompressedTexSubImage2DBucket, target) == 4,
1530 "offset of CompressedTexSubImage2DBucket target should be 4");
1531 static_assert(offsetof(CompressedTexSubImage2DBucket, level) == 8,
1532 "offset of CompressedTexSubImage2DBucket level should be 8");
1533 static_assert(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
1534 "offset of CompressedTexSubImage2DBucket xoffset should be 12");
1535 static_assert(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
1536 "offset of CompressedTexSubImage2DBucket yoffset should be 16");
1537 static_assert(offsetof(CompressedTexSubImage2DBucket, width) == 20,
1538 "offset of CompressedTexSubImage2DBucket width should be 20");
1539 static_assert(offsetof(CompressedTexSubImage2DBucket, height) == 24,
1540 "offset of CompressedTexSubImage2DBucket height should be 24");
1541 static_assert(offsetof(CompressedTexSubImage2DBucket, format) == 28,
1542 "offset of CompressedTexSubImage2DBucket format should be 28");
1543 static_assert(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
1544 "offset of CompressedTexSubImage2DBucket bucket_id should be 32");
1546 struct CompressedTexSubImage2D {
1547 typedef CompressedTexSubImage2D ValueType;
1548 static const CommandId kCmdId = kCompressedTexSubImage2D;
1549 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1550 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1552 static uint32_t ComputeSize() {
1553 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1556 void SetHeader() { header.SetCmd<ValueType>(); }
1558 void Init(GLenum _target,
1559 GLint _level,
1560 GLint _xoffset,
1561 GLint _yoffset,
1562 GLsizei _width,
1563 GLsizei _height,
1564 GLenum _format,
1565 GLsizei _imageSize,
1566 uint32_t _data_shm_id,
1567 uint32_t _data_shm_offset) {
1568 SetHeader();
1569 target = _target;
1570 level = _level;
1571 xoffset = _xoffset;
1572 yoffset = _yoffset;
1573 width = _width;
1574 height = _height;
1575 format = _format;
1576 imageSize = _imageSize;
1577 data_shm_id = _data_shm_id;
1578 data_shm_offset = _data_shm_offset;
1581 void* Set(void* cmd,
1582 GLenum _target,
1583 GLint _level,
1584 GLint _xoffset,
1585 GLint _yoffset,
1586 GLsizei _width,
1587 GLsizei _height,
1588 GLenum _format,
1589 GLsizei _imageSize,
1590 uint32_t _data_shm_id,
1591 uint32_t _data_shm_offset) {
1592 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1593 _width, _height, _format, _imageSize,
1594 _data_shm_id, _data_shm_offset);
1595 return NextCmdAddress<ValueType>(cmd);
1598 gpu::CommandHeader header;
1599 uint32_t target;
1600 int32_t level;
1601 int32_t xoffset;
1602 int32_t yoffset;
1603 int32_t width;
1604 int32_t height;
1605 uint32_t format;
1606 int32_t imageSize;
1607 uint32_t data_shm_id;
1608 uint32_t data_shm_offset;
1611 static_assert(sizeof(CompressedTexSubImage2D) == 44,
1612 "size of CompressedTexSubImage2D should be 44");
1613 static_assert(offsetof(CompressedTexSubImage2D, header) == 0,
1614 "offset of CompressedTexSubImage2D header should be 0");
1615 static_assert(offsetof(CompressedTexSubImage2D, target) == 4,
1616 "offset of CompressedTexSubImage2D target should be 4");
1617 static_assert(offsetof(CompressedTexSubImage2D, level) == 8,
1618 "offset of CompressedTexSubImage2D level should be 8");
1619 static_assert(offsetof(CompressedTexSubImage2D, xoffset) == 12,
1620 "offset of CompressedTexSubImage2D xoffset should be 12");
1621 static_assert(offsetof(CompressedTexSubImage2D, yoffset) == 16,
1622 "offset of CompressedTexSubImage2D yoffset should be 16");
1623 static_assert(offsetof(CompressedTexSubImage2D, width) == 20,
1624 "offset of CompressedTexSubImage2D width should be 20");
1625 static_assert(offsetof(CompressedTexSubImage2D, height) == 24,
1626 "offset of CompressedTexSubImage2D height should be 24");
1627 static_assert(offsetof(CompressedTexSubImage2D, format) == 28,
1628 "offset of CompressedTexSubImage2D format should be 28");
1629 static_assert(offsetof(CompressedTexSubImage2D, imageSize) == 32,
1630 "offset of CompressedTexSubImage2D imageSize should be 32");
1631 static_assert(offsetof(CompressedTexSubImage2D, data_shm_id) == 36,
1632 "offset of CompressedTexSubImage2D data_shm_id should be 36");
1633 static_assert(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40,
1634 "offset of CompressedTexSubImage2D data_shm_offset should be 40");
1636 struct CompressedTexImage3DBucket {
1637 typedef CompressedTexImage3DBucket ValueType;
1638 static const CommandId kCmdId = kCompressedTexImage3DBucket;
1639 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1640 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1642 static uint32_t ComputeSize() {
1643 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1646 void SetHeader() { header.SetCmd<ValueType>(); }
1648 void Init(GLenum _target,
1649 GLint _level,
1650 GLenum _internalformat,
1651 GLsizei _width,
1652 GLsizei _height,
1653 GLsizei _depth,
1654 GLuint _bucket_id) {
1655 SetHeader();
1656 target = _target;
1657 level = _level;
1658 internalformat = _internalformat;
1659 width = _width;
1660 height = _height;
1661 depth = _depth;
1662 bucket_id = _bucket_id;
1665 void* Set(void* cmd,
1666 GLenum _target,
1667 GLint _level,
1668 GLenum _internalformat,
1669 GLsizei _width,
1670 GLsizei _height,
1671 GLsizei _depth,
1672 GLuint _bucket_id) {
1673 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
1674 _height, _depth, _bucket_id);
1675 return NextCmdAddress<ValueType>(cmd);
1678 gpu::CommandHeader header;
1679 uint32_t target;
1680 int32_t level;
1681 uint32_t internalformat;
1682 int32_t width;
1683 int32_t height;
1684 int32_t depth;
1685 uint32_t bucket_id;
1686 static const int32_t border = 0;
1689 static_assert(sizeof(CompressedTexImage3DBucket) == 32,
1690 "size of CompressedTexImage3DBucket should be 32");
1691 static_assert(offsetof(CompressedTexImage3DBucket, header) == 0,
1692 "offset of CompressedTexImage3DBucket header should be 0");
1693 static_assert(offsetof(CompressedTexImage3DBucket, target) == 4,
1694 "offset of CompressedTexImage3DBucket target should be 4");
1695 static_assert(offsetof(CompressedTexImage3DBucket, level) == 8,
1696 "offset of CompressedTexImage3DBucket level should be 8");
1697 static_assert(
1698 offsetof(CompressedTexImage3DBucket, internalformat) == 12,
1699 "offset of CompressedTexImage3DBucket internalformat should be 12");
1700 static_assert(offsetof(CompressedTexImage3DBucket, width) == 16,
1701 "offset of CompressedTexImage3DBucket width should be 16");
1702 static_assert(offsetof(CompressedTexImage3DBucket, height) == 20,
1703 "offset of CompressedTexImage3DBucket height should be 20");
1704 static_assert(offsetof(CompressedTexImage3DBucket, depth) == 24,
1705 "offset of CompressedTexImage3DBucket depth should be 24");
1706 static_assert(offsetof(CompressedTexImage3DBucket, bucket_id) == 28,
1707 "offset of CompressedTexImage3DBucket bucket_id should be 28");
1709 struct CompressedTexImage3D {
1710 typedef CompressedTexImage3D ValueType;
1711 static const CommandId kCmdId = kCompressedTexImage3D;
1712 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1713 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1715 static uint32_t ComputeSize() {
1716 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1719 void SetHeader() { header.SetCmd<ValueType>(); }
1721 void Init(GLenum _target,
1722 GLint _level,
1723 GLenum _internalformat,
1724 GLsizei _width,
1725 GLsizei _height,
1726 GLsizei _depth,
1727 GLsizei _imageSize,
1728 uint32_t _data_shm_id,
1729 uint32_t _data_shm_offset) {
1730 SetHeader();
1731 target = _target;
1732 level = _level;
1733 internalformat = _internalformat;
1734 width = _width;
1735 height = _height;
1736 depth = _depth;
1737 imageSize = _imageSize;
1738 data_shm_id = _data_shm_id;
1739 data_shm_offset = _data_shm_offset;
1742 void* Set(void* cmd,
1743 GLenum _target,
1744 GLint _level,
1745 GLenum _internalformat,
1746 GLsizei _width,
1747 GLsizei _height,
1748 GLsizei _depth,
1749 GLsizei _imageSize,
1750 uint32_t _data_shm_id,
1751 uint32_t _data_shm_offset) {
1752 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
1753 _height, _depth, _imageSize,
1754 _data_shm_id, _data_shm_offset);
1755 return NextCmdAddress<ValueType>(cmd);
1758 gpu::CommandHeader header;
1759 uint32_t target;
1760 int32_t level;
1761 uint32_t internalformat;
1762 int32_t width;
1763 int32_t height;
1764 int32_t depth;
1765 int32_t imageSize;
1766 uint32_t data_shm_id;
1767 uint32_t data_shm_offset;
1768 static const int32_t border = 0;
1771 static_assert(sizeof(CompressedTexImage3D) == 40,
1772 "size of CompressedTexImage3D should be 40");
1773 static_assert(offsetof(CompressedTexImage3D, header) == 0,
1774 "offset of CompressedTexImage3D header should be 0");
1775 static_assert(offsetof(CompressedTexImage3D, target) == 4,
1776 "offset of CompressedTexImage3D target should be 4");
1777 static_assert(offsetof(CompressedTexImage3D, level) == 8,
1778 "offset of CompressedTexImage3D level should be 8");
1779 static_assert(offsetof(CompressedTexImage3D, internalformat) == 12,
1780 "offset of CompressedTexImage3D internalformat should be 12");
1781 static_assert(offsetof(CompressedTexImage3D, width) == 16,
1782 "offset of CompressedTexImage3D width should be 16");
1783 static_assert(offsetof(CompressedTexImage3D, height) == 20,
1784 "offset of CompressedTexImage3D height should be 20");
1785 static_assert(offsetof(CompressedTexImage3D, depth) == 24,
1786 "offset of CompressedTexImage3D depth should be 24");
1787 static_assert(offsetof(CompressedTexImage3D, imageSize) == 28,
1788 "offset of CompressedTexImage3D imageSize should be 28");
1789 static_assert(offsetof(CompressedTexImage3D, data_shm_id) == 32,
1790 "offset of CompressedTexImage3D data_shm_id should be 32");
1791 static_assert(offsetof(CompressedTexImage3D, data_shm_offset) == 36,
1792 "offset of CompressedTexImage3D data_shm_offset should be 36");
1794 struct CompressedTexSubImage3DBucket {
1795 typedef CompressedTexSubImage3DBucket ValueType;
1796 static const CommandId kCmdId = kCompressedTexSubImage3DBucket;
1797 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1798 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1800 static uint32_t ComputeSize() {
1801 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1804 void SetHeader() { header.SetCmd<ValueType>(); }
1806 void Init(GLenum _target,
1807 GLint _level,
1808 GLint _xoffset,
1809 GLint _yoffset,
1810 GLint _zoffset,
1811 GLsizei _width,
1812 GLsizei _height,
1813 GLsizei _depth,
1814 GLenum _format,
1815 GLuint _bucket_id) {
1816 SetHeader();
1817 target = _target;
1818 level = _level;
1819 xoffset = _xoffset;
1820 yoffset = _yoffset;
1821 zoffset = _zoffset;
1822 width = _width;
1823 height = _height;
1824 depth = _depth;
1825 format = _format;
1826 bucket_id = _bucket_id;
1829 void* Set(void* cmd,
1830 GLenum _target,
1831 GLint _level,
1832 GLint _xoffset,
1833 GLint _yoffset,
1834 GLint _zoffset,
1835 GLsizei _width,
1836 GLsizei _height,
1837 GLsizei _depth,
1838 GLenum _format,
1839 GLuint _bucket_id) {
1840 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1841 _zoffset, _width, _height, _depth,
1842 _format, _bucket_id);
1843 return NextCmdAddress<ValueType>(cmd);
1846 gpu::CommandHeader header;
1847 uint32_t target;
1848 int32_t level;
1849 int32_t xoffset;
1850 int32_t yoffset;
1851 int32_t zoffset;
1852 int32_t width;
1853 int32_t height;
1854 int32_t depth;
1855 uint32_t format;
1856 uint32_t bucket_id;
1859 static_assert(sizeof(CompressedTexSubImage3DBucket) == 44,
1860 "size of CompressedTexSubImage3DBucket should be 44");
1861 static_assert(offsetof(CompressedTexSubImage3DBucket, header) == 0,
1862 "offset of CompressedTexSubImage3DBucket header should be 0");
1863 static_assert(offsetof(CompressedTexSubImage3DBucket, target) == 4,
1864 "offset of CompressedTexSubImage3DBucket target should be 4");
1865 static_assert(offsetof(CompressedTexSubImage3DBucket, level) == 8,
1866 "offset of CompressedTexSubImage3DBucket level should be 8");
1867 static_assert(offsetof(CompressedTexSubImage3DBucket, xoffset) == 12,
1868 "offset of CompressedTexSubImage3DBucket xoffset should be 12");
1869 static_assert(offsetof(CompressedTexSubImage3DBucket, yoffset) == 16,
1870 "offset of CompressedTexSubImage3DBucket yoffset should be 16");
1871 static_assert(offsetof(CompressedTexSubImage3DBucket, zoffset) == 20,
1872 "offset of CompressedTexSubImage3DBucket zoffset should be 20");
1873 static_assert(offsetof(CompressedTexSubImage3DBucket, width) == 24,
1874 "offset of CompressedTexSubImage3DBucket width should be 24");
1875 static_assert(offsetof(CompressedTexSubImage3DBucket, height) == 28,
1876 "offset of CompressedTexSubImage3DBucket height should be 28");
1877 static_assert(offsetof(CompressedTexSubImage3DBucket, depth) == 32,
1878 "offset of CompressedTexSubImage3DBucket depth should be 32");
1879 static_assert(offsetof(CompressedTexSubImage3DBucket, format) == 36,
1880 "offset of CompressedTexSubImage3DBucket format should be 36");
1881 static_assert(offsetof(CompressedTexSubImage3DBucket, bucket_id) == 40,
1882 "offset of CompressedTexSubImage3DBucket bucket_id should be 40");
1884 struct CompressedTexSubImage3D {
1885 typedef CompressedTexSubImage3D ValueType;
1886 static const CommandId kCmdId = kCompressedTexSubImage3D;
1887 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1888 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
1890 static uint32_t ComputeSize() {
1891 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1894 void SetHeader() { header.SetCmd<ValueType>(); }
1896 void Init(GLenum _target,
1897 GLint _level,
1898 GLint _xoffset,
1899 GLint _yoffset,
1900 GLint _zoffset,
1901 GLsizei _width,
1902 GLsizei _height,
1903 GLsizei _depth,
1904 GLenum _format,
1905 GLsizei _imageSize,
1906 uint32_t _data_shm_id,
1907 uint32_t _data_shm_offset) {
1908 SetHeader();
1909 target = _target;
1910 level = _level;
1911 xoffset = _xoffset;
1912 yoffset = _yoffset;
1913 zoffset = _zoffset;
1914 width = _width;
1915 height = _height;
1916 depth = _depth;
1917 format = _format;
1918 imageSize = _imageSize;
1919 data_shm_id = _data_shm_id;
1920 data_shm_offset = _data_shm_offset;
1923 void* Set(void* cmd,
1924 GLenum _target,
1925 GLint _level,
1926 GLint _xoffset,
1927 GLint _yoffset,
1928 GLint _zoffset,
1929 GLsizei _width,
1930 GLsizei _height,
1931 GLsizei _depth,
1932 GLenum _format,
1933 GLsizei _imageSize,
1934 uint32_t _data_shm_id,
1935 uint32_t _data_shm_offset) {
1936 static_cast<ValueType*>(cmd)
1937 ->Init(_target, _level, _xoffset, _yoffset, _zoffset, _width, _height,
1938 _depth, _format, _imageSize, _data_shm_id, _data_shm_offset);
1939 return NextCmdAddress<ValueType>(cmd);
1942 gpu::CommandHeader header;
1943 uint32_t target;
1944 int32_t level;
1945 int32_t xoffset;
1946 int32_t yoffset;
1947 int32_t zoffset;
1948 int32_t width;
1949 int32_t height;
1950 int32_t depth;
1951 uint32_t format;
1952 int32_t imageSize;
1953 uint32_t data_shm_id;
1954 uint32_t data_shm_offset;
1957 static_assert(sizeof(CompressedTexSubImage3D) == 52,
1958 "size of CompressedTexSubImage3D should be 52");
1959 static_assert(offsetof(CompressedTexSubImage3D, header) == 0,
1960 "offset of CompressedTexSubImage3D header should be 0");
1961 static_assert(offsetof(CompressedTexSubImage3D, target) == 4,
1962 "offset of CompressedTexSubImage3D target should be 4");
1963 static_assert(offsetof(CompressedTexSubImage3D, level) == 8,
1964 "offset of CompressedTexSubImage3D level should be 8");
1965 static_assert(offsetof(CompressedTexSubImage3D, xoffset) == 12,
1966 "offset of CompressedTexSubImage3D xoffset should be 12");
1967 static_assert(offsetof(CompressedTexSubImage3D, yoffset) == 16,
1968 "offset of CompressedTexSubImage3D yoffset should be 16");
1969 static_assert(offsetof(CompressedTexSubImage3D, zoffset) == 20,
1970 "offset of CompressedTexSubImage3D zoffset should be 20");
1971 static_assert(offsetof(CompressedTexSubImage3D, width) == 24,
1972 "offset of CompressedTexSubImage3D width should be 24");
1973 static_assert(offsetof(CompressedTexSubImage3D, height) == 28,
1974 "offset of CompressedTexSubImage3D height should be 28");
1975 static_assert(offsetof(CompressedTexSubImage3D, depth) == 32,
1976 "offset of CompressedTexSubImage3D depth should be 32");
1977 static_assert(offsetof(CompressedTexSubImage3D, format) == 36,
1978 "offset of CompressedTexSubImage3D format should be 36");
1979 static_assert(offsetof(CompressedTexSubImage3D, imageSize) == 40,
1980 "offset of CompressedTexSubImage3D imageSize should be 40");
1981 static_assert(offsetof(CompressedTexSubImage3D, data_shm_id) == 44,
1982 "offset of CompressedTexSubImage3D data_shm_id should be 44");
1983 static_assert(offsetof(CompressedTexSubImage3D, data_shm_offset) == 48,
1984 "offset of CompressedTexSubImage3D data_shm_offset should be 48");
1986 struct CopyBufferSubData {
1987 typedef CopyBufferSubData ValueType;
1988 static const CommandId kCmdId = kCopyBufferSubData;
1989 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1990 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1992 static uint32_t ComputeSize() {
1993 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1996 void SetHeader() { header.SetCmd<ValueType>(); }
1998 void Init(GLenum _readtarget,
1999 GLenum _writetarget,
2000 GLintptr _readoffset,
2001 GLintptr _writeoffset,
2002 GLsizeiptr _size) {
2003 SetHeader();
2004 readtarget = _readtarget;
2005 writetarget = _writetarget;
2006 readoffset = _readoffset;
2007 writeoffset = _writeoffset;
2008 size = _size;
2011 void* Set(void* cmd,
2012 GLenum _readtarget,
2013 GLenum _writetarget,
2014 GLintptr _readoffset,
2015 GLintptr _writeoffset,
2016 GLsizeiptr _size) {
2017 static_cast<ValueType*>(cmd)
2018 ->Init(_readtarget, _writetarget, _readoffset, _writeoffset, _size);
2019 return NextCmdAddress<ValueType>(cmd);
2022 gpu::CommandHeader header;
2023 uint32_t readtarget;
2024 uint32_t writetarget;
2025 int32_t readoffset;
2026 int32_t writeoffset;
2027 int32_t size;
2030 static_assert(sizeof(CopyBufferSubData) == 24,
2031 "size of CopyBufferSubData should be 24");
2032 static_assert(offsetof(CopyBufferSubData, header) == 0,
2033 "offset of CopyBufferSubData header should be 0");
2034 static_assert(offsetof(CopyBufferSubData, readtarget) == 4,
2035 "offset of CopyBufferSubData readtarget should be 4");
2036 static_assert(offsetof(CopyBufferSubData, writetarget) == 8,
2037 "offset of CopyBufferSubData writetarget should be 8");
2038 static_assert(offsetof(CopyBufferSubData, readoffset) == 12,
2039 "offset of CopyBufferSubData readoffset should be 12");
2040 static_assert(offsetof(CopyBufferSubData, writeoffset) == 16,
2041 "offset of CopyBufferSubData writeoffset should be 16");
2042 static_assert(offsetof(CopyBufferSubData, size) == 20,
2043 "offset of CopyBufferSubData size should be 20");
2045 struct CopyTexImage2D {
2046 typedef CopyTexImage2D ValueType;
2047 static const CommandId kCmdId = kCopyTexImage2D;
2048 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2049 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2051 static uint32_t ComputeSize() {
2052 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2055 void SetHeader() { header.SetCmd<ValueType>(); }
2057 void Init(GLenum _target,
2058 GLint _level,
2059 GLenum _internalformat,
2060 GLint _x,
2061 GLint _y,
2062 GLsizei _width,
2063 GLsizei _height) {
2064 SetHeader();
2065 target = _target;
2066 level = _level;
2067 internalformat = _internalformat;
2068 x = _x;
2069 y = _y;
2070 width = _width;
2071 height = _height;
2074 void* Set(void* cmd,
2075 GLenum _target,
2076 GLint _level,
2077 GLenum _internalformat,
2078 GLint _x,
2079 GLint _y,
2080 GLsizei _width,
2081 GLsizei _height) {
2082 static_cast<ValueType*>(cmd)
2083 ->Init(_target, _level, _internalformat, _x, _y, _width, _height);
2084 return NextCmdAddress<ValueType>(cmd);
2087 gpu::CommandHeader header;
2088 uint32_t target;
2089 int32_t level;
2090 uint32_t internalformat;
2091 int32_t x;
2092 int32_t y;
2093 int32_t width;
2094 int32_t height;
2095 static const int32_t border = 0;
2098 static_assert(sizeof(CopyTexImage2D) == 32,
2099 "size of CopyTexImage2D should be 32");
2100 static_assert(offsetof(CopyTexImage2D, header) == 0,
2101 "offset of CopyTexImage2D header should be 0");
2102 static_assert(offsetof(CopyTexImage2D, target) == 4,
2103 "offset of CopyTexImage2D target should be 4");
2104 static_assert(offsetof(CopyTexImage2D, level) == 8,
2105 "offset of CopyTexImage2D level should be 8");
2106 static_assert(offsetof(CopyTexImage2D, internalformat) == 12,
2107 "offset of CopyTexImage2D internalformat should be 12");
2108 static_assert(offsetof(CopyTexImage2D, x) == 16,
2109 "offset of CopyTexImage2D x should be 16");
2110 static_assert(offsetof(CopyTexImage2D, y) == 20,
2111 "offset of CopyTexImage2D y should be 20");
2112 static_assert(offsetof(CopyTexImage2D, width) == 24,
2113 "offset of CopyTexImage2D width should be 24");
2114 static_assert(offsetof(CopyTexImage2D, height) == 28,
2115 "offset of CopyTexImage2D height should be 28");
2117 struct CopyTexSubImage2D {
2118 typedef CopyTexSubImage2D ValueType;
2119 static const CommandId kCmdId = kCopyTexSubImage2D;
2120 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2121 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2123 static uint32_t ComputeSize() {
2124 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2127 void SetHeader() { header.SetCmd<ValueType>(); }
2129 void Init(GLenum _target,
2130 GLint _level,
2131 GLint _xoffset,
2132 GLint _yoffset,
2133 GLint _x,
2134 GLint _y,
2135 GLsizei _width,
2136 GLsizei _height) {
2137 SetHeader();
2138 target = _target;
2139 level = _level;
2140 xoffset = _xoffset;
2141 yoffset = _yoffset;
2142 x = _x;
2143 y = _y;
2144 width = _width;
2145 height = _height;
2148 void* Set(void* cmd,
2149 GLenum _target,
2150 GLint _level,
2151 GLint _xoffset,
2152 GLint _yoffset,
2153 GLint _x,
2154 GLint _y,
2155 GLsizei _width,
2156 GLsizei _height) {
2157 static_cast<ValueType*>(cmd)
2158 ->Init(_target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
2159 return NextCmdAddress<ValueType>(cmd);
2162 gpu::CommandHeader header;
2163 uint32_t target;
2164 int32_t level;
2165 int32_t xoffset;
2166 int32_t yoffset;
2167 int32_t x;
2168 int32_t y;
2169 int32_t width;
2170 int32_t height;
2173 static_assert(sizeof(CopyTexSubImage2D) == 36,
2174 "size of CopyTexSubImage2D should be 36");
2175 static_assert(offsetof(CopyTexSubImage2D, header) == 0,
2176 "offset of CopyTexSubImage2D header should be 0");
2177 static_assert(offsetof(CopyTexSubImage2D, target) == 4,
2178 "offset of CopyTexSubImage2D target should be 4");
2179 static_assert(offsetof(CopyTexSubImage2D, level) == 8,
2180 "offset of CopyTexSubImage2D level should be 8");
2181 static_assert(offsetof(CopyTexSubImage2D, xoffset) == 12,
2182 "offset of CopyTexSubImage2D xoffset should be 12");
2183 static_assert(offsetof(CopyTexSubImage2D, yoffset) == 16,
2184 "offset of CopyTexSubImage2D yoffset should be 16");
2185 static_assert(offsetof(CopyTexSubImage2D, x) == 20,
2186 "offset of CopyTexSubImage2D x should be 20");
2187 static_assert(offsetof(CopyTexSubImage2D, y) == 24,
2188 "offset of CopyTexSubImage2D y should be 24");
2189 static_assert(offsetof(CopyTexSubImage2D, width) == 28,
2190 "offset of CopyTexSubImage2D width should be 28");
2191 static_assert(offsetof(CopyTexSubImage2D, height) == 32,
2192 "offset of CopyTexSubImage2D height should be 32");
2194 struct CopyTexSubImage3D {
2195 typedef CopyTexSubImage3D ValueType;
2196 static const CommandId kCmdId = kCopyTexSubImage3D;
2197 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2198 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2200 static uint32_t ComputeSize() {
2201 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2204 void SetHeader() { header.SetCmd<ValueType>(); }
2206 void Init(GLenum _target,
2207 GLint _level,
2208 GLint _xoffset,
2209 GLint _yoffset,
2210 GLint _zoffset,
2211 GLint _x,
2212 GLint _y,
2213 GLsizei _width,
2214 GLsizei _height) {
2215 SetHeader();
2216 target = _target;
2217 level = _level;
2218 xoffset = _xoffset;
2219 yoffset = _yoffset;
2220 zoffset = _zoffset;
2221 x = _x;
2222 y = _y;
2223 width = _width;
2224 height = _height;
2227 void* Set(void* cmd,
2228 GLenum _target,
2229 GLint _level,
2230 GLint _xoffset,
2231 GLint _yoffset,
2232 GLint _zoffset,
2233 GLint _x,
2234 GLint _y,
2235 GLsizei _width,
2236 GLsizei _height) {
2237 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
2238 _zoffset, _x, _y, _width, _height);
2239 return NextCmdAddress<ValueType>(cmd);
2242 gpu::CommandHeader header;
2243 uint32_t target;
2244 int32_t level;
2245 int32_t xoffset;
2246 int32_t yoffset;
2247 int32_t zoffset;
2248 int32_t x;
2249 int32_t y;
2250 int32_t width;
2251 int32_t height;
2254 static_assert(sizeof(CopyTexSubImage3D) == 40,
2255 "size of CopyTexSubImage3D should be 40");
2256 static_assert(offsetof(CopyTexSubImage3D, header) == 0,
2257 "offset of CopyTexSubImage3D header should be 0");
2258 static_assert(offsetof(CopyTexSubImage3D, target) == 4,
2259 "offset of CopyTexSubImage3D target should be 4");
2260 static_assert(offsetof(CopyTexSubImage3D, level) == 8,
2261 "offset of CopyTexSubImage3D level should be 8");
2262 static_assert(offsetof(CopyTexSubImage3D, xoffset) == 12,
2263 "offset of CopyTexSubImage3D xoffset should be 12");
2264 static_assert(offsetof(CopyTexSubImage3D, yoffset) == 16,
2265 "offset of CopyTexSubImage3D yoffset should be 16");
2266 static_assert(offsetof(CopyTexSubImage3D, zoffset) == 20,
2267 "offset of CopyTexSubImage3D zoffset should be 20");
2268 static_assert(offsetof(CopyTexSubImage3D, x) == 24,
2269 "offset of CopyTexSubImage3D x should be 24");
2270 static_assert(offsetof(CopyTexSubImage3D, y) == 28,
2271 "offset of CopyTexSubImage3D y should be 28");
2272 static_assert(offsetof(CopyTexSubImage3D, width) == 32,
2273 "offset of CopyTexSubImage3D width should be 32");
2274 static_assert(offsetof(CopyTexSubImage3D, height) == 36,
2275 "offset of CopyTexSubImage3D height should be 36");
2277 struct CreateProgram {
2278 typedef CreateProgram ValueType;
2279 static const CommandId kCmdId = kCreateProgram;
2280 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2281 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2283 static uint32_t ComputeSize() {
2284 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2287 void SetHeader() { header.SetCmd<ValueType>(); }
2289 void Init(uint32_t _client_id) {
2290 SetHeader();
2291 client_id = _client_id;
2294 void* Set(void* cmd, uint32_t _client_id) {
2295 static_cast<ValueType*>(cmd)->Init(_client_id);
2296 return NextCmdAddress<ValueType>(cmd);
2299 gpu::CommandHeader header;
2300 uint32_t client_id;
2303 static_assert(sizeof(CreateProgram) == 8, "size of CreateProgram should be 8");
2304 static_assert(offsetof(CreateProgram, header) == 0,
2305 "offset of CreateProgram header should be 0");
2306 static_assert(offsetof(CreateProgram, client_id) == 4,
2307 "offset of CreateProgram client_id should be 4");
2309 struct CreateShader {
2310 typedef CreateShader ValueType;
2311 static const CommandId kCmdId = kCreateShader;
2312 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2313 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2315 static uint32_t ComputeSize() {
2316 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2319 void SetHeader() { header.SetCmd<ValueType>(); }
2321 void Init(GLenum _type, uint32_t _client_id) {
2322 SetHeader();
2323 type = _type;
2324 client_id = _client_id;
2327 void* Set(void* cmd, GLenum _type, uint32_t _client_id) {
2328 static_cast<ValueType*>(cmd)->Init(_type, _client_id);
2329 return NextCmdAddress<ValueType>(cmd);
2332 gpu::CommandHeader header;
2333 uint32_t type;
2334 uint32_t client_id;
2337 static_assert(sizeof(CreateShader) == 12, "size of CreateShader should be 12");
2338 static_assert(offsetof(CreateShader, header) == 0,
2339 "offset of CreateShader header should be 0");
2340 static_assert(offsetof(CreateShader, type) == 4,
2341 "offset of CreateShader type should be 4");
2342 static_assert(offsetof(CreateShader, client_id) == 8,
2343 "offset of CreateShader client_id should be 8");
2345 struct CullFace {
2346 typedef CullFace ValueType;
2347 static const CommandId kCmdId = kCullFace;
2348 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2349 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2351 static uint32_t ComputeSize() {
2352 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2355 void SetHeader() { header.SetCmd<ValueType>(); }
2357 void Init(GLenum _mode) {
2358 SetHeader();
2359 mode = _mode;
2362 void* Set(void* cmd, GLenum _mode) {
2363 static_cast<ValueType*>(cmd)->Init(_mode);
2364 return NextCmdAddress<ValueType>(cmd);
2367 gpu::CommandHeader header;
2368 uint32_t mode;
2371 static_assert(sizeof(CullFace) == 8, "size of CullFace should be 8");
2372 static_assert(offsetof(CullFace, header) == 0,
2373 "offset of CullFace header should be 0");
2374 static_assert(offsetof(CullFace, mode) == 4,
2375 "offset of CullFace mode should be 4");
2377 struct DeleteBuffersImmediate {
2378 typedef DeleteBuffersImmediate ValueType;
2379 static const CommandId kCmdId = kDeleteBuffersImmediate;
2380 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2381 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2383 static uint32_t ComputeDataSize(GLsizei n) {
2384 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2387 static uint32_t ComputeSize(GLsizei n) {
2388 return static_cast<uint32_t>(sizeof(ValueType) +
2389 ComputeDataSize(n)); // NOLINT
2392 void SetHeader(GLsizei n) {
2393 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2396 void Init(GLsizei _n, const GLuint* _buffers) {
2397 SetHeader(_n);
2398 n = _n;
2399 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
2402 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
2403 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
2404 const uint32_t size = ComputeSize(_n);
2405 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2408 gpu::CommandHeader header;
2409 int32_t n;
2412 static_assert(sizeof(DeleteBuffersImmediate) == 8,
2413 "size of DeleteBuffersImmediate should be 8");
2414 static_assert(offsetof(DeleteBuffersImmediate, header) == 0,
2415 "offset of DeleteBuffersImmediate header should be 0");
2416 static_assert(offsetof(DeleteBuffersImmediate, n) == 4,
2417 "offset of DeleteBuffersImmediate n should be 4");
2419 struct DeleteFramebuffersImmediate {
2420 typedef DeleteFramebuffersImmediate ValueType;
2421 static const CommandId kCmdId = kDeleteFramebuffersImmediate;
2422 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2423 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2425 static uint32_t ComputeDataSize(GLsizei n) {
2426 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2429 static uint32_t ComputeSize(GLsizei n) {
2430 return static_cast<uint32_t>(sizeof(ValueType) +
2431 ComputeDataSize(n)); // NOLINT
2434 void SetHeader(GLsizei n) {
2435 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2438 void Init(GLsizei _n, const GLuint* _framebuffers) {
2439 SetHeader(_n);
2440 n = _n;
2441 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
2444 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
2445 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
2446 const uint32_t size = ComputeSize(_n);
2447 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2450 gpu::CommandHeader header;
2451 int32_t n;
2454 static_assert(sizeof(DeleteFramebuffersImmediate) == 8,
2455 "size of DeleteFramebuffersImmediate should be 8");
2456 static_assert(offsetof(DeleteFramebuffersImmediate, header) == 0,
2457 "offset of DeleteFramebuffersImmediate header should be 0");
2458 static_assert(offsetof(DeleteFramebuffersImmediate, n) == 4,
2459 "offset of DeleteFramebuffersImmediate n should be 4");
2461 struct DeleteProgram {
2462 typedef DeleteProgram ValueType;
2463 static const CommandId kCmdId = kDeleteProgram;
2464 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2465 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2467 static uint32_t ComputeSize() {
2468 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2471 void SetHeader() { header.SetCmd<ValueType>(); }
2473 void Init(GLuint _program) {
2474 SetHeader();
2475 program = _program;
2478 void* Set(void* cmd, GLuint _program) {
2479 static_cast<ValueType*>(cmd)->Init(_program);
2480 return NextCmdAddress<ValueType>(cmd);
2483 gpu::CommandHeader header;
2484 uint32_t program;
2487 static_assert(sizeof(DeleteProgram) == 8, "size of DeleteProgram should be 8");
2488 static_assert(offsetof(DeleteProgram, header) == 0,
2489 "offset of DeleteProgram header should be 0");
2490 static_assert(offsetof(DeleteProgram, program) == 4,
2491 "offset of DeleteProgram program should be 4");
2493 struct DeleteRenderbuffersImmediate {
2494 typedef DeleteRenderbuffersImmediate ValueType;
2495 static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
2496 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2497 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2499 static uint32_t ComputeDataSize(GLsizei n) {
2500 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2503 static uint32_t ComputeSize(GLsizei n) {
2504 return static_cast<uint32_t>(sizeof(ValueType) +
2505 ComputeDataSize(n)); // NOLINT
2508 void SetHeader(GLsizei n) {
2509 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2512 void Init(GLsizei _n, const GLuint* _renderbuffers) {
2513 SetHeader(_n);
2514 n = _n;
2515 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
2518 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
2519 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
2520 const uint32_t size = ComputeSize(_n);
2521 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2524 gpu::CommandHeader header;
2525 int32_t n;
2528 static_assert(sizeof(DeleteRenderbuffersImmediate) == 8,
2529 "size of DeleteRenderbuffersImmediate should be 8");
2530 static_assert(offsetof(DeleteRenderbuffersImmediate, header) == 0,
2531 "offset of DeleteRenderbuffersImmediate header should be 0");
2532 static_assert(offsetof(DeleteRenderbuffersImmediate, n) == 4,
2533 "offset of DeleteRenderbuffersImmediate n should be 4");
2535 struct DeleteSamplersImmediate {
2536 typedef DeleteSamplersImmediate ValueType;
2537 static const CommandId kCmdId = kDeleteSamplersImmediate;
2538 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2539 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2541 static uint32_t ComputeDataSize(GLsizei n) {
2542 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2545 static uint32_t ComputeSize(GLsizei n) {
2546 return static_cast<uint32_t>(sizeof(ValueType) +
2547 ComputeDataSize(n)); // NOLINT
2550 void SetHeader(GLsizei n) {
2551 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2554 void Init(GLsizei _n, const GLuint* _samplers) {
2555 SetHeader(_n);
2556 n = _n;
2557 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n));
2560 void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) {
2561 static_cast<ValueType*>(cmd)->Init(_n, _samplers);
2562 const uint32_t size = ComputeSize(_n);
2563 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2566 gpu::CommandHeader header;
2567 int32_t n;
2570 static_assert(sizeof(DeleteSamplersImmediate) == 8,
2571 "size of DeleteSamplersImmediate should be 8");
2572 static_assert(offsetof(DeleteSamplersImmediate, header) == 0,
2573 "offset of DeleteSamplersImmediate header should be 0");
2574 static_assert(offsetof(DeleteSamplersImmediate, n) == 4,
2575 "offset of DeleteSamplersImmediate n should be 4");
2577 struct DeleteSync {
2578 typedef DeleteSync ValueType;
2579 static const CommandId kCmdId = kDeleteSync;
2580 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2581 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2583 static uint32_t ComputeSize() {
2584 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2587 void SetHeader() { header.SetCmd<ValueType>(); }
2589 void Init(GLuint _sync) {
2590 SetHeader();
2591 sync = _sync;
2594 void* Set(void* cmd, GLuint _sync) {
2595 static_cast<ValueType*>(cmd)->Init(_sync);
2596 return NextCmdAddress<ValueType>(cmd);
2599 gpu::CommandHeader header;
2600 uint32_t sync;
2603 static_assert(sizeof(DeleteSync) == 8, "size of DeleteSync should be 8");
2604 static_assert(offsetof(DeleteSync, header) == 0,
2605 "offset of DeleteSync header should be 0");
2606 static_assert(offsetof(DeleteSync, sync) == 4,
2607 "offset of DeleteSync sync should be 4");
2609 struct DeleteShader {
2610 typedef DeleteShader ValueType;
2611 static const CommandId kCmdId = kDeleteShader;
2612 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2613 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2615 static uint32_t ComputeSize() {
2616 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2619 void SetHeader() { header.SetCmd<ValueType>(); }
2621 void Init(GLuint _shader) {
2622 SetHeader();
2623 shader = _shader;
2626 void* Set(void* cmd, GLuint _shader) {
2627 static_cast<ValueType*>(cmd)->Init(_shader);
2628 return NextCmdAddress<ValueType>(cmd);
2631 gpu::CommandHeader header;
2632 uint32_t shader;
2635 static_assert(sizeof(DeleteShader) == 8, "size of DeleteShader should be 8");
2636 static_assert(offsetof(DeleteShader, header) == 0,
2637 "offset of DeleteShader header should be 0");
2638 static_assert(offsetof(DeleteShader, shader) == 4,
2639 "offset of DeleteShader shader should be 4");
2641 struct DeleteTexturesImmediate {
2642 typedef DeleteTexturesImmediate ValueType;
2643 static const CommandId kCmdId = kDeleteTexturesImmediate;
2644 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2645 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2647 static uint32_t ComputeDataSize(GLsizei n) {
2648 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2651 static uint32_t ComputeSize(GLsizei n) {
2652 return static_cast<uint32_t>(sizeof(ValueType) +
2653 ComputeDataSize(n)); // NOLINT
2656 void SetHeader(GLsizei n) {
2657 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2660 void Init(GLsizei _n, const GLuint* _textures) {
2661 SetHeader(_n);
2662 n = _n;
2663 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
2666 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
2667 static_cast<ValueType*>(cmd)->Init(_n, _textures);
2668 const uint32_t size = ComputeSize(_n);
2669 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2672 gpu::CommandHeader header;
2673 int32_t n;
2676 static_assert(sizeof(DeleteTexturesImmediate) == 8,
2677 "size of DeleteTexturesImmediate should be 8");
2678 static_assert(offsetof(DeleteTexturesImmediate, header) == 0,
2679 "offset of DeleteTexturesImmediate header should be 0");
2680 static_assert(offsetof(DeleteTexturesImmediate, n) == 4,
2681 "offset of DeleteTexturesImmediate n should be 4");
2683 struct DeleteTransformFeedbacksImmediate {
2684 typedef DeleteTransformFeedbacksImmediate ValueType;
2685 static const CommandId kCmdId = kDeleteTransformFeedbacksImmediate;
2686 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2687 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2689 static uint32_t ComputeDataSize(GLsizei n) {
2690 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2693 static uint32_t ComputeSize(GLsizei n) {
2694 return static_cast<uint32_t>(sizeof(ValueType) +
2695 ComputeDataSize(n)); // NOLINT
2698 void SetHeader(GLsizei n) {
2699 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2702 void Init(GLsizei _n, const GLuint* _ids) {
2703 SetHeader(_n);
2704 n = _n;
2705 memcpy(ImmediateDataAddress(this), _ids, ComputeDataSize(_n));
2708 void* Set(void* cmd, GLsizei _n, const GLuint* _ids) {
2709 static_cast<ValueType*>(cmd)->Init(_n, _ids);
2710 const uint32_t size = ComputeSize(_n);
2711 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2714 gpu::CommandHeader header;
2715 int32_t n;
2718 static_assert(sizeof(DeleteTransformFeedbacksImmediate) == 8,
2719 "size of DeleteTransformFeedbacksImmediate should be 8");
2720 static_assert(offsetof(DeleteTransformFeedbacksImmediate, header) == 0,
2721 "offset of DeleteTransformFeedbacksImmediate header should be 0");
2722 static_assert(offsetof(DeleteTransformFeedbacksImmediate, n) == 4,
2723 "offset of DeleteTransformFeedbacksImmediate n should be 4");
2725 struct DepthFunc {
2726 typedef DepthFunc ValueType;
2727 static const CommandId kCmdId = kDepthFunc;
2728 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2729 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2731 static uint32_t ComputeSize() {
2732 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2735 void SetHeader() { header.SetCmd<ValueType>(); }
2737 void Init(GLenum _func) {
2738 SetHeader();
2739 func = _func;
2742 void* Set(void* cmd, GLenum _func) {
2743 static_cast<ValueType*>(cmd)->Init(_func);
2744 return NextCmdAddress<ValueType>(cmd);
2747 gpu::CommandHeader header;
2748 uint32_t func;
2751 static_assert(sizeof(DepthFunc) == 8, "size of DepthFunc should be 8");
2752 static_assert(offsetof(DepthFunc, header) == 0,
2753 "offset of DepthFunc header should be 0");
2754 static_assert(offsetof(DepthFunc, func) == 4,
2755 "offset of DepthFunc func should be 4");
2757 struct DepthMask {
2758 typedef DepthMask ValueType;
2759 static const CommandId kCmdId = kDepthMask;
2760 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2761 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2763 static uint32_t ComputeSize() {
2764 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2767 void SetHeader() { header.SetCmd<ValueType>(); }
2769 void Init(GLboolean _flag) {
2770 SetHeader();
2771 flag = _flag;
2774 void* Set(void* cmd, GLboolean _flag) {
2775 static_cast<ValueType*>(cmd)->Init(_flag);
2776 return NextCmdAddress<ValueType>(cmd);
2779 gpu::CommandHeader header;
2780 uint32_t flag;
2783 static_assert(sizeof(DepthMask) == 8, "size of DepthMask should be 8");
2784 static_assert(offsetof(DepthMask, header) == 0,
2785 "offset of DepthMask header should be 0");
2786 static_assert(offsetof(DepthMask, flag) == 4,
2787 "offset of DepthMask flag should be 4");
2789 struct DepthRangef {
2790 typedef DepthRangef ValueType;
2791 static const CommandId kCmdId = kDepthRangef;
2792 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2793 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2795 static uint32_t ComputeSize() {
2796 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2799 void SetHeader() { header.SetCmd<ValueType>(); }
2801 void Init(GLclampf _zNear, GLclampf _zFar) {
2802 SetHeader();
2803 zNear = _zNear;
2804 zFar = _zFar;
2807 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
2808 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
2809 return NextCmdAddress<ValueType>(cmd);
2812 gpu::CommandHeader header;
2813 float zNear;
2814 float zFar;
2817 static_assert(sizeof(DepthRangef) == 12, "size of DepthRangef should be 12");
2818 static_assert(offsetof(DepthRangef, header) == 0,
2819 "offset of DepthRangef header should be 0");
2820 static_assert(offsetof(DepthRangef, zNear) == 4,
2821 "offset of DepthRangef zNear should be 4");
2822 static_assert(offsetof(DepthRangef, zFar) == 8,
2823 "offset of DepthRangef zFar should be 8");
2825 struct DetachShader {
2826 typedef DetachShader ValueType;
2827 static const CommandId kCmdId = kDetachShader;
2828 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2829 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2831 static uint32_t ComputeSize() {
2832 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2835 void SetHeader() { header.SetCmd<ValueType>(); }
2837 void Init(GLuint _program, GLuint _shader) {
2838 SetHeader();
2839 program = _program;
2840 shader = _shader;
2843 void* Set(void* cmd, GLuint _program, GLuint _shader) {
2844 static_cast<ValueType*>(cmd)->Init(_program, _shader);
2845 return NextCmdAddress<ValueType>(cmd);
2848 gpu::CommandHeader header;
2849 uint32_t program;
2850 uint32_t shader;
2853 static_assert(sizeof(DetachShader) == 12, "size of DetachShader should be 12");
2854 static_assert(offsetof(DetachShader, header) == 0,
2855 "offset of DetachShader header should be 0");
2856 static_assert(offsetof(DetachShader, program) == 4,
2857 "offset of DetachShader program should be 4");
2858 static_assert(offsetof(DetachShader, shader) == 8,
2859 "offset of DetachShader shader should be 8");
2861 struct Disable {
2862 typedef Disable ValueType;
2863 static const CommandId kCmdId = kDisable;
2864 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2865 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2867 static uint32_t ComputeSize() {
2868 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2871 void SetHeader() { header.SetCmd<ValueType>(); }
2873 void Init(GLenum _cap) {
2874 SetHeader();
2875 cap = _cap;
2878 void* Set(void* cmd, GLenum _cap) {
2879 static_cast<ValueType*>(cmd)->Init(_cap);
2880 return NextCmdAddress<ValueType>(cmd);
2883 gpu::CommandHeader header;
2884 uint32_t cap;
2887 static_assert(sizeof(Disable) == 8, "size of Disable should be 8");
2888 static_assert(offsetof(Disable, header) == 0,
2889 "offset of Disable header should be 0");
2890 static_assert(offsetof(Disable, cap) == 4, "offset of Disable cap should be 4");
2892 struct DisableVertexAttribArray {
2893 typedef DisableVertexAttribArray ValueType;
2894 static const CommandId kCmdId = kDisableVertexAttribArray;
2895 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2896 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2898 static uint32_t ComputeSize() {
2899 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2902 void SetHeader() { header.SetCmd<ValueType>(); }
2904 void Init(GLuint _index) {
2905 SetHeader();
2906 index = _index;
2909 void* Set(void* cmd, GLuint _index) {
2910 static_cast<ValueType*>(cmd)->Init(_index);
2911 return NextCmdAddress<ValueType>(cmd);
2914 gpu::CommandHeader header;
2915 uint32_t index;
2918 static_assert(sizeof(DisableVertexAttribArray) == 8,
2919 "size of DisableVertexAttribArray should be 8");
2920 static_assert(offsetof(DisableVertexAttribArray, header) == 0,
2921 "offset of DisableVertexAttribArray header should be 0");
2922 static_assert(offsetof(DisableVertexAttribArray, index) == 4,
2923 "offset of DisableVertexAttribArray index should be 4");
2925 struct DrawArrays {
2926 typedef DrawArrays ValueType;
2927 static const CommandId kCmdId = kDrawArrays;
2928 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2929 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2931 static uint32_t ComputeSize() {
2932 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2935 void SetHeader() { header.SetCmd<ValueType>(); }
2937 void Init(GLenum _mode, GLint _first, GLsizei _count) {
2938 SetHeader();
2939 mode = _mode;
2940 first = _first;
2941 count = _count;
2944 void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
2945 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
2946 return NextCmdAddress<ValueType>(cmd);
2949 gpu::CommandHeader header;
2950 uint32_t mode;
2951 int32_t first;
2952 int32_t count;
2955 static_assert(sizeof(DrawArrays) == 16, "size of DrawArrays should be 16");
2956 static_assert(offsetof(DrawArrays, header) == 0,
2957 "offset of DrawArrays header should be 0");
2958 static_assert(offsetof(DrawArrays, mode) == 4,
2959 "offset of DrawArrays mode should be 4");
2960 static_assert(offsetof(DrawArrays, first) == 8,
2961 "offset of DrawArrays first should be 8");
2962 static_assert(offsetof(DrawArrays, count) == 12,
2963 "offset of DrawArrays count should be 12");
2965 struct DrawElements {
2966 typedef DrawElements ValueType;
2967 static const CommandId kCmdId = kDrawElements;
2968 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2969 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2971 static uint32_t ComputeSize() {
2972 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2975 void SetHeader() { header.SetCmd<ValueType>(); }
2977 void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
2978 SetHeader();
2979 mode = _mode;
2980 count = _count;
2981 type = _type;
2982 index_offset = _index_offset;
2985 void* Set(void* cmd,
2986 GLenum _mode,
2987 GLsizei _count,
2988 GLenum _type,
2989 GLuint _index_offset) {
2990 static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
2991 return NextCmdAddress<ValueType>(cmd);
2994 gpu::CommandHeader header;
2995 uint32_t mode;
2996 int32_t count;
2997 uint32_t type;
2998 uint32_t index_offset;
3001 static_assert(sizeof(DrawElements) == 20, "size of DrawElements should be 20");
3002 static_assert(offsetof(DrawElements, header) == 0,
3003 "offset of DrawElements header should be 0");
3004 static_assert(offsetof(DrawElements, mode) == 4,
3005 "offset of DrawElements mode should be 4");
3006 static_assert(offsetof(DrawElements, count) == 8,
3007 "offset of DrawElements count should be 8");
3008 static_assert(offsetof(DrawElements, type) == 12,
3009 "offset of DrawElements type should be 12");
3010 static_assert(offsetof(DrawElements, index_offset) == 16,
3011 "offset of DrawElements index_offset should be 16");
3013 struct Enable {
3014 typedef Enable ValueType;
3015 static const CommandId kCmdId = kEnable;
3016 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3017 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3019 static uint32_t ComputeSize() {
3020 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3023 void SetHeader() { header.SetCmd<ValueType>(); }
3025 void Init(GLenum _cap) {
3026 SetHeader();
3027 cap = _cap;
3030 void* Set(void* cmd, GLenum _cap) {
3031 static_cast<ValueType*>(cmd)->Init(_cap);
3032 return NextCmdAddress<ValueType>(cmd);
3035 gpu::CommandHeader header;
3036 uint32_t cap;
3039 static_assert(sizeof(Enable) == 8, "size of Enable should be 8");
3040 static_assert(offsetof(Enable, header) == 0,
3041 "offset of Enable header should be 0");
3042 static_assert(offsetof(Enable, cap) == 4, "offset of Enable cap should be 4");
3044 struct EnableVertexAttribArray {
3045 typedef EnableVertexAttribArray ValueType;
3046 static const CommandId kCmdId = kEnableVertexAttribArray;
3047 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3048 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3050 static uint32_t ComputeSize() {
3051 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3054 void SetHeader() { header.SetCmd<ValueType>(); }
3056 void Init(GLuint _index) {
3057 SetHeader();
3058 index = _index;
3061 void* Set(void* cmd, GLuint _index) {
3062 static_cast<ValueType*>(cmd)->Init(_index);
3063 return NextCmdAddress<ValueType>(cmd);
3066 gpu::CommandHeader header;
3067 uint32_t index;
3070 static_assert(sizeof(EnableVertexAttribArray) == 8,
3071 "size of EnableVertexAttribArray should be 8");
3072 static_assert(offsetof(EnableVertexAttribArray, header) == 0,
3073 "offset of EnableVertexAttribArray header should be 0");
3074 static_assert(offsetof(EnableVertexAttribArray, index) == 4,
3075 "offset of EnableVertexAttribArray index should be 4");
3077 struct FenceSync {
3078 typedef FenceSync ValueType;
3079 static const CommandId kCmdId = kFenceSync;
3080 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3081 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3083 static uint32_t ComputeSize() {
3084 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3087 void SetHeader() { header.SetCmd<ValueType>(); }
3089 void Init(uint32_t _client_id) {
3090 SetHeader();
3091 client_id = _client_id;
3094 void* Set(void* cmd, uint32_t _client_id) {
3095 static_cast<ValueType*>(cmd)->Init(_client_id);
3096 return NextCmdAddress<ValueType>(cmd);
3099 gpu::CommandHeader header;
3100 uint32_t client_id;
3101 static const uint32_t condition = GL_SYNC_GPU_COMMANDS_COMPLETE;
3102 static const uint32_t flags = 0;
3105 static_assert(sizeof(FenceSync) == 8, "size of FenceSync should be 8");
3106 static_assert(offsetof(FenceSync, header) == 0,
3107 "offset of FenceSync header should be 0");
3108 static_assert(offsetof(FenceSync, client_id) == 4,
3109 "offset of FenceSync client_id should be 4");
3111 struct Finish {
3112 typedef Finish ValueType;
3113 static const CommandId kCmdId = kFinish;
3114 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3115 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3117 static uint32_t ComputeSize() {
3118 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3121 void SetHeader() { header.SetCmd<ValueType>(); }
3123 void Init() { SetHeader(); }
3125 void* Set(void* cmd) {
3126 static_cast<ValueType*>(cmd)->Init();
3127 return NextCmdAddress<ValueType>(cmd);
3130 gpu::CommandHeader header;
3133 static_assert(sizeof(Finish) == 4, "size of Finish should be 4");
3134 static_assert(offsetof(Finish, header) == 0,
3135 "offset of Finish header should be 0");
3137 struct Flush {
3138 typedef Flush ValueType;
3139 static const CommandId kCmdId = kFlush;
3140 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3141 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3143 static uint32_t ComputeSize() {
3144 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3147 void SetHeader() { header.SetCmd<ValueType>(); }
3149 void Init() { SetHeader(); }
3151 void* Set(void* cmd) {
3152 static_cast<ValueType*>(cmd)->Init();
3153 return NextCmdAddress<ValueType>(cmd);
3156 gpu::CommandHeader header;
3159 static_assert(sizeof(Flush) == 4, "size of Flush should be 4");
3160 static_assert(offsetof(Flush, header) == 0,
3161 "offset of Flush header should be 0");
3163 struct FramebufferRenderbuffer {
3164 typedef FramebufferRenderbuffer ValueType;
3165 static const CommandId kCmdId = kFramebufferRenderbuffer;
3166 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3167 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3169 static uint32_t ComputeSize() {
3170 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3173 void SetHeader() { header.SetCmd<ValueType>(); }
3175 void Init(GLenum _target,
3176 GLenum _attachment,
3177 GLenum _renderbuffertarget,
3178 GLuint _renderbuffer) {
3179 SetHeader();
3180 target = _target;
3181 attachment = _attachment;
3182 renderbuffertarget = _renderbuffertarget;
3183 renderbuffer = _renderbuffer;
3186 void* Set(void* cmd,
3187 GLenum _target,
3188 GLenum _attachment,
3189 GLenum _renderbuffertarget,
3190 GLuint _renderbuffer) {
3191 static_cast<ValueType*>(cmd)
3192 ->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
3193 return NextCmdAddress<ValueType>(cmd);
3196 gpu::CommandHeader header;
3197 uint32_t target;
3198 uint32_t attachment;
3199 uint32_t renderbuffertarget;
3200 uint32_t renderbuffer;
3203 static_assert(sizeof(FramebufferRenderbuffer) == 20,
3204 "size of FramebufferRenderbuffer should be 20");
3205 static_assert(offsetof(FramebufferRenderbuffer, header) == 0,
3206 "offset of FramebufferRenderbuffer header should be 0");
3207 static_assert(offsetof(FramebufferRenderbuffer, target) == 4,
3208 "offset of FramebufferRenderbuffer target should be 4");
3209 static_assert(offsetof(FramebufferRenderbuffer, attachment) == 8,
3210 "offset of FramebufferRenderbuffer attachment should be 8");
3211 static_assert(
3212 offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
3213 "offset of FramebufferRenderbuffer renderbuffertarget should be 12");
3214 static_assert(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
3215 "offset of FramebufferRenderbuffer renderbuffer should be 16");
3217 struct FramebufferTexture2D {
3218 typedef FramebufferTexture2D ValueType;
3219 static const CommandId kCmdId = kFramebufferTexture2D;
3220 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3221 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3223 static uint32_t ComputeSize() {
3224 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3227 void SetHeader() { header.SetCmd<ValueType>(); }
3229 void Init(GLenum _target,
3230 GLenum _attachment,
3231 GLenum _textarget,
3232 GLuint _texture) {
3233 SetHeader();
3234 target = _target;
3235 attachment = _attachment;
3236 textarget = _textarget;
3237 texture = _texture;
3240 void* Set(void* cmd,
3241 GLenum _target,
3242 GLenum _attachment,
3243 GLenum _textarget,
3244 GLuint _texture) {
3245 static_cast<ValueType*>(cmd)
3246 ->Init(_target, _attachment, _textarget, _texture);
3247 return NextCmdAddress<ValueType>(cmd);
3250 gpu::CommandHeader header;
3251 uint32_t target;
3252 uint32_t attachment;
3253 uint32_t textarget;
3254 uint32_t texture;
3255 static const int32_t level = 0;
3258 static_assert(sizeof(FramebufferTexture2D) == 20,
3259 "size of FramebufferTexture2D should be 20");
3260 static_assert(offsetof(FramebufferTexture2D, header) == 0,
3261 "offset of FramebufferTexture2D header should be 0");
3262 static_assert(offsetof(FramebufferTexture2D, target) == 4,
3263 "offset of FramebufferTexture2D target should be 4");
3264 static_assert(offsetof(FramebufferTexture2D, attachment) == 8,
3265 "offset of FramebufferTexture2D attachment should be 8");
3266 static_assert(offsetof(FramebufferTexture2D, textarget) == 12,
3267 "offset of FramebufferTexture2D textarget should be 12");
3268 static_assert(offsetof(FramebufferTexture2D, texture) == 16,
3269 "offset of FramebufferTexture2D texture should be 16");
3271 struct FramebufferTextureLayer {
3272 typedef FramebufferTextureLayer ValueType;
3273 static const CommandId kCmdId = kFramebufferTextureLayer;
3274 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3277 static uint32_t ComputeSize() {
3278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3281 void SetHeader() { header.SetCmd<ValueType>(); }
3283 void Init(GLenum _target,
3284 GLenum _attachment,
3285 GLuint _texture,
3286 GLint _level,
3287 GLint _layer) {
3288 SetHeader();
3289 target = _target;
3290 attachment = _attachment;
3291 texture = _texture;
3292 level = _level;
3293 layer = _layer;
3296 void* Set(void* cmd,
3297 GLenum _target,
3298 GLenum _attachment,
3299 GLuint _texture,
3300 GLint _level,
3301 GLint _layer) {
3302 static_cast<ValueType*>(cmd)
3303 ->Init(_target, _attachment, _texture, _level, _layer);
3304 return NextCmdAddress<ValueType>(cmd);
3307 gpu::CommandHeader header;
3308 uint32_t target;
3309 uint32_t attachment;
3310 uint32_t texture;
3311 int32_t level;
3312 int32_t layer;
3315 static_assert(sizeof(FramebufferTextureLayer) == 24,
3316 "size of FramebufferTextureLayer should be 24");
3317 static_assert(offsetof(FramebufferTextureLayer, header) == 0,
3318 "offset of FramebufferTextureLayer header should be 0");
3319 static_assert(offsetof(FramebufferTextureLayer, target) == 4,
3320 "offset of FramebufferTextureLayer target should be 4");
3321 static_assert(offsetof(FramebufferTextureLayer, attachment) == 8,
3322 "offset of FramebufferTextureLayer attachment should be 8");
3323 static_assert(offsetof(FramebufferTextureLayer, texture) == 12,
3324 "offset of FramebufferTextureLayer texture should be 12");
3325 static_assert(offsetof(FramebufferTextureLayer, level) == 16,
3326 "offset of FramebufferTextureLayer level should be 16");
3327 static_assert(offsetof(FramebufferTextureLayer, layer) == 20,
3328 "offset of FramebufferTextureLayer layer should be 20");
3330 struct FrontFace {
3331 typedef FrontFace ValueType;
3332 static const CommandId kCmdId = kFrontFace;
3333 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3334 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3336 static uint32_t ComputeSize() {
3337 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3340 void SetHeader() { header.SetCmd<ValueType>(); }
3342 void Init(GLenum _mode) {
3343 SetHeader();
3344 mode = _mode;
3347 void* Set(void* cmd, GLenum _mode) {
3348 static_cast<ValueType*>(cmd)->Init(_mode);
3349 return NextCmdAddress<ValueType>(cmd);
3352 gpu::CommandHeader header;
3353 uint32_t mode;
3356 static_assert(sizeof(FrontFace) == 8, "size of FrontFace should be 8");
3357 static_assert(offsetof(FrontFace, header) == 0,
3358 "offset of FrontFace header should be 0");
3359 static_assert(offsetof(FrontFace, mode) == 4,
3360 "offset of FrontFace mode should be 4");
3362 struct GenBuffersImmediate {
3363 typedef GenBuffersImmediate ValueType;
3364 static const CommandId kCmdId = kGenBuffersImmediate;
3365 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3366 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3368 static uint32_t ComputeDataSize(GLsizei n) {
3369 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3372 static uint32_t ComputeSize(GLsizei n) {
3373 return static_cast<uint32_t>(sizeof(ValueType) +
3374 ComputeDataSize(n)); // NOLINT
3377 void SetHeader(GLsizei n) {
3378 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3381 void Init(GLsizei _n, GLuint* _buffers) {
3382 SetHeader(_n);
3383 n = _n;
3384 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
3387 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
3388 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
3389 const uint32_t size = ComputeSize(_n);
3390 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3393 gpu::CommandHeader header;
3394 int32_t n;
3397 static_assert(sizeof(GenBuffersImmediate) == 8,
3398 "size of GenBuffersImmediate should be 8");
3399 static_assert(offsetof(GenBuffersImmediate, header) == 0,
3400 "offset of GenBuffersImmediate header should be 0");
3401 static_assert(offsetof(GenBuffersImmediate, n) == 4,
3402 "offset of GenBuffersImmediate n should be 4");
3404 struct GenerateMipmap {
3405 typedef GenerateMipmap ValueType;
3406 static const CommandId kCmdId = kGenerateMipmap;
3407 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3408 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
3410 static uint32_t ComputeSize() {
3411 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3414 void SetHeader() { header.SetCmd<ValueType>(); }
3416 void Init(GLenum _target) {
3417 SetHeader();
3418 target = _target;
3421 void* Set(void* cmd, GLenum _target) {
3422 static_cast<ValueType*>(cmd)->Init(_target);
3423 return NextCmdAddress<ValueType>(cmd);
3426 gpu::CommandHeader header;
3427 uint32_t target;
3430 static_assert(sizeof(GenerateMipmap) == 8,
3431 "size of GenerateMipmap should be 8");
3432 static_assert(offsetof(GenerateMipmap, header) == 0,
3433 "offset of GenerateMipmap header should be 0");
3434 static_assert(offsetof(GenerateMipmap, target) == 4,
3435 "offset of GenerateMipmap target should be 4");
3437 struct GenFramebuffersImmediate {
3438 typedef GenFramebuffersImmediate ValueType;
3439 static const CommandId kCmdId = kGenFramebuffersImmediate;
3440 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3441 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3443 static uint32_t ComputeDataSize(GLsizei n) {
3444 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3447 static uint32_t ComputeSize(GLsizei n) {
3448 return static_cast<uint32_t>(sizeof(ValueType) +
3449 ComputeDataSize(n)); // NOLINT
3452 void SetHeader(GLsizei n) {
3453 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3456 void Init(GLsizei _n, GLuint* _framebuffers) {
3457 SetHeader(_n);
3458 n = _n;
3459 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
3462 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
3463 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
3464 const uint32_t size = ComputeSize(_n);
3465 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3468 gpu::CommandHeader header;
3469 int32_t n;
3472 static_assert(sizeof(GenFramebuffersImmediate) == 8,
3473 "size of GenFramebuffersImmediate should be 8");
3474 static_assert(offsetof(GenFramebuffersImmediate, header) == 0,
3475 "offset of GenFramebuffersImmediate header should be 0");
3476 static_assert(offsetof(GenFramebuffersImmediate, n) == 4,
3477 "offset of GenFramebuffersImmediate n should be 4");
3479 struct GenRenderbuffersImmediate {
3480 typedef GenRenderbuffersImmediate ValueType;
3481 static const CommandId kCmdId = kGenRenderbuffersImmediate;
3482 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3483 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3485 static uint32_t ComputeDataSize(GLsizei n) {
3486 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3489 static uint32_t ComputeSize(GLsizei n) {
3490 return static_cast<uint32_t>(sizeof(ValueType) +
3491 ComputeDataSize(n)); // NOLINT
3494 void SetHeader(GLsizei n) {
3495 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3498 void Init(GLsizei _n, GLuint* _renderbuffers) {
3499 SetHeader(_n);
3500 n = _n;
3501 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
3504 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
3505 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
3506 const uint32_t size = ComputeSize(_n);
3507 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3510 gpu::CommandHeader header;
3511 int32_t n;
3514 static_assert(sizeof(GenRenderbuffersImmediate) == 8,
3515 "size of GenRenderbuffersImmediate should be 8");
3516 static_assert(offsetof(GenRenderbuffersImmediate, header) == 0,
3517 "offset of GenRenderbuffersImmediate header should be 0");
3518 static_assert(offsetof(GenRenderbuffersImmediate, n) == 4,
3519 "offset of GenRenderbuffersImmediate n should be 4");
3521 struct GenSamplersImmediate {
3522 typedef GenSamplersImmediate ValueType;
3523 static const CommandId kCmdId = kGenSamplersImmediate;
3524 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3525 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3527 static uint32_t ComputeDataSize(GLsizei n) {
3528 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3531 static uint32_t ComputeSize(GLsizei n) {
3532 return static_cast<uint32_t>(sizeof(ValueType) +
3533 ComputeDataSize(n)); // NOLINT
3536 void SetHeader(GLsizei n) {
3537 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3540 void Init(GLsizei _n, GLuint* _samplers) {
3541 SetHeader(_n);
3542 n = _n;
3543 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n));
3546 void* Set(void* cmd, GLsizei _n, GLuint* _samplers) {
3547 static_cast<ValueType*>(cmd)->Init(_n, _samplers);
3548 const uint32_t size = ComputeSize(_n);
3549 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3552 gpu::CommandHeader header;
3553 int32_t n;
3556 static_assert(sizeof(GenSamplersImmediate) == 8,
3557 "size of GenSamplersImmediate should be 8");
3558 static_assert(offsetof(GenSamplersImmediate, header) == 0,
3559 "offset of GenSamplersImmediate header should be 0");
3560 static_assert(offsetof(GenSamplersImmediate, n) == 4,
3561 "offset of GenSamplersImmediate n should be 4");
3563 struct GenTexturesImmediate {
3564 typedef GenTexturesImmediate ValueType;
3565 static const CommandId kCmdId = kGenTexturesImmediate;
3566 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3567 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3569 static uint32_t ComputeDataSize(GLsizei n) {
3570 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3573 static uint32_t ComputeSize(GLsizei n) {
3574 return static_cast<uint32_t>(sizeof(ValueType) +
3575 ComputeDataSize(n)); // NOLINT
3578 void SetHeader(GLsizei n) {
3579 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3582 void Init(GLsizei _n, GLuint* _textures) {
3583 SetHeader(_n);
3584 n = _n;
3585 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
3588 void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
3589 static_cast<ValueType*>(cmd)->Init(_n, _textures);
3590 const uint32_t size = ComputeSize(_n);
3591 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3594 gpu::CommandHeader header;
3595 int32_t n;
3598 static_assert(sizeof(GenTexturesImmediate) == 8,
3599 "size of GenTexturesImmediate should be 8");
3600 static_assert(offsetof(GenTexturesImmediate, header) == 0,
3601 "offset of GenTexturesImmediate header should be 0");
3602 static_assert(offsetof(GenTexturesImmediate, n) == 4,
3603 "offset of GenTexturesImmediate n should be 4");
3605 struct GenTransformFeedbacksImmediate {
3606 typedef GenTransformFeedbacksImmediate ValueType;
3607 static const CommandId kCmdId = kGenTransformFeedbacksImmediate;
3608 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3609 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3611 static uint32_t ComputeDataSize(GLsizei n) {
3612 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3615 static uint32_t ComputeSize(GLsizei n) {
3616 return static_cast<uint32_t>(sizeof(ValueType) +
3617 ComputeDataSize(n)); // NOLINT
3620 void SetHeader(GLsizei n) {
3621 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3624 void Init(GLsizei _n, GLuint* _ids) {
3625 SetHeader(_n);
3626 n = _n;
3627 memcpy(ImmediateDataAddress(this), _ids, ComputeDataSize(_n));
3630 void* Set(void* cmd, GLsizei _n, GLuint* _ids) {
3631 static_cast<ValueType*>(cmd)->Init(_n, _ids);
3632 const uint32_t size = ComputeSize(_n);
3633 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3636 gpu::CommandHeader header;
3637 int32_t n;
3640 static_assert(sizeof(GenTransformFeedbacksImmediate) == 8,
3641 "size of GenTransformFeedbacksImmediate should be 8");
3642 static_assert(offsetof(GenTransformFeedbacksImmediate, header) == 0,
3643 "offset of GenTransformFeedbacksImmediate header should be 0");
3644 static_assert(offsetof(GenTransformFeedbacksImmediate, n) == 4,
3645 "offset of GenTransformFeedbacksImmediate n should be 4");
3647 struct GetActiveAttrib {
3648 typedef GetActiveAttrib ValueType;
3649 static const CommandId kCmdId = kGetActiveAttrib;
3650 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3651 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3653 struct Result {
3654 int32_t success;
3655 int32_t size;
3656 uint32_t type;
3659 static uint32_t ComputeSize() {
3660 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3663 void SetHeader() { header.SetCmd<ValueType>(); }
3665 void Init(GLuint _program,
3666 GLuint _index,
3667 uint32_t _name_bucket_id,
3668 uint32_t _result_shm_id,
3669 uint32_t _result_shm_offset) {
3670 SetHeader();
3671 program = _program;
3672 index = _index;
3673 name_bucket_id = _name_bucket_id;
3674 result_shm_id = _result_shm_id;
3675 result_shm_offset = _result_shm_offset;
3678 void* Set(void* cmd,
3679 GLuint _program,
3680 GLuint _index,
3681 uint32_t _name_bucket_id,
3682 uint32_t _result_shm_id,
3683 uint32_t _result_shm_offset) {
3684 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3685 _result_shm_id, _result_shm_offset);
3686 return NextCmdAddress<ValueType>(cmd);
3689 gpu::CommandHeader header;
3690 uint32_t program;
3691 uint32_t index;
3692 uint32_t name_bucket_id;
3693 uint32_t result_shm_id;
3694 uint32_t result_shm_offset;
3697 static_assert(sizeof(GetActiveAttrib) == 24,
3698 "size of GetActiveAttrib should be 24");
3699 static_assert(offsetof(GetActiveAttrib, header) == 0,
3700 "offset of GetActiveAttrib header should be 0");
3701 static_assert(offsetof(GetActiveAttrib, program) == 4,
3702 "offset of GetActiveAttrib program should be 4");
3703 static_assert(offsetof(GetActiveAttrib, index) == 8,
3704 "offset of GetActiveAttrib index should be 8");
3705 static_assert(offsetof(GetActiveAttrib, name_bucket_id) == 12,
3706 "offset of GetActiveAttrib name_bucket_id should be 12");
3707 static_assert(offsetof(GetActiveAttrib, result_shm_id) == 16,
3708 "offset of GetActiveAttrib result_shm_id should be 16");
3709 static_assert(offsetof(GetActiveAttrib, result_shm_offset) == 20,
3710 "offset of GetActiveAttrib result_shm_offset should be 20");
3711 static_assert(offsetof(GetActiveAttrib::Result, success) == 0,
3712 "offset of GetActiveAttrib Result success should be "
3713 "0");
3714 static_assert(offsetof(GetActiveAttrib::Result, size) == 4,
3715 "offset of GetActiveAttrib Result size should be "
3716 "4");
3717 static_assert(offsetof(GetActiveAttrib::Result, type) == 8,
3718 "offset of GetActiveAttrib Result type should be "
3719 "8");
3721 struct GetActiveUniform {
3722 typedef GetActiveUniform ValueType;
3723 static const CommandId kCmdId = kGetActiveUniform;
3724 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3725 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3727 struct Result {
3728 int32_t success;
3729 int32_t size;
3730 uint32_t type;
3733 static uint32_t ComputeSize() {
3734 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3737 void SetHeader() { header.SetCmd<ValueType>(); }
3739 void Init(GLuint _program,
3740 GLuint _index,
3741 uint32_t _name_bucket_id,
3742 uint32_t _result_shm_id,
3743 uint32_t _result_shm_offset) {
3744 SetHeader();
3745 program = _program;
3746 index = _index;
3747 name_bucket_id = _name_bucket_id;
3748 result_shm_id = _result_shm_id;
3749 result_shm_offset = _result_shm_offset;
3752 void* Set(void* cmd,
3753 GLuint _program,
3754 GLuint _index,
3755 uint32_t _name_bucket_id,
3756 uint32_t _result_shm_id,
3757 uint32_t _result_shm_offset) {
3758 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3759 _result_shm_id, _result_shm_offset);
3760 return NextCmdAddress<ValueType>(cmd);
3763 gpu::CommandHeader header;
3764 uint32_t program;
3765 uint32_t index;
3766 uint32_t name_bucket_id;
3767 uint32_t result_shm_id;
3768 uint32_t result_shm_offset;
3771 static_assert(sizeof(GetActiveUniform) == 24,
3772 "size of GetActiveUniform should be 24");
3773 static_assert(offsetof(GetActiveUniform, header) == 0,
3774 "offset of GetActiveUniform header should be 0");
3775 static_assert(offsetof(GetActiveUniform, program) == 4,
3776 "offset of GetActiveUniform program should be 4");
3777 static_assert(offsetof(GetActiveUniform, index) == 8,
3778 "offset of GetActiveUniform index should be 8");
3779 static_assert(offsetof(GetActiveUniform, name_bucket_id) == 12,
3780 "offset of GetActiveUniform name_bucket_id should be 12");
3781 static_assert(offsetof(GetActiveUniform, result_shm_id) == 16,
3782 "offset of GetActiveUniform result_shm_id should be 16");
3783 static_assert(offsetof(GetActiveUniform, result_shm_offset) == 20,
3784 "offset of GetActiveUniform result_shm_offset should be 20");
3785 static_assert(offsetof(GetActiveUniform::Result, success) == 0,
3786 "offset of GetActiveUniform Result success should be "
3787 "0");
3788 static_assert(offsetof(GetActiveUniform::Result, size) == 4,
3789 "offset of GetActiveUniform Result size should be "
3790 "4");
3791 static_assert(offsetof(GetActiveUniform::Result, type) == 8,
3792 "offset of GetActiveUniform Result type should be "
3793 "8");
3795 struct GetActiveUniformBlockiv {
3796 typedef GetActiveUniformBlockiv ValueType;
3797 static const CommandId kCmdId = kGetActiveUniformBlockiv;
3798 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3799 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3801 typedef SizedResult<GLint> Result;
3803 static uint32_t ComputeSize() {
3804 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3807 void SetHeader() { header.SetCmd<ValueType>(); }
3809 void Init(GLuint _program,
3810 GLuint _index,
3811 GLenum _pname,
3812 uint32_t _params_shm_id,
3813 uint32_t _params_shm_offset) {
3814 SetHeader();
3815 program = _program;
3816 index = _index;
3817 pname = _pname;
3818 params_shm_id = _params_shm_id;
3819 params_shm_offset = _params_shm_offset;
3822 void* Set(void* cmd,
3823 GLuint _program,
3824 GLuint _index,
3825 GLenum _pname,
3826 uint32_t _params_shm_id,
3827 uint32_t _params_shm_offset) {
3828 static_cast<ValueType*>(cmd)
3829 ->Init(_program, _index, _pname, _params_shm_id, _params_shm_offset);
3830 return NextCmdAddress<ValueType>(cmd);
3833 gpu::CommandHeader header;
3834 uint32_t program;
3835 uint32_t index;
3836 uint32_t pname;
3837 uint32_t params_shm_id;
3838 uint32_t params_shm_offset;
3841 static_assert(sizeof(GetActiveUniformBlockiv) == 24,
3842 "size of GetActiveUniformBlockiv should be 24");
3843 static_assert(offsetof(GetActiveUniformBlockiv, header) == 0,
3844 "offset of GetActiveUniformBlockiv header should be 0");
3845 static_assert(offsetof(GetActiveUniformBlockiv, program) == 4,
3846 "offset of GetActiveUniformBlockiv program should be 4");
3847 static_assert(offsetof(GetActiveUniformBlockiv, index) == 8,
3848 "offset of GetActiveUniformBlockiv index should be 8");
3849 static_assert(offsetof(GetActiveUniformBlockiv, pname) == 12,
3850 "offset of GetActiveUniformBlockiv pname should be 12");
3851 static_assert(offsetof(GetActiveUniformBlockiv, params_shm_id) == 16,
3852 "offset of GetActiveUniformBlockiv params_shm_id should be 16");
3853 static_assert(
3854 offsetof(GetActiveUniformBlockiv, params_shm_offset) == 20,
3855 "offset of GetActiveUniformBlockiv params_shm_offset should be 20");
3857 struct GetActiveUniformBlockName {
3858 typedef GetActiveUniformBlockName ValueType;
3859 static const CommandId kCmdId = kGetActiveUniformBlockName;
3860 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3863 typedef int32_t Result;
3865 static uint32_t ComputeSize() {
3866 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3869 void SetHeader() { header.SetCmd<ValueType>(); }
3871 void Init(GLuint _program,
3872 GLuint _index,
3873 uint32_t _name_bucket_id,
3874 uint32_t _result_shm_id,
3875 uint32_t _result_shm_offset) {
3876 SetHeader();
3877 program = _program;
3878 index = _index;
3879 name_bucket_id = _name_bucket_id;
3880 result_shm_id = _result_shm_id;
3881 result_shm_offset = _result_shm_offset;
3884 void* Set(void* cmd,
3885 GLuint _program,
3886 GLuint _index,
3887 uint32_t _name_bucket_id,
3888 uint32_t _result_shm_id,
3889 uint32_t _result_shm_offset) {
3890 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3891 _result_shm_id, _result_shm_offset);
3892 return NextCmdAddress<ValueType>(cmd);
3895 gpu::CommandHeader header;
3896 uint32_t program;
3897 uint32_t index;
3898 uint32_t name_bucket_id;
3899 uint32_t result_shm_id;
3900 uint32_t result_shm_offset;
3903 static_assert(sizeof(GetActiveUniformBlockName) == 24,
3904 "size of GetActiveUniformBlockName should be 24");
3905 static_assert(offsetof(GetActiveUniformBlockName, header) == 0,
3906 "offset of GetActiveUniformBlockName header should be 0");
3907 static_assert(offsetof(GetActiveUniformBlockName, program) == 4,
3908 "offset of GetActiveUniformBlockName program should be 4");
3909 static_assert(offsetof(GetActiveUniformBlockName, index) == 8,
3910 "offset of GetActiveUniformBlockName index should be 8");
3911 static_assert(
3912 offsetof(GetActiveUniformBlockName, name_bucket_id) == 12,
3913 "offset of GetActiveUniformBlockName name_bucket_id should be 12");
3914 static_assert(offsetof(GetActiveUniformBlockName, result_shm_id) == 16,
3915 "offset of GetActiveUniformBlockName result_shm_id should be 16");
3916 static_assert(
3917 offsetof(GetActiveUniformBlockName, result_shm_offset) == 20,
3918 "offset of GetActiveUniformBlockName result_shm_offset should be 20");
3920 struct GetActiveUniformsiv {
3921 typedef GetActiveUniformsiv ValueType;
3922 static const CommandId kCmdId = kGetActiveUniformsiv;
3923 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3924 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3926 typedef SizedResult<GLint> Result;
3928 static uint32_t ComputeSize() {
3929 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3932 void SetHeader() { header.SetCmd<ValueType>(); }
3934 void Init(GLuint _program,
3935 uint32_t _indices_bucket_id,
3936 GLenum _pname,
3937 uint32_t _params_shm_id,
3938 uint32_t _params_shm_offset) {
3939 SetHeader();
3940 program = _program;
3941 indices_bucket_id = _indices_bucket_id;
3942 pname = _pname;
3943 params_shm_id = _params_shm_id;
3944 params_shm_offset = _params_shm_offset;
3947 void* Set(void* cmd,
3948 GLuint _program,
3949 uint32_t _indices_bucket_id,
3950 GLenum _pname,
3951 uint32_t _params_shm_id,
3952 uint32_t _params_shm_offset) {
3953 static_cast<ValueType*>(cmd)->Init(_program, _indices_bucket_id, _pname,
3954 _params_shm_id, _params_shm_offset);
3955 return NextCmdAddress<ValueType>(cmd);
3958 gpu::CommandHeader header;
3959 uint32_t program;
3960 uint32_t indices_bucket_id;
3961 uint32_t pname;
3962 uint32_t params_shm_id;
3963 uint32_t params_shm_offset;
3966 static_assert(sizeof(GetActiveUniformsiv) == 24,
3967 "size of GetActiveUniformsiv should be 24");
3968 static_assert(offsetof(GetActiveUniformsiv, header) == 0,
3969 "offset of GetActiveUniformsiv header should be 0");
3970 static_assert(offsetof(GetActiveUniformsiv, program) == 4,
3971 "offset of GetActiveUniformsiv program should be 4");
3972 static_assert(offsetof(GetActiveUniformsiv, indices_bucket_id) == 8,
3973 "offset of GetActiveUniformsiv indices_bucket_id should be 8");
3974 static_assert(offsetof(GetActiveUniformsiv, pname) == 12,
3975 "offset of GetActiveUniformsiv pname should be 12");
3976 static_assert(offsetof(GetActiveUniformsiv, params_shm_id) == 16,
3977 "offset of GetActiveUniformsiv params_shm_id should be 16");
3978 static_assert(offsetof(GetActiveUniformsiv, params_shm_offset) == 20,
3979 "offset of GetActiveUniformsiv params_shm_offset should be 20");
3981 struct GetAttachedShaders {
3982 typedef GetAttachedShaders ValueType;
3983 static const CommandId kCmdId = kGetAttachedShaders;
3984 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3985 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3987 typedef SizedResult<GLuint> Result;
3989 static uint32_t ComputeSize() {
3990 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3993 void SetHeader() { header.SetCmd<ValueType>(); }
3995 void Init(GLuint _program,
3996 uint32_t _result_shm_id,
3997 uint32_t _result_shm_offset,
3998 uint32_t _result_size) {
3999 SetHeader();
4000 program = _program;
4001 result_shm_id = _result_shm_id;
4002 result_shm_offset = _result_shm_offset;
4003 result_size = _result_size;
4006 void* Set(void* cmd,
4007 GLuint _program,
4008 uint32_t _result_shm_id,
4009 uint32_t _result_shm_offset,
4010 uint32_t _result_size) {
4011 static_cast<ValueType*>(cmd)
4012 ->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
4013 return NextCmdAddress<ValueType>(cmd);
4016 gpu::CommandHeader header;
4017 uint32_t program;
4018 uint32_t result_shm_id;
4019 uint32_t result_shm_offset;
4020 uint32_t result_size;
4023 static_assert(sizeof(GetAttachedShaders) == 20,
4024 "size of GetAttachedShaders should be 20");
4025 static_assert(offsetof(GetAttachedShaders, header) == 0,
4026 "offset of GetAttachedShaders header should be 0");
4027 static_assert(offsetof(GetAttachedShaders, program) == 4,
4028 "offset of GetAttachedShaders program should be 4");
4029 static_assert(offsetof(GetAttachedShaders, result_shm_id) == 8,
4030 "offset of GetAttachedShaders result_shm_id should be 8");
4031 static_assert(offsetof(GetAttachedShaders, result_shm_offset) == 12,
4032 "offset of GetAttachedShaders result_shm_offset should be 12");
4033 static_assert(offsetof(GetAttachedShaders, result_size) == 16,
4034 "offset of GetAttachedShaders result_size should be 16");
4036 struct GetAttribLocation {
4037 typedef GetAttribLocation ValueType;
4038 static const CommandId kCmdId = kGetAttribLocation;
4039 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4040 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4042 typedef GLint Result;
4044 static uint32_t ComputeSize() {
4045 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4048 void SetHeader() { header.SetCmd<ValueType>(); }
4050 void Init(GLuint _program,
4051 uint32_t _name_bucket_id,
4052 uint32_t _location_shm_id,
4053 uint32_t _location_shm_offset) {
4054 SetHeader();
4055 program = _program;
4056 name_bucket_id = _name_bucket_id;
4057 location_shm_id = _location_shm_id;
4058 location_shm_offset = _location_shm_offset;
4061 void* Set(void* cmd,
4062 GLuint _program,
4063 uint32_t _name_bucket_id,
4064 uint32_t _location_shm_id,
4065 uint32_t _location_shm_offset) {
4066 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
4067 _location_shm_id, _location_shm_offset);
4068 return NextCmdAddress<ValueType>(cmd);
4071 gpu::CommandHeader header;
4072 uint32_t program;
4073 uint32_t name_bucket_id;
4074 uint32_t location_shm_id;
4075 uint32_t location_shm_offset;
4078 static_assert(sizeof(GetAttribLocation) == 20,
4079 "size of GetAttribLocation should be 20");
4080 static_assert(offsetof(GetAttribLocation, header) == 0,
4081 "offset of GetAttribLocation header should be 0");
4082 static_assert(offsetof(GetAttribLocation, program) == 4,
4083 "offset of GetAttribLocation program should be 4");
4084 static_assert(offsetof(GetAttribLocation, name_bucket_id) == 8,
4085 "offset of GetAttribLocation name_bucket_id should be 8");
4086 static_assert(offsetof(GetAttribLocation, location_shm_id) == 12,
4087 "offset of GetAttribLocation location_shm_id should be 12");
4088 static_assert(offsetof(GetAttribLocation, location_shm_offset) == 16,
4089 "offset of GetAttribLocation location_shm_offset should be 16");
4091 struct GetBooleanv {
4092 typedef GetBooleanv ValueType;
4093 static const CommandId kCmdId = kGetBooleanv;
4094 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4095 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4097 typedef SizedResult<GLboolean> Result;
4099 static uint32_t ComputeSize() {
4100 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4103 void SetHeader() { header.SetCmd<ValueType>(); }
4105 void Init(GLenum _pname,
4106 uint32_t _params_shm_id,
4107 uint32_t _params_shm_offset) {
4108 SetHeader();
4109 pname = _pname;
4110 params_shm_id = _params_shm_id;
4111 params_shm_offset = _params_shm_offset;
4114 void* Set(void* cmd,
4115 GLenum _pname,
4116 uint32_t _params_shm_id,
4117 uint32_t _params_shm_offset) {
4118 static_cast<ValueType*>(cmd)
4119 ->Init(_pname, _params_shm_id, _params_shm_offset);
4120 return NextCmdAddress<ValueType>(cmd);
4123 gpu::CommandHeader header;
4124 uint32_t pname;
4125 uint32_t params_shm_id;
4126 uint32_t params_shm_offset;
4129 static_assert(sizeof(GetBooleanv) == 16, "size of GetBooleanv should be 16");
4130 static_assert(offsetof(GetBooleanv, header) == 0,
4131 "offset of GetBooleanv header should be 0");
4132 static_assert(offsetof(GetBooleanv, pname) == 4,
4133 "offset of GetBooleanv pname should be 4");
4134 static_assert(offsetof(GetBooleanv, params_shm_id) == 8,
4135 "offset of GetBooleanv params_shm_id should be 8");
4136 static_assert(offsetof(GetBooleanv, params_shm_offset) == 12,
4137 "offset of GetBooleanv params_shm_offset should be 12");
4139 struct GetBufferParameteri64v {
4140 typedef GetBufferParameteri64v ValueType;
4141 static const CommandId kCmdId = kGetBufferParameteri64v;
4142 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4143 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4145 typedef SizedResult<GLint64> Result;
4147 static uint32_t ComputeSize() {
4148 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4151 void SetHeader() { header.SetCmd<ValueType>(); }
4153 void Init(GLenum _target,
4154 GLenum _pname,
4155 uint32_t _params_shm_id,
4156 uint32_t _params_shm_offset) {
4157 SetHeader();
4158 target = _target;
4159 pname = _pname;
4160 params_shm_id = _params_shm_id;
4161 params_shm_offset = _params_shm_offset;
4164 void* Set(void* cmd,
4165 GLenum _target,
4166 GLenum _pname,
4167 uint32_t _params_shm_id,
4168 uint32_t _params_shm_offset) {
4169 static_cast<ValueType*>(cmd)
4170 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4171 return NextCmdAddress<ValueType>(cmd);
4174 gpu::CommandHeader header;
4175 uint32_t target;
4176 uint32_t pname;
4177 uint32_t params_shm_id;
4178 uint32_t params_shm_offset;
4181 static_assert(sizeof(GetBufferParameteri64v) == 20,
4182 "size of GetBufferParameteri64v should be 20");
4183 static_assert(offsetof(GetBufferParameteri64v, header) == 0,
4184 "offset of GetBufferParameteri64v header should be 0");
4185 static_assert(offsetof(GetBufferParameteri64v, target) == 4,
4186 "offset of GetBufferParameteri64v target should be 4");
4187 static_assert(offsetof(GetBufferParameteri64v, pname) == 8,
4188 "offset of GetBufferParameteri64v pname should be 8");
4189 static_assert(offsetof(GetBufferParameteri64v, params_shm_id) == 12,
4190 "offset of GetBufferParameteri64v params_shm_id should be 12");
4191 static_assert(
4192 offsetof(GetBufferParameteri64v, params_shm_offset) == 16,
4193 "offset of GetBufferParameteri64v params_shm_offset should be 16");
4195 struct GetBufferParameteriv {
4196 typedef GetBufferParameteriv ValueType;
4197 static const CommandId kCmdId = kGetBufferParameteriv;
4198 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4199 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4201 typedef SizedResult<GLint> Result;
4203 static uint32_t ComputeSize() {
4204 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4207 void SetHeader() { header.SetCmd<ValueType>(); }
4209 void Init(GLenum _target,
4210 GLenum _pname,
4211 uint32_t _params_shm_id,
4212 uint32_t _params_shm_offset) {
4213 SetHeader();
4214 target = _target;
4215 pname = _pname;
4216 params_shm_id = _params_shm_id;
4217 params_shm_offset = _params_shm_offset;
4220 void* Set(void* cmd,
4221 GLenum _target,
4222 GLenum _pname,
4223 uint32_t _params_shm_id,
4224 uint32_t _params_shm_offset) {
4225 static_cast<ValueType*>(cmd)
4226 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4227 return NextCmdAddress<ValueType>(cmd);
4230 gpu::CommandHeader header;
4231 uint32_t target;
4232 uint32_t pname;
4233 uint32_t params_shm_id;
4234 uint32_t params_shm_offset;
4237 static_assert(sizeof(GetBufferParameteriv) == 20,
4238 "size of GetBufferParameteriv should be 20");
4239 static_assert(offsetof(GetBufferParameteriv, header) == 0,
4240 "offset of GetBufferParameteriv header should be 0");
4241 static_assert(offsetof(GetBufferParameteriv, target) == 4,
4242 "offset of GetBufferParameteriv target should be 4");
4243 static_assert(offsetof(GetBufferParameteriv, pname) == 8,
4244 "offset of GetBufferParameteriv pname should be 8");
4245 static_assert(offsetof(GetBufferParameteriv, params_shm_id) == 12,
4246 "offset of GetBufferParameteriv params_shm_id should be 12");
4247 static_assert(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
4248 "offset of GetBufferParameteriv params_shm_offset should be 16");
4250 struct GetError {
4251 typedef GetError ValueType;
4252 static const CommandId kCmdId = kGetError;
4253 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4254 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4256 typedef GLenum Result;
4258 static uint32_t ComputeSize() {
4259 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4262 void SetHeader() { header.SetCmd<ValueType>(); }
4264 void Init(uint32_t _result_shm_id, uint32_t _result_shm_offset) {
4265 SetHeader();
4266 result_shm_id = _result_shm_id;
4267 result_shm_offset = _result_shm_offset;
4270 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
4271 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
4272 return NextCmdAddress<ValueType>(cmd);
4275 gpu::CommandHeader header;
4276 uint32_t result_shm_id;
4277 uint32_t result_shm_offset;
4280 static_assert(sizeof(GetError) == 12, "size of GetError should be 12");
4281 static_assert(offsetof(GetError, header) == 0,
4282 "offset of GetError header should be 0");
4283 static_assert(offsetof(GetError, result_shm_id) == 4,
4284 "offset of GetError result_shm_id should be 4");
4285 static_assert(offsetof(GetError, result_shm_offset) == 8,
4286 "offset of GetError result_shm_offset should be 8");
4288 struct GetFloatv {
4289 typedef GetFloatv ValueType;
4290 static const CommandId kCmdId = kGetFloatv;
4291 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4292 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4294 typedef SizedResult<GLfloat> Result;
4296 static uint32_t ComputeSize() {
4297 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4300 void SetHeader() { header.SetCmd<ValueType>(); }
4302 void Init(GLenum _pname,
4303 uint32_t _params_shm_id,
4304 uint32_t _params_shm_offset) {
4305 SetHeader();
4306 pname = _pname;
4307 params_shm_id = _params_shm_id;
4308 params_shm_offset = _params_shm_offset;
4311 void* Set(void* cmd,
4312 GLenum _pname,
4313 uint32_t _params_shm_id,
4314 uint32_t _params_shm_offset) {
4315 static_cast<ValueType*>(cmd)
4316 ->Init(_pname, _params_shm_id, _params_shm_offset);
4317 return NextCmdAddress<ValueType>(cmd);
4320 gpu::CommandHeader header;
4321 uint32_t pname;
4322 uint32_t params_shm_id;
4323 uint32_t params_shm_offset;
4326 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16");
4327 static_assert(offsetof(GetFloatv, header) == 0,
4328 "offset of GetFloatv header should be 0");
4329 static_assert(offsetof(GetFloatv, pname) == 4,
4330 "offset of GetFloatv pname should be 4");
4331 static_assert(offsetof(GetFloatv, params_shm_id) == 8,
4332 "offset of GetFloatv params_shm_id should be 8");
4333 static_assert(offsetof(GetFloatv, params_shm_offset) == 12,
4334 "offset of GetFloatv params_shm_offset should be 12");
4336 struct GetFragDataLocation {
4337 typedef GetFragDataLocation ValueType;
4338 static const CommandId kCmdId = kGetFragDataLocation;
4339 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4340 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4342 typedef GLint Result;
4344 static uint32_t ComputeSize() {
4345 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4348 void SetHeader() { header.SetCmd<ValueType>(); }
4350 void Init(GLuint _program,
4351 uint32_t _name_bucket_id,
4352 uint32_t _location_shm_id,
4353 uint32_t _location_shm_offset) {
4354 SetHeader();
4355 program = _program;
4356 name_bucket_id = _name_bucket_id;
4357 location_shm_id = _location_shm_id;
4358 location_shm_offset = _location_shm_offset;
4361 void* Set(void* cmd,
4362 GLuint _program,
4363 uint32_t _name_bucket_id,
4364 uint32_t _location_shm_id,
4365 uint32_t _location_shm_offset) {
4366 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
4367 _location_shm_id, _location_shm_offset);
4368 return NextCmdAddress<ValueType>(cmd);
4371 gpu::CommandHeader header;
4372 uint32_t program;
4373 uint32_t name_bucket_id;
4374 uint32_t location_shm_id;
4375 uint32_t location_shm_offset;
4378 static_assert(sizeof(GetFragDataLocation) == 20,
4379 "size of GetFragDataLocation should be 20");
4380 static_assert(offsetof(GetFragDataLocation, header) == 0,
4381 "offset of GetFragDataLocation header should be 0");
4382 static_assert(offsetof(GetFragDataLocation, program) == 4,
4383 "offset of GetFragDataLocation program should be 4");
4384 static_assert(offsetof(GetFragDataLocation, name_bucket_id) == 8,
4385 "offset of GetFragDataLocation name_bucket_id should be 8");
4386 static_assert(offsetof(GetFragDataLocation, location_shm_id) == 12,
4387 "offset of GetFragDataLocation location_shm_id should be 12");
4388 static_assert(offsetof(GetFragDataLocation, location_shm_offset) == 16,
4389 "offset of GetFragDataLocation location_shm_offset should be 16");
4391 struct GetFramebufferAttachmentParameteriv {
4392 typedef GetFramebufferAttachmentParameteriv ValueType;
4393 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
4394 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4395 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4397 typedef SizedResult<GLint> Result;
4399 static uint32_t ComputeSize() {
4400 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4403 void SetHeader() { header.SetCmd<ValueType>(); }
4405 void Init(GLenum _target,
4406 GLenum _attachment,
4407 GLenum _pname,
4408 uint32_t _params_shm_id,
4409 uint32_t _params_shm_offset) {
4410 SetHeader();
4411 target = _target;
4412 attachment = _attachment;
4413 pname = _pname;
4414 params_shm_id = _params_shm_id;
4415 params_shm_offset = _params_shm_offset;
4418 void* Set(void* cmd,
4419 GLenum _target,
4420 GLenum _attachment,
4421 GLenum _pname,
4422 uint32_t _params_shm_id,
4423 uint32_t _params_shm_offset) {
4424 static_cast<ValueType*>(cmd)->Init(_target, _attachment, _pname,
4425 _params_shm_id, _params_shm_offset);
4426 return NextCmdAddress<ValueType>(cmd);
4429 gpu::CommandHeader header;
4430 uint32_t target;
4431 uint32_t attachment;
4432 uint32_t pname;
4433 uint32_t params_shm_id;
4434 uint32_t params_shm_offset;
4437 static_assert(sizeof(GetFramebufferAttachmentParameteriv) == 24,
4438 "size of GetFramebufferAttachmentParameteriv should be 24");
4439 static_assert(
4440 offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
4441 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4442 static_assert(
4443 offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
4444 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4445 static_assert(
4446 offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
4447 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4448 static_assert(
4449 offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
4450 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4451 static_assert(
4452 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
4453 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4454 static_assert(offsetof(GetFramebufferAttachmentParameteriv,
4455 params_shm_offset) == 20,
4456 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4457 "should be 20");
4459 struct GetInteger64v {
4460 typedef GetInteger64v ValueType;
4461 static const CommandId kCmdId = kGetInteger64v;
4462 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4463 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4465 typedef SizedResult<GLint64> Result;
4467 static uint32_t ComputeSize() {
4468 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4471 void SetHeader() { header.SetCmd<ValueType>(); }
4473 void Init(GLenum _pname,
4474 uint32_t _params_shm_id,
4475 uint32_t _params_shm_offset) {
4476 SetHeader();
4477 pname = _pname;
4478 params_shm_id = _params_shm_id;
4479 params_shm_offset = _params_shm_offset;
4482 void* Set(void* cmd,
4483 GLenum _pname,
4484 uint32_t _params_shm_id,
4485 uint32_t _params_shm_offset) {
4486 static_cast<ValueType*>(cmd)
4487 ->Init(_pname, _params_shm_id, _params_shm_offset);
4488 return NextCmdAddress<ValueType>(cmd);
4491 gpu::CommandHeader header;
4492 uint32_t pname;
4493 uint32_t params_shm_id;
4494 uint32_t params_shm_offset;
4497 static_assert(sizeof(GetInteger64v) == 16,
4498 "size of GetInteger64v should be 16");
4499 static_assert(offsetof(GetInteger64v, header) == 0,
4500 "offset of GetInteger64v header should be 0");
4501 static_assert(offsetof(GetInteger64v, pname) == 4,
4502 "offset of GetInteger64v pname should be 4");
4503 static_assert(offsetof(GetInteger64v, params_shm_id) == 8,
4504 "offset of GetInteger64v params_shm_id should be 8");
4505 static_assert(offsetof(GetInteger64v, params_shm_offset) == 12,
4506 "offset of GetInteger64v params_shm_offset should be 12");
4508 struct GetIntegeri_v {
4509 typedef GetIntegeri_v ValueType;
4510 static const CommandId kCmdId = kGetIntegeri_v;
4511 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4512 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4514 typedef SizedResult<GLint> Result;
4516 static uint32_t ComputeSize() {
4517 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4520 void SetHeader() { header.SetCmd<ValueType>(); }
4522 void Init(GLenum _pname,
4523 GLuint _index,
4524 uint32_t _data_shm_id,
4525 uint32_t _data_shm_offset) {
4526 SetHeader();
4527 pname = _pname;
4528 index = _index;
4529 data_shm_id = _data_shm_id;
4530 data_shm_offset = _data_shm_offset;
4533 void* Set(void* cmd,
4534 GLenum _pname,
4535 GLuint _index,
4536 uint32_t _data_shm_id,
4537 uint32_t _data_shm_offset) {
4538 static_cast<ValueType*>(cmd)
4539 ->Init(_pname, _index, _data_shm_id, _data_shm_offset);
4540 return NextCmdAddress<ValueType>(cmd);
4543 gpu::CommandHeader header;
4544 uint32_t pname;
4545 uint32_t index;
4546 uint32_t data_shm_id;
4547 uint32_t data_shm_offset;
4550 static_assert(sizeof(GetIntegeri_v) == 20,
4551 "size of GetIntegeri_v should be 20");
4552 static_assert(offsetof(GetIntegeri_v, header) == 0,
4553 "offset of GetIntegeri_v header should be 0");
4554 static_assert(offsetof(GetIntegeri_v, pname) == 4,
4555 "offset of GetIntegeri_v pname should be 4");
4556 static_assert(offsetof(GetIntegeri_v, index) == 8,
4557 "offset of GetIntegeri_v index should be 8");
4558 static_assert(offsetof(GetIntegeri_v, data_shm_id) == 12,
4559 "offset of GetIntegeri_v data_shm_id should be 12");
4560 static_assert(offsetof(GetIntegeri_v, data_shm_offset) == 16,
4561 "offset of GetIntegeri_v data_shm_offset should be 16");
4563 struct GetInteger64i_v {
4564 typedef GetInteger64i_v ValueType;
4565 static const CommandId kCmdId = kGetInteger64i_v;
4566 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4567 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4569 typedef SizedResult<GLint64> Result;
4571 static uint32_t ComputeSize() {
4572 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4575 void SetHeader() { header.SetCmd<ValueType>(); }
4577 void Init(GLenum _pname,
4578 GLuint _index,
4579 uint32_t _data_shm_id,
4580 uint32_t _data_shm_offset) {
4581 SetHeader();
4582 pname = _pname;
4583 index = _index;
4584 data_shm_id = _data_shm_id;
4585 data_shm_offset = _data_shm_offset;
4588 void* Set(void* cmd,
4589 GLenum _pname,
4590 GLuint _index,
4591 uint32_t _data_shm_id,
4592 uint32_t _data_shm_offset) {
4593 static_cast<ValueType*>(cmd)
4594 ->Init(_pname, _index, _data_shm_id, _data_shm_offset);
4595 return NextCmdAddress<ValueType>(cmd);
4598 gpu::CommandHeader header;
4599 uint32_t pname;
4600 uint32_t index;
4601 uint32_t data_shm_id;
4602 uint32_t data_shm_offset;
4605 static_assert(sizeof(GetInteger64i_v) == 20,
4606 "size of GetInteger64i_v should be 20");
4607 static_assert(offsetof(GetInteger64i_v, header) == 0,
4608 "offset of GetInteger64i_v header should be 0");
4609 static_assert(offsetof(GetInteger64i_v, pname) == 4,
4610 "offset of GetInteger64i_v pname should be 4");
4611 static_assert(offsetof(GetInteger64i_v, index) == 8,
4612 "offset of GetInteger64i_v index should be 8");
4613 static_assert(offsetof(GetInteger64i_v, data_shm_id) == 12,
4614 "offset of GetInteger64i_v data_shm_id should be 12");
4615 static_assert(offsetof(GetInteger64i_v, data_shm_offset) == 16,
4616 "offset of GetInteger64i_v data_shm_offset should be 16");
4618 struct GetIntegerv {
4619 typedef GetIntegerv ValueType;
4620 static const CommandId kCmdId = kGetIntegerv;
4621 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4622 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4624 typedef SizedResult<GLint> Result;
4626 static uint32_t ComputeSize() {
4627 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4630 void SetHeader() { header.SetCmd<ValueType>(); }
4632 void Init(GLenum _pname,
4633 uint32_t _params_shm_id,
4634 uint32_t _params_shm_offset) {
4635 SetHeader();
4636 pname = _pname;
4637 params_shm_id = _params_shm_id;
4638 params_shm_offset = _params_shm_offset;
4641 void* Set(void* cmd,
4642 GLenum _pname,
4643 uint32_t _params_shm_id,
4644 uint32_t _params_shm_offset) {
4645 static_cast<ValueType*>(cmd)
4646 ->Init(_pname, _params_shm_id, _params_shm_offset);
4647 return NextCmdAddress<ValueType>(cmd);
4650 gpu::CommandHeader header;
4651 uint32_t pname;
4652 uint32_t params_shm_id;
4653 uint32_t params_shm_offset;
4656 static_assert(sizeof(GetIntegerv) == 16, "size of GetIntegerv should be 16");
4657 static_assert(offsetof(GetIntegerv, header) == 0,
4658 "offset of GetIntegerv header should be 0");
4659 static_assert(offsetof(GetIntegerv, pname) == 4,
4660 "offset of GetIntegerv pname should be 4");
4661 static_assert(offsetof(GetIntegerv, params_shm_id) == 8,
4662 "offset of GetIntegerv params_shm_id should be 8");
4663 static_assert(offsetof(GetIntegerv, params_shm_offset) == 12,
4664 "offset of GetIntegerv params_shm_offset should be 12");
4666 struct GetInternalformativ {
4667 typedef GetInternalformativ ValueType;
4668 static const CommandId kCmdId = kGetInternalformativ;
4669 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4670 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4672 typedef SizedResult<GLint> Result;
4674 static uint32_t ComputeSize() {
4675 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4678 void SetHeader() { header.SetCmd<ValueType>(); }
4680 void Init(GLenum _target,
4681 GLenum _format,
4682 GLenum _pname,
4683 uint32_t _params_shm_id,
4684 uint32_t _params_shm_offset) {
4685 SetHeader();
4686 target = _target;
4687 format = _format;
4688 pname = _pname;
4689 params_shm_id = _params_shm_id;
4690 params_shm_offset = _params_shm_offset;
4693 void* Set(void* cmd,
4694 GLenum _target,
4695 GLenum _format,
4696 GLenum _pname,
4697 uint32_t _params_shm_id,
4698 uint32_t _params_shm_offset) {
4699 static_cast<ValueType*>(cmd)
4700 ->Init(_target, _format, _pname, _params_shm_id, _params_shm_offset);
4701 return NextCmdAddress<ValueType>(cmd);
4704 gpu::CommandHeader header;
4705 uint32_t target;
4706 uint32_t format;
4707 uint32_t pname;
4708 uint32_t params_shm_id;
4709 uint32_t params_shm_offset;
4712 static_assert(sizeof(GetInternalformativ) == 24,
4713 "size of GetInternalformativ should be 24");
4714 static_assert(offsetof(GetInternalformativ, header) == 0,
4715 "offset of GetInternalformativ header should be 0");
4716 static_assert(offsetof(GetInternalformativ, target) == 4,
4717 "offset of GetInternalformativ target should be 4");
4718 static_assert(offsetof(GetInternalformativ, format) == 8,
4719 "offset of GetInternalformativ format should be 8");
4720 static_assert(offsetof(GetInternalformativ, pname) == 12,
4721 "offset of GetInternalformativ pname should be 12");
4722 static_assert(offsetof(GetInternalformativ, params_shm_id) == 16,
4723 "offset of GetInternalformativ params_shm_id should be 16");
4724 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 20,
4725 "offset of GetInternalformativ params_shm_offset should be 20");
4727 struct GetProgramiv {
4728 typedef GetProgramiv ValueType;
4729 static const CommandId kCmdId = kGetProgramiv;
4730 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4731 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4733 typedef SizedResult<GLint> Result;
4735 static uint32_t ComputeSize() {
4736 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4739 void SetHeader() { header.SetCmd<ValueType>(); }
4741 void Init(GLuint _program,
4742 GLenum _pname,
4743 uint32_t _params_shm_id,
4744 uint32_t _params_shm_offset) {
4745 SetHeader();
4746 program = _program;
4747 pname = _pname;
4748 params_shm_id = _params_shm_id;
4749 params_shm_offset = _params_shm_offset;
4752 void* Set(void* cmd,
4753 GLuint _program,
4754 GLenum _pname,
4755 uint32_t _params_shm_id,
4756 uint32_t _params_shm_offset) {
4757 static_cast<ValueType*>(cmd)
4758 ->Init(_program, _pname, _params_shm_id, _params_shm_offset);
4759 return NextCmdAddress<ValueType>(cmd);
4762 gpu::CommandHeader header;
4763 uint32_t program;
4764 uint32_t pname;
4765 uint32_t params_shm_id;
4766 uint32_t params_shm_offset;
4769 static_assert(sizeof(GetProgramiv) == 20, "size of GetProgramiv should be 20");
4770 static_assert(offsetof(GetProgramiv, header) == 0,
4771 "offset of GetProgramiv header should be 0");
4772 static_assert(offsetof(GetProgramiv, program) == 4,
4773 "offset of GetProgramiv program should be 4");
4774 static_assert(offsetof(GetProgramiv, pname) == 8,
4775 "offset of GetProgramiv pname should be 8");
4776 static_assert(offsetof(GetProgramiv, params_shm_id) == 12,
4777 "offset of GetProgramiv params_shm_id should be 12");
4778 static_assert(offsetof(GetProgramiv, params_shm_offset) == 16,
4779 "offset of GetProgramiv params_shm_offset should be 16");
4781 struct GetProgramInfoLog {
4782 typedef GetProgramInfoLog ValueType;
4783 static const CommandId kCmdId = kGetProgramInfoLog;
4784 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4785 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4787 static uint32_t ComputeSize() {
4788 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4791 void SetHeader() { header.SetCmd<ValueType>(); }
4793 void Init(GLuint _program, uint32_t _bucket_id) {
4794 SetHeader();
4795 program = _program;
4796 bucket_id = _bucket_id;
4799 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
4800 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
4801 return NextCmdAddress<ValueType>(cmd);
4804 gpu::CommandHeader header;
4805 uint32_t program;
4806 uint32_t bucket_id;
4809 static_assert(sizeof(GetProgramInfoLog) == 12,
4810 "size of GetProgramInfoLog should be 12");
4811 static_assert(offsetof(GetProgramInfoLog, header) == 0,
4812 "offset of GetProgramInfoLog header should be 0");
4813 static_assert(offsetof(GetProgramInfoLog, program) == 4,
4814 "offset of GetProgramInfoLog program should be 4");
4815 static_assert(offsetof(GetProgramInfoLog, bucket_id) == 8,
4816 "offset of GetProgramInfoLog bucket_id should be 8");
4818 struct GetRenderbufferParameteriv {
4819 typedef GetRenderbufferParameteriv ValueType;
4820 static const CommandId kCmdId = kGetRenderbufferParameteriv;
4821 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4822 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4824 typedef SizedResult<GLint> Result;
4826 static uint32_t ComputeSize() {
4827 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4830 void SetHeader() { header.SetCmd<ValueType>(); }
4832 void Init(GLenum _target,
4833 GLenum _pname,
4834 uint32_t _params_shm_id,
4835 uint32_t _params_shm_offset) {
4836 SetHeader();
4837 target = _target;
4838 pname = _pname;
4839 params_shm_id = _params_shm_id;
4840 params_shm_offset = _params_shm_offset;
4843 void* Set(void* cmd,
4844 GLenum _target,
4845 GLenum _pname,
4846 uint32_t _params_shm_id,
4847 uint32_t _params_shm_offset) {
4848 static_cast<ValueType*>(cmd)
4849 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4850 return NextCmdAddress<ValueType>(cmd);
4853 gpu::CommandHeader header;
4854 uint32_t target;
4855 uint32_t pname;
4856 uint32_t params_shm_id;
4857 uint32_t params_shm_offset;
4860 static_assert(sizeof(GetRenderbufferParameteriv) == 20,
4861 "size of GetRenderbufferParameteriv should be 20");
4862 static_assert(offsetof(GetRenderbufferParameteriv, header) == 0,
4863 "offset of GetRenderbufferParameteriv header should be 0");
4864 static_assert(offsetof(GetRenderbufferParameteriv, target) == 4,
4865 "offset of GetRenderbufferParameteriv target should be 4");
4866 static_assert(offsetof(GetRenderbufferParameteriv, pname) == 8,
4867 "offset of GetRenderbufferParameteriv pname should be 8");
4868 static_assert(
4869 offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
4870 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4871 static_assert(
4872 offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
4873 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4875 struct GetSamplerParameterfv {
4876 typedef GetSamplerParameterfv ValueType;
4877 static const CommandId kCmdId = kGetSamplerParameterfv;
4878 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4879 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4881 typedef SizedResult<GLfloat> Result;
4883 static uint32_t ComputeSize() {
4884 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4887 void SetHeader() { header.SetCmd<ValueType>(); }
4889 void Init(GLuint _sampler,
4890 GLenum _pname,
4891 uint32_t _params_shm_id,
4892 uint32_t _params_shm_offset) {
4893 SetHeader();
4894 sampler = _sampler;
4895 pname = _pname;
4896 params_shm_id = _params_shm_id;
4897 params_shm_offset = _params_shm_offset;
4900 void* Set(void* cmd,
4901 GLuint _sampler,
4902 GLenum _pname,
4903 uint32_t _params_shm_id,
4904 uint32_t _params_shm_offset) {
4905 static_cast<ValueType*>(cmd)
4906 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4907 return NextCmdAddress<ValueType>(cmd);
4910 gpu::CommandHeader header;
4911 uint32_t sampler;
4912 uint32_t pname;
4913 uint32_t params_shm_id;
4914 uint32_t params_shm_offset;
4917 static_assert(sizeof(GetSamplerParameterfv) == 20,
4918 "size of GetSamplerParameterfv should be 20");
4919 static_assert(offsetof(GetSamplerParameterfv, header) == 0,
4920 "offset of GetSamplerParameterfv header should be 0");
4921 static_assert(offsetof(GetSamplerParameterfv, sampler) == 4,
4922 "offset of GetSamplerParameterfv sampler should be 4");
4923 static_assert(offsetof(GetSamplerParameterfv, pname) == 8,
4924 "offset of GetSamplerParameterfv pname should be 8");
4925 static_assert(offsetof(GetSamplerParameterfv, params_shm_id) == 12,
4926 "offset of GetSamplerParameterfv params_shm_id should be 12");
4927 static_assert(offsetof(GetSamplerParameterfv, params_shm_offset) == 16,
4928 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4930 struct GetSamplerParameteriv {
4931 typedef GetSamplerParameteriv ValueType;
4932 static const CommandId kCmdId = kGetSamplerParameteriv;
4933 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4934 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4936 typedef SizedResult<GLint> Result;
4938 static uint32_t ComputeSize() {
4939 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4942 void SetHeader() { header.SetCmd<ValueType>(); }
4944 void Init(GLuint _sampler,
4945 GLenum _pname,
4946 uint32_t _params_shm_id,
4947 uint32_t _params_shm_offset) {
4948 SetHeader();
4949 sampler = _sampler;
4950 pname = _pname;
4951 params_shm_id = _params_shm_id;
4952 params_shm_offset = _params_shm_offset;
4955 void* Set(void* cmd,
4956 GLuint _sampler,
4957 GLenum _pname,
4958 uint32_t _params_shm_id,
4959 uint32_t _params_shm_offset) {
4960 static_cast<ValueType*>(cmd)
4961 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4962 return NextCmdAddress<ValueType>(cmd);
4965 gpu::CommandHeader header;
4966 uint32_t sampler;
4967 uint32_t pname;
4968 uint32_t params_shm_id;
4969 uint32_t params_shm_offset;
4972 static_assert(sizeof(GetSamplerParameteriv) == 20,
4973 "size of GetSamplerParameteriv should be 20");
4974 static_assert(offsetof(GetSamplerParameteriv, header) == 0,
4975 "offset of GetSamplerParameteriv header should be 0");
4976 static_assert(offsetof(GetSamplerParameteriv, sampler) == 4,
4977 "offset of GetSamplerParameteriv sampler should be 4");
4978 static_assert(offsetof(GetSamplerParameteriv, pname) == 8,
4979 "offset of GetSamplerParameteriv pname should be 8");
4980 static_assert(offsetof(GetSamplerParameteriv, params_shm_id) == 12,
4981 "offset of GetSamplerParameteriv params_shm_id should be 12");
4982 static_assert(offsetof(GetSamplerParameteriv, params_shm_offset) == 16,
4983 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4985 struct GetShaderiv {
4986 typedef GetShaderiv ValueType;
4987 static const CommandId kCmdId = kGetShaderiv;
4988 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4989 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4991 typedef SizedResult<GLint> Result;
4993 static uint32_t ComputeSize() {
4994 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4997 void SetHeader() { header.SetCmd<ValueType>(); }
4999 void Init(GLuint _shader,
5000 GLenum _pname,
5001 uint32_t _params_shm_id,
5002 uint32_t _params_shm_offset) {
5003 SetHeader();
5004 shader = _shader;
5005 pname = _pname;
5006 params_shm_id = _params_shm_id;
5007 params_shm_offset = _params_shm_offset;
5010 void* Set(void* cmd,
5011 GLuint _shader,
5012 GLenum _pname,
5013 uint32_t _params_shm_id,
5014 uint32_t _params_shm_offset) {
5015 static_cast<ValueType*>(cmd)
5016 ->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
5017 return NextCmdAddress<ValueType>(cmd);
5020 gpu::CommandHeader header;
5021 uint32_t shader;
5022 uint32_t pname;
5023 uint32_t params_shm_id;
5024 uint32_t params_shm_offset;
5027 static_assert(sizeof(GetShaderiv) == 20, "size of GetShaderiv should be 20");
5028 static_assert(offsetof(GetShaderiv, header) == 0,
5029 "offset of GetShaderiv header should be 0");
5030 static_assert(offsetof(GetShaderiv, shader) == 4,
5031 "offset of GetShaderiv shader should be 4");
5032 static_assert(offsetof(GetShaderiv, pname) == 8,
5033 "offset of GetShaderiv pname should be 8");
5034 static_assert(offsetof(GetShaderiv, params_shm_id) == 12,
5035 "offset of GetShaderiv params_shm_id should be 12");
5036 static_assert(offsetof(GetShaderiv, params_shm_offset) == 16,
5037 "offset of GetShaderiv params_shm_offset should be 16");
5039 struct GetShaderInfoLog {
5040 typedef GetShaderInfoLog ValueType;
5041 static const CommandId kCmdId = kGetShaderInfoLog;
5042 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5043 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5045 static uint32_t ComputeSize() {
5046 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5049 void SetHeader() { header.SetCmd<ValueType>(); }
5051 void Init(GLuint _shader, uint32_t _bucket_id) {
5052 SetHeader();
5053 shader = _shader;
5054 bucket_id = _bucket_id;
5057 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
5058 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
5059 return NextCmdAddress<ValueType>(cmd);
5062 gpu::CommandHeader header;
5063 uint32_t shader;
5064 uint32_t bucket_id;
5067 static_assert(sizeof(GetShaderInfoLog) == 12,
5068 "size of GetShaderInfoLog should be 12");
5069 static_assert(offsetof(GetShaderInfoLog, header) == 0,
5070 "offset of GetShaderInfoLog header should be 0");
5071 static_assert(offsetof(GetShaderInfoLog, shader) == 4,
5072 "offset of GetShaderInfoLog shader should be 4");
5073 static_assert(offsetof(GetShaderInfoLog, bucket_id) == 8,
5074 "offset of GetShaderInfoLog bucket_id should be 8");
5076 struct GetShaderPrecisionFormat {
5077 typedef GetShaderPrecisionFormat ValueType;
5078 static const CommandId kCmdId = kGetShaderPrecisionFormat;
5079 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5080 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5082 struct Result {
5083 int32_t success;
5084 int32_t min_range;
5085 int32_t max_range;
5086 int32_t precision;
5089 static uint32_t ComputeSize() {
5090 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5093 void SetHeader() { header.SetCmd<ValueType>(); }
5095 void Init(GLenum _shadertype,
5096 GLenum _precisiontype,
5097 uint32_t _result_shm_id,
5098 uint32_t _result_shm_offset) {
5099 SetHeader();
5100 shadertype = _shadertype;
5101 precisiontype = _precisiontype;
5102 result_shm_id = _result_shm_id;
5103 result_shm_offset = _result_shm_offset;
5106 void* Set(void* cmd,
5107 GLenum _shadertype,
5108 GLenum _precisiontype,
5109 uint32_t _result_shm_id,
5110 uint32_t _result_shm_offset) {
5111 static_cast<ValueType*>(cmd)
5112 ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
5113 return NextCmdAddress<ValueType>(cmd);
5116 gpu::CommandHeader header;
5117 uint32_t shadertype;
5118 uint32_t precisiontype;
5119 uint32_t result_shm_id;
5120 uint32_t result_shm_offset;
5123 static_assert(sizeof(GetShaderPrecisionFormat) == 20,
5124 "size of GetShaderPrecisionFormat should be 20");
5125 static_assert(offsetof(GetShaderPrecisionFormat, header) == 0,
5126 "offset of GetShaderPrecisionFormat header should be 0");
5127 static_assert(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
5128 "offset of GetShaderPrecisionFormat shadertype should be 4");
5129 static_assert(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
5130 "offset of GetShaderPrecisionFormat precisiontype should be 8");
5131 static_assert(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
5132 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
5133 static_assert(
5134 offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
5135 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
5136 static_assert(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
5137 "offset of GetShaderPrecisionFormat Result success should be "
5138 "0");
5139 static_assert(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
5140 "offset of GetShaderPrecisionFormat Result min_range should be "
5141 "4");
5142 static_assert(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
5143 "offset of GetShaderPrecisionFormat Result max_range should be "
5144 "8");
5145 static_assert(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
5146 "offset of GetShaderPrecisionFormat Result precision should be "
5147 "12");
5149 struct GetShaderSource {
5150 typedef GetShaderSource ValueType;
5151 static const CommandId kCmdId = kGetShaderSource;
5152 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5153 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5155 static uint32_t ComputeSize() {
5156 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5159 void SetHeader() { header.SetCmd<ValueType>(); }
5161 void Init(GLuint _shader, uint32_t _bucket_id) {
5162 SetHeader();
5163 shader = _shader;
5164 bucket_id = _bucket_id;
5167 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
5168 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
5169 return NextCmdAddress<ValueType>(cmd);
5172 gpu::CommandHeader header;
5173 uint32_t shader;
5174 uint32_t bucket_id;
5177 static_assert(sizeof(GetShaderSource) == 12,
5178 "size of GetShaderSource should be 12");
5179 static_assert(offsetof(GetShaderSource, header) == 0,
5180 "offset of GetShaderSource header should be 0");
5181 static_assert(offsetof(GetShaderSource, shader) == 4,
5182 "offset of GetShaderSource shader should be 4");
5183 static_assert(offsetof(GetShaderSource, bucket_id) == 8,
5184 "offset of GetShaderSource bucket_id should be 8");
5186 struct GetString {
5187 typedef GetString ValueType;
5188 static const CommandId kCmdId = kGetString;
5189 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5190 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5192 static uint32_t ComputeSize() {
5193 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5196 void SetHeader() { header.SetCmd<ValueType>(); }
5198 void Init(GLenum _name, uint32_t _bucket_id) {
5199 SetHeader();
5200 name = _name;
5201 bucket_id = _bucket_id;
5204 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) {
5205 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
5206 return NextCmdAddress<ValueType>(cmd);
5209 gpu::CommandHeader header;
5210 uint32_t name;
5211 uint32_t bucket_id;
5214 static_assert(sizeof(GetString) == 12, "size of GetString should be 12");
5215 static_assert(offsetof(GetString, header) == 0,
5216 "offset of GetString header should be 0");
5217 static_assert(offsetof(GetString, name) == 4,
5218 "offset of GetString name should be 4");
5219 static_assert(offsetof(GetString, bucket_id) == 8,
5220 "offset of GetString bucket_id should be 8");
5222 struct GetSynciv {
5223 typedef GetSynciv ValueType;
5224 static const CommandId kCmdId = kGetSynciv;
5225 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5226 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5228 typedef SizedResult<GLint> Result;
5230 static uint32_t ComputeSize() {
5231 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5234 void SetHeader() { header.SetCmd<ValueType>(); }
5236 void Init(GLuint _sync,
5237 GLenum _pname,
5238 uint32_t _values_shm_id,
5239 uint32_t _values_shm_offset) {
5240 SetHeader();
5241 sync = _sync;
5242 pname = _pname;
5243 values_shm_id = _values_shm_id;
5244 values_shm_offset = _values_shm_offset;
5247 void* Set(void* cmd,
5248 GLuint _sync,
5249 GLenum _pname,
5250 uint32_t _values_shm_id,
5251 uint32_t _values_shm_offset) {
5252 static_cast<ValueType*>(cmd)
5253 ->Init(_sync, _pname, _values_shm_id, _values_shm_offset);
5254 return NextCmdAddress<ValueType>(cmd);
5257 gpu::CommandHeader header;
5258 uint32_t sync;
5259 uint32_t pname;
5260 uint32_t values_shm_id;
5261 uint32_t values_shm_offset;
5264 static_assert(sizeof(GetSynciv) == 20, "size of GetSynciv should be 20");
5265 static_assert(offsetof(GetSynciv, header) == 0,
5266 "offset of GetSynciv header should be 0");
5267 static_assert(offsetof(GetSynciv, sync) == 4,
5268 "offset of GetSynciv sync should be 4");
5269 static_assert(offsetof(GetSynciv, pname) == 8,
5270 "offset of GetSynciv pname should be 8");
5271 static_assert(offsetof(GetSynciv, values_shm_id) == 12,
5272 "offset of GetSynciv values_shm_id should be 12");
5273 static_assert(offsetof(GetSynciv, values_shm_offset) == 16,
5274 "offset of GetSynciv values_shm_offset should be 16");
5276 struct GetTexParameterfv {
5277 typedef GetTexParameterfv ValueType;
5278 static const CommandId kCmdId = kGetTexParameterfv;
5279 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5280 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5282 typedef SizedResult<GLfloat> Result;
5284 static uint32_t ComputeSize() {
5285 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5288 void SetHeader() { header.SetCmd<ValueType>(); }
5290 void Init(GLenum _target,
5291 GLenum _pname,
5292 uint32_t _params_shm_id,
5293 uint32_t _params_shm_offset) {
5294 SetHeader();
5295 target = _target;
5296 pname = _pname;
5297 params_shm_id = _params_shm_id;
5298 params_shm_offset = _params_shm_offset;
5301 void* Set(void* cmd,
5302 GLenum _target,
5303 GLenum _pname,
5304 uint32_t _params_shm_id,
5305 uint32_t _params_shm_offset) {
5306 static_cast<ValueType*>(cmd)
5307 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5308 return NextCmdAddress<ValueType>(cmd);
5311 gpu::CommandHeader header;
5312 uint32_t target;
5313 uint32_t pname;
5314 uint32_t params_shm_id;
5315 uint32_t params_shm_offset;
5318 static_assert(sizeof(GetTexParameterfv) == 20,
5319 "size of GetTexParameterfv should be 20");
5320 static_assert(offsetof(GetTexParameterfv, header) == 0,
5321 "offset of GetTexParameterfv header should be 0");
5322 static_assert(offsetof(GetTexParameterfv, target) == 4,
5323 "offset of GetTexParameterfv target should be 4");
5324 static_assert(offsetof(GetTexParameterfv, pname) == 8,
5325 "offset of GetTexParameterfv pname should be 8");
5326 static_assert(offsetof(GetTexParameterfv, params_shm_id) == 12,
5327 "offset of GetTexParameterfv params_shm_id should be 12");
5328 static_assert(offsetof(GetTexParameterfv, params_shm_offset) == 16,
5329 "offset of GetTexParameterfv params_shm_offset should be 16");
5331 struct GetTexParameteriv {
5332 typedef GetTexParameteriv ValueType;
5333 static const CommandId kCmdId = kGetTexParameteriv;
5334 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5335 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5337 typedef SizedResult<GLint> Result;
5339 static uint32_t ComputeSize() {
5340 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5343 void SetHeader() { header.SetCmd<ValueType>(); }
5345 void Init(GLenum _target,
5346 GLenum _pname,
5347 uint32_t _params_shm_id,
5348 uint32_t _params_shm_offset) {
5349 SetHeader();
5350 target = _target;
5351 pname = _pname;
5352 params_shm_id = _params_shm_id;
5353 params_shm_offset = _params_shm_offset;
5356 void* Set(void* cmd,
5357 GLenum _target,
5358 GLenum _pname,
5359 uint32_t _params_shm_id,
5360 uint32_t _params_shm_offset) {
5361 static_cast<ValueType*>(cmd)
5362 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5363 return NextCmdAddress<ValueType>(cmd);
5366 gpu::CommandHeader header;
5367 uint32_t target;
5368 uint32_t pname;
5369 uint32_t params_shm_id;
5370 uint32_t params_shm_offset;
5373 static_assert(sizeof(GetTexParameteriv) == 20,
5374 "size of GetTexParameteriv should be 20");
5375 static_assert(offsetof(GetTexParameteriv, header) == 0,
5376 "offset of GetTexParameteriv header should be 0");
5377 static_assert(offsetof(GetTexParameteriv, target) == 4,
5378 "offset of GetTexParameteriv target should be 4");
5379 static_assert(offsetof(GetTexParameteriv, pname) == 8,
5380 "offset of GetTexParameteriv pname should be 8");
5381 static_assert(offsetof(GetTexParameteriv, params_shm_id) == 12,
5382 "offset of GetTexParameteriv params_shm_id should be 12");
5383 static_assert(offsetof(GetTexParameteriv, params_shm_offset) == 16,
5384 "offset of GetTexParameteriv params_shm_offset should be 16");
5386 struct GetTransformFeedbackVarying {
5387 typedef GetTransformFeedbackVarying ValueType;
5388 static const CommandId kCmdId = kGetTransformFeedbackVarying;
5389 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5390 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5392 struct Result {
5393 int32_t success;
5394 int32_t size;
5395 uint32_t type;
5398 static uint32_t ComputeSize() {
5399 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5402 void SetHeader() { header.SetCmd<ValueType>(); }
5404 void Init(GLuint _program,
5405 GLuint _index,
5406 uint32_t _name_bucket_id,
5407 uint32_t _result_shm_id,
5408 uint32_t _result_shm_offset) {
5409 SetHeader();
5410 program = _program;
5411 index = _index;
5412 name_bucket_id = _name_bucket_id;
5413 result_shm_id = _result_shm_id;
5414 result_shm_offset = _result_shm_offset;
5417 void* Set(void* cmd,
5418 GLuint _program,
5419 GLuint _index,
5420 uint32_t _name_bucket_id,
5421 uint32_t _result_shm_id,
5422 uint32_t _result_shm_offset) {
5423 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
5424 _result_shm_id, _result_shm_offset);
5425 return NextCmdAddress<ValueType>(cmd);
5428 gpu::CommandHeader header;
5429 uint32_t program;
5430 uint32_t index;
5431 uint32_t name_bucket_id;
5432 uint32_t result_shm_id;
5433 uint32_t result_shm_offset;
5436 static_assert(sizeof(GetTransformFeedbackVarying) == 24,
5437 "size of GetTransformFeedbackVarying should be 24");
5438 static_assert(offsetof(GetTransformFeedbackVarying, header) == 0,
5439 "offset of GetTransformFeedbackVarying header should be 0");
5440 static_assert(offsetof(GetTransformFeedbackVarying, program) == 4,
5441 "offset of GetTransformFeedbackVarying program should be 4");
5442 static_assert(offsetof(GetTransformFeedbackVarying, index) == 8,
5443 "offset of GetTransformFeedbackVarying index should be 8");
5444 static_assert(
5445 offsetof(GetTransformFeedbackVarying, name_bucket_id) == 12,
5446 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
5447 static_assert(
5448 offsetof(GetTransformFeedbackVarying, result_shm_id) == 16,
5449 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
5450 static_assert(
5451 offsetof(GetTransformFeedbackVarying, result_shm_offset) == 20,
5452 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
5453 static_assert(offsetof(GetTransformFeedbackVarying::Result, success) == 0,
5454 "offset of GetTransformFeedbackVarying Result success should be "
5455 "0");
5456 static_assert(offsetof(GetTransformFeedbackVarying::Result, size) == 4,
5457 "offset of GetTransformFeedbackVarying Result size should be "
5458 "4");
5459 static_assert(offsetof(GetTransformFeedbackVarying::Result, type) == 8,
5460 "offset of GetTransformFeedbackVarying Result type should be "
5461 "8");
5463 struct GetUniformBlockIndex {
5464 typedef GetUniformBlockIndex ValueType;
5465 static const CommandId kCmdId = kGetUniformBlockIndex;
5466 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5467 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5469 typedef GLuint Result;
5471 static uint32_t ComputeSize() {
5472 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5475 void SetHeader() { header.SetCmd<ValueType>(); }
5477 void Init(GLuint _program,
5478 uint32_t _name_bucket_id,
5479 uint32_t _index_shm_id,
5480 uint32_t _index_shm_offset) {
5481 SetHeader();
5482 program = _program;
5483 name_bucket_id = _name_bucket_id;
5484 index_shm_id = _index_shm_id;
5485 index_shm_offset = _index_shm_offset;
5488 void* Set(void* cmd,
5489 GLuint _program,
5490 uint32_t _name_bucket_id,
5491 uint32_t _index_shm_id,
5492 uint32_t _index_shm_offset) {
5493 static_cast<ValueType*>(cmd)
5494 ->Init(_program, _name_bucket_id, _index_shm_id, _index_shm_offset);
5495 return NextCmdAddress<ValueType>(cmd);
5498 gpu::CommandHeader header;
5499 uint32_t program;
5500 uint32_t name_bucket_id;
5501 uint32_t index_shm_id;
5502 uint32_t index_shm_offset;
5505 static_assert(sizeof(GetUniformBlockIndex) == 20,
5506 "size of GetUniformBlockIndex should be 20");
5507 static_assert(offsetof(GetUniformBlockIndex, header) == 0,
5508 "offset of GetUniformBlockIndex header should be 0");
5509 static_assert(offsetof(GetUniformBlockIndex, program) == 4,
5510 "offset of GetUniformBlockIndex program should be 4");
5511 static_assert(offsetof(GetUniformBlockIndex, name_bucket_id) == 8,
5512 "offset of GetUniformBlockIndex name_bucket_id should be 8");
5513 static_assert(offsetof(GetUniformBlockIndex, index_shm_id) == 12,
5514 "offset of GetUniformBlockIndex index_shm_id should be 12");
5515 static_assert(offsetof(GetUniformBlockIndex, index_shm_offset) == 16,
5516 "offset of GetUniformBlockIndex index_shm_offset should be 16");
5518 struct GetUniformfv {
5519 typedef GetUniformfv ValueType;
5520 static const CommandId kCmdId = kGetUniformfv;
5521 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5522 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5524 typedef SizedResult<GLfloat> Result;
5526 static uint32_t ComputeSize() {
5527 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5530 void SetHeader() { header.SetCmd<ValueType>(); }
5532 void Init(GLuint _program,
5533 GLint _location,
5534 uint32_t _params_shm_id,
5535 uint32_t _params_shm_offset) {
5536 SetHeader();
5537 program = _program;
5538 location = _location;
5539 params_shm_id = _params_shm_id;
5540 params_shm_offset = _params_shm_offset;
5543 void* Set(void* cmd,
5544 GLuint _program,
5545 GLint _location,
5546 uint32_t _params_shm_id,
5547 uint32_t _params_shm_offset) {
5548 static_cast<ValueType*>(cmd)
5549 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5550 return NextCmdAddress<ValueType>(cmd);
5553 gpu::CommandHeader header;
5554 uint32_t program;
5555 int32_t location;
5556 uint32_t params_shm_id;
5557 uint32_t params_shm_offset;
5560 static_assert(sizeof(GetUniformfv) == 20, "size of GetUniformfv should be 20");
5561 static_assert(offsetof(GetUniformfv, header) == 0,
5562 "offset of GetUniformfv header should be 0");
5563 static_assert(offsetof(GetUniformfv, program) == 4,
5564 "offset of GetUniformfv program should be 4");
5565 static_assert(offsetof(GetUniformfv, location) == 8,
5566 "offset of GetUniformfv location should be 8");
5567 static_assert(offsetof(GetUniformfv, params_shm_id) == 12,
5568 "offset of GetUniformfv params_shm_id should be 12");
5569 static_assert(offsetof(GetUniformfv, params_shm_offset) == 16,
5570 "offset of GetUniformfv params_shm_offset should be 16");
5572 struct GetUniformiv {
5573 typedef GetUniformiv ValueType;
5574 static const CommandId kCmdId = kGetUniformiv;
5575 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5576 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5578 typedef SizedResult<GLint> Result;
5580 static uint32_t ComputeSize() {
5581 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5584 void SetHeader() { header.SetCmd<ValueType>(); }
5586 void Init(GLuint _program,
5587 GLint _location,
5588 uint32_t _params_shm_id,
5589 uint32_t _params_shm_offset) {
5590 SetHeader();
5591 program = _program;
5592 location = _location;
5593 params_shm_id = _params_shm_id;
5594 params_shm_offset = _params_shm_offset;
5597 void* Set(void* cmd,
5598 GLuint _program,
5599 GLint _location,
5600 uint32_t _params_shm_id,
5601 uint32_t _params_shm_offset) {
5602 static_cast<ValueType*>(cmd)
5603 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5604 return NextCmdAddress<ValueType>(cmd);
5607 gpu::CommandHeader header;
5608 uint32_t program;
5609 int32_t location;
5610 uint32_t params_shm_id;
5611 uint32_t params_shm_offset;
5614 static_assert(sizeof(GetUniformiv) == 20, "size of GetUniformiv should be 20");
5615 static_assert(offsetof(GetUniformiv, header) == 0,
5616 "offset of GetUniformiv header should be 0");
5617 static_assert(offsetof(GetUniformiv, program) == 4,
5618 "offset of GetUniformiv program should be 4");
5619 static_assert(offsetof(GetUniformiv, location) == 8,
5620 "offset of GetUniformiv location should be 8");
5621 static_assert(offsetof(GetUniformiv, params_shm_id) == 12,
5622 "offset of GetUniformiv params_shm_id should be 12");
5623 static_assert(offsetof(GetUniformiv, params_shm_offset) == 16,
5624 "offset of GetUniformiv params_shm_offset should be 16");
5626 struct GetUniformuiv {
5627 typedef GetUniformuiv ValueType;
5628 static const CommandId kCmdId = kGetUniformuiv;
5629 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5630 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5632 typedef SizedResult<GLuint> Result;
5634 static uint32_t ComputeSize() {
5635 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5638 void SetHeader() { header.SetCmd<ValueType>(); }
5640 void Init(GLuint _program,
5641 GLint _location,
5642 uint32_t _params_shm_id,
5643 uint32_t _params_shm_offset) {
5644 SetHeader();
5645 program = _program;
5646 location = _location;
5647 params_shm_id = _params_shm_id;
5648 params_shm_offset = _params_shm_offset;
5651 void* Set(void* cmd,
5652 GLuint _program,
5653 GLint _location,
5654 uint32_t _params_shm_id,
5655 uint32_t _params_shm_offset) {
5656 static_cast<ValueType*>(cmd)
5657 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5658 return NextCmdAddress<ValueType>(cmd);
5661 gpu::CommandHeader header;
5662 uint32_t program;
5663 int32_t location;
5664 uint32_t params_shm_id;
5665 uint32_t params_shm_offset;
5668 static_assert(sizeof(GetUniformuiv) == 20,
5669 "size of GetUniformuiv should be 20");
5670 static_assert(offsetof(GetUniformuiv, header) == 0,
5671 "offset of GetUniformuiv header should be 0");
5672 static_assert(offsetof(GetUniformuiv, program) == 4,
5673 "offset of GetUniformuiv program should be 4");
5674 static_assert(offsetof(GetUniformuiv, location) == 8,
5675 "offset of GetUniformuiv location should be 8");
5676 static_assert(offsetof(GetUniformuiv, params_shm_id) == 12,
5677 "offset of GetUniformuiv params_shm_id should be 12");
5678 static_assert(offsetof(GetUniformuiv, params_shm_offset) == 16,
5679 "offset of GetUniformuiv params_shm_offset should be 16");
5681 struct GetUniformIndices {
5682 typedef GetUniformIndices ValueType;
5683 static const CommandId kCmdId = kGetUniformIndices;
5684 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5685 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5687 typedef SizedResult<GLuint> Result;
5689 static uint32_t ComputeSize() {
5690 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5693 void SetHeader() { header.SetCmd<ValueType>(); }
5695 void Init(GLuint _program,
5696 uint32_t _names_bucket_id,
5697 uint32_t _indices_shm_id,
5698 uint32_t _indices_shm_offset) {
5699 SetHeader();
5700 program = _program;
5701 names_bucket_id = _names_bucket_id;
5702 indices_shm_id = _indices_shm_id;
5703 indices_shm_offset = _indices_shm_offset;
5706 void* Set(void* cmd,
5707 GLuint _program,
5708 uint32_t _names_bucket_id,
5709 uint32_t _indices_shm_id,
5710 uint32_t _indices_shm_offset) {
5711 static_cast<ValueType*>(cmd)->Init(_program, _names_bucket_id,
5712 _indices_shm_id, _indices_shm_offset);
5713 return NextCmdAddress<ValueType>(cmd);
5716 gpu::CommandHeader header;
5717 uint32_t program;
5718 uint32_t names_bucket_id;
5719 uint32_t indices_shm_id;
5720 uint32_t indices_shm_offset;
5723 static_assert(sizeof(GetUniformIndices) == 20,
5724 "size of GetUniformIndices should be 20");
5725 static_assert(offsetof(GetUniformIndices, header) == 0,
5726 "offset of GetUniformIndices header should be 0");
5727 static_assert(offsetof(GetUniformIndices, program) == 4,
5728 "offset of GetUniformIndices program should be 4");
5729 static_assert(offsetof(GetUniformIndices, names_bucket_id) == 8,
5730 "offset of GetUniformIndices names_bucket_id should be 8");
5731 static_assert(offsetof(GetUniformIndices, indices_shm_id) == 12,
5732 "offset of GetUniformIndices indices_shm_id should be 12");
5733 static_assert(offsetof(GetUniformIndices, indices_shm_offset) == 16,
5734 "offset of GetUniformIndices indices_shm_offset should be 16");
5736 struct GetUniformLocation {
5737 typedef GetUniformLocation ValueType;
5738 static const CommandId kCmdId = kGetUniformLocation;
5739 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5740 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5742 typedef GLint Result;
5744 static uint32_t ComputeSize() {
5745 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5748 void SetHeader() { header.SetCmd<ValueType>(); }
5750 void Init(GLuint _program,
5751 uint32_t _name_bucket_id,
5752 uint32_t _location_shm_id,
5753 uint32_t _location_shm_offset) {
5754 SetHeader();
5755 program = _program;
5756 name_bucket_id = _name_bucket_id;
5757 location_shm_id = _location_shm_id;
5758 location_shm_offset = _location_shm_offset;
5761 void* Set(void* cmd,
5762 GLuint _program,
5763 uint32_t _name_bucket_id,
5764 uint32_t _location_shm_id,
5765 uint32_t _location_shm_offset) {
5766 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
5767 _location_shm_id, _location_shm_offset);
5768 return NextCmdAddress<ValueType>(cmd);
5771 gpu::CommandHeader header;
5772 uint32_t program;
5773 uint32_t name_bucket_id;
5774 uint32_t location_shm_id;
5775 uint32_t location_shm_offset;
5778 static_assert(sizeof(GetUniformLocation) == 20,
5779 "size of GetUniformLocation should be 20");
5780 static_assert(offsetof(GetUniformLocation, header) == 0,
5781 "offset of GetUniformLocation header should be 0");
5782 static_assert(offsetof(GetUniformLocation, program) == 4,
5783 "offset of GetUniformLocation program should be 4");
5784 static_assert(offsetof(GetUniformLocation, name_bucket_id) == 8,
5785 "offset of GetUniformLocation name_bucket_id should be 8");
5786 static_assert(offsetof(GetUniformLocation, location_shm_id) == 12,
5787 "offset of GetUniformLocation location_shm_id should be 12");
5788 static_assert(offsetof(GetUniformLocation, location_shm_offset) == 16,
5789 "offset of GetUniformLocation location_shm_offset should be 16");
5791 struct GetVertexAttribfv {
5792 typedef GetVertexAttribfv ValueType;
5793 static const CommandId kCmdId = kGetVertexAttribfv;
5794 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5795 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5797 typedef SizedResult<GLfloat> Result;
5799 static uint32_t ComputeSize() {
5800 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5803 void SetHeader() { header.SetCmd<ValueType>(); }
5805 void Init(GLuint _index,
5806 GLenum _pname,
5807 uint32_t _params_shm_id,
5808 uint32_t _params_shm_offset) {
5809 SetHeader();
5810 index = _index;
5811 pname = _pname;
5812 params_shm_id = _params_shm_id;
5813 params_shm_offset = _params_shm_offset;
5816 void* Set(void* cmd,
5817 GLuint _index,
5818 GLenum _pname,
5819 uint32_t _params_shm_id,
5820 uint32_t _params_shm_offset) {
5821 static_cast<ValueType*>(cmd)
5822 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5823 return NextCmdAddress<ValueType>(cmd);
5826 gpu::CommandHeader header;
5827 uint32_t index;
5828 uint32_t pname;
5829 uint32_t params_shm_id;
5830 uint32_t params_shm_offset;
5833 static_assert(sizeof(GetVertexAttribfv) == 20,
5834 "size of GetVertexAttribfv should be 20");
5835 static_assert(offsetof(GetVertexAttribfv, header) == 0,
5836 "offset of GetVertexAttribfv header should be 0");
5837 static_assert(offsetof(GetVertexAttribfv, index) == 4,
5838 "offset of GetVertexAttribfv index should be 4");
5839 static_assert(offsetof(GetVertexAttribfv, pname) == 8,
5840 "offset of GetVertexAttribfv pname should be 8");
5841 static_assert(offsetof(GetVertexAttribfv, params_shm_id) == 12,
5842 "offset of GetVertexAttribfv params_shm_id should be 12");
5843 static_assert(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
5844 "offset of GetVertexAttribfv params_shm_offset should be 16");
5846 struct GetVertexAttribiv {
5847 typedef GetVertexAttribiv ValueType;
5848 static const CommandId kCmdId = kGetVertexAttribiv;
5849 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5850 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5852 typedef SizedResult<GLint> Result;
5854 static uint32_t ComputeSize() {
5855 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5858 void SetHeader() { header.SetCmd<ValueType>(); }
5860 void Init(GLuint _index,
5861 GLenum _pname,
5862 uint32_t _params_shm_id,
5863 uint32_t _params_shm_offset) {
5864 SetHeader();
5865 index = _index;
5866 pname = _pname;
5867 params_shm_id = _params_shm_id;
5868 params_shm_offset = _params_shm_offset;
5871 void* Set(void* cmd,
5872 GLuint _index,
5873 GLenum _pname,
5874 uint32_t _params_shm_id,
5875 uint32_t _params_shm_offset) {
5876 static_cast<ValueType*>(cmd)
5877 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5878 return NextCmdAddress<ValueType>(cmd);
5881 gpu::CommandHeader header;
5882 uint32_t index;
5883 uint32_t pname;
5884 uint32_t params_shm_id;
5885 uint32_t params_shm_offset;
5888 static_assert(sizeof(GetVertexAttribiv) == 20,
5889 "size of GetVertexAttribiv should be 20");
5890 static_assert(offsetof(GetVertexAttribiv, header) == 0,
5891 "offset of GetVertexAttribiv header should be 0");
5892 static_assert(offsetof(GetVertexAttribiv, index) == 4,
5893 "offset of GetVertexAttribiv index should be 4");
5894 static_assert(offsetof(GetVertexAttribiv, pname) == 8,
5895 "offset of GetVertexAttribiv pname should be 8");
5896 static_assert(offsetof(GetVertexAttribiv, params_shm_id) == 12,
5897 "offset of GetVertexAttribiv params_shm_id should be 12");
5898 static_assert(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
5899 "offset of GetVertexAttribiv params_shm_offset should be 16");
5901 struct GetVertexAttribIiv {
5902 typedef GetVertexAttribIiv ValueType;
5903 static const CommandId kCmdId = kGetVertexAttribIiv;
5904 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5905 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5907 typedef SizedResult<GLint> Result;
5909 static uint32_t ComputeSize() {
5910 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5913 void SetHeader() { header.SetCmd<ValueType>(); }
5915 void Init(GLuint _index,
5916 GLenum _pname,
5917 uint32_t _params_shm_id,
5918 uint32_t _params_shm_offset) {
5919 SetHeader();
5920 index = _index;
5921 pname = _pname;
5922 params_shm_id = _params_shm_id;
5923 params_shm_offset = _params_shm_offset;
5926 void* Set(void* cmd,
5927 GLuint _index,
5928 GLenum _pname,
5929 uint32_t _params_shm_id,
5930 uint32_t _params_shm_offset) {
5931 static_cast<ValueType*>(cmd)
5932 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5933 return NextCmdAddress<ValueType>(cmd);
5936 gpu::CommandHeader header;
5937 uint32_t index;
5938 uint32_t pname;
5939 uint32_t params_shm_id;
5940 uint32_t params_shm_offset;
5943 static_assert(sizeof(GetVertexAttribIiv) == 20,
5944 "size of GetVertexAttribIiv should be 20");
5945 static_assert(offsetof(GetVertexAttribIiv, header) == 0,
5946 "offset of GetVertexAttribIiv header should be 0");
5947 static_assert(offsetof(GetVertexAttribIiv, index) == 4,
5948 "offset of GetVertexAttribIiv index should be 4");
5949 static_assert(offsetof(GetVertexAttribIiv, pname) == 8,
5950 "offset of GetVertexAttribIiv pname should be 8");
5951 static_assert(offsetof(GetVertexAttribIiv, params_shm_id) == 12,
5952 "offset of GetVertexAttribIiv params_shm_id should be 12");
5953 static_assert(offsetof(GetVertexAttribIiv, params_shm_offset) == 16,
5954 "offset of GetVertexAttribIiv params_shm_offset should be 16");
5956 struct GetVertexAttribIuiv {
5957 typedef GetVertexAttribIuiv ValueType;
5958 static const CommandId kCmdId = kGetVertexAttribIuiv;
5959 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5960 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5962 typedef SizedResult<GLuint> Result;
5964 static uint32_t ComputeSize() {
5965 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5968 void SetHeader() { header.SetCmd<ValueType>(); }
5970 void Init(GLuint _index,
5971 GLenum _pname,
5972 uint32_t _params_shm_id,
5973 uint32_t _params_shm_offset) {
5974 SetHeader();
5975 index = _index;
5976 pname = _pname;
5977 params_shm_id = _params_shm_id;
5978 params_shm_offset = _params_shm_offset;
5981 void* Set(void* cmd,
5982 GLuint _index,
5983 GLenum _pname,
5984 uint32_t _params_shm_id,
5985 uint32_t _params_shm_offset) {
5986 static_cast<ValueType*>(cmd)
5987 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5988 return NextCmdAddress<ValueType>(cmd);
5991 gpu::CommandHeader header;
5992 uint32_t index;
5993 uint32_t pname;
5994 uint32_t params_shm_id;
5995 uint32_t params_shm_offset;
5998 static_assert(sizeof(GetVertexAttribIuiv) == 20,
5999 "size of GetVertexAttribIuiv should be 20");
6000 static_assert(offsetof(GetVertexAttribIuiv, header) == 0,
6001 "offset of GetVertexAttribIuiv header should be 0");
6002 static_assert(offsetof(GetVertexAttribIuiv, index) == 4,
6003 "offset of GetVertexAttribIuiv index should be 4");
6004 static_assert(offsetof(GetVertexAttribIuiv, pname) == 8,
6005 "offset of GetVertexAttribIuiv pname should be 8");
6006 static_assert(offsetof(GetVertexAttribIuiv, params_shm_id) == 12,
6007 "offset of GetVertexAttribIuiv params_shm_id should be 12");
6008 static_assert(offsetof(GetVertexAttribIuiv, params_shm_offset) == 16,
6009 "offset of GetVertexAttribIuiv params_shm_offset should be 16");
6011 struct GetVertexAttribPointerv {
6012 typedef GetVertexAttribPointerv ValueType;
6013 static const CommandId kCmdId = kGetVertexAttribPointerv;
6014 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6015 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6017 typedef SizedResult<GLuint> Result;
6019 static uint32_t ComputeSize() {
6020 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6023 void SetHeader() { header.SetCmd<ValueType>(); }
6025 void Init(GLuint _index,
6026 GLenum _pname,
6027 uint32_t _pointer_shm_id,
6028 uint32_t _pointer_shm_offset) {
6029 SetHeader();
6030 index = _index;
6031 pname = _pname;
6032 pointer_shm_id = _pointer_shm_id;
6033 pointer_shm_offset = _pointer_shm_offset;
6036 void* Set(void* cmd,
6037 GLuint _index,
6038 GLenum _pname,
6039 uint32_t _pointer_shm_id,
6040 uint32_t _pointer_shm_offset) {
6041 static_cast<ValueType*>(cmd)
6042 ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
6043 return NextCmdAddress<ValueType>(cmd);
6046 gpu::CommandHeader header;
6047 uint32_t index;
6048 uint32_t pname;
6049 uint32_t pointer_shm_id;
6050 uint32_t pointer_shm_offset;
6053 static_assert(sizeof(GetVertexAttribPointerv) == 20,
6054 "size of GetVertexAttribPointerv should be 20");
6055 static_assert(offsetof(GetVertexAttribPointerv, header) == 0,
6056 "offset of GetVertexAttribPointerv header should be 0");
6057 static_assert(offsetof(GetVertexAttribPointerv, index) == 4,
6058 "offset of GetVertexAttribPointerv index should be 4");
6059 static_assert(offsetof(GetVertexAttribPointerv, pname) == 8,
6060 "offset of GetVertexAttribPointerv pname should be 8");
6061 static_assert(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
6062 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
6063 static_assert(
6064 offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
6065 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
6067 struct Hint {
6068 typedef Hint ValueType;
6069 static const CommandId kCmdId = kHint;
6070 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6071 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6073 static uint32_t ComputeSize() {
6074 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6077 void SetHeader() { header.SetCmd<ValueType>(); }
6079 void Init(GLenum _target, GLenum _mode) {
6080 SetHeader();
6081 target = _target;
6082 mode = _mode;
6085 void* Set(void* cmd, GLenum _target, GLenum _mode) {
6086 static_cast<ValueType*>(cmd)->Init(_target, _mode);
6087 return NextCmdAddress<ValueType>(cmd);
6090 gpu::CommandHeader header;
6091 uint32_t target;
6092 uint32_t mode;
6095 static_assert(sizeof(Hint) == 12, "size of Hint should be 12");
6096 static_assert(offsetof(Hint, header) == 0, "offset of Hint header should be 0");
6097 static_assert(offsetof(Hint, target) == 4, "offset of Hint target should be 4");
6098 static_assert(offsetof(Hint, mode) == 8, "offset of Hint mode should be 8");
6100 struct InvalidateFramebufferImmediate {
6101 typedef InvalidateFramebufferImmediate ValueType;
6102 static const CommandId kCmdId = kInvalidateFramebufferImmediate;
6103 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6104 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6106 static uint32_t ComputeDataSize(GLsizei count) {
6107 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
6110 static uint32_t ComputeSize(GLsizei count) {
6111 return static_cast<uint32_t>(sizeof(ValueType) +
6112 ComputeDataSize(count)); // NOLINT
6115 void SetHeader(GLsizei count) {
6116 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6119 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
6120 SetHeader(_count);
6121 target = _target;
6122 count = _count;
6123 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
6126 void* Set(void* cmd,
6127 GLenum _target,
6128 GLsizei _count,
6129 const GLenum* _attachments) {
6130 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
6131 const uint32_t size = ComputeSize(_count);
6132 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6135 gpu::CommandHeader header;
6136 uint32_t target;
6137 int32_t count;
6140 static_assert(sizeof(InvalidateFramebufferImmediate) == 12,
6141 "size of InvalidateFramebufferImmediate should be 12");
6142 static_assert(offsetof(InvalidateFramebufferImmediate, header) == 0,
6143 "offset of InvalidateFramebufferImmediate header should be 0");
6144 static_assert(offsetof(InvalidateFramebufferImmediate, target) == 4,
6145 "offset of InvalidateFramebufferImmediate target should be 4");
6146 static_assert(offsetof(InvalidateFramebufferImmediate, count) == 8,
6147 "offset of InvalidateFramebufferImmediate count should be 8");
6149 struct InvalidateSubFramebufferImmediate {
6150 typedef InvalidateSubFramebufferImmediate ValueType;
6151 static const CommandId kCmdId = kInvalidateSubFramebufferImmediate;
6152 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6153 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6155 static uint32_t ComputeDataSize(GLsizei count) {
6156 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
6159 static uint32_t ComputeSize(GLsizei count) {
6160 return static_cast<uint32_t>(sizeof(ValueType) +
6161 ComputeDataSize(count)); // NOLINT
6164 void SetHeader(GLsizei count) {
6165 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6168 void Init(GLenum _target,
6169 GLsizei _count,
6170 const GLenum* _attachments,
6171 GLint _x,
6172 GLint _y,
6173 GLsizei _width,
6174 GLsizei _height) {
6175 SetHeader(_count);
6176 target = _target;
6177 count = _count;
6178 x = _x;
6179 y = _y;
6180 width = _width;
6181 height = _height;
6182 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
6185 void* Set(void* cmd,
6186 GLenum _target,
6187 GLsizei _count,
6188 const GLenum* _attachments,
6189 GLint _x,
6190 GLint _y,
6191 GLsizei _width,
6192 GLsizei _height) {
6193 static_cast<ValueType*>(cmd)
6194 ->Init(_target, _count, _attachments, _x, _y, _width, _height);
6195 const uint32_t size = ComputeSize(_count);
6196 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6199 gpu::CommandHeader header;
6200 uint32_t target;
6201 int32_t count;
6202 int32_t x;
6203 int32_t y;
6204 int32_t width;
6205 int32_t height;
6208 static_assert(sizeof(InvalidateSubFramebufferImmediate) == 28,
6209 "size of InvalidateSubFramebufferImmediate should be 28");
6210 static_assert(offsetof(InvalidateSubFramebufferImmediate, header) == 0,
6211 "offset of InvalidateSubFramebufferImmediate header should be 0");
6212 static_assert(offsetof(InvalidateSubFramebufferImmediate, target) == 4,
6213 "offset of InvalidateSubFramebufferImmediate target should be 4");
6214 static_assert(offsetof(InvalidateSubFramebufferImmediate, count) == 8,
6215 "offset of InvalidateSubFramebufferImmediate count should be 8");
6216 static_assert(offsetof(InvalidateSubFramebufferImmediate, x) == 12,
6217 "offset of InvalidateSubFramebufferImmediate x should be 12");
6218 static_assert(offsetof(InvalidateSubFramebufferImmediate, y) == 16,
6219 "offset of InvalidateSubFramebufferImmediate y should be 16");
6220 static_assert(offsetof(InvalidateSubFramebufferImmediate, width) == 20,
6221 "offset of InvalidateSubFramebufferImmediate width should be 20");
6222 static_assert(
6223 offsetof(InvalidateSubFramebufferImmediate, height) == 24,
6224 "offset of InvalidateSubFramebufferImmediate height should be 24");
6226 struct IsBuffer {
6227 typedef IsBuffer ValueType;
6228 static const CommandId kCmdId = kIsBuffer;
6229 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6232 typedef uint32_t Result;
6234 static uint32_t ComputeSize() {
6235 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6238 void SetHeader() { header.SetCmd<ValueType>(); }
6240 void Init(GLuint _buffer,
6241 uint32_t _result_shm_id,
6242 uint32_t _result_shm_offset) {
6243 SetHeader();
6244 buffer = _buffer;
6245 result_shm_id = _result_shm_id;
6246 result_shm_offset = _result_shm_offset;
6249 void* Set(void* cmd,
6250 GLuint _buffer,
6251 uint32_t _result_shm_id,
6252 uint32_t _result_shm_offset) {
6253 static_cast<ValueType*>(cmd)
6254 ->Init(_buffer, _result_shm_id, _result_shm_offset);
6255 return NextCmdAddress<ValueType>(cmd);
6258 gpu::CommandHeader header;
6259 uint32_t buffer;
6260 uint32_t result_shm_id;
6261 uint32_t result_shm_offset;
6264 static_assert(sizeof(IsBuffer) == 16, "size of IsBuffer should be 16");
6265 static_assert(offsetof(IsBuffer, header) == 0,
6266 "offset of IsBuffer header should be 0");
6267 static_assert(offsetof(IsBuffer, buffer) == 4,
6268 "offset of IsBuffer buffer should be 4");
6269 static_assert(offsetof(IsBuffer, result_shm_id) == 8,
6270 "offset of IsBuffer result_shm_id should be 8");
6271 static_assert(offsetof(IsBuffer, result_shm_offset) == 12,
6272 "offset of IsBuffer result_shm_offset should be 12");
6274 struct IsEnabled {
6275 typedef IsEnabled ValueType;
6276 static const CommandId kCmdId = kIsEnabled;
6277 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6278 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6280 typedef uint32_t Result;
6282 static uint32_t ComputeSize() {
6283 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6286 void SetHeader() { header.SetCmd<ValueType>(); }
6288 void Init(GLenum _cap, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
6289 SetHeader();
6290 cap = _cap;
6291 result_shm_id = _result_shm_id;
6292 result_shm_offset = _result_shm_offset;
6295 void* Set(void* cmd,
6296 GLenum _cap,
6297 uint32_t _result_shm_id,
6298 uint32_t _result_shm_offset) {
6299 static_cast<ValueType*>(cmd)
6300 ->Init(_cap, _result_shm_id, _result_shm_offset);
6301 return NextCmdAddress<ValueType>(cmd);
6304 gpu::CommandHeader header;
6305 uint32_t cap;
6306 uint32_t result_shm_id;
6307 uint32_t result_shm_offset;
6310 static_assert(sizeof(IsEnabled) == 16, "size of IsEnabled should be 16");
6311 static_assert(offsetof(IsEnabled, header) == 0,
6312 "offset of IsEnabled header should be 0");
6313 static_assert(offsetof(IsEnabled, cap) == 4,
6314 "offset of IsEnabled cap should be 4");
6315 static_assert(offsetof(IsEnabled, result_shm_id) == 8,
6316 "offset of IsEnabled result_shm_id should be 8");
6317 static_assert(offsetof(IsEnabled, result_shm_offset) == 12,
6318 "offset of IsEnabled result_shm_offset should be 12");
6320 struct IsFramebuffer {
6321 typedef IsFramebuffer ValueType;
6322 static const CommandId kCmdId = kIsFramebuffer;
6323 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6324 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6326 typedef uint32_t Result;
6328 static uint32_t ComputeSize() {
6329 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6332 void SetHeader() { header.SetCmd<ValueType>(); }
6334 void Init(GLuint _framebuffer,
6335 uint32_t _result_shm_id,
6336 uint32_t _result_shm_offset) {
6337 SetHeader();
6338 framebuffer = _framebuffer;
6339 result_shm_id = _result_shm_id;
6340 result_shm_offset = _result_shm_offset;
6343 void* Set(void* cmd,
6344 GLuint _framebuffer,
6345 uint32_t _result_shm_id,
6346 uint32_t _result_shm_offset) {
6347 static_cast<ValueType*>(cmd)
6348 ->Init(_framebuffer, _result_shm_id, _result_shm_offset);
6349 return NextCmdAddress<ValueType>(cmd);
6352 gpu::CommandHeader header;
6353 uint32_t framebuffer;
6354 uint32_t result_shm_id;
6355 uint32_t result_shm_offset;
6358 static_assert(sizeof(IsFramebuffer) == 16,
6359 "size of IsFramebuffer should be 16");
6360 static_assert(offsetof(IsFramebuffer, header) == 0,
6361 "offset of IsFramebuffer header should be 0");
6362 static_assert(offsetof(IsFramebuffer, framebuffer) == 4,
6363 "offset of IsFramebuffer framebuffer should be 4");
6364 static_assert(offsetof(IsFramebuffer, result_shm_id) == 8,
6365 "offset of IsFramebuffer result_shm_id should be 8");
6366 static_assert(offsetof(IsFramebuffer, result_shm_offset) == 12,
6367 "offset of IsFramebuffer result_shm_offset should be 12");
6369 struct IsProgram {
6370 typedef IsProgram ValueType;
6371 static const CommandId kCmdId = kIsProgram;
6372 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6373 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6375 typedef uint32_t Result;
6377 static uint32_t ComputeSize() {
6378 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6381 void SetHeader() { header.SetCmd<ValueType>(); }
6383 void Init(GLuint _program,
6384 uint32_t _result_shm_id,
6385 uint32_t _result_shm_offset) {
6386 SetHeader();
6387 program = _program;
6388 result_shm_id = _result_shm_id;
6389 result_shm_offset = _result_shm_offset;
6392 void* Set(void* cmd,
6393 GLuint _program,
6394 uint32_t _result_shm_id,
6395 uint32_t _result_shm_offset) {
6396 static_cast<ValueType*>(cmd)
6397 ->Init(_program, _result_shm_id, _result_shm_offset);
6398 return NextCmdAddress<ValueType>(cmd);
6401 gpu::CommandHeader header;
6402 uint32_t program;
6403 uint32_t result_shm_id;
6404 uint32_t result_shm_offset;
6407 static_assert(sizeof(IsProgram) == 16, "size of IsProgram should be 16");
6408 static_assert(offsetof(IsProgram, header) == 0,
6409 "offset of IsProgram header should be 0");
6410 static_assert(offsetof(IsProgram, program) == 4,
6411 "offset of IsProgram program should be 4");
6412 static_assert(offsetof(IsProgram, result_shm_id) == 8,
6413 "offset of IsProgram result_shm_id should be 8");
6414 static_assert(offsetof(IsProgram, result_shm_offset) == 12,
6415 "offset of IsProgram result_shm_offset should be 12");
6417 struct IsRenderbuffer {
6418 typedef IsRenderbuffer ValueType;
6419 static const CommandId kCmdId = kIsRenderbuffer;
6420 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6421 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6423 typedef uint32_t Result;
6425 static uint32_t ComputeSize() {
6426 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6429 void SetHeader() { header.SetCmd<ValueType>(); }
6431 void Init(GLuint _renderbuffer,
6432 uint32_t _result_shm_id,
6433 uint32_t _result_shm_offset) {
6434 SetHeader();
6435 renderbuffer = _renderbuffer;
6436 result_shm_id = _result_shm_id;
6437 result_shm_offset = _result_shm_offset;
6440 void* Set(void* cmd,
6441 GLuint _renderbuffer,
6442 uint32_t _result_shm_id,
6443 uint32_t _result_shm_offset) {
6444 static_cast<ValueType*>(cmd)
6445 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
6446 return NextCmdAddress<ValueType>(cmd);
6449 gpu::CommandHeader header;
6450 uint32_t renderbuffer;
6451 uint32_t result_shm_id;
6452 uint32_t result_shm_offset;
6455 static_assert(sizeof(IsRenderbuffer) == 16,
6456 "size of IsRenderbuffer should be 16");
6457 static_assert(offsetof(IsRenderbuffer, header) == 0,
6458 "offset of IsRenderbuffer header should be 0");
6459 static_assert(offsetof(IsRenderbuffer, renderbuffer) == 4,
6460 "offset of IsRenderbuffer renderbuffer should be 4");
6461 static_assert(offsetof(IsRenderbuffer, result_shm_id) == 8,
6462 "offset of IsRenderbuffer result_shm_id should be 8");
6463 static_assert(offsetof(IsRenderbuffer, result_shm_offset) == 12,
6464 "offset of IsRenderbuffer result_shm_offset should be 12");
6466 struct IsSampler {
6467 typedef IsSampler ValueType;
6468 static const CommandId kCmdId = kIsSampler;
6469 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6470 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6472 typedef uint32_t Result;
6474 static uint32_t ComputeSize() {
6475 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6478 void SetHeader() { header.SetCmd<ValueType>(); }
6480 void Init(GLuint _sampler,
6481 uint32_t _result_shm_id,
6482 uint32_t _result_shm_offset) {
6483 SetHeader();
6484 sampler = _sampler;
6485 result_shm_id = _result_shm_id;
6486 result_shm_offset = _result_shm_offset;
6489 void* Set(void* cmd,
6490 GLuint _sampler,
6491 uint32_t _result_shm_id,
6492 uint32_t _result_shm_offset) {
6493 static_cast<ValueType*>(cmd)
6494 ->Init(_sampler, _result_shm_id, _result_shm_offset);
6495 return NextCmdAddress<ValueType>(cmd);
6498 gpu::CommandHeader header;
6499 uint32_t sampler;
6500 uint32_t result_shm_id;
6501 uint32_t result_shm_offset;
6504 static_assert(sizeof(IsSampler) == 16, "size of IsSampler should be 16");
6505 static_assert(offsetof(IsSampler, header) == 0,
6506 "offset of IsSampler header should be 0");
6507 static_assert(offsetof(IsSampler, sampler) == 4,
6508 "offset of IsSampler sampler should be 4");
6509 static_assert(offsetof(IsSampler, result_shm_id) == 8,
6510 "offset of IsSampler result_shm_id should be 8");
6511 static_assert(offsetof(IsSampler, result_shm_offset) == 12,
6512 "offset of IsSampler result_shm_offset should be 12");
6514 struct IsShader {
6515 typedef IsShader ValueType;
6516 static const CommandId kCmdId = kIsShader;
6517 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6518 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6520 typedef uint32_t Result;
6522 static uint32_t ComputeSize() {
6523 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6526 void SetHeader() { header.SetCmd<ValueType>(); }
6528 void Init(GLuint _shader,
6529 uint32_t _result_shm_id,
6530 uint32_t _result_shm_offset) {
6531 SetHeader();
6532 shader = _shader;
6533 result_shm_id = _result_shm_id;
6534 result_shm_offset = _result_shm_offset;
6537 void* Set(void* cmd,
6538 GLuint _shader,
6539 uint32_t _result_shm_id,
6540 uint32_t _result_shm_offset) {
6541 static_cast<ValueType*>(cmd)
6542 ->Init(_shader, _result_shm_id, _result_shm_offset);
6543 return NextCmdAddress<ValueType>(cmd);
6546 gpu::CommandHeader header;
6547 uint32_t shader;
6548 uint32_t result_shm_id;
6549 uint32_t result_shm_offset;
6552 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16");
6553 static_assert(offsetof(IsShader, header) == 0,
6554 "offset of IsShader header should be 0");
6555 static_assert(offsetof(IsShader, shader) == 4,
6556 "offset of IsShader shader should be 4");
6557 static_assert(offsetof(IsShader, result_shm_id) == 8,
6558 "offset of IsShader result_shm_id should be 8");
6559 static_assert(offsetof(IsShader, result_shm_offset) == 12,
6560 "offset of IsShader result_shm_offset should be 12");
6562 struct IsSync {
6563 typedef IsSync ValueType;
6564 static const CommandId kCmdId = kIsSync;
6565 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6568 typedef uint32_t Result;
6570 static uint32_t ComputeSize() {
6571 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6574 void SetHeader() { header.SetCmd<ValueType>(); }
6576 void Init(GLuint _sync,
6577 uint32_t _result_shm_id,
6578 uint32_t _result_shm_offset) {
6579 SetHeader();
6580 sync = _sync;
6581 result_shm_id = _result_shm_id;
6582 result_shm_offset = _result_shm_offset;
6585 void* Set(void* cmd,
6586 GLuint _sync,
6587 uint32_t _result_shm_id,
6588 uint32_t _result_shm_offset) {
6589 static_cast<ValueType*>(cmd)
6590 ->Init(_sync, _result_shm_id, _result_shm_offset);
6591 return NextCmdAddress<ValueType>(cmd);
6594 gpu::CommandHeader header;
6595 uint32_t sync;
6596 uint32_t result_shm_id;
6597 uint32_t result_shm_offset;
6600 static_assert(sizeof(IsSync) == 16, "size of IsSync should be 16");
6601 static_assert(offsetof(IsSync, header) == 0,
6602 "offset of IsSync header should be 0");
6603 static_assert(offsetof(IsSync, sync) == 4, "offset of IsSync sync should be 4");
6604 static_assert(offsetof(IsSync, result_shm_id) == 8,
6605 "offset of IsSync result_shm_id should be 8");
6606 static_assert(offsetof(IsSync, result_shm_offset) == 12,
6607 "offset of IsSync result_shm_offset should be 12");
6609 struct IsTexture {
6610 typedef IsTexture ValueType;
6611 static const CommandId kCmdId = kIsTexture;
6612 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6613 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6615 typedef uint32_t Result;
6617 static uint32_t ComputeSize() {
6618 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6621 void SetHeader() { header.SetCmd<ValueType>(); }
6623 void Init(GLuint _texture,
6624 uint32_t _result_shm_id,
6625 uint32_t _result_shm_offset) {
6626 SetHeader();
6627 texture = _texture;
6628 result_shm_id = _result_shm_id;
6629 result_shm_offset = _result_shm_offset;
6632 void* Set(void* cmd,
6633 GLuint _texture,
6634 uint32_t _result_shm_id,
6635 uint32_t _result_shm_offset) {
6636 static_cast<ValueType*>(cmd)
6637 ->Init(_texture, _result_shm_id, _result_shm_offset);
6638 return NextCmdAddress<ValueType>(cmd);
6641 gpu::CommandHeader header;
6642 uint32_t texture;
6643 uint32_t result_shm_id;
6644 uint32_t result_shm_offset;
6647 static_assert(sizeof(IsTexture) == 16, "size of IsTexture should be 16");
6648 static_assert(offsetof(IsTexture, header) == 0,
6649 "offset of IsTexture header should be 0");
6650 static_assert(offsetof(IsTexture, texture) == 4,
6651 "offset of IsTexture texture should be 4");
6652 static_assert(offsetof(IsTexture, result_shm_id) == 8,
6653 "offset of IsTexture result_shm_id should be 8");
6654 static_assert(offsetof(IsTexture, result_shm_offset) == 12,
6655 "offset of IsTexture result_shm_offset should be 12");
6657 struct IsTransformFeedback {
6658 typedef IsTransformFeedback ValueType;
6659 static const CommandId kCmdId = kIsTransformFeedback;
6660 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6661 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6663 typedef uint32_t Result;
6665 static uint32_t ComputeSize() {
6666 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6669 void SetHeader() { header.SetCmd<ValueType>(); }
6671 void Init(GLuint _transformfeedback,
6672 uint32_t _result_shm_id,
6673 uint32_t _result_shm_offset) {
6674 SetHeader();
6675 transformfeedback = _transformfeedback;
6676 result_shm_id = _result_shm_id;
6677 result_shm_offset = _result_shm_offset;
6680 void* Set(void* cmd,
6681 GLuint _transformfeedback,
6682 uint32_t _result_shm_id,
6683 uint32_t _result_shm_offset) {
6684 static_cast<ValueType*>(cmd)
6685 ->Init(_transformfeedback, _result_shm_id, _result_shm_offset);
6686 return NextCmdAddress<ValueType>(cmd);
6689 gpu::CommandHeader header;
6690 uint32_t transformfeedback;
6691 uint32_t result_shm_id;
6692 uint32_t result_shm_offset;
6695 static_assert(sizeof(IsTransformFeedback) == 16,
6696 "size of IsTransformFeedback should be 16");
6697 static_assert(offsetof(IsTransformFeedback, header) == 0,
6698 "offset of IsTransformFeedback header should be 0");
6699 static_assert(offsetof(IsTransformFeedback, transformfeedback) == 4,
6700 "offset of IsTransformFeedback transformfeedback should be 4");
6701 static_assert(offsetof(IsTransformFeedback, result_shm_id) == 8,
6702 "offset of IsTransformFeedback result_shm_id should be 8");
6703 static_assert(offsetof(IsTransformFeedback, result_shm_offset) == 12,
6704 "offset of IsTransformFeedback result_shm_offset should be 12");
6706 struct LineWidth {
6707 typedef LineWidth ValueType;
6708 static const CommandId kCmdId = kLineWidth;
6709 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6710 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6712 static uint32_t ComputeSize() {
6713 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6716 void SetHeader() { header.SetCmd<ValueType>(); }
6718 void Init(GLfloat _width) {
6719 SetHeader();
6720 width = _width;
6723 void* Set(void* cmd, GLfloat _width) {
6724 static_cast<ValueType*>(cmd)->Init(_width);
6725 return NextCmdAddress<ValueType>(cmd);
6728 gpu::CommandHeader header;
6729 float width;
6732 static_assert(sizeof(LineWidth) == 8, "size of LineWidth should be 8");
6733 static_assert(offsetof(LineWidth, header) == 0,
6734 "offset of LineWidth header should be 0");
6735 static_assert(offsetof(LineWidth, width) == 4,
6736 "offset of LineWidth width should be 4");
6738 struct LinkProgram {
6739 typedef LinkProgram ValueType;
6740 static const CommandId kCmdId = kLinkProgram;
6741 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6742 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
6744 static uint32_t ComputeSize() {
6745 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6748 void SetHeader() { header.SetCmd<ValueType>(); }
6750 void Init(GLuint _program) {
6751 SetHeader();
6752 program = _program;
6755 void* Set(void* cmd, GLuint _program) {
6756 static_cast<ValueType*>(cmd)->Init(_program);
6757 return NextCmdAddress<ValueType>(cmd);
6760 gpu::CommandHeader header;
6761 uint32_t program;
6764 static_assert(sizeof(LinkProgram) == 8, "size of LinkProgram should be 8");
6765 static_assert(offsetof(LinkProgram, header) == 0,
6766 "offset of LinkProgram header should be 0");
6767 static_assert(offsetof(LinkProgram, program) == 4,
6768 "offset of LinkProgram program should be 4");
6770 struct PauseTransformFeedback {
6771 typedef PauseTransformFeedback ValueType;
6772 static const CommandId kCmdId = kPauseTransformFeedback;
6773 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6776 static uint32_t ComputeSize() {
6777 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6780 void SetHeader() { header.SetCmd<ValueType>(); }
6782 void Init() { SetHeader(); }
6784 void* Set(void* cmd) {
6785 static_cast<ValueType*>(cmd)->Init();
6786 return NextCmdAddress<ValueType>(cmd);
6789 gpu::CommandHeader header;
6792 static_assert(sizeof(PauseTransformFeedback) == 4,
6793 "size of PauseTransformFeedback should be 4");
6794 static_assert(offsetof(PauseTransformFeedback, header) == 0,
6795 "offset of PauseTransformFeedback header should be 0");
6797 struct PixelStorei {
6798 typedef PixelStorei ValueType;
6799 static const CommandId kCmdId = kPixelStorei;
6800 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6801 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6803 static uint32_t ComputeSize() {
6804 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6807 void SetHeader() { header.SetCmd<ValueType>(); }
6809 void Init(GLenum _pname, GLint _param) {
6810 SetHeader();
6811 pname = _pname;
6812 param = _param;
6815 void* Set(void* cmd, GLenum _pname, GLint _param) {
6816 static_cast<ValueType*>(cmd)->Init(_pname, _param);
6817 return NextCmdAddress<ValueType>(cmd);
6820 gpu::CommandHeader header;
6821 uint32_t pname;
6822 int32_t param;
6825 static_assert(sizeof(PixelStorei) == 12, "size of PixelStorei should be 12");
6826 static_assert(offsetof(PixelStorei, header) == 0,
6827 "offset of PixelStorei header should be 0");
6828 static_assert(offsetof(PixelStorei, pname) == 4,
6829 "offset of PixelStorei pname should be 4");
6830 static_assert(offsetof(PixelStorei, param) == 8,
6831 "offset of PixelStorei param should be 8");
6833 struct PolygonOffset {
6834 typedef PolygonOffset ValueType;
6835 static const CommandId kCmdId = kPolygonOffset;
6836 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6837 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6839 static uint32_t ComputeSize() {
6840 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6843 void SetHeader() { header.SetCmd<ValueType>(); }
6845 void Init(GLfloat _factor, GLfloat _units) {
6846 SetHeader();
6847 factor = _factor;
6848 units = _units;
6851 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
6852 static_cast<ValueType*>(cmd)->Init(_factor, _units);
6853 return NextCmdAddress<ValueType>(cmd);
6856 gpu::CommandHeader header;
6857 float factor;
6858 float units;
6861 static_assert(sizeof(PolygonOffset) == 12,
6862 "size of PolygonOffset should be 12");
6863 static_assert(offsetof(PolygonOffset, header) == 0,
6864 "offset of PolygonOffset header should be 0");
6865 static_assert(offsetof(PolygonOffset, factor) == 4,
6866 "offset of PolygonOffset factor should be 4");
6867 static_assert(offsetof(PolygonOffset, units) == 8,
6868 "offset of PolygonOffset units should be 8");
6870 struct ReadBuffer {
6871 typedef ReadBuffer ValueType;
6872 static const CommandId kCmdId = kReadBuffer;
6873 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6874 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
6876 static uint32_t ComputeSize() {
6877 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6880 void SetHeader() { header.SetCmd<ValueType>(); }
6882 void Init(GLenum _src) {
6883 SetHeader();
6884 src = _src;
6887 void* Set(void* cmd, GLenum _src) {
6888 static_cast<ValueType*>(cmd)->Init(_src);
6889 return NextCmdAddress<ValueType>(cmd);
6892 gpu::CommandHeader header;
6893 uint32_t src;
6896 static_assert(sizeof(ReadBuffer) == 8, "size of ReadBuffer should be 8");
6897 static_assert(offsetof(ReadBuffer, header) == 0,
6898 "offset of ReadBuffer header should be 0");
6899 static_assert(offsetof(ReadBuffer, src) == 4,
6900 "offset of ReadBuffer src should be 4");
6902 // ReadPixels has the result separated from the pixel buffer so that
6903 // it is easier to specify the result going to some specific place
6904 // that exactly fits the rectangle of pixels.
6905 struct ReadPixels {
6906 typedef ReadPixels ValueType;
6907 static const CommandId kCmdId = kReadPixels;
6908 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6909 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
6911 typedef uint32_t Result;
6913 static uint32_t ComputeSize() {
6914 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6917 void SetHeader() { header.SetCmd<ValueType>(); }
6919 void Init(GLint _x,
6920 GLint _y,
6921 GLsizei _width,
6922 GLsizei _height,
6923 GLenum _format,
6924 GLenum _type,
6925 uint32_t _pixels_shm_id,
6926 uint32_t _pixels_shm_offset,
6927 uint32_t _result_shm_id,
6928 uint32_t _result_shm_offset,
6929 GLboolean _async) {
6930 SetHeader();
6931 x = _x;
6932 y = _y;
6933 width = _width;
6934 height = _height;
6935 format = _format;
6936 type = _type;
6937 pixels_shm_id = _pixels_shm_id;
6938 pixels_shm_offset = _pixels_shm_offset;
6939 result_shm_id = _result_shm_id;
6940 result_shm_offset = _result_shm_offset;
6941 async = _async;
6944 void* Set(void* cmd,
6945 GLint _x,
6946 GLint _y,
6947 GLsizei _width,
6948 GLsizei _height,
6949 GLenum _format,
6950 GLenum _type,
6951 uint32_t _pixels_shm_id,
6952 uint32_t _pixels_shm_offset,
6953 uint32_t _result_shm_id,
6954 uint32_t _result_shm_offset,
6955 GLboolean _async) {
6956 static_cast<ValueType*>(cmd)
6957 ->Init(_x, _y, _width, _height, _format, _type, _pixels_shm_id,
6958 _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
6959 return NextCmdAddress<ValueType>(cmd);
6962 gpu::CommandHeader header;
6963 int32_t x;
6964 int32_t y;
6965 int32_t width;
6966 int32_t height;
6967 uint32_t format;
6968 uint32_t type;
6969 uint32_t pixels_shm_id;
6970 uint32_t pixels_shm_offset;
6971 uint32_t result_shm_id;
6972 uint32_t result_shm_offset;
6973 uint32_t async;
6976 static_assert(sizeof(ReadPixels) == 48, "size of ReadPixels should be 48");
6977 static_assert(offsetof(ReadPixels, header) == 0,
6978 "offset of ReadPixels header should be 0");
6979 static_assert(offsetof(ReadPixels, x) == 4,
6980 "offset of ReadPixels x should be 4");
6981 static_assert(offsetof(ReadPixels, y) == 8,
6982 "offset of ReadPixels y should be 8");
6983 static_assert(offsetof(ReadPixels, width) == 12,
6984 "offset of ReadPixels width should be 12");
6985 static_assert(offsetof(ReadPixels, height) == 16,
6986 "offset of ReadPixels height should be 16");
6987 static_assert(offsetof(ReadPixels, format) == 20,
6988 "offset of ReadPixels format should be 20");
6989 static_assert(offsetof(ReadPixels, type) == 24,
6990 "offset of ReadPixels type should be 24");
6991 static_assert(offsetof(ReadPixels, pixels_shm_id) == 28,
6992 "offset of ReadPixels pixels_shm_id should be 28");
6993 static_assert(offsetof(ReadPixels, pixels_shm_offset) == 32,
6994 "offset of ReadPixels pixels_shm_offset should be 32");
6995 static_assert(offsetof(ReadPixels, result_shm_id) == 36,
6996 "offset of ReadPixels result_shm_id should be 36");
6997 static_assert(offsetof(ReadPixels, result_shm_offset) == 40,
6998 "offset of ReadPixels result_shm_offset should be 40");
6999 static_assert(offsetof(ReadPixels, async) == 44,
7000 "offset of ReadPixels async should be 44");
7002 struct ReleaseShaderCompiler {
7003 typedef ReleaseShaderCompiler ValueType;
7004 static const CommandId kCmdId = kReleaseShaderCompiler;
7005 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7006 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7008 static uint32_t ComputeSize() {
7009 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7012 void SetHeader() { header.SetCmd<ValueType>(); }
7014 void Init() { SetHeader(); }
7016 void* Set(void* cmd) {
7017 static_cast<ValueType*>(cmd)->Init();
7018 return NextCmdAddress<ValueType>(cmd);
7021 gpu::CommandHeader header;
7024 static_assert(sizeof(ReleaseShaderCompiler) == 4,
7025 "size of ReleaseShaderCompiler should be 4");
7026 static_assert(offsetof(ReleaseShaderCompiler, header) == 0,
7027 "offset of ReleaseShaderCompiler header should be 0");
7029 struct RenderbufferStorage {
7030 typedef RenderbufferStorage ValueType;
7031 static const CommandId kCmdId = kRenderbufferStorage;
7032 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
7035 static uint32_t ComputeSize() {
7036 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7039 void SetHeader() { header.SetCmd<ValueType>(); }
7041 void Init(GLenum _target,
7042 GLenum _internalformat,
7043 GLsizei _width,
7044 GLsizei _height) {
7045 SetHeader();
7046 target = _target;
7047 internalformat = _internalformat;
7048 width = _width;
7049 height = _height;
7052 void* Set(void* cmd,
7053 GLenum _target,
7054 GLenum _internalformat,
7055 GLsizei _width,
7056 GLsizei _height) {
7057 static_cast<ValueType*>(cmd)
7058 ->Init(_target, _internalformat, _width, _height);
7059 return NextCmdAddress<ValueType>(cmd);
7062 gpu::CommandHeader header;
7063 uint32_t target;
7064 uint32_t internalformat;
7065 int32_t width;
7066 int32_t height;
7069 static_assert(sizeof(RenderbufferStorage) == 20,
7070 "size of RenderbufferStorage should be 20");
7071 static_assert(offsetof(RenderbufferStorage, header) == 0,
7072 "offset of RenderbufferStorage header should be 0");
7073 static_assert(offsetof(RenderbufferStorage, target) == 4,
7074 "offset of RenderbufferStorage target should be 4");
7075 static_assert(offsetof(RenderbufferStorage, internalformat) == 8,
7076 "offset of RenderbufferStorage internalformat should be 8");
7077 static_assert(offsetof(RenderbufferStorage, width) == 12,
7078 "offset of RenderbufferStorage width should be 12");
7079 static_assert(offsetof(RenderbufferStorage, height) == 16,
7080 "offset of RenderbufferStorage height should be 16");
7082 struct ResumeTransformFeedback {
7083 typedef ResumeTransformFeedback ValueType;
7084 static const CommandId kCmdId = kResumeTransformFeedback;
7085 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7086 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7088 static uint32_t ComputeSize() {
7089 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7092 void SetHeader() { header.SetCmd<ValueType>(); }
7094 void Init() { SetHeader(); }
7096 void* Set(void* cmd) {
7097 static_cast<ValueType*>(cmd)->Init();
7098 return NextCmdAddress<ValueType>(cmd);
7101 gpu::CommandHeader header;
7104 static_assert(sizeof(ResumeTransformFeedback) == 4,
7105 "size of ResumeTransformFeedback should be 4");
7106 static_assert(offsetof(ResumeTransformFeedback, header) == 0,
7107 "offset of ResumeTransformFeedback header should be 0");
7109 struct SampleCoverage {
7110 typedef SampleCoverage ValueType;
7111 static const CommandId kCmdId = kSampleCoverage;
7112 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7115 static uint32_t ComputeSize() {
7116 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7119 void SetHeader() { header.SetCmd<ValueType>(); }
7121 void Init(GLclampf _value, GLboolean _invert) {
7122 SetHeader();
7123 value = _value;
7124 invert = _invert;
7127 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
7128 static_cast<ValueType*>(cmd)->Init(_value, _invert);
7129 return NextCmdAddress<ValueType>(cmd);
7132 gpu::CommandHeader header;
7133 float value;
7134 uint32_t invert;
7137 static_assert(sizeof(SampleCoverage) == 12,
7138 "size of SampleCoverage should be 12");
7139 static_assert(offsetof(SampleCoverage, header) == 0,
7140 "offset of SampleCoverage header should be 0");
7141 static_assert(offsetof(SampleCoverage, value) == 4,
7142 "offset of SampleCoverage value should be 4");
7143 static_assert(offsetof(SampleCoverage, invert) == 8,
7144 "offset of SampleCoverage invert should be 8");
7146 struct SamplerParameterf {
7147 typedef SamplerParameterf ValueType;
7148 static const CommandId kCmdId = kSamplerParameterf;
7149 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7150 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7152 static uint32_t ComputeSize() {
7153 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7156 void SetHeader() { header.SetCmd<ValueType>(); }
7158 void Init(GLuint _sampler, GLenum _pname, GLfloat _param) {
7159 SetHeader();
7160 sampler = _sampler;
7161 pname = _pname;
7162 param = _param;
7165 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLfloat _param) {
7166 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
7167 return NextCmdAddress<ValueType>(cmd);
7170 gpu::CommandHeader header;
7171 uint32_t sampler;
7172 uint32_t pname;
7173 float param;
7176 static_assert(sizeof(SamplerParameterf) == 16,
7177 "size of SamplerParameterf should be 16");
7178 static_assert(offsetof(SamplerParameterf, header) == 0,
7179 "offset of SamplerParameterf header should be 0");
7180 static_assert(offsetof(SamplerParameterf, sampler) == 4,
7181 "offset of SamplerParameterf sampler should be 4");
7182 static_assert(offsetof(SamplerParameterf, pname) == 8,
7183 "offset of SamplerParameterf pname should be 8");
7184 static_assert(offsetof(SamplerParameterf, param) == 12,
7185 "offset of SamplerParameterf param should be 12");
7187 struct SamplerParameterfvImmediate {
7188 typedef SamplerParameterfvImmediate ValueType;
7189 static const CommandId kCmdId = kSamplerParameterfvImmediate;
7190 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7191 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7193 static uint32_t ComputeDataSize() {
7194 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
7197 static uint32_t ComputeSize() {
7198 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7201 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7203 void Init(GLuint _sampler, GLenum _pname, const GLfloat* _params) {
7204 SetHeader();
7205 sampler = _sampler;
7206 pname = _pname;
7207 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7210 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLfloat* _params) {
7211 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
7212 const uint32_t size = ComputeSize();
7213 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7216 gpu::CommandHeader header;
7217 uint32_t sampler;
7218 uint32_t pname;
7221 static_assert(sizeof(SamplerParameterfvImmediate) == 12,
7222 "size of SamplerParameterfvImmediate should be 12");
7223 static_assert(offsetof(SamplerParameterfvImmediate, header) == 0,
7224 "offset of SamplerParameterfvImmediate header should be 0");
7225 static_assert(offsetof(SamplerParameterfvImmediate, sampler) == 4,
7226 "offset of SamplerParameterfvImmediate sampler should be 4");
7227 static_assert(offsetof(SamplerParameterfvImmediate, pname) == 8,
7228 "offset of SamplerParameterfvImmediate pname should be 8");
7230 struct SamplerParameteri {
7231 typedef SamplerParameteri ValueType;
7232 static const CommandId kCmdId = kSamplerParameteri;
7233 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7234 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7236 static uint32_t ComputeSize() {
7237 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7240 void SetHeader() { header.SetCmd<ValueType>(); }
7242 void Init(GLuint _sampler, GLenum _pname, GLint _param) {
7243 SetHeader();
7244 sampler = _sampler;
7245 pname = _pname;
7246 param = _param;
7249 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLint _param) {
7250 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
7251 return NextCmdAddress<ValueType>(cmd);
7254 gpu::CommandHeader header;
7255 uint32_t sampler;
7256 uint32_t pname;
7257 int32_t param;
7260 static_assert(sizeof(SamplerParameteri) == 16,
7261 "size of SamplerParameteri should be 16");
7262 static_assert(offsetof(SamplerParameteri, header) == 0,
7263 "offset of SamplerParameteri header should be 0");
7264 static_assert(offsetof(SamplerParameteri, sampler) == 4,
7265 "offset of SamplerParameteri sampler should be 4");
7266 static_assert(offsetof(SamplerParameteri, pname) == 8,
7267 "offset of SamplerParameteri pname should be 8");
7268 static_assert(offsetof(SamplerParameteri, param) == 12,
7269 "offset of SamplerParameteri param should be 12");
7271 struct SamplerParameterivImmediate {
7272 typedef SamplerParameterivImmediate ValueType;
7273 static const CommandId kCmdId = kSamplerParameterivImmediate;
7274 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7277 static uint32_t ComputeDataSize() {
7278 return static_cast<uint32_t>(sizeof(GLint) * 1);
7281 static uint32_t ComputeSize() {
7282 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7285 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7287 void Init(GLuint _sampler, GLenum _pname, const GLint* _params) {
7288 SetHeader();
7289 sampler = _sampler;
7290 pname = _pname;
7291 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7294 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLint* _params) {
7295 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
7296 const uint32_t size = ComputeSize();
7297 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7300 gpu::CommandHeader header;
7301 uint32_t sampler;
7302 uint32_t pname;
7305 static_assert(sizeof(SamplerParameterivImmediate) == 12,
7306 "size of SamplerParameterivImmediate should be 12");
7307 static_assert(offsetof(SamplerParameterivImmediate, header) == 0,
7308 "offset of SamplerParameterivImmediate header should be 0");
7309 static_assert(offsetof(SamplerParameterivImmediate, sampler) == 4,
7310 "offset of SamplerParameterivImmediate sampler should be 4");
7311 static_assert(offsetof(SamplerParameterivImmediate, pname) == 8,
7312 "offset of SamplerParameterivImmediate pname should be 8");
7314 struct Scissor {
7315 typedef Scissor ValueType;
7316 static const CommandId kCmdId = kScissor;
7317 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7318 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7320 static uint32_t ComputeSize() {
7321 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7324 void SetHeader() { header.SetCmd<ValueType>(); }
7326 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7327 SetHeader();
7328 x = _x;
7329 y = _y;
7330 width = _width;
7331 height = _height;
7334 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7335 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
7336 return NextCmdAddress<ValueType>(cmd);
7339 gpu::CommandHeader header;
7340 int32_t x;
7341 int32_t y;
7342 int32_t width;
7343 int32_t height;
7346 static_assert(sizeof(Scissor) == 20, "size of Scissor should be 20");
7347 static_assert(offsetof(Scissor, header) == 0,
7348 "offset of Scissor header should be 0");
7349 static_assert(offsetof(Scissor, x) == 4, "offset of Scissor x should be 4");
7350 static_assert(offsetof(Scissor, y) == 8, "offset of Scissor y should be 8");
7351 static_assert(offsetof(Scissor, width) == 12,
7352 "offset of Scissor width should be 12");
7353 static_assert(offsetof(Scissor, height) == 16,
7354 "offset of Scissor height should be 16");
7356 struct ShaderBinary {
7357 typedef ShaderBinary ValueType;
7358 static const CommandId kCmdId = kShaderBinary;
7359 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7360 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7362 static uint32_t ComputeSize() {
7363 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7366 void SetHeader() { header.SetCmd<ValueType>(); }
7368 void Init(GLsizei _n,
7369 uint32_t _shaders_shm_id,
7370 uint32_t _shaders_shm_offset,
7371 GLenum _binaryformat,
7372 uint32_t _binary_shm_id,
7373 uint32_t _binary_shm_offset,
7374 GLsizei _length) {
7375 SetHeader();
7376 n = _n;
7377 shaders_shm_id = _shaders_shm_id;
7378 shaders_shm_offset = _shaders_shm_offset;
7379 binaryformat = _binaryformat;
7380 binary_shm_id = _binary_shm_id;
7381 binary_shm_offset = _binary_shm_offset;
7382 length = _length;
7385 void* Set(void* cmd,
7386 GLsizei _n,
7387 uint32_t _shaders_shm_id,
7388 uint32_t _shaders_shm_offset,
7389 GLenum _binaryformat,
7390 uint32_t _binary_shm_id,
7391 uint32_t _binary_shm_offset,
7392 GLsizei _length) {
7393 static_cast<ValueType*>(cmd)->Init(_n, _shaders_shm_id, _shaders_shm_offset,
7394 _binaryformat, _binary_shm_id,
7395 _binary_shm_offset, _length);
7396 return NextCmdAddress<ValueType>(cmd);
7399 gpu::CommandHeader header;
7400 int32_t n;
7401 uint32_t shaders_shm_id;
7402 uint32_t shaders_shm_offset;
7403 uint32_t binaryformat;
7404 uint32_t binary_shm_id;
7405 uint32_t binary_shm_offset;
7406 int32_t length;
7409 static_assert(sizeof(ShaderBinary) == 32, "size of ShaderBinary should be 32");
7410 static_assert(offsetof(ShaderBinary, header) == 0,
7411 "offset of ShaderBinary header should be 0");
7412 static_assert(offsetof(ShaderBinary, n) == 4,
7413 "offset of ShaderBinary n should be 4");
7414 static_assert(offsetof(ShaderBinary, shaders_shm_id) == 8,
7415 "offset of ShaderBinary shaders_shm_id should be 8");
7416 static_assert(offsetof(ShaderBinary, shaders_shm_offset) == 12,
7417 "offset of ShaderBinary shaders_shm_offset should be 12");
7418 static_assert(offsetof(ShaderBinary, binaryformat) == 16,
7419 "offset of ShaderBinary binaryformat should be 16");
7420 static_assert(offsetof(ShaderBinary, binary_shm_id) == 20,
7421 "offset of ShaderBinary binary_shm_id should be 20");
7422 static_assert(offsetof(ShaderBinary, binary_shm_offset) == 24,
7423 "offset of ShaderBinary binary_shm_offset should be 24");
7424 static_assert(offsetof(ShaderBinary, length) == 28,
7425 "offset of ShaderBinary length should be 28");
7427 struct ShaderSourceBucket {
7428 typedef ShaderSourceBucket ValueType;
7429 static const CommandId kCmdId = kShaderSourceBucket;
7430 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7431 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7433 static uint32_t ComputeSize() {
7434 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7437 void SetHeader() { header.SetCmd<ValueType>(); }
7439 void Init(GLuint _shader, uint32_t _str_bucket_id) {
7440 SetHeader();
7441 shader = _shader;
7442 str_bucket_id = _str_bucket_id;
7445 void* Set(void* cmd, GLuint _shader, uint32_t _str_bucket_id) {
7446 static_cast<ValueType*>(cmd)->Init(_shader, _str_bucket_id);
7447 return NextCmdAddress<ValueType>(cmd);
7450 gpu::CommandHeader header;
7451 uint32_t shader;
7452 uint32_t str_bucket_id;
7455 static_assert(sizeof(ShaderSourceBucket) == 12,
7456 "size of ShaderSourceBucket should be 12");
7457 static_assert(offsetof(ShaderSourceBucket, header) == 0,
7458 "offset of ShaderSourceBucket header should be 0");
7459 static_assert(offsetof(ShaderSourceBucket, shader) == 4,
7460 "offset of ShaderSourceBucket shader should be 4");
7461 static_assert(offsetof(ShaderSourceBucket, str_bucket_id) == 8,
7462 "offset of ShaderSourceBucket str_bucket_id should be 8");
7464 struct StencilFunc {
7465 typedef StencilFunc ValueType;
7466 static const CommandId kCmdId = kStencilFunc;
7467 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7468 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7470 static uint32_t ComputeSize() {
7471 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7474 void SetHeader() { header.SetCmd<ValueType>(); }
7476 void Init(GLenum _func, GLint _ref, GLuint _mask) {
7477 SetHeader();
7478 func = _func;
7479 ref = _ref;
7480 mask = _mask;
7483 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
7484 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
7485 return NextCmdAddress<ValueType>(cmd);
7488 gpu::CommandHeader header;
7489 uint32_t func;
7490 int32_t ref;
7491 uint32_t mask;
7494 static_assert(sizeof(StencilFunc) == 16, "size of StencilFunc should be 16");
7495 static_assert(offsetof(StencilFunc, header) == 0,
7496 "offset of StencilFunc header should be 0");
7497 static_assert(offsetof(StencilFunc, func) == 4,
7498 "offset of StencilFunc func should be 4");
7499 static_assert(offsetof(StencilFunc, ref) == 8,
7500 "offset of StencilFunc ref should be 8");
7501 static_assert(offsetof(StencilFunc, mask) == 12,
7502 "offset of StencilFunc mask should be 12");
7504 struct StencilFuncSeparate {
7505 typedef StencilFuncSeparate ValueType;
7506 static const CommandId kCmdId = kStencilFuncSeparate;
7507 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7508 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7510 static uint32_t ComputeSize() {
7511 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7514 void SetHeader() { header.SetCmd<ValueType>(); }
7516 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
7517 SetHeader();
7518 face = _face;
7519 func = _func;
7520 ref = _ref;
7521 mask = _mask;
7524 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
7525 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
7526 return NextCmdAddress<ValueType>(cmd);
7529 gpu::CommandHeader header;
7530 uint32_t face;
7531 uint32_t func;
7532 int32_t ref;
7533 uint32_t mask;
7536 static_assert(sizeof(StencilFuncSeparate) == 20,
7537 "size of StencilFuncSeparate should be 20");
7538 static_assert(offsetof(StencilFuncSeparate, header) == 0,
7539 "offset of StencilFuncSeparate header should be 0");
7540 static_assert(offsetof(StencilFuncSeparate, face) == 4,
7541 "offset of StencilFuncSeparate face should be 4");
7542 static_assert(offsetof(StencilFuncSeparate, func) == 8,
7543 "offset of StencilFuncSeparate func should be 8");
7544 static_assert(offsetof(StencilFuncSeparate, ref) == 12,
7545 "offset of StencilFuncSeparate ref should be 12");
7546 static_assert(offsetof(StencilFuncSeparate, mask) == 16,
7547 "offset of StencilFuncSeparate mask should be 16");
7549 struct StencilMask {
7550 typedef StencilMask ValueType;
7551 static const CommandId kCmdId = kStencilMask;
7552 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7553 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7555 static uint32_t ComputeSize() {
7556 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7559 void SetHeader() { header.SetCmd<ValueType>(); }
7561 void Init(GLuint _mask) {
7562 SetHeader();
7563 mask = _mask;
7566 void* Set(void* cmd, GLuint _mask) {
7567 static_cast<ValueType*>(cmd)->Init(_mask);
7568 return NextCmdAddress<ValueType>(cmd);
7571 gpu::CommandHeader header;
7572 uint32_t mask;
7575 static_assert(sizeof(StencilMask) == 8, "size of StencilMask should be 8");
7576 static_assert(offsetof(StencilMask, header) == 0,
7577 "offset of StencilMask header should be 0");
7578 static_assert(offsetof(StencilMask, mask) == 4,
7579 "offset of StencilMask mask should be 4");
7581 struct StencilMaskSeparate {
7582 typedef StencilMaskSeparate ValueType;
7583 static const CommandId kCmdId = kStencilMaskSeparate;
7584 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7585 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7587 static uint32_t ComputeSize() {
7588 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7591 void SetHeader() { header.SetCmd<ValueType>(); }
7593 void Init(GLenum _face, GLuint _mask) {
7594 SetHeader();
7595 face = _face;
7596 mask = _mask;
7599 void* Set(void* cmd, GLenum _face, GLuint _mask) {
7600 static_cast<ValueType*>(cmd)->Init(_face, _mask);
7601 return NextCmdAddress<ValueType>(cmd);
7604 gpu::CommandHeader header;
7605 uint32_t face;
7606 uint32_t mask;
7609 static_assert(sizeof(StencilMaskSeparate) == 12,
7610 "size of StencilMaskSeparate should be 12");
7611 static_assert(offsetof(StencilMaskSeparate, header) == 0,
7612 "offset of StencilMaskSeparate header should be 0");
7613 static_assert(offsetof(StencilMaskSeparate, face) == 4,
7614 "offset of StencilMaskSeparate face should be 4");
7615 static_assert(offsetof(StencilMaskSeparate, mask) == 8,
7616 "offset of StencilMaskSeparate mask should be 8");
7618 struct StencilOp {
7619 typedef StencilOp ValueType;
7620 static const CommandId kCmdId = kStencilOp;
7621 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7622 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7624 static uint32_t ComputeSize() {
7625 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7628 void SetHeader() { header.SetCmd<ValueType>(); }
7630 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
7631 SetHeader();
7632 fail = _fail;
7633 zfail = _zfail;
7634 zpass = _zpass;
7637 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
7638 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
7639 return NextCmdAddress<ValueType>(cmd);
7642 gpu::CommandHeader header;
7643 uint32_t fail;
7644 uint32_t zfail;
7645 uint32_t zpass;
7648 static_assert(sizeof(StencilOp) == 16, "size of StencilOp should be 16");
7649 static_assert(offsetof(StencilOp, header) == 0,
7650 "offset of StencilOp header should be 0");
7651 static_assert(offsetof(StencilOp, fail) == 4,
7652 "offset of StencilOp fail should be 4");
7653 static_assert(offsetof(StencilOp, zfail) == 8,
7654 "offset of StencilOp zfail should be 8");
7655 static_assert(offsetof(StencilOp, zpass) == 12,
7656 "offset of StencilOp zpass should be 12");
7658 struct StencilOpSeparate {
7659 typedef StencilOpSeparate ValueType;
7660 static const CommandId kCmdId = kStencilOpSeparate;
7661 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7662 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7664 static uint32_t ComputeSize() {
7665 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7668 void SetHeader() { header.SetCmd<ValueType>(); }
7670 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
7671 SetHeader();
7672 face = _face;
7673 fail = _fail;
7674 zfail = _zfail;
7675 zpass = _zpass;
7678 void* Set(void* cmd,
7679 GLenum _face,
7680 GLenum _fail,
7681 GLenum _zfail,
7682 GLenum _zpass) {
7683 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
7684 return NextCmdAddress<ValueType>(cmd);
7687 gpu::CommandHeader header;
7688 uint32_t face;
7689 uint32_t fail;
7690 uint32_t zfail;
7691 uint32_t zpass;
7694 static_assert(sizeof(StencilOpSeparate) == 20,
7695 "size of StencilOpSeparate should be 20");
7696 static_assert(offsetof(StencilOpSeparate, header) == 0,
7697 "offset of StencilOpSeparate header should be 0");
7698 static_assert(offsetof(StencilOpSeparate, face) == 4,
7699 "offset of StencilOpSeparate face should be 4");
7700 static_assert(offsetof(StencilOpSeparate, fail) == 8,
7701 "offset of StencilOpSeparate fail should be 8");
7702 static_assert(offsetof(StencilOpSeparate, zfail) == 12,
7703 "offset of StencilOpSeparate zfail should be 12");
7704 static_assert(offsetof(StencilOpSeparate, zpass) == 16,
7705 "offset of StencilOpSeparate zpass should be 16");
7707 struct TexImage2D {
7708 typedef TexImage2D ValueType;
7709 static const CommandId kCmdId = kTexImage2D;
7710 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7711 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
7713 static uint32_t ComputeSize() {
7714 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7717 void SetHeader() { header.SetCmd<ValueType>(); }
7719 void Init(GLenum _target,
7720 GLint _level,
7721 GLint _internalformat,
7722 GLsizei _width,
7723 GLsizei _height,
7724 GLenum _format,
7725 GLenum _type,
7726 uint32_t _pixels_shm_id,
7727 uint32_t _pixels_shm_offset) {
7728 SetHeader();
7729 target = _target;
7730 level = _level;
7731 internalformat = _internalformat;
7732 width = _width;
7733 height = _height;
7734 format = _format;
7735 type = _type;
7736 pixels_shm_id = _pixels_shm_id;
7737 pixels_shm_offset = _pixels_shm_offset;
7740 void* Set(void* cmd,
7741 GLenum _target,
7742 GLint _level,
7743 GLint _internalformat,
7744 GLsizei _width,
7745 GLsizei _height,
7746 GLenum _format,
7747 GLenum _type,
7748 uint32_t _pixels_shm_id,
7749 uint32_t _pixels_shm_offset) {
7750 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
7751 _height, _format, _type, _pixels_shm_id,
7752 _pixels_shm_offset);
7753 return NextCmdAddress<ValueType>(cmd);
7756 gpu::CommandHeader header;
7757 uint32_t target;
7758 int32_t level;
7759 int32_t internalformat;
7760 int32_t width;
7761 int32_t height;
7762 uint32_t format;
7763 uint32_t type;
7764 uint32_t pixels_shm_id;
7765 uint32_t pixels_shm_offset;
7766 static const int32_t border = 0;
7769 static_assert(sizeof(TexImage2D) == 40, "size of TexImage2D should be 40");
7770 static_assert(offsetof(TexImage2D, header) == 0,
7771 "offset of TexImage2D header should be 0");
7772 static_assert(offsetof(TexImage2D, target) == 4,
7773 "offset of TexImage2D target should be 4");
7774 static_assert(offsetof(TexImage2D, level) == 8,
7775 "offset of TexImage2D level should be 8");
7776 static_assert(offsetof(TexImage2D, internalformat) == 12,
7777 "offset of TexImage2D internalformat should be 12");
7778 static_assert(offsetof(TexImage2D, width) == 16,
7779 "offset of TexImage2D width should be 16");
7780 static_assert(offsetof(TexImage2D, height) == 20,
7781 "offset of TexImage2D height should be 20");
7782 static_assert(offsetof(TexImage2D, format) == 24,
7783 "offset of TexImage2D format should be 24");
7784 static_assert(offsetof(TexImage2D, type) == 28,
7785 "offset of TexImage2D type should be 28");
7786 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32,
7787 "offset of TexImage2D pixels_shm_id should be 32");
7788 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36,
7789 "offset of TexImage2D pixels_shm_offset should be 36");
7791 struct TexImage3D {
7792 typedef TexImage3D ValueType;
7793 static const CommandId kCmdId = kTexImage3D;
7794 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7795 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
7797 static uint32_t ComputeSize() {
7798 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7801 void SetHeader() { header.SetCmd<ValueType>(); }
7803 void Init(GLenum _target,
7804 GLint _level,
7805 GLint _internalformat,
7806 GLsizei _width,
7807 GLsizei _height,
7808 GLsizei _depth,
7809 GLenum _format,
7810 GLenum _type,
7811 uint32_t _pixels_shm_id,
7812 uint32_t _pixels_shm_offset) {
7813 SetHeader();
7814 target = _target;
7815 level = _level;
7816 internalformat = _internalformat;
7817 width = _width;
7818 height = _height;
7819 depth = _depth;
7820 format = _format;
7821 type = _type;
7822 pixels_shm_id = _pixels_shm_id;
7823 pixels_shm_offset = _pixels_shm_offset;
7826 void* Set(void* cmd,
7827 GLenum _target,
7828 GLint _level,
7829 GLint _internalformat,
7830 GLsizei _width,
7831 GLsizei _height,
7832 GLsizei _depth,
7833 GLenum _format,
7834 GLenum _type,
7835 uint32_t _pixels_shm_id,
7836 uint32_t _pixels_shm_offset) {
7837 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
7838 _height, _depth, _format, _type,
7839 _pixels_shm_id, _pixels_shm_offset);
7840 return NextCmdAddress<ValueType>(cmd);
7843 gpu::CommandHeader header;
7844 uint32_t target;
7845 int32_t level;
7846 int32_t internalformat;
7847 int32_t width;
7848 int32_t height;
7849 int32_t depth;
7850 uint32_t format;
7851 uint32_t type;
7852 uint32_t pixels_shm_id;
7853 uint32_t pixels_shm_offset;
7854 static const int32_t border = 0;
7857 static_assert(sizeof(TexImage3D) == 44, "size of TexImage3D should be 44");
7858 static_assert(offsetof(TexImage3D, header) == 0,
7859 "offset of TexImage3D header should be 0");
7860 static_assert(offsetof(TexImage3D, target) == 4,
7861 "offset of TexImage3D target should be 4");
7862 static_assert(offsetof(TexImage3D, level) == 8,
7863 "offset of TexImage3D level should be 8");
7864 static_assert(offsetof(TexImage3D, internalformat) == 12,
7865 "offset of TexImage3D internalformat should be 12");
7866 static_assert(offsetof(TexImage3D, width) == 16,
7867 "offset of TexImage3D width should be 16");
7868 static_assert(offsetof(TexImage3D, height) == 20,
7869 "offset of TexImage3D height should be 20");
7870 static_assert(offsetof(TexImage3D, depth) == 24,
7871 "offset of TexImage3D depth should be 24");
7872 static_assert(offsetof(TexImage3D, format) == 28,
7873 "offset of TexImage3D format should be 28");
7874 static_assert(offsetof(TexImage3D, type) == 32,
7875 "offset of TexImage3D type should be 32");
7876 static_assert(offsetof(TexImage3D, pixels_shm_id) == 36,
7877 "offset of TexImage3D pixels_shm_id should be 36");
7878 static_assert(offsetof(TexImage3D, pixels_shm_offset) == 40,
7879 "offset of TexImage3D pixels_shm_offset should be 40");
7881 struct TexParameterf {
7882 typedef TexParameterf ValueType;
7883 static const CommandId kCmdId = kTexParameterf;
7884 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7885 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7887 static uint32_t ComputeSize() {
7888 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7891 void SetHeader() { header.SetCmd<ValueType>(); }
7893 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
7894 SetHeader();
7895 target = _target;
7896 pname = _pname;
7897 param = _param;
7900 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
7901 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7902 return NextCmdAddress<ValueType>(cmd);
7905 gpu::CommandHeader header;
7906 uint32_t target;
7907 uint32_t pname;
7908 float param;
7911 static_assert(sizeof(TexParameterf) == 16,
7912 "size of TexParameterf should be 16");
7913 static_assert(offsetof(TexParameterf, header) == 0,
7914 "offset of TexParameterf header should be 0");
7915 static_assert(offsetof(TexParameterf, target) == 4,
7916 "offset of TexParameterf target should be 4");
7917 static_assert(offsetof(TexParameterf, pname) == 8,
7918 "offset of TexParameterf pname should be 8");
7919 static_assert(offsetof(TexParameterf, param) == 12,
7920 "offset of TexParameterf param should be 12");
7922 struct TexParameterfvImmediate {
7923 typedef TexParameterfvImmediate ValueType;
7924 static const CommandId kCmdId = kTexParameterfvImmediate;
7925 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7926 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7928 static uint32_t ComputeDataSize() {
7929 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
7932 static uint32_t ComputeSize() {
7933 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7936 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7938 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
7939 SetHeader();
7940 target = _target;
7941 pname = _pname;
7942 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7945 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
7946 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
7947 const uint32_t size = ComputeSize();
7948 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7951 gpu::CommandHeader header;
7952 uint32_t target;
7953 uint32_t pname;
7956 static_assert(sizeof(TexParameterfvImmediate) == 12,
7957 "size of TexParameterfvImmediate should be 12");
7958 static_assert(offsetof(TexParameterfvImmediate, header) == 0,
7959 "offset of TexParameterfvImmediate header should be 0");
7960 static_assert(offsetof(TexParameterfvImmediate, target) == 4,
7961 "offset of TexParameterfvImmediate target should be 4");
7962 static_assert(offsetof(TexParameterfvImmediate, pname) == 8,
7963 "offset of TexParameterfvImmediate pname should be 8");
7965 struct TexParameteri {
7966 typedef TexParameteri ValueType;
7967 static const CommandId kCmdId = kTexParameteri;
7968 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7969 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7971 static uint32_t ComputeSize() {
7972 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7975 void SetHeader() { header.SetCmd<ValueType>(); }
7977 void Init(GLenum _target, GLenum _pname, GLint _param) {
7978 SetHeader();
7979 target = _target;
7980 pname = _pname;
7981 param = _param;
7984 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
7985 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7986 return NextCmdAddress<ValueType>(cmd);
7989 gpu::CommandHeader header;
7990 uint32_t target;
7991 uint32_t pname;
7992 int32_t param;
7995 static_assert(sizeof(TexParameteri) == 16,
7996 "size of TexParameteri should be 16");
7997 static_assert(offsetof(TexParameteri, header) == 0,
7998 "offset of TexParameteri header should be 0");
7999 static_assert(offsetof(TexParameteri, target) == 4,
8000 "offset of TexParameteri target should be 4");
8001 static_assert(offsetof(TexParameteri, pname) == 8,
8002 "offset of TexParameteri pname should be 8");
8003 static_assert(offsetof(TexParameteri, param) == 12,
8004 "offset of TexParameteri param should be 12");
8006 struct TexParameterivImmediate {
8007 typedef TexParameterivImmediate ValueType;
8008 static const CommandId kCmdId = kTexParameterivImmediate;
8009 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8010 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8012 static uint32_t ComputeDataSize() {
8013 return static_cast<uint32_t>(sizeof(GLint) * 1);
8016 static uint32_t ComputeSize() {
8017 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
8020 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
8022 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
8023 SetHeader();
8024 target = _target;
8025 pname = _pname;
8026 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
8029 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
8030 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
8031 const uint32_t size = ComputeSize();
8032 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8035 gpu::CommandHeader header;
8036 uint32_t target;
8037 uint32_t pname;
8040 static_assert(sizeof(TexParameterivImmediate) == 12,
8041 "size of TexParameterivImmediate should be 12");
8042 static_assert(offsetof(TexParameterivImmediate, header) == 0,
8043 "offset of TexParameterivImmediate header should be 0");
8044 static_assert(offsetof(TexParameterivImmediate, target) == 4,
8045 "offset of TexParameterivImmediate target should be 4");
8046 static_assert(offsetof(TexParameterivImmediate, pname) == 8,
8047 "offset of TexParameterivImmediate pname should be 8");
8049 struct TexStorage3D {
8050 typedef TexStorage3D ValueType;
8051 static const CommandId kCmdId = kTexStorage3D;
8052 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8053 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
8055 static uint32_t ComputeSize() {
8056 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8059 void SetHeader() { header.SetCmd<ValueType>(); }
8061 void Init(GLenum _target,
8062 GLsizei _levels,
8063 GLenum _internalFormat,
8064 GLsizei _width,
8065 GLsizei _height,
8066 GLsizei _depth) {
8067 SetHeader();
8068 target = _target;
8069 levels = _levels;
8070 internalFormat = _internalFormat;
8071 width = _width;
8072 height = _height;
8073 depth = _depth;
8076 void* Set(void* cmd,
8077 GLenum _target,
8078 GLsizei _levels,
8079 GLenum _internalFormat,
8080 GLsizei _width,
8081 GLsizei _height,
8082 GLsizei _depth) {
8083 static_cast<ValueType*>(cmd)
8084 ->Init(_target, _levels, _internalFormat, _width, _height, _depth);
8085 return NextCmdAddress<ValueType>(cmd);
8088 gpu::CommandHeader header;
8089 uint32_t target;
8090 int32_t levels;
8091 uint32_t internalFormat;
8092 int32_t width;
8093 int32_t height;
8094 int32_t depth;
8097 static_assert(sizeof(TexStorage3D) == 28, "size of TexStorage3D should be 28");
8098 static_assert(offsetof(TexStorage3D, header) == 0,
8099 "offset of TexStorage3D header should be 0");
8100 static_assert(offsetof(TexStorage3D, target) == 4,
8101 "offset of TexStorage3D target should be 4");
8102 static_assert(offsetof(TexStorage3D, levels) == 8,
8103 "offset of TexStorage3D levels should be 8");
8104 static_assert(offsetof(TexStorage3D, internalFormat) == 12,
8105 "offset of TexStorage3D internalFormat should be 12");
8106 static_assert(offsetof(TexStorage3D, width) == 16,
8107 "offset of TexStorage3D width should be 16");
8108 static_assert(offsetof(TexStorage3D, height) == 20,
8109 "offset of TexStorage3D height should be 20");
8110 static_assert(offsetof(TexStorage3D, depth) == 24,
8111 "offset of TexStorage3D depth should be 24");
8113 struct TexSubImage2D {
8114 typedef TexSubImage2D ValueType;
8115 static const CommandId kCmdId = kTexSubImage2D;
8116 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8117 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
8119 static uint32_t ComputeSize() {
8120 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8123 void SetHeader() { header.SetCmd<ValueType>(); }
8125 void Init(GLenum _target,
8126 GLint _level,
8127 GLint _xoffset,
8128 GLint _yoffset,
8129 GLsizei _width,
8130 GLsizei _height,
8131 GLenum _format,
8132 GLenum _type,
8133 uint32_t _pixels_shm_id,
8134 uint32_t _pixels_shm_offset,
8135 GLboolean _internal) {
8136 SetHeader();
8137 target = _target;
8138 level = _level;
8139 xoffset = _xoffset;
8140 yoffset = _yoffset;
8141 width = _width;
8142 height = _height;
8143 format = _format;
8144 type = _type;
8145 pixels_shm_id = _pixels_shm_id;
8146 pixels_shm_offset = _pixels_shm_offset;
8147 internal = _internal;
8150 void* Set(void* cmd,
8151 GLenum _target,
8152 GLint _level,
8153 GLint _xoffset,
8154 GLint _yoffset,
8155 GLsizei _width,
8156 GLsizei _height,
8157 GLenum _format,
8158 GLenum _type,
8159 uint32_t _pixels_shm_id,
8160 uint32_t _pixels_shm_offset,
8161 GLboolean _internal) {
8162 static_cast<ValueType*>(cmd)
8163 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
8164 _type, _pixels_shm_id, _pixels_shm_offset, _internal);
8165 return NextCmdAddress<ValueType>(cmd);
8168 gpu::CommandHeader header;
8169 uint32_t target;
8170 int32_t level;
8171 int32_t xoffset;
8172 int32_t yoffset;
8173 int32_t width;
8174 int32_t height;
8175 uint32_t format;
8176 uint32_t type;
8177 uint32_t pixels_shm_id;
8178 uint32_t pixels_shm_offset;
8179 uint32_t internal;
8182 static_assert(sizeof(TexSubImage2D) == 48,
8183 "size of TexSubImage2D should be 48");
8184 static_assert(offsetof(TexSubImage2D, header) == 0,
8185 "offset of TexSubImage2D header should be 0");
8186 static_assert(offsetof(TexSubImage2D, target) == 4,
8187 "offset of TexSubImage2D target should be 4");
8188 static_assert(offsetof(TexSubImage2D, level) == 8,
8189 "offset of TexSubImage2D level should be 8");
8190 static_assert(offsetof(TexSubImage2D, xoffset) == 12,
8191 "offset of TexSubImage2D xoffset should be 12");
8192 static_assert(offsetof(TexSubImage2D, yoffset) == 16,
8193 "offset of TexSubImage2D yoffset should be 16");
8194 static_assert(offsetof(TexSubImage2D, width) == 20,
8195 "offset of TexSubImage2D width should be 20");
8196 static_assert(offsetof(TexSubImage2D, height) == 24,
8197 "offset of TexSubImage2D height should be 24");
8198 static_assert(offsetof(TexSubImage2D, format) == 28,
8199 "offset of TexSubImage2D format should be 28");
8200 static_assert(offsetof(TexSubImage2D, type) == 32,
8201 "offset of TexSubImage2D type should be 32");
8202 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36,
8203 "offset of TexSubImage2D pixels_shm_id should be 36");
8204 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
8205 "offset of TexSubImage2D pixels_shm_offset should be 40");
8206 static_assert(offsetof(TexSubImage2D, internal) == 44,
8207 "offset of TexSubImage2D internal should be 44");
8209 struct TexSubImage3D {
8210 typedef TexSubImage3D ValueType;
8211 static const CommandId kCmdId = kTexSubImage3D;
8212 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8213 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
8215 static uint32_t ComputeSize() {
8216 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8219 void SetHeader() { header.SetCmd<ValueType>(); }
8221 void Init(GLenum _target,
8222 GLint _level,
8223 GLint _xoffset,
8224 GLint _yoffset,
8225 GLint _zoffset,
8226 GLsizei _width,
8227 GLsizei _height,
8228 GLsizei _depth,
8229 GLenum _format,
8230 GLenum _type,
8231 uint32_t _pixels_shm_id,
8232 uint32_t _pixels_shm_offset,
8233 GLboolean _internal) {
8234 SetHeader();
8235 target = _target;
8236 level = _level;
8237 xoffset = _xoffset;
8238 yoffset = _yoffset;
8239 zoffset = _zoffset;
8240 width = _width;
8241 height = _height;
8242 depth = _depth;
8243 format = _format;
8244 type = _type;
8245 pixels_shm_id = _pixels_shm_id;
8246 pixels_shm_offset = _pixels_shm_offset;
8247 internal = _internal;
8250 void* Set(void* cmd,
8251 GLenum _target,
8252 GLint _level,
8253 GLint _xoffset,
8254 GLint _yoffset,
8255 GLint _zoffset,
8256 GLsizei _width,
8257 GLsizei _height,
8258 GLsizei _depth,
8259 GLenum _format,
8260 GLenum _type,
8261 uint32_t _pixels_shm_id,
8262 uint32_t _pixels_shm_offset,
8263 GLboolean _internal) {
8264 static_cast<ValueType*>(cmd)->Init(
8265 _target, _level, _xoffset, _yoffset, _zoffset, _width, _height, _depth,
8266 _format, _type, _pixels_shm_id, _pixels_shm_offset, _internal);
8267 return NextCmdAddress<ValueType>(cmd);
8270 gpu::CommandHeader header;
8271 uint32_t target;
8272 int32_t level;
8273 int32_t xoffset;
8274 int32_t yoffset;
8275 int32_t zoffset;
8276 int32_t width;
8277 int32_t height;
8278 int32_t depth;
8279 uint32_t format;
8280 uint32_t type;
8281 uint32_t pixels_shm_id;
8282 uint32_t pixels_shm_offset;
8283 uint32_t internal;
8286 static_assert(sizeof(TexSubImage3D) == 56,
8287 "size of TexSubImage3D should be 56");
8288 static_assert(offsetof(TexSubImage3D, header) == 0,
8289 "offset of TexSubImage3D header should be 0");
8290 static_assert(offsetof(TexSubImage3D, target) == 4,
8291 "offset of TexSubImage3D target should be 4");
8292 static_assert(offsetof(TexSubImage3D, level) == 8,
8293 "offset of TexSubImage3D level should be 8");
8294 static_assert(offsetof(TexSubImage3D, xoffset) == 12,
8295 "offset of TexSubImage3D xoffset should be 12");
8296 static_assert(offsetof(TexSubImage3D, yoffset) == 16,
8297 "offset of TexSubImage3D yoffset should be 16");
8298 static_assert(offsetof(TexSubImage3D, zoffset) == 20,
8299 "offset of TexSubImage3D zoffset should be 20");
8300 static_assert(offsetof(TexSubImage3D, width) == 24,
8301 "offset of TexSubImage3D width should be 24");
8302 static_assert(offsetof(TexSubImage3D, height) == 28,
8303 "offset of TexSubImage3D height should be 28");
8304 static_assert(offsetof(TexSubImage3D, depth) == 32,
8305 "offset of TexSubImage3D depth should be 32");
8306 static_assert(offsetof(TexSubImage3D, format) == 36,
8307 "offset of TexSubImage3D format should be 36");
8308 static_assert(offsetof(TexSubImage3D, type) == 40,
8309 "offset of TexSubImage3D type should be 40");
8310 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44,
8311 "offset of TexSubImage3D pixels_shm_id should be 44");
8312 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48,
8313 "offset of TexSubImage3D pixels_shm_offset should be 48");
8314 static_assert(offsetof(TexSubImage3D, internal) == 52,
8315 "offset of TexSubImage3D internal should be 52");
8317 struct TransformFeedbackVaryingsBucket {
8318 typedef TransformFeedbackVaryingsBucket ValueType;
8319 static const CommandId kCmdId = kTransformFeedbackVaryingsBucket;
8320 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8321 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8323 static uint32_t ComputeSize() {
8324 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8327 void SetHeader() { header.SetCmd<ValueType>(); }
8329 void Init(GLuint _program, uint32_t _varyings_bucket_id, GLenum _buffermode) {
8330 SetHeader();
8331 program = _program;
8332 varyings_bucket_id = _varyings_bucket_id;
8333 buffermode = _buffermode;
8336 void* Set(void* cmd,
8337 GLuint _program,
8338 uint32_t _varyings_bucket_id,
8339 GLenum _buffermode) {
8340 static_cast<ValueType*>(cmd)
8341 ->Init(_program, _varyings_bucket_id, _buffermode);
8342 return NextCmdAddress<ValueType>(cmd);
8345 gpu::CommandHeader header;
8346 uint32_t program;
8347 uint32_t varyings_bucket_id;
8348 uint32_t buffermode;
8351 static_assert(sizeof(TransformFeedbackVaryingsBucket) == 16,
8352 "size of TransformFeedbackVaryingsBucket should be 16");
8353 static_assert(offsetof(TransformFeedbackVaryingsBucket, header) == 0,
8354 "offset of TransformFeedbackVaryingsBucket header should be 0");
8355 static_assert(offsetof(TransformFeedbackVaryingsBucket, program) == 4,
8356 "offset of TransformFeedbackVaryingsBucket program should be 4");
8357 static_assert(
8358 offsetof(TransformFeedbackVaryingsBucket, varyings_bucket_id) == 8,
8359 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
8360 static_assert(
8361 offsetof(TransformFeedbackVaryingsBucket, buffermode) == 12,
8362 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
8364 struct Uniform1f {
8365 typedef Uniform1f ValueType;
8366 static const CommandId kCmdId = kUniform1f;
8367 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8368 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8370 static uint32_t ComputeSize() {
8371 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8374 void SetHeader() { header.SetCmd<ValueType>(); }
8376 void Init(GLint _location, GLfloat _x) {
8377 SetHeader();
8378 location = _location;
8379 x = _x;
8382 void* Set(void* cmd, GLint _location, GLfloat _x) {
8383 static_cast<ValueType*>(cmd)->Init(_location, _x);
8384 return NextCmdAddress<ValueType>(cmd);
8387 gpu::CommandHeader header;
8388 int32_t location;
8389 float x;
8392 static_assert(sizeof(Uniform1f) == 12, "size of Uniform1f should be 12");
8393 static_assert(offsetof(Uniform1f, header) == 0,
8394 "offset of Uniform1f header should be 0");
8395 static_assert(offsetof(Uniform1f, location) == 4,
8396 "offset of Uniform1f location should be 4");
8397 static_assert(offsetof(Uniform1f, x) == 8, "offset of Uniform1f x should be 8");
8399 struct Uniform1fvImmediate {
8400 typedef Uniform1fvImmediate ValueType;
8401 static const CommandId kCmdId = kUniform1fvImmediate;
8402 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8403 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8405 static uint32_t ComputeDataSize(GLsizei count) {
8406 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT
8409 static uint32_t ComputeSize(GLsizei count) {
8410 return static_cast<uint32_t>(sizeof(ValueType) +
8411 ComputeDataSize(count)); // NOLINT
8414 void SetHeader(GLsizei count) {
8415 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8418 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8419 SetHeader(_count);
8420 location = _location;
8421 count = _count;
8422 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8425 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8426 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8427 const uint32_t size = ComputeSize(_count);
8428 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8431 gpu::CommandHeader header;
8432 int32_t location;
8433 int32_t count;
8436 static_assert(sizeof(Uniform1fvImmediate) == 12,
8437 "size of Uniform1fvImmediate should be 12");
8438 static_assert(offsetof(Uniform1fvImmediate, header) == 0,
8439 "offset of Uniform1fvImmediate header should be 0");
8440 static_assert(offsetof(Uniform1fvImmediate, location) == 4,
8441 "offset of Uniform1fvImmediate location should be 4");
8442 static_assert(offsetof(Uniform1fvImmediate, count) == 8,
8443 "offset of Uniform1fvImmediate count should be 8");
8445 struct Uniform1i {
8446 typedef Uniform1i ValueType;
8447 static const CommandId kCmdId = kUniform1i;
8448 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8449 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8451 static uint32_t ComputeSize() {
8452 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8455 void SetHeader() { header.SetCmd<ValueType>(); }
8457 void Init(GLint _location, GLint _x) {
8458 SetHeader();
8459 location = _location;
8460 x = _x;
8463 void* Set(void* cmd, GLint _location, GLint _x) {
8464 static_cast<ValueType*>(cmd)->Init(_location, _x);
8465 return NextCmdAddress<ValueType>(cmd);
8468 gpu::CommandHeader header;
8469 int32_t location;
8470 int32_t x;
8473 static_assert(sizeof(Uniform1i) == 12, "size of Uniform1i should be 12");
8474 static_assert(offsetof(Uniform1i, header) == 0,
8475 "offset of Uniform1i header should be 0");
8476 static_assert(offsetof(Uniform1i, location) == 4,
8477 "offset of Uniform1i location should be 4");
8478 static_assert(offsetof(Uniform1i, x) == 8, "offset of Uniform1i x should be 8");
8480 struct Uniform1ivImmediate {
8481 typedef Uniform1ivImmediate ValueType;
8482 static const CommandId kCmdId = kUniform1ivImmediate;
8483 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8484 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8486 static uint32_t ComputeDataSize(GLsizei count) {
8487 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT
8490 static uint32_t ComputeSize(GLsizei count) {
8491 return static_cast<uint32_t>(sizeof(ValueType) +
8492 ComputeDataSize(count)); // NOLINT
8495 void SetHeader(GLsizei count) {
8496 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8499 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8500 SetHeader(_count);
8501 location = _location;
8502 count = _count;
8503 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8506 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8507 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8508 const uint32_t size = ComputeSize(_count);
8509 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8512 gpu::CommandHeader header;
8513 int32_t location;
8514 int32_t count;
8517 static_assert(sizeof(Uniform1ivImmediate) == 12,
8518 "size of Uniform1ivImmediate should be 12");
8519 static_assert(offsetof(Uniform1ivImmediate, header) == 0,
8520 "offset of Uniform1ivImmediate header should be 0");
8521 static_assert(offsetof(Uniform1ivImmediate, location) == 4,
8522 "offset of Uniform1ivImmediate location should be 4");
8523 static_assert(offsetof(Uniform1ivImmediate, count) == 8,
8524 "offset of Uniform1ivImmediate count should be 8");
8526 struct Uniform1ui {
8527 typedef Uniform1ui ValueType;
8528 static const CommandId kCmdId = kUniform1ui;
8529 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8530 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8532 static uint32_t ComputeSize() {
8533 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8536 void SetHeader() { header.SetCmd<ValueType>(); }
8538 void Init(GLint _location, GLuint _x) {
8539 SetHeader();
8540 location = _location;
8541 x = _x;
8544 void* Set(void* cmd, GLint _location, GLuint _x) {
8545 static_cast<ValueType*>(cmd)->Init(_location, _x);
8546 return NextCmdAddress<ValueType>(cmd);
8549 gpu::CommandHeader header;
8550 int32_t location;
8551 uint32_t x;
8554 static_assert(sizeof(Uniform1ui) == 12, "size of Uniform1ui should be 12");
8555 static_assert(offsetof(Uniform1ui, header) == 0,
8556 "offset of Uniform1ui header should be 0");
8557 static_assert(offsetof(Uniform1ui, location) == 4,
8558 "offset of Uniform1ui location should be 4");
8559 static_assert(offsetof(Uniform1ui, x) == 8,
8560 "offset of Uniform1ui x should be 8");
8562 struct Uniform1uivImmediate {
8563 typedef Uniform1uivImmediate ValueType;
8564 static const CommandId kCmdId = kUniform1uivImmediate;
8565 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8568 static uint32_t ComputeDataSize(GLsizei count) {
8569 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT
8572 static uint32_t ComputeSize(GLsizei count) {
8573 return static_cast<uint32_t>(sizeof(ValueType) +
8574 ComputeDataSize(count)); // NOLINT
8577 void SetHeader(GLsizei count) {
8578 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8581 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8582 SetHeader(_count);
8583 location = _location;
8584 count = _count;
8585 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8588 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8589 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8590 const uint32_t size = ComputeSize(_count);
8591 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8594 gpu::CommandHeader header;
8595 int32_t location;
8596 int32_t count;
8599 static_assert(sizeof(Uniform1uivImmediate) == 12,
8600 "size of Uniform1uivImmediate should be 12");
8601 static_assert(offsetof(Uniform1uivImmediate, header) == 0,
8602 "offset of Uniform1uivImmediate header should be 0");
8603 static_assert(offsetof(Uniform1uivImmediate, location) == 4,
8604 "offset of Uniform1uivImmediate location should be 4");
8605 static_assert(offsetof(Uniform1uivImmediate, count) == 8,
8606 "offset of Uniform1uivImmediate count should be 8");
8608 struct Uniform2f {
8609 typedef Uniform2f ValueType;
8610 static const CommandId kCmdId = kUniform2f;
8611 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8612 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8614 static uint32_t ComputeSize() {
8615 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8618 void SetHeader() { header.SetCmd<ValueType>(); }
8620 void Init(GLint _location, GLfloat _x, GLfloat _y) {
8621 SetHeader();
8622 location = _location;
8623 x = _x;
8624 y = _y;
8627 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
8628 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8629 return NextCmdAddress<ValueType>(cmd);
8632 gpu::CommandHeader header;
8633 int32_t location;
8634 float x;
8635 float y;
8638 static_assert(sizeof(Uniform2f) == 16, "size of Uniform2f should be 16");
8639 static_assert(offsetof(Uniform2f, header) == 0,
8640 "offset of Uniform2f header should be 0");
8641 static_assert(offsetof(Uniform2f, location) == 4,
8642 "offset of Uniform2f location should be 4");
8643 static_assert(offsetof(Uniform2f, x) == 8, "offset of Uniform2f x should be 8");
8644 static_assert(offsetof(Uniform2f, y) == 12,
8645 "offset of Uniform2f y should be 12");
8647 struct Uniform2fvImmediate {
8648 typedef Uniform2fvImmediate ValueType;
8649 static const CommandId kCmdId = kUniform2fvImmediate;
8650 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8651 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8653 static uint32_t ComputeDataSize(GLsizei count) {
8654 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT
8657 static uint32_t ComputeSize(GLsizei count) {
8658 return static_cast<uint32_t>(sizeof(ValueType) +
8659 ComputeDataSize(count)); // NOLINT
8662 void SetHeader(GLsizei count) {
8663 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8666 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8667 SetHeader(_count);
8668 location = _location;
8669 count = _count;
8670 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8673 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8674 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8675 const uint32_t size = ComputeSize(_count);
8676 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8679 gpu::CommandHeader header;
8680 int32_t location;
8681 int32_t count;
8684 static_assert(sizeof(Uniform2fvImmediate) == 12,
8685 "size of Uniform2fvImmediate should be 12");
8686 static_assert(offsetof(Uniform2fvImmediate, header) == 0,
8687 "offset of Uniform2fvImmediate header should be 0");
8688 static_assert(offsetof(Uniform2fvImmediate, location) == 4,
8689 "offset of Uniform2fvImmediate location should be 4");
8690 static_assert(offsetof(Uniform2fvImmediate, count) == 8,
8691 "offset of Uniform2fvImmediate count should be 8");
8693 struct Uniform2i {
8694 typedef Uniform2i ValueType;
8695 static const CommandId kCmdId = kUniform2i;
8696 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8697 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8699 static uint32_t ComputeSize() {
8700 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8703 void SetHeader() { header.SetCmd<ValueType>(); }
8705 void Init(GLint _location, GLint _x, GLint _y) {
8706 SetHeader();
8707 location = _location;
8708 x = _x;
8709 y = _y;
8712 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
8713 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8714 return NextCmdAddress<ValueType>(cmd);
8717 gpu::CommandHeader header;
8718 int32_t location;
8719 int32_t x;
8720 int32_t y;
8723 static_assert(sizeof(Uniform2i) == 16, "size of Uniform2i should be 16");
8724 static_assert(offsetof(Uniform2i, header) == 0,
8725 "offset of Uniform2i header should be 0");
8726 static_assert(offsetof(Uniform2i, location) == 4,
8727 "offset of Uniform2i location should be 4");
8728 static_assert(offsetof(Uniform2i, x) == 8, "offset of Uniform2i x should be 8");
8729 static_assert(offsetof(Uniform2i, y) == 12,
8730 "offset of Uniform2i y should be 12");
8732 struct Uniform2ivImmediate {
8733 typedef Uniform2ivImmediate ValueType;
8734 static const CommandId kCmdId = kUniform2ivImmediate;
8735 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8736 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8738 static uint32_t ComputeDataSize(GLsizei count) {
8739 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT
8742 static uint32_t ComputeSize(GLsizei count) {
8743 return static_cast<uint32_t>(sizeof(ValueType) +
8744 ComputeDataSize(count)); // NOLINT
8747 void SetHeader(GLsizei count) {
8748 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8751 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8752 SetHeader(_count);
8753 location = _location;
8754 count = _count;
8755 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8758 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8759 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8760 const uint32_t size = ComputeSize(_count);
8761 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8764 gpu::CommandHeader header;
8765 int32_t location;
8766 int32_t count;
8769 static_assert(sizeof(Uniform2ivImmediate) == 12,
8770 "size of Uniform2ivImmediate should be 12");
8771 static_assert(offsetof(Uniform2ivImmediate, header) == 0,
8772 "offset of Uniform2ivImmediate header should be 0");
8773 static_assert(offsetof(Uniform2ivImmediate, location) == 4,
8774 "offset of Uniform2ivImmediate location should be 4");
8775 static_assert(offsetof(Uniform2ivImmediate, count) == 8,
8776 "offset of Uniform2ivImmediate count should be 8");
8778 struct Uniform2ui {
8779 typedef Uniform2ui ValueType;
8780 static const CommandId kCmdId = kUniform2ui;
8781 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8782 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8784 static uint32_t ComputeSize() {
8785 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8788 void SetHeader() { header.SetCmd<ValueType>(); }
8790 void Init(GLint _location, GLuint _x, GLuint _y) {
8791 SetHeader();
8792 location = _location;
8793 x = _x;
8794 y = _y;
8797 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y) {
8798 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8799 return NextCmdAddress<ValueType>(cmd);
8802 gpu::CommandHeader header;
8803 int32_t location;
8804 uint32_t x;
8805 uint32_t y;
8808 static_assert(sizeof(Uniform2ui) == 16, "size of Uniform2ui should be 16");
8809 static_assert(offsetof(Uniform2ui, header) == 0,
8810 "offset of Uniform2ui header should be 0");
8811 static_assert(offsetof(Uniform2ui, location) == 4,
8812 "offset of Uniform2ui location should be 4");
8813 static_assert(offsetof(Uniform2ui, x) == 8,
8814 "offset of Uniform2ui x should be 8");
8815 static_assert(offsetof(Uniform2ui, y) == 12,
8816 "offset of Uniform2ui y should be 12");
8818 struct Uniform2uivImmediate {
8819 typedef Uniform2uivImmediate ValueType;
8820 static const CommandId kCmdId = kUniform2uivImmediate;
8821 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8822 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8824 static uint32_t ComputeDataSize(GLsizei count) {
8825 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT
8828 static uint32_t ComputeSize(GLsizei count) {
8829 return static_cast<uint32_t>(sizeof(ValueType) +
8830 ComputeDataSize(count)); // NOLINT
8833 void SetHeader(GLsizei count) {
8834 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8837 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8838 SetHeader(_count);
8839 location = _location;
8840 count = _count;
8841 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8844 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8845 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8846 const uint32_t size = ComputeSize(_count);
8847 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8850 gpu::CommandHeader header;
8851 int32_t location;
8852 int32_t count;
8855 static_assert(sizeof(Uniform2uivImmediate) == 12,
8856 "size of Uniform2uivImmediate should be 12");
8857 static_assert(offsetof(Uniform2uivImmediate, header) == 0,
8858 "offset of Uniform2uivImmediate header should be 0");
8859 static_assert(offsetof(Uniform2uivImmediate, location) == 4,
8860 "offset of Uniform2uivImmediate location should be 4");
8861 static_assert(offsetof(Uniform2uivImmediate, count) == 8,
8862 "offset of Uniform2uivImmediate count should be 8");
8864 struct Uniform3f {
8865 typedef Uniform3f ValueType;
8866 static const CommandId kCmdId = kUniform3f;
8867 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8868 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8870 static uint32_t ComputeSize() {
8871 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8874 void SetHeader() { header.SetCmd<ValueType>(); }
8876 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8877 SetHeader();
8878 location = _location;
8879 x = _x;
8880 y = _y;
8881 z = _z;
8884 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8885 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8886 return NextCmdAddress<ValueType>(cmd);
8889 gpu::CommandHeader header;
8890 int32_t location;
8891 float x;
8892 float y;
8893 float z;
8896 static_assert(sizeof(Uniform3f) == 20, "size of Uniform3f should be 20");
8897 static_assert(offsetof(Uniform3f, header) == 0,
8898 "offset of Uniform3f header should be 0");
8899 static_assert(offsetof(Uniform3f, location) == 4,
8900 "offset of Uniform3f location should be 4");
8901 static_assert(offsetof(Uniform3f, x) == 8, "offset of Uniform3f x should be 8");
8902 static_assert(offsetof(Uniform3f, y) == 12,
8903 "offset of Uniform3f y should be 12");
8904 static_assert(offsetof(Uniform3f, z) == 16,
8905 "offset of Uniform3f z should be 16");
8907 struct Uniform3fvImmediate {
8908 typedef Uniform3fvImmediate ValueType;
8909 static const CommandId kCmdId = kUniform3fvImmediate;
8910 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8911 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8913 static uint32_t ComputeDataSize(GLsizei count) {
8914 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT
8917 static uint32_t ComputeSize(GLsizei count) {
8918 return static_cast<uint32_t>(sizeof(ValueType) +
8919 ComputeDataSize(count)); // NOLINT
8922 void SetHeader(GLsizei count) {
8923 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8926 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8927 SetHeader(_count);
8928 location = _location;
8929 count = _count;
8930 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8933 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8934 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8935 const uint32_t size = ComputeSize(_count);
8936 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8939 gpu::CommandHeader header;
8940 int32_t location;
8941 int32_t count;
8944 static_assert(sizeof(Uniform3fvImmediate) == 12,
8945 "size of Uniform3fvImmediate should be 12");
8946 static_assert(offsetof(Uniform3fvImmediate, header) == 0,
8947 "offset of Uniform3fvImmediate header should be 0");
8948 static_assert(offsetof(Uniform3fvImmediate, location) == 4,
8949 "offset of Uniform3fvImmediate location should be 4");
8950 static_assert(offsetof(Uniform3fvImmediate, count) == 8,
8951 "offset of Uniform3fvImmediate count should be 8");
8953 struct Uniform3i {
8954 typedef Uniform3i ValueType;
8955 static const CommandId kCmdId = kUniform3i;
8956 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8957 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8959 static uint32_t ComputeSize() {
8960 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8963 void SetHeader() { header.SetCmd<ValueType>(); }
8965 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
8966 SetHeader();
8967 location = _location;
8968 x = _x;
8969 y = _y;
8970 z = _z;
8973 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
8974 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8975 return NextCmdAddress<ValueType>(cmd);
8978 gpu::CommandHeader header;
8979 int32_t location;
8980 int32_t x;
8981 int32_t y;
8982 int32_t z;
8985 static_assert(sizeof(Uniform3i) == 20, "size of Uniform3i should be 20");
8986 static_assert(offsetof(Uniform3i, header) == 0,
8987 "offset of Uniform3i header should be 0");
8988 static_assert(offsetof(Uniform3i, location) == 4,
8989 "offset of Uniform3i location should be 4");
8990 static_assert(offsetof(Uniform3i, x) == 8, "offset of Uniform3i x should be 8");
8991 static_assert(offsetof(Uniform3i, y) == 12,
8992 "offset of Uniform3i y should be 12");
8993 static_assert(offsetof(Uniform3i, z) == 16,
8994 "offset of Uniform3i z should be 16");
8996 struct Uniform3ivImmediate {
8997 typedef Uniform3ivImmediate ValueType;
8998 static const CommandId kCmdId = kUniform3ivImmediate;
8999 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9002 static uint32_t ComputeDataSize(GLsizei count) {
9003 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT
9006 static uint32_t ComputeSize(GLsizei count) {
9007 return static_cast<uint32_t>(sizeof(ValueType) +
9008 ComputeDataSize(count)); // NOLINT
9011 void SetHeader(GLsizei count) {
9012 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9015 void Init(GLint _location, GLsizei _count, const GLint* _v) {
9016 SetHeader(_count);
9017 location = _location;
9018 count = _count;
9019 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9022 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
9023 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9024 const uint32_t size = ComputeSize(_count);
9025 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9028 gpu::CommandHeader header;
9029 int32_t location;
9030 int32_t count;
9033 static_assert(sizeof(Uniform3ivImmediate) == 12,
9034 "size of Uniform3ivImmediate should be 12");
9035 static_assert(offsetof(Uniform3ivImmediate, header) == 0,
9036 "offset of Uniform3ivImmediate header should be 0");
9037 static_assert(offsetof(Uniform3ivImmediate, location) == 4,
9038 "offset of Uniform3ivImmediate location should be 4");
9039 static_assert(offsetof(Uniform3ivImmediate, count) == 8,
9040 "offset of Uniform3ivImmediate count should be 8");
9042 struct Uniform3ui {
9043 typedef Uniform3ui ValueType;
9044 static const CommandId kCmdId = kUniform3ui;
9045 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9046 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9048 static uint32_t ComputeSize() {
9049 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9052 void SetHeader() { header.SetCmd<ValueType>(); }
9054 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z) {
9055 SetHeader();
9056 location = _location;
9057 x = _x;
9058 y = _y;
9059 z = _z;
9062 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y, GLuint _z) {
9063 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
9064 return NextCmdAddress<ValueType>(cmd);
9067 gpu::CommandHeader header;
9068 int32_t location;
9069 uint32_t x;
9070 uint32_t y;
9071 uint32_t z;
9074 static_assert(sizeof(Uniform3ui) == 20, "size of Uniform3ui should be 20");
9075 static_assert(offsetof(Uniform3ui, header) == 0,
9076 "offset of Uniform3ui header should be 0");
9077 static_assert(offsetof(Uniform3ui, location) == 4,
9078 "offset of Uniform3ui location should be 4");
9079 static_assert(offsetof(Uniform3ui, x) == 8,
9080 "offset of Uniform3ui x should be 8");
9081 static_assert(offsetof(Uniform3ui, y) == 12,
9082 "offset of Uniform3ui y should be 12");
9083 static_assert(offsetof(Uniform3ui, z) == 16,
9084 "offset of Uniform3ui z should be 16");
9086 struct Uniform3uivImmediate {
9087 typedef Uniform3uivImmediate ValueType;
9088 static const CommandId kCmdId = kUniform3uivImmediate;
9089 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9090 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9092 static uint32_t ComputeDataSize(GLsizei count) {
9093 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT
9096 static uint32_t ComputeSize(GLsizei count) {
9097 return static_cast<uint32_t>(sizeof(ValueType) +
9098 ComputeDataSize(count)); // NOLINT
9101 void SetHeader(GLsizei count) {
9102 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9105 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
9106 SetHeader(_count);
9107 location = _location;
9108 count = _count;
9109 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9112 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
9113 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9114 const uint32_t size = ComputeSize(_count);
9115 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9118 gpu::CommandHeader header;
9119 int32_t location;
9120 int32_t count;
9123 static_assert(sizeof(Uniform3uivImmediate) == 12,
9124 "size of Uniform3uivImmediate should be 12");
9125 static_assert(offsetof(Uniform3uivImmediate, header) == 0,
9126 "offset of Uniform3uivImmediate header should be 0");
9127 static_assert(offsetof(Uniform3uivImmediate, location) == 4,
9128 "offset of Uniform3uivImmediate location should be 4");
9129 static_assert(offsetof(Uniform3uivImmediate, count) == 8,
9130 "offset of Uniform3uivImmediate count should be 8");
9132 struct Uniform4f {
9133 typedef Uniform4f ValueType;
9134 static const CommandId kCmdId = kUniform4f;
9135 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9136 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9138 static uint32_t ComputeSize() {
9139 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9142 void SetHeader() { header.SetCmd<ValueType>(); }
9144 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
9145 SetHeader();
9146 location = _location;
9147 x = _x;
9148 y = _y;
9149 z = _z;
9150 w = _w;
9153 void* Set(void* cmd,
9154 GLint _location,
9155 GLfloat _x,
9156 GLfloat _y,
9157 GLfloat _z,
9158 GLfloat _w) {
9159 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9160 return NextCmdAddress<ValueType>(cmd);
9163 gpu::CommandHeader header;
9164 int32_t location;
9165 float x;
9166 float y;
9167 float z;
9168 float w;
9171 static_assert(sizeof(Uniform4f) == 24, "size of Uniform4f should be 24");
9172 static_assert(offsetof(Uniform4f, header) == 0,
9173 "offset of Uniform4f header should be 0");
9174 static_assert(offsetof(Uniform4f, location) == 4,
9175 "offset of Uniform4f location should be 4");
9176 static_assert(offsetof(Uniform4f, x) == 8, "offset of Uniform4f x should be 8");
9177 static_assert(offsetof(Uniform4f, y) == 12,
9178 "offset of Uniform4f y should be 12");
9179 static_assert(offsetof(Uniform4f, z) == 16,
9180 "offset of Uniform4f z should be 16");
9181 static_assert(offsetof(Uniform4f, w) == 20,
9182 "offset of Uniform4f w should be 20");
9184 struct Uniform4fvImmediate {
9185 typedef Uniform4fvImmediate ValueType;
9186 static const CommandId kCmdId = kUniform4fvImmediate;
9187 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9188 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9190 static uint32_t ComputeDataSize(GLsizei count) {
9191 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
9194 static uint32_t ComputeSize(GLsizei count) {
9195 return static_cast<uint32_t>(sizeof(ValueType) +
9196 ComputeDataSize(count)); // NOLINT
9199 void SetHeader(GLsizei count) {
9200 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9203 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
9204 SetHeader(_count);
9205 location = _location;
9206 count = _count;
9207 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9210 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
9211 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9212 const uint32_t size = ComputeSize(_count);
9213 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9216 gpu::CommandHeader header;
9217 int32_t location;
9218 int32_t count;
9221 static_assert(sizeof(Uniform4fvImmediate) == 12,
9222 "size of Uniform4fvImmediate should be 12");
9223 static_assert(offsetof(Uniform4fvImmediate, header) == 0,
9224 "offset of Uniform4fvImmediate header should be 0");
9225 static_assert(offsetof(Uniform4fvImmediate, location) == 4,
9226 "offset of Uniform4fvImmediate location should be 4");
9227 static_assert(offsetof(Uniform4fvImmediate, count) == 8,
9228 "offset of Uniform4fvImmediate count should be 8");
9230 struct Uniform4i {
9231 typedef Uniform4i ValueType;
9232 static const CommandId kCmdId = kUniform4i;
9233 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9234 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9236 static uint32_t ComputeSize() {
9237 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9240 void SetHeader() { header.SetCmd<ValueType>(); }
9242 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
9243 SetHeader();
9244 location = _location;
9245 x = _x;
9246 y = _y;
9247 z = _z;
9248 w = _w;
9251 void* Set(void* cmd,
9252 GLint _location,
9253 GLint _x,
9254 GLint _y,
9255 GLint _z,
9256 GLint _w) {
9257 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9258 return NextCmdAddress<ValueType>(cmd);
9261 gpu::CommandHeader header;
9262 int32_t location;
9263 int32_t x;
9264 int32_t y;
9265 int32_t z;
9266 int32_t w;
9269 static_assert(sizeof(Uniform4i) == 24, "size of Uniform4i should be 24");
9270 static_assert(offsetof(Uniform4i, header) == 0,
9271 "offset of Uniform4i header should be 0");
9272 static_assert(offsetof(Uniform4i, location) == 4,
9273 "offset of Uniform4i location should be 4");
9274 static_assert(offsetof(Uniform4i, x) == 8, "offset of Uniform4i x should be 8");
9275 static_assert(offsetof(Uniform4i, y) == 12,
9276 "offset of Uniform4i y should be 12");
9277 static_assert(offsetof(Uniform4i, z) == 16,
9278 "offset of Uniform4i z should be 16");
9279 static_assert(offsetof(Uniform4i, w) == 20,
9280 "offset of Uniform4i w should be 20");
9282 struct Uniform4ivImmediate {
9283 typedef Uniform4ivImmediate ValueType;
9284 static const CommandId kCmdId = kUniform4ivImmediate;
9285 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9286 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9288 static uint32_t ComputeDataSize(GLsizei count) {
9289 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT
9292 static uint32_t ComputeSize(GLsizei count) {
9293 return static_cast<uint32_t>(sizeof(ValueType) +
9294 ComputeDataSize(count)); // NOLINT
9297 void SetHeader(GLsizei count) {
9298 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9301 void Init(GLint _location, GLsizei _count, const GLint* _v) {
9302 SetHeader(_count);
9303 location = _location;
9304 count = _count;
9305 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9308 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
9309 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9310 const uint32_t size = ComputeSize(_count);
9311 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9314 gpu::CommandHeader header;
9315 int32_t location;
9316 int32_t count;
9319 static_assert(sizeof(Uniform4ivImmediate) == 12,
9320 "size of Uniform4ivImmediate should be 12");
9321 static_assert(offsetof(Uniform4ivImmediate, header) == 0,
9322 "offset of Uniform4ivImmediate header should be 0");
9323 static_assert(offsetof(Uniform4ivImmediate, location) == 4,
9324 "offset of Uniform4ivImmediate location should be 4");
9325 static_assert(offsetof(Uniform4ivImmediate, count) == 8,
9326 "offset of Uniform4ivImmediate count should be 8");
9328 struct Uniform4ui {
9329 typedef Uniform4ui ValueType;
9330 static const CommandId kCmdId = kUniform4ui;
9331 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9332 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9334 static uint32_t ComputeSize() {
9335 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9338 void SetHeader() { header.SetCmd<ValueType>(); }
9340 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
9341 SetHeader();
9342 location = _location;
9343 x = _x;
9344 y = _y;
9345 z = _z;
9346 w = _w;
9349 void* Set(void* cmd,
9350 GLint _location,
9351 GLuint _x,
9352 GLuint _y,
9353 GLuint _z,
9354 GLuint _w) {
9355 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9356 return NextCmdAddress<ValueType>(cmd);
9359 gpu::CommandHeader header;
9360 int32_t location;
9361 uint32_t x;
9362 uint32_t y;
9363 uint32_t z;
9364 uint32_t w;
9367 static_assert(sizeof(Uniform4ui) == 24, "size of Uniform4ui should be 24");
9368 static_assert(offsetof(Uniform4ui, header) == 0,
9369 "offset of Uniform4ui header should be 0");
9370 static_assert(offsetof(Uniform4ui, location) == 4,
9371 "offset of Uniform4ui location should be 4");
9372 static_assert(offsetof(Uniform4ui, x) == 8,
9373 "offset of Uniform4ui x should be 8");
9374 static_assert(offsetof(Uniform4ui, y) == 12,
9375 "offset of Uniform4ui y should be 12");
9376 static_assert(offsetof(Uniform4ui, z) == 16,
9377 "offset of Uniform4ui z should be 16");
9378 static_assert(offsetof(Uniform4ui, w) == 20,
9379 "offset of Uniform4ui w should be 20");
9381 struct Uniform4uivImmediate {
9382 typedef Uniform4uivImmediate ValueType;
9383 static const CommandId kCmdId = kUniform4uivImmediate;
9384 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9385 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9387 static uint32_t ComputeDataSize(GLsizei count) {
9388 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT
9391 static uint32_t ComputeSize(GLsizei count) {
9392 return static_cast<uint32_t>(sizeof(ValueType) +
9393 ComputeDataSize(count)); // NOLINT
9396 void SetHeader(GLsizei count) {
9397 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9400 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
9401 SetHeader(_count);
9402 location = _location;
9403 count = _count;
9404 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9407 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
9408 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9409 const uint32_t size = ComputeSize(_count);
9410 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9413 gpu::CommandHeader header;
9414 int32_t location;
9415 int32_t count;
9418 static_assert(sizeof(Uniform4uivImmediate) == 12,
9419 "size of Uniform4uivImmediate should be 12");
9420 static_assert(offsetof(Uniform4uivImmediate, header) == 0,
9421 "offset of Uniform4uivImmediate header should be 0");
9422 static_assert(offsetof(Uniform4uivImmediate, location) == 4,
9423 "offset of Uniform4uivImmediate location should be 4");
9424 static_assert(offsetof(Uniform4uivImmediate, count) == 8,
9425 "offset of Uniform4uivImmediate count should be 8");
9427 struct UniformBlockBinding {
9428 typedef UniformBlockBinding ValueType;
9429 static const CommandId kCmdId = kUniformBlockBinding;
9430 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9431 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9433 static uint32_t ComputeSize() {
9434 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9437 void SetHeader() { header.SetCmd<ValueType>(); }
9439 void Init(GLuint _program, GLuint _index, GLuint _binding) {
9440 SetHeader();
9441 program = _program;
9442 index = _index;
9443 binding = _binding;
9446 void* Set(void* cmd, GLuint _program, GLuint _index, GLuint _binding) {
9447 static_cast<ValueType*>(cmd)->Init(_program, _index, _binding);
9448 return NextCmdAddress<ValueType>(cmd);
9451 gpu::CommandHeader header;
9452 uint32_t program;
9453 uint32_t index;
9454 uint32_t binding;
9457 static_assert(sizeof(UniformBlockBinding) == 16,
9458 "size of UniformBlockBinding should be 16");
9459 static_assert(offsetof(UniformBlockBinding, header) == 0,
9460 "offset of UniformBlockBinding header should be 0");
9461 static_assert(offsetof(UniformBlockBinding, program) == 4,
9462 "offset of UniformBlockBinding program should be 4");
9463 static_assert(offsetof(UniformBlockBinding, index) == 8,
9464 "offset of UniformBlockBinding index should be 8");
9465 static_assert(offsetof(UniformBlockBinding, binding) == 12,
9466 "offset of UniformBlockBinding binding should be 12");
9468 struct UniformMatrix2fvImmediate {
9469 typedef UniformMatrix2fvImmediate ValueType;
9470 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
9471 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9472 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9474 static uint32_t ComputeDataSize(GLsizei count) {
9475 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
9478 static uint32_t ComputeSize(GLsizei count) {
9479 return static_cast<uint32_t>(sizeof(ValueType) +
9480 ComputeDataSize(count)); // NOLINT
9483 void SetHeader(GLsizei count) {
9484 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9487 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9488 SetHeader(_count);
9489 location = _location;
9490 count = _count;
9491 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9494 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9495 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9496 const uint32_t size = ComputeSize(_count);
9497 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9500 gpu::CommandHeader header;
9501 int32_t location;
9502 int32_t count;
9503 static const uint32_t transpose = false;
9506 static_assert(sizeof(UniformMatrix2fvImmediate) == 12,
9507 "size of UniformMatrix2fvImmediate should be 12");
9508 static_assert(offsetof(UniformMatrix2fvImmediate, header) == 0,
9509 "offset of UniformMatrix2fvImmediate header should be 0");
9510 static_assert(offsetof(UniformMatrix2fvImmediate, location) == 4,
9511 "offset of UniformMatrix2fvImmediate location should be 4");
9512 static_assert(offsetof(UniformMatrix2fvImmediate, count) == 8,
9513 "offset of UniformMatrix2fvImmediate count should be 8");
9515 struct UniformMatrix2x3fvImmediate {
9516 typedef UniformMatrix2x3fvImmediate ValueType;
9517 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate;
9518 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9519 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9521 static uint32_t ComputeDataSize(GLsizei count) {
9522 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
9525 static uint32_t ComputeSize(GLsizei count) {
9526 return static_cast<uint32_t>(sizeof(ValueType) +
9527 ComputeDataSize(count)); // NOLINT
9530 void SetHeader(GLsizei count) {
9531 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9534 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9535 SetHeader(_count);
9536 location = _location;
9537 count = _count;
9538 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9541 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9542 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9543 const uint32_t size = ComputeSize(_count);
9544 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9547 gpu::CommandHeader header;
9548 int32_t location;
9549 int32_t count;
9550 static const uint32_t transpose = false;
9553 static_assert(sizeof(UniformMatrix2x3fvImmediate) == 12,
9554 "size of UniformMatrix2x3fvImmediate should be 12");
9555 static_assert(offsetof(UniformMatrix2x3fvImmediate, header) == 0,
9556 "offset of UniformMatrix2x3fvImmediate header should be 0");
9557 static_assert(offsetof(UniformMatrix2x3fvImmediate, location) == 4,
9558 "offset of UniformMatrix2x3fvImmediate location should be 4");
9559 static_assert(offsetof(UniformMatrix2x3fvImmediate, count) == 8,
9560 "offset of UniformMatrix2x3fvImmediate count should be 8");
9562 struct UniformMatrix2x4fvImmediate {
9563 typedef UniformMatrix2x4fvImmediate ValueType;
9564 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate;
9565 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9568 static uint32_t ComputeDataSize(GLsizei count) {
9569 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
9572 static uint32_t ComputeSize(GLsizei count) {
9573 return static_cast<uint32_t>(sizeof(ValueType) +
9574 ComputeDataSize(count)); // NOLINT
9577 void SetHeader(GLsizei count) {
9578 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9581 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9582 SetHeader(_count);
9583 location = _location;
9584 count = _count;
9585 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9588 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9589 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9590 const uint32_t size = ComputeSize(_count);
9591 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9594 gpu::CommandHeader header;
9595 int32_t location;
9596 int32_t count;
9597 static const uint32_t transpose = false;
9600 static_assert(sizeof(UniformMatrix2x4fvImmediate) == 12,
9601 "size of UniformMatrix2x4fvImmediate should be 12");
9602 static_assert(offsetof(UniformMatrix2x4fvImmediate, header) == 0,
9603 "offset of UniformMatrix2x4fvImmediate header should be 0");
9604 static_assert(offsetof(UniformMatrix2x4fvImmediate, location) == 4,
9605 "offset of UniformMatrix2x4fvImmediate location should be 4");
9606 static_assert(offsetof(UniformMatrix2x4fvImmediate, count) == 8,
9607 "offset of UniformMatrix2x4fvImmediate count should be 8");
9609 struct UniformMatrix3fvImmediate {
9610 typedef UniformMatrix3fvImmediate ValueType;
9611 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
9612 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9613 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9615 static uint32_t ComputeDataSize(GLsizei count) {
9616 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT
9619 static uint32_t ComputeSize(GLsizei count) {
9620 return static_cast<uint32_t>(sizeof(ValueType) +
9621 ComputeDataSize(count)); // NOLINT
9624 void SetHeader(GLsizei count) {
9625 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9628 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9629 SetHeader(_count);
9630 location = _location;
9631 count = _count;
9632 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9635 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9636 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9637 const uint32_t size = ComputeSize(_count);
9638 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9641 gpu::CommandHeader header;
9642 int32_t location;
9643 int32_t count;
9644 static const uint32_t transpose = false;
9647 static_assert(sizeof(UniformMatrix3fvImmediate) == 12,
9648 "size of UniformMatrix3fvImmediate should be 12");
9649 static_assert(offsetof(UniformMatrix3fvImmediate, header) == 0,
9650 "offset of UniformMatrix3fvImmediate header should be 0");
9651 static_assert(offsetof(UniformMatrix3fvImmediate, location) == 4,
9652 "offset of UniformMatrix3fvImmediate location should be 4");
9653 static_assert(offsetof(UniformMatrix3fvImmediate, count) == 8,
9654 "offset of UniformMatrix3fvImmediate count should be 8");
9656 struct UniformMatrix3x2fvImmediate {
9657 typedef UniformMatrix3x2fvImmediate ValueType;
9658 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate;
9659 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9660 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9662 static uint32_t ComputeDataSize(GLsizei count) {
9663 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
9666 static uint32_t ComputeSize(GLsizei count) {
9667 return static_cast<uint32_t>(sizeof(ValueType) +
9668 ComputeDataSize(count)); // NOLINT
9671 void SetHeader(GLsizei count) {
9672 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9675 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9676 SetHeader(_count);
9677 location = _location;
9678 count = _count;
9679 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9682 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9683 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9684 const uint32_t size = ComputeSize(_count);
9685 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9688 gpu::CommandHeader header;
9689 int32_t location;
9690 int32_t count;
9691 static const uint32_t transpose = false;
9694 static_assert(sizeof(UniformMatrix3x2fvImmediate) == 12,
9695 "size of UniformMatrix3x2fvImmediate should be 12");
9696 static_assert(offsetof(UniformMatrix3x2fvImmediate, header) == 0,
9697 "offset of UniformMatrix3x2fvImmediate header should be 0");
9698 static_assert(offsetof(UniformMatrix3x2fvImmediate, location) == 4,
9699 "offset of UniformMatrix3x2fvImmediate location should be 4");
9700 static_assert(offsetof(UniformMatrix3x2fvImmediate, count) == 8,
9701 "offset of UniformMatrix3x2fvImmediate count should be 8");
9703 struct UniformMatrix3x4fvImmediate {
9704 typedef UniformMatrix3x4fvImmediate ValueType;
9705 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate;
9706 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9707 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9709 static uint32_t ComputeDataSize(GLsizei count) {
9710 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
9713 static uint32_t ComputeSize(GLsizei count) {
9714 return static_cast<uint32_t>(sizeof(ValueType) +
9715 ComputeDataSize(count)); // NOLINT
9718 void SetHeader(GLsizei count) {
9719 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9722 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9723 SetHeader(_count);
9724 location = _location;
9725 count = _count;
9726 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9729 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9730 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9731 const uint32_t size = ComputeSize(_count);
9732 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9735 gpu::CommandHeader header;
9736 int32_t location;
9737 int32_t count;
9738 static const uint32_t transpose = false;
9741 static_assert(sizeof(UniformMatrix3x4fvImmediate) == 12,
9742 "size of UniformMatrix3x4fvImmediate should be 12");
9743 static_assert(offsetof(UniformMatrix3x4fvImmediate, header) == 0,
9744 "offset of UniformMatrix3x4fvImmediate header should be 0");
9745 static_assert(offsetof(UniformMatrix3x4fvImmediate, location) == 4,
9746 "offset of UniformMatrix3x4fvImmediate location should be 4");
9747 static_assert(offsetof(UniformMatrix3x4fvImmediate, count) == 8,
9748 "offset of UniformMatrix3x4fvImmediate count should be 8");
9750 struct UniformMatrix4fvImmediate {
9751 typedef UniformMatrix4fvImmediate ValueType;
9752 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
9753 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9754 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9756 static uint32_t ComputeDataSize(GLsizei count) {
9757 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT
9760 static uint32_t ComputeSize(GLsizei count) {
9761 return static_cast<uint32_t>(sizeof(ValueType) +
9762 ComputeDataSize(count)); // NOLINT
9765 void SetHeader(GLsizei count) {
9766 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9769 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9770 SetHeader(_count);
9771 location = _location;
9772 count = _count;
9773 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9776 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9777 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9778 const uint32_t size = ComputeSize(_count);
9779 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9782 gpu::CommandHeader header;
9783 int32_t location;
9784 int32_t count;
9785 static const uint32_t transpose = false;
9788 static_assert(sizeof(UniformMatrix4fvImmediate) == 12,
9789 "size of UniformMatrix4fvImmediate should be 12");
9790 static_assert(offsetof(UniformMatrix4fvImmediate, header) == 0,
9791 "offset of UniformMatrix4fvImmediate header should be 0");
9792 static_assert(offsetof(UniformMatrix4fvImmediate, location) == 4,
9793 "offset of UniformMatrix4fvImmediate location should be 4");
9794 static_assert(offsetof(UniformMatrix4fvImmediate, count) == 8,
9795 "offset of UniformMatrix4fvImmediate count should be 8");
9797 struct UniformMatrix4x2fvImmediate {
9798 typedef UniformMatrix4x2fvImmediate ValueType;
9799 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate;
9800 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9801 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9803 static uint32_t ComputeDataSize(GLsizei count) {
9804 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
9807 static uint32_t ComputeSize(GLsizei count) {
9808 return static_cast<uint32_t>(sizeof(ValueType) +
9809 ComputeDataSize(count)); // NOLINT
9812 void SetHeader(GLsizei count) {
9813 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9816 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9817 SetHeader(_count);
9818 location = _location;
9819 count = _count;
9820 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9823 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9824 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9825 const uint32_t size = ComputeSize(_count);
9826 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9829 gpu::CommandHeader header;
9830 int32_t location;
9831 int32_t count;
9832 static const uint32_t transpose = false;
9835 static_assert(sizeof(UniformMatrix4x2fvImmediate) == 12,
9836 "size of UniformMatrix4x2fvImmediate should be 12");
9837 static_assert(offsetof(UniformMatrix4x2fvImmediate, header) == 0,
9838 "offset of UniformMatrix4x2fvImmediate header should be 0");
9839 static_assert(offsetof(UniformMatrix4x2fvImmediate, location) == 4,
9840 "offset of UniformMatrix4x2fvImmediate location should be 4");
9841 static_assert(offsetof(UniformMatrix4x2fvImmediate, count) == 8,
9842 "offset of UniformMatrix4x2fvImmediate count should be 8");
9844 struct UniformMatrix4x3fvImmediate {
9845 typedef UniformMatrix4x3fvImmediate ValueType;
9846 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate;
9847 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9850 static uint32_t ComputeDataSize(GLsizei count) {
9851 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
9854 static uint32_t ComputeSize(GLsizei count) {
9855 return static_cast<uint32_t>(sizeof(ValueType) +
9856 ComputeDataSize(count)); // NOLINT
9859 void SetHeader(GLsizei count) {
9860 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9863 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9864 SetHeader(_count);
9865 location = _location;
9866 count = _count;
9867 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9870 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9871 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9872 const uint32_t size = ComputeSize(_count);
9873 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9876 gpu::CommandHeader header;
9877 int32_t location;
9878 int32_t count;
9879 static const uint32_t transpose = false;
9882 static_assert(sizeof(UniformMatrix4x3fvImmediate) == 12,
9883 "size of UniformMatrix4x3fvImmediate should be 12");
9884 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0,
9885 "offset of UniformMatrix4x3fvImmediate header should be 0");
9886 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4,
9887 "offset of UniformMatrix4x3fvImmediate location should be 4");
9888 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8,
9889 "offset of UniformMatrix4x3fvImmediate count should be 8");
9891 struct UseProgram {
9892 typedef UseProgram ValueType;
9893 static const CommandId kCmdId = kUseProgram;
9894 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9895 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9897 static uint32_t ComputeSize() {
9898 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9901 void SetHeader() { header.SetCmd<ValueType>(); }
9903 void Init(GLuint _program) {
9904 SetHeader();
9905 program = _program;
9908 void* Set(void* cmd, GLuint _program) {
9909 static_cast<ValueType*>(cmd)->Init(_program);
9910 return NextCmdAddress<ValueType>(cmd);
9913 gpu::CommandHeader header;
9914 uint32_t program;
9917 static_assert(sizeof(UseProgram) == 8, "size of UseProgram should be 8");
9918 static_assert(offsetof(UseProgram, header) == 0,
9919 "offset of UseProgram header should be 0");
9920 static_assert(offsetof(UseProgram, program) == 4,
9921 "offset of UseProgram program should be 4");
9923 struct ValidateProgram {
9924 typedef ValidateProgram ValueType;
9925 static const CommandId kCmdId = kValidateProgram;
9926 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9927 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9929 static uint32_t ComputeSize() {
9930 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9933 void SetHeader() { header.SetCmd<ValueType>(); }
9935 void Init(GLuint _program) {
9936 SetHeader();
9937 program = _program;
9940 void* Set(void* cmd, GLuint _program) {
9941 static_cast<ValueType*>(cmd)->Init(_program);
9942 return NextCmdAddress<ValueType>(cmd);
9945 gpu::CommandHeader header;
9946 uint32_t program;
9949 static_assert(sizeof(ValidateProgram) == 8,
9950 "size of ValidateProgram should be 8");
9951 static_assert(offsetof(ValidateProgram, header) == 0,
9952 "offset of ValidateProgram header should be 0");
9953 static_assert(offsetof(ValidateProgram, program) == 4,
9954 "offset of ValidateProgram program should be 4");
9956 struct VertexAttrib1f {
9957 typedef VertexAttrib1f ValueType;
9958 static const CommandId kCmdId = kVertexAttrib1f;
9959 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9960 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9962 static uint32_t ComputeSize() {
9963 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9966 void SetHeader() { header.SetCmd<ValueType>(); }
9968 void Init(GLuint _indx, GLfloat _x) {
9969 SetHeader();
9970 indx = _indx;
9971 x = _x;
9974 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
9975 static_cast<ValueType*>(cmd)->Init(_indx, _x);
9976 return NextCmdAddress<ValueType>(cmd);
9979 gpu::CommandHeader header;
9980 uint32_t indx;
9981 float x;
9984 static_assert(sizeof(VertexAttrib1f) == 12,
9985 "size of VertexAttrib1f should be 12");
9986 static_assert(offsetof(VertexAttrib1f, header) == 0,
9987 "offset of VertexAttrib1f header should be 0");
9988 static_assert(offsetof(VertexAttrib1f, indx) == 4,
9989 "offset of VertexAttrib1f indx should be 4");
9990 static_assert(offsetof(VertexAttrib1f, x) == 8,
9991 "offset of VertexAttrib1f x should be 8");
9993 struct VertexAttrib1fvImmediate {
9994 typedef VertexAttrib1fvImmediate ValueType;
9995 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
9996 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9997 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9999 static uint32_t ComputeDataSize() {
10000 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
10003 static uint32_t ComputeSize() {
10004 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10007 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10009 void Init(GLuint _indx, const GLfloat* _values) {
10010 SetHeader();
10011 indx = _indx;
10012 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10015 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10016 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10017 const uint32_t size = ComputeSize();
10018 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10021 gpu::CommandHeader header;
10022 uint32_t indx;
10025 static_assert(sizeof(VertexAttrib1fvImmediate) == 8,
10026 "size of VertexAttrib1fvImmediate should be 8");
10027 static_assert(offsetof(VertexAttrib1fvImmediate, header) == 0,
10028 "offset of VertexAttrib1fvImmediate header should be 0");
10029 static_assert(offsetof(VertexAttrib1fvImmediate, indx) == 4,
10030 "offset of VertexAttrib1fvImmediate indx should be 4");
10032 struct VertexAttrib2f {
10033 typedef VertexAttrib2f ValueType;
10034 static const CommandId kCmdId = kVertexAttrib2f;
10035 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10036 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10038 static uint32_t ComputeSize() {
10039 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10042 void SetHeader() { header.SetCmd<ValueType>(); }
10044 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
10045 SetHeader();
10046 indx = _indx;
10047 x = _x;
10048 y = _y;
10051 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
10052 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
10053 return NextCmdAddress<ValueType>(cmd);
10056 gpu::CommandHeader header;
10057 uint32_t indx;
10058 float x;
10059 float y;
10062 static_assert(sizeof(VertexAttrib2f) == 16,
10063 "size of VertexAttrib2f should be 16");
10064 static_assert(offsetof(VertexAttrib2f, header) == 0,
10065 "offset of VertexAttrib2f header should be 0");
10066 static_assert(offsetof(VertexAttrib2f, indx) == 4,
10067 "offset of VertexAttrib2f indx should be 4");
10068 static_assert(offsetof(VertexAttrib2f, x) == 8,
10069 "offset of VertexAttrib2f x should be 8");
10070 static_assert(offsetof(VertexAttrib2f, y) == 12,
10071 "offset of VertexAttrib2f y should be 12");
10073 struct VertexAttrib2fvImmediate {
10074 typedef VertexAttrib2fvImmediate ValueType;
10075 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
10076 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10077 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10079 static uint32_t ComputeDataSize() {
10080 return static_cast<uint32_t>(sizeof(GLfloat) * 2);
10083 static uint32_t ComputeSize() {
10084 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10087 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10089 void Init(GLuint _indx, const GLfloat* _values) {
10090 SetHeader();
10091 indx = _indx;
10092 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10095 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10096 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10097 const uint32_t size = ComputeSize();
10098 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10101 gpu::CommandHeader header;
10102 uint32_t indx;
10105 static_assert(sizeof(VertexAttrib2fvImmediate) == 8,
10106 "size of VertexAttrib2fvImmediate should be 8");
10107 static_assert(offsetof(VertexAttrib2fvImmediate, header) == 0,
10108 "offset of VertexAttrib2fvImmediate header should be 0");
10109 static_assert(offsetof(VertexAttrib2fvImmediate, indx) == 4,
10110 "offset of VertexAttrib2fvImmediate indx should be 4");
10112 struct VertexAttrib3f {
10113 typedef VertexAttrib3f ValueType;
10114 static const CommandId kCmdId = kVertexAttrib3f;
10115 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10116 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10118 static uint32_t ComputeSize() {
10119 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10122 void SetHeader() { header.SetCmd<ValueType>(); }
10124 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
10125 SetHeader();
10126 indx = _indx;
10127 x = _x;
10128 y = _y;
10129 z = _z;
10132 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
10133 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
10134 return NextCmdAddress<ValueType>(cmd);
10137 gpu::CommandHeader header;
10138 uint32_t indx;
10139 float x;
10140 float y;
10141 float z;
10144 static_assert(sizeof(VertexAttrib3f) == 20,
10145 "size of VertexAttrib3f should be 20");
10146 static_assert(offsetof(VertexAttrib3f, header) == 0,
10147 "offset of VertexAttrib3f header should be 0");
10148 static_assert(offsetof(VertexAttrib3f, indx) == 4,
10149 "offset of VertexAttrib3f indx should be 4");
10150 static_assert(offsetof(VertexAttrib3f, x) == 8,
10151 "offset of VertexAttrib3f x should be 8");
10152 static_assert(offsetof(VertexAttrib3f, y) == 12,
10153 "offset of VertexAttrib3f y should be 12");
10154 static_assert(offsetof(VertexAttrib3f, z) == 16,
10155 "offset of VertexAttrib3f z should be 16");
10157 struct VertexAttrib3fvImmediate {
10158 typedef VertexAttrib3fvImmediate ValueType;
10159 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
10160 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10161 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10163 static uint32_t ComputeDataSize() {
10164 return static_cast<uint32_t>(sizeof(GLfloat) * 3);
10167 static uint32_t ComputeSize() {
10168 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10171 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10173 void Init(GLuint _indx, const GLfloat* _values) {
10174 SetHeader();
10175 indx = _indx;
10176 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10179 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10180 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10181 const uint32_t size = ComputeSize();
10182 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10185 gpu::CommandHeader header;
10186 uint32_t indx;
10189 static_assert(sizeof(VertexAttrib3fvImmediate) == 8,
10190 "size of VertexAttrib3fvImmediate should be 8");
10191 static_assert(offsetof(VertexAttrib3fvImmediate, header) == 0,
10192 "offset of VertexAttrib3fvImmediate header should be 0");
10193 static_assert(offsetof(VertexAttrib3fvImmediate, indx) == 4,
10194 "offset of VertexAttrib3fvImmediate indx should be 4");
10196 struct VertexAttrib4f {
10197 typedef VertexAttrib4f ValueType;
10198 static const CommandId kCmdId = kVertexAttrib4f;
10199 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10200 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10202 static uint32_t ComputeSize() {
10203 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10206 void SetHeader() { header.SetCmd<ValueType>(); }
10208 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
10209 SetHeader();
10210 indx = _indx;
10211 x = _x;
10212 y = _y;
10213 z = _z;
10214 w = _w;
10217 void* Set(void* cmd,
10218 GLuint _indx,
10219 GLfloat _x,
10220 GLfloat _y,
10221 GLfloat _z,
10222 GLfloat _w) {
10223 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10224 return NextCmdAddress<ValueType>(cmd);
10227 gpu::CommandHeader header;
10228 uint32_t indx;
10229 float x;
10230 float y;
10231 float z;
10232 float w;
10235 static_assert(sizeof(VertexAttrib4f) == 24,
10236 "size of VertexAttrib4f should be 24");
10237 static_assert(offsetof(VertexAttrib4f, header) == 0,
10238 "offset of VertexAttrib4f header should be 0");
10239 static_assert(offsetof(VertexAttrib4f, indx) == 4,
10240 "offset of VertexAttrib4f indx should be 4");
10241 static_assert(offsetof(VertexAttrib4f, x) == 8,
10242 "offset of VertexAttrib4f x should be 8");
10243 static_assert(offsetof(VertexAttrib4f, y) == 12,
10244 "offset of VertexAttrib4f y should be 12");
10245 static_assert(offsetof(VertexAttrib4f, z) == 16,
10246 "offset of VertexAttrib4f z should be 16");
10247 static_assert(offsetof(VertexAttrib4f, w) == 20,
10248 "offset of VertexAttrib4f w should be 20");
10250 struct VertexAttrib4fvImmediate {
10251 typedef VertexAttrib4fvImmediate ValueType;
10252 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
10253 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10254 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10256 static uint32_t ComputeDataSize() {
10257 return static_cast<uint32_t>(sizeof(GLfloat) * 4);
10260 static uint32_t ComputeSize() {
10261 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10264 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10266 void Init(GLuint _indx, const GLfloat* _values) {
10267 SetHeader();
10268 indx = _indx;
10269 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10272 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10273 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10274 const uint32_t size = ComputeSize();
10275 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10278 gpu::CommandHeader header;
10279 uint32_t indx;
10282 static_assert(sizeof(VertexAttrib4fvImmediate) == 8,
10283 "size of VertexAttrib4fvImmediate should be 8");
10284 static_assert(offsetof(VertexAttrib4fvImmediate, header) == 0,
10285 "offset of VertexAttrib4fvImmediate header should be 0");
10286 static_assert(offsetof(VertexAttrib4fvImmediate, indx) == 4,
10287 "offset of VertexAttrib4fvImmediate indx should be 4");
10289 struct VertexAttribI4i {
10290 typedef VertexAttribI4i ValueType;
10291 static const CommandId kCmdId = kVertexAttribI4i;
10292 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10293 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10295 static uint32_t ComputeSize() {
10296 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10299 void SetHeader() { header.SetCmd<ValueType>(); }
10301 void Init(GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
10302 SetHeader();
10303 indx = _indx;
10304 x = _x;
10305 y = _y;
10306 z = _z;
10307 w = _w;
10310 void* Set(void* cmd, GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
10311 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10312 return NextCmdAddress<ValueType>(cmd);
10315 gpu::CommandHeader header;
10316 uint32_t indx;
10317 int32_t x;
10318 int32_t y;
10319 int32_t z;
10320 int32_t w;
10323 static_assert(sizeof(VertexAttribI4i) == 24,
10324 "size of VertexAttribI4i should be 24");
10325 static_assert(offsetof(VertexAttribI4i, header) == 0,
10326 "offset of VertexAttribI4i header should be 0");
10327 static_assert(offsetof(VertexAttribI4i, indx) == 4,
10328 "offset of VertexAttribI4i indx should be 4");
10329 static_assert(offsetof(VertexAttribI4i, x) == 8,
10330 "offset of VertexAttribI4i x should be 8");
10331 static_assert(offsetof(VertexAttribI4i, y) == 12,
10332 "offset of VertexAttribI4i y should be 12");
10333 static_assert(offsetof(VertexAttribI4i, z) == 16,
10334 "offset of VertexAttribI4i z should be 16");
10335 static_assert(offsetof(VertexAttribI4i, w) == 20,
10336 "offset of VertexAttribI4i w should be 20");
10338 struct VertexAttribI4ivImmediate {
10339 typedef VertexAttribI4ivImmediate ValueType;
10340 static const CommandId kCmdId = kVertexAttribI4ivImmediate;
10341 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10342 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10344 static uint32_t ComputeDataSize() {
10345 return static_cast<uint32_t>(sizeof(GLint) * 4);
10348 static uint32_t ComputeSize() {
10349 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10352 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10354 void Init(GLuint _indx, const GLint* _values) {
10355 SetHeader();
10356 indx = _indx;
10357 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10360 void* Set(void* cmd, GLuint _indx, const GLint* _values) {
10361 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10362 const uint32_t size = ComputeSize();
10363 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10366 gpu::CommandHeader header;
10367 uint32_t indx;
10370 static_assert(sizeof(VertexAttribI4ivImmediate) == 8,
10371 "size of VertexAttribI4ivImmediate should be 8");
10372 static_assert(offsetof(VertexAttribI4ivImmediate, header) == 0,
10373 "offset of VertexAttribI4ivImmediate header should be 0");
10374 static_assert(offsetof(VertexAttribI4ivImmediate, indx) == 4,
10375 "offset of VertexAttribI4ivImmediate indx should be 4");
10377 struct VertexAttribI4ui {
10378 typedef VertexAttribI4ui ValueType;
10379 static const CommandId kCmdId = kVertexAttribI4ui;
10380 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10381 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10383 static uint32_t ComputeSize() {
10384 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10387 void SetHeader() { header.SetCmd<ValueType>(); }
10389 void Init(GLuint _indx, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
10390 SetHeader();
10391 indx = _indx;
10392 x = _x;
10393 y = _y;
10394 z = _z;
10395 w = _w;
10398 void* Set(void* cmd,
10399 GLuint _indx,
10400 GLuint _x,
10401 GLuint _y,
10402 GLuint _z,
10403 GLuint _w) {
10404 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10405 return NextCmdAddress<ValueType>(cmd);
10408 gpu::CommandHeader header;
10409 uint32_t indx;
10410 uint32_t x;
10411 uint32_t y;
10412 uint32_t z;
10413 uint32_t w;
10416 static_assert(sizeof(VertexAttribI4ui) == 24,
10417 "size of VertexAttribI4ui should be 24");
10418 static_assert(offsetof(VertexAttribI4ui, header) == 0,
10419 "offset of VertexAttribI4ui header should be 0");
10420 static_assert(offsetof(VertexAttribI4ui, indx) == 4,
10421 "offset of VertexAttribI4ui indx should be 4");
10422 static_assert(offsetof(VertexAttribI4ui, x) == 8,
10423 "offset of VertexAttribI4ui x should be 8");
10424 static_assert(offsetof(VertexAttribI4ui, y) == 12,
10425 "offset of VertexAttribI4ui y should be 12");
10426 static_assert(offsetof(VertexAttribI4ui, z) == 16,
10427 "offset of VertexAttribI4ui z should be 16");
10428 static_assert(offsetof(VertexAttribI4ui, w) == 20,
10429 "offset of VertexAttribI4ui w should be 20");
10431 struct VertexAttribI4uivImmediate {
10432 typedef VertexAttribI4uivImmediate ValueType;
10433 static const CommandId kCmdId = kVertexAttribI4uivImmediate;
10434 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10435 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10437 static uint32_t ComputeDataSize() {
10438 return static_cast<uint32_t>(sizeof(GLuint) * 4);
10441 static uint32_t ComputeSize() {
10442 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10445 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10447 void Init(GLuint _indx, const GLuint* _values) {
10448 SetHeader();
10449 indx = _indx;
10450 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10453 void* Set(void* cmd, GLuint _indx, const GLuint* _values) {
10454 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10455 const uint32_t size = ComputeSize();
10456 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10459 gpu::CommandHeader header;
10460 uint32_t indx;
10463 static_assert(sizeof(VertexAttribI4uivImmediate) == 8,
10464 "size of VertexAttribI4uivImmediate should be 8");
10465 static_assert(offsetof(VertexAttribI4uivImmediate, header) == 0,
10466 "offset of VertexAttribI4uivImmediate header should be 0");
10467 static_assert(offsetof(VertexAttribI4uivImmediate, indx) == 4,
10468 "offset of VertexAttribI4uivImmediate indx should be 4");
10470 struct VertexAttribIPointer {
10471 typedef VertexAttribIPointer ValueType;
10472 static const CommandId kCmdId = kVertexAttribIPointer;
10473 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10474 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10476 static uint32_t ComputeSize() {
10477 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10480 void SetHeader() { header.SetCmd<ValueType>(); }
10482 void Init(GLuint _indx,
10483 GLint _size,
10484 GLenum _type,
10485 GLsizei _stride,
10486 GLuint _offset) {
10487 SetHeader();
10488 indx = _indx;
10489 size = _size;
10490 type = _type;
10491 stride = _stride;
10492 offset = _offset;
10495 void* Set(void* cmd,
10496 GLuint _indx,
10497 GLint _size,
10498 GLenum _type,
10499 GLsizei _stride,
10500 GLuint _offset) {
10501 static_cast<ValueType*>(cmd)->Init(_indx, _size, _type, _stride, _offset);
10502 return NextCmdAddress<ValueType>(cmd);
10505 gpu::CommandHeader header;
10506 uint32_t indx;
10507 int32_t size;
10508 uint32_t type;
10509 int32_t stride;
10510 uint32_t offset;
10513 static_assert(sizeof(VertexAttribIPointer) == 24,
10514 "size of VertexAttribIPointer should be 24");
10515 static_assert(offsetof(VertexAttribIPointer, header) == 0,
10516 "offset of VertexAttribIPointer header should be 0");
10517 static_assert(offsetof(VertexAttribIPointer, indx) == 4,
10518 "offset of VertexAttribIPointer indx should be 4");
10519 static_assert(offsetof(VertexAttribIPointer, size) == 8,
10520 "offset of VertexAttribIPointer size should be 8");
10521 static_assert(offsetof(VertexAttribIPointer, type) == 12,
10522 "offset of VertexAttribIPointer type should be 12");
10523 static_assert(offsetof(VertexAttribIPointer, stride) == 16,
10524 "offset of VertexAttribIPointer stride should be 16");
10525 static_assert(offsetof(VertexAttribIPointer, offset) == 20,
10526 "offset of VertexAttribIPointer offset should be 20");
10528 struct VertexAttribPointer {
10529 typedef VertexAttribPointer ValueType;
10530 static const CommandId kCmdId = kVertexAttribPointer;
10531 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10534 static uint32_t ComputeSize() {
10535 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10538 void SetHeader() { header.SetCmd<ValueType>(); }
10540 void Init(GLuint _indx,
10541 GLint _size,
10542 GLenum _type,
10543 GLboolean _normalized,
10544 GLsizei _stride,
10545 GLuint _offset) {
10546 SetHeader();
10547 indx = _indx;
10548 size = _size;
10549 type = _type;
10550 normalized = _normalized;
10551 stride = _stride;
10552 offset = _offset;
10555 void* Set(void* cmd,
10556 GLuint _indx,
10557 GLint _size,
10558 GLenum _type,
10559 GLboolean _normalized,
10560 GLsizei _stride,
10561 GLuint _offset) {
10562 static_cast<ValueType*>(cmd)
10563 ->Init(_indx, _size, _type, _normalized, _stride, _offset);
10564 return NextCmdAddress<ValueType>(cmd);
10567 gpu::CommandHeader header;
10568 uint32_t indx;
10569 int32_t size;
10570 uint32_t type;
10571 uint32_t normalized;
10572 int32_t stride;
10573 uint32_t offset;
10576 static_assert(sizeof(VertexAttribPointer) == 28,
10577 "size of VertexAttribPointer should be 28");
10578 static_assert(offsetof(VertexAttribPointer, header) == 0,
10579 "offset of VertexAttribPointer header should be 0");
10580 static_assert(offsetof(VertexAttribPointer, indx) == 4,
10581 "offset of VertexAttribPointer indx should be 4");
10582 static_assert(offsetof(VertexAttribPointer, size) == 8,
10583 "offset of VertexAttribPointer size should be 8");
10584 static_assert(offsetof(VertexAttribPointer, type) == 12,
10585 "offset of VertexAttribPointer type should be 12");
10586 static_assert(offsetof(VertexAttribPointer, normalized) == 16,
10587 "offset of VertexAttribPointer normalized should be 16");
10588 static_assert(offsetof(VertexAttribPointer, stride) == 20,
10589 "offset of VertexAttribPointer stride should be 20");
10590 static_assert(offsetof(VertexAttribPointer, offset) == 24,
10591 "offset of VertexAttribPointer offset should be 24");
10593 struct Viewport {
10594 typedef Viewport ValueType;
10595 static const CommandId kCmdId = kViewport;
10596 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10597 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10599 static uint32_t ComputeSize() {
10600 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10603 void SetHeader() { header.SetCmd<ValueType>(); }
10605 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
10606 SetHeader();
10607 x = _x;
10608 y = _y;
10609 width = _width;
10610 height = _height;
10613 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
10614 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
10615 return NextCmdAddress<ValueType>(cmd);
10618 gpu::CommandHeader header;
10619 int32_t x;
10620 int32_t y;
10621 int32_t width;
10622 int32_t height;
10625 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20");
10626 static_assert(offsetof(Viewport, header) == 0,
10627 "offset of Viewport header should be 0");
10628 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4");
10629 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8");
10630 static_assert(offsetof(Viewport, width) == 12,
10631 "offset of Viewport width should be 12");
10632 static_assert(offsetof(Viewport, height) == 16,
10633 "offset of Viewport height should be 16");
10635 struct WaitSync {
10636 typedef WaitSync ValueType;
10637 static const CommandId kCmdId = kWaitSync;
10638 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10639 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10641 static uint32_t ComputeSize() {
10642 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10645 void SetHeader() { header.SetCmd<ValueType>(); }
10647 void Init(GLuint _sync,
10648 GLbitfield _flags,
10649 GLuint _timeout_0,
10650 GLuint _timeout_1) {
10651 SetHeader();
10652 sync = _sync;
10653 flags = _flags;
10654 timeout_0 = _timeout_0;
10655 timeout_1 = _timeout_1;
10658 void* Set(void* cmd,
10659 GLuint _sync,
10660 GLbitfield _flags,
10661 GLuint _timeout_0,
10662 GLuint _timeout_1) {
10663 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1);
10664 return NextCmdAddress<ValueType>(cmd);
10667 gpu::CommandHeader header;
10668 uint32_t sync;
10669 uint32_t flags;
10670 uint32_t timeout_0;
10671 uint32_t timeout_1;
10674 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20");
10675 static_assert(offsetof(WaitSync, header) == 0,
10676 "offset of WaitSync header should be 0");
10677 static_assert(offsetof(WaitSync, sync) == 4,
10678 "offset of WaitSync sync should be 4");
10679 static_assert(offsetof(WaitSync, flags) == 8,
10680 "offset of WaitSync flags should be 8");
10681 static_assert(offsetof(WaitSync, timeout_0) == 12,
10682 "offset of WaitSync timeout_0 should be 12");
10683 static_assert(offsetof(WaitSync, timeout_1) == 16,
10684 "offset of WaitSync timeout_1 should be 16");
10686 struct BlitFramebufferCHROMIUM {
10687 typedef BlitFramebufferCHROMIUM ValueType;
10688 static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
10689 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10690 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10692 static uint32_t ComputeSize() {
10693 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10696 void SetHeader() { header.SetCmd<ValueType>(); }
10698 void Init(GLint _srcX0,
10699 GLint _srcY0,
10700 GLint _srcX1,
10701 GLint _srcY1,
10702 GLint _dstX0,
10703 GLint _dstY0,
10704 GLint _dstX1,
10705 GLint _dstY1,
10706 GLbitfield _mask,
10707 GLenum _filter) {
10708 SetHeader();
10709 srcX0 = _srcX0;
10710 srcY0 = _srcY0;
10711 srcX1 = _srcX1;
10712 srcY1 = _srcY1;
10713 dstX0 = _dstX0;
10714 dstY0 = _dstY0;
10715 dstX1 = _dstX1;
10716 dstY1 = _dstY1;
10717 mask = _mask;
10718 filter = _filter;
10721 void* Set(void* cmd,
10722 GLint _srcX0,
10723 GLint _srcY0,
10724 GLint _srcX1,
10725 GLint _srcY1,
10726 GLint _dstX0,
10727 GLint _dstY0,
10728 GLint _dstX1,
10729 GLint _dstY1,
10730 GLbitfield _mask,
10731 GLenum _filter) {
10732 static_cast<ValueType*>(cmd)->Init(_srcX0, _srcY0, _srcX1, _srcY1, _dstX0,
10733 _dstY0, _dstX1, _dstY1, _mask, _filter);
10734 return NextCmdAddress<ValueType>(cmd);
10737 gpu::CommandHeader header;
10738 int32_t srcX0;
10739 int32_t srcY0;
10740 int32_t srcX1;
10741 int32_t srcY1;
10742 int32_t dstX0;
10743 int32_t dstY0;
10744 int32_t dstX1;
10745 int32_t dstY1;
10746 uint32_t mask;
10747 uint32_t filter;
10750 static_assert(sizeof(BlitFramebufferCHROMIUM) == 44,
10751 "size of BlitFramebufferCHROMIUM should be 44");
10752 static_assert(offsetof(BlitFramebufferCHROMIUM, header) == 0,
10753 "offset of BlitFramebufferCHROMIUM header should be 0");
10754 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
10755 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
10756 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
10757 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
10758 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
10759 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
10760 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
10761 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
10762 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
10763 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
10764 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
10765 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
10766 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
10767 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
10768 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
10769 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
10770 static_assert(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
10771 "offset of BlitFramebufferCHROMIUM mask should be 36");
10772 static_assert(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
10773 "offset of BlitFramebufferCHROMIUM filter should be 40");
10775 // GL_CHROMIUM_framebuffer_multisample
10776 struct RenderbufferStorageMultisampleCHROMIUM {
10777 typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
10778 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
10779 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10780 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10782 static uint32_t ComputeSize() {
10783 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10786 void SetHeader() { header.SetCmd<ValueType>(); }
10788 void Init(GLenum _target,
10789 GLsizei _samples,
10790 GLenum _internalformat,
10791 GLsizei _width,
10792 GLsizei _height) {
10793 SetHeader();
10794 target = _target;
10795 samples = _samples;
10796 internalformat = _internalformat;
10797 width = _width;
10798 height = _height;
10801 void* Set(void* cmd,
10802 GLenum _target,
10803 GLsizei _samples,
10804 GLenum _internalformat,
10805 GLsizei _width,
10806 GLsizei _height) {
10807 static_cast<ValueType*>(cmd)
10808 ->Init(_target, _samples, _internalformat, _width, _height);
10809 return NextCmdAddress<ValueType>(cmd);
10812 gpu::CommandHeader header;
10813 uint32_t target;
10814 int32_t samples;
10815 uint32_t internalformat;
10816 int32_t width;
10817 int32_t height;
10820 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
10821 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10822 static_assert(
10823 offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
10824 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10825 static_assert(
10826 offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
10827 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10828 static_assert(
10829 offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
10830 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10831 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM,
10832 internalformat) == 12,
10833 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10834 "should be 12");
10835 static_assert(
10836 offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
10837 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10838 static_assert(
10839 offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
10840 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10842 // GL_EXT_multisampled_render_to_texture
10843 struct RenderbufferStorageMultisampleEXT {
10844 typedef RenderbufferStorageMultisampleEXT ValueType;
10845 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
10846 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10847 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10849 static uint32_t ComputeSize() {
10850 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10853 void SetHeader() { header.SetCmd<ValueType>(); }
10855 void Init(GLenum _target,
10856 GLsizei _samples,
10857 GLenum _internalformat,
10858 GLsizei _width,
10859 GLsizei _height) {
10860 SetHeader();
10861 target = _target;
10862 samples = _samples;
10863 internalformat = _internalformat;
10864 width = _width;
10865 height = _height;
10868 void* Set(void* cmd,
10869 GLenum _target,
10870 GLsizei _samples,
10871 GLenum _internalformat,
10872 GLsizei _width,
10873 GLsizei _height) {
10874 static_cast<ValueType*>(cmd)
10875 ->Init(_target, _samples, _internalformat, _width, _height);
10876 return NextCmdAddress<ValueType>(cmd);
10879 gpu::CommandHeader header;
10880 uint32_t target;
10881 int32_t samples;
10882 uint32_t internalformat;
10883 int32_t width;
10884 int32_t height;
10887 static_assert(sizeof(RenderbufferStorageMultisampleEXT) == 24,
10888 "size of RenderbufferStorageMultisampleEXT should be 24");
10889 static_assert(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
10890 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10891 static_assert(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
10892 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10893 static_assert(
10894 offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
10895 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10896 static_assert(
10897 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
10898 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10899 static_assert(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
10900 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10901 static_assert(
10902 offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
10903 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10905 struct FramebufferTexture2DMultisampleEXT {
10906 typedef FramebufferTexture2DMultisampleEXT ValueType;
10907 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
10908 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10909 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10911 static uint32_t ComputeSize() {
10912 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10915 void SetHeader() { header.SetCmd<ValueType>(); }
10917 void Init(GLenum _target,
10918 GLenum _attachment,
10919 GLenum _textarget,
10920 GLuint _texture,
10921 GLsizei _samples) {
10922 SetHeader();
10923 target = _target;
10924 attachment = _attachment;
10925 textarget = _textarget;
10926 texture = _texture;
10927 samples = _samples;
10930 void* Set(void* cmd,
10931 GLenum _target,
10932 GLenum _attachment,
10933 GLenum _textarget,
10934 GLuint _texture,
10935 GLsizei _samples) {
10936 static_cast<ValueType*>(cmd)
10937 ->Init(_target, _attachment, _textarget, _texture, _samples);
10938 return NextCmdAddress<ValueType>(cmd);
10941 gpu::CommandHeader header;
10942 uint32_t target;
10943 uint32_t attachment;
10944 uint32_t textarget;
10945 uint32_t texture;
10946 int32_t samples;
10947 static const int32_t level = 0;
10950 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24,
10951 "size of FramebufferTexture2DMultisampleEXT should be 24");
10952 static_assert(
10953 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
10954 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10955 static_assert(
10956 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
10957 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10958 static_assert(
10959 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
10960 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10961 static_assert(
10962 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
10963 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10964 static_assert(
10965 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
10966 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10967 static_assert(
10968 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20,
10969 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10971 struct TexStorage2DEXT {
10972 typedef TexStorage2DEXT ValueType;
10973 static const CommandId kCmdId = kTexStorage2DEXT;
10974 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10975 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
10977 static uint32_t ComputeSize() {
10978 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10981 void SetHeader() { header.SetCmd<ValueType>(); }
10983 void Init(GLenum _target,
10984 GLsizei _levels,
10985 GLenum _internalFormat,
10986 GLsizei _width,
10987 GLsizei _height) {
10988 SetHeader();
10989 target = _target;
10990 levels = _levels;
10991 internalFormat = _internalFormat;
10992 width = _width;
10993 height = _height;
10996 void* Set(void* cmd,
10997 GLenum _target,
10998 GLsizei _levels,
10999 GLenum _internalFormat,
11000 GLsizei _width,
11001 GLsizei _height) {
11002 static_cast<ValueType*>(cmd)
11003 ->Init(_target, _levels, _internalFormat, _width, _height);
11004 return NextCmdAddress<ValueType>(cmd);
11007 gpu::CommandHeader header;
11008 uint32_t target;
11009 int32_t levels;
11010 uint32_t internalFormat;
11011 int32_t width;
11012 int32_t height;
11015 static_assert(sizeof(TexStorage2DEXT) == 24,
11016 "size of TexStorage2DEXT should be 24");
11017 static_assert(offsetof(TexStorage2DEXT, header) == 0,
11018 "offset of TexStorage2DEXT header should be 0");
11019 static_assert(offsetof(TexStorage2DEXT, target) == 4,
11020 "offset of TexStorage2DEXT target should be 4");
11021 static_assert(offsetof(TexStorage2DEXT, levels) == 8,
11022 "offset of TexStorage2DEXT levels should be 8");
11023 static_assert(offsetof(TexStorage2DEXT, internalFormat) == 12,
11024 "offset of TexStorage2DEXT internalFormat should be 12");
11025 static_assert(offsetof(TexStorage2DEXT, width) == 16,
11026 "offset of TexStorage2DEXT width should be 16");
11027 static_assert(offsetof(TexStorage2DEXT, height) == 20,
11028 "offset of TexStorage2DEXT height should be 20");
11030 struct GenQueriesEXTImmediate {
11031 typedef GenQueriesEXTImmediate ValueType;
11032 static const CommandId kCmdId = kGenQueriesEXTImmediate;
11033 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11034 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11036 static uint32_t ComputeDataSize(GLsizei n) {
11037 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11040 static uint32_t ComputeSize(GLsizei n) {
11041 return static_cast<uint32_t>(sizeof(ValueType) +
11042 ComputeDataSize(n)); // NOLINT
11045 void SetHeader(GLsizei n) {
11046 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11049 void Init(GLsizei _n, GLuint* _queries) {
11050 SetHeader(_n);
11051 n = _n;
11052 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
11055 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
11056 static_cast<ValueType*>(cmd)->Init(_n, _queries);
11057 const uint32_t size = ComputeSize(_n);
11058 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11061 gpu::CommandHeader header;
11062 int32_t n;
11065 static_assert(sizeof(GenQueriesEXTImmediate) == 8,
11066 "size of GenQueriesEXTImmediate should be 8");
11067 static_assert(offsetof(GenQueriesEXTImmediate, header) == 0,
11068 "offset of GenQueriesEXTImmediate header should be 0");
11069 static_assert(offsetof(GenQueriesEXTImmediate, n) == 4,
11070 "offset of GenQueriesEXTImmediate n should be 4");
11072 struct DeleteQueriesEXTImmediate {
11073 typedef DeleteQueriesEXTImmediate ValueType;
11074 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
11075 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11076 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11078 static uint32_t ComputeDataSize(GLsizei n) {
11079 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11082 static uint32_t ComputeSize(GLsizei n) {
11083 return static_cast<uint32_t>(sizeof(ValueType) +
11084 ComputeDataSize(n)); // NOLINT
11087 void SetHeader(GLsizei n) {
11088 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11091 void Init(GLsizei _n, const GLuint* _queries) {
11092 SetHeader(_n);
11093 n = _n;
11094 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
11097 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
11098 static_cast<ValueType*>(cmd)->Init(_n, _queries);
11099 const uint32_t size = ComputeSize(_n);
11100 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11103 gpu::CommandHeader header;
11104 int32_t n;
11107 static_assert(sizeof(DeleteQueriesEXTImmediate) == 8,
11108 "size of DeleteQueriesEXTImmediate should be 8");
11109 static_assert(offsetof(DeleteQueriesEXTImmediate, header) == 0,
11110 "offset of DeleteQueriesEXTImmediate header should be 0");
11111 static_assert(offsetof(DeleteQueriesEXTImmediate, n) == 4,
11112 "offset of DeleteQueriesEXTImmediate n should be 4");
11114 struct QueryCounterEXT {
11115 typedef QueryCounterEXT ValueType;
11116 static const CommandId kCmdId = kQueryCounterEXT;
11117 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11118 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11120 static uint32_t ComputeSize() {
11121 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11124 void SetHeader() { header.SetCmd<ValueType>(); }
11126 void Init(GLuint _id,
11127 GLenum _target,
11128 uint32_t _sync_data_shm_id,
11129 uint32_t _sync_data_shm_offset,
11130 GLuint _submit_count) {
11131 SetHeader();
11132 id = _id;
11133 target = _target;
11134 sync_data_shm_id = _sync_data_shm_id;
11135 sync_data_shm_offset = _sync_data_shm_offset;
11136 submit_count = _submit_count;
11139 void* Set(void* cmd,
11140 GLuint _id,
11141 GLenum _target,
11142 uint32_t _sync_data_shm_id,
11143 uint32_t _sync_data_shm_offset,
11144 GLuint _submit_count) {
11145 static_cast<ValueType*>(cmd)->Init(_id, _target, _sync_data_shm_id,
11146 _sync_data_shm_offset, _submit_count);
11147 return NextCmdAddress<ValueType>(cmd);
11150 gpu::CommandHeader header;
11151 uint32_t id;
11152 uint32_t target;
11153 uint32_t sync_data_shm_id;
11154 uint32_t sync_data_shm_offset;
11155 uint32_t submit_count;
11158 static_assert(sizeof(QueryCounterEXT) == 24,
11159 "size of QueryCounterEXT should be 24");
11160 static_assert(offsetof(QueryCounterEXT, header) == 0,
11161 "offset of QueryCounterEXT header should be 0");
11162 static_assert(offsetof(QueryCounterEXT, id) == 4,
11163 "offset of QueryCounterEXT id should be 4");
11164 static_assert(offsetof(QueryCounterEXT, target) == 8,
11165 "offset of QueryCounterEXT target should be 8");
11166 static_assert(offsetof(QueryCounterEXT, sync_data_shm_id) == 12,
11167 "offset of QueryCounterEXT sync_data_shm_id should be 12");
11168 static_assert(offsetof(QueryCounterEXT, sync_data_shm_offset) == 16,
11169 "offset of QueryCounterEXT sync_data_shm_offset should be 16");
11170 static_assert(offsetof(QueryCounterEXT, submit_count) == 20,
11171 "offset of QueryCounterEXT submit_count should be 20");
11173 struct BeginQueryEXT {
11174 typedef BeginQueryEXT ValueType;
11175 static const CommandId kCmdId = kBeginQueryEXT;
11176 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11179 static uint32_t ComputeSize() {
11180 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11183 void SetHeader() { header.SetCmd<ValueType>(); }
11185 void Init(GLenum _target,
11186 GLuint _id,
11187 uint32_t _sync_data_shm_id,
11188 uint32_t _sync_data_shm_offset) {
11189 SetHeader();
11190 target = _target;
11191 id = _id;
11192 sync_data_shm_id = _sync_data_shm_id;
11193 sync_data_shm_offset = _sync_data_shm_offset;
11196 void* Set(void* cmd,
11197 GLenum _target,
11198 GLuint _id,
11199 uint32_t _sync_data_shm_id,
11200 uint32_t _sync_data_shm_offset) {
11201 static_cast<ValueType*>(cmd)
11202 ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
11203 return NextCmdAddress<ValueType>(cmd);
11206 gpu::CommandHeader header;
11207 uint32_t target;
11208 uint32_t id;
11209 uint32_t sync_data_shm_id;
11210 uint32_t sync_data_shm_offset;
11213 static_assert(sizeof(BeginQueryEXT) == 20,
11214 "size of BeginQueryEXT should be 20");
11215 static_assert(offsetof(BeginQueryEXT, header) == 0,
11216 "offset of BeginQueryEXT header should be 0");
11217 static_assert(offsetof(BeginQueryEXT, target) == 4,
11218 "offset of BeginQueryEXT target should be 4");
11219 static_assert(offsetof(BeginQueryEXT, id) == 8,
11220 "offset of BeginQueryEXT id should be 8");
11221 static_assert(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
11222 "offset of BeginQueryEXT sync_data_shm_id should be 12");
11223 static_assert(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
11224 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
11226 struct BeginTransformFeedback {
11227 typedef BeginTransformFeedback ValueType;
11228 static const CommandId kCmdId = kBeginTransformFeedback;
11229 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11232 static uint32_t ComputeSize() {
11233 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11236 void SetHeader() { header.SetCmd<ValueType>(); }
11238 void Init(GLenum _primitivemode) {
11239 SetHeader();
11240 primitivemode = _primitivemode;
11243 void* Set(void* cmd, GLenum _primitivemode) {
11244 static_cast<ValueType*>(cmd)->Init(_primitivemode);
11245 return NextCmdAddress<ValueType>(cmd);
11248 gpu::CommandHeader header;
11249 uint32_t primitivemode;
11252 static_assert(sizeof(BeginTransformFeedback) == 8,
11253 "size of BeginTransformFeedback should be 8");
11254 static_assert(offsetof(BeginTransformFeedback, header) == 0,
11255 "offset of BeginTransformFeedback header should be 0");
11256 static_assert(offsetof(BeginTransformFeedback, primitivemode) == 4,
11257 "offset of BeginTransformFeedback primitivemode should be 4");
11259 struct EndQueryEXT {
11260 typedef EndQueryEXT ValueType;
11261 static const CommandId kCmdId = kEndQueryEXT;
11262 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11263 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11265 static uint32_t ComputeSize() {
11266 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11269 void SetHeader() { header.SetCmd<ValueType>(); }
11271 void Init(GLenum _target, GLuint _submit_count) {
11272 SetHeader();
11273 target = _target;
11274 submit_count = _submit_count;
11277 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
11278 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
11279 return NextCmdAddress<ValueType>(cmd);
11282 gpu::CommandHeader header;
11283 uint32_t target;
11284 uint32_t submit_count;
11287 static_assert(sizeof(EndQueryEXT) == 12, "size of EndQueryEXT should be 12");
11288 static_assert(offsetof(EndQueryEXT, header) == 0,
11289 "offset of EndQueryEXT header should be 0");
11290 static_assert(offsetof(EndQueryEXT, target) == 4,
11291 "offset of EndQueryEXT target should be 4");
11292 static_assert(offsetof(EndQueryEXT, submit_count) == 8,
11293 "offset of EndQueryEXT submit_count should be 8");
11295 struct EndTransformFeedback {
11296 typedef EndTransformFeedback ValueType;
11297 static const CommandId kCmdId = kEndTransformFeedback;
11298 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11299 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11301 static uint32_t ComputeSize() {
11302 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11305 void SetHeader() { header.SetCmd<ValueType>(); }
11307 void Init() { SetHeader(); }
11309 void* Set(void* cmd) {
11310 static_cast<ValueType*>(cmd)->Init();
11311 return NextCmdAddress<ValueType>(cmd);
11314 gpu::CommandHeader header;
11317 static_assert(sizeof(EndTransformFeedback) == 4,
11318 "size of EndTransformFeedback should be 4");
11319 static_assert(offsetof(EndTransformFeedback, header) == 0,
11320 "offset of EndTransformFeedback header should be 0");
11322 struct SetDisjointValueSyncCHROMIUM {
11323 typedef SetDisjointValueSyncCHROMIUM ValueType;
11324 static const CommandId kCmdId = kSetDisjointValueSyncCHROMIUM;
11325 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11326 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11328 static uint32_t ComputeSize() {
11329 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11332 void SetHeader() { header.SetCmd<ValueType>(); }
11334 void Init(uint32_t _sync_data_shm_id, uint32_t _sync_data_shm_offset) {
11335 SetHeader();
11336 sync_data_shm_id = _sync_data_shm_id;
11337 sync_data_shm_offset = _sync_data_shm_offset;
11340 void* Set(void* cmd,
11341 uint32_t _sync_data_shm_id,
11342 uint32_t _sync_data_shm_offset) {
11343 static_cast<ValueType*>(cmd)
11344 ->Init(_sync_data_shm_id, _sync_data_shm_offset);
11345 return NextCmdAddress<ValueType>(cmd);
11348 gpu::CommandHeader header;
11349 uint32_t sync_data_shm_id;
11350 uint32_t sync_data_shm_offset;
11353 static_assert(sizeof(SetDisjointValueSyncCHROMIUM) == 12,
11354 "size of SetDisjointValueSyncCHROMIUM should be 12");
11355 static_assert(offsetof(SetDisjointValueSyncCHROMIUM, header) == 0,
11356 "offset of SetDisjointValueSyncCHROMIUM header should be 0");
11357 static_assert(
11358 offsetof(SetDisjointValueSyncCHROMIUM, sync_data_shm_id) == 4,
11359 "offset of SetDisjointValueSyncCHROMIUM sync_data_shm_id should be 4");
11360 static_assert(
11361 offsetof(SetDisjointValueSyncCHROMIUM, sync_data_shm_offset) == 8,
11362 "offset of SetDisjointValueSyncCHROMIUM sync_data_shm_offset should be 8");
11364 struct InsertEventMarkerEXT {
11365 typedef InsertEventMarkerEXT ValueType;
11366 static const CommandId kCmdId = kInsertEventMarkerEXT;
11367 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11368 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11370 static uint32_t ComputeSize() {
11371 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11374 void SetHeader() { header.SetCmd<ValueType>(); }
11376 void Init(GLuint _bucket_id) {
11377 SetHeader();
11378 bucket_id = _bucket_id;
11381 void* Set(void* cmd, GLuint _bucket_id) {
11382 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11383 return NextCmdAddress<ValueType>(cmd);
11386 gpu::CommandHeader header;
11387 uint32_t bucket_id;
11390 static_assert(sizeof(InsertEventMarkerEXT) == 8,
11391 "size of InsertEventMarkerEXT should be 8");
11392 static_assert(offsetof(InsertEventMarkerEXT, header) == 0,
11393 "offset of InsertEventMarkerEXT header should be 0");
11394 static_assert(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
11395 "offset of InsertEventMarkerEXT bucket_id should be 4");
11397 struct PushGroupMarkerEXT {
11398 typedef PushGroupMarkerEXT ValueType;
11399 static const CommandId kCmdId = kPushGroupMarkerEXT;
11400 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11401 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11403 static uint32_t ComputeSize() {
11404 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11407 void SetHeader() { header.SetCmd<ValueType>(); }
11409 void Init(GLuint _bucket_id) {
11410 SetHeader();
11411 bucket_id = _bucket_id;
11414 void* Set(void* cmd, GLuint _bucket_id) {
11415 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11416 return NextCmdAddress<ValueType>(cmd);
11419 gpu::CommandHeader header;
11420 uint32_t bucket_id;
11423 static_assert(sizeof(PushGroupMarkerEXT) == 8,
11424 "size of PushGroupMarkerEXT should be 8");
11425 static_assert(offsetof(PushGroupMarkerEXT, header) == 0,
11426 "offset of PushGroupMarkerEXT header should be 0");
11427 static_assert(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
11428 "offset of PushGroupMarkerEXT bucket_id should be 4");
11430 struct PopGroupMarkerEXT {
11431 typedef PopGroupMarkerEXT ValueType;
11432 static const CommandId kCmdId = kPopGroupMarkerEXT;
11433 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11434 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11436 static uint32_t ComputeSize() {
11437 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11440 void SetHeader() { header.SetCmd<ValueType>(); }
11442 void Init() { SetHeader(); }
11444 void* Set(void* cmd) {
11445 static_cast<ValueType*>(cmd)->Init();
11446 return NextCmdAddress<ValueType>(cmd);
11449 gpu::CommandHeader header;
11452 static_assert(sizeof(PopGroupMarkerEXT) == 4,
11453 "size of PopGroupMarkerEXT should be 4");
11454 static_assert(offsetof(PopGroupMarkerEXT, header) == 0,
11455 "offset of PopGroupMarkerEXT header should be 0");
11457 struct GenVertexArraysOESImmediate {
11458 typedef GenVertexArraysOESImmediate ValueType;
11459 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
11460 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11461 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11463 static uint32_t ComputeDataSize(GLsizei n) {
11464 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11467 static uint32_t ComputeSize(GLsizei n) {
11468 return static_cast<uint32_t>(sizeof(ValueType) +
11469 ComputeDataSize(n)); // NOLINT
11472 void SetHeader(GLsizei n) {
11473 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11476 void Init(GLsizei _n, GLuint* _arrays) {
11477 SetHeader(_n);
11478 n = _n;
11479 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
11482 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
11483 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
11484 const uint32_t size = ComputeSize(_n);
11485 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11488 gpu::CommandHeader header;
11489 int32_t n;
11492 static_assert(sizeof(GenVertexArraysOESImmediate) == 8,
11493 "size of GenVertexArraysOESImmediate should be 8");
11494 static_assert(offsetof(GenVertexArraysOESImmediate, header) == 0,
11495 "offset of GenVertexArraysOESImmediate header should be 0");
11496 static_assert(offsetof(GenVertexArraysOESImmediate, n) == 4,
11497 "offset of GenVertexArraysOESImmediate n should be 4");
11499 struct DeleteVertexArraysOESImmediate {
11500 typedef DeleteVertexArraysOESImmediate ValueType;
11501 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
11502 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11503 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11505 static uint32_t ComputeDataSize(GLsizei n) {
11506 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11509 static uint32_t ComputeSize(GLsizei n) {
11510 return static_cast<uint32_t>(sizeof(ValueType) +
11511 ComputeDataSize(n)); // NOLINT
11514 void SetHeader(GLsizei n) {
11515 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11518 void Init(GLsizei _n, const GLuint* _arrays) {
11519 SetHeader(_n);
11520 n = _n;
11521 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
11524 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
11525 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
11526 const uint32_t size = ComputeSize(_n);
11527 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11530 gpu::CommandHeader header;
11531 int32_t n;
11534 static_assert(sizeof(DeleteVertexArraysOESImmediate) == 8,
11535 "size of DeleteVertexArraysOESImmediate should be 8");
11536 static_assert(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
11537 "offset of DeleteVertexArraysOESImmediate header should be 0");
11538 static_assert(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
11539 "offset of DeleteVertexArraysOESImmediate n should be 4");
11541 struct IsVertexArrayOES {
11542 typedef IsVertexArrayOES ValueType;
11543 static const CommandId kCmdId = kIsVertexArrayOES;
11544 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11545 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11547 typedef uint32_t Result;
11549 static uint32_t ComputeSize() {
11550 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11553 void SetHeader() { header.SetCmd<ValueType>(); }
11555 void Init(GLuint _array,
11556 uint32_t _result_shm_id,
11557 uint32_t _result_shm_offset) {
11558 SetHeader();
11559 array = _array;
11560 result_shm_id = _result_shm_id;
11561 result_shm_offset = _result_shm_offset;
11564 void* Set(void* cmd,
11565 GLuint _array,
11566 uint32_t _result_shm_id,
11567 uint32_t _result_shm_offset) {
11568 static_cast<ValueType*>(cmd)
11569 ->Init(_array, _result_shm_id, _result_shm_offset);
11570 return NextCmdAddress<ValueType>(cmd);
11573 gpu::CommandHeader header;
11574 uint32_t array;
11575 uint32_t result_shm_id;
11576 uint32_t result_shm_offset;
11579 static_assert(sizeof(IsVertexArrayOES) == 16,
11580 "size of IsVertexArrayOES should be 16");
11581 static_assert(offsetof(IsVertexArrayOES, header) == 0,
11582 "offset of IsVertexArrayOES header should be 0");
11583 static_assert(offsetof(IsVertexArrayOES, array) == 4,
11584 "offset of IsVertexArrayOES array should be 4");
11585 static_assert(offsetof(IsVertexArrayOES, result_shm_id) == 8,
11586 "offset of IsVertexArrayOES result_shm_id should be 8");
11587 static_assert(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
11588 "offset of IsVertexArrayOES result_shm_offset should be 12");
11590 struct BindVertexArrayOES {
11591 typedef BindVertexArrayOES ValueType;
11592 static const CommandId kCmdId = kBindVertexArrayOES;
11593 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11594 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11596 static uint32_t ComputeSize() {
11597 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11600 void SetHeader() { header.SetCmd<ValueType>(); }
11602 void Init(GLuint _array) {
11603 SetHeader();
11604 array = _array;
11607 void* Set(void* cmd, GLuint _array) {
11608 static_cast<ValueType*>(cmd)->Init(_array);
11609 return NextCmdAddress<ValueType>(cmd);
11612 gpu::CommandHeader header;
11613 uint32_t array;
11616 static_assert(sizeof(BindVertexArrayOES) == 8,
11617 "size of BindVertexArrayOES should be 8");
11618 static_assert(offsetof(BindVertexArrayOES, header) == 0,
11619 "offset of BindVertexArrayOES header should be 0");
11620 static_assert(offsetof(BindVertexArrayOES, array) == 4,
11621 "offset of BindVertexArrayOES array should be 4");
11623 struct SwapBuffers {
11624 typedef SwapBuffers ValueType;
11625 static const CommandId kCmdId = kSwapBuffers;
11626 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11627 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11629 static uint32_t ComputeSize() {
11630 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11633 void SetHeader() { header.SetCmd<ValueType>(); }
11635 void Init() { SetHeader(); }
11637 void* Set(void* cmd) {
11638 static_cast<ValueType*>(cmd)->Init();
11639 return NextCmdAddress<ValueType>(cmd);
11642 gpu::CommandHeader header;
11645 static_assert(sizeof(SwapBuffers) == 4, "size of SwapBuffers should be 4");
11646 static_assert(offsetof(SwapBuffers, header) == 0,
11647 "offset of SwapBuffers header should be 0");
11649 struct GetMaxValueInBufferCHROMIUM {
11650 typedef GetMaxValueInBufferCHROMIUM ValueType;
11651 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
11652 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11653 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11655 typedef GLuint Result;
11657 static uint32_t ComputeSize() {
11658 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11661 void SetHeader() { header.SetCmd<ValueType>(); }
11663 void Init(GLuint _buffer_id,
11664 GLsizei _count,
11665 GLenum _type,
11666 GLuint _offset,
11667 uint32_t _result_shm_id,
11668 uint32_t _result_shm_offset) {
11669 SetHeader();
11670 buffer_id = _buffer_id;
11671 count = _count;
11672 type = _type;
11673 offset = _offset;
11674 result_shm_id = _result_shm_id;
11675 result_shm_offset = _result_shm_offset;
11678 void* Set(void* cmd,
11679 GLuint _buffer_id,
11680 GLsizei _count,
11681 GLenum _type,
11682 GLuint _offset,
11683 uint32_t _result_shm_id,
11684 uint32_t _result_shm_offset) {
11685 static_cast<ValueType*>(cmd)->Init(_buffer_id, _count, _type, _offset,
11686 _result_shm_id, _result_shm_offset);
11687 return NextCmdAddress<ValueType>(cmd);
11690 gpu::CommandHeader header;
11691 uint32_t buffer_id;
11692 int32_t count;
11693 uint32_t type;
11694 uint32_t offset;
11695 uint32_t result_shm_id;
11696 uint32_t result_shm_offset;
11699 static_assert(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
11700 "size of GetMaxValueInBufferCHROMIUM should be 28");
11701 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
11702 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
11703 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
11704 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
11705 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
11706 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
11707 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
11708 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
11709 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
11710 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
11711 static_assert(
11712 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
11713 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
11714 static_assert(
11715 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
11716 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
11718 struct EnableFeatureCHROMIUM {
11719 typedef EnableFeatureCHROMIUM ValueType;
11720 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
11721 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11722 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11724 typedef GLint Result;
11726 static uint32_t ComputeSize() {
11727 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11730 void SetHeader() { header.SetCmd<ValueType>(); }
11732 void Init(GLuint _bucket_id,
11733 uint32_t _result_shm_id,
11734 uint32_t _result_shm_offset) {
11735 SetHeader();
11736 bucket_id = _bucket_id;
11737 result_shm_id = _result_shm_id;
11738 result_shm_offset = _result_shm_offset;
11741 void* Set(void* cmd,
11742 GLuint _bucket_id,
11743 uint32_t _result_shm_id,
11744 uint32_t _result_shm_offset) {
11745 static_cast<ValueType*>(cmd)
11746 ->Init(_bucket_id, _result_shm_id, _result_shm_offset);
11747 return NextCmdAddress<ValueType>(cmd);
11750 gpu::CommandHeader header;
11751 uint32_t bucket_id;
11752 uint32_t result_shm_id;
11753 uint32_t result_shm_offset;
11756 static_assert(sizeof(EnableFeatureCHROMIUM) == 16,
11757 "size of EnableFeatureCHROMIUM should be 16");
11758 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0,
11759 "offset of EnableFeatureCHROMIUM header should be 0");
11760 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
11761 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
11762 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
11763 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
11764 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
11765 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
11767 struct MapBufferRange {
11768 typedef MapBufferRange ValueType;
11769 static const CommandId kCmdId = kMapBufferRange;
11770 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11771 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11773 typedef uint32_t Result;
11775 static uint32_t ComputeSize() {
11776 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11779 void SetHeader() { header.SetCmd<ValueType>(); }
11781 void Init(GLenum _target,
11782 GLintptr _offset,
11783 GLsizeiptr _size,
11784 GLbitfield _access,
11785 uint32_t _data_shm_id,
11786 uint32_t _data_shm_offset,
11787 uint32_t _result_shm_id,
11788 uint32_t _result_shm_offset) {
11789 SetHeader();
11790 target = _target;
11791 offset = _offset;
11792 size = _size;
11793 access = _access;
11794 data_shm_id = _data_shm_id;
11795 data_shm_offset = _data_shm_offset;
11796 result_shm_id = _result_shm_id;
11797 result_shm_offset = _result_shm_offset;
11800 void* Set(void* cmd,
11801 GLenum _target,
11802 GLintptr _offset,
11803 GLsizeiptr _size,
11804 GLbitfield _access,
11805 uint32_t _data_shm_id,
11806 uint32_t _data_shm_offset,
11807 uint32_t _result_shm_id,
11808 uint32_t _result_shm_offset) {
11809 static_cast<ValueType*>(cmd)->Init(_target, _offset, _size, _access,
11810 _data_shm_id, _data_shm_offset,
11811 _result_shm_id, _result_shm_offset);
11812 return NextCmdAddress<ValueType>(cmd);
11815 gpu::CommandHeader header;
11816 uint32_t target;
11817 int32_t offset;
11818 int32_t size;
11819 uint32_t access;
11820 uint32_t data_shm_id;
11821 uint32_t data_shm_offset;
11822 uint32_t result_shm_id;
11823 uint32_t result_shm_offset;
11826 static_assert(sizeof(MapBufferRange) == 36,
11827 "size of MapBufferRange should be 36");
11828 static_assert(offsetof(MapBufferRange, header) == 0,
11829 "offset of MapBufferRange header should be 0");
11830 static_assert(offsetof(MapBufferRange, target) == 4,
11831 "offset of MapBufferRange target should be 4");
11832 static_assert(offsetof(MapBufferRange, offset) == 8,
11833 "offset of MapBufferRange offset should be 8");
11834 static_assert(offsetof(MapBufferRange, size) == 12,
11835 "offset of MapBufferRange size should be 12");
11836 static_assert(offsetof(MapBufferRange, access) == 16,
11837 "offset of MapBufferRange access should be 16");
11838 static_assert(offsetof(MapBufferRange, data_shm_id) == 20,
11839 "offset of MapBufferRange data_shm_id should be 20");
11840 static_assert(offsetof(MapBufferRange, data_shm_offset) == 24,
11841 "offset of MapBufferRange data_shm_offset should be 24");
11842 static_assert(offsetof(MapBufferRange, result_shm_id) == 28,
11843 "offset of MapBufferRange result_shm_id should be 28");
11844 static_assert(offsetof(MapBufferRange, result_shm_offset) == 32,
11845 "offset of MapBufferRange result_shm_offset should be 32");
11847 struct UnmapBuffer {
11848 typedef UnmapBuffer ValueType;
11849 static const CommandId kCmdId = kUnmapBuffer;
11850 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11851 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11853 static uint32_t ComputeSize() {
11854 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11857 void SetHeader() { header.SetCmd<ValueType>(); }
11859 void Init(GLenum _target) {
11860 SetHeader();
11861 target = _target;
11864 void* Set(void* cmd, GLenum _target) {
11865 static_cast<ValueType*>(cmd)->Init(_target);
11866 return NextCmdAddress<ValueType>(cmd);
11869 gpu::CommandHeader header;
11870 uint32_t target;
11873 static_assert(sizeof(UnmapBuffer) == 8, "size of UnmapBuffer should be 8");
11874 static_assert(offsetof(UnmapBuffer, header) == 0,
11875 "offset of UnmapBuffer header should be 0");
11876 static_assert(offsetof(UnmapBuffer, target) == 4,
11877 "offset of UnmapBuffer target should be 4");
11879 struct ResizeCHROMIUM {
11880 typedef ResizeCHROMIUM ValueType;
11881 static const CommandId kCmdId = kResizeCHROMIUM;
11882 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11883 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11885 static uint32_t ComputeSize() {
11886 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11889 void SetHeader() { header.SetCmd<ValueType>(); }
11891 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
11892 SetHeader();
11893 width = _width;
11894 height = _height;
11895 scale_factor = _scale_factor;
11898 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
11899 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
11900 return NextCmdAddress<ValueType>(cmd);
11903 gpu::CommandHeader header;
11904 uint32_t width;
11905 uint32_t height;
11906 float scale_factor;
11909 static_assert(sizeof(ResizeCHROMIUM) == 16,
11910 "size of ResizeCHROMIUM should be 16");
11911 static_assert(offsetof(ResizeCHROMIUM, header) == 0,
11912 "offset of ResizeCHROMIUM header should be 0");
11913 static_assert(offsetof(ResizeCHROMIUM, width) == 4,
11914 "offset of ResizeCHROMIUM width should be 4");
11915 static_assert(offsetof(ResizeCHROMIUM, height) == 8,
11916 "offset of ResizeCHROMIUM height should be 8");
11917 static_assert(offsetof(ResizeCHROMIUM, scale_factor) == 12,
11918 "offset of ResizeCHROMIUM scale_factor should be 12");
11920 struct GetRequestableExtensionsCHROMIUM {
11921 typedef GetRequestableExtensionsCHROMIUM ValueType;
11922 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
11923 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11924 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11926 static uint32_t ComputeSize() {
11927 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11930 void SetHeader() { header.SetCmd<ValueType>(); }
11932 void Init(uint32_t _bucket_id) {
11933 SetHeader();
11934 bucket_id = _bucket_id;
11937 void* Set(void* cmd, uint32_t _bucket_id) {
11938 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11939 return NextCmdAddress<ValueType>(cmd);
11942 gpu::CommandHeader header;
11943 uint32_t bucket_id;
11946 static_assert(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
11947 "size of GetRequestableExtensionsCHROMIUM should be 8");
11948 static_assert(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
11949 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
11950 static_assert(
11951 offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
11952 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
11954 struct RequestExtensionCHROMIUM {
11955 typedef RequestExtensionCHROMIUM ValueType;
11956 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
11957 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11958 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11960 static uint32_t ComputeSize() {
11961 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11964 void SetHeader() { header.SetCmd<ValueType>(); }
11966 void Init(uint32_t _bucket_id) {
11967 SetHeader();
11968 bucket_id = _bucket_id;
11971 void* Set(void* cmd, uint32_t _bucket_id) {
11972 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11973 return NextCmdAddress<ValueType>(cmd);
11976 gpu::CommandHeader header;
11977 uint32_t bucket_id;
11980 static_assert(sizeof(RequestExtensionCHROMIUM) == 8,
11981 "size of RequestExtensionCHROMIUM should be 8");
11982 static_assert(offsetof(RequestExtensionCHROMIUM, header) == 0,
11983 "offset of RequestExtensionCHROMIUM header should be 0");
11984 static_assert(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
11985 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
11987 struct GetProgramInfoCHROMIUM {
11988 typedef GetProgramInfoCHROMIUM ValueType;
11989 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
11990 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11991 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11993 struct Result {
11994 uint32_t link_status;
11995 uint32_t num_attribs;
11996 uint32_t num_uniforms;
11999 static uint32_t ComputeSize() {
12000 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12003 void SetHeader() { header.SetCmd<ValueType>(); }
12005 void Init(GLuint _program, uint32_t _bucket_id) {
12006 SetHeader();
12007 program = _program;
12008 bucket_id = _bucket_id;
12011 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
12012 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
12013 return NextCmdAddress<ValueType>(cmd);
12016 gpu::CommandHeader header;
12017 uint32_t program;
12018 uint32_t bucket_id;
12021 static_assert(sizeof(GetProgramInfoCHROMIUM) == 12,
12022 "size of GetProgramInfoCHROMIUM should be 12");
12023 static_assert(offsetof(GetProgramInfoCHROMIUM, header) == 0,
12024 "offset of GetProgramInfoCHROMIUM header should be 0");
12025 static_assert(offsetof(GetProgramInfoCHROMIUM, program) == 4,
12026 "offset of GetProgramInfoCHROMIUM program should be 4");
12027 static_assert(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
12028 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
12029 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
12030 "offset of GetProgramInfoCHROMIUM Result link_status should be "
12031 "0");
12032 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
12033 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
12034 "4");
12035 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
12036 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
12037 "8");
12039 struct GetUniformBlocksCHROMIUM {
12040 typedef GetUniformBlocksCHROMIUM ValueType;
12041 static const CommandId kCmdId = kGetUniformBlocksCHROMIUM;
12042 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12043 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12045 typedef uint32_t Result;
12047 static uint32_t ComputeSize() {
12048 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12051 void SetHeader() { header.SetCmd<ValueType>(); }
12053 void Init(GLuint _program, uint32_t _bucket_id) {
12054 SetHeader();
12055 program = _program;
12056 bucket_id = _bucket_id;
12059 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
12060 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
12061 return NextCmdAddress<ValueType>(cmd);
12064 gpu::CommandHeader header;
12065 uint32_t program;
12066 uint32_t bucket_id;
12069 static_assert(sizeof(GetUniformBlocksCHROMIUM) == 12,
12070 "size of GetUniformBlocksCHROMIUM should be 12");
12071 static_assert(offsetof(GetUniformBlocksCHROMIUM, header) == 0,
12072 "offset of GetUniformBlocksCHROMIUM header should be 0");
12073 static_assert(offsetof(GetUniformBlocksCHROMIUM, program) == 4,
12074 "offset of GetUniformBlocksCHROMIUM program should be 4");
12075 static_assert(offsetof(GetUniformBlocksCHROMIUM, bucket_id) == 8,
12076 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
12078 struct GetTransformFeedbackVaryingsCHROMIUM {
12079 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType;
12080 static const CommandId kCmdId = kGetTransformFeedbackVaryingsCHROMIUM;
12081 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12082 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12084 typedef uint32_t Result;
12086 static uint32_t ComputeSize() {
12087 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12090 void SetHeader() { header.SetCmd<ValueType>(); }
12092 void Init(GLuint _program, uint32_t _bucket_id) {
12093 SetHeader();
12094 program = _program;
12095 bucket_id = _bucket_id;
12098 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
12099 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
12100 return NextCmdAddress<ValueType>(cmd);
12103 gpu::CommandHeader header;
12104 uint32_t program;
12105 uint32_t bucket_id;
12108 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM) == 12,
12109 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
12110 static_assert(
12111 offsetof(GetTransformFeedbackVaryingsCHROMIUM, header) == 0,
12112 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
12113 static_assert(
12114 offsetof(GetTransformFeedbackVaryingsCHROMIUM, program) == 4,
12115 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
12116 static_assert(
12117 offsetof(GetTransformFeedbackVaryingsCHROMIUM, bucket_id) == 8,
12118 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
12120 struct GetUniformsES3CHROMIUM {
12121 typedef GetUniformsES3CHROMIUM ValueType;
12122 static const CommandId kCmdId = kGetUniformsES3CHROMIUM;
12123 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12124 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12126 typedef uint32_t Result;
12128 static uint32_t ComputeSize() {
12129 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12132 void SetHeader() { header.SetCmd<ValueType>(); }
12134 void Init(GLuint _program, uint32_t _bucket_id) {
12135 SetHeader();
12136 program = _program;
12137 bucket_id = _bucket_id;
12140 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
12141 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
12142 return NextCmdAddress<ValueType>(cmd);
12145 gpu::CommandHeader header;
12146 uint32_t program;
12147 uint32_t bucket_id;
12150 static_assert(sizeof(GetUniformsES3CHROMIUM) == 12,
12151 "size of GetUniformsES3CHROMIUM should be 12");
12152 static_assert(offsetof(GetUniformsES3CHROMIUM, header) == 0,
12153 "offset of GetUniformsES3CHROMIUM header should be 0");
12154 static_assert(offsetof(GetUniformsES3CHROMIUM, program) == 4,
12155 "offset of GetUniformsES3CHROMIUM program should be 4");
12156 static_assert(offsetof(GetUniformsES3CHROMIUM, bucket_id) == 8,
12157 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
12159 struct GetTranslatedShaderSourceANGLE {
12160 typedef GetTranslatedShaderSourceANGLE ValueType;
12161 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
12162 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12163 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12165 static uint32_t ComputeSize() {
12166 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12169 void SetHeader() { header.SetCmd<ValueType>(); }
12171 void Init(GLuint _shader, uint32_t _bucket_id) {
12172 SetHeader();
12173 shader = _shader;
12174 bucket_id = _bucket_id;
12177 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
12178 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
12179 return NextCmdAddress<ValueType>(cmd);
12182 gpu::CommandHeader header;
12183 uint32_t shader;
12184 uint32_t bucket_id;
12187 static_assert(sizeof(GetTranslatedShaderSourceANGLE) == 12,
12188 "size of GetTranslatedShaderSourceANGLE should be 12");
12189 static_assert(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
12190 "offset of GetTranslatedShaderSourceANGLE header should be 0");
12191 static_assert(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
12192 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
12193 static_assert(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
12194 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
12196 struct PostSubBufferCHROMIUM {
12197 typedef PostSubBufferCHROMIUM ValueType;
12198 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
12199 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12200 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12202 static uint32_t ComputeSize() {
12203 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12206 void SetHeader() { header.SetCmd<ValueType>(); }
12208 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
12209 SetHeader();
12210 x = _x;
12211 y = _y;
12212 width = _width;
12213 height = _height;
12216 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
12217 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
12218 return NextCmdAddress<ValueType>(cmd);
12221 gpu::CommandHeader header;
12222 int32_t x;
12223 int32_t y;
12224 int32_t width;
12225 int32_t height;
12228 static_assert(sizeof(PostSubBufferCHROMIUM) == 20,
12229 "size of PostSubBufferCHROMIUM should be 20");
12230 static_assert(offsetof(PostSubBufferCHROMIUM, header) == 0,
12231 "offset of PostSubBufferCHROMIUM header should be 0");
12232 static_assert(offsetof(PostSubBufferCHROMIUM, x) == 4,
12233 "offset of PostSubBufferCHROMIUM x should be 4");
12234 static_assert(offsetof(PostSubBufferCHROMIUM, y) == 8,
12235 "offset of PostSubBufferCHROMIUM y should be 8");
12236 static_assert(offsetof(PostSubBufferCHROMIUM, width) == 12,
12237 "offset of PostSubBufferCHROMIUM width should be 12");
12238 static_assert(offsetof(PostSubBufferCHROMIUM, height) == 16,
12239 "offset of PostSubBufferCHROMIUM height should be 16");
12241 struct TexImageIOSurface2DCHROMIUM {
12242 typedef TexImageIOSurface2DCHROMIUM ValueType;
12243 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
12244 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12245 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12247 static uint32_t ComputeSize() {
12248 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12251 void SetHeader() { header.SetCmd<ValueType>(); }
12253 void Init(GLenum _target,
12254 GLsizei _width,
12255 GLsizei _height,
12256 GLuint _ioSurfaceId,
12257 GLuint _plane) {
12258 SetHeader();
12259 target = _target;
12260 width = _width;
12261 height = _height;
12262 ioSurfaceId = _ioSurfaceId;
12263 plane = _plane;
12266 void* Set(void* cmd,
12267 GLenum _target,
12268 GLsizei _width,
12269 GLsizei _height,
12270 GLuint _ioSurfaceId,
12271 GLuint _plane) {
12272 static_cast<ValueType*>(cmd)
12273 ->Init(_target, _width, _height, _ioSurfaceId, _plane);
12274 return NextCmdAddress<ValueType>(cmd);
12277 gpu::CommandHeader header;
12278 uint32_t target;
12279 int32_t width;
12280 int32_t height;
12281 uint32_t ioSurfaceId;
12282 uint32_t plane;
12285 static_assert(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
12286 "size of TexImageIOSurface2DCHROMIUM should be 24");
12287 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
12288 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
12289 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
12290 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
12291 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
12292 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
12293 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
12294 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
12295 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
12296 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
12297 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
12298 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
12300 struct CopyTextureCHROMIUM {
12301 typedef CopyTextureCHROMIUM ValueType;
12302 static const CommandId kCmdId = kCopyTextureCHROMIUM;
12303 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12304 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12306 static uint32_t ComputeSize() {
12307 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12310 void SetHeader() { header.SetCmd<ValueType>(); }
12312 void Init(GLenum _target,
12313 GLenum _source_id,
12314 GLenum _dest_id,
12315 GLint _internalformat,
12316 GLenum _dest_type,
12317 GLboolean _unpack_flip_y,
12318 GLboolean _unpack_premultiply_alpha,
12319 GLboolean _unpack_unmultiply_alpha) {
12320 SetHeader();
12321 target = _target;
12322 source_id = _source_id;
12323 dest_id = _dest_id;
12324 internalformat = _internalformat;
12325 dest_type = _dest_type;
12326 unpack_flip_y = _unpack_flip_y;
12327 unpack_premultiply_alpha = _unpack_premultiply_alpha;
12328 unpack_unmultiply_alpha = _unpack_unmultiply_alpha;
12331 void* Set(void* cmd,
12332 GLenum _target,
12333 GLenum _source_id,
12334 GLenum _dest_id,
12335 GLint _internalformat,
12336 GLenum _dest_type,
12337 GLboolean _unpack_flip_y,
12338 GLboolean _unpack_premultiply_alpha,
12339 GLboolean _unpack_unmultiply_alpha) {
12340 static_cast<ValueType*>(cmd)->Init(
12341 _target, _source_id, _dest_id, _internalformat, _dest_type,
12342 _unpack_flip_y, _unpack_premultiply_alpha, _unpack_unmultiply_alpha);
12343 return NextCmdAddress<ValueType>(cmd);
12346 gpu::CommandHeader header;
12347 uint32_t target;
12348 uint32_t source_id;
12349 uint32_t dest_id;
12350 int32_t internalformat;
12351 uint32_t dest_type;
12352 uint32_t unpack_flip_y;
12353 uint32_t unpack_premultiply_alpha;
12354 uint32_t unpack_unmultiply_alpha;
12357 static_assert(sizeof(CopyTextureCHROMIUM) == 36,
12358 "size of CopyTextureCHROMIUM should be 36");
12359 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0,
12360 "offset of CopyTextureCHROMIUM header should be 0");
12361 static_assert(offsetof(CopyTextureCHROMIUM, target) == 4,
12362 "offset of CopyTextureCHROMIUM target should be 4");
12363 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 8,
12364 "offset of CopyTextureCHROMIUM source_id should be 8");
12365 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
12366 "offset of CopyTextureCHROMIUM dest_id should be 12");
12367 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 16,
12368 "offset of CopyTextureCHROMIUM internalformat should be 16");
12369 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 20,
12370 "offset of CopyTextureCHROMIUM dest_type should be 20");
12371 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 24,
12372 "offset of CopyTextureCHROMIUM unpack_flip_y should be 24");
12373 static_assert(
12374 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 28,
12375 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 28");
12376 static_assert(
12377 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 32,
12378 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 32");
12380 struct CopySubTextureCHROMIUM {
12381 typedef CopySubTextureCHROMIUM ValueType;
12382 static const CommandId kCmdId = kCopySubTextureCHROMIUM;
12383 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12384 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12386 static uint32_t ComputeSize() {
12387 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12390 void SetHeader() { header.SetCmd<ValueType>(); }
12392 void Init(GLenum _target,
12393 GLenum _source_id,
12394 GLenum _dest_id,
12395 GLint _xoffset,
12396 GLint _yoffset,
12397 GLint _x,
12398 GLint _y,
12399 GLsizei _width,
12400 GLsizei _height,
12401 GLboolean _unpack_flip_y,
12402 GLboolean _unpack_premultiply_alpha,
12403 GLboolean _unpack_unmultiply_alpha) {
12404 SetHeader();
12405 target = _target;
12406 source_id = _source_id;
12407 dest_id = _dest_id;
12408 xoffset = _xoffset;
12409 yoffset = _yoffset;
12410 x = _x;
12411 y = _y;
12412 width = _width;
12413 height = _height;
12414 unpack_flip_y = _unpack_flip_y;
12415 unpack_premultiply_alpha = _unpack_premultiply_alpha;
12416 unpack_unmultiply_alpha = _unpack_unmultiply_alpha;
12419 void* Set(void* cmd,
12420 GLenum _target,
12421 GLenum _source_id,
12422 GLenum _dest_id,
12423 GLint _xoffset,
12424 GLint _yoffset,
12425 GLint _x,
12426 GLint _y,
12427 GLsizei _width,
12428 GLsizei _height,
12429 GLboolean _unpack_flip_y,
12430 GLboolean _unpack_premultiply_alpha,
12431 GLboolean _unpack_unmultiply_alpha) {
12432 static_cast<ValueType*>(cmd)
12433 ->Init(_target, _source_id, _dest_id, _xoffset, _yoffset, _x, _y,
12434 _width, _height, _unpack_flip_y, _unpack_premultiply_alpha,
12435 _unpack_unmultiply_alpha);
12436 return NextCmdAddress<ValueType>(cmd);
12439 gpu::CommandHeader header;
12440 uint32_t target;
12441 uint32_t source_id;
12442 uint32_t dest_id;
12443 int32_t xoffset;
12444 int32_t yoffset;
12445 int32_t x;
12446 int32_t y;
12447 int32_t width;
12448 int32_t height;
12449 uint32_t unpack_flip_y;
12450 uint32_t unpack_premultiply_alpha;
12451 uint32_t unpack_unmultiply_alpha;
12454 static_assert(sizeof(CopySubTextureCHROMIUM) == 52,
12455 "size of CopySubTextureCHROMIUM should be 52");
12456 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0,
12457 "offset of CopySubTextureCHROMIUM header should be 0");
12458 static_assert(offsetof(CopySubTextureCHROMIUM, target) == 4,
12459 "offset of CopySubTextureCHROMIUM target should be 4");
12460 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 8,
12461 "offset of CopySubTextureCHROMIUM source_id should be 8");
12462 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 12,
12463 "offset of CopySubTextureCHROMIUM dest_id should be 12");
12464 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 16,
12465 "offset of CopySubTextureCHROMIUM xoffset should be 16");
12466 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 20,
12467 "offset of CopySubTextureCHROMIUM yoffset should be 20");
12468 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 24,
12469 "offset of CopySubTextureCHROMIUM x should be 24");
12470 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 28,
12471 "offset of CopySubTextureCHROMIUM y should be 28");
12472 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 32,
12473 "offset of CopySubTextureCHROMIUM width should be 32");
12474 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 36,
12475 "offset of CopySubTextureCHROMIUM height should be 36");
12476 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 40,
12477 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 40");
12478 static_assert(
12479 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 44,
12480 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 44");
12481 static_assert(
12482 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 48,
12483 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 48");
12485 struct CompressedCopyTextureCHROMIUM {
12486 typedef CompressedCopyTextureCHROMIUM ValueType;
12487 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM;
12488 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12489 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12491 static uint32_t ComputeSize() {
12492 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12495 void SetHeader() { header.SetCmd<ValueType>(); }
12497 void Init(GLenum _target, GLenum _source_id, GLenum _dest_id) {
12498 SetHeader();
12499 target = _target;
12500 source_id = _source_id;
12501 dest_id = _dest_id;
12504 void* Set(void* cmd, GLenum _target, GLenum _source_id, GLenum _dest_id) {
12505 static_cast<ValueType*>(cmd)->Init(_target, _source_id, _dest_id);
12506 return NextCmdAddress<ValueType>(cmd);
12509 gpu::CommandHeader header;
12510 uint32_t target;
12511 uint32_t source_id;
12512 uint32_t dest_id;
12515 static_assert(sizeof(CompressedCopyTextureCHROMIUM) == 16,
12516 "size of CompressedCopyTextureCHROMIUM should be 16");
12517 static_assert(offsetof(CompressedCopyTextureCHROMIUM, header) == 0,
12518 "offset of CompressedCopyTextureCHROMIUM header should be 0");
12519 static_assert(offsetof(CompressedCopyTextureCHROMIUM, target) == 4,
12520 "offset of CompressedCopyTextureCHROMIUM target should be 4");
12521 static_assert(offsetof(CompressedCopyTextureCHROMIUM, source_id) == 8,
12522 "offset of CompressedCopyTextureCHROMIUM source_id should be 8");
12523 static_assert(offsetof(CompressedCopyTextureCHROMIUM, dest_id) == 12,
12524 "offset of CompressedCopyTextureCHROMIUM dest_id should be 12");
12526 struct CompressedCopySubTextureCHROMIUM {
12527 typedef CompressedCopySubTextureCHROMIUM ValueType;
12528 static const CommandId kCmdId = kCompressedCopySubTextureCHROMIUM;
12529 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12530 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12532 static uint32_t ComputeSize() {
12533 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12536 void SetHeader() { header.SetCmd<ValueType>(); }
12538 void Init(GLenum _target,
12539 GLenum _source_id,
12540 GLenum _dest_id,
12541 GLint _xoffset,
12542 GLint _yoffset,
12543 GLint _x,
12544 GLint _y,
12545 GLsizei _width,
12546 GLsizei _height) {
12547 SetHeader();
12548 target = _target;
12549 source_id = _source_id;
12550 dest_id = _dest_id;
12551 xoffset = _xoffset;
12552 yoffset = _yoffset;
12553 x = _x;
12554 y = _y;
12555 width = _width;
12556 height = _height;
12559 void* Set(void* cmd,
12560 GLenum _target,
12561 GLenum _source_id,
12562 GLenum _dest_id,
12563 GLint _xoffset,
12564 GLint _yoffset,
12565 GLint _x,
12566 GLint _y,
12567 GLsizei _width,
12568 GLsizei _height) {
12569 static_cast<ValueType*>(cmd)->Init(_target, _source_id, _dest_id, _xoffset,
12570 _yoffset, _x, _y, _width, _height);
12571 return NextCmdAddress<ValueType>(cmd);
12574 gpu::CommandHeader header;
12575 uint32_t target;
12576 uint32_t source_id;
12577 uint32_t dest_id;
12578 int32_t xoffset;
12579 int32_t yoffset;
12580 int32_t x;
12581 int32_t y;
12582 int32_t width;
12583 int32_t height;
12586 static_assert(sizeof(CompressedCopySubTextureCHROMIUM) == 40,
12587 "size of CompressedCopySubTextureCHROMIUM should be 40");
12588 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, header) == 0,
12589 "offset of CompressedCopySubTextureCHROMIUM header should be 0");
12590 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, target) == 4,
12591 "offset of CompressedCopySubTextureCHROMIUM target should be 4");
12592 static_assert(
12593 offsetof(CompressedCopySubTextureCHROMIUM, source_id) == 8,
12594 "offset of CompressedCopySubTextureCHROMIUM source_id should be 8");
12595 static_assert(
12596 offsetof(CompressedCopySubTextureCHROMIUM, dest_id) == 12,
12597 "offset of CompressedCopySubTextureCHROMIUM dest_id should be 12");
12598 static_assert(
12599 offsetof(CompressedCopySubTextureCHROMIUM, xoffset) == 16,
12600 "offset of CompressedCopySubTextureCHROMIUM xoffset should be 16");
12601 static_assert(
12602 offsetof(CompressedCopySubTextureCHROMIUM, yoffset) == 20,
12603 "offset of CompressedCopySubTextureCHROMIUM yoffset should be 20");
12604 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, x) == 24,
12605 "offset of CompressedCopySubTextureCHROMIUM x should be 24");
12606 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, y) == 28,
12607 "offset of CompressedCopySubTextureCHROMIUM y should be 28");
12608 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, width) == 32,
12609 "offset of CompressedCopySubTextureCHROMIUM width should be 32");
12610 static_assert(offsetof(CompressedCopySubTextureCHROMIUM, height) == 36,
12611 "offset of CompressedCopySubTextureCHROMIUM height should be 36");
12613 struct DrawArraysInstancedANGLE {
12614 typedef DrawArraysInstancedANGLE ValueType;
12615 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
12616 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12617 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12619 static uint32_t ComputeSize() {
12620 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12623 void SetHeader() { header.SetCmd<ValueType>(); }
12625 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
12626 SetHeader();
12627 mode = _mode;
12628 first = _first;
12629 count = _count;
12630 primcount = _primcount;
12633 void* Set(void* cmd,
12634 GLenum _mode,
12635 GLint _first,
12636 GLsizei _count,
12637 GLsizei _primcount) {
12638 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
12639 return NextCmdAddress<ValueType>(cmd);
12642 gpu::CommandHeader header;
12643 uint32_t mode;
12644 int32_t first;
12645 int32_t count;
12646 int32_t primcount;
12649 static_assert(sizeof(DrawArraysInstancedANGLE) == 20,
12650 "size of DrawArraysInstancedANGLE should be 20");
12651 static_assert(offsetof(DrawArraysInstancedANGLE, header) == 0,
12652 "offset of DrawArraysInstancedANGLE header should be 0");
12653 static_assert(offsetof(DrawArraysInstancedANGLE, mode) == 4,
12654 "offset of DrawArraysInstancedANGLE mode should be 4");
12655 static_assert(offsetof(DrawArraysInstancedANGLE, first) == 8,
12656 "offset of DrawArraysInstancedANGLE first should be 8");
12657 static_assert(offsetof(DrawArraysInstancedANGLE, count) == 12,
12658 "offset of DrawArraysInstancedANGLE count should be 12");
12659 static_assert(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
12660 "offset of DrawArraysInstancedANGLE primcount should be 16");
12662 struct DrawElementsInstancedANGLE {
12663 typedef DrawElementsInstancedANGLE ValueType;
12664 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
12665 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12666 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12668 static uint32_t ComputeSize() {
12669 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12672 void SetHeader() { header.SetCmd<ValueType>(); }
12674 void Init(GLenum _mode,
12675 GLsizei _count,
12676 GLenum _type,
12677 GLuint _index_offset,
12678 GLsizei _primcount) {
12679 SetHeader();
12680 mode = _mode;
12681 count = _count;
12682 type = _type;
12683 index_offset = _index_offset;
12684 primcount = _primcount;
12687 void* Set(void* cmd,
12688 GLenum _mode,
12689 GLsizei _count,
12690 GLenum _type,
12691 GLuint _index_offset,
12692 GLsizei _primcount) {
12693 static_cast<ValueType*>(cmd)
12694 ->Init(_mode, _count, _type, _index_offset, _primcount);
12695 return NextCmdAddress<ValueType>(cmd);
12698 gpu::CommandHeader header;
12699 uint32_t mode;
12700 int32_t count;
12701 uint32_t type;
12702 uint32_t index_offset;
12703 int32_t primcount;
12706 static_assert(sizeof(DrawElementsInstancedANGLE) == 24,
12707 "size of DrawElementsInstancedANGLE should be 24");
12708 static_assert(offsetof(DrawElementsInstancedANGLE, header) == 0,
12709 "offset of DrawElementsInstancedANGLE header should be 0");
12710 static_assert(offsetof(DrawElementsInstancedANGLE, mode) == 4,
12711 "offset of DrawElementsInstancedANGLE mode should be 4");
12712 static_assert(offsetof(DrawElementsInstancedANGLE, count) == 8,
12713 "offset of DrawElementsInstancedANGLE count should be 8");
12714 static_assert(offsetof(DrawElementsInstancedANGLE, type) == 12,
12715 "offset of DrawElementsInstancedANGLE type should be 12");
12716 static_assert(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
12717 "offset of DrawElementsInstancedANGLE index_offset should be 16");
12718 static_assert(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
12719 "offset of DrawElementsInstancedANGLE primcount should be 20");
12721 struct VertexAttribDivisorANGLE {
12722 typedef VertexAttribDivisorANGLE ValueType;
12723 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
12724 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12725 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12727 static uint32_t ComputeSize() {
12728 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12731 void SetHeader() { header.SetCmd<ValueType>(); }
12733 void Init(GLuint _index, GLuint _divisor) {
12734 SetHeader();
12735 index = _index;
12736 divisor = _divisor;
12739 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
12740 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
12741 return NextCmdAddress<ValueType>(cmd);
12744 gpu::CommandHeader header;
12745 uint32_t index;
12746 uint32_t divisor;
12749 static_assert(sizeof(VertexAttribDivisorANGLE) == 12,
12750 "size of VertexAttribDivisorANGLE should be 12");
12751 static_assert(offsetof(VertexAttribDivisorANGLE, header) == 0,
12752 "offset of VertexAttribDivisorANGLE header should be 0");
12753 static_assert(offsetof(VertexAttribDivisorANGLE, index) == 4,
12754 "offset of VertexAttribDivisorANGLE index should be 4");
12755 static_assert(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
12756 "offset of VertexAttribDivisorANGLE divisor should be 8");
12758 struct ProduceTextureCHROMIUMImmediate {
12759 typedef ProduceTextureCHROMIUMImmediate ValueType;
12760 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
12761 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12762 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12764 static uint32_t ComputeDataSize() {
12765 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12768 static uint32_t ComputeSize() {
12769 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12772 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12774 void Init(GLenum _target, const GLbyte* _mailbox) {
12775 SetHeader();
12776 target = _target;
12777 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12780 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
12781 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
12782 const uint32_t size = ComputeSize();
12783 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12786 gpu::CommandHeader header;
12787 uint32_t target;
12790 static_assert(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
12791 "size of ProduceTextureCHROMIUMImmediate should be 8");
12792 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
12793 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
12794 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
12795 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
12797 struct ProduceTextureDirectCHROMIUMImmediate {
12798 typedef ProduceTextureDirectCHROMIUMImmediate ValueType;
12799 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate;
12800 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12801 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12803 static uint32_t ComputeDataSize() {
12804 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12807 static uint32_t ComputeSize() {
12808 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12811 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12813 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) {
12814 SetHeader();
12815 texture = _texture;
12816 target = _target;
12817 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12820 void* Set(void* cmd,
12821 GLuint _texture,
12822 GLenum _target,
12823 const GLbyte* _mailbox) {
12824 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox);
12825 const uint32_t size = ComputeSize();
12826 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12829 gpu::CommandHeader header;
12830 uint32_t texture;
12831 uint32_t target;
12834 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12,
12835 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
12836 static_assert(
12837 offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0,
12838 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
12839 static_assert(
12840 offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4,
12841 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
12842 static_assert(
12843 offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8,
12844 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
12846 struct ConsumeTextureCHROMIUMImmediate {
12847 typedef ConsumeTextureCHROMIUMImmediate ValueType;
12848 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
12849 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12850 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12852 static uint32_t ComputeDataSize() {
12853 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12856 static uint32_t ComputeSize() {
12857 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12860 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12862 void Init(GLenum _target, const GLbyte* _mailbox) {
12863 SetHeader();
12864 target = _target;
12865 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12868 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
12869 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
12870 const uint32_t size = ComputeSize();
12871 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12874 gpu::CommandHeader header;
12875 uint32_t target;
12878 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
12879 "size of ConsumeTextureCHROMIUMImmediate should be 8");
12880 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
12881 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
12882 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
12883 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
12885 struct BindUniformLocationCHROMIUMBucket {
12886 typedef BindUniformLocationCHROMIUMBucket ValueType;
12887 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
12888 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12891 static uint32_t ComputeSize() {
12892 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12895 void SetHeader() { header.SetCmd<ValueType>(); }
12897 void Init(GLuint _program, GLint _location, uint32_t _name_bucket_id) {
12898 SetHeader();
12899 program = _program;
12900 location = _location;
12901 name_bucket_id = _name_bucket_id;
12904 void* Set(void* cmd,
12905 GLuint _program,
12906 GLint _location,
12907 uint32_t _name_bucket_id) {
12908 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
12909 return NextCmdAddress<ValueType>(cmd);
12912 gpu::CommandHeader header;
12913 uint32_t program;
12914 int32_t location;
12915 uint32_t name_bucket_id;
12918 static_assert(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
12919 "size of BindUniformLocationCHROMIUMBucket should be 16");
12920 static_assert(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
12921 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
12922 static_assert(
12923 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
12924 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
12925 static_assert(
12926 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
12927 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
12928 static_assert(
12929 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
12930 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
12932 struct GenValuebuffersCHROMIUMImmediate {
12933 typedef GenValuebuffersCHROMIUMImmediate ValueType;
12934 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate;
12935 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12936 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12938 static uint32_t ComputeDataSize(GLsizei n) {
12939 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
12942 static uint32_t ComputeSize(GLsizei n) {
12943 return static_cast<uint32_t>(sizeof(ValueType) +
12944 ComputeDataSize(n)); // NOLINT
12947 void SetHeader(GLsizei n) {
12948 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
12951 void Init(GLsizei _n, GLuint* _buffers) {
12952 SetHeader(_n);
12953 n = _n;
12954 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
12957 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
12958 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
12959 const uint32_t size = ComputeSize(_n);
12960 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12963 gpu::CommandHeader header;
12964 int32_t n;
12967 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate) == 8,
12968 "size of GenValuebuffersCHROMIUMImmediate should be 8");
12969 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0,
12970 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
12971 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4,
12972 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
12974 struct DeleteValuebuffersCHROMIUMImmediate {
12975 typedef DeleteValuebuffersCHROMIUMImmediate ValueType;
12976 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate;
12977 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12978 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12980 static uint32_t ComputeDataSize(GLsizei n) {
12981 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
12984 static uint32_t ComputeSize(GLsizei n) {
12985 return static_cast<uint32_t>(sizeof(ValueType) +
12986 ComputeDataSize(n)); // NOLINT
12989 void SetHeader(GLsizei n) {
12990 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
12993 void Init(GLsizei _n, const GLuint* _valuebuffers) {
12994 SetHeader(_n);
12995 n = _n;
12996 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n));
12999 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) {
13000 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers);
13001 const uint32_t size = ComputeSize(_n);
13002 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13005 gpu::CommandHeader header;
13006 int32_t n;
13009 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8,
13010 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
13011 static_assert(
13012 offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0,
13013 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
13014 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4,
13015 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
13017 struct IsValuebufferCHROMIUM {
13018 typedef IsValuebufferCHROMIUM ValueType;
13019 static const CommandId kCmdId = kIsValuebufferCHROMIUM;
13020 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13021 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13023 typedef uint32_t Result;
13025 static uint32_t ComputeSize() {
13026 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13029 void SetHeader() { header.SetCmd<ValueType>(); }
13031 void Init(GLuint _valuebuffer,
13032 uint32_t _result_shm_id,
13033 uint32_t _result_shm_offset) {
13034 SetHeader();
13035 valuebuffer = _valuebuffer;
13036 result_shm_id = _result_shm_id;
13037 result_shm_offset = _result_shm_offset;
13040 void* Set(void* cmd,
13041 GLuint _valuebuffer,
13042 uint32_t _result_shm_id,
13043 uint32_t _result_shm_offset) {
13044 static_cast<ValueType*>(cmd)
13045 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset);
13046 return NextCmdAddress<ValueType>(cmd);
13049 gpu::CommandHeader header;
13050 uint32_t valuebuffer;
13051 uint32_t result_shm_id;
13052 uint32_t result_shm_offset;
13055 static_assert(sizeof(IsValuebufferCHROMIUM) == 16,
13056 "size of IsValuebufferCHROMIUM should be 16");
13057 static_assert(offsetof(IsValuebufferCHROMIUM, header) == 0,
13058 "offset of IsValuebufferCHROMIUM header should be 0");
13059 static_assert(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4,
13060 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
13061 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8,
13062 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
13063 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12,
13064 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
13066 struct BindValuebufferCHROMIUM {
13067 typedef BindValuebufferCHROMIUM ValueType;
13068 static const CommandId kCmdId = kBindValuebufferCHROMIUM;
13069 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13070 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13072 static uint32_t ComputeSize() {
13073 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13076 void SetHeader() { header.SetCmd<ValueType>(); }
13078 void Init(GLenum _target, GLuint _valuebuffer) {
13079 SetHeader();
13080 target = _target;
13081 valuebuffer = _valuebuffer;
13084 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) {
13085 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer);
13086 return NextCmdAddress<ValueType>(cmd);
13089 gpu::CommandHeader header;
13090 uint32_t target;
13091 uint32_t valuebuffer;
13094 static_assert(sizeof(BindValuebufferCHROMIUM) == 12,
13095 "size of BindValuebufferCHROMIUM should be 12");
13096 static_assert(offsetof(BindValuebufferCHROMIUM, header) == 0,
13097 "offset of BindValuebufferCHROMIUM header should be 0");
13098 static_assert(offsetof(BindValuebufferCHROMIUM, target) == 4,
13099 "offset of BindValuebufferCHROMIUM target should be 4");
13100 static_assert(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8,
13101 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
13103 struct SubscribeValueCHROMIUM {
13104 typedef SubscribeValueCHROMIUM ValueType;
13105 static const CommandId kCmdId = kSubscribeValueCHROMIUM;
13106 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13107 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13109 static uint32_t ComputeSize() {
13110 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13113 void SetHeader() { header.SetCmd<ValueType>(); }
13115 void Init(GLenum _target, GLenum _subscription) {
13116 SetHeader();
13117 target = _target;
13118 subscription = _subscription;
13121 void* Set(void* cmd, GLenum _target, GLenum _subscription) {
13122 static_cast<ValueType*>(cmd)->Init(_target, _subscription);
13123 return NextCmdAddress<ValueType>(cmd);
13126 gpu::CommandHeader header;
13127 uint32_t target;
13128 uint32_t subscription;
13131 static_assert(sizeof(SubscribeValueCHROMIUM) == 12,
13132 "size of SubscribeValueCHROMIUM should be 12");
13133 static_assert(offsetof(SubscribeValueCHROMIUM, header) == 0,
13134 "offset of SubscribeValueCHROMIUM header should be 0");
13135 static_assert(offsetof(SubscribeValueCHROMIUM, target) == 4,
13136 "offset of SubscribeValueCHROMIUM target should be 4");
13137 static_assert(offsetof(SubscribeValueCHROMIUM, subscription) == 8,
13138 "offset of SubscribeValueCHROMIUM subscription should be 8");
13140 struct PopulateSubscribedValuesCHROMIUM {
13141 typedef PopulateSubscribedValuesCHROMIUM ValueType;
13142 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM;
13143 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13144 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13146 static uint32_t ComputeSize() {
13147 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13150 void SetHeader() { header.SetCmd<ValueType>(); }
13152 void Init(GLenum _target) {
13153 SetHeader();
13154 target = _target;
13157 void* Set(void* cmd, GLenum _target) {
13158 static_cast<ValueType*>(cmd)->Init(_target);
13159 return NextCmdAddress<ValueType>(cmd);
13162 gpu::CommandHeader header;
13163 uint32_t target;
13166 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM) == 8,
13167 "size of PopulateSubscribedValuesCHROMIUM should be 8");
13168 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0,
13169 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
13170 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4,
13171 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
13173 struct UniformValuebufferCHROMIUM {
13174 typedef UniformValuebufferCHROMIUM ValueType;
13175 static const CommandId kCmdId = kUniformValuebufferCHROMIUM;
13176 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13179 static uint32_t ComputeSize() {
13180 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13183 void SetHeader() { header.SetCmd<ValueType>(); }
13185 void Init(GLint _location, GLenum _target, GLenum _subscription) {
13186 SetHeader();
13187 location = _location;
13188 target = _target;
13189 subscription = _subscription;
13192 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) {
13193 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription);
13194 return NextCmdAddress<ValueType>(cmd);
13197 gpu::CommandHeader header;
13198 int32_t location;
13199 uint32_t target;
13200 uint32_t subscription;
13203 static_assert(sizeof(UniformValuebufferCHROMIUM) == 16,
13204 "size of UniformValuebufferCHROMIUM should be 16");
13205 static_assert(offsetof(UniformValuebufferCHROMIUM, header) == 0,
13206 "offset of UniformValuebufferCHROMIUM header should be 0");
13207 static_assert(offsetof(UniformValuebufferCHROMIUM, location) == 4,
13208 "offset of UniformValuebufferCHROMIUM location should be 4");
13209 static_assert(offsetof(UniformValuebufferCHROMIUM, target) == 8,
13210 "offset of UniformValuebufferCHROMIUM target should be 8");
13211 static_assert(offsetof(UniformValuebufferCHROMIUM, subscription) == 12,
13212 "offset of UniformValuebufferCHROMIUM subscription should be 12");
13214 struct BindTexImage2DCHROMIUM {
13215 typedef BindTexImage2DCHROMIUM ValueType;
13216 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
13217 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13218 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13220 static uint32_t ComputeSize() {
13221 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13224 void SetHeader() { header.SetCmd<ValueType>(); }
13226 void Init(GLenum _target, GLint _imageId) {
13227 SetHeader();
13228 target = _target;
13229 imageId = _imageId;
13232 void* Set(void* cmd, GLenum _target, GLint _imageId) {
13233 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
13234 return NextCmdAddress<ValueType>(cmd);
13237 gpu::CommandHeader header;
13238 uint32_t target;
13239 int32_t imageId;
13242 static_assert(sizeof(BindTexImage2DCHROMIUM) == 12,
13243 "size of BindTexImage2DCHROMIUM should be 12");
13244 static_assert(offsetof(BindTexImage2DCHROMIUM, header) == 0,
13245 "offset of BindTexImage2DCHROMIUM header should be 0");
13246 static_assert(offsetof(BindTexImage2DCHROMIUM, target) == 4,
13247 "offset of BindTexImage2DCHROMIUM target should be 4");
13248 static_assert(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
13249 "offset of BindTexImage2DCHROMIUM imageId should be 8");
13251 struct ReleaseTexImage2DCHROMIUM {
13252 typedef ReleaseTexImage2DCHROMIUM ValueType;
13253 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
13254 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13255 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13257 static uint32_t ComputeSize() {
13258 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13261 void SetHeader() { header.SetCmd<ValueType>(); }
13263 void Init(GLenum _target, GLint _imageId) {
13264 SetHeader();
13265 target = _target;
13266 imageId = _imageId;
13269 void* Set(void* cmd, GLenum _target, GLint _imageId) {
13270 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
13271 return NextCmdAddress<ValueType>(cmd);
13274 gpu::CommandHeader header;
13275 uint32_t target;
13276 int32_t imageId;
13279 static_assert(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
13280 "size of ReleaseTexImage2DCHROMIUM should be 12");
13281 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
13282 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
13283 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
13284 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
13285 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
13286 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
13288 struct TraceBeginCHROMIUM {
13289 typedef TraceBeginCHROMIUM ValueType;
13290 static const CommandId kCmdId = kTraceBeginCHROMIUM;
13291 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13292 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13294 static uint32_t ComputeSize() {
13295 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13298 void SetHeader() { header.SetCmd<ValueType>(); }
13300 void Init(GLuint _category_bucket_id, GLuint _name_bucket_id) {
13301 SetHeader();
13302 category_bucket_id = _category_bucket_id;
13303 name_bucket_id = _name_bucket_id;
13306 void* Set(void* cmd, GLuint _category_bucket_id, GLuint _name_bucket_id) {
13307 static_cast<ValueType*>(cmd)->Init(_category_bucket_id, _name_bucket_id);
13308 return NextCmdAddress<ValueType>(cmd);
13311 gpu::CommandHeader header;
13312 uint32_t category_bucket_id;
13313 uint32_t name_bucket_id;
13316 static_assert(sizeof(TraceBeginCHROMIUM) == 12,
13317 "size of TraceBeginCHROMIUM should be 12");
13318 static_assert(offsetof(TraceBeginCHROMIUM, header) == 0,
13319 "offset of TraceBeginCHROMIUM header should be 0");
13320 static_assert(offsetof(TraceBeginCHROMIUM, category_bucket_id) == 4,
13321 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
13322 static_assert(offsetof(TraceBeginCHROMIUM, name_bucket_id) == 8,
13323 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
13325 struct TraceEndCHROMIUM {
13326 typedef TraceEndCHROMIUM ValueType;
13327 static const CommandId kCmdId = kTraceEndCHROMIUM;
13328 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13329 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13331 static uint32_t ComputeSize() {
13332 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13335 void SetHeader() { header.SetCmd<ValueType>(); }
13337 void Init() { SetHeader(); }
13339 void* Set(void* cmd) {
13340 static_cast<ValueType*>(cmd)->Init();
13341 return NextCmdAddress<ValueType>(cmd);
13344 gpu::CommandHeader header;
13347 static_assert(sizeof(TraceEndCHROMIUM) == 4,
13348 "size of TraceEndCHROMIUM should be 4");
13349 static_assert(offsetof(TraceEndCHROMIUM, header) == 0,
13350 "offset of TraceEndCHROMIUM header should be 0");
13352 struct DiscardFramebufferEXTImmediate {
13353 typedef DiscardFramebufferEXTImmediate ValueType;
13354 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
13355 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13356 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
13358 static uint32_t ComputeDataSize(GLsizei count) {
13359 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
13362 static uint32_t ComputeSize(GLsizei count) {
13363 return static_cast<uint32_t>(sizeof(ValueType) +
13364 ComputeDataSize(count)); // NOLINT
13367 void SetHeader(GLsizei count) {
13368 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
13371 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
13372 SetHeader(_count);
13373 target = _target;
13374 count = _count;
13375 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
13378 void* Set(void* cmd,
13379 GLenum _target,
13380 GLsizei _count,
13381 const GLenum* _attachments) {
13382 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
13383 const uint32_t size = ComputeSize(_count);
13384 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13387 gpu::CommandHeader header;
13388 uint32_t target;
13389 int32_t count;
13392 static_assert(sizeof(DiscardFramebufferEXTImmediate) == 12,
13393 "size of DiscardFramebufferEXTImmediate should be 12");
13394 static_assert(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
13395 "offset of DiscardFramebufferEXTImmediate header should be 0");
13396 static_assert(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
13397 "offset of DiscardFramebufferEXTImmediate target should be 4");
13398 static_assert(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
13399 "offset of DiscardFramebufferEXTImmediate count should be 8");
13401 struct LoseContextCHROMIUM {
13402 typedef LoseContextCHROMIUM ValueType;
13403 static const CommandId kCmdId = kLoseContextCHROMIUM;
13404 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13405 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13407 static uint32_t ComputeSize() {
13408 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13411 void SetHeader() { header.SetCmd<ValueType>(); }
13413 void Init(GLenum _current, GLenum _other) {
13414 SetHeader();
13415 current = _current;
13416 other = _other;
13419 void* Set(void* cmd, GLenum _current, GLenum _other) {
13420 static_cast<ValueType*>(cmd)->Init(_current, _other);
13421 return NextCmdAddress<ValueType>(cmd);
13424 gpu::CommandHeader header;
13425 uint32_t current;
13426 uint32_t other;
13429 static_assert(sizeof(LoseContextCHROMIUM) == 12,
13430 "size of LoseContextCHROMIUM should be 12");
13431 static_assert(offsetof(LoseContextCHROMIUM, header) == 0,
13432 "offset of LoseContextCHROMIUM header should be 0");
13433 static_assert(offsetof(LoseContextCHROMIUM, current) == 4,
13434 "offset of LoseContextCHROMIUM current should be 4");
13435 static_assert(offsetof(LoseContextCHROMIUM, other) == 8,
13436 "offset of LoseContextCHROMIUM other should be 8");
13438 struct WaitSyncPointCHROMIUM {
13439 typedef WaitSyncPointCHROMIUM ValueType;
13440 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
13441 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13442 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13444 static uint32_t ComputeSize() {
13445 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13448 void SetHeader() { header.SetCmd<ValueType>(); }
13450 void Init(GLuint _sync_point) {
13451 SetHeader();
13452 sync_point = _sync_point;
13455 void* Set(void* cmd, GLuint _sync_point) {
13456 static_cast<ValueType*>(cmd)->Init(_sync_point);
13457 return NextCmdAddress<ValueType>(cmd);
13460 gpu::CommandHeader header;
13461 uint32_t sync_point;
13464 static_assert(sizeof(WaitSyncPointCHROMIUM) == 8,
13465 "size of WaitSyncPointCHROMIUM should be 8");
13466 static_assert(offsetof(WaitSyncPointCHROMIUM, header) == 0,
13467 "offset of WaitSyncPointCHROMIUM header should be 0");
13468 static_assert(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
13469 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
13471 struct DrawBuffersEXTImmediate {
13472 typedef DrawBuffersEXTImmediate ValueType;
13473 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
13474 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13475 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
13477 static uint32_t ComputeDataSize(GLsizei count) {
13478 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
13481 static uint32_t ComputeSize(GLsizei count) {
13482 return static_cast<uint32_t>(sizeof(ValueType) +
13483 ComputeDataSize(count)); // NOLINT
13486 void SetHeader(GLsizei count) {
13487 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
13490 void Init(GLsizei _count, const GLenum* _bufs) {
13491 SetHeader(_count);
13492 count = _count;
13493 memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count));
13496 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
13497 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
13498 const uint32_t size = ComputeSize(_count);
13499 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13502 gpu::CommandHeader header;
13503 int32_t count;
13506 static_assert(sizeof(DrawBuffersEXTImmediate) == 8,
13507 "size of DrawBuffersEXTImmediate should be 8");
13508 static_assert(offsetof(DrawBuffersEXTImmediate, header) == 0,
13509 "offset of DrawBuffersEXTImmediate header should be 0");
13510 static_assert(offsetof(DrawBuffersEXTImmediate, count) == 4,
13511 "offset of DrawBuffersEXTImmediate count should be 4");
13513 struct DiscardBackbufferCHROMIUM {
13514 typedef DiscardBackbufferCHROMIUM ValueType;
13515 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
13516 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13517 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
13519 static uint32_t ComputeSize() {
13520 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13523 void SetHeader() { header.SetCmd<ValueType>(); }
13525 void Init() { SetHeader(); }
13527 void* Set(void* cmd) {
13528 static_cast<ValueType*>(cmd)->Init();
13529 return NextCmdAddress<ValueType>(cmd);
13532 gpu::CommandHeader header;
13535 static_assert(sizeof(DiscardBackbufferCHROMIUM) == 4,
13536 "size of DiscardBackbufferCHROMIUM should be 4");
13537 static_assert(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
13538 "offset of DiscardBackbufferCHROMIUM header should be 0");
13540 struct ScheduleOverlayPlaneCHROMIUM {
13541 typedef ScheduleOverlayPlaneCHROMIUM ValueType;
13542 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM;
13543 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13544 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13546 static uint32_t ComputeSize() {
13547 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13550 void SetHeader() { header.SetCmd<ValueType>(); }
13552 void Init(GLint _plane_z_order,
13553 GLenum _plane_transform,
13554 GLuint _overlay_texture_id,
13555 GLint _bounds_x,
13556 GLint _bounds_y,
13557 GLint _bounds_width,
13558 GLint _bounds_height,
13559 GLfloat _uv_x,
13560 GLfloat _uv_y,
13561 GLfloat _uv_width,
13562 GLfloat _uv_height) {
13563 SetHeader();
13564 plane_z_order = _plane_z_order;
13565 plane_transform = _plane_transform;
13566 overlay_texture_id = _overlay_texture_id;
13567 bounds_x = _bounds_x;
13568 bounds_y = _bounds_y;
13569 bounds_width = _bounds_width;
13570 bounds_height = _bounds_height;
13571 uv_x = _uv_x;
13572 uv_y = _uv_y;
13573 uv_width = _uv_width;
13574 uv_height = _uv_height;
13577 void* Set(void* cmd,
13578 GLint _plane_z_order,
13579 GLenum _plane_transform,
13580 GLuint _overlay_texture_id,
13581 GLint _bounds_x,
13582 GLint _bounds_y,
13583 GLint _bounds_width,
13584 GLint _bounds_height,
13585 GLfloat _uv_x,
13586 GLfloat _uv_y,
13587 GLfloat _uv_width,
13588 GLfloat _uv_height) {
13589 static_cast<ValueType*>(cmd)->Init(_plane_z_order, _plane_transform,
13590 _overlay_texture_id, _bounds_x,
13591 _bounds_y, _bounds_width, _bounds_height,
13592 _uv_x, _uv_y, _uv_width, _uv_height);
13593 return NextCmdAddress<ValueType>(cmd);
13596 gpu::CommandHeader header;
13597 int32_t plane_z_order;
13598 uint32_t plane_transform;
13599 uint32_t overlay_texture_id;
13600 int32_t bounds_x;
13601 int32_t bounds_y;
13602 int32_t bounds_width;
13603 int32_t bounds_height;
13604 float uv_x;
13605 float uv_y;
13606 float uv_width;
13607 float uv_height;
13610 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48,
13611 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
13612 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0,
13613 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
13614 static_assert(
13615 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4,
13616 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
13617 static_assert(
13618 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8,
13619 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
13620 static_assert(
13621 offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12,
13622 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
13623 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16,
13624 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
13625 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20,
13626 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
13627 static_assert(
13628 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24,
13629 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
13630 static_assert(
13631 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28,
13632 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
13633 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32,
13634 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
13635 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36,
13636 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
13637 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
13638 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
13639 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
13640 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
13642 struct SwapInterval {
13643 typedef SwapInterval ValueType;
13644 static const CommandId kCmdId = kSwapInterval;
13645 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13646 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13648 static uint32_t ComputeSize() {
13649 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13652 void SetHeader() { header.SetCmd<ValueType>(); }
13654 void Init(GLint _interval) {
13655 SetHeader();
13656 interval = _interval;
13659 void* Set(void* cmd, GLint _interval) {
13660 static_cast<ValueType*>(cmd)->Init(_interval);
13661 return NextCmdAddress<ValueType>(cmd);
13664 gpu::CommandHeader header;
13665 int32_t interval;
13668 static_assert(sizeof(SwapInterval) == 8, "size of SwapInterval should be 8");
13669 static_assert(offsetof(SwapInterval, header) == 0,
13670 "offset of SwapInterval header should be 0");
13671 static_assert(offsetof(SwapInterval, interval) == 4,
13672 "offset of SwapInterval interval should be 4");
13674 struct FlushDriverCachesCHROMIUM {
13675 typedef FlushDriverCachesCHROMIUM ValueType;
13676 static const CommandId kCmdId = kFlushDriverCachesCHROMIUM;
13677 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13678 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13680 static uint32_t ComputeSize() {
13681 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13684 void SetHeader() { header.SetCmd<ValueType>(); }
13686 void Init() { SetHeader(); }
13688 void* Set(void* cmd) {
13689 static_cast<ValueType*>(cmd)->Init();
13690 return NextCmdAddress<ValueType>(cmd);
13693 gpu::CommandHeader header;
13696 static_assert(sizeof(FlushDriverCachesCHROMIUM) == 4,
13697 "size of FlushDriverCachesCHROMIUM should be 4");
13698 static_assert(offsetof(FlushDriverCachesCHROMIUM, header) == 0,
13699 "offset of FlushDriverCachesCHROMIUM header should be 0");
13701 struct MatrixLoadfCHROMIUMImmediate {
13702 typedef MatrixLoadfCHROMIUMImmediate ValueType;
13703 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
13704 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13705 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13707 static uint32_t ComputeDataSize() {
13708 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
13711 static uint32_t ComputeSize() {
13712 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
13715 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
13717 void Init(GLenum _matrixMode, const GLfloat* _m) {
13718 SetHeader();
13719 matrixMode = _matrixMode;
13720 memcpy(ImmediateDataAddress(this), _m, ComputeDataSize());
13723 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) {
13724 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m);
13725 const uint32_t size = ComputeSize();
13726 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13729 gpu::CommandHeader header;
13730 uint32_t matrixMode;
13733 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate) == 8,
13734 "size of MatrixLoadfCHROMIUMImmediate should be 8");
13735 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0,
13736 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
13737 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4,
13738 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
13740 struct MatrixLoadIdentityCHROMIUM {
13741 typedef MatrixLoadIdentityCHROMIUM ValueType;
13742 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM;
13743 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13744 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13746 static uint32_t ComputeSize() {
13747 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13750 void SetHeader() { header.SetCmd<ValueType>(); }
13752 void Init(GLenum _matrixMode) {
13753 SetHeader();
13754 matrixMode = _matrixMode;
13757 void* Set(void* cmd, GLenum _matrixMode) {
13758 static_cast<ValueType*>(cmd)->Init(_matrixMode);
13759 return NextCmdAddress<ValueType>(cmd);
13762 gpu::CommandHeader header;
13763 uint32_t matrixMode;
13766 static_assert(sizeof(MatrixLoadIdentityCHROMIUM) == 8,
13767 "size of MatrixLoadIdentityCHROMIUM should be 8");
13768 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0,
13769 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
13770 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4,
13771 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
13773 struct GenPathsCHROMIUM {
13774 typedef GenPathsCHROMIUM ValueType;
13775 static const CommandId kCmdId = kGenPathsCHROMIUM;
13776 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13777 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13779 static uint32_t ComputeSize() {
13780 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13783 void SetHeader() { header.SetCmd<ValueType>(); }
13785 void Init(GLuint _first_client_id, GLsizei _range) {
13786 SetHeader();
13787 first_client_id = _first_client_id;
13788 range = _range;
13791 void* Set(void* cmd, GLuint _first_client_id, GLsizei _range) {
13792 static_cast<ValueType*>(cmd)->Init(_first_client_id, _range);
13793 return NextCmdAddress<ValueType>(cmd);
13796 gpu::CommandHeader header;
13797 uint32_t first_client_id;
13798 int32_t range;
13801 static_assert(sizeof(GenPathsCHROMIUM) == 12,
13802 "size of GenPathsCHROMIUM should be 12");
13803 static_assert(offsetof(GenPathsCHROMIUM, header) == 0,
13804 "offset of GenPathsCHROMIUM header should be 0");
13805 static_assert(offsetof(GenPathsCHROMIUM, first_client_id) == 4,
13806 "offset of GenPathsCHROMIUM first_client_id should be 4");
13807 static_assert(offsetof(GenPathsCHROMIUM, range) == 8,
13808 "offset of GenPathsCHROMIUM range should be 8");
13810 struct DeletePathsCHROMIUM {
13811 typedef DeletePathsCHROMIUM ValueType;
13812 static const CommandId kCmdId = kDeletePathsCHROMIUM;
13813 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13814 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13816 static uint32_t ComputeSize() {
13817 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13820 void SetHeader() { header.SetCmd<ValueType>(); }
13822 void Init(GLuint _first_client_id, GLsizei _range) {
13823 SetHeader();
13824 first_client_id = _first_client_id;
13825 range = _range;
13828 void* Set(void* cmd, GLuint _first_client_id, GLsizei _range) {
13829 static_cast<ValueType*>(cmd)->Init(_first_client_id, _range);
13830 return NextCmdAddress<ValueType>(cmd);
13833 gpu::CommandHeader header;
13834 uint32_t first_client_id;
13835 int32_t range;
13838 static_assert(sizeof(DeletePathsCHROMIUM) == 12,
13839 "size of DeletePathsCHROMIUM should be 12");
13840 static_assert(offsetof(DeletePathsCHROMIUM, header) == 0,
13841 "offset of DeletePathsCHROMIUM header should be 0");
13842 static_assert(offsetof(DeletePathsCHROMIUM, first_client_id) == 4,
13843 "offset of DeletePathsCHROMIUM first_client_id should be 4");
13844 static_assert(offsetof(DeletePathsCHROMIUM, range) == 8,
13845 "offset of DeletePathsCHROMIUM range should be 8");
13847 struct IsPathCHROMIUM {
13848 typedef IsPathCHROMIUM ValueType;
13849 static const CommandId kCmdId = kIsPathCHROMIUM;
13850 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13851 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13853 typedef uint32_t Result;
13855 static uint32_t ComputeSize() {
13856 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13859 void SetHeader() { header.SetCmd<ValueType>(); }
13861 void Init(GLuint _path,
13862 uint32_t _result_shm_id,
13863 uint32_t _result_shm_offset) {
13864 SetHeader();
13865 path = _path;
13866 result_shm_id = _result_shm_id;
13867 result_shm_offset = _result_shm_offset;
13870 void* Set(void* cmd,
13871 GLuint _path,
13872 uint32_t _result_shm_id,
13873 uint32_t _result_shm_offset) {
13874 static_cast<ValueType*>(cmd)
13875 ->Init(_path, _result_shm_id, _result_shm_offset);
13876 return NextCmdAddress<ValueType>(cmd);
13879 gpu::CommandHeader header;
13880 uint32_t path;
13881 uint32_t result_shm_id;
13882 uint32_t result_shm_offset;
13885 static_assert(sizeof(IsPathCHROMIUM) == 16,
13886 "size of IsPathCHROMIUM should be 16");
13887 static_assert(offsetof(IsPathCHROMIUM, header) == 0,
13888 "offset of IsPathCHROMIUM header should be 0");
13889 static_assert(offsetof(IsPathCHROMIUM, path) == 4,
13890 "offset of IsPathCHROMIUM path should be 4");
13891 static_assert(offsetof(IsPathCHROMIUM, result_shm_id) == 8,
13892 "offset of IsPathCHROMIUM result_shm_id should be 8");
13893 static_assert(offsetof(IsPathCHROMIUM, result_shm_offset) == 12,
13894 "offset of IsPathCHROMIUM result_shm_offset should be 12");
13896 struct PathCommandsCHROMIUM {
13897 typedef PathCommandsCHROMIUM ValueType;
13898 static const CommandId kCmdId = kPathCommandsCHROMIUM;
13899 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13900 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13902 static uint32_t ComputeSize() {
13903 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13906 void SetHeader() { header.SetCmd<ValueType>(); }
13908 void Init(GLuint _path,
13909 GLsizei _numCommands,
13910 uint32_t _commands_shm_id,
13911 uint32_t _commands_shm_offset,
13912 GLsizei _numCoords,
13913 GLenum _coordType,
13914 uint32_t _coords_shm_id,
13915 uint32_t _coords_shm_offset) {
13916 SetHeader();
13917 path = _path;
13918 numCommands = _numCommands;
13919 commands_shm_id = _commands_shm_id;
13920 commands_shm_offset = _commands_shm_offset;
13921 numCoords = _numCoords;
13922 coordType = _coordType;
13923 coords_shm_id = _coords_shm_id;
13924 coords_shm_offset = _coords_shm_offset;
13927 void* Set(void* cmd,
13928 GLuint _path,
13929 GLsizei _numCommands,
13930 uint32_t _commands_shm_id,
13931 uint32_t _commands_shm_offset,
13932 GLsizei _numCoords,
13933 GLenum _coordType,
13934 uint32_t _coords_shm_id,
13935 uint32_t _coords_shm_offset) {
13936 static_cast<ValueType*>(cmd)
13937 ->Init(_path, _numCommands, _commands_shm_id, _commands_shm_offset,
13938 _numCoords, _coordType, _coords_shm_id, _coords_shm_offset);
13939 return NextCmdAddress<ValueType>(cmd);
13942 gpu::CommandHeader header;
13943 uint32_t path;
13944 int32_t numCommands;
13945 uint32_t commands_shm_id;
13946 uint32_t commands_shm_offset;
13947 int32_t numCoords;
13948 uint32_t coordType;
13949 uint32_t coords_shm_id;
13950 uint32_t coords_shm_offset;
13953 static_assert(sizeof(PathCommandsCHROMIUM) == 36,
13954 "size of PathCommandsCHROMIUM should be 36");
13955 static_assert(offsetof(PathCommandsCHROMIUM, header) == 0,
13956 "offset of PathCommandsCHROMIUM header should be 0");
13957 static_assert(offsetof(PathCommandsCHROMIUM, path) == 4,
13958 "offset of PathCommandsCHROMIUM path should be 4");
13959 static_assert(offsetof(PathCommandsCHROMIUM, numCommands) == 8,
13960 "offset of PathCommandsCHROMIUM numCommands should be 8");
13961 static_assert(offsetof(PathCommandsCHROMIUM, commands_shm_id) == 12,
13962 "offset of PathCommandsCHROMIUM commands_shm_id should be 12");
13963 static_assert(
13964 offsetof(PathCommandsCHROMIUM, commands_shm_offset) == 16,
13965 "offset of PathCommandsCHROMIUM commands_shm_offset should be 16");
13966 static_assert(offsetof(PathCommandsCHROMIUM, numCoords) == 20,
13967 "offset of PathCommandsCHROMIUM numCoords should be 20");
13968 static_assert(offsetof(PathCommandsCHROMIUM, coordType) == 24,
13969 "offset of PathCommandsCHROMIUM coordType should be 24");
13970 static_assert(offsetof(PathCommandsCHROMIUM, coords_shm_id) == 28,
13971 "offset of PathCommandsCHROMIUM coords_shm_id should be 28");
13972 static_assert(offsetof(PathCommandsCHROMIUM, coords_shm_offset) == 32,
13973 "offset of PathCommandsCHROMIUM coords_shm_offset should be 32");
13975 struct PathParameterfCHROMIUM {
13976 typedef PathParameterfCHROMIUM ValueType;
13977 static const CommandId kCmdId = kPathParameterfCHROMIUM;
13978 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13979 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13981 static uint32_t ComputeSize() {
13982 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13985 void SetHeader() { header.SetCmd<ValueType>(); }
13987 void Init(GLuint _path, GLenum _pname, GLfloat _value) {
13988 SetHeader();
13989 path = _path;
13990 pname = _pname;
13991 value = _value;
13994 void* Set(void* cmd, GLuint _path, GLenum _pname, GLfloat _value) {
13995 static_cast<ValueType*>(cmd)->Init(_path, _pname, _value);
13996 return NextCmdAddress<ValueType>(cmd);
13999 gpu::CommandHeader header;
14000 uint32_t path;
14001 uint32_t pname;
14002 float value;
14005 static_assert(sizeof(PathParameterfCHROMIUM) == 16,
14006 "size of PathParameterfCHROMIUM should be 16");
14007 static_assert(offsetof(PathParameterfCHROMIUM, header) == 0,
14008 "offset of PathParameterfCHROMIUM header should be 0");
14009 static_assert(offsetof(PathParameterfCHROMIUM, path) == 4,
14010 "offset of PathParameterfCHROMIUM path should be 4");
14011 static_assert(offsetof(PathParameterfCHROMIUM, pname) == 8,
14012 "offset of PathParameterfCHROMIUM pname should be 8");
14013 static_assert(offsetof(PathParameterfCHROMIUM, value) == 12,
14014 "offset of PathParameterfCHROMIUM value should be 12");
14016 struct PathParameteriCHROMIUM {
14017 typedef PathParameteriCHROMIUM ValueType;
14018 static const CommandId kCmdId = kPathParameteriCHROMIUM;
14019 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14020 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14022 static uint32_t ComputeSize() {
14023 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14026 void SetHeader() { header.SetCmd<ValueType>(); }
14028 void Init(GLuint _path, GLenum _pname, GLint _value) {
14029 SetHeader();
14030 path = _path;
14031 pname = _pname;
14032 value = _value;
14035 void* Set(void* cmd, GLuint _path, GLenum _pname, GLint _value) {
14036 static_cast<ValueType*>(cmd)->Init(_path, _pname, _value);
14037 return NextCmdAddress<ValueType>(cmd);
14040 gpu::CommandHeader header;
14041 uint32_t path;
14042 uint32_t pname;
14043 int32_t value;
14046 static_assert(sizeof(PathParameteriCHROMIUM) == 16,
14047 "size of PathParameteriCHROMIUM should be 16");
14048 static_assert(offsetof(PathParameteriCHROMIUM, header) == 0,
14049 "offset of PathParameteriCHROMIUM header should be 0");
14050 static_assert(offsetof(PathParameteriCHROMIUM, path) == 4,
14051 "offset of PathParameteriCHROMIUM path should be 4");
14052 static_assert(offsetof(PathParameteriCHROMIUM, pname) == 8,
14053 "offset of PathParameteriCHROMIUM pname should be 8");
14054 static_assert(offsetof(PathParameteriCHROMIUM, value) == 12,
14055 "offset of PathParameteriCHROMIUM value should be 12");
14057 struct PathStencilFuncCHROMIUM {
14058 typedef PathStencilFuncCHROMIUM ValueType;
14059 static const CommandId kCmdId = kPathStencilFuncCHROMIUM;
14060 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14061 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14063 static uint32_t ComputeSize() {
14064 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14067 void SetHeader() { header.SetCmd<ValueType>(); }
14069 void Init(GLenum _func, GLint _ref, GLuint _mask) {
14070 SetHeader();
14071 func = _func;
14072 ref = _ref;
14073 mask = _mask;
14076 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
14077 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
14078 return NextCmdAddress<ValueType>(cmd);
14081 gpu::CommandHeader header;
14082 uint32_t func;
14083 int32_t ref;
14084 uint32_t mask;
14087 static_assert(sizeof(PathStencilFuncCHROMIUM) == 16,
14088 "size of PathStencilFuncCHROMIUM should be 16");
14089 static_assert(offsetof(PathStencilFuncCHROMIUM, header) == 0,
14090 "offset of PathStencilFuncCHROMIUM header should be 0");
14091 static_assert(offsetof(PathStencilFuncCHROMIUM, func) == 4,
14092 "offset of PathStencilFuncCHROMIUM func should be 4");
14093 static_assert(offsetof(PathStencilFuncCHROMIUM, ref) == 8,
14094 "offset of PathStencilFuncCHROMIUM ref should be 8");
14095 static_assert(offsetof(PathStencilFuncCHROMIUM, mask) == 12,
14096 "offset of PathStencilFuncCHROMIUM mask should be 12");
14098 struct StencilFillPathCHROMIUM {
14099 typedef StencilFillPathCHROMIUM ValueType;
14100 static const CommandId kCmdId = kStencilFillPathCHROMIUM;
14101 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14102 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14104 static uint32_t ComputeSize() {
14105 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14108 void SetHeader() { header.SetCmd<ValueType>(); }
14110 void Init(GLuint _path, GLenum _fillMode, GLuint _mask) {
14111 SetHeader();
14112 path = _path;
14113 fillMode = _fillMode;
14114 mask = _mask;
14117 void* Set(void* cmd, GLuint _path, GLenum _fillMode, GLuint _mask) {
14118 static_cast<ValueType*>(cmd)->Init(_path, _fillMode, _mask);
14119 return NextCmdAddress<ValueType>(cmd);
14122 gpu::CommandHeader header;
14123 uint32_t path;
14124 uint32_t fillMode;
14125 uint32_t mask;
14128 static_assert(sizeof(StencilFillPathCHROMIUM) == 16,
14129 "size of StencilFillPathCHROMIUM should be 16");
14130 static_assert(offsetof(StencilFillPathCHROMIUM, header) == 0,
14131 "offset of StencilFillPathCHROMIUM header should be 0");
14132 static_assert(offsetof(StencilFillPathCHROMIUM, path) == 4,
14133 "offset of StencilFillPathCHROMIUM path should be 4");
14134 static_assert(offsetof(StencilFillPathCHROMIUM, fillMode) == 8,
14135 "offset of StencilFillPathCHROMIUM fillMode should be 8");
14136 static_assert(offsetof(StencilFillPathCHROMIUM, mask) == 12,
14137 "offset of StencilFillPathCHROMIUM mask should be 12");
14139 struct StencilStrokePathCHROMIUM {
14140 typedef StencilStrokePathCHROMIUM ValueType;
14141 static const CommandId kCmdId = kStencilStrokePathCHROMIUM;
14142 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14143 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14145 static uint32_t ComputeSize() {
14146 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14149 void SetHeader() { header.SetCmd<ValueType>(); }
14151 void Init(GLuint _path, GLint _reference, GLuint _mask) {
14152 SetHeader();
14153 path = _path;
14154 reference = _reference;
14155 mask = _mask;
14158 void* Set(void* cmd, GLuint _path, GLint _reference, GLuint _mask) {
14159 static_cast<ValueType*>(cmd)->Init(_path, _reference, _mask);
14160 return NextCmdAddress<ValueType>(cmd);
14163 gpu::CommandHeader header;
14164 uint32_t path;
14165 int32_t reference;
14166 uint32_t mask;
14169 static_assert(sizeof(StencilStrokePathCHROMIUM) == 16,
14170 "size of StencilStrokePathCHROMIUM should be 16");
14171 static_assert(offsetof(StencilStrokePathCHROMIUM, header) == 0,
14172 "offset of StencilStrokePathCHROMIUM header should be 0");
14173 static_assert(offsetof(StencilStrokePathCHROMIUM, path) == 4,
14174 "offset of StencilStrokePathCHROMIUM path should be 4");
14175 static_assert(offsetof(StencilStrokePathCHROMIUM, reference) == 8,
14176 "offset of StencilStrokePathCHROMIUM reference should be 8");
14177 static_assert(offsetof(StencilStrokePathCHROMIUM, mask) == 12,
14178 "offset of StencilStrokePathCHROMIUM mask should be 12");
14180 struct CoverFillPathCHROMIUM {
14181 typedef CoverFillPathCHROMIUM ValueType;
14182 static const CommandId kCmdId = kCoverFillPathCHROMIUM;
14183 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14184 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14186 static uint32_t ComputeSize() {
14187 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14190 void SetHeader() { header.SetCmd<ValueType>(); }
14192 void Init(GLuint _path, GLenum _coverMode) {
14193 SetHeader();
14194 path = _path;
14195 coverMode = _coverMode;
14198 void* Set(void* cmd, GLuint _path, GLenum _coverMode) {
14199 static_cast<ValueType*>(cmd)->Init(_path, _coverMode);
14200 return NextCmdAddress<ValueType>(cmd);
14203 gpu::CommandHeader header;
14204 uint32_t path;
14205 uint32_t coverMode;
14208 static_assert(sizeof(CoverFillPathCHROMIUM) == 12,
14209 "size of CoverFillPathCHROMIUM should be 12");
14210 static_assert(offsetof(CoverFillPathCHROMIUM, header) == 0,
14211 "offset of CoverFillPathCHROMIUM header should be 0");
14212 static_assert(offsetof(CoverFillPathCHROMIUM, path) == 4,
14213 "offset of CoverFillPathCHROMIUM path should be 4");
14214 static_assert(offsetof(CoverFillPathCHROMIUM, coverMode) == 8,
14215 "offset of CoverFillPathCHROMIUM coverMode should be 8");
14217 struct CoverStrokePathCHROMIUM {
14218 typedef CoverStrokePathCHROMIUM ValueType;
14219 static const CommandId kCmdId = kCoverStrokePathCHROMIUM;
14220 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14221 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14223 static uint32_t ComputeSize() {
14224 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14227 void SetHeader() { header.SetCmd<ValueType>(); }
14229 void Init(GLuint _path, GLenum _coverMode) {
14230 SetHeader();
14231 path = _path;
14232 coverMode = _coverMode;
14235 void* Set(void* cmd, GLuint _path, GLenum _coverMode) {
14236 static_cast<ValueType*>(cmd)->Init(_path, _coverMode);
14237 return NextCmdAddress<ValueType>(cmd);
14240 gpu::CommandHeader header;
14241 uint32_t path;
14242 uint32_t coverMode;
14245 static_assert(sizeof(CoverStrokePathCHROMIUM) == 12,
14246 "size of CoverStrokePathCHROMIUM should be 12");
14247 static_assert(offsetof(CoverStrokePathCHROMIUM, header) == 0,
14248 "offset of CoverStrokePathCHROMIUM header should be 0");
14249 static_assert(offsetof(CoverStrokePathCHROMIUM, path) == 4,
14250 "offset of CoverStrokePathCHROMIUM path should be 4");
14251 static_assert(offsetof(CoverStrokePathCHROMIUM, coverMode) == 8,
14252 "offset of CoverStrokePathCHROMIUM coverMode should be 8");
14254 struct StencilThenCoverFillPathCHROMIUM {
14255 typedef StencilThenCoverFillPathCHROMIUM ValueType;
14256 static const CommandId kCmdId = kStencilThenCoverFillPathCHROMIUM;
14257 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14258 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14260 static uint32_t ComputeSize() {
14261 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14264 void SetHeader() { header.SetCmd<ValueType>(); }
14266 void Init(GLuint _path, GLenum _fillMode, GLuint _mask, GLenum _coverMode) {
14267 SetHeader();
14268 path = _path;
14269 fillMode = _fillMode;
14270 mask = _mask;
14271 coverMode = _coverMode;
14274 void* Set(void* cmd,
14275 GLuint _path,
14276 GLenum _fillMode,
14277 GLuint _mask,
14278 GLenum _coverMode) {
14279 static_cast<ValueType*>(cmd)->Init(_path, _fillMode, _mask, _coverMode);
14280 return NextCmdAddress<ValueType>(cmd);
14283 gpu::CommandHeader header;
14284 uint32_t path;
14285 uint32_t fillMode;
14286 uint32_t mask;
14287 uint32_t coverMode;
14290 static_assert(sizeof(StencilThenCoverFillPathCHROMIUM) == 20,
14291 "size of StencilThenCoverFillPathCHROMIUM should be 20");
14292 static_assert(offsetof(StencilThenCoverFillPathCHROMIUM, header) == 0,
14293 "offset of StencilThenCoverFillPathCHROMIUM header should be 0");
14294 static_assert(offsetof(StencilThenCoverFillPathCHROMIUM, path) == 4,
14295 "offset of StencilThenCoverFillPathCHROMIUM path should be 4");
14296 static_assert(
14297 offsetof(StencilThenCoverFillPathCHROMIUM, fillMode) == 8,
14298 "offset of StencilThenCoverFillPathCHROMIUM fillMode should be 8");
14299 static_assert(offsetof(StencilThenCoverFillPathCHROMIUM, mask) == 12,
14300 "offset of StencilThenCoverFillPathCHROMIUM mask should be 12");
14301 static_assert(
14302 offsetof(StencilThenCoverFillPathCHROMIUM, coverMode) == 16,
14303 "offset of StencilThenCoverFillPathCHROMIUM coverMode should be 16");
14305 struct StencilThenCoverStrokePathCHROMIUM {
14306 typedef StencilThenCoverStrokePathCHROMIUM ValueType;
14307 static const CommandId kCmdId = kStencilThenCoverStrokePathCHROMIUM;
14308 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14309 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14311 static uint32_t ComputeSize() {
14312 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14315 void SetHeader() { header.SetCmd<ValueType>(); }
14317 void Init(GLuint _path, GLint _reference, GLuint _mask, GLenum _coverMode) {
14318 SetHeader();
14319 path = _path;
14320 reference = _reference;
14321 mask = _mask;
14322 coverMode = _coverMode;
14325 void* Set(void* cmd,
14326 GLuint _path,
14327 GLint _reference,
14328 GLuint _mask,
14329 GLenum _coverMode) {
14330 static_cast<ValueType*>(cmd)->Init(_path, _reference, _mask, _coverMode);
14331 return NextCmdAddress<ValueType>(cmd);
14334 gpu::CommandHeader header;
14335 uint32_t path;
14336 int32_t reference;
14337 uint32_t mask;
14338 uint32_t coverMode;
14341 static_assert(sizeof(StencilThenCoverStrokePathCHROMIUM) == 20,
14342 "size of StencilThenCoverStrokePathCHROMIUM should be 20");
14343 static_assert(
14344 offsetof(StencilThenCoverStrokePathCHROMIUM, header) == 0,
14345 "offset of StencilThenCoverStrokePathCHROMIUM header should be 0");
14346 static_assert(offsetof(StencilThenCoverStrokePathCHROMIUM, path) == 4,
14347 "offset of StencilThenCoverStrokePathCHROMIUM path should be 4");
14348 static_assert(
14349 offsetof(StencilThenCoverStrokePathCHROMIUM, reference) == 8,
14350 "offset of StencilThenCoverStrokePathCHROMIUM reference should be 8");
14351 static_assert(offsetof(StencilThenCoverStrokePathCHROMIUM, mask) == 12,
14352 "offset of StencilThenCoverStrokePathCHROMIUM mask should be 12");
14353 static_assert(
14354 offsetof(StencilThenCoverStrokePathCHROMIUM, coverMode) == 16,
14355 "offset of StencilThenCoverStrokePathCHROMIUM coverMode should be 16");
14357 struct BlendBarrierKHR {
14358 typedef BlendBarrierKHR ValueType;
14359 static const CommandId kCmdId = kBlendBarrierKHR;
14360 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
14361 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14363 static uint32_t ComputeSize() {
14364 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
14367 void SetHeader() { header.SetCmd<ValueType>(); }
14369 void Init() { SetHeader(); }
14371 void* Set(void* cmd) {
14372 static_cast<ValueType*>(cmd)->Init();
14373 return NextCmdAddress<ValueType>(cmd);
14376 gpu::CommandHeader header;
14379 static_assert(sizeof(BlendBarrierKHR) == 4,
14380 "size of BlendBarrierKHR should be 4");
14381 static_assert(offsetof(BlendBarrierKHR, header) == 0,
14382 "offset of BlendBarrierKHR header should be 0");
14384 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_