Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
blob573458aec7d2f716643499d300c314ffc317e3e9
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(1);
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(3);
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(3);
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(1);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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(3);
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 GetBufferParameteriv {
4140 typedef GetBufferParameteriv ValueType;
4141 static const CommandId kCmdId = kGetBufferParameteriv;
4142 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4143 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4145 typedef SizedResult<GLint> 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(GetBufferParameteriv) == 20,
4182 "size of GetBufferParameteriv should be 20");
4183 static_assert(offsetof(GetBufferParameteriv, header) == 0,
4184 "offset of GetBufferParameteriv header should be 0");
4185 static_assert(offsetof(GetBufferParameteriv, target) == 4,
4186 "offset of GetBufferParameteriv target should be 4");
4187 static_assert(offsetof(GetBufferParameteriv, pname) == 8,
4188 "offset of GetBufferParameteriv pname should be 8");
4189 static_assert(offsetof(GetBufferParameteriv, params_shm_id) == 12,
4190 "offset of GetBufferParameteriv params_shm_id should be 12");
4191 static_assert(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
4192 "offset of GetBufferParameteriv params_shm_offset should be 16");
4194 struct GetError {
4195 typedef GetError ValueType;
4196 static const CommandId kCmdId = kGetError;
4197 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4198 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4200 typedef GLenum Result;
4202 static uint32_t ComputeSize() {
4203 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4206 void SetHeader() { header.SetCmd<ValueType>(); }
4208 void Init(uint32_t _result_shm_id, uint32_t _result_shm_offset) {
4209 SetHeader();
4210 result_shm_id = _result_shm_id;
4211 result_shm_offset = _result_shm_offset;
4214 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
4215 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
4216 return NextCmdAddress<ValueType>(cmd);
4219 gpu::CommandHeader header;
4220 uint32_t result_shm_id;
4221 uint32_t result_shm_offset;
4224 static_assert(sizeof(GetError) == 12, "size of GetError should be 12");
4225 static_assert(offsetof(GetError, header) == 0,
4226 "offset of GetError header should be 0");
4227 static_assert(offsetof(GetError, result_shm_id) == 4,
4228 "offset of GetError result_shm_id should be 4");
4229 static_assert(offsetof(GetError, result_shm_offset) == 8,
4230 "offset of GetError result_shm_offset should be 8");
4232 struct GetFloatv {
4233 typedef GetFloatv ValueType;
4234 static const CommandId kCmdId = kGetFloatv;
4235 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4236 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4238 typedef SizedResult<GLfloat> Result;
4240 static uint32_t ComputeSize() {
4241 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4244 void SetHeader() { header.SetCmd<ValueType>(); }
4246 void Init(GLenum _pname,
4247 uint32_t _params_shm_id,
4248 uint32_t _params_shm_offset) {
4249 SetHeader();
4250 pname = _pname;
4251 params_shm_id = _params_shm_id;
4252 params_shm_offset = _params_shm_offset;
4255 void* Set(void* cmd,
4256 GLenum _pname,
4257 uint32_t _params_shm_id,
4258 uint32_t _params_shm_offset) {
4259 static_cast<ValueType*>(cmd)
4260 ->Init(_pname, _params_shm_id, _params_shm_offset);
4261 return NextCmdAddress<ValueType>(cmd);
4264 gpu::CommandHeader header;
4265 uint32_t pname;
4266 uint32_t params_shm_id;
4267 uint32_t params_shm_offset;
4270 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16");
4271 static_assert(offsetof(GetFloatv, header) == 0,
4272 "offset of GetFloatv header should be 0");
4273 static_assert(offsetof(GetFloatv, pname) == 4,
4274 "offset of GetFloatv pname should be 4");
4275 static_assert(offsetof(GetFloatv, params_shm_id) == 8,
4276 "offset of GetFloatv params_shm_id should be 8");
4277 static_assert(offsetof(GetFloatv, params_shm_offset) == 12,
4278 "offset of GetFloatv params_shm_offset should be 12");
4280 struct GetFragDataLocation {
4281 typedef GetFragDataLocation ValueType;
4282 static const CommandId kCmdId = kGetFragDataLocation;
4283 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4284 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4286 typedef GLint Result;
4288 static uint32_t ComputeSize() {
4289 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4292 void SetHeader() { header.SetCmd<ValueType>(); }
4294 void Init(GLuint _program,
4295 uint32_t _name_bucket_id,
4296 uint32_t _location_shm_id,
4297 uint32_t _location_shm_offset) {
4298 SetHeader();
4299 program = _program;
4300 name_bucket_id = _name_bucket_id;
4301 location_shm_id = _location_shm_id;
4302 location_shm_offset = _location_shm_offset;
4305 void* Set(void* cmd,
4306 GLuint _program,
4307 uint32_t _name_bucket_id,
4308 uint32_t _location_shm_id,
4309 uint32_t _location_shm_offset) {
4310 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
4311 _location_shm_id, _location_shm_offset);
4312 return NextCmdAddress<ValueType>(cmd);
4315 gpu::CommandHeader header;
4316 uint32_t program;
4317 uint32_t name_bucket_id;
4318 uint32_t location_shm_id;
4319 uint32_t location_shm_offset;
4322 static_assert(sizeof(GetFragDataLocation) == 20,
4323 "size of GetFragDataLocation should be 20");
4324 static_assert(offsetof(GetFragDataLocation, header) == 0,
4325 "offset of GetFragDataLocation header should be 0");
4326 static_assert(offsetof(GetFragDataLocation, program) == 4,
4327 "offset of GetFragDataLocation program should be 4");
4328 static_assert(offsetof(GetFragDataLocation, name_bucket_id) == 8,
4329 "offset of GetFragDataLocation name_bucket_id should be 8");
4330 static_assert(offsetof(GetFragDataLocation, location_shm_id) == 12,
4331 "offset of GetFragDataLocation location_shm_id should be 12");
4332 static_assert(offsetof(GetFragDataLocation, location_shm_offset) == 16,
4333 "offset of GetFragDataLocation location_shm_offset should be 16");
4335 struct GetFramebufferAttachmentParameteriv {
4336 typedef GetFramebufferAttachmentParameteriv ValueType;
4337 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
4338 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4339 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4341 typedef SizedResult<GLint> Result;
4343 static uint32_t ComputeSize() {
4344 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4347 void SetHeader() { header.SetCmd<ValueType>(); }
4349 void Init(GLenum _target,
4350 GLenum _attachment,
4351 GLenum _pname,
4352 uint32_t _params_shm_id,
4353 uint32_t _params_shm_offset) {
4354 SetHeader();
4355 target = _target;
4356 attachment = _attachment;
4357 pname = _pname;
4358 params_shm_id = _params_shm_id;
4359 params_shm_offset = _params_shm_offset;
4362 void* Set(void* cmd,
4363 GLenum _target,
4364 GLenum _attachment,
4365 GLenum _pname,
4366 uint32_t _params_shm_id,
4367 uint32_t _params_shm_offset) {
4368 static_cast<ValueType*>(cmd)->Init(_target, _attachment, _pname,
4369 _params_shm_id, _params_shm_offset);
4370 return NextCmdAddress<ValueType>(cmd);
4373 gpu::CommandHeader header;
4374 uint32_t target;
4375 uint32_t attachment;
4376 uint32_t pname;
4377 uint32_t params_shm_id;
4378 uint32_t params_shm_offset;
4381 static_assert(sizeof(GetFramebufferAttachmentParameteriv) == 24,
4382 "size of GetFramebufferAttachmentParameteriv should be 24");
4383 static_assert(
4384 offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
4385 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4386 static_assert(
4387 offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
4388 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4389 static_assert(
4390 offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
4391 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4392 static_assert(
4393 offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
4394 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4395 static_assert(
4396 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
4397 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4398 static_assert(offsetof(GetFramebufferAttachmentParameteriv,
4399 params_shm_offset) == 20,
4400 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4401 "should be 20");
4403 struct GetInteger64v {
4404 typedef GetInteger64v ValueType;
4405 static const CommandId kCmdId = kGetInteger64v;
4406 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4407 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4409 typedef SizedResult<GLint64> Result;
4411 static uint32_t ComputeSize() {
4412 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4415 void SetHeader() { header.SetCmd<ValueType>(); }
4417 void Init(GLenum _pname,
4418 uint32_t _params_shm_id,
4419 uint32_t _params_shm_offset) {
4420 SetHeader();
4421 pname = _pname;
4422 params_shm_id = _params_shm_id;
4423 params_shm_offset = _params_shm_offset;
4426 void* Set(void* cmd,
4427 GLenum _pname,
4428 uint32_t _params_shm_id,
4429 uint32_t _params_shm_offset) {
4430 static_cast<ValueType*>(cmd)
4431 ->Init(_pname, _params_shm_id, _params_shm_offset);
4432 return NextCmdAddress<ValueType>(cmd);
4435 gpu::CommandHeader header;
4436 uint32_t pname;
4437 uint32_t params_shm_id;
4438 uint32_t params_shm_offset;
4441 static_assert(sizeof(GetInteger64v) == 16,
4442 "size of GetInteger64v should be 16");
4443 static_assert(offsetof(GetInteger64v, header) == 0,
4444 "offset of GetInteger64v header should be 0");
4445 static_assert(offsetof(GetInteger64v, pname) == 4,
4446 "offset of GetInteger64v pname should be 4");
4447 static_assert(offsetof(GetInteger64v, params_shm_id) == 8,
4448 "offset of GetInteger64v params_shm_id should be 8");
4449 static_assert(offsetof(GetInteger64v, params_shm_offset) == 12,
4450 "offset of GetInteger64v params_shm_offset should be 12");
4452 struct GetIntegeri_v {
4453 typedef GetIntegeri_v ValueType;
4454 static const CommandId kCmdId = kGetIntegeri_v;
4455 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4456 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4458 typedef SizedResult<GLint> Result;
4460 static uint32_t ComputeSize() {
4461 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4464 void SetHeader() { header.SetCmd<ValueType>(); }
4466 void Init(GLenum _pname,
4467 GLuint _index,
4468 uint32_t _data_shm_id,
4469 uint32_t _data_shm_offset) {
4470 SetHeader();
4471 pname = _pname;
4472 index = _index;
4473 data_shm_id = _data_shm_id;
4474 data_shm_offset = _data_shm_offset;
4477 void* Set(void* cmd,
4478 GLenum _pname,
4479 GLuint _index,
4480 uint32_t _data_shm_id,
4481 uint32_t _data_shm_offset) {
4482 static_cast<ValueType*>(cmd)
4483 ->Init(_pname, _index, _data_shm_id, _data_shm_offset);
4484 return NextCmdAddress<ValueType>(cmd);
4487 gpu::CommandHeader header;
4488 uint32_t pname;
4489 uint32_t index;
4490 uint32_t data_shm_id;
4491 uint32_t data_shm_offset;
4494 static_assert(sizeof(GetIntegeri_v) == 20,
4495 "size of GetIntegeri_v should be 20");
4496 static_assert(offsetof(GetIntegeri_v, header) == 0,
4497 "offset of GetIntegeri_v header should be 0");
4498 static_assert(offsetof(GetIntegeri_v, pname) == 4,
4499 "offset of GetIntegeri_v pname should be 4");
4500 static_assert(offsetof(GetIntegeri_v, index) == 8,
4501 "offset of GetIntegeri_v index should be 8");
4502 static_assert(offsetof(GetIntegeri_v, data_shm_id) == 12,
4503 "offset of GetIntegeri_v data_shm_id should be 12");
4504 static_assert(offsetof(GetIntegeri_v, data_shm_offset) == 16,
4505 "offset of GetIntegeri_v data_shm_offset should be 16");
4507 struct GetInteger64i_v {
4508 typedef GetInteger64i_v ValueType;
4509 static const CommandId kCmdId = kGetInteger64i_v;
4510 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4511 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4513 typedef SizedResult<GLint64> Result;
4515 static uint32_t ComputeSize() {
4516 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4519 void SetHeader() { header.SetCmd<ValueType>(); }
4521 void Init(GLenum _pname,
4522 GLuint _index,
4523 uint32_t _data_shm_id,
4524 uint32_t _data_shm_offset) {
4525 SetHeader();
4526 pname = _pname;
4527 index = _index;
4528 data_shm_id = _data_shm_id;
4529 data_shm_offset = _data_shm_offset;
4532 void* Set(void* cmd,
4533 GLenum _pname,
4534 GLuint _index,
4535 uint32_t _data_shm_id,
4536 uint32_t _data_shm_offset) {
4537 static_cast<ValueType*>(cmd)
4538 ->Init(_pname, _index, _data_shm_id, _data_shm_offset);
4539 return NextCmdAddress<ValueType>(cmd);
4542 gpu::CommandHeader header;
4543 uint32_t pname;
4544 uint32_t index;
4545 uint32_t data_shm_id;
4546 uint32_t data_shm_offset;
4549 static_assert(sizeof(GetInteger64i_v) == 20,
4550 "size of GetInteger64i_v should be 20");
4551 static_assert(offsetof(GetInteger64i_v, header) == 0,
4552 "offset of GetInteger64i_v header should be 0");
4553 static_assert(offsetof(GetInteger64i_v, pname) == 4,
4554 "offset of GetInteger64i_v pname should be 4");
4555 static_assert(offsetof(GetInteger64i_v, index) == 8,
4556 "offset of GetInteger64i_v index should be 8");
4557 static_assert(offsetof(GetInteger64i_v, data_shm_id) == 12,
4558 "offset of GetInteger64i_v data_shm_id should be 12");
4559 static_assert(offsetof(GetInteger64i_v, data_shm_offset) == 16,
4560 "offset of GetInteger64i_v data_shm_offset should be 16");
4562 struct GetIntegerv {
4563 typedef GetIntegerv ValueType;
4564 static const CommandId kCmdId = kGetIntegerv;
4565 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4566 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4568 typedef SizedResult<GLint> Result;
4570 static uint32_t ComputeSize() {
4571 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4574 void SetHeader() { header.SetCmd<ValueType>(); }
4576 void Init(GLenum _pname,
4577 uint32_t _params_shm_id,
4578 uint32_t _params_shm_offset) {
4579 SetHeader();
4580 pname = _pname;
4581 params_shm_id = _params_shm_id;
4582 params_shm_offset = _params_shm_offset;
4585 void* Set(void* cmd,
4586 GLenum _pname,
4587 uint32_t _params_shm_id,
4588 uint32_t _params_shm_offset) {
4589 static_cast<ValueType*>(cmd)
4590 ->Init(_pname, _params_shm_id, _params_shm_offset);
4591 return NextCmdAddress<ValueType>(cmd);
4594 gpu::CommandHeader header;
4595 uint32_t pname;
4596 uint32_t params_shm_id;
4597 uint32_t params_shm_offset;
4600 static_assert(sizeof(GetIntegerv) == 16, "size of GetIntegerv should be 16");
4601 static_assert(offsetof(GetIntegerv, header) == 0,
4602 "offset of GetIntegerv header should be 0");
4603 static_assert(offsetof(GetIntegerv, pname) == 4,
4604 "offset of GetIntegerv pname should be 4");
4605 static_assert(offsetof(GetIntegerv, params_shm_id) == 8,
4606 "offset of GetIntegerv params_shm_id should be 8");
4607 static_assert(offsetof(GetIntegerv, params_shm_offset) == 12,
4608 "offset of GetIntegerv params_shm_offset should be 12");
4610 struct GetInternalformativ {
4611 typedef GetInternalformativ ValueType;
4612 static const CommandId kCmdId = kGetInternalformativ;
4613 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4614 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4616 typedef SizedResult<GLint> Result;
4618 static uint32_t ComputeSize() {
4619 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4622 void SetHeader() { header.SetCmd<ValueType>(); }
4624 void Init(GLenum _target,
4625 GLenum _format,
4626 GLenum _pname,
4627 GLsizei _bufSize,
4628 uint32_t _params_shm_id,
4629 uint32_t _params_shm_offset) {
4630 SetHeader();
4631 target = _target;
4632 format = _format;
4633 pname = _pname;
4634 bufSize = _bufSize;
4635 params_shm_id = _params_shm_id;
4636 params_shm_offset = _params_shm_offset;
4639 void* Set(void* cmd,
4640 GLenum _target,
4641 GLenum _format,
4642 GLenum _pname,
4643 GLsizei _bufSize,
4644 uint32_t _params_shm_id,
4645 uint32_t _params_shm_offset) {
4646 static_cast<ValueType*>(cmd)->Init(_target, _format, _pname, _bufSize,
4647 _params_shm_id, _params_shm_offset);
4648 return NextCmdAddress<ValueType>(cmd);
4651 gpu::CommandHeader header;
4652 uint32_t target;
4653 uint32_t format;
4654 uint32_t pname;
4655 int32_t bufSize;
4656 uint32_t params_shm_id;
4657 uint32_t params_shm_offset;
4660 static_assert(sizeof(GetInternalformativ) == 28,
4661 "size of GetInternalformativ should be 28");
4662 static_assert(offsetof(GetInternalformativ, header) == 0,
4663 "offset of GetInternalformativ header should be 0");
4664 static_assert(offsetof(GetInternalformativ, target) == 4,
4665 "offset of GetInternalformativ target should be 4");
4666 static_assert(offsetof(GetInternalformativ, format) == 8,
4667 "offset of GetInternalformativ format should be 8");
4668 static_assert(offsetof(GetInternalformativ, pname) == 12,
4669 "offset of GetInternalformativ pname should be 12");
4670 static_assert(offsetof(GetInternalformativ, bufSize) == 16,
4671 "offset of GetInternalformativ bufSize should be 16");
4672 static_assert(offsetof(GetInternalformativ, params_shm_id) == 20,
4673 "offset of GetInternalformativ params_shm_id should be 20");
4674 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 24,
4675 "offset of GetInternalformativ params_shm_offset should be 24");
4677 struct GetProgramiv {
4678 typedef GetProgramiv ValueType;
4679 static const CommandId kCmdId = kGetProgramiv;
4680 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4681 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4683 typedef SizedResult<GLint> Result;
4685 static uint32_t ComputeSize() {
4686 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4689 void SetHeader() { header.SetCmd<ValueType>(); }
4691 void Init(GLuint _program,
4692 GLenum _pname,
4693 uint32_t _params_shm_id,
4694 uint32_t _params_shm_offset) {
4695 SetHeader();
4696 program = _program;
4697 pname = _pname;
4698 params_shm_id = _params_shm_id;
4699 params_shm_offset = _params_shm_offset;
4702 void* Set(void* cmd,
4703 GLuint _program,
4704 GLenum _pname,
4705 uint32_t _params_shm_id,
4706 uint32_t _params_shm_offset) {
4707 static_cast<ValueType*>(cmd)
4708 ->Init(_program, _pname, _params_shm_id, _params_shm_offset);
4709 return NextCmdAddress<ValueType>(cmd);
4712 gpu::CommandHeader header;
4713 uint32_t program;
4714 uint32_t pname;
4715 uint32_t params_shm_id;
4716 uint32_t params_shm_offset;
4719 static_assert(sizeof(GetProgramiv) == 20, "size of GetProgramiv should be 20");
4720 static_assert(offsetof(GetProgramiv, header) == 0,
4721 "offset of GetProgramiv header should be 0");
4722 static_assert(offsetof(GetProgramiv, program) == 4,
4723 "offset of GetProgramiv program should be 4");
4724 static_assert(offsetof(GetProgramiv, pname) == 8,
4725 "offset of GetProgramiv pname should be 8");
4726 static_assert(offsetof(GetProgramiv, params_shm_id) == 12,
4727 "offset of GetProgramiv params_shm_id should be 12");
4728 static_assert(offsetof(GetProgramiv, params_shm_offset) == 16,
4729 "offset of GetProgramiv params_shm_offset should be 16");
4731 struct GetProgramInfoLog {
4732 typedef GetProgramInfoLog ValueType;
4733 static const CommandId kCmdId = kGetProgramInfoLog;
4734 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4735 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4737 static uint32_t ComputeSize() {
4738 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4741 void SetHeader() { header.SetCmd<ValueType>(); }
4743 void Init(GLuint _program, uint32_t _bucket_id) {
4744 SetHeader();
4745 program = _program;
4746 bucket_id = _bucket_id;
4749 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
4750 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
4751 return NextCmdAddress<ValueType>(cmd);
4754 gpu::CommandHeader header;
4755 uint32_t program;
4756 uint32_t bucket_id;
4759 static_assert(sizeof(GetProgramInfoLog) == 12,
4760 "size of GetProgramInfoLog should be 12");
4761 static_assert(offsetof(GetProgramInfoLog, header) == 0,
4762 "offset of GetProgramInfoLog header should be 0");
4763 static_assert(offsetof(GetProgramInfoLog, program) == 4,
4764 "offset of GetProgramInfoLog program should be 4");
4765 static_assert(offsetof(GetProgramInfoLog, bucket_id) == 8,
4766 "offset of GetProgramInfoLog bucket_id should be 8");
4768 struct GetRenderbufferParameteriv {
4769 typedef GetRenderbufferParameteriv ValueType;
4770 static const CommandId kCmdId = kGetRenderbufferParameteriv;
4771 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4772 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4774 typedef SizedResult<GLint> Result;
4776 static uint32_t ComputeSize() {
4777 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4780 void SetHeader() { header.SetCmd<ValueType>(); }
4782 void Init(GLenum _target,
4783 GLenum _pname,
4784 uint32_t _params_shm_id,
4785 uint32_t _params_shm_offset) {
4786 SetHeader();
4787 target = _target;
4788 pname = _pname;
4789 params_shm_id = _params_shm_id;
4790 params_shm_offset = _params_shm_offset;
4793 void* Set(void* cmd,
4794 GLenum _target,
4795 GLenum _pname,
4796 uint32_t _params_shm_id,
4797 uint32_t _params_shm_offset) {
4798 static_cast<ValueType*>(cmd)
4799 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4800 return NextCmdAddress<ValueType>(cmd);
4803 gpu::CommandHeader header;
4804 uint32_t target;
4805 uint32_t pname;
4806 uint32_t params_shm_id;
4807 uint32_t params_shm_offset;
4810 static_assert(sizeof(GetRenderbufferParameteriv) == 20,
4811 "size of GetRenderbufferParameteriv should be 20");
4812 static_assert(offsetof(GetRenderbufferParameteriv, header) == 0,
4813 "offset of GetRenderbufferParameteriv header should be 0");
4814 static_assert(offsetof(GetRenderbufferParameteriv, target) == 4,
4815 "offset of GetRenderbufferParameteriv target should be 4");
4816 static_assert(offsetof(GetRenderbufferParameteriv, pname) == 8,
4817 "offset of GetRenderbufferParameteriv pname should be 8");
4818 static_assert(
4819 offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
4820 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4821 static_assert(
4822 offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
4823 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4825 struct GetSamplerParameterfv {
4826 typedef GetSamplerParameterfv ValueType;
4827 static const CommandId kCmdId = kGetSamplerParameterfv;
4828 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4829 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4831 typedef SizedResult<GLfloat> Result;
4833 static uint32_t ComputeSize() {
4834 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4837 void SetHeader() { header.SetCmd<ValueType>(); }
4839 void Init(GLuint _sampler,
4840 GLenum _pname,
4841 uint32_t _params_shm_id,
4842 uint32_t _params_shm_offset) {
4843 SetHeader();
4844 sampler = _sampler;
4845 pname = _pname;
4846 params_shm_id = _params_shm_id;
4847 params_shm_offset = _params_shm_offset;
4850 void* Set(void* cmd,
4851 GLuint _sampler,
4852 GLenum _pname,
4853 uint32_t _params_shm_id,
4854 uint32_t _params_shm_offset) {
4855 static_cast<ValueType*>(cmd)
4856 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4857 return NextCmdAddress<ValueType>(cmd);
4860 gpu::CommandHeader header;
4861 uint32_t sampler;
4862 uint32_t pname;
4863 uint32_t params_shm_id;
4864 uint32_t params_shm_offset;
4867 static_assert(sizeof(GetSamplerParameterfv) == 20,
4868 "size of GetSamplerParameterfv should be 20");
4869 static_assert(offsetof(GetSamplerParameterfv, header) == 0,
4870 "offset of GetSamplerParameterfv header should be 0");
4871 static_assert(offsetof(GetSamplerParameterfv, sampler) == 4,
4872 "offset of GetSamplerParameterfv sampler should be 4");
4873 static_assert(offsetof(GetSamplerParameterfv, pname) == 8,
4874 "offset of GetSamplerParameterfv pname should be 8");
4875 static_assert(offsetof(GetSamplerParameterfv, params_shm_id) == 12,
4876 "offset of GetSamplerParameterfv params_shm_id should be 12");
4877 static_assert(offsetof(GetSamplerParameterfv, params_shm_offset) == 16,
4878 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4880 struct GetSamplerParameteriv {
4881 typedef GetSamplerParameteriv ValueType;
4882 static const CommandId kCmdId = kGetSamplerParameteriv;
4883 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4884 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4886 typedef SizedResult<GLint> Result;
4888 static uint32_t ComputeSize() {
4889 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4892 void SetHeader() { header.SetCmd<ValueType>(); }
4894 void Init(GLuint _sampler,
4895 GLenum _pname,
4896 uint32_t _params_shm_id,
4897 uint32_t _params_shm_offset) {
4898 SetHeader();
4899 sampler = _sampler;
4900 pname = _pname;
4901 params_shm_id = _params_shm_id;
4902 params_shm_offset = _params_shm_offset;
4905 void* Set(void* cmd,
4906 GLuint _sampler,
4907 GLenum _pname,
4908 uint32_t _params_shm_id,
4909 uint32_t _params_shm_offset) {
4910 static_cast<ValueType*>(cmd)
4911 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4912 return NextCmdAddress<ValueType>(cmd);
4915 gpu::CommandHeader header;
4916 uint32_t sampler;
4917 uint32_t pname;
4918 uint32_t params_shm_id;
4919 uint32_t params_shm_offset;
4922 static_assert(sizeof(GetSamplerParameteriv) == 20,
4923 "size of GetSamplerParameteriv should be 20");
4924 static_assert(offsetof(GetSamplerParameteriv, header) == 0,
4925 "offset of GetSamplerParameteriv header should be 0");
4926 static_assert(offsetof(GetSamplerParameteriv, sampler) == 4,
4927 "offset of GetSamplerParameteriv sampler should be 4");
4928 static_assert(offsetof(GetSamplerParameteriv, pname) == 8,
4929 "offset of GetSamplerParameteriv pname should be 8");
4930 static_assert(offsetof(GetSamplerParameteriv, params_shm_id) == 12,
4931 "offset of GetSamplerParameteriv params_shm_id should be 12");
4932 static_assert(offsetof(GetSamplerParameteriv, params_shm_offset) == 16,
4933 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4935 struct GetShaderiv {
4936 typedef GetShaderiv ValueType;
4937 static const CommandId kCmdId = kGetShaderiv;
4938 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4939 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4941 typedef SizedResult<GLint> Result;
4943 static uint32_t ComputeSize() {
4944 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4947 void SetHeader() { header.SetCmd<ValueType>(); }
4949 void Init(GLuint _shader,
4950 GLenum _pname,
4951 uint32_t _params_shm_id,
4952 uint32_t _params_shm_offset) {
4953 SetHeader();
4954 shader = _shader;
4955 pname = _pname;
4956 params_shm_id = _params_shm_id;
4957 params_shm_offset = _params_shm_offset;
4960 void* Set(void* cmd,
4961 GLuint _shader,
4962 GLenum _pname,
4963 uint32_t _params_shm_id,
4964 uint32_t _params_shm_offset) {
4965 static_cast<ValueType*>(cmd)
4966 ->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
4967 return NextCmdAddress<ValueType>(cmd);
4970 gpu::CommandHeader header;
4971 uint32_t shader;
4972 uint32_t pname;
4973 uint32_t params_shm_id;
4974 uint32_t params_shm_offset;
4977 static_assert(sizeof(GetShaderiv) == 20, "size of GetShaderiv should be 20");
4978 static_assert(offsetof(GetShaderiv, header) == 0,
4979 "offset of GetShaderiv header should be 0");
4980 static_assert(offsetof(GetShaderiv, shader) == 4,
4981 "offset of GetShaderiv shader should be 4");
4982 static_assert(offsetof(GetShaderiv, pname) == 8,
4983 "offset of GetShaderiv pname should be 8");
4984 static_assert(offsetof(GetShaderiv, params_shm_id) == 12,
4985 "offset of GetShaderiv params_shm_id should be 12");
4986 static_assert(offsetof(GetShaderiv, params_shm_offset) == 16,
4987 "offset of GetShaderiv params_shm_offset should be 16");
4989 struct GetShaderInfoLog {
4990 typedef GetShaderInfoLog ValueType;
4991 static const CommandId kCmdId = kGetShaderInfoLog;
4992 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4993 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4995 static uint32_t ComputeSize() {
4996 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4999 void SetHeader() { header.SetCmd<ValueType>(); }
5001 void Init(GLuint _shader, uint32_t _bucket_id) {
5002 SetHeader();
5003 shader = _shader;
5004 bucket_id = _bucket_id;
5007 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
5008 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
5009 return NextCmdAddress<ValueType>(cmd);
5012 gpu::CommandHeader header;
5013 uint32_t shader;
5014 uint32_t bucket_id;
5017 static_assert(sizeof(GetShaderInfoLog) == 12,
5018 "size of GetShaderInfoLog should be 12");
5019 static_assert(offsetof(GetShaderInfoLog, header) == 0,
5020 "offset of GetShaderInfoLog header should be 0");
5021 static_assert(offsetof(GetShaderInfoLog, shader) == 4,
5022 "offset of GetShaderInfoLog shader should be 4");
5023 static_assert(offsetof(GetShaderInfoLog, bucket_id) == 8,
5024 "offset of GetShaderInfoLog bucket_id should be 8");
5026 struct GetShaderPrecisionFormat {
5027 typedef GetShaderPrecisionFormat ValueType;
5028 static const CommandId kCmdId = kGetShaderPrecisionFormat;
5029 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5030 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5032 struct Result {
5033 int32_t success;
5034 int32_t min_range;
5035 int32_t max_range;
5036 int32_t precision;
5039 static uint32_t ComputeSize() {
5040 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5043 void SetHeader() { header.SetCmd<ValueType>(); }
5045 void Init(GLenum _shadertype,
5046 GLenum _precisiontype,
5047 uint32_t _result_shm_id,
5048 uint32_t _result_shm_offset) {
5049 SetHeader();
5050 shadertype = _shadertype;
5051 precisiontype = _precisiontype;
5052 result_shm_id = _result_shm_id;
5053 result_shm_offset = _result_shm_offset;
5056 void* Set(void* cmd,
5057 GLenum _shadertype,
5058 GLenum _precisiontype,
5059 uint32_t _result_shm_id,
5060 uint32_t _result_shm_offset) {
5061 static_cast<ValueType*>(cmd)
5062 ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
5063 return NextCmdAddress<ValueType>(cmd);
5066 gpu::CommandHeader header;
5067 uint32_t shadertype;
5068 uint32_t precisiontype;
5069 uint32_t result_shm_id;
5070 uint32_t result_shm_offset;
5073 static_assert(sizeof(GetShaderPrecisionFormat) == 20,
5074 "size of GetShaderPrecisionFormat should be 20");
5075 static_assert(offsetof(GetShaderPrecisionFormat, header) == 0,
5076 "offset of GetShaderPrecisionFormat header should be 0");
5077 static_assert(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
5078 "offset of GetShaderPrecisionFormat shadertype should be 4");
5079 static_assert(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
5080 "offset of GetShaderPrecisionFormat precisiontype should be 8");
5081 static_assert(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
5082 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
5083 static_assert(
5084 offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
5085 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
5086 static_assert(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
5087 "offset of GetShaderPrecisionFormat Result success should be "
5088 "0");
5089 static_assert(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
5090 "offset of GetShaderPrecisionFormat Result min_range should be "
5091 "4");
5092 static_assert(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
5093 "offset of GetShaderPrecisionFormat Result max_range should be "
5094 "8");
5095 static_assert(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
5096 "offset of GetShaderPrecisionFormat Result precision should be "
5097 "12");
5099 struct GetShaderSource {
5100 typedef GetShaderSource ValueType;
5101 static const CommandId kCmdId = kGetShaderSource;
5102 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5103 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5105 static uint32_t ComputeSize() {
5106 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5109 void SetHeader() { header.SetCmd<ValueType>(); }
5111 void Init(GLuint _shader, uint32_t _bucket_id) {
5112 SetHeader();
5113 shader = _shader;
5114 bucket_id = _bucket_id;
5117 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
5118 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
5119 return NextCmdAddress<ValueType>(cmd);
5122 gpu::CommandHeader header;
5123 uint32_t shader;
5124 uint32_t bucket_id;
5127 static_assert(sizeof(GetShaderSource) == 12,
5128 "size of GetShaderSource should be 12");
5129 static_assert(offsetof(GetShaderSource, header) == 0,
5130 "offset of GetShaderSource header should be 0");
5131 static_assert(offsetof(GetShaderSource, shader) == 4,
5132 "offset of GetShaderSource shader should be 4");
5133 static_assert(offsetof(GetShaderSource, bucket_id) == 8,
5134 "offset of GetShaderSource bucket_id should be 8");
5136 struct GetString {
5137 typedef GetString ValueType;
5138 static const CommandId kCmdId = kGetString;
5139 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5140 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5142 static uint32_t ComputeSize() {
5143 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5146 void SetHeader() { header.SetCmd<ValueType>(); }
5148 void Init(GLenum _name, uint32_t _bucket_id) {
5149 SetHeader();
5150 name = _name;
5151 bucket_id = _bucket_id;
5154 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) {
5155 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
5156 return NextCmdAddress<ValueType>(cmd);
5159 gpu::CommandHeader header;
5160 uint32_t name;
5161 uint32_t bucket_id;
5164 static_assert(sizeof(GetString) == 12, "size of GetString should be 12");
5165 static_assert(offsetof(GetString, header) == 0,
5166 "offset of GetString header should be 0");
5167 static_assert(offsetof(GetString, name) == 4,
5168 "offset of GetString name should be 4");
5169 static_assert(offsetof(GetString, bucket_id) == 8,
5170 "offset of GetString bucket_id should be 8");
5172 struct GetSynciv {
5173 typedef GetSynciv ValueType;
5174 static const CommandId kCmdId = kGetSynciv;
5175 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5176 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5178 typedef SizedResult<GLint> Result;
5180 static uint32_t ComputeSize() {
5181 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5184 void SetHeader() { header.SetCmd<ValueType>(); }
5186 void Init(GLuint _sync,
5187 GLenum _pname,
5188 uint32_t _values_shm_id,
5189 uint32_t _values_shm_offset) {
5190 SetHeader();
5191 sync = _sync;
5192 pname = _pname;
5193 values_shm_id = _values_shm_id;
5194 values_shm_offset = _values_shm_offset;
5197 void* Set(void* cmd,
5198 GLuint _sync,
5199 GLenum _pname,
5200 uint32_t _values_shm_id,
5201 uint32_t _values_shm_offset) {
5202 static_cast<ValueType*>(cmd)
5203 ->Init(_sync, _pname, _values_shm_id, _values_shm_offset);
5204 return NextCmdAddress<ValueType>(cmd);
5207 gpu::CommandHeader header;
5208 uint32_t sync;
5209 uint32_t pname;
5210 uint32_t values_shm_id;
5211 uint32_t values_shm_offset;
5214 static_assert(sizeof(GetSynciv) == 20, "size of GetSynciv should be 20");
5215 static_assert(offsetof(GetSynciv, header) == 0,
5216 "offset of GetSynciv header should be 0");
5217 static_assert(offsetof(GetSynciv, sync) == 4,
5218 "offset of GetSynciv sync should be 4");
5219 static_assert(offsetof(GetSynciv, pname) == 8,
5220 "offset of GetSynciv pname should be 8");
5221 static_assert(offsetof(GetSynciv, values_shm_id) == 12,
5222 "offset of GetSynciv values_shm_id should be 12");
5223 static_assert(offsetof(GetSynciv, values_shm_offset) == 16,
5224 "offset of GetSynciv values_shm_offset should be 16");
5226 struct GetTexParameterfv {
5227 typedef GetTexParameterfv ValueType;
5228 static const CommandId kCmdId = kGetTexParameterfv;
5229 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5232 typedef SizedResult<GLfloat> Result;
5234 static uint32_t ComputeSize() {
5235 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5238 void SetHeader() { header.SetCmd<ValueType>(); }
5240 void Init(GLenum _target,
5241 GLenum _pname,
5242 uint32_t _params_shm_id,
5243 uint32_t _params_shm_offset) {
5244 SetHeader();
5245 target = _target;
5246 pname = _pname;
5247 params_shm_id = _params_shm_id;
5248 params_shm_offset = _params_shm_offset;
5251 void* Set(void* cmd,
5252 GLenum _target,
5253 GLenum _pname,
5254 uint32_t _params_shm_id,
5255 uint32_t _params_shm_offset) {
5256 static_cast<ValueType*>(cmd)
5257 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5258 return NextCmdAddress<ValueType>(cmd);
5261 gpu::CommandHeader header;
5262 uint32_t target;
5263 uint32_t pname;
5264 uint32_t params_shm_id;
5265 uint32_t params_shm_offset;
5268 static_assert(sizeof(GetTexParameterfv) == 20,
5269 "size of GetTexParameterfv should be 20");
5270 static_assert(offsetof(GetTexParameterfv, header) == 0,
5271 "offset of GetTexParameterfv header should be 0");
5272 static_assert(offsetof(GetTexParameterfv, target) == 4,
5273 "offset of GetTexParameterfv target should be 4");
5274 static_assert(offsetof(GetTexParameterfv, pname) == 8,
5275 "offset of GetTexParameterfv pname should be 8");
5276 static_assert(offsetof(GetTexParameterfv, params_shm_id) == 12,
5277 "offset of GetTexParameterfv params_shm_id should be 12");
5278 static_assert(offsetof(GetTexParameterfv, params_shm_offset) == 16,
5279 "offset of GetTexParameterfv params_shm_offset should be 16");
5281 struct GetTexParameteriv {
5282 typedef GetTexParameteriv ValueType;
5283 static const CommandId kCmdId = kGetTexParameteriv;
5284 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5285 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5287 typedef SizedResult<GLint> Result;
5289 static uint32_t ComputeSize() {
5290 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5293 void SetHeader() { header.SetCmd<ValueType>(); }
5295 void Init(GLenum _target,
5296 GLenum _pname,
5297 uint32_t _params_shm_id,
5298 uint32_t _params_shm_offset) {
5299 SetHeader();
5300 target = _target;
5301 pname = _pname;
5302 params_shm_id = _params_shm_id;
5303 params_shm_offset = _params_shm_offset;
5306 void* Set(void* cmd,
5307 GLenum _target,
5308 GLenum _pname,
5309 uint32_t _params_shm_id,
5310 uint32_t _params_shm_offset) {
5311 static_cast<ValueType*>(cmd)
5312 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
5313 return NextCmdAddress<ValueType>(cmd);
5316 gpu::CommandHeader header;
5317 uint32_t target;
5318 uint32_t pname;
5319 uint32_t params_shm_id;
5320 uint32_t params_shm_offset;
5323 static_assert(sizeof(GetTexParameteriv) == 20,
5324 "size of GetTexParameteriv should be 20");
5325 static_assert(offsetof(GetTexParameteriv, header) == 0,
5326 "offset of GetTexParameteriv header should be 0");
5327 static_assert(offsetof(GetTexParameteriv, target) == 4,
5328 "offset of GetTexParameteriv target should be 4");
5329 static_assert(offsetof(GetTexParameteriv, pname) == 8,
5330 "offset of GetTexParameteriv pname should be 8");
5331 static_assert(offsetof(GetTexParameteriv, params_shm_id) == 12,
5332 "offset of GetTexParameteriv params_shm_id should be 12");
5333 static_assert(offsetof(GetTexParameteriv, params_shm_offset) == 16,
5334 "offset of GetTexParameteriv params_shm_offset should be 16");
5336 struct GetTransformFeedbackVarying {
5337 typedef GetTransformFeedbackVarying ValueType;
5338 static const CommandId kCmdId = kGetTransformFeedbackVarying;
5339 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5340 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5342 struct Result {
5343 int32_t success;
5344 int32_t size;
5345 uint32_t type;
5348 static uint32_t ComputeSize() {
5349 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5352 void SetHeader() { header.SetCmd<ValueType>(); }
5354 void Init(GLuint _program,
5355 GLuint _index,
5356 uint32_t _name_bucket_id,
5357 uint32_t _result_shm_id,
5358 uint32_t _result_shm_offset) {
5359 SetHeader();
5360 program = _program;
5361 index = _index;
5362 name_bucket_id = _name_bucket_id;
5363 result_shm_id = _result_shm_id;
5364 result_shm_offset = _result_shm_offset;
5367 void* Set(void* cmd,
5368 GLuint _program,
5369 GLuint _index,
5370 uint32_t _name_bucket_id,
5371 uint32_t _result_shm_id,
5372 uint32_t _result_shm_offset) {
5373 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
5374 _result_shm_id, _result_shm_offset);
5375 return NextCmdAddress<ValueType>(cmd);
5378 gpu::CommandHeader header;
5379 uint32_t program;
5380 uint32_t index;
5381 uint32_t name_bucket_id;
5382 uint32_t result_shm_id;
5383 uint32_t result_shm_offset;
5386 static_assert(sizeof(GetTransformFeedbackVarying) == 24,
5387 "size of GetTransformFeedbackVarying should be 24");
5388 static_assert(offsetof(GetTransformFeedbackVarying, header) == 0,
5389 "offset of GetTransformFeedbackVarying header should be 0");
5390 static_assert(offsetof(GetTransformFeedbackVarying, program) == 4,
5391 "offset of GetTransformFeedbackVarying program should be 4");
5392 static_assert(offsetof(GetTransformFeedbackVarying, index) == 8,
5393 "offset of GetTransformFeedbackVarying index should be 8");
5394 static_assert(
5395 offsetof(GetTransformFeedbackVarying, name_bucket_id) == 12,
5396 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
5397 static_assert(
5398 offsetof(GetTransformFeedbackVarying, result_shm_id) == 16,
5399 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
5400 static_assert(
5401 offsetof(GetTransformFeedbackVarying, result_shm_offset) == 20,
5402 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
5403 static_assert(offsetof(GetTransformFeedbackVarying::Result, success) == 0,
5404 "offset of GetTransformFeedbackVarying Result success should be "
5405 "0");
5406 static_assert(offsetof(GetTransformFeedbackVarying::Result, size) == 4,
5407 "offset of GetTransformFeedbackVarying Result size should be "
5408 "4");
5409 static_assert(offsetof(GetTransformFeedbackVarying::Result, type) == 8,
5410 "offset of GetTransformFeedbackVarying Result type should be "
5411 "8");
5413 struct GetUniformBlockIndex {
5414 typedef GetUniformBlockIndex ValueType;
5415 static const CommandId kCmdId = kGetUniformBlockIndex;
5416 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5417 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5419 typedef GLuint Result;
5421 static uint32_t ComputeSize() {
5422 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5425 void SetHeader() { header.SetCmd<ValueType>(); }
5427 void Init(GLuint _program,
5428 uint32_t _name_bucket_id,
5429 uint32_t _index_shm_id,
5430 uint32_t _index_shm_offset) {
5431 SetHeader();
5432 program = _program;
5433 name_bucket_id = _name_bucket_id;
5434 index_shm_id = _index_shm_id;
5435 index_shm_offset = _index_shm_offset;
5438 void* Set(void* cmd,
5439 GLuint _program,
5440 uint32_t _name_bucket_id,
5441 uint32_t _index_shm_id,
5442 uint32_t _index_shm_offset) {
5443 static_cast<ValueType*>(cmd)
5444 ->Init(_program, _name_bucket_id, _index_shm_id, _index_shm_offset);
5445 return NextCmdAddress<ValueType>(cmd);
5448 gpu::CommandHeader header;
5449 uint32_t program;
5450 uint32_t name_bucket_id;
5451 uint32_t index_shm_id;
5452 uint32_t index_shm_offset;
5455 static_assert(sizeof(GetUniformBlockIndex) == 20,
5456 "size of GetUniformBlockIndex should be 20");
5457 static_assert(offsetof(GetUniformBlockIndex, header) == 0,
5458 "offset of GetUniformBlockIndex header should be 0");
5459 static_assert(offsetof(GetUniformBlockIndex, program) == 4,
5460 "offset of GetUniformBlockIndex program should be 4");
5461 static_assert(offsetof(GetUniformBlockIndex, name_bucket_id) == 8,
5462 "offset of GetUniformBlockIndex name_bucket_id should be 8");
5463 static_assert(offsetof(GetUniformBlockIndex, index_shm_id) == 12,
5464 "offset of GetUniformBlockIndex index_shm_id should be 12");
5465 static_assert(offsetof(GetUniformBlockIndex, index_shm_offset) == 16,
5466 "offset of GetUniformBlockIndex index_shm_offset should be 16");
5468 struct GetUniformfv {
5469 typedef GetUniformfv ValueType;
5470 static const CommandId kCmdId = kGetUniformfv;
5471 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5472 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5474 typedef SizedResult<GLfloat> Result;
5476 static uint32_t ComputeSize() {
5477 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5480 void SetHeader() { header.SetCmd<ValueType>(); }
5482 void Init(GLuint _program,
5483 GLint _location,
5484 uint32_t _params_shm_id,
5485 uint32_t _params_shm_offset) {
5486 SetHeader();
5487 program = _program;
5488 location = _location;
5489 params_shm_id = _params_shm_id;
5490 params_shm_offset = _params_shm_offset;
5493 void* Set(void* cmd,
5494 GLuint _program,
5495 GLint _location,
5496 uint32_t _params_shm_id,
5497 uint32_t _params_shm_offset) {
5498 static_cast<ValueType*>(cmd)
5499 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5500 return NextCmdAddress<ValueType>(cmd);
5503 gpu::CommandHeader header;
5504 uint32_t program;
5505 int32_t location;
5506 uint32_t params_shm_id;
5507 uint32_t params_shm_offset;
5510 static_assert(sizeof(GetUniformfv) == 20, "size of GetUniformfv should be 20");
5511 static_assert(offsetof(GetUniformfv, header) == 0,
5512 "offset of GetUniformfv header should be 0");
5513 static_assert(offsetof(GetUniformfv, program) == 4,
5514 "offset of GetUniformfv program should be 4");
5515 static_assert(offsetof(GetUniformfv, location) == 8,
5516 "offset of GetUniformfv location should be 8");
5517 static_assert(offsetof(GetUniformfv, params_shm_id) == 12,
5518 "offset of GetUniformfv params_shm_id should be 12");
5519 static_assert(offsetof(GetUniformfv, params_shm_offset) == 16,
5520 "offset of GetUniformfv params_shm_offset should be 16");
5522 struct GetUniformiv {
5523 typedef GetUniformiv ValueType;
5524 static const CommandId kCmdId = kGetUniformiv;
5525 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5526 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5528 typedef SizedResult<GLint> Result;
5530 static uint32_t ComputeSize() {
5531 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5534 void SetHeader() { header.SetCmd<ValueType>(); }
5536 void Init(GLuint _program,
5537 GLint _location,
5538 uint32_t _params_shm_id,
5539 uint32_t _params_shm_offset) {
5540 SetHeader();
5541 program = _program;
5542 location = _location;
5543 params_shm_id = _params_shm_id;
5544 params_shm_offset = _params_shm_offset;
5547 void* Set(void* cmd,
5548 GLuint _program,
5549 GLint _location,
5550 uint32_t _params_shm_id,
5551 uint32_t _params_shm_offset) {
5552 static_cast<ValueType*>(cmd)
5553 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5554 return NextCmdAddress<ValueType>(cmd);
5557 gpu::CommandHeader header;
5558 uint32_t program;
5559 int32_t location;
5560 uint32_t params_shm_id;
5561 uint32_t params_shm_offset;
5564 static_assert(sizeof(GetUniformiv) == 20, "size of GetUniformiv should be 20");
5565 static_assert(offsetof(GetUniformiv, header) == 0,
5566 "offset of GetUniformiv header should be 0");
5567 static_assert(offsetof(GetUniformiv, program) == 4,
5568 "offset of GetUniformiv program should be 4");
5569 static_assert(offsetof(GetUniformiv, location) == 8,
5570 "offset of GetUniformiv location should be 8");
5571 static_assert(offsetof(GetUniformiv, params_shm_id) == 12,
5572 "offset of GetUniformiv params_shm_id should be 12");
5573 static_assert(offsetof(GetUniformiv, params_shm_offset) == 16,
5574 "offset of GetUniformiv params_shm_offset should be 16");
5576 struct GetUniformuiv {
5577 typedef GetUniformuiv ValueType;
5578 static const CommandId kCmdId = kGetUniformuiv;
5579 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5580 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5582 typedef SizedResult<GLuint> Result;
5584 static uint32_t ComputeSize() {
5585 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5588 void SetHeader() { header.SetCmd<ValueType>(); }
5590 void Init(GLuint _program,
5591 GLint _location,
5592 uint32_t _params_shm_id,
5593 uint32_t _params_shm_offset) {
5594 SetHeader();
5595 program = _program;
5596 location = _location;
5597 params_shm_id = _params_shm_id;
5598 params_shm_offset = _params_shm_offset;
5601 void* Set(void* cmd,
5602 GLuint _program,
5603 GLint _location,
5604 uint32_t _params_shm_id,
5605 uint32_t _params_shm_offset) {
5606 static_cast<ValueType*>(cmd)
5607 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
5608 return NextCmdAddress<ValueType>(cmd);
5611 gpu::CommandHeader header;
5612 uint32_t program;
5613 int32_t location;
5614 uint32_t params_shm_id;
5615 uint32_t params_shm_offset;
5618 static_assert(sizeof(GetUniformuiv) == 20,
5619 "size of GetUniformuiv should be 20");
5620 static_assert(offsetof(GetUniformuiv, header) == 0,
5621 "offset of GetUniformuiv header should be 0");
5622 static_assert(offsetof(GetUniformuiv, program) == 4,
5623 "offset of GetUniformuiv program should be 4");
5624 static_assert(offsetof(GetUniformuiv, location) == 8,
5625 "offset of GetUniformuiv location should be 8");
5626 static_assert(offsetof(GetUniformuiv, params_shm_id) == 12,
5627 "offset of GetUniformuiv params_shm_id should be 12");
5628 static_assert(offsetof(GetUniformuiv, params_shm_offset) == 16,
5629 "offset of GetUniformuiv params_shm_offset should be 16");
5631 struct GetUniformIndices {
5632 typedef GetUniformIndices ValueType;
5633 static const CommandId kCmdId = kGetUniformIndices;
5634 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5635 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5637 typedef SizedResult<GLuint> Result;
5639 static uint32_t ComputeSize() {
5640 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5643 void SetHeader() { header.SetCmd<ValueType>(); }
5645 void Init(GLuint _program,
5646 uint32_t _names_bucket_id,
5647 uint32_t _indices_shm_id,
5648 uint32_t _indices_shm_offset) {
5649 SetHeader();
5650 program = _program;
5651 names_bucket_id = _names_bucket_id;
5652 indices_shm_id = _indices_shm_id;
5653 indices_shm_offset = _indices_shm_offset;
5656 void* Set(void* cmd,
5657 GLuint _program,
5658 uint32_t _names_bucket_id,
5659 uint32_t _indices_shm_id,
5660 uint32_t _indices_shm_offset) {
5661 static_cast<ValueType*>(cmd)->Init(_program, _names_bucket_id,
5662 _indices_shm_id, _indices_shm_offset);
5663 return NextCmdAddress<ValueType>(cmd);
5666 gpu::CommandHeader header;
5667 uint32_t program;
5668 uint32_t names_bucket_id;
5669 uint32_t indices_shm_id;
5670 uint32_t indices_shm_offset;
5673 static_assert(sizeof(GetUniformIndices) == 20,
5674 "size of GetUniformIndices should be 20");
5675 static_assert(offsetof(GetUniformIndices, header) == 0,
5676 "offset of GetUniformIndices header should be 0");
5677 static_assert(offsetof(GetUniformIndices, program) == 4,
5678 "offset of GetUniformIndices program should be 4");
5679 static_assert(offsetof(GetUniformIndices, names_bucket_id) == 8,
5680 "offset of GetUniformIndices names_bucket_id should be 8");
5681 static_assert(offsetof(GetUniformIndices, indices_shm_id) == 12,
5682 "offset of GetUniformIndices indices_shm_id should be 12");
5683 static_assert(offsetof(GetUniformIndices, indices_shm_offset) == 16,
5684 "offset of GetUniformIndices indices_shm_offset should be 16");
5686 struct GetUniformLocation {
5687 typedef GetUniformLocation ValueType;
5688 static const CommandId kCmdId = kGetUniformLocation;
5689 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5690 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5692 typedef GLint Result;
5694 static uint32_t ComputeSize() {
5695 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5698 void SetHeader() { header.SetCmd<ValueType>(); }
5700 void Init(GLuint _program,
5701 uint32_t _name_bucket_id,
5702 uint32_t _location_shm_id,
5703 uint32_t _location_shm_offset) {
5704 SetHeader();
5705 program = _program;
5706 name_bucket_id = _name_bucket_id;
5707 location_shm_id = _location_shm_id;
5708 location_shm_offset = _location_shm_offset;
5711 void* Set(void* cmd,
5712 GLuint _program,
5713 uint32_t _name_bucket_id,
5714 uint32_t _location_shm_id,
5715 uint32_t _location_shm_offset) {
5716 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
5717 _location_shm_id, _location_shm_offset);
5718 return NextCmdAddress<ValueType>(cmd);
5721 gpu::CommandHeader header;
5722 uint32_t program;
5723 uint32_t name_bucket_id;
5724 uint32_t location_shm_id;
5725 uint32_t location_shm_offset;
5728 static_assert(sizeof(GetUniformLocation) == 20,
5729 "size of GetUniformLocation should be 20");
5730 static_assert(offsetof(GetUniformLocation, header) == 0,
5731 "offset of GetUniformLocation header should be 0");
5732 static_assert(offsetof(GetUniformLocation, program) == 4,
5733 "offset of GetUniformLocation program should be 4");
5734 static_assert(offsetof(GetUniformLocation, name_bucket_id) == 8,
5735 "offset of GetUniformLocation name_bucket_id should be 8");
5736 static_assert(offsetof(GetUniformLocation, location_shm_id) == 12,
5737 "offset of GetUniformLocation location_shm_id should be 12");
5738 static_assert(offsetof(GetUniformLocation, location_shm_offset) == 16,
5739 "offset of GetUniformLocation location_shm_offset should be 16");
5741 struct GetVertexAttribfv {
5742 typedef GetVertexAttribfv ValueType;
5743 static const CommandId kCmdId = kGetVertexAttribfv;
5744 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5745 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5747 typedef SizedResult<GLfloat> Result;
5749 static uint32_t ComputeSize() {
5750 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5753 void SetHeader() { header.SetCmd<ValueType>(); }
5755 void Init(GLuint _index,
5756 GLenum _pname,
5757 uint32_t _params_shm_id,
5758 uint32_t _params_shm_offset) {
5759 SetHeader();
5760 index = _index;
5761 pname = _pname;
5762 params_shm_id = _params_shm_id;
5763 params_shm_offset = _params_shm_offset;
5766 void* Set(void* cmd,
5767 GLuint _index,
5768 GLenum _pname,
5769 uint32_t _params_shm_id,
5770 uint32_t _params_shm_offset) {
5771 static_cast<ValueType*>(cmd)
5772 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5773 return NextCmdAddress<ValueType>(cmd);
5776 gpu::CommandHeader header;
5777 uint32_t index;
5778 uint32_t pname;
5779 uint32_t params_shm_id;
5780 uint32_t params_shm_offset;
5783 static_assert(sizeof(GetVertexAttribfv) == 20,
5784 "size of GetVertexAttribfv should be 20");
5785 static_assert(offsetof(GetVertexAttribfv, header) == 0,
5786 "offset of GetVertexAttribfv header should be 0");
5787 static_assert(offsetof(GetVertexAttribfv, index) == 4,
5788 "offset of GetVertexAttribfv index should be 4");
5789 static_assert(offsetof(GetVertexAttribfv, pname) == 8,
5790 "offset of GetVertexAttribfv pname should be 8");
5791 static_assert(offsetof(GetVertexAttribfv, params_shm_id) == 12,
5792 "offset of GetVertexAttribfv params_shm_id should be 12");
5793 static_assert(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
5794 "offset of GetVertexAttribfv params_shm_offset should be 16");
5796 struct GetVertexAttribiv {
5797 typedef GetVertexAttribiv ValueType;
5798 static const CommandId kCmdId = kGetVertexAttribiv;
5799 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5800 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5802 typedef SizedResult<GLint> Result;
5804 static uint32_t ComputeSize() {
5805 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5808 void SetHeader() { header.SetCmd<ValueType>(); }
5810 void Init(GLuint _index,
5811 GLenum _pname,
5812 uint32_t _params_shm_id,
5813 uint32_t _params_shm_offset) {
5814 SetHeader();
5815 index = _index;
5816 pname = _pname;
5817 params_shm_id = _params_shm_id;
5818 params_shm_offset = _params_shm_offset;
5821 void* Set(void* cmd,
5822 GLuint _index,
5823 GLenum _pname,
5824 uint32_t _params_shm_id,
5825 uint32_t _params_shm_offset) {
5826 static_cast<ValueType*>(cmd)
5827 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5828 return NextCmdAddress<ValueType>(cmd);
5831 gpu::CommandHeader header;
5832 uint32_t index;
5833 uint32_t pname;
5834 uint32_t params_shm_id;
5835 uint32_t params_shm_offset;
5838 static_assert(sizeof(GetVertexAttribiv) == 20,
5839 "size of GetVertexAttribiv should be 20");
5840 static_assert(offsetof(GetVertexAttribiv, header) == 0,
5841 "offset of GetVertexAttribiv header should be 0");
5842 static_assert(offsetof(GetVertexAttribiv, index) == 4,
5843 "offset of GetVertexAttribiv index should be 4");
5844 static_assert(offsetof(GetVertexAttribiv, pname) == 8,
5845 "offset of GetVertexAttribiv pname should be 8");
5846 static_assert(offsetof(GetVertexAttribiv, params_shm_id) == 12,
5847 "offset of GetVertexAttribiv params_shm_id should be 12");
5848 static_assert(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
5849 "offset of GetVertexAttribiv params_shm_offset should be 16");
5851 struct GetVertexAttribIiv {
5852 typedef GetVertexAttribIiv ValueType;
5853 static const CommandId kCmdId = kGetVertexAttribIiv;
5854 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5855 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5857 typedef SizedResult<GLint> Result;
5859 static uint32_t ComputeSize() {
5860 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5863 void SetHeader() { header.SetCmd<ValueType>(); }
5865 void Init(GLuint _index,
5866 GLenum _pname,
5867 uint32_t _params_shm_id,
5868 uint32_t _params_shm_offset) {
5869 SetHeader();
5870 index = _index;
5871 pname = _pname;
5872 params_shm_id = _params_shm_id;
5873 params_shm_offset = _params_shm_offset;
5876 void* Set(void* cmd,
5877 GLuint _index,
5878 GLenum _pname,
5879 uint32_t _params_shm_id,
5880 uint32_t _params_shm_offset) {
5881 static_cast<ValueType*>(cmd)
5882 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5883 return NextCmdAddress<ValueType>(cmd);
5886 gpu::CommandHeader header;
5887 uint32_t index;
5888 uint32_t pname;
5889 uint32_t params_shm_id;
5890 uint32_t params_shm_offset;
5893 static_assert(sizeof(GetVertexAttribIiv) == 20,
5894 "size of GetVertexAttribIiv should be 20");
5895 static_assert(offsetof(GetVertexAttribIiv, header) == 0,
5896 "offset of GetVertexAttribIiv header should be 0");
5897 static_assert(offsetof(GetVertexAttribIiv, index) == 4,
5898 "offset of GetVertexAttribIiv index should be 4");
5899 static_assert(offsetof(GetVertexAttribIiv, pname) == 8,
5900 "offset of GetVertexAttribIiv pname should be 8");
5901 static_assert(offsetof(GetVertexAttribIiv, params_shm_id) == 12,
5902 "offset of GetVertexAttribIiv params_shm_id should be 12");
5903 static_assert(offsetof(GetVertexAttribIiv, params_shm_offset) == 16,
5904 "offset of GetVertexAttribIiv params_shm_offset should be 16");
5906 struct GetVertexAttribIuiv {
5907 typedef GetVertexAttribIuiv ValueType;
5908 static const CommandId kCmdId = kGetVertexAttribIuiv;
5909 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5910 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5912 typedef SizedResult<GLuint> Result;
5914 static uint32_t ComputeSize() {
5915 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5918 void SetHeader() { header.SetCmd<ValueType>(); }
5920 void Init(GLuint _index,
5921 GLenum _pname,
5922 uint32_t _params_shm_id,
5923 uint32_t _params_shm_offset) {
5924 SetHeader();
5925 index = _index;
5926 pname = _pname;
5927 params_shm_id = _params_shm_id;
5928 params_shm_offset = _params_shm_offset;
5931 void* Set(void* cmd,
5932 GLuint _index,
5933 GLenum _pname,
5934 uint32_t _params_shm_id,
5935 uint32_t _params_shm_offset) {
5936 static_cast<ValueType*>(cmd)
5937 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5938 return NextCmdAddress<ValueType>(cmd);
5941 gpu::CommandHeader header;
5942 uint32_t index;
5943 uint32_t pname;
5944 uint32_t params_shm_id;
5945 uint32_t params_shm_offset;
5948 static_assert(sizeof(GetVertexAttribIuiv) == 20,
5949 "size of GetVertexAttribIuiv should be 20");
5950 static_assert(offsetof(GetVertexAttribIuiv, header) == 0,
5951 "offset of GetVertexAttribIuiv header should be 0");
5952 static_assert(offsetof(GetVertexAttribIuiv, index) == 4,
5953 "offset of GetVertexAttribIuiv index should be 4");
5954 static_assert(offsetof(GetVertexAttribIuiv, pname) == 8,
5955 "offset of GetVertexAttribIuiv pname should be 8");
5956 static_assert(offsetof(GetVertexAttribIuiv, params_shm_id) == 12,
5957 "offset of GetVertexAttribIuiv params_shm_id should be 12");
5958 static_assert(offsetof(GetVertexAttribIuiv, params_shm_offset) == 16,
5959 "offset of GetVertexAttribIuiv params_shm_offset should be 16");
5961 struct GetVertexAttribPointerv {
5962 typedef GetVertexAttribPointerv ValueType;
5963 static const CommandId kCmdId = kGetVertexAttribPointerv;
5964 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5965 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5967 typedef SizedResult<GLuint> Result;
5969 static uint32_t ComputeSize() {
5970 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5973 void SetHeader() { header.SetCmd<ValueType>(); }
5975 void Init(GLuint _index,
5976 GLenum _pname,
5977 uint32_t _pointer_shm_id,
5978 uint32_t _pointer_shm_offset) {
5979 SetHeader();
5980 index = _index;
5981 pname = _pname;
5982 pointer_shm_id = _pointer_shm_id;
5983 pointer_shm_offset = _pointer_shm_offset;
5986 void* Set(void* cmd,
5987 GLuint _index,
5988 GLenum _pname,
5989 uint32_t _pointer_shm_id,
5990 uint32_t _pointer_shm_offset) {
5991 static_cast<ValueType*>(cmd)
5992 ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
5993 return NextCmdAddress<ValueType>(cmd);
5996 gpu::CommandHeader header;
5997 uint32_t index;
5998 uint32_t pname;
5999 uint32_t pointer_shm_id;
6000 uint32_t pointer_shm_offset;
6003 static_assert(sizeof(GetVertexAttribPointerv) == 20,
6004 "size of GetVertexAttribPointerv should be 20");
6005 static_assert(offsetof(GetVertexAttribPointerv, header) == 0,
6006 "offset of GetVertexAttribPointerv header should be 0");
6007 static_assert(offsetof(GetVertexAttribPointerv, index) == 4,
6008 "offset of GetVertexAttribPointerv index should be 4");
6009 static_assert(offsetof(GetVertexAttribPointerv, pname) == 8,
6010 "offset of GetVertexAttribPointerv pname should be 8");
6011 static_assert(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
6012 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
6013 static_assert(
6014 offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
6015 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
6017 struct Hint {
6018 typedef Hint ValueType;
6019 static const CommandId kCmdId = kHint;
6020 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6021 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6023 static uint32_t ComputeSize() {
6024 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6027 void SetHeader() { header.SetCmd<ValueType>(); }
6029 void Init(GLenum _target, GLenum _mode) {
6030 SetHeader();
6031 target = _target;
6032 mode = _mode;
6035 void* Set(void* cmd, GLenum _target, GLenum _mode) {
6036 static_cast<ValueType*>(cmd)->Init(_target, _mode);
6037 return NextCmdAddress<ValueType>(cmd);
6040 gpu::CommandHeader header;
6041 uint32_t target;
6042 uint32_t mode;
6045 static_assert(sizeof(Hint) == 12, "size of Hint should be 12");
6046 static_assert(offsetof(Hint, header) == 0, "offset of Hint header should be 0");
6047 static_assert(offsetof(Hint, target) == 4, "offset of Hint target should be 4");
6048 static_assert(offsetof(Hint, mode) == 8, "offset of Hint mode should be 8");
6050 struct InvalidateFramebufferImmediate {
6051 typedef InvalidateFramebufferImmediate ValueType;
6052 static const CommandId kCmdId = kInvalidateFramebufferImmediate;
6053 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6054 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6056 static uint32_t ComputeDataSize(GLsizei count) {
6057 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
6060 static uint32_t ComputeSize(GLsizei count) {
6061 return static_cast<uint32_t>(sizeof(ValueType) +
6062 ComputeDataSize(count)); // NOLINT
6065 void SetHeader(GLsizei count) {
6066 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6069 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
6070 SetHeader(_count);
6071 target = _target;
6072 count = _count;
6073 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
6076 void* Set(void* cmd,
6077 GLenum _target,
6078 GLsizei _count,
6079 const GLenum* _attachments) {
6080 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
6081 const uint32_t size = ComputeSize(_count);
6082 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6085 gpu::CommandHeader header;
6086 uint32_t target;
6087 int32_t count;
6090 static_assert(sizeof(InvalidateFramebufferImmediate) == 12,
6091 "size of InvalidateFramebufferImmediate should be 12");
6092 static_assert(offsetof(InvalidateFramebufferImmediate, header) == 0,
6093 "offset of InvalidateFramebufferImmediate header should be 0");
6094 static_assert(offsetof(InvalidateFramebufferImmediate, target) == 4,
6095 "offset of InvalidateFramebufferImmediate target should be 4");
6096 static_assert(offsetof(InvalidateFramebufferImmediate, count) == 8,
6097 "offset of InvalidateFramebufferImmediate count should be 8");
6099 struct InvalidateSubFramebufferImmediate {
6100 typedef InvalidateSubFramebufferImmediate ValueType;
6101 static const CommandId kCmdId = kInvalidateSubFramebufferImmediate;
6102 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6103 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6105 static uint32_t ComputeDataSize(GLsizei count) {
6106 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
6109 static uint32_t ComputeSize(GLsizei count) {
6110 return static_cast<uint32_t>(sizeof(ValueType) +
6111 ComputeDataSize(count)); // NOLINT
6114 void SetHeader(GLsizei count) {
6115 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
6118 void Init(GLenum _target,
6119 GLsizei _count,
6120 const GLenum* _attachments,
6121 GLint _x,
6122 GLint _y,
6123 GLsizei _width,
6124 GLsizei _height) {
6125 SetHeader(_count);
6126 target = _target;
6127 count = _count;
6128 x = _x;
6129 y = _y;
6130 width = _width;
6131 height = _height;
6132 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
6135 void* Set(void* cmd,
6136 GLenum _target,
6137 GLsizei _count,
6138 const GLenum* _attachments,
6139 GLint _x,
6140 GLint _y,
6141 GLsizei _width,
6142 GLsizei _height) {
6143 static_cast<ValueType*>(cmd)
6144 ->Init(_target, _count, _attachments, _x, _y, _width, _height);
6145 const uint32_t size = ComputeSize(_count);
6146 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6149 gpu::CommandHeader header;
6150 uint32_t target;
6151 int32_t count;
6152 int32_t x;
6153 int32_t y;
6154 int32_t width;
6155 int32_t height;
6158 static_assert(sizeof(InvalidateSubFramebufferImmediate) == 28,
6159 "size of InvalidateSubFramebufferImmediate should be 28");
6160 static_assert(offsetof(InvalidateSubFramebufferImmediate, header) == 0,
6161 "offset of InvalidateSubFramebufferImmediate header should be 0");
6162 static_assert(offsetof(InvalidateSubFramebufferImmediate, target) == 4,
6163 "offset of InvalidateSubFramebufferImmediate target should be 4");
6164 static_assert(offsetof(InvalidateSubFramebufferImmediate, count) == 8,
6165 "offset of InvalidateSubFramebufferImmediate count should be 8");
6166 static_assert(offsetof(InvalidateSubFramebufferImmediate, x) == 12,
6167 "offset of InvalidateSubFramebufferImmediate x should be 12");
6168 static_assert(offsetof(InvalidateSubFramebufferImmediate, y) == 16,
6169 "offset of InvalidateSubFramebufferImmediate y should be 16");
6170 static_assert(offsetof(InvalidateSubFramebufferImmediate, width) == 20,
6171 "offset of InvalidateSubFramebufferImmediate width should be 20");
6172 static_assert(
6173 offsetof(InvalidateSubFramebufferImmediate, height) == 24,
6174 "offset of InvalidateSubFramebufferImmediate height should be 24");
6176 struct IsBuffer {
6177 typedef IsBuffer ValueType;
6178 static const CommandId kCmdId = kIsBuffer;
6179 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6180 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6182 typedef uint32_t Result;
6184 static uint32_t ComputeSize() {
6185 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6188 void SetHeader() { header.SetCmd<ValueType>(); }
6190 void Init(GLuint _buffer,
6191 uint32_t _result_shm_id,
6192 uint32_t _result_shm_offset) {
6193 SetHeader();
6194 buffer = _buffer;
6195 result_shm_id = _result_shm_id;
6196 result_shm_offset = _result_shm_offset;
6199 void* Set(void* cmd,
6200 GLuint _buffer,
6201 uint32_t _result_shm_id,
6202 uint32_t _result_shm_offset) {
6203 static_cast<ValueType*>(cmd)
6204 ->Init(_buffer, _result_shm_id, _result_shm_offset);
6205 return NextCmdAddress<ValueType>(cmd);
6208 gpu::CommandHeader header;
6209 uint32_t buffer;
6210 uint32_t result_shm_id;
6211 uint32_t result_shm_offset;
6214 static_assert(sizeof(IsBuffer) == 16, "size of IsBuffer should be 16");
6215 static_assert(offsetof(IsBuffer, header) == 0,
6216 "offset of IsBuffer header should be 0");
6217 static_assert(offsetof(IsBuffer, buffer) == 4,
6218 "offset of IsBuffer buffer should be 4");
6219 static_assert(offsetof(IsBuffer, result_shm_id) == 8,
6220 "offset of IsBuffer result_shm_id should be 8");
6221 static_assert(offsetof(IsBuffer, result_shm_offset) == 12,
6222 "offset of IsBuffer result_shm_offset should be 12");
6224 struct IsEnabled {
6225 typedef IsEnabled ValueType;
6226 static const CommandId kCmdId = kIsEnabled;
6227 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6228 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6230 typedef uint32_t Result;
6232 static uint32_t ComputeSize() {
6233 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6236 void SetHeader() { header.SetCmd<ValueType>(); }
6238 void Init(GLenum _cap, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
6239 SetHeader();
6240 cap = _cap;
6241 result_shm_id = _result_shm_id;
6242 result_shm_offset = _result_shm_offset;
6245 void* Set(void* cmd,
6246 GLenum _cap,
6247 uint32_t _result_shm_id,
6248 uint32_t _result_shm_offset) {
6249 static_cast<ValueType*>(cmd)
6250 ->Init(_cap, _result_shm_id, _result_shm_offset);
6251 return NextCmdAddress<ValueType>(cmd);
6254 gpu::CommandHeader header;
6255 uint32_t cap;
6256 uint32_t result_shm_id;
6257 uint32_t result_shm_offset;
6260 static_assert(sizeof(IsEnabled) == 16, "size of IsEnabled should be 16");
6261 static_assert(offsetof(IsEnabled, header) == 0,
6262 "offset of IsEnabled header should be 0");
6263 static_assert(offsetof(IsEnabled, cap) == 4,
6264 "offset of IsEnabled cap should be 4");
6265 static_assert(offsetof(IsEnabled, result_shm_id) == 8,
6266 "offset of IsEnabled result_shm_id should be 8");
6267 static_assert(offsetof(IsEnabled, result_shm_offset) == 12,
6268 "offset of IsEnabled result_shm_offset should be 12");
6270 struct IsFramebuffer {
6271 typedef IsFramebuffer ValueType;
6272 static const CommandId kCmdId = kIsFramebuffer;
6273 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6274 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6276 typedef uint32_t Result;
6278 static uint32_t ComputeSize() {
6279 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6282 void SetHeader() { header.SetCmd<ValueType>(); }
6284 void Init(GLuint _framebuffer,
6285 uint32_t _result_shm_id,
6286 uint32_t _result_shm_offset) {
6287 SetHeader();
6288 framebuffer = _framebuffer;
6289 result_shm_id = _result_shm_id;
6290 result_shm_offset = _result_shm_offset;
6293 void* Set(void* cmd,
6294 GLuint _framebuffer,
6295 uint32_t _result_shm_id,
6296 uint32_t _result_shm_offset) {
6297 static_cast<ValueType*>(cmd)
6298 ->Init(_framebuffer, _result_shm_id, _result_shm_offset);
6299 return NextCmdAddress<ValueType>(cmd);
6302 gpu::CommandHeader header;
6303 uint32_t framebuffer;
6304 uint32_t result_shm_id;
6305 uint32_t result_shm_offset;
6308 static_assert(sizeof(IsFramebuffer) == 16,
6309 "size of IsFramebuffer should be 16");
6310 static_assert(offsetof(IsFramebuffer, header) == 0,
6311 "offset of IsFramebuffer header should be 0");
6312 static_assert(offsetof(IsFramebuffer, framebuffer) == 4,
6313 "offset of IsFramebuffer framebuffer should be 4");
6314 static_assert(offsetof(IsFramebuffer, result_shm_id) == 8,
6315 "offset of IsFramebuffer result_shm_id should be 8");
6316 static_assert(offsetof(IsFramebuffer, result_shm_offset) == 12,
6317 "offset of IsFramebuffer result_shm_offset should be 12");
6319 struct IsProgram {
6320 typedef IsProgram ValueType;
6321 static const CommandId kCmdId = kIsProgram;
6322 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6323 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6325 typedef uint32_t Result;
6327 static uint32_t ComputeSize() {
6328 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6331 void SetHeader() { header.SetCmd<ValueType>(); }
6333 void Init(GLuint _program,
6334 uint32_t _result_shm_id,
6335 uint32_t _result_shm_offset) {
6336 SetHeader();
6337 program = _program;
6338 result_shm_id = _result_shm_id;
6339 result_shm_offset = _result_shm_offset;
6342 void* Set(void* cmd,
6343 GLuint _program,
6344 uint32_t _result_shm_id,
6345 uint32_t _result_shm_offset) {
6346 static_cast<ValueType*>(cmd)
6347 ->Init(_program, _result_shm_id, _result_shm_offset);
6348 return NextCmdAddress<ValueType>(cmd);
6351 gpu::CommandHeader header;
6352 uint32_t program;
6353 uint32_t result_shm_id;
6354 uint32_t result_shm_offset;
6357 static_assert(sizeof(IsProgram) == 16, "size of IsProgram should be 16");
6358 static_assert(offsetof(IsProgram, header) == 0,
6359 "offset of IsProgram header should be 0");
6360 static_assert(offsetof(IsProgram, program) == 4,
6361 "offset of IsProgram program should be 4");
6362 static_assert(offsetof(IsProgram, result_shm_id) == 8,
6363 "offset of IsProgram result_shm_id should be 8");
6364 static_assert(offsetof(IsProgram, result_shm_offset) == 12,
6365 "offset of IsProgram result_shm_offset should be 12");
6367 struct IsRenderbuffer {
6368 typedef IsRenderbuffer ValueType;
6369 static const CommandId kCmdId = kIsRenderbuffer;
6370 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6371 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6373 typedef uint32_t Result;
6375 static uint32_t ComputeSize() {
6376 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6379 void SetHeader() { header.SetCmd<ValueType>(); }
6381 void Init(GLuint _renderbuffer,
6382 uint32_t _result_shm_id,
6383 uint32_t _result_shm_offset) {
6384 SetHeader();
6385 renderbuffer = _renderbuffer;
6386 result_shm_id = _result_shm_id;
6387 result_shm_offset = _result_shm_offset;
6390 void* Set(void* cmd,
6391 GLuint _renderbuffer,
6392 uint32_t _result_shm_id,
6393 uint32_t _result_shm_offset) {
6394 static_cast<ValueType*>(cmd)
6395 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
6396 return NextCmdAddress<ValueType>(cmd);
6399 gpu::CommandHeader header;
6400 uint32_t renderbuffer;
6401 uint32_t result_shm_id;
6402 uint32_t result_shm_offset;
6405 static_assert(sizeof(IsRenderbuffer) == 16,
6406 "size of IsRenderbuffer should be 16");
6407 static_assert(offsetof(IsRenderbuffer, header) == 0,
6408 "offset of IsRenderbuffer header should be 0");
6409 static_assert(offsetof(IsRenderbuffer, renderbuffer) == 4,
6410 "offset of IsRenderbuffer renderbuffer should be 4");
6411 static_assert(offsetof(IsRenderbuffer, result_shm_id) == 8,
6412 "offset of IsRenderbuffer result_shm_id should be 8");
6413 static_assert(offsetof(IsRenderbuffer, result_shm_offset) == 12,
6414 "offset of IsRenderbuffer result_shm_offset should be 12");
6416 struct IsSampler {
6417 typedef IsSampler ValueType;
6418 static const CommandId kCmdId = kIsSampler;
6419 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6420 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6422 typedef uint32_t Result;
6424 static uint32_t ComputeSize() {
6425 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6428 void SetHeader() { header.SetCmd<ValueType>(); }
6430 void Init(GLuint _sampler,
6431 uint32_t _result_shm_id,
6432 uint32_t _result_shm_offset) {
6433 SetHeader();
6434 sampler = _sampler;
6435 result_shm_id = _result_shm_id;
6436 result_shm_offset = _result_shm_offset;
6439 void* Set(void* cmd,
6440 GLuint _sampler,
6441 uint32_t _result_shm_id,
6442 uint32_t _result_shm_offset) {
6443 static_cast<ValueType*>(cmd)
6444 ->Init(_sampler, _result_shm_id, _result_shm_offset);
6445 return NextCmdAddress<ValueType>(cmd);
6448 gpu::CommandHeader header;
6449 uint32_t sampler;
6450 uint32_t result_shm_id;
6451 uint32_t result_shm_offset;
6454 static_assert(sizeof(IsSampler) == 16, "size of IsSampler should be 16");
6455 static_assert(offsetof(IsSampler, header) == 0,
6456 "offset of IsSampler header should be 0");
6457 static_assert(offsetof(IsSampler, sampler) == 4,
6458 "offset of IsSampler sampler should be 4");
6459 static_assert(offsetof(IsSampler, result_shm_id) == 8,
6460 "offset of IsSampler result_shm_id should be 8");
6461 static_assert(offsetof(IsSampler, result_shm_offset) == 12,
6462 "offset of IsSampler result_shm_offset should be 12");
6464 struct IsShader {
6465 typedef IsShader ValueType;
6466 static const CommandId kCmdId = kIsShader;
6467 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6468 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6470 typedef uint32_t Result;
6472 static uint32_t ComputeSize() {
6473 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6476 void SetHeader() { header.SetCmd<ValueType>(); }
6478 void Init(GLuint _shader,
6479 uint32_t _result_shm_id,
6480 uint32_t _result_shm_offset) {
6481 SetHeader();
6482 shader = _shader;
6483 result_shm_id = _result_shm_id;
6484 result_shm_offset = _result_shm_offset;
6487 void* Set(void* cmd,
6488 GLuint _shader,
6489 uint32_t _result_shm_id,
6490 uint32_t _result_shm_offset) {
6491 static_cast<ValueType*>(cmd)
6492 ->Init(_shader, _result_shm_id, _result_shm_offset);
6493 return NextCmdAddress<ValueType>(cmd);
6496 gpu::CommandHeader header;
6497 uint32_t shader;
6498 uint32_t result_shm_id;
6499 uint32_t result_shm_offset;
6502 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16");
6503 static_assert(offsetof(IsShader, header) == 0,
6504 "offset of IsShader header should be 0");
6505 static_assert(offsetof(IsShader, shader) == 4,
6506 "offset of IsShader shader should be 4");
6507 static_assert(offsetof(IsShader, result_shm_id) == 8,
6508 "offset of IsShader result_shm_id should be 8");
6509 static_assert(offsetof(IsShader, result_shm_offset) == 12,
6510 "offset of IsShader result_shm_offset should be 12");
6512 struct IsSync {
6513 typedef IsSync ValueType;
6514 static const CommandId kCmdId = kIsSync;
6515 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6516 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6518 typedef uint32_t Result;
6520 static uint32_t ComputeSize() {
6521 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6524 void SetHeader() { header.SetCmd<ValueType>(); }
6526 void Init(GLuint _sync,
6527 uint32_t _result_shm_id,
6528 uint32_t _result_shm_offset) {
6529 SetHeader();
6530 sync = _sync;
6531 result_shm_id = _result_shm_id;
6532 result_shm_offset = _result_shm_offset;
6535 void* Set(void* cmd,
6536 GLuint _sync,
6537 uint32_t _result_shm_id,
6538 uint32_t _result_shm_offset) {
6539 static_cast<ValueType*>(cmd)
6540 ->Init(_sync, _result_shm_id, _result_shm_offset);
6541 return NextCmdAddress<ValueType>(cmd);
6544 gpu::CommandHeader header;
6545 uint32_t sync;
6546 uint32_t result_shm_id;
6547 uint32_t result_shm_offset;
6550 static_assert(sizeof(IsSync) == 16, "size of IsSync should be 16");
6551 static_assert(offsetof(IsSync, header) == 0,
6552 "offset of IsSync header should be 0");
6553 static_assert(offsetof(IsSync, sync) == 4, "offset of IsSync sync should be 4");
6554 static_assert(offsetof(IsSync, result_shm_id) == 8,
6555 "offset of IsSync result_shm_id should be 8");
6556 static_assert(offsetof(IsSync, result_shm_offset) == 12,
6557 "offset of IsSync result_shm_offset should be 12");
6559 struct IsTexture {
6560 typedef IsTexture ValueType;
6561 static const CommandId kCmdId = kIsTexture;
6562 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6563 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6565 typedef uint32_t Result;
6567 static uint32_t ComputeSize() {
6568 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6571 void SetHeader() { header.SetCmd<ValueType>(); }
6573 void Init(GLuint _texture,
6574 uint32_t _result_shm_id,
6575 uint32_t _result_shm_offset) {
6576 SetHeader();
6577 texture = _texture;
6578 result_shm_id = _result_shm_id;
6579 result_shm_offset = _result_shm_offset;
6582 void* Set(void* cmd,
6583 GLuint _texture,
6584 uint32_t _result_shm_id,
6585 uint32_t _result_shm_offset) {
6586 static_cast<ValueType*>(cmd)
6587 ->Init(_texture, _result_shm_id, _result_shm_offset);
6588 return NextCmdAddress<ValueType>(cmd);
6591 gpu::CommandHeader header;
6592 uint32_t texture;
6593 uint32_t result_shm_id;
6594 uint32_t result_shm_offset;
6597 static_assert(sizeof(IsTexture) == 16, "size of IsTexture should be 16");
6598 static_assert(offsetof(IsTexture, header) == 0,
6599 "offset of IsTexture header should be 0");
6600 static_assert(offsetof(IsTexture, texture) == 4,
6601 "offset of IsTexture texture should be 4");
6602 static_assert(offsetof(IsTexture, result_shm_id) == 8,
6603 "offset of IsTexture result_shm_id should be 8");
6604 static_assert(offsetof(IsTexture, result_shm_offset) == 12,
6605 "offset of IsTexture result_shm_offset should be 12");
6607 struct IsTransformFeedback {
6608 typedef IsTransformFeedback ValueType;
6609 static const CommandId kCmdId = kIsTransformFeedback;
6610 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6611 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6613 typedef uint32_t Result;
6615 static uint32_t ComputeSize() {
6616 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6619 void SetHeader() { header.SetCmd<ValueType>(); }
6621 void Init(GLuint _transformfeedback,
6622 uint32_t _result_shm_id,
6623 uint32_t _result_shm_offset) {
6624 SetHeader();
6625 transformfeedback = _transformfeedback;
6626 result_shm_id = _result_shm_id;
6627 result_shm_offset = _result_shm_offset;
6630 void* Set(void* cmd,
6631 GLuint _transformfeedback,
6632 uint32_t _result_shm_id,
6633 uint32_t _result_shm_offset) {
6634 static_cast<ValueType*>(cmd)
6635 ->Init(_transformfeedback, _result_shm_id, _result_shm_offset);
6636 return NextCmdAddress<ValueType>(cmd);
6639 gpu::CommandHeader header;
6640 uint32_t transformfeedback;
6641 uint32_t result_shm_id;
6642 uint32_t result_shm_offset;
6645 static_assert(sizeof(IsTransformFeedback) == 16,
6646 "size of IsTransformFeedback should be 16");
6647 static_assert(offsetof(IsTransformFeedback, header) == 0,
6648 "offset of IsTransformFeedback header should be 0");
6649 static_assert(offsetof(IsTransformFeedback, transformfeedback) == 4,
6650 "offset of IsTransformFeedback transformfeedback should be 4");
6651 static_assert(offsetof(IsTransformFeedback, result_shm_id) == 8,
6652 "offset of IsTransformFeedback result_shm_id should be 8");
6653 static_assert(offsetof(IsTransformFeedback, result_shm_offset) == 12,
6654 "offset of IsTransformFeedback result_shm_offset should be 12");
6656 struct LineWidth {
6657 typedef LineWidth ValueType;
6658 static const CommandId kCmdId = kLineWidth;
6659 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6660 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6662 static uint32_t ComputeSize() {
6663 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6666 void SetHeader() { header.SetCmd<ValueType>(); }
6668 void Init(GLfloat _width) {
6669 SetHeader();
6670 width = _width;
6673 void* Set(void* cmd, GLfloat _width) {
6674 static_cast<ValueType*>(cmd)->Init(_width);
6675 return NextCmdAddress<ValueType>(cmd);
6678 gpu::CommandHeader header;
6679 float width;
6682 static_assert(sizeof(LineWidth) == 8, "size of LineWidth should be 8");
6683 static_assert(offsetof(LineWidth, header) == 0,
6684 "offset of LineWidth header should be 0");
6685 static_assert(offsetof(LineWidth, width) == 4,
6686 "offset of LineWidth width should be 4");
6688 struct LinkProgram {
6689 typedef LinkProgram ValueType;
6690 static const CommandId kCmdId = kLinkProgram;
6691 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6692 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6694 static uint32_t ComputeSize() {
6695 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6698 void SetHeader() { header.SetCmd<ValueType>(); }
6700 void Init(GLuint _program) {
6701 SetHeader();
6702 program = _program;
6705 void* Set(void* cmd, GLuint _program) {
6706 static_cast<ValueType*>(cmd)->Init(_program);
6707 return NextCmdAddress<ValueType>(cmd);
6710 gpu::CommandHeader header;
6711 uint32_t program;
6714 static_assert(sizeof(LinkProgram) == 8, "size of LinkProgram should be 8");
6715 static_assert(offsetof(LinkProgram, header) == 0,
6716 "offset of LinkProgram header should be 0");
6717 static_assert(offsetof(LinkProgram, program) == 4,
6718 "offset of LinkProgram program should be 4");
6720 struct PauseTransformFeedback {
6721 typedef PauseTransformFeedback ValueType;
6722 static const CommandId kCmdId = kPauseTransformFeedback;
6723 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6724 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6726 static uint32_t ComputeSize() {
6727 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6730 void SetHeader() { header.SetCmd<ValueType>(); }
6732 void Init() { SetHeader(); }
6734 void* Set(void* cmd) {
6735 static_cast<ValueType*>(cmd)->Init();
6736 return NextCmdAddress<ValueType>(cmd);
6739 gpu::CommandHeader header;
6742 static_assert(sizeof(PauseTransformFeedback) == 4,
6743 "size of PauseTransformFeedback should be 4");
6744 static_assert(offsetof(PauseTransformFeedback, header) == 0,
6745 "offset of PauseTransformFeedback header should be 0");
6747 struct PixelStorei {
6748 typedef PixelStorei ValueType;
6749 static const CommandId kCmdId = kPixelStorei;
6750 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6751 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6753 static uint32_t ComputeSize() {
6754 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6757 void SetHeader() { header.SetCmd<ValueType>(); }
6759 void Init(GLenum _pname, GLint _param) {
6760 SetHeader();
6761 pname = _pname;
6762 param = _param;
6765 void* Set(void* cmd, GLenum _pname, GLint _param) {
6766 static_cast<ValueType*>(cmd)->Init(_pname, _param);
6767 return NextCmdAddress<ValueType>(cmd);
6770 gpu::CommandHeader header;
6771 uint32_t pname;
6772 int32_t param;
6775 static_assert(sizeof(PixelStorei) == 12, "size of PixelStorei should be 12");
6776 static_assert(offsetof(PixelStorei, header) == 0,
6777 "offset of PixelStorei header should be 0");
6778 static_assert(offsetof(PixelStorei, pname) == 4,
6779 "offset of PixelStorei pname should be 4");
6780 static_assert(offsetof(PixelStorei, param) == 8,
6781 "offset of PixelStorei param should be 8");
6783 struct PolygonOffset {
6784 typedef PolygonOffset ValueType;
6785 static const CommandId kCmdId = kPolygonOffset;
6786 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6787 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6789 static uint32_t ComputeSize() {
6790 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6793 void SetHeader() { header.SetCmd<ValueType>(); }
6795 void Init(GLfloat _factor, GLfloat _units) {
6796 SetHeader();
6797 factor = _factor;
6798 units = _units;
6801 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
6802 static_cast<ValueType*>(cmd)->Init(_factor, _units);
6803 return NextCmdAddress<ValueType>(cmd);
6806 gpu::CommandHeader header;
6807 float factor;
6808 float units;
6811 static_assert(sizeof(PolygonOffset) == 12,
6812 "size of PolygonOffset should be 12");
6813 static_assert(offsetof(PolygonOffset, header) == 0,
6814 "offset of PolygonOffset header should be 0");
6815 static_assert(offsetof(PolygonOffset, factor) == 4,
6816 "offset of PolygonOffset factor should be 4");
6817 static_assert(offsetof(PolygonOffset, units) == 8,
6818 "offset of PolygonOffset units should be 8");
6820 struct ReadBuffer {
6821 typedef ReadBuffer ValueType;
6822 static const CommandId kCmdId = kReadBuffer;
6823 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6824 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6826 static uint32_t ComputeSize() {
6827 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6830 void SetHeader() { header.SetCmd<ValueType>(); }
6832 void Init(GLenum _src) {
6833 SetHeader();
6834 src = _src;
6837 void* Set(void* cmd, GLenum _src) {
6838 static_cast<ValueType*>(cmd)->Init(_src);
6839 return NextCmdAddress<ValueType>(cmd);
6842 gpu::CommandHeader header;
6843 uint32_t src;
6846 static_assert(sizeof(ReadBuffer) == 8, "size of ReadBuffer should be 8");
6847 static_assert(offsetof(ReadBuffer, header) == 0,
6848 "offset of ReadBuffer header should be 0");
6849 static_assert(offsetof(ReadBuffer, src) == 4,
6850 "offset of ReadBuffer src should be 4");
6852 // ReadPixels has the result separated from the pixel buffer so that
6853 // it is easier to specify the result going to some specific place
6854 // that exactly fits the rectangle of pixels.
6855 struct ReadPixels {
6856 typedef ReadPixels ValueType;
6857 static const CommandId kCmdId = kReadPixels;
6858 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6859 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6861 typedef uint32_t Result;
6863 static uint32_t ComputeSize() {
6864 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6867 void SetHeader() { header.SetCmd<ValueType>(); }
6869 void Init(GLint _x,
6870 GLint _y,
6871 GLsizei _width,
6872 GLsizei _height,
6873 GLenum _format,
6874 GLenum _type,
6875 uint32_t _pixels_shm_id,
6876 uint32_t _pixels_shm_offset,
6877 uint32_t _result_shm_id,
6878 uint32_t _result_shm_offset,
6879 GLboolean _async) {
6880 SetHeader();
6881 x = _x;
6882 y = _y;
6883 width = _width;
6884 height = _height;
6885 format = _format;
6886 type = _type;
6887 pixels_shm_id = _pixels_shm_id;
6888 pixels_shm_offset = _pixels_shm_offset;
6889 result_shm_id = _result_shm_id;
6890 result_shm_offset = _result_shm_offset;
6891 async = _async;
6894 void* Set(void* cmd,
6895 GLint _x,
6896 GLint _y,
6897 GLsizei _width,
6898 GLsizei _height,
6899 GLenum _format,
6900 GLenum _type,
6901 uint32_t _pixels_shm_id,
6902 uint32_t _pixels_shm_offset,
6903 uint32_t _result_shm_id,
6904 uint32_t _result_shm_offset,
6905 GLboolean _async) {
6906 static_cast<ValueType*>(cmd)
6907 ->Init(_x, _y, _width, _height, _format, _type, _pixels_shm_id,
6908 _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
6909 return NextCmdAddress<ValueType>(cmd);
6912 gpu::CommandHeader header;
6913 int32_t x;
6914 int32_t y;
6915 int32_t width;
6916 int32_t height;
6917 uint32_t format;
6918 uint32_t type;
6919 uint32_t pixels_shm_id;
6920 uint32_t pixels_shm_offset;
6921 uint32_t result_shm_id;
6922 uint32_t result_shm_offset;
6923 uint32_t async;
6926 static_assert(sizeof(ReadPixels) == 48, "size of ReadPixels should be 48");
6927 static_assert(offsetof(ReadPixels, header) == 0,
6928 "offset of ReadPixels header should be 0");
6929 static_assert(offsetof(ReadPixels, x) == 4,
6930 "offset of ReadPixels x should be 4");
6931 static_assert(offsetof(ReadPixels, y) == 8,
6932 "offset of ReadPixels y should be 8");
6933 static_assert(offsetof(ReadPixels, width) == 12,
6934 "offset of ReadPixels width should be 12");
6935 static_assert(offsetof(ReadPixels, height) == 16,
6936 "offset of ReadPixels height should be 16");
6937 static_assert(offsetof(ReadPixels, format) == 20,
6938 "offset of ReadPixels format should be 20");
6939 static_assert(offsetof(ReadPixels, type) == 24,
6940 "offset of ReadPixels type should be 24");
6941 static_assert(offsetof(ReadPixels, pixels_shm_id) == 28,
6942 "offset of ReadPixels pixels_shm_id should be 28");
6943 static_assert(offsetof(ReadPixels, pixels_shm_offset) == 32,
6944 "offset of ReadPixels pixels_shm_offset should be 32");
6945 static_assert(offsetof(ReadPixels, result_shm_id) == 36,
6946 "offset of ReadPixels result_shm_id should be 36");
6947 static_assert(offsetof(ReadPixels, result_shm_offset) == 40,
6948 "offset of ReadPixels result_shm_offset should be 40");
6949 static_assert(offsetof(ReadPixels, async) == 44,
6950 "offset of ReadPixels async should be 44");
6952 struct ReleaseShaderCompiler {
6953 typedef ReleaseShaderCompiler ValueType;
6954 static const CommandId kCmdId = kReleaseShaderCompiler;
6955 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6956 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6958 static uint32_t ComputeSize() {
6959 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6962 void SetHeader() { header.SetCmd<ValueType>(); }
6964 void Init() { SetHeader(); }
6966 void* Set(void* cmd) {
6967 static_cast<ValueType*>(cmd)->Init();
6968 return NextCmdAddress<ValueType>(cmd);
6971 gpu::CommandHeader header;
6974 static_assert(sizeof(ReleaseShaderCompiler) == 4,
6975 "size of ReleaseShaderCompiler should be 4");
6976 static_assert(offsetof(ReleaseShaderCompiler, header) == 0,
6977 "offset of ReleaseShaderCompiler header should be 0");
6979 struct RenderbufferStorage {
6980 typedef RenderbufferStorage ValueType;
6981 static const CommandId kCmdId = kRenderbufferStorage;
6982 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6983 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6985 static uint32_t ComputeSize() {
6986 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6989 void SetHeader() { header.SetCmd<ValueType>(); }
6991 void Init(GLenum _target,
6992 GLenum _internalformat,
6993 GLsizei _width,
6994 GLsizei _height) {
6995 SetHeader();
6996 target = _target;
6997 internalformat = _internalformat;
6998 width = _width;
6999 height = _height;
7002 void* Set(void* cmd,
7003 GLenum _target,
7004 GLenum _internalformat,
7005 GLsizei _width,
7006 GLsizei _height) {
7007 static_cast<ValueType*>(cmd)
7008 ->Init(_target, _internalformat, _width, _height);
7009 return NextCmdAddress<ValueType>(cmd);
7012 gpu::CommandHeader header;
7013 uint32_t target;
7014 uint32_t internalformat;
7015 int32_t width;
7016 int32_t height;
7019 static_assert(sizeof(RenderbufferStorage) == 20,
7020 "size of RenderbufferStorage should be 20");
7021 static_assert(offsetof(RenderbufferStorage, header) == 0,
7022 "offset of RenderbufferStorage header should be 0");
7023 static_assert(offsetof(RenderbufferStorage, target) == 4,
7024 "offset of RenderbufferStorage target should be 4");
7025 static_assert(offsetof(RenderbufferStorage, internalformat) == 8,
7026 "offset of RenderbufferStorage internalformat should be 8");
7027 static_assert(offsetof(RenderbufferStorage, width) == 12,
7028 "offset of RenderbufferStorage width should be 12");
7029 static_assert(offsetof(RenderbufferStorage, height) == 16,
7030 "offset of RenderbufferStorage height should be 16");
7032 struct ResumeTransformFeedback {
7033 typedef ResumeTransformFeedback ValueType;
7034 static const CommandId kCmdId = kResumeTransformFeedback;
7035 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7036 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7038 static uint32_t ComputeSize() {
7039 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7042 void SetHeader() { header.SetCmd<ValueType>(); }
7044 void Init() { SetHeader(); }
7046 void* Set(void* cmd) {
7047 static_cast<ValueType*>(cmd)->Init();
7048 return NextCmdAddress<ValueType>(cmd);
7051 gpu::CommandHeader header;
7054 static_assert(sizeof(ResumeTransformFeedback) == 4,
7055 "size of ResumeTransformFeedback should be 4");
7056 static_assert(offsetof(ResumeTransformFeedback, header) == 0,
7057 "offset of ResumeTransformFeedback header should be 0");
7059 struct SampleCoverage {
7060 typedef SampleCoverage ValueType;
7061 static const CommandId kCmdId = kSampleCoverage;
7062 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7063 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7065 static uint32_t ComputeSize() {
7066 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7069 void SetHeader() { header.SetCmd<ValueType>(); }
7071 void Init(GLclampf _value, GLboolean _invert) {
7072 SetHeader();
7073 value = _value;
7074 invert = _invert;
7077 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
7078 static_cast<ValueType*>(cmd)->Init(_value, _invert);
7079 return NextCmdAddress<ValueType>(cmd);
7082 gpu::CommandHeader header;
7083 float value;
7084 uint32_t invert;
7087 static_assert(sizeof(SampleCoverage) == 12,
7088 "size of SampleCoverage should be 12");
7089 static_assert(offsetof(SampleCoverage, header) == 0,
7090 "offset of SampleCoverage header should be 0");
7091 static_assert(offsetof(SampleCoverage, value) == 4,
7092 "offset of SampleCoverage value should be 4");
7093 static_assert(offsetof(SampleCoverage, invert) == 8,
7094 "offset of SampleCoverage invert should be 8");
7096 struct SamplerParameterf {
7097 typedef SamplerParameterf ValueType;
7098 static const CommandId kCmdId = kSamplerParameterf;
7099 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7100 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7102 static uint32_t ComputeSize() {
7103 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7106 void SetHeader() { header.SetCmd<ValueType>(); }
7108 void Init(GLuint _sampler, GLenum _pname, GLfloat _param) {
7109 SetHeader();
7110 sampler = _sampler;
7111 pname = _pname;
7112 param = _param;
7115 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLfloat _param) {
7116 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
7117 return NextCmdAddress<ValueType>(cmd);
7120 gpu::CommandHeader header;
7121 uint32_t sampler;
7122 uint32_t pname;
7123 float param;
7126 static_assert(sizeof(SamplerParameterf) == 16,
7127 "size of SamplerParameterf should be 16");
7128 static_assert(offsetof(SamplerParameterf, header) == 0,
7129 "offset of SamplerParameterf header should be 0");
7130 static_assert(offsetof(SamplerParameterf, sampler) == 4,
7131 "offset of SamplerParameterf sampler should be 4");
7132 static_assert(offsetof(SamplerParameterf, pname) == 8,
7133 "offset of SamplerParameterf pname should be 8");
7134 static_assert(offsetof(SamplerParameterf, param) == 12,
7135 "offset of SamplerParameterf param should be 12");
7137 struct SamplerParameterfvImmediate {
7138 typedef SamplerParameterfvImmediate ValueType;
7139 static const CommandId kCmdId = kSamplerParameterfvImmediate;
7140 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7141 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7143 static uint32_t ComputeDataSize() {
7144 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
7147 static uint32_t ComputeSize() {
7148 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7151 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7153 void Init(GLuint _sampler, GLenum _pname, const GLfloat* _params) {
7154 SetHeader();
7155 sampler = _sampler;
7156 pname = _pname;
7157 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7160 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLfloat* _params) {
7161 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
7162 const uint32_t size = ComputeSize();
7163 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7166 gpu::CommandHeader header;
7167 uint32_t sampler;
7168 uint32_t pname;
7171 static_assert(sizeof(SamplerParameterfvImmediate) == 12,
7172 "size of SamplerParameterfvImmediate should be 12");
7173 static_assert(offsetof(SamplerParameterfvImmediate, header) == 0,
7174 "offset of SamplerParameterfvImmediate header should be 0");
7175 static_assert(offsetof(SamplerParameterfvImmediate, sampler) == 4,
7176 "offset of SamplerParameterfvImmediate sampler should be 4");
7177 static_assert(offsetof(SamplerParameterfvImmediate, pname) == 8,
7178 "offset of SamplerParameterfvImmediate pname should be 8");
7180 struct SamplerParameteri {
7181 typedef SamplerParameteri ValueType;
7182 static const CommandId kCmdId = kSamplerParameteri;
7183 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7184 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7186 static uint32_t ComputeSize() {
7187 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7190 void SetHeader() { header.SetCmd<ValueType>(); }
7192 void Init(GLuint _sampler, GLenum _pname, GLint _param) {
7193 SetHeader();
7194 sampler = _sampler;
7195 pname = _pname;
7196 param = _param;
7199 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLint _param) {
7200 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
7201 return NextCmdAddress<ValueType>(cmd);
7204 gpu::CommandHeader header;
7205 uint32_t sampler;
7206 uint32_t pname;
7207 int32_t param;
7210 static_assert(sizeof(SamplerParameteri) == 16,
7211 "size of SamplerParameteri should be 16");
7212 static_assert(offsetof(SamplerParameteri, header) == 0,
7213 "offset of SamplerParameteri header should be 0");
7214 static_assert(offsetof(SamplerParameteri, sampler) == 4,
7215 "offset of SamplerParameteri sampler should be 4");
7216 static_assert(offsetof(SamplerParameteri, pname) == 8,
7217 "offset of SamplerParameteri pname should be 8");
7218 static_assert(offsetof(SamplerParameteri, param) == 12,
7219 "offset of SamplerParameteri param should be 12");
7221 struct SamplerParameterivImmediate {
7222 typedef SamplerParameterivImmediate ValueType;
7223 static const CommandId kCmdId = kSamplerParameterivImmediate;
7224 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7225 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7227 static uint32_t ComputeDataSize() {
7228 return static_cast<uint32_t>(sizeof(GLint) * 1);
7231 static uint32_t ComputeSize() {
7232 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7235 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7237 void Init(GLuint _sampler, GLenum _pname, const GLint* _params) {
7238 SetHeader();
7239 sampler = _sampler;
7240 pname = _pname;
7241 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7244 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLint* _params) {
7245 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
7246 const uint32_t size = ComputeSize();
7247 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7250 gpu::CommandHeader header;
7251 uint32_t sampler;
7252 uint32_t pname;
7255 static_assert(sizeof(SamplerParameterivImmediate) == 12,
7256 "size of SamplerParameterivImmediate should be 12");
7257 static_assert(offsetof(SamplerParameterivImmediate, header) == 0,
7258 "offset of SamplerParameterivImmediate header should be 0");
7259 static_assert(offsetof(SamplerParameterivImmediate, sampler) == 4,
7260 "offset of SamplerParameterivImmediate sampler should be 4");
7261 static_assert(offsetof(SamplerParameterivImmediate, pname) == 8,
7262 "offset of SamplerParameterivImmediate pname should be 8");
7264 struct Scissor {
7265 typedef Scissor ValueType;
7266 static const CommandId kCmdId = kScissor;
7267 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7268 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7270 static uint32_t ComputeSize() {
7271 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7274 void SetHeader() { header.SetCmd<ValueType>(); }
7276 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7277 SetHeader();
7278 x = _x;
7279 y = _y;
7280 width = _width;
7281 height = _height;
7284 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
7285 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
7286 return NextCmdAddress<ValueType>(cmd);
7289 gpu::CommandHeader header;
7290 int32_t x;
7291 int32_t y;
7292 int32_t width;
7293 int32_t height;
7296 static_assert(sizeof(Scissor) == 20, "size of Scissor should be 20");
7297 static_assert(offsetof(Scissor, header) == 0,
7298 "offset of Scissor header should be 0");
7299 static_assert(offsetof(Scissor, x) == 4, "offset of Scissor x should be 4");
7300 static_assert(offsetof(Scissor, y) == 8, "offset of Scissor y should be 8");
7301 static_assert(offsetof(Scissor, width) == 12,
7302 "offset of Scissor width should be 12");
7303 static_assert(offsetof(Scissor, height) == 16,
7304 "offset of Scissor height should be 16");
7306 struct ShaderBinary {
7307 typedef ShaderBinary ValueType;
7308 static const CommandId kCmdId = kShaderBinary;
7309 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7310 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7312 static uint32_t ComputeSize() {
7313 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7316 void SetHeader() { header.SetCmd<ValueType>(); }
7318 void Init(GLsizei _n,
7319 uint32_t _shaders_shm_id,
7320 uint32_t _shaders_shm_offset,
7321 GLenum _binaryformat,
7322 uint32_t _binary_shm_id,
7323 uint32_t _binary_shm_offset,
7324 GLsizei _length) {
7325 SetHeader();
7326 n = _n;
7327 shaders_shm_id = _shaders_shm_id;
7328 shaders_shm_offset = _shaders_shm_offset;
7329 binaryformat = _binaryformat;
7330 binary_shm_id = _binary_shm_id;
7331 binary_shm_offset = _binary_shm_offset;
7332 length = _length;
7335 void* Set(void* cmd,
7336 GLsizei _n,
7337 uint32_t _shaders_shm_id,
7338 uint32_t _shaders_shm_offset,
7339 GLenum _binaryformat,
7340 uint32_t _binary_shm_id,
7341 uint32_t _binary_shm_offset,
7342 GLsizei _length) {
7343 static_cast<ValueType*>(cmd)->Init(_n, _shaders_shm_id, _shaders_shm_offset,
7344 _binaryformat, _binary_shm_id,
7345 _binary_shm_offset, _length);
7346 return NextCmdAddress<ValueType>(cmd);
7349 gpu::CommandHeader header;
7350 int32_t n;
7351 uint32_t shaders_shm_id;
7352 uint32_t shaders_shm_offset;
7353 uint32_t binaryformat;
7354 uint32_t binary_shm_id;
7355 uint32_t binary_shm_offset;
7356 int32_t length;
7359 static_assert(sizeof(ShaderBinary) == 32, "size of ShaderBinary should be 32");
7360 static_assert(offsetof(ShaderBinary, header) == 0,
7361 "offset of ShaderBinary header should be 0");
7362 static_assert(offsetof(ShaderBinary, n) == 4,
7363 "offset of ShaderBinary n should be 4");
7364 static_assert(offsetof(ShaderBinary, shaders_shm_id) == 8,
7365 "offset of ShaderBinary shaders_shm_id should be 8");
7366 static_assert(offsetof(ShaderBinary, shaders_shm_offset) == 12,
7367 "offset of ShaderBinary shaders_shm_offset should be 12");
7368 static_assert(offsetof(ShaderBinary, binaryformat) == 16,
7369 "offset of ShaderBinary binaryformat should be 16");
7370 static_assert(offsetof(ShaderBinary, binary_shm_id) == 20,
7371 "offset of ShaderBinary binary_shm_id should be 20");
7372 static_assert(offsetof(ShaderBinary, binary_shm_offset) == 24,
7373 "offset of ShaderBinary binary_shm_offset should be 24");
7374 static_assert(offsetof(ShaderBinary, length) == 28,
7375 "offset of ShaderBinary length should be 28");
7377 struct ShaderSourceBucket {
7378 typedef ShaderSourceBucket ValueType;
7379 static const CommandId kCmdId = kShaderSourceBucket;
7380 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7381 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7383 static uint32_t ComputeSize() {
7384 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7387 void SetHeader() { header.SetCmd<ValueType>(); }
7389 void Init(GLuint _shader, uint32_t _str_bucket_id) {
7390 SetHeader();
7391 shader = _shader;
7392 str_bucket_id = _str_bucket_id;
7395 void* Set(void* cmd, GLuint _shader, uint32_t _str_bucket_id) {
7396 static_cast<ValueType*>(cmd)->Init(_shader, _str_bucket_id);
7397 return NextCmdAddress<ValueType>(cmd);
7400 gpu::CommandHeader header;
7401 uint32_t shader;
7402 uint32_t str_bucket_id;
7405 static_assert(sizeof(ShaderSourceBucket) == 12,
7406 "size of ShaderSourceBucket should be 12");
7407 static_assert(offsetof(ShaderSourceBucket, header) == 0,
7408 "offset of ShaderSourceBucket header should be 0");
7409 static_assert(offsetof(ShaderSourceBucket, shader) == 4,
7410 "offset of ShaderSourceBucket shader should be 4");
7411 static_assert(offsetof(ShaderSourceBucket, str_bucket_id) == 8,
7412 "offset of ShaderSourceBucket str_bucket_id should be 8");
7414 struct StencilFunc {
7415 typedef StencilFunc ValueType;
7416 static const CommandId kCmdId = kStencilFunc;
7417 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7418 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7420 static uint32_t ComputeSize() {
7421 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7424 void SetHeader() { header.SetCmd<ValueType>(); }
7426 void Init(GLenum _func, GLint _ref, GLuint _mask) {
7427 SetHeader();
7428 func = _func;
7429 ref = _ref;
7430 mask = _mask;
7433 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
7434 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
7435 return NextCmdAddress<ValueType>(cmd);
7438 gpu::CommandHeader header;
7439 uint32_t func;
7440 int32_t ref;
7441 uint32_t mask;
7444 static_assert(sizeof(StencilFunc) == 16, "size of StencilFunc should be 16");
7445 static_assert(offsetof(StencilFunc, header) == 0,
7446 "offset of StencilFunc header should be 0");
7447 static_assert(offsetof(StencilFunc, func) == 4,
7448 "offset of StencilFunc func should be 4");
7449 static_assert(offsetof(StencilFunc, ref) == 8,
7450 "offset of StencilFunc ref should be 8");
7451 static_assert(offsetof(StencilFunc, mask) == 12,
7452 "offset of StencilFunc mask should be 12");
7454 struct StencilFuncSeparate {
7455 typedef StencilFuncSeparate ValueType;
7456 static const CommandId kCmdId = kStencilFuncSeparate;
7457 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7458 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7460 static uint32_t ComputeSize() {
7461 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7464 void SetHeader() { header.SetCmd<ValueType>(); }
7466 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
7467 SetHeader();
7468 face = _face;
7469 func = _func;
7470 ref = _ref;
7471 mask = _mask;
7474 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
7475 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
7476 return NextCmdAddress<ValueType>(cmd);
7479 gpu::CommandHeader header;
7480 uint32_t face;
7481 uint32_t func;
7482 int32_t ref;
7483 uint32_t mask;
7486 static_assert(sizeof(StencilFuncSeparate) == 20,
7487 "size of StencilFuncSeparate should be 20");
7488 static_assert(offsetof(StencilFuncSeparate, header) == 0,
7489 "offset of StencilFuncSeparate header should be 0");
7490 static_assert(offsetof(StencilFuncSeparate, face) == 4,
7491 "offset of StencilFuncSeparate face should be 4");
7492 static_assert(offsetof(StencilFuncSeparate, func) == 8,
7493 "offset of StencilFuncSeparate func should be 8");
7494 static_assert(offsetof(StencilFuncSeparate, ref) == 12,
7495 "offset of StencilFuncSeparate ref should be 12");
7496 static_assert(offsetof(StencilFuncSeparate, mask) == 16,
7497 "offset of StencilFuncSeparate mask should be 16");
7499 struct StencilMask {
7500 typedef StencilMask ValueType;
7501 static const CommandId kCmdId = kStencilMask;
7502 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7503 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7505 static uint32_t ComputeSize() {
7506 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7509 void SetHeader() { header.SetCmd<ValueType>(); }
7511 void Init(GLuint _mask) {
7512 SetHeader();
7513 mask = _mask;
7516 void* Set(void* cmd, GLuint _mask) {
7517 static_cast<ValueType*>(cmd)->Init(_mask);
7518 return NextCmdAddress<ValueType>(cmd);
7521 gpu::CommandHeader header;
7522 uint32_t mask;
7525 static_assert(sizeof(StencilMask) == 8, "size of StencilMask should be 8");
7526 static_assert(offsetof(StencilMask, header) == 0,
7527 "offset of StencilMask header should be 0");
7528 static_assert(offsetof(StencilMask, mask) == 4,
7529 "offset of StencilMask mask should be 4");
7531 struct StencilMaskSeparate {
7532 typedef StencilMaskSeparate ValueType;
7533 static const CommandId kCmdId = kStencilMaskSeparate;
7534 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7535 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7537 static uint32_t ComputeSize() {
7538 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7541 void SetHeader() { header.SetCmd<ValueType>(); }
7543 void Init(GLenum _face, GLuint _mask) {
7544 SetHeader();
7545 face = _face;
7546 mask = _mask;
7549 void* Set(void* cmd, GLenum _face, GLuint _mask) {
7550 static_cast<ValueType*>(cmd)->Init(_face, _mask);
7551 return NextCmdAddress<ValueType>(cmd);
7554 gpu::CommandHeader header;
7555 uint32_t face;
7556 uint32_t mask;
7559 static_assert(sizeof(StencilMaskSeparate) == 12,
7560 "size of StencilMaskSeparate should be 12");
7561 static_assert(offsetof(StencilMaskSeparate, header) == 0,
7562 "offset of StencilMaskSeparate header should be 0");
7563 static_assert(offsetof(StencilMaskSeparate, face) == 4,
7564 "offset of StencilMaskSeparate face should be 4");
7565 static_assert(offsetof(StencilMaskSeparate, mask) == 8,
7566 "offset of StencilMaskSeparate mask should be 8");
7568 struct StencilOp {
7569 typedef StencilOp ValueType;
7570 static const CommandId kCmdId = kStencilOp;
7571 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7572 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7574 static uint32_t ComputeSize() {
7575 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7578 void SetHeader() { header.SetCmd<ValueType>(); }
7580 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
7581 SetHeader();
7582 fail = _fail;
7583 zfail = _zfail;
7584 zpass = _zpass;
7587 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
7588 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
7589 return NextCmdAddress<ValueType>(cmd);
7592 gpu::CommandHeader header;
7593 uint32_t fail;
7594 uint32_t zfail;
7595 uint32_t zpass;
7598 static_assert(sizeof(StencilOp) == 16, "size of StencilOp should be 16");
7599 static_assert(offsetof(StencilOp, header) == 0,
7600 "offset of StencilOp header should be 0");
7601 static_assert(offsetof(StencilOp, fail) == 4,
7602 "offset of StencilOp fail should be 4");
7603 static_assert(offsetof(StencilOp, zfail) == 8,
7604 "offset of StencilOp zfail should be 8");
7605 static_assert(offsetof(StencilOp, zpass) == 12,
7606 "offset of StencilOp zpass should be 12");
7608 struct StencilOpSeparate {
7609 typedef StencilOpSeparate ValueType;
7610 static const CommandId kCmdId = kStencilOpSeparate;
7611 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7612 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7614 static uint32_t ComputeSize() {
7615 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7618 void SetHeader() { header.SetCmd<ValueType>(); }
7620 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
7621 SetHeader();
7622 face = _face;
7623 fail = _fail;
7624 zfail = _zfail;
7625 zpass = _zpass;
7628 void* Set(void* cmd,
7629 GLenum _face,
7630 GLenum _fail,
7631 GLenum _zfail,
7632 GLenum _zpass) {
7633 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
7634 return NextCmdAddress<ValueType>(cmd);
7637 gpu::CommandHeader header;
7638 uint32_t face;
7639 uint32_t fail;
7640 uint32_t zfail;
7641 uint32_t zpass;
7644 static_assert(sizeof(StencilOpSeparate) == 20,
7645 "size of StencilOpSeparate should be 20");
7646 static_assert(offsetof(StencilOpSeparate, header) == 0,
7647 "offset of StencilOpSeparate header should be 0");
7648 static_assert(offsetof(StencilOpSeparate, face) == 4,
7649 "offset of StencilOpSeparate face should be 4");
7650 static_assert(offsetof(StencilOpSeparate, fail) == 8,
7651 "offset of StencilOpSeparate fail should be 8");
7652 static_assert(offsetof(StencilOpSeparate, zfail) == 12,
7653 "offset of StencilOpSeparate zfail should be 12");
7654 static_assert(offsetof(StencilOpSeparate, zpass) == 16,
7655 "offset of StencilOpSeparate zpass should be 16");
7657 struct TexImage2D {
7658 typedef TexImage2D ValueType;
7659 static const CommandId kCmdId = kTexImage2D;
7660 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7661 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7663 static uint32_t ComputeSize() {
7664 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7667 void SetHeader() { header.SetCmd<ValueType>(); }
7669 void Init(GLenum _target,
7670 GLint _level,
7671 GLint _internalformat,
7672 GLsizei _width,
7673 GLsizei _height,
7674 GLenum _format,
7675 GLenum _type,
7676 uint32_t _pixels_shm_id,
7677 uint32_t _pixels_shm_offset) {
7678 SetHeader();
7679 target = _target;
7680 level = _level;
7681 internalformat = _internalformat;
7682 width = _width;
7683 height = _height;
7684 format = _format;
7685 type = _type;
7686 pixels_shm_id = _pixels_shm_id;
7687 pixels_shm_offset = _pixels_shm_offset;
7690 void* Set(void* cmd,
7691 GLenum _target,
7692 GLint _level,
7693 GLint _internalformat,
7694 GLsizei _width,
7695 GLsizei _height,
7696 GLenum _format,
7697 GLenum _type,
7698 uint32_t _pixels_shm_id,
7699 uint32_t _pixels_shm_offset) {
7700 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
7701 _height, _format, _type, _pixels_shm_id,
7702 _pixels_shm_offset);
7703 return NextCmdAddress<ValueType>(cmd);
7706 gpu::CommandHeader header;
7707 uint32_t target;
7708 int32_t level;
7709 int32_t internalformat;
7710 int32_t width;
7711 int32_t height;
7712 uint32_t format;
7713 uint32_t type;
7714 uint32_t pixels_shm_id;
7715 uint32_t pixels_shm_offset;
7716 static const int32_t border = 0;
7719 static_assert(sizeof(TexImage2D) == 40, "size of TexImage2D should be 40");
7720 static_assert(offsetof(TexImage2D, header) == 0,
7721 "offset of TexImage2D header should be 0");
7722 static_assert(offsetof(TexImage2D, target) == 4,
7723 "offset of TexImage2D target should be 4");
7724 static_assert(offsetof(TexImage2D, level) == 8,
7725 "offset of TexImage2D level should be 8");
7726 static_assert(offsetof(TexImage2D, internalformat) == 12,
7727 "offset of TexImage2D internalformat should be 12");
7728 static_assert(offsetof(TexImage2D, width) == 16,
7729 "offset of TexImage2D width should be 16");
7730 static_assert(offsetof(TexImage2D, height) == 20,
7731 "offset of TexImage2D height should be 20");
7732 static_assert(offsetof(TexImage2D, format) == 24,
7733 "offset of TexImage2D format should be 24");
7734 static_assert(offsetof(TexImage2D, type) == 28,
7735 "offset of TexImage2D type should be 28");
7736 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32,
7737 "offset of TexImage2D pixels_shm_id should be 32");
7738 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36,
7739 "offset of TexImage2D pixels_shm_offset should be 36");
7741 struct TexImage3D {
7742 typedef TexImage3D ValueType;
7743 static const CommandId kCmdId = kTexImage3D;
7744 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7745 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7747 static uint32_t ComputeSize() {
7748 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7751 void SetHeader() { header.SetCmd<ValueType>(); }
7753 void Init(GLenum _target,
7754 GLint _level,
7755 GLint _internalformat,
7756 GLsizei _width,
7757 GLsizei _height,
7758 GLsizei _depth,
7759 GLenum _format,
7760 GLenum _type,
7761 uint32_t _pixels_shm_id,
7762 uint32_t _pixels_shm_offset) {
7763 SetHeader();
7764 target = _target;
7765 level = _level;
7766 internalformat = _internalformat;
7767 width = _width;
7768 height = _height;
7769 depth = _depth;
7770 format = _format;
7771 type = _type;
7772 pixels_shm_id = _pixels_shm_id;
7773 pixels_shm_offset = _pixels_shm_offset;
7776 void* Set(void* cmd,
7777 GLenum _target,
7778 GLint _level,
7779 GLint _internalformat,
7780 GLsizei _width,
7781 GLsizei _height,
7782 GLsizei _depth,
7783 GLenum _format,
7784 GLenum _type,
7785 uint32_t _pixels_shm_id,
7786 uint32_t _pixels_shm_offset) {
7787 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
7788 _height, _depth, _format, _type,
7789 _pixels_shm_id, _pixels_shm_offset);
7790 return NextCmdAddress<ValueType>(cmd);
7793 gpu::CommandHeader header;
7794 uint32_t target;
7795 int32_t level;
7796 int32_t internalformat;
7797 int32_t width;
7798 int32_t height;
7799 int32_t depth;
7800 uint32_t format;
7801 uint32_t type;
7802 uint32_t pixels_shm_id;
7803 uint32_t pixels_shm_offset;
7804 static const int32_t border = 0;
7807 static_assert(sizeof(TexImage3D) == 44, "size of TexImage3D should be 44");
7808 static_assert(offsetof(TexImage3D, header) == 0,
7809 "offset of TexImage3D header should be 0");
7810 static_assert(offsetof(TexImage3D, target) == 4,
7811 "offset of TexImage3D target should be 4");
7812 static_assert(offsetof(TexImage3D, level) == 8,
7813 "offset of TexImage3D level should be 8");
7814 static_assert(offsetof(TexImage3D, internalformat) == 12,
7815 "offset of TexImage3D internalformat should be 12");
7816 static_assert(offsetof(TexImage3D, width) == 16,
7817 "offset of TexImage3D width should be 16");
7818 static_assert(offsetof(TexImage3D, height) == 20,
7819 "offset of TexImage3D height should be 20");
7820 static_assert(offsetof(TexImage3D, depth) == 24,
7821 "offset of TexImage3D depth should be 24");
7822 static_assert(offsetof(TexImage3D, format) == 28,
7823 "offset of TexImage3D format should be 28");
7824 static_assert(offsetof(TexImage3D, type) == 32,
7825 "offset of TexImage3D type should be 32");
7826 static_assert(offsetof(TexImage3D, pixels_shm_id) == 36,
7827 "offset of TexImage3D pixels_shm_id should be 36");
7828 static_assert(offsetof(TexImage3D, pixels_shm_offset) == 40,
7829 "offset of TexImage3D pixels_shm_offset should be 40");
7831 struct TexParameterf {
7832 typedef TexParameterf ValueType;
7833 static const CommandId kCmdId = kTexParameterf;
7834 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7835 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7837 static uint32_t ComputeSize() {
7838 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7841 void SetHeader() { header.SetCmd<ValueType>(); }
7843 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
7844 SetHeader();
7845 target = _target;
7846 pname = _pname;
7847 param = _param;
7850 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
7851 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7852 return NextCmdAddress<ValueType>(cmd);
7855 gpu::CommandHeader header;
7856 uint32_t target;
7857 uint32_t pname;
7858 float param;
7861 static_assert(sizeof(TexParameterf) == 16,
7862 "size of TexParameterf should be 16");
7863 static_assert(offsetof(TexParameterf, header) == 0,
7864 "offset of TexParameterf header should be 0");
7865 static_assert(offsetof(TexParameterf, target) == 4,
7866 "offset of TexParameterf target should be 4");
7867 static_assert(offsetof(TexParameterf, pname) == 8,
7868 "offset of TexParameterf pname should be 8");
7869 static_assert(offsetof(TexParameterf, param) == 12,
7870 "offset of TexParameterf param should be 12");
7872 struct TexParameterfvImmediate {
7873 typedef TexParameterfvImmediate ValueType;
7874 static const CommandId kCmdId = kTexParameterfvImmediate;
7875 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7876 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7878 static uint32_t ComputeDataSize() {
7879 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
7882 static uint32_t ComputeSize() {
7883 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7886 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7888 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
7889 SetHeader();
7890 target = _target;
7891 pname = _pname;
7892 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7895 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
7896 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
7897 const uint32_t size = ComputeSize();
7898 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7901 gpu::CommandHeader header;
7902 uint32_t target;
7903 uint32_t pname;
7906 static_assert(sizeof(TexParameterfvImmediate) == 12,
7907 "size of TexParameterfvImmediate should be 12");
7908 static_assert(offsetof(TexParameterfvImmediate, header) == 0,
7909 "offset of TexParameterfvImmediate header should be 0");
7910 static_assert(offsetof(TexParameterfvImmediate, target) == 4,
7911 "offset of TexParameterfvImmediate target should be 4");
7912 static_assert(offsetof(TexParameterfvImmediate, pname) == 8,
7913 "offset of TexParameterfvImmediate pname should be 8");
7915 struct TexParameteri {
7916 typedef TexParameteri ValueType;
7917 static const CommandId kCmdId = kTexParameteri;
7918 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7919 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7921 static uint32_t ComputeSize() {
7922 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7925 void SetHeader() { header.SetCmd<ValueType>(); }
7927 void Init(GLenum _target, GLenum _pname, GLint _param) {
7928 SetHeader();
7929 target = _target;
7930 pname = _pname;
7931 param = _param;
7934 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
7935 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7936 return NextCmdAddress<ValueType>(cmd);
7939 gpu::CommandHeader header;
7940 uint32_t target;
7941 uint32_t pname;
7942 int32_t param;
7945 static_assert(sizeof(TexParameteri) == 16,
7946 "size of TexParameteri should be 16");
7947 static_assert(offsetof(TexParameteri, header) == 0,
7948 "offset of TexParameteri header should be 0");
7949 static_assert(offsetof(TexParameteri, target) == 4,
7950 "offset of TexParameteri target should be 4");
7951 static_assert(offsetof(TexParameteri, pname) == 8,
7952 "offset of TexParameteri pname should be 8");
7953 static_assert(offsetof(TexParameteri, param) == 12,
7954 "offset of TexParameteri param should be 12");
7956 struct TexParameterivImmediate {
7957 typedef TexParameterivImmediate ValueType;
7958 static const CommandId kCmdId = kTexParameterivImmediate;
7959 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7960 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7962 static uint32_t ComputeDataSize() {
7963 return static_cast<uint32_t>(sizeof(GLint) * 1);
7966 static uint32_t ComputeSize() {
7967 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7970 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7972 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
7973 SetHeader();
7974 target = _target;
7975 pname = _pname;
7976 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7979 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
7980 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
7981 const uint32_t size = ComputeSize();
7982 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7985 gpu::CommandHeader header;
7986 uint32_t target;
7987 uint32_t pname;
7990 static_assert(sizeof(TexParameterivImmediate) == 12,
7991 "size of TexParameterivImmediate should be 12");
7992 static_assert(offsetof(TexParameterivImmediate, header) == 0,
7993 "offset of TexParameterivImmediate header should be 0");
7994 static_assert(offsetof(TexParameterivImmediate, target) == 4,
7995 "offset of TexParameterivImmediate target should be 4");
7996 static_assert(offsetof(TexParameterivImmediate, pname) == 8,
7997 "offset of TexParameterivImmediate pname should be 8");
7999 struct TexStorage3D {
8000 typedef TexStorage3D ValueType;
8001 static const CommandId kCmdId = kTexStorage3D;
8002 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8003 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8005 static uint32_t ComputeSize() {
8006 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8009 void SetHeader() { header.SetCmd<ValueType>(); }
8011 void Init(GLenum _target,
8012 GLsizei _levels,
8013 GLenum _internalFormat,
8014 GLsizei _width,
8015 GLsizei _height,
8016 GLsizei _depth) {
8017 SetHeader();
8018 target = _target;
8019 levels = _levels;
8020 internalFormat = _internalFormat;
8021 width = _width;
8022 height = _height;
8023 depth = _depth;
8026 void* Set(void* cmd,
8027 GLenum _target,
8028 GLsizei _levels,
8029 GLenum _internalFormat,
8030 GLsizei _width,
8031 GLsizei _height,
8032 GLsizei _depth) {
8033 static_cast<ValueType*>(cmd)
8034 ->Init(_target, _levels, _internalFormat, _width, _height, _depth);
8035 return NextCmdAddress<ValueType>(cmd);
8038 gpu::CommandHeader header;
8039 uint32_t target;
8040 int32_t levels;
8041 uint32_t internalFormat;
8042 int32_t width;
8043 int32_t height;
8044 int32_t depth;
8047 static_assert(sizeof(TexStorage3D) == 28, "size of TexStorage3D should be 28");
8048 static_assert(offsetof(TexStorage3D, header) == 0,
8049 "offset of TexStorage3D header should be 0");
8050 static_assert(offsetof(TexStorage3D, target) == 4,
8051 "offset of TexStorage3D target should be 4");
8052 static_assert(offsetof(TexStorage3D, levels) == 8,
8053 "offset of TexStorage3D levels should be 8");
8054 static_assert(offsetof(TexStorage3D, internalFormat) == 12,
8055 "offset of TexStorage3D internalFormat should be 12");
8056 static_assert(offsetof(TexStorage3D, width) == 16,
8057 "offset of TexStorage3D width should be 16");
8058 static_assert(offsetof(TexStorage3D, height) == 20,
8059 "offset of TexStorage3D height should be 20");
8060 static_assert(offsetof(TexStorage3D, depth) == 24,
8061 "offset of TexStorage3D depth should be 24");
8063 struct TexSubImage2D {
8064 typedef TexSubImage2D ValueType;
8065 static const CommandId kCmdId = kTexSubImage2D;
8066 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8067 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8069 static uint32_t ComputeSize() {
8070 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8073 void SetHeader() { header.SetCmd<ValueType>(); }
8075 void Init(GLenum _target,
8076 GLint _level,
8077 GLint _xoffset,
8078 GLint _yoffset,
8079 GLsizei _width,
8080 GLsizei _height,
8081 GLenum _format,
8082 GLenum _type,
8083 uint32_t _pixels_shm_id,
8084 uint32_t _pixels_shm_offset,
8085 GLboolean _internal) {
8086 SetHeader();
8087 target = _target;
8088 level = _level;
8089 xoffset = _xoffset;
8090 yoffset = _yoffset;
8091 width = _width;
8092 height = _height;
8093 format = _format;
8094 type = _type;
8095 pixels_shm_id = _pixels_shm_id;
8096 pixels_shm_offset = _pixels_shm_offset;
8097 internal = _internal;
8100 void* Set(void* cmd,
8101 GLenum _target,
8102 GLint _level,
8103 GLint _xoffset,
8104 GLint _yoffset,
8105 GLsizei _width,
8106 GLsizei _height,
8107 GLenum _format,
8108 GLenum _type,
8109 uint32_t _pixels_shm_id,
8110 uint32_t _pixels_shm_offset,
8111 GLboolean _internal) {
8112 static_cast<ValueType*>(cmd)
8113 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
8114 _type, _pixels_shm_id, _pixels_shm_offset, _internal);
8115 return NextCmdAddress<ValueType>(cmd);
8118 gpu::CommandHeader header;
8119 uint32_t target;
8120 int32_t level;
8121 int32_t xoffset;
8122 int32_t yoffset;
8123 int32_t width;
8124 int32_t height;
8125 uint32_t format;
8126 uint32_t type;
8127 uint32_t pixels_shm_id;
8128 uint32_t pixels_shm_offset;
8129 uint32_t internal;
8132 static_assert(sizeof(TexSubImage2D) == 48,
8133 "size of TexSubImage2D should be 48");
8134 static_assert(offsetof(TexSubImage2D, header) == 0,
8135 "offset of TexSubImage2D header should be 0");
8136 static_assert(offsetof(TexSubImage2D, target) == 4,
8137 "offset of TexSubImage2D target should be 4");
8138 static_assert(offsetof(TexSubImage2D, level) == 8,
8139 "offset of TexSubImage2D level should be 8");
8140 static_assert(offsetof(TexSubImage2D, xoffset) == 12,
8141 "offset of TexSubImage2D xoffset should be 12");
8142 static_assert(offsetof(TexSubImage2D, yoffset) == 16,
8143 "offset of TexSubImage2D yoffset should be 16");
8144 static_assert(offsetof(TexSubImage2D, width) == 20,
8145 "offset of TexSubImage2D width should be 20");
8146 static_assert(offsetof(TexSubImage2D, height) == 24,
8147 "offset of TexSubImage2D height should be 24");
8148 static_assert(offsetof(TexSubImage2D, format) == 28,
8149 "offset of TexSubImage2D format should be 28");
8150 static_assert(offsetof(TexSubImage2D, type) == 32,
8151 "offset of TexSubImage2D type should be 32");
8152 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36,
8153 "offset of TexSubImage2D pixels_shm_id should be 36");
8154 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
8155 "offset of TexSubImage2D pixels_shm_offset should be 40");
8156 static_assert(offsetof(TexSubImage2D, internal) == 44,
8157 "offset of TexSubImage2D internal should be 44");
8159 struct TexSubImage3D {
8160 typedef TexSubImage3D ValueType;
8161 static const CommandId kCmdId = kTexSubImage3D;
8162 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8163 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8165 static uint32_t ComputeSize() {
8166 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8169 void SetHeader() { header.SetCmd<ValueType>(); }
8171 void Init(GLenum _target,
8172 GLint _level,
8173 GLint _xoffset,
8174 GLint _yoffset,
8175 GLint _zoffset,
8176 GLsizei _width,
8177 GLsizei _height,
8178 GLsizei _depth,
8179 GLenum _format,
8180 GLenum _type,
8181 uint32_t _pixels_shm_id,
8182 uint32_t _pixels_shm_offset,
8183 GLboolean _internal) {
8184 SetHeader();
8185 target = _target;
8186 level = _level;
8187 xoffset = _xoffset;
8188 yoffset = _yoffset;
8189 zoffset = _zoffset;
8190 width = _width;
8191 height = _height;
8192 depth = _depth;
8193 format = _format;
8194 type = _type;
8195 pixels_shm_id = _pixels_shm_id;
8196 pixels_shm_offset = _pixels_shm_offset;
8197 internal = _internal;
8200 void* Set(void* cmd,
8201 GLenum _target,
8202 GLint _level,
8203 GLint _xoffset,
8204 GLint _yoffset,
8205 GLint _zoffset,
8206 GLsizei _width,
8207 GLsizei _height,
8208 GLsizei _depth,
8209 GLenum _format,
8210 GLenum _type,
8211 uint32_t _pixels_shm_id,
8212 uint32_t _pixels_shm_offset,
8213 GLboolean _internal) {
8214 static_cast<ValueType*>(cmd)->Init(
8215 _target, _level, _xoffset, _yoffset, _zoffset, _width, _height, _depth,
8216 _format, _type, _pixels_shm_id, _pixels_shm_offset, _internal);
8217 return NextCmdAddress<ValueType>(cmd);
8220 gpu::CommandHeader header;
8221 uint32_t target;
8222 int32_t level;
8223 int32_t xoffset;
8224 int32_t yoffset;
8225 int32_t zoffset;
8226 int32_t width;
8227 int32_t height;
8228 int32_t depth;
8229 uint32_t format;
8230 uint32_t type;
8231 uint32_t pixels_shm_id;
8232 uint32_t pixels_shm_offset;
8233 uint32_t internal;
8236 static_assert(sizeof(TexSubImage3D) == 56,
8237 "size of TexSubImage3D should be 56");
8238 static_assert(offsetof(TexSubImage3D, header) == 0,
8239 "offset of TexSubImage3D header should be 0");
8240 static_assert(offsetof(TexSubImage3D, target) == 4,
8241 "offset of TexSubImage3D target should be 4");
8242 static_assert(offsetof(TexSubImage3D, level) == 8,
8243 "offset of TexSubImage3D level should be 8");
8244 static_assert(offsetof(TexSubImage3D, xoffset) == 12,
8245 "offset of TexSubImage3D xoffset should be 12");
8246 static_assert(offsetof(TexSubImage3D, yoffset) == 16,
8247 "offset of TexSubImage3D yoffset should be 16");
8248 static_assert(offsetof(TexSubImage3D, zoffset) == 20,
8249 "offset of TexSubImage3D zoffset should be 20");
8250 static_assert(offsetof(TexSubImage3D, width) == 24,
8251 "offset of TexSubImage3D width should be 24");
8252 static_assert(offsetof(TexSubImage3D, height) == 28,
8253 "offset of TexSubImage3D height should be 28");
8254 static_assert(offsetof(TexSubImage3D, depth) == 32,
8255 "offset of TexSubImage3D depth should be 32");
8256 static_assert(offsetof(TexSubImage3D, format) == 36,
8257 "offset of TexSubImage3D format should be 36");
8258 static_assert(offsetof(TexSubImage3D, type) == 40,
8259 "offset of TexSubImage3D type should be 40");
8260 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44,
8261 "offset of TexSubImage3D pixels_shm_id should be 44");
8262 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48,
8263 "offset of TexSubImage3D pixels_shm_offset should be 48");
8264 static_assert(offsetof(TexSubImage3D, internal) == 52,
8265 "offset of TexSubImage3D internal should be 52");
8267 struct TransformFeedbackVaryingsBucket {
8268 typedef TransformFeedbackVaryingsBucket ValueType;
8269 static const CommandId kCmdId = kTransformFeedbackVaryingsBucket;
8270 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8271 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8273 static uint32_t ComputeSize() {
8274 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8277 void SetHeader() { header.SetCmd<ValueType>(); }
8279 void Init(GLuint _program, uint32_t _varyings_bucket_id, GLenum _buffermode) {
8280 SetHeader();
8281 program = _program;
8282 varyings_bucket_id = _varyings_bucket_id;
8283 buffermode = _buffermode;
8286 void* Set(void* cmd,
8287 GLuint _program,
8288 uint32_t _varyings_bucket_id,
8289 GLenum _buffermode) {
8290 static_cast<ValueType*>(cmd)
8291 ->Init(_program, _varyings_bucket_id, _buffermode);
8292 return NextCmdAddress<ValueType>(cmd);
8295 gpu::CommandHeader header;
8296 uint32_t program;
8297 uint32_t varyings_bucket_id;
8298 uint32_t buffermode;
8301 static_assert(sizeof(TransformFeedbackVaryingsBucket) == 16,
8302 "size of TransformFeedbackVaryingsBucket should be 16");
8303 static_assert(offsetof(TransformFeedbackVaryingsBucket, header) == 0,
8304 "offset of TransformFeedbackVaryingsBucket header should be 0");
8305 static_assert(offsetof(TransformFeedbackVaryingsBucket, program) == 4,
8306 "offset of TransformFeedbackVaryingsBucket program should be 4");
8307 static_assert(
8308 offsetof(TransformFeedbackVaryingsBucket, varyings_bucket_id) == 8,
8309 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
8310 static_assert(
8311 offsetof(TransformFeedbackVaryingsBucket, buffermode) == 12,
8312 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
8314 struct Uniform1f {
8315 typedef Uniform1f ValueType;
8316 static const CommandId kCmdId = kUniform1f;
8317 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8318 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8320 static uint32_t ComputeSize() {
8321 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8324 void SetHeader() { header.SetCmd<ValueType>(); }
8326 void Init(GLint _location, GLfloat _x) {
8327 SetHeader();
8328 location = _location;
8329 x = _x;
8332 void* Set(void* cmd, GLint _location, GLfloat _x) {
8333 static_cast<ValueType*>(cmd)->Init(_location, _x);
8334 return NextCmdAddress<ValueType>(cmd);
8337 gpu::CommandHeader header;
8338 int32_t location;
8339 float x;
8342 static_assert(sizeof(Uniform1f) == 12, "size of Uniform1f should be 12");
8343 static_assert(offsetof(Uniform1f, header) == 0,
8344 "offset of Uniform1f header should be 0");
8345 static_assert(offsetof(Uniform1f, location) == 4,
8346 "offset of Uniform1f location should be 4");
8347 static_assert(offsetof(Uniform1f, x) == 8, "offset of Uniform1f x should be 8");
8349 struct Uniform1fvImmediate {
8350 typedef Uniform1fvImmediate ValueType;
8351 static const CommandId kCmdId = kUniform1fvImmediate;
8352 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8353 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8355 static uint32_t ComputeDataSize(GLsizei count) {
8356 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT
8359 static uint32_t ComputeSize(GLsizei count) {
8360 return static_cast<uint32_t>(sizeof(ValueType) +
8361 ComputeDataSize(count)); // NOLINT
8364 void SetHeader(GLsizei count) {
8365 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8368 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8369 SetHeader(_count);
8370 location = _location;
8371 count = _count;
8372 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8375 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8376 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8377 const uint32_t size = ComputeSize(_count);
8378 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8381 gpu::CommandHeader header;
8382 int32_t location;
8383 int32_t count;
8386 static_assert(sizeof(Uniform1fvImmediate) == 12,
8387 "size of Uniform1fvImmediate should be 12");
8388 static_assert(offsetof(Uniform1fvImmediate, header) == 0,
8389 "offset of Uniform1fvImmediate header should be 0");
8390 static_assert(offsetof(Uniform1fvImmediate, location) == 4,
8391 "offset of Uniform1fvImmediate location should be 4");
8392 static_assert(offsetof(Uniform1fvImmediate, count) == 8,
8393 "offset of Uniform1fvImmediate count should be 8");
8395 struct Uniform1i {
8396 typedef Uniform1i ValueType;
8397 static const CommandId kCmdId = kUniform1i;
8398 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8399 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8401 static uint32_t ComputeSize() {
8402 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8405 void SetHeader() { header.SetCmd<ValueType>(); }
8407 void Init(GLint _location, GLint _x) {
8408 SetHeader();
8409 location = _location;
8410 x = _x;
8413 void* Set(void* cmd, GLint _location, GLint _x) {
8414 static_cast<ValueType*>(cmd)->Init(_location, _x);
8415 return NextCmdAddress<ValueType>(cmd);
8418 gpu::CommandHeader header;
8419 int32_t location;
8420 int32_t x;
8423 static_assert(sizeof(Uniform1i) == 12, "size of Uniform1i should be 12");
8424 static_assert(offsetof(Uniform1i, header) == 0,
8425 "offset of Uniform1i header should be 0");
8426 static_assert(offsetof(Uniform1i, location) == 4,
8427 "offset of Uniform1i location should be 4");
8428 static_assert(offsetof(Uniform1i, x) == 8, "offset of Uniform1i x should be 8");
8430 struct Uniform1ivImmediate {
8431 typedef Uniform1ivImmediate ValueType;
8432 static const CommandId kCmdId = kUniform1ivImmediate;
8433 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8434 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8436 static uint32_t ComputeDataSize(GLsizei count) {
8437 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT
8440 static uint32_t ComputeSize(GLsizei count) {
8441 return static_cast<uint32_t>(sizeof(ValueType) +
8442 ComputeDataSize(count)); // NOLINT
8445 void SetHeader(GLsizei count) {
8446 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8449 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8450 SetHeader(_count);
8451 location = _location;
8452 count = _count;
8453 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8456 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8457 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8458 const uint32_t size = ComputeSize(_count);
8459 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8462 gpu::CommandHeader header;
8463 int32_t location;
8464 int32_t count;
8467 static_assert(sizeof(Uniform1ivImmediate) == 12,
8468 "size of Uniform1ivImmediate should be 12");
8469 static_assert(offsetof(Uniform1ivImmediate, header) == 0,
8470 "offset of Uniform1ivImmediate header should be 0");
8471 static_assert(offsetof(Uniform1ivImmediate, location) == 4,
8472 "offset of Uniform1ivImmediate location should be 4");
8473 static_assert(offsetof(Uniform1ivImmediate, count) == 8,
8474 "offset of Uniform1ivImmediate count should be 8");
8476 struct Uniform1ui {
8477 typedef Uniform1ui ValueType;
8478 static const CommandId kCmdId = kUniform1ui;
8479 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8480 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8482 static uint32_t ComputeSize() {
8483 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8486 void SetHeader() { header.SetCmd<ValueType>(); }
8488 void Init(GLint _location, GLuint _x) {
8489 SetHeader();
8490 location = _location;
8491 x = _x;
8494 void* Set(void* cmd, GLint _location, GLuint _x) {
8495 static_cast<ValueType*>(cmd)->Init(_location, _x);
8496 return NextCmdAddress<ValueType>(cmd);
8499 gpu::CommandHeader header;
8500 int32_t location;
8501 uint32_t x;
8504 static_assert(sizeof(Uniform1ui) == 12, "size of Uniform1ui should be 12");
8505 static_assert(offsetof(Uniform1ui, header) == 0,
8506 "offset of Uniform1ui header should be 0");
8507 static_assert(offsetof(Uniform1ui, location) == 4,
8508 "offset of Uniform1ui location should be 4");
8509 static_assert(offsetof(Uniform1ui, x) == 8,
8510 "offset of Uniform1ui x should be 8");
8512 struct Uniform1uivImmediate {
8513 typedef Uniform1uivImmediate ValueType;
8514 static const CommandId kCmdId = kUniform1uivImmediate;
8515 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8516 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8518 static uint32_t ComputeDataSize(GLsizei count) {
8519 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT
8522 static uint32_t ComputeSize(GLsizei count) {
8523 return static_cast<uint32_t>(sizeof(ValueType) +
8524 ComputeDataSize(count)); // NOLINT
8527 void SetHeader(GLsizei count) {
8528 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8531 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8532 SetHeader(_count);
8533 location = _location;
8534 count = _count;
8535 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8538 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8539 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8540 const uint32_t size = ComputeSize(_count);
8541 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8544 gpu::CommandHeader header;
8545 int32_t location;
8546 int32_t count;
8549 static_assert(sizeof(Uniform1uivImmediate) == 12,
8550 "size of Uniform1uivImmediate should be 12");
8551 static_assert(offsetof(Uniform1uivImmediate, header) == 0,
8552 "offset of Uniform1uivImmediate header should be 0");
8553 static_assert(offsetof(Uniform1uivImmediate, location) == 4,
8554 "offset of Uniform1uivImmediate location should be 4");
8555 static_assert(offsetof(Uniform1uivImmediate, count) == 8,
8556 "offset of Uniform1uivImmediate count should be 8");
8558 struct Uniform2f {
8559 typedef Uniform2f ValueType;
8560 static const CommandId kCmdId = kUniform2f;
8561 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8562 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8564 static uint32_t ComputeSize() {
8565 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8568 void SetHeader() { header.SetCmd<ValueType>(); }
8570 void Init(GLint _location, GLfloat _x, GLfloat _y) {
8571 SetHeader();
8572 location = _location;
8573 x = _x;
8574 y = _y;
8577 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
8578 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8579 return NextCmdAddress<ValueType>(cmd);
8582 gpu::CommandHeader header;
8583 int32_t location;
8584 float x;
8585 float y;
8588 static_assert(sizeof(Uniform2f) == 16, "size of Uniform2f should be 16");
8589 static_assert(offsetof(Uniform2f, header) == 0,
8590 "offset of Uniform2f header should be 0");
8591 static_assert(offsetof(Uniform2f, location) == 4,
8592 "offset of Uniform2f location should be 4");
8593 static_assert(offsetof(Uniform2f, x) == 8, "offset of Uniform2f x should be 8");
8594 static_assert(offsetof(Uniform2f, y) == 12,
8595 "offset of Uniform2f y should be 12");
8597 struct Uniform2fvImmediate {
8598 typedef Uniform2fvImmediate ValueType;
8599 static const CommandId kCmdId = kUniform2fvImmediate;
8600 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8601 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8603 static uint32_t ComputeDataSize(GLsizei count) {
8604 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT
8607 static uint32_t ComputeSize(GLsizei count) {
8608 return static_cast<uint32_t>(sizeof(ValueType) +
8609 ComputeDataSize(count)); // NOLINT
8612 void SetHeader(GLsizei count) {
8613 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8616 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8617 SetHeader(_count);
8618 location = _location;
8619 count = _count;
8620 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8623 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8624 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8625 const uint32_t size = ComputeSize(_count);
8626 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8629 gpu::CommandHeader header;
8630 int32_t location;
8631 int32_t count;
8634 static_assert(sizeof(Uniform2fvImmediate) == 12,
8635 "size of Uniform2fvImmediate should be 12");
8636 static_assert(offsetof(Uniform2fvImmediate, header) == 0,
8637 "offset of Uniform2fvImmediate header should be 0");
8638 static_assert(offsetof(Uniform2fvImmediate, location) == 4,
8639 "offset of Uniform2fvImmediate location should be 4");
8640 static_assert(offsetof(Uniform2fvImmediate, count) == 8,
8641 "offset of Uniform2fvImmediate count should be 8");
8643 struct Uniform2i {
8644 typedef Uniform2i ValueType;
8645 static const CommandId kCmdId = kUniform2i;
8646 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8647 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8649 static uint32_t ComputeSize() {
8650 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8653 void SetHeader() { header.SetCmd<ValueType>(); }
8655 void Init(GLint _location, GLint _x, GLint _y) {
8656 SetHeader();
8657 location = _location;
8658 x = _x;
8659 y = _y;
8662 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
8663 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8664 return NextCmdAddress<ValueType>(cmd);
8667 gpu::CommandHeader header;
8668 int32_t location;
8669 int32_t x;
8670 int32_t y;
8673 static_assert(sizeof(Uniform2i) == 16, "size of Uniform2i should be 16");
8674 static_assert(offsetof(Uniform2i, header) == 0,
8675 "offset of Uniform2i header should be 0");
8676 static_assert(offsetof(Uniform2i, location) == 4,
8677 "offset of Uniform2i location should be 4");
8678 static_assert(offsetof(Uniform2i, x) == 8, "offset of Uniform2i x should be 8");
8679 static_assert(offsetof(Uniform2i, y) == 12,
8680 "offset of Uniform2i y should be 12");
8682 struct Uniform2ivImmediate {
8683 typedef Uniform2ivImmediate ValueType;
8684 static const CommandId kCmdId = kUniform2ivImmediate;
8685 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8686 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8688 static uint32_t ComputeDataSize(GLsizei count) {
8689 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT
8692 static uint32_t ComputeSize(GLsizei count) {
8693 return static_cast<uint32_t>(sizeof(ValueType) +
8694 ComputeDataSize(count)); // NOLINT
8697 void SetHeader(GLsizei count) {
8698 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8701 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8702 SetHeader(_count);
8703 location = _location;
8704 count = _count;
8705 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8708 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8709 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8710 const uint32_t size = ComputeSize(_count);
8711 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8714 gpu::CommandHeader header;
8715 int32_t location;
8716 int32_t count;
8719 static_assert(sizeof(Uniform2ivImmediate) == 12,
8720 "size of Uniform2ivImmediate should be 12");
8721 static_assert(offsetof(Uniform2ivImmediate, header) == 0,
8722 "offset of Uniform2ivImmediate header should be 0");
8723 static_assert(offsetof(Uniform2ivImmediate, location) == 4,
8724 "offset of Uniform2ivImmediate location should be 4");
8725 static_assert(offsetof(Uniform2ivImmediate, count) == 8,
8726 "offset of Uniform2ivImmediate count should be 8");
8728 struct Uniform2ui {
8729 typedef Uniform2ui ValueType;
8730 static const CommandId kCmdId = kUniform2ui;
8731 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8732 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8734 static uint32_t ComputeSize() {
8735 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8738 void SetHeader() { header.SetCmd<ValueType>(); }
8740 void Init(GLint _location, GLuint _x, GLuint _y) {
8741 SetHeader();
8742 location = _location;
8743 x = _x;
8744 y = _y;
8747 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y) {
8748 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8749 return NextCmdAddress<ValueType>(cmd);
8752 gpu::CommandHeader header;
8753 int32_t location;
8754 uint32_t x;
8755 uint32_t y;
8758 static_assert(sizeof(Uniform2ui) == 16, "size of Uniform2ui should be 16");
8759 static_assert(offsetof(Uniform2ui, header) == 0,
8760 "offset of Uniform2ui header should be 0");
8761 static_assert(offsetof(Uniform2ui, location) == 4,
8762 "offset of Uniform2ui location should be 4");
8763 static_assert(offsetof(Uniform2ui, x) == 8,
8764 "offset of Uniform2ui x should be 8");
8765 static_assert(offsetof(Uniform2ui, y) == 12,
8766 "offset of Uniform2ui y should be 12");
8768 struct Uniform2uivImmediate {
8769 typedef Uniform2uivImmediate ValueType;
8770 static const CommandId kCmdId = kUniform2uivImmediate;
8771 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8772 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8774 static uint32_t ComputeDataSize(GLsizei count) {
8775 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT
8778 static uint32_t ComputeSize(GLsizei count) {
8779 return static_cast<uint32_t>(sizeof(ValueType) +
8780 ComputeDataSize(count)); // NOLINT
8783 void SetHeader(GLsizei count) {
8784 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8787 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8788 SetHeader(_count);
8789 location = _location;
8790 count = _count;
8791 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8794 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8795 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8796 const uint32_t size = ComputeSize(_count);
8797 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8800 gpu::CommandHeader header;
8801 int32_t location;
8802 int32_t count;
8805 static_assert(sizeof(Uniform2uivImmediate) == 12,
8806 "size of Uniform2uivImmediate should be 12");
8807 static_assert(offsetof(Uniform2uivImmediate, header) == 0,
8808 "offset of Uniform2uivImmediate header should be 0");
8809 static_assert(offsetof(Uniform2uivImmediate, location) == 4,
8810 "offset of Uniform2uivImmediate location should be 4");
8811 static_assert(offsetof(Uniform2uivImmediate, count) == 8,
8812 "offset of Uniform2uivImmediate count should be 8");
8814 struct Uniform3f {
8815 typedef Uniform3f ValueType;
8816 static const CommandId kCmdId = kUniform3f;
8817 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8818 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8820 static uint32_t ComputeSize() {
8821 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8824 void SetHeader() { header.SetCmd<ValueType>(); }
8826 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8827 SetHeader();
8828 location = _location;
8829 x = _x;
8830 y = _y;
8831 z = _z;
8834 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8835 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8836 return NextCmdAddress<ValueType>(cmd);
8839 gpu::CommandHeader header;
8840 int32_t location;
8841 float x;
8842 float y;
8843 float z;
8846 static_assert(sizeof(Uniform3f) == 20, "size of Uniform3f should be 20");
8847 static_assert(offsetof(Uniform3f, header) == 0,
8848 "offset of Uniform3f header should be 0");
8849 static_assert(offsetof(Uniform3f, location) == 4,
8850 "offset of Uniform3f location should be 4");
8851 static_assert(offsetof(Uniform3f, x) == 8, "offset of Uniform3f x should be 8");
8852 static_assert(offsetof(Uniform3f, y) == 12,
8853 "offset of Uniform3f y should be 12");
8854 static_assert(offsetof(Uniform3f, z) == 16,
8855 "offset of Uniform3f z should be 16");
8857 struct Uniform3fvImmediate {
8858 typedef Uniform3fvImmediate ValueType;
8859 static const CommandId kCmdId = kUniform3fvImmediate;
8860 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8863 static uint32_t ComputeDataSize(GLsizei count) {
8864 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT
8867 static uint32_t ComputeSize(GLsizei count) {
8868 return static_cast<uint32_t>(sizeof(ValueType) +
8869 ComputeDataSize(count)); // NOLINT
8872 void SetHeader(GLsizei count) {
8873 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8876 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8877 SetHeader(_count);
8878 location = _location;
8879 count = _count;
8880 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8883 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8884 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8885 const uint32_t size = ComputeSize(_count);
8886 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8889 gpu::CommandHeader header;
8890 int32_t location;
8891 int32_t count;
8894 static_assert(sizeof(Uniform3fvImmediate) == 12,
8895 "size of Uniform3fvImmediate should be 12");
8896 static_assert(offsetof(Uniform3fvImmediate, header) == 0,
8897 "offset of Uniform3fvImmediate header should be 0");
8898 static_assert(offsetof(Uniform3fvImmediate, location) == 4,
8899 "offset of Uniform3fvImmediate location should be 4");
8900 static_assert(offsetof(Uniform3fvImmediate, count) == 8,
8901 "offset of Uniform3fvImmediate count should be 8");
8903 struct Uniform3i {
8904 typedef Uniform3i ValueType;
8905 static const CommandId kCmdId = kUniform3i;
8906 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8907 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8909 static uint32_t ComputeSize() {
8910 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8913 void SetHeader() { header.SetCmd<ValueType>(); }
8915 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
8916 SetHeader();
8917 location = _location;
8918 x = _x;
8919 y = _y;
8920 z = _z;
8923 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
8924 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8925 return NextCmdAddress<ValueType>(cmd);
8928 gpu::CommandHeader header;
8929 int32_t location;
8930 int32_t x;
8931 int32_t y;
8932 int32_t z;
8935 static_assert(sizeof(Uniform3i) == 20, "size of Uniform3i should be 20");
8936 static_assert(offsetof(Uniform3i, header) == 0,
8937 "offset of Uniform3i header should be 0");
8938 static_assert(offsetof(Uniform3i, location) == 4,
8939 "offset of Uniform3i location should be 4");
8940 static_assert(offsetof(Uniform3i, x) == 8, "offset of Uniform3i x should be 8");
8941 static_assert(offsetof(Uniform3i, y) == 12,
8942 "offset of Uniform3i y should be 12");
8943 static_assert(offsetof(Uniform3i, z) == 16,
8944 "offset of Uniform3i z should be 16");
8946 struct Uniform3ivImmediate {
8947 typedef Uniform3ivImmediate ValueType;
8948 static const CommandId kCmdId = kUniform3ivImmediate;
8949 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8950 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8952 static uint32_t ComputeDataSize(GLsizei count) {
8953 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT
8956 static uint32_t ComputeSize(GLsizei count) {
8957 return static_cast<uint32_t>(sizeof(ValueType) +
8958 ComputeDataSize(count)); // NOLINT
8961 void SetHeader(GLsizei count) {
8962 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8965 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8966 SetHeader(_count);
8967 location = _location;
8968 count = _count;
8969 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8972 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8973 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8974 const uint32_t size = ComputeSize(_count);
8975 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8978 gpu::CommandHeader header;
8979 int32_t location;
8980 int32_t count;
8983 static_assert(sizeof(Uniform3ivImmediate) == 12,
8984 "size of Uniform3ivImmediate should be 12");
8985 static_assert(offsetof(Uniform3ivImmediate, header) == 0,
8986 "offset of Uniform3ivImmediate header should be 0");
8987 static_assert(offsetof(Uniform3ivImmediate, location) == 4,
8988 "offset of Uniform3ivImmediate location should be 4");
8989 static_assert(offsetof(Uniform3ivImmediate, count) == 8,
8990 "offset of Uniform3ivImmediate count should be 8");
8992 struct Uniform3ui {
8993 typedef Uniform3ui ValueType;
8994 static const CommandId kCmdId = kUniform3ui;
8995 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8996 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8998 static uint32_t ComputeSize() {
8999 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9002 void SetHeader() { header.SetCmd<ValueType>(); }
9004 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z) {
9005 SetHeader();
9006 location = _location;
9007 x = _x;
9008 y = _y;
9009 z = _z;
9012 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y, GLuint _z) {
9013 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
9014 return NextCmdAddress<ValueType>(cmd);
9017 gpu::CommandHeader header;
9018 int32_t location;
9019 uint32_t x;
9020 uint32_t y;
9021 uint32_t z;
9024 static_assert(sizeof(Uniform3ui) == 20, "size of Uniform3ui should be 20");
9025 static_assert(offsetof(Uniform3ui, header) == 0,
9026 "offset of Uniform3ui header should be 0");
9027 static_assert(offsetof(Uniform3ui, location) == 4,
9028 "offset of Uniform3ui location should be 4");
9029 static_assert(offsetof(Uniform3ui, x) == 8,
9030 "offset of Uniform3ui x should be 8");
9031 static_assert(offsetof(Uniform3ui, y) == 12,
9032 "offset of Uniform3ui y should be 12");
9033 static_assert(offsetof(Uniform3ui, z) == 16,
9034 "offset of Uniform3ui z should be 16");
9036 struct Uniform3uivImmediate {
9037 typedef Uniform3uivImmediate ValueType;
9038 static const CommandId kCmdId = kUniform3uivImmediate;
9039 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9040 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9042 static uint32_t ComputeDataSize(GLsizei count) {
9043 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT
9046 static uint32_t ComputeSize(GLsizei count) {
9047 return static_cast<uint32_t>(sizeof(ValueType) +
9048 ComputeDataSize(count)); // NOLINT
9051 void SetHeader(GLsizei count) {
9052 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9055 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
9056 SetHeader(_count);
9057 location = _location;
9058 count = _count;
9059 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9062 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
9063 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9064 const uint32_t size = ComputeSize(_count);
9065 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9068 gpu::CommandHeader header;
9069 int32_t location;
9070 int32_t count;
9073 static_assert(sizeof(Uniform3uivImmediate) == 12,
9074 "size of Uniform3uivImmediate should be 12");
9075 static_assert(offsetof(Uniform3uivImmediate, header) == 0,
9076 "offset of Uniform3uivImmediate header should be 0");
9077 static_assert(offsetof(Uniform3uivImmediate, location) == 4,
9078 "offset of Uniform3uivImmediate location should be 4");
9079 static_assert(offsetof(Uniform3uivImmediate, count) == 8,
9080 "offset of Uniform3uivImmediate count should be 8");
9082 struct Uniform4f {
9083 typedef Uniform4f ValueType;
9084 static const CommandId kCmdId = kUniform4f;
9085 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9086 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9088 static uint32_t ComputeSize() {
9089 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9092 void SetHeader() { header.SetCmd<ValueType>(); }
9094 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
9095 SetHeader();
9096 location = _location;
9097 x = _x;
9098 y = _y;
9099 z = _z;
9100 w = _w;
9103 void* Set(void* cmd,
9104 GLint _location,
9105 GLfloat _x,
9106 GLfloat _y,
9107 GLfloat _z,
9108 GLfloat _w) {
9109 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9110 return NextCmdAddress<ValueType>(cmd);
9113 gpu::CommandHeader header;
9114 int32_t location;
9115 float x;
9116 float y;
9117 float z;
9118 float w;
9121 static_assert(sizeof(Uniform4f) == 24, "size of Uniform4f should be 24");
9122 static_assert(offsetof(Uniform4f, header) == 0,
9123 "offset of Uniform4f header should be 0");
9124 static_assert(offsetof(Uniform4f, location) == 4,
9125 "offset of Uniform4f location should be 4");
9126 static_assert(offsetof(Uniform4f, x) == 8, "offset of Uniform4f x should be 8");
9127 static_assert(offsetof(Uniform4f, y) == 12,
9128 "offset of Uniform4f y should be 12");
9129 static_assert(offsetof(Uniform4f, z) == 16,
9130 "offset of Uniform4f z should be 16");
9131 static_assert(offsetof(Uniform4f, w) == 20,
9132 "offset of Uniform4f w should be 20");
9134 struct Uniform4fvImmediate {
9135 typedef Uniform4fvImmediate ValueType;
9136 static const CommandId kCmdId = kUniform4fvImmediate;
9137 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9138 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9140 static uint32_t ComputeDataSize(GLsizei count) {
9141 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
9144 static uint32_t ComputeSize(GLsizei count) {
9145 return static_cast<uint32_t>(sizeof(ValueType) +
9146 ComputeDataSize(count)); // NOLINT
9149 void SetHeader(GLsizei count) {
9150 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9153 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
9154 SetHeader(_count);
9155 location = _location;
9156 count = _count;
9157 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9160 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
9161 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9162 const uint32_t size = ComputeSize(_count);
9163 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9166 gpu::CommandHeader header;
9167 int32_t location;
9168 int32_t count;
9171 static_assert(sizeof(Uniform4fvImmediate) == 12,
9172 "size of Uniform4fvImmediate should be 12");
9173 static_assert(offsetof(Uniform4fvImmediate, header) == 0,
9174 "offset of Uniform4fvImmediate header should be 0");
9175 static_assert(offsetof(Uniform4fvImmediate, location) == 4,
9176 "offset of Uniform4fvImmediate location should be 4");
9177 static_assert(offsetof(Uniform4fvImmediate, count) == 8,
9178 "offset of Uniform4fvImmediate count should be 8");
9180 struct Uniform4i {
9181 typedef Uniform4i ValueType;
9182 static const CommandId kCmdId = kUniform4i;
9183 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9184 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9186 static uint32_t ComputeSize() {
9187 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9190 void SetHeader() { header.SetCmd<ValueType>(); }
9192 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
9193 SetHeader();
9194 location = _location;
9195 x = _x;
9196 y = _y;
9197 z = _z;
9198 w = _w;
9201 void* Set(void* cmd,
9202 GLint _location,
9203 GLint _x,
9204 GLint _y,
9205 GLint _z,
9206 GLint _w) {
9207 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9208 return NextCmdAddress<ValueType>(cmd);
9211 gpu::CommandHeader header;
9212 int32_t location;
9213 int32_t x;
9214 int32_t y;
9215 int32_t z;
9216 int32_t w;
9219 static_assert(sizeof(Uniform4i) == 24, "size of Uniform4i should be 24");
9220 static_assert(offsetof(Uniform4i, header) == 0,
9221 "offset of Uniform4i header should be 0");
9222 static_assert(offsetof(Uniform4i, location) == 4,
9223 "offset of Uniform4i location should be 4");
9224 static_assert(offsetof(Uniform4i, x) == 8, "offset of Uniform4i x should be 8");
9225 static_assert(offsetof(Uniform4i, y) == 12,
9226 "offset of Uniform4i y should be 12");
9227 static_assert(offsetof(Uniform4i, z) == 16,
9228 "offset of Uniform4i z should be 16");
9229 static_assert(offsetof(Uniform4i, w) == 20,
9230 "offset of Uniform4i w should be 20");
9232 struct Uniform4ivImmediate {
9233 typedef Uniform4ivImmediate ValueType;
9234 static const CommandId kCmdId = kUniform4ivImmediate;
9235 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9236 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9238 static uint32_t ComputeDataSize(GLsizei count) {
9239 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT
9242 static uint32_t ComputeSize(GLsizei count) {
9243 return static_cast<uint32_t>(sizeof(ValueType) +
9244 ComputeDataSize(count)); // NOLINT
9247 void SetHeader(GLsizei count) {
9248 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9251 void Init(GLint _location, GLsizei _count, const GLint* _v) {
9252 SetHeader(_count);
9253 location = _location;
9254 count = _count;
9255 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9258 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
9259 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9260 const uint32_t size = ComputeSize(_count);
9261 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9264 gpu::CommandHeader header;
9265 int32_t location;
9266 int32_t count;
9269 static_assert(sizeof(Uniform4ivImmediate) == 12,
9270 "size of Uniform4ivImmediate should be 12");
9271 static_assert(offsetof(Uniform4ivImmediate, header) == 0,
9272 "offset of Uniform4ivImmediate header should be 0");
9273 static_assert(offsetof(Uniform4ivImmediate, location) == 4,
9274 "offset of Uniform4ivImmediate location should be 4");
9275 static_assert(offsetof(Uniform4ivImmediate, count) == 8,
9276 "offset of Uniform4ivImmediate count should be 8");
9278 struct Uniform4ui {
9279 typedef Uniform4ui ValueType;
9280 static const CommandId kCmdId = kUniform4ui;
9281 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9282 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9284 static uint32_t ComputeSize() {
9285 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9288 void SetHeader() { header.SetCmd<ValueType>(); }
9290 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
9291 SetHeader();
9292 location = _location;
9293 x = _x;
9294 y = _y;
9295 z = _z;
9296 w = _w;
9299 void* Set(void* cmd,
9300 GLint _location,
9301 GLuint _x,
9302 GLuint _y,
9303 GLuint _z,
9304 GLuint _w) {
9305 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
9306 return NextCmdAddress<ValueType>(cmd);
9309 gpu::CommandHeader header;
9310 int32_t location;
9311 uint32_t x;
9312 uint32_t y;
9313 uint32_t z;
9314 uint32_t w;
9317 static_assert(sizeof(Uniform4ui) == 24, "size of Uniform4ui should be 24");
9318 static_assert(offsetof(Uniform4ui, header) == 0,
9319 "offset of Uniform4ui header should be 0");
9320 static_assert(offsetof(Uniform4ui, location) == 4,
9321 "offset of Uniform4ui location should be 4");
9322 static_assert(offsetof(Uniform4ui, x) == 8,
9323 "offset of Uniform4ui x should be 8");
9324 static_assert(offsetof(Uniform4ui, y) == 12,
9325 "offset of Uniform4ui y should be 12");
9326 static_assert(offsetof(Uniform4ui, z) == 16,
9327 "offset of Uniform4ui z should be 16");
9328 static_assert(offsetof(Uniform4ui, w) == 20,
9329 "offset of Uniform4ui w should be 20");
9331 struct Uniform4uivImmediate {
9332 typedef Uniform4uivImmediate ValueType;
9333 static const CommandId kCmdId = kUniform4uivImmediate;
9334 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9335 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9337 static uint32_t ComputeDataSize(GLsizei count) {
9338 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT
9341 static uint32_t ComputeSize(GLsizei count) {
9342 return static_cast<uint32_t>(sizeof(ValueType) +
9343 ComputeDataSize(count)); // NOLINT
9346 void SetHeader(GLsizei count) {
9347 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9350 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
9351 SetHeader(_count);
9352 location = _location;
9353 count = _count;
9354 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
9357 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
9358 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
9359 const uint32_t size = ComputeSize(_count);
9360 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9363 gpu::CommandHeader header;
9364 int32_t location;
9365 int32_t count;
9368 static_assert(sizeof(Uniform4uivImmediate) == 12,
9369 "size of Uniform4uivImmediate should be 12");
9370 static_assert(offsetof(Uniform4uivImmediate, header) == 0,
9371 "offset of Uniform4uivImmediate header should be 0");
9372 static_assert(offsetof(Uniform4uivImmediate, location) == 4,
9373 "offset of Uniform4uivImmediate location should be 4");
9374 static_assert(offsetof(Uniform4uivImmediate, count) == 8,
9375 "offset of Uniform4uivImmediate count should be 8");
9377 struct UniformBlockBinding {
9378 typedef UniformBlockBinding ValueType;
9379 static const CommandId kCmdId = kUniformBlockBinding;
9380 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9381 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9383 static uint32_t ComputeSize() {
9384 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9387 void SetHeader() { header.SetCmd<ValueType>(); }
9389 void Init(GLuint _program, GLuint _index, GLuint _binding) {
9390 SetHeader();
9391 program = _program;
9392 index = _index;
9393 binding = _binding;
9396 void* Set(void* cmd, GLuint _program, GLuint _index, GLuint _binding) {
9397 static_cast<ValueType*>(cmd)->Init(_program, _index, _binding);
9398 return NextCmdAddress<ValueType>(cmd);
9401 gpu::CommandHeader header;
9402 uint32_t program;
9403 uint32_t index;
9404 uint32_t binding;
9407 static_assert(sizeof(UniformBlockBinding) == 16,
9408 "size of UniformBlockBinding should be 16");
9409 static_assert(offsetof(UniformBlockBinding, header) == 0,
9410 "offset of UniformBlockBinding header should be 0");
9411 static_assert(offsetof(UniformBlockBinding, program) == 4,
9412 "offset of UniformBlockBinding program should be 4");
9413 static_assert(offsetof(UniformBlockBinding, index) == 8,
9414 "offset of UniformBlockBinding index should be 8");
9415 static_assert(offsetof(UniformBlockBinding, binding) == 12,
9416 "offset of UniformBlockBinding binding should be 12");
9418 struct UniformMatrix2fvImmediate {
9419 typedef UniformMatrix2fvImmediate ValueType;
9420 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
9421 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9422 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9424 static uint32_t ComputeDataSize(GLsizei count) {
9425 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
9428 static uint32_t ComputeSize(GLsizei count) {
9429 return static_cast<uint32_t>(sizeof(ValueType) +
9430 ComputeDataSize(count)); // NOLINT
9433 void SetHeader(GLsizei count) {
9434 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9437 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9438 SetHeader(_count);
9439 location = _location;
9440 count = _count;
9441 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9444 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9445 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9446 const uint32_t size = ComputeSize(_count);
9447 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9450 gpu::CommandHeader header;
9451 int32_t location;
9452 int32_t count;
9453 static const uint32_t transpose = false;
9456 static_assert(sizeof(UniformMatrix2fvImmediate) == 12,
9457 "size of UniformMatrix2fvImmediate should be 12");
9458 static_assert(offsetof(UniformMatrix2fvImmediate, header) == 0,
9459 "offset of UniformMatrix2fvImmediate header should be 0");
9460 static_assert(offsetof(UniformMatrix2fvImmediate, location) == 4,
9461 "offset of UniformMatrix2fvImmediate location should be 4");
9462 static_assert(offsetof(UniformMatrix2fvImmediate, count) == 8,
9463 "offset of UniformMatrix2fvImmediate count should be 8");
9465 struct UniformMatrix2x3fvImmediate {
9466 typedef UniformMatrix2x3fvImmediate ValueType;
9467 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate;
9468 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9469 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9471 static uint32_t ComputeDataSize(GLsizei count) {
9472 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
9475 static uint32_t ComputeSize(GLsizei count) {
9476 return static_cast<uint32_t>(sizeof(ValueType) +
9477 ComputeDataSize(count)); // NOLINT
9480 void SetHeader(GLsizei count) {
9481 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9484 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9485 SetHeader(_count);
9486 location = _location;
9487 count = _count;
9488 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9491 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9492 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9493 const uint32_t size = ComputeSize(_count);
9494 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9497 gpu::CommandHeader header;
9498 int32_t location;
9499 int32_t count;
9500 static const uint32_t transpose = false;
9503 static_assert(sizeof(UniformMatrix2x3fvImmediate) == 12,
9504 "size of UniformMatrix2x3fvImmediate should be 12");
9505 static_assert(offsetof(UniformMatrix2x3fvImmediate, header) == 0,
9506 "offset of UniformMatrix2x3fvImmediate header should be 0");
9507 static_assert(offsetof(UniformMatrix2x3fvImmediate, location) == 4,
9508 "offset of UniformMatrix2x3fvImmediate location should be 4");
9509 static_assert(offsetof(UniformMatrix2x3fvImmediate, count) == 8,
9510 "offset of UniformMatrix2x3fvImmediate count should be 8");
9512 struct UniformMatrix2x4fvImmediate {
9513 typedef UniformMatrix2x4fvImmediate ValueType;
9514 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate;
9515 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9516 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9518 static uint32_t ComputeDataSize(GLsizei count) {
9519 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
9522 static uint32_t ComputeSize(GLsizei count) {
9523 return static_cast<uint32_t>(sizeof(ValueType) +
9524 ComputeDataSize(count)); // NOLINT
9527 void SetHeader(GLsizei count) {
9528 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9531 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9532 SetHeader(_count);
9533 location = _location;
9534 count = _count;
9535 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9538 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9539 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9540 const uint32_t size = ComputeSize(_count);
9541 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9544 gpu::CommandHeader header;
9545 int32_t location;
9546 int32_t count;
9547 static const uint32_t transpose = false;
9550 static_assert(sizeof(UniformMatrix2x4fvImmediate) == 12,
9551 "size of UniformMatrix2x4fvImmediate should be 12");
9552 static_assert(offsetof(UniformMatrix2x4fvImmediate, header) == 0,
9553 "offset of UniformMatrix2x4fvImmediate header should be 0");
9554 static_assert(offsetof(UniformMatrix2x4fvImmediate, location) == 4,
9555 "offset of UniformMatrix2x4fvImmediate location should be 4");
9556 static_assert(offsetof(UniformMatrix2x4fvImmediate, count) == 8,
9557 "offset of UniformMatrix2x4fvImmediate count should be 8");
9559 struct UniformMatrix3fvImmediate {
9560 typedef UniformMatrix3fvImmediate ValueType;
9561 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
9562 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9563 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9565 static uint32_t ComputeDataSize(GLsizei count) {
9566 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT
9569 static uint32_t ComputeSize(GLsizei count) {
9570 return static_cast<uint32_t>(sizeof(ValueType) +
9571 ComputeDataSize(count)); // NOLINT
9574 void SetHeader(GLsizei count) {
9575 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9578 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9579 SetHeader(_count);
9580 location = _location;
9581 count = _count;
9582 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9585 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9586 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9587 const uint32_t size = ComputeSize(_count);
9588 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9591 gpu::CommandHeader header;
9592 int32_t location;
9593 int32_t count;
9594 static const uint32_t transpose = false;
9597 static_assert(sizeof(UniformMatrix3fvImmediate) == 12,
9598 "size of UniformMatrix3fvImmediate should be 12");
9599 static_assert(offsetof(UniformMatrix3fvImmediate, header) == 0,
9600 "offset of UniformMatrix3fvImmediate header should be 0");
9601 static_assert(offsetof(UniformMatrix3fvImmediate, location) == 4,
9602 "offset of UniformMatrix3fvImmediate location should be 4");
9603 static_assert(offsetof(UniformMatrix3fvImmediate, count) == 8,
9604 "offset of UniformMatrix3fvImmediate count should be 8");
9606 struct UniformMatrix3x2fvImmediate {
9607 typedef UniformMatrix3x2fvImmediate ValueType;
9608 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate;
9609 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9610 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9612 static uint32_t ComputeDataSize(GLsizei count) {
9613 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
9616 static uint32_t ComputeSize(GLsizei count) {
9617 return static_cast<uint32_t>(sizeof(ValueType) +
9618 ComputeDataSize(count)); // NOLINT
9621 void SetHeader(GLsizei count) {
9622 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9625 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9626 SetHeader(_count);
9627 location = _location;
9628 count = _count;
9629 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9632 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9633 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9634 const uint32_t size = ComputeSize(_count);
9635 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9638 gpu::CommandHeader header;
9639 int32_t location;
9640 int32_t count;
9641 static const uint32_t transpose = false;
9644 static_assert(sizeof(UniformMatrix3x2fvImmediate) == 12,
9645 "size of UniformMatrix3x2fvImmediate should be 12");
9646 static_assert(offsetof(UniformMatrix3x2fvImmediate, header) == 0,
9647 "offset of UniformMatrix3x2fvImmediate header should be 0");
9648 static_assert(offsetof(UniformMatrix3x2fvImmediate, location) == 4,
9649 "offset of UniformMatrix3x2fvImmediate location should be 4");
9650 static_assert(offsetof(UniformMatrix3x2fvImmediate, count) == 8,
9651 "offset of UniformMatrix3x2fvImmediate count should be 8");
9653 struct UniformMatrix3x4fvImmediate {
9654 typedef UniformMatrix3x4fvImmediate ValueType;
9655 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate;
9656 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9657 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9659 static uint32_t ComputeDataSize(GLsizei count) {
9660 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
9663 static uint32_t ComputeSize(GLsizei count) {
9664 return static_cast<uint32_t>(sizeof(ValueType) +
9665 ComputeDataSize(count)); // NOLINT
9668 void SetHeader(GLsizei count) {
9669 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9672 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9673 SetHeader(_count);
9674 location = _location;
9675 count = _count;
9676 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9679 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9680 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9681 const uint32_t size = ComputeSize(_count);
9682 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9685 gpu::CommandHeader header;
9686 int32_t location;
9687 int32_t count;
9688 static const uint32_t transpose = false;
9691 static_assert(sizeof(UniformMatrix3x4fvImmediate) == 12,
9692 "size of UniformMatrix3x4fvImmediate should be 12");
9693 static_assert(offsetof(UniformMatrix3x4fvImmediate, header) == 0,
9694 "offset of UniformMatrix3x4fvImmediate header should be 0");
9695 static_assert(offsetof(UniformMatrix3x4fvImmediate, location) == 4,
9696 "offset of UniformMatrix3x4fvImmediate location should be 4");
9697 static_assert(offsetof(UniformMatrix3x4fvImmediate, count) == 8,
9698 "offset of UniformMatrix3x4fvImmediate count should be 8");
9700 struct UniformMatrix4fvImmediate {
9701 typedef UniformMatrix4fvImmediate ValueType;
9702 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
9703 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9704 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9706 static uint32_t ComputeDataSize(GLsizei count) {
9707 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT
9710 static uint32_t ComputeSize(GLsizei count) {
9711 return static_cast<uint32_t>(sizeof(ValueType) +
9712 ComputeDataSize(count)); // NOLINT
9715 void SetHeader(GLsizei count) {
9716 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9719 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9720 SetHeader(_count);
9721 location = _location;
9722 count = _count;
9723 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9726 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9727 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9728 const uint32_t size = ComputeSize(_count);
9729 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9732 gpu::CommandHeader header;
9733 int32_t location;
9734 int32_t count;
9735 static const uint32_t transpose = false;
9738 static_assert(sizeof(UniformMatrix4fvImmediate) == 12,
9739 "size of UniformMatrix4fvImmediate should be 12");
9740 static_assert(offsetof(UniformMatrix4fvImmediate, header) == 0,
9741 "offset of UniformMatrix4fvImmediate header should be 0");
9742 static_assert(offsetof(UniformMatrix4fvImmediate, location) == 4,
9743 "offset of UniformMatrix4fvImmediate location should be 4");
9744 static_assert(offsetof(UniformMatrix4fvImmediate, count) == 8,
9745 "offset of UniformMatrix4fvImmediate count should be 8");
9747 struct UniformMatrix4x2fvImmediate {
9748 typedef UniformMatrix4x2fvImmediate ValueType;
9749 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate;
9750 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9751 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9753 static uint32_t ComputeDataSize(GLsizei count) {
9754 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
9757 static uint32_t ComputeSize(GLsizei count) {
9758 return static_cast<uint32_t>(sizeof(ValueType) +
9759 ComputeDataSize(count)); // NOLINT
9762 void SetHeader(GLsizei count) {
9763 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9766 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9767 SetHeader(_count);
9768 location = _location;
9769 count = _count;
9770 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9773 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9774 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9775 const uint32_t size = ComputeSize(_count);
9776 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9779 gpu::CommandHeader header;
9780 int32_t location;
9781 int32_t count;
9782 static const uint32_t transpose = false;
9785 static_assert(sizeof(UniformMatrix4x2fvImmediate) == 12,
9786 "size of UniformMatrix4x2fvImmediate should be 12");
9787 static_assert(offsetof(UniformMatrix4x2fvImmediate, header) == 0,
9788 "offset of UniformMatrix4x2fvImmediate header should be 0");
9789 static_assert(offsetof(UniformMatrix4x2fvImmediate, location) == 4,
9790 "offset of UniformMatrix4x2fvImmediate location should be 4");
9791 static_assert(offsetof(UniformMatrix4x2fvImmediate, count) == 8,
9792 "offset of UniformMatrix4x2fvImmediate count should be 8");
9794 struct UniformMatrix4x3fvImmediate {
9795 typedef UniformMatrix4x3fvImmediate ValueType;
9796 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate;
9797 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9798 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9800 static uint32_t ComputeDataSize(GLsizei count) {
9801 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
9804 static uint32_t ComputeSize(GLsizei count) {
9805 return static_cast<uint32_t>(sizeof(ValueType) +
9806 ComputeDataSize(count)); // NOLINT
9809 void SetHeader(GLsizei count) {
9810 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9813 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9814 SetHeader(_count);
9815 location = _location;
9816 count = _count;
9817 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9820 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9821 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9822 const uint32_t size = ComputeSize(_count);
9823 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9826 gpu::CommandHeader header;
9827 int32_t location;
9828 int32_t count;
9829 static const uint32_t transpose = false;
9832 static_assert(sizeof(UniformMatrix4x3fvImmediate) == 12,
9833 "size of UniformMatrix4x3fvImmediate should be 12");
9834 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0,
9835 "offset of UniformMatrix4x3fvImmediate header should be 0");
9836 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4,
9837 "offset of UniformMatrix4x3fvImmediate location should be 4");
9838 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8,
9839 "offset of UniformMatrix4x3fvImmediate count should be 8");
9841 struct UseProgram {
9842 typedef UseProgram ValueType;
9843 static const CommandId kCmdId = kUseProgram;
9844 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9845 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9847 static uint32_t ComputeSize() {
9848 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9851 void SetHeader() { header.SetCmd<ValueType>(); }
9853 void Init(GLuint _program) {
9854 SetHeader();
9855 program = _program;
9858 void* Set(void* cmd, GLuint _program) {
9859 static_cast<ValueType*>(cmd)->Init(_program);
9860 return NextCmdAddress<ValueType>(cmd);
9863 gpu::CommandHeader header;
9864 uint32_t program;
9867 static_assert(sizeof(UseProgram) == 8, "size of UseProgram should be 8");
9868 static_assert(offsetof(UseProgram, header) == 0,
9869 "offset of UseProgram header should be 0");
9870 static_assert(offsetof(UseProgram, program) == 4,
9871 "offset of UseProgram program should be 4");
9873 struct ValidateProgram {
9874 typedef ValidateProgram ValueType;
9875 static const CommandId kCmdId = kValidateProgram;
9876 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9877 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9879 static uint32_t ComputeSize() {
9880 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9883 void SetHeader() { header.SetCmd<ValueType>(); }
9885 void Init(GLuint _program) {
9886 SetHeader();
9887 program = _program;
9890 void* Set(void* cmd, GLuint _program) {
9891 static_cast<ValueType*>(cmd)->Init(_program);
9892 return NextCmdAddress<ValueType>(cmd);
9895 gpu::CommandHeader header;
9896 uint32_t program;
9899 static_assert(sizeof(ValidateProgram) == 8,
9900 "size of ValidateProgram should be 8");
9901 static_assert(offsetof(ValidateProgram, header) == 0,
9902 "offset of ValidateProgram header should be 0");
9903 static_assert(offsetof(ValidateProgram, program) == 4,
9904 "offset of ValidateProgram program should be 4");
9906 struct VertexAttrib1f {
9907 typedef VertexAttrib1f ValueType;
9908 static const CommandId kCmdId = kVertexAttrib1f;
9909 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9910 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9912 static uint32_t ComputeSize() {
9913 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9916 void SetHeader() { header.SetCmd<ValueType>(); }
9918 void Init(GLuint _indx, GLfloat _x) {
9919 SetHeader();
9920 indx = _indx;
9921 x = _x;
9924 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
9925 static_cast<ValueType*>(cmd)->Init(_indx, _x);
9926 return NextCmdAddress<ValueType>(cmd);
9929 gpu::CommandHeader header;
9930 uint32_t indx;
9931 float x;
9934 static_assert(sizeof(VertexAttrib1f) == 12,
9935 "size of VertexAttrib1f should be 12");
9936 static_assert(offsetof(VertexAttrib1f, header) == 0,
9937 "offset of VertexAttrib1f header should be 0");
9938 static_assert(offsetof(VertexAttrib1f, indx) == 4,
9939 "offset of VertexAttrib1f indx should be 4");
9940 static_assert(offsetof(VertexAttrib1f, x) == 8,
9941 "offset of VertexAttrib1f x should be 8");
9943 struct VertexAttrib1fvImmediate {
9944 typedef VertexAttrib1fvImmediate ValueType;
9945 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
9946 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9947 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9949 static uint32_t ComputeDataSize() {
9950 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
9953 static uint32_t ComputeSize() {
9954 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9957 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9959 void Init(GLuint _indx, const GLfloat* _values) {
9960 SetHeader();
9961 indx = _indx;
9962 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9965 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
9966 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9967 const uint32_t size = ComputeSize();
9968 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9971 gpu::CommandHeader header;
9972 uint32_t indx;
9975 static_assert(sizeof(VertexAttrib1fvImmediate) == 8,
9976 "size of VertexAttrib1fvImmediate should be 8");
9977 static_assert(offsetof(VertexAttrib1fvImmediate, header) == 0,
9978 "offset of VertexAttrib1fvImmediate header should be 0");
9979 static_assert(offsetof(VertexAttrib1fvImmediate, indx) == 4,
9980 "offset of VertexAttrib1fvImmediate indx should be 4");
9982 struct VertexAttrib2f {
9983 typedef VertexAttrib2f ValueType;
9984 static const CommandId kCmdId = kVertexAttrib2f;
9985 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9986 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9988 static uint32_t ComputeSize() {
9989 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9992 void SetHeader() { header.SetCmd<ValueType>(); }
9994 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
9995 SetHeader();
9996 indx = _indx;
9997 x = _x;
9998 y = _y;
10001 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
10002 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
10003 return NextCmdAddress<ValueType>(cmd);
10006 gpu::CommandHeader header;
10007 uint32_t indx;
10008 float x;
10009 float y;
10012 static_assert(sizeof(VertexAttrib2f) == 16,
10013 "size of VertexAttrib2f should be 16");
10014 static_assert(offsetof(VertexAttrib2f, header) == 0,
10015 "offset of VertexAttrib2f header should be 0");
10016 static_assert(offsetof(VertexAttrib2f, indx) == 4,
10017 "offset of VertexAttrib2f indx should be 4");
10018 static_assert(offsetof(VertexAttrib2f, x) == 8,
10019 "offset of VertexAttrib2f x should be 8");
10020 static_assert(offsetof(VertexAttrib2f, y) == 12,
10021 "offset of VertexAttrib2f y should be 12");
10023 struct VertexAttrib2fvImmediate {
10024 typedef VertexAttrib2fvImmediate ValueType;
10025 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
10026 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10027 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10029 static uint32_t ComputeDataSize() {
10030 return static_cast<uint32_t>(sizeof(GLfloat) * 2);
10033 static uint32_t ComputeSize() {
10034 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10037 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10039 void Init(GLuint _indx, const GLfloat* _values) {
10040 SetHeader();
10041 indx = _indx;
10042 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10045 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10046 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10047 const uint32_t size = ComputeSize();
10048 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10051 gpu::CommandHeader header;
10052 uint32_t indx;
10055 static_assert(sizeof(VertexAttrib2fvImmediate) == 8,
10056 "size of VertexAttrib2fvImmediate should be 8");
10057 static_assert(offsetof(VertexAttrib2fvImmediate, header) == 0,
10058 "offset of VertexAttrib2fvImmediate header should be 0");
10059 static_assert(offsetof(VertexAttrib2fvImmediate, indx) == 4,
10060 "offset of VertexAttrib2fvImmediate indx should be 4");
10062 struct VertexAttrib3f {
10063 typedef VertexAttrib3f ValueType;
10064 static const CommandId kCmdId = kVertexAttrib3f;
10065 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10066 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10068 static uint32_t ComputeSize() {
10069 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10072 void SetHeader() { header.SetCmd<ValueType>(); }
10074 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
10075 SetHeader();
10076 indx = _indx;
10077 x = _x;
10078 y = _y;
10079 z = _z;
10082 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
10083 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
10084 return NextCmdAddress<ValueType>(cmd);
10087 gpu::CommandHeader header;
10088 uint32_t indx;
10089 float x;
10090 float y;
10091 float z;
10094 static_assert(sizeof(VertexAttrib3f) == 20,
10095 "size of VertexAttrib3f should be 20");
10096 static_assert(offsetof(VertexAttrib3f, header) == 0,
10097 "offset of VertexAttrib3f header should be 0");
10098 static_assert(offsetof(VertexAttrib3f, indx) == 4,
10099 "offset of VertexAttrib3f indx should be 4");
10100 static_assert(offsetof(VertexAttrib3f, x) == 8,
10101 "offset of VertexAttrib3f x should be 8");
10102 static_assert(offsetof(VertexAttrib3f, y) == 12,
10103 "offset of VertexAttrib3f y should be 12");
10104 static_assert(offsetof(VertexAttrib3f, z) == 16,
10105 "offset of VertexAttrib3f z should be 16");
10107 struct VertexAttrib3fvImmediate {
10108 typedef VertexAttrib3fvImmediate ValueType;
10109 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
10110 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10111 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10113 static uint32_t ComputeDataSize() {
10114 return static_cast<uint32_t>(sizeof(GLfloat) * 3);
10117 static uint32_t ComputeSize() {
10118 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10121 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10123 void Init(GLuint _indx, const GLfloat* _values) {
10124 SetHeader();
10125 indx = _indx;
10126 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10129 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10130 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10131 const uint32_t size = ComputeSize();
10132 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10135 gpu::CommandHeader header;
10136 uint32_t indx;
10139 static_assert(sizeof(VertexAttrib3fvImmediate) == 8,
10140 "size of VertexAttrib3fvImmediate should be 8");
10141 static_assert(offsetof(VertexAttrib3fvImmediate, header) == 0,
10142 "offset of VertexAttrib3fvImmediate header should be 0");
10143 static_assert(offsetof(VertexAttrib3fvImmediate, indx) == 4,
10144 "offset of VertexAttrib3fvImmediate indx should be 4");
10146 struct VertexAttrib4f {
10147 typedef VertexAttrib4f ValueType;
10148 static const CommandId kCmdId = kVertexAttrib4f;
10149 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10150 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10152 static uint32_t ComputeSize() {
10153 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10156 void SetHeader() { header.SetCmd<ValueType>(); }
10158 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
10159 SetHeader();
10160 indx = _indx;
10161 x = _x;
10162 y = _y;
10163 z = _z;
10164 w = _w;
10167 void* Set(void* cmd,
10168 GLuint _indx,
10169 GLfloat _x,
10170 GLfloat _y,
10171 GLfloat _z,
10172 GLfloat _w) {
10173 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10174 return NextCmdAddress<ValueType>(cmd);
10177 gpu::CommandHeader header;
10178 uint32_t indx;
10179 float x;
10180 float y;
10181 float z;
10182 float w;
10185 static_assert(sizeof(VertexAttrib4f) == 24,
10186 "size of VertexAttrib4f should be 24");
10187 static_assert(offsetof(VertexAttrib4f, header) == 0,
10188 "offset of VertexAttrib4f header should be 0");
10189 static_assert(offsetof(VertexAttrib4f, indx) == 4,
10190 "offset of VertexAttrib4f indx should be 4");
10191 static_assert(offsetof(VertexAttrib4f, x) == 8,
10192 "offset of VertexAttrib4f x should be 8");
10193 static_assert(offsetof(VertexAttrib4f, y) == 12,
10194 "offset of VertexAttrib4f y should be 12");
10195 static_assert(offsetof(VertexAttrib4f, z) == 16,
10196 "offset of VertexAttrib4f z should be 16");
10197 static_assert(offsetof(VertexAttrib4f, w) == 20,
10198 "offset of VertexAttrib4f w should be 20");
10200 struct VertexAttrib4fvImmediate {
10201 typedef VertexAttrib4fvImmediate ValueType;
10202 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
10203 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10204 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10206 static uint32_t ComputeDataSize() {
10207 return static_cast<uint32_t>(sizeof(GLfloat) * 4);
10210 static uint32_t ComputeSize() {
10211 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10214 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10216 void Init(GLuint _indx, const GLfloat* _values) {
10217 SetHeader();
10218 indx = _indx;
10219 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10222 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
10223 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10224 const uint32_t size = ComputeSize();
10225 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10228 gpu::CommandHeader header;
10229 uint32_t indx;
10232 static_assert(sizeof(VertexAttrib4fvImmediate) == 8,
10233 "size of VertexAttrib4fvImmediate should be 8");
10234 static_assert(offsetof(VertexAttrib4fvImmediate, header) == 0,
10235 "offset of VertexAttrib4fvImmediate header should be 0");
10236 static_assert(offsetof(VertexAttrib4fvImmediate, indx) == 4,
10237 "offset of VertexAttrib4fvImmediate indx should be 4");
10239 struct VertexAttribI4i {
10240 typedef VertexAttribI4i ValueType;
10241 static const CommandId kCmdId = kVertexAttribI4i;
10242 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10243 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10245 static uint32_t ComputeSize() {
10246 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10249 void SetHeader() { header.SetCmd<ValueType>(); }
10251 void Init(GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
10252 SetHeader();
10253 indx = _indx;
10254 x = _x;
10255 y = _y;
10256 z = _z;
10257 w = _w;
10260 void* Set(void* cmd, GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
10261 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10262 return NextCmdAddress<ValueType>(cmd);
10265 gpu::CommandHeader header;
10266 uint32_t indx;
10267 int32_t x;
10268 int32_t y;
10269 int32_t z;
10270 int32_t w;
10273 static_assert(sizeof(VertexAttribI4i) == 24,
10274 "size of VertexAttribI4i should be 24");
10275 static_assert(offsetof(VertexAttribI4i, header) == 0,
10276 "offset of VertexAttribI4i header should be 0");
10277 static_assert(offsetof(VertexAttribI4i, indx) == 4,
10278 "offset of VertexAttribI4i indx should be 4");
10279 static_assert(offsetof(VertexAttribI4i, x) == 8,
10280 "offset of VertexAttribI4i x should be 8");
10281 static_assert(offsetof(VertexAttribI4i, y) == 12,
10282 "offset of VertexAttribI4i y should be 12");
10283 static_assert(offsetof(VertexAttribI4i, z) == 16,
10284 "offset of VertexAttribI4i z should be 16");
10285 static_assert(offsetof(VertexAttribI4i, w) == 20,
10286 "offset of VertexAttribI4i w should be 20");
10288 struct VertexAttribI4ivImmediate {
10289 typedef VertexAttribI4ivImmediate ValueType;
10290 static const CommandId kCmdId = kVertexAttribI4ivImmediate;
10291 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10292 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10294 static uint32_t ComputeDataSize() {
10295 return static_cast<uint32_t>(sizeof(GLint) * 4);
10298 static uint32_t ComputeSize() {
10299 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10302 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10304 void Init(GLuint _indx, const GLint* _values) {
10305 SetHeader();
10306 indx = _indx;
10307 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10310 void* Set(void* cmd, GLuint _indx, const GLint* _values) {
10311 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10312 const uint32_t size = ComputeSize();
10313 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10316 gpu::CommandHeader header;
10317 uint32_t indx;
10320 static_assert(sizeof(VertexAttribI4ivImmediate) == 8,
10321 "size of VertexAttribI4ivImmediate should be 8");
10322 static_assert(offsetof(VertexAttribI4ivImmediate, header) == 0,
10323 "offset of VertexAttribI4ivImmediate header should be 0");
10324 static_assert(offsetof(VertexAttribI4ivImmediate, indx) == 4,
10325 "offset of VertexAttribI4ivImmediate indx should be 4");
10327 struct VertexAttribI4ui {
10328 typedef VertexAttribI4ui ValueType;
10329 static const CommandId kCmdId = kVertexAttribI4ui;
10330 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10331 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10333 static uint32_t ComputeSize() {
10334 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10337 void SetHeader() { header.SetCmd<ValueType>(); }
10339 void Init(GLuint _indx, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
10340 SetHeader();
10341 indx = _indx;
10342 x = _x;
10343 y = _y;
10344 z = _z;
10345 w = _w;
10348 void* Set(void* cmd,
10349 GLuint _indx,
10350 GLuint _x,
10351 GLuint _y,
10352 GLuint _z,
10353 GLuint _w) {
10354 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
10355 return NextCmdAddress<ValueType>(cmd);
10358 gpu::CommandHeader header;
10359 uint32_t indx;
10360 uint32_t x;
10361 uint32_t y;
10362 uint32_t z;
10363 uint32_t w;
10366 static_assert(sizeof(VertexAttribI4ui) == 24,
10367 "size of VertexAttribI4ui should be 24");
10368 static_assert(offsetof(VertexAttribI4ui, header) == 0,
10369 "offset of VertexAttribI4ui header should be 0");
10370 static_assert(offsetof(VertexAttribI4ui, indx) == 4,
10371 "offset of VertexAttribI4ui indx should be 4");
10372 static_assert(offsetof(VertexAttribI4ui, x) == 8,
10373 "offset of VertexAttribI4ui x should be 8");
10374 static_assert(offsetof(VertexAttribI4ui, y) == 12,
10375 "offset of VertexAttribI4ui y should be 12");
10376 static_assert(offsetof(VertexAttribI4ui, z) == 16,
10377 "offset of VertexAttribI4ui z should be 16");
10378 static_assert(offsetof(VertexAttribI4ui, w) == 20,
10379 "offset of VertexAttribI4ui w should be 20");
10381 struct VertexAttribI4uivImmediate {
10382 typedef VertexAttribI4uivImmediate ValueType;
10383 static const CommandId kCmdId = kVertexAttribI4uivImmediate;
10384 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10385 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10387 static uint32_t ComputeDataSize() {
10388 return static_cast<uint32_t>(sizeof(GLuint) * 4);
10391 static uint32_t ComputeSize() {
10392 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
10395 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
10397 void Init(GLuint _indx, const GLuint* _values) {
10398 SetHeader();
10399 indx = _indx;
10400 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
10403 void* Set(void* cmd, GLuint _indx, const GLuint* _values) {
10404 static_cast<ValueType*>(cmd)->Init(_indx, _values);
10405 const uint32_t size = ComputeSize();
10406 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10409 gpu::CommandHeader header;
10410 uint32_t indx;
10413 static_assert(sizeof(VertexAttribI4uivImmediate) == 8,
10414 "size of VertexAttribI4uivImmediate should be 8");
10415 static_assert(offsetof(VertexAttribI4uivImmediate, header) == 0,
10416 "offset of VertexAttribI4uivImmediate header should be 0");
10417 static_assert(offsetof(VertexAttribI4uivImmediate, indx) == 4,
10418 "offset of VertexAttribI4uivImmediate indx should be 4");
10420 struct VertexAttribIPointer {
10421 typedef VertexAttribIPointer ValueType;
10422 static const CommandId kCmdId = kVertexAttribIPointer;
10423 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10424 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10426 static uint32_t ComputeSize() {
10427 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10430 void SetHeader() { header.SetCmd<ValueType>(); }
10432 void Init(GLuint _indx,
10433 GLint _size,
10434 GLenum _type,
10435 GLsizei _stride,
10436 GLuint _offset) {
10437 SetHeader();
10438 indx = _indx;
10439 size = _size;
10440 type = _type;
10441 stride = _stride;
10442 offset = _offset;
10445 void* Set(void* cmd,
10446 GLuint _indx,
10447 GLint _size,
10448 GLenum _type,
10449 GLsizei _stride,
10450 GLuint _offset) {
10451 static_cast<ValueType*>(cmd)->Init(_indx, _size, _type, _stride, _offset);
10452 return NextCmdAddress<ValueType>(cmd);
10455 gpu::CommandHeader header;
10456 uint32_t indx;
10457 int32_t size;
10458 uint32_t type;
10459 int32_t stride;
10460 uint32_t offset;
10463 static_assert(sizeof(VertexAttribIPointer) == 24,
10464 "size of VertexAttribIPointer should be 24");
10465 static_assert(offsetof(VertexAttribIPointer, header) == 0,
10466 "offset of VertexAttribIPointer header should be 0");
10467 static_assert(offsetof(VertexAttribIPointer, indx) == 4,
10468 "offset of VertexAttribIPointer indx should be 4");
10469 static_assert(offsetof(VertexAttribIPointer, size) == 8,
10470 "offset of VertexAttribIPointer size should be 8");
10471 static_assert(offsetof(VertexAttribIPointer, type) == 12,
10472 "offset of VertexAttribIPointer type should be 12");
10473 static_assert(offsetof(VertexAttribIPointer, stride) == 16,
10474 "offset of VertexAttribIPointer stride should be 16");
10475 static_assert(offsetof(VertexAttribIPointer, offset) == 20,
10476 "offset of VertexAttribIPointer offset should be 20");
10478 struct VertexAttribPointer {
10479 typedef VertexAttribPointer ValueType;
10480 static const CommandId kCmdId = kVertexAttribPointer;
10481 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10482 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10484 static uint32_t ComputeSize() {
10485 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10488 void SetHeader() { header.SetCmd<ValueType>(); }
10490 void Init(GLuint _indx,
10491 GLint _size,
10492 GLenum _type,
10493 GLboolean _normalized,
10494 GLsizei _stride,
10495 GLuint _offset) {
10496 SetHeader();
10497 indx = _indx;
10498 size = _size;
10499 type = _type;
10500 normalized = _normalized;
10501 stride = _stride;
10502 offset = _offset;
10505 void* Set(void* cmd,
10506 GLuint _indx,
10507 GLint _size,
10508 GLenum _type,
10509 GLboolean _normalized,
10510 GLsizei _stride,
10511 GLuint _offset) {
10512 static_cast<ValueType*>(cmd)
10513 ->Init(_indx, _size, _type, _normalized, _stride, _offset);
10514 return NextCmdAddress<ValueType>(cmd);
10517 gpu::CommandHeader header;
10518 uint32_t indx;
10519 int32_t size;
10520 uint32_t type;
10521 uint32_t normalized;
10522 int32_t stride;
10523 uint32_t offset;
10526 static_assert(sizeof(VertexAttribPointer) == 28,
10527 "size of VertexAttribPointer should be 28");
10528 static_assert(offsetof(VertexAttribPointer, header) == 0,
10529 "offset of VertexAttribPointer header should be 0");
10530 static_assert(offsetof(VertexAttribPointer, indx) == 4,
10531 "offset of VertexAttribPointer indx should be 4");
10532 static_assert(offsetof(VertexAttribPointer, size) == 8,
10533 "offset of VertexAttribPointer size should be 8");
10534 static_assert(offsetof(VertexAttribPointer, type) == 12,
10535 "offset of VertexAttribPointer type should be 12");
10536 static_assert(offsetof(VertexAttribPointer, normalized) == 16,
10537 "offset of VertexAttribPointer normalized should be 16");
10538 static_assert(offsetof(VertexAttribPointer, stride) == 20,
10539 "offset of VertexAttribPointer stride should be 20");
10540 static_assert(offsetof(VertexAttribPointer, offset) == 24,
10541 "offset of VertexAttribPointer offset should be 24");
10543 struct Viewport {
10544 typedef Viewport ValueType;
10545 static const CommandId kCmdId = kViewport;
10546 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10547 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10549 static uint32_t ComputeSize() {
10550 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10553 void SetHeader() { header.SetCmd<ValueType>(); }
10555 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
10556 SetHeader();
10557 x = _x;
10558 y = _y;
10559 width = _width;
10560 height = _height;
10563 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
10564 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
10565 return NextCmdAddress<ValueType>(cmd);
10568 gpu::CommandHeader header;
10569 int32_t x;
10570 int32_t y;
10571 int32_t width;
10572 int32_t height;
10575 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20");
10576 static_assert(offsetof(Viewport, header) == 0,
10577 "offset of Viewport header should be 0");
10578 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4");
10579 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8");
10580 static_assert(offsetof(Viewport, width) == 12,
10581 "offset of Viewport width should be 12");
10582 static_assert(offsetof(Viewport, height) == 16,
10583 "offset of Viewport height should be 16");
10585 struct WaitSync {
10586 typedef WaitSync ValueType;
10587 static const CommandId kCmdId = kWaitSync;
10588 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10589 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10591 static uint32_t ComputeSize() {
10592 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10595 void SetHeader() { header.SetCmd<ValueType>(); }
10597 void Init(GLuint _sync,
10598 GLbitfield _flags,
10599 GLuint _timeout_0,
10600 GLuint _timeout_1) {
10601 SetHeader();
10602 sync = _sync;
10603 flags = _flags;
10604 timeout_0 = _timeout_0;
10605 timeout_1 = _timeout_1;
10608 void* Set(void* cmd,
10609 GLuint _sync,
10610 GLbitfield _flags,
10611 GLuint _timeout_0,
10612 GLuint _timeout_1) {
10613 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1);
10614 return NextCmdAddress<ValueType>(cmd);
10617 gpu::CommandHeader header;
10618 uint32_t sync;
10619 uint32_t flags;
10620 uint32_t timeout_0;
10621 uint32_t timeout_1;
10624 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20");
10625 static_assert(offsetof(WaitSync, header) == 0,
10626 "offset of WaitSync header should be 0");
10627 static_assert(offsetof(WaitSync, sync) == 4,
10628 "offset of WaitSync sync should be 4");
10629 static_assert(offsetof(WaitSync, flags) == 8,
10630 "offset of WaitSync flags should be 8");
10631 static_assert(offsetof(WaitSync, timeout_0) == 12,
10632 "offset of WaitSync timeout_0 should be 12");
10633 static_assert(offsetof(WaitSync, timeout_1) == 16,
10634 "offset of WaitSync timeout_1 should be 16");
10636 struct BlitFramebufferCHROMIUM {
10637 typedef BlitFramebufferCHROMIUM ValueType;
10638 static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
10639 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10640 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10642 static uint32_t ComputeSize() {
10643 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10646 void SetHeader() { header.SetCmd<ValueType>(); }
10648 void Init(GLint _srcX0,
10649 GLint _srcY0,
10650 GLint _srcX1,
10651 GLint _srcY1,
10652 GLint _dstX0,
10653 GLint _dstY0,
10654 GLint _dstX1,
10655 GLint _dstY1,
10656 GLbitfield _mask,
10657 GLenum _filter) {
10658 SetHeader();
10659 srcX0 = _srcX0;
10660 srcY0 = _srcY0;
10661 srcX1 = _srcX1;
10662 srcY1 = _srcY1;
10663 dstX0 = _dstX0;
10664 dstY0 = _dstY0;
10665 dstX1 = _dstX1;
10666 dstY1 = _dstY1;
10667 mask = _mask;
10668 filter = _filter;
10671 void* Set(void* cmd,
10672 GLint _srcX0,
10673 GLint _srcY0,
10674 GLint _srcX1,
10675 GLint _srcY1,
10676 GLint _dstX0,
10677 GLint _dstY0,
10678 GLint _dstX1,
10679 GLint _dstY1,
10680 GLbitfield _mask,
10681 GLenum _filter) {
10682 static_cast<ValueType*>(cmd)->Init(_srcX0, _srcY0, _srcX1, _srcY1, _dstX0,
10683 _dstY0, _dstX1, _dstY1, _mask, _filter);
10684 return NextCmdAddress<ValueType>(cmd);
10687 gpu::CommandHeader header;
10688 int32_t srcX0;
10689 int32_t srcY0;
10690 int32_t srcX1;
10691 int32_t srcY1;
10692 int32_t dstX0;
10693 int32_t dstY0;
10694 int32_t dstX1;
10695 int32_t dstY1;
10696 uint32_t mask;
10697 uint32_t filter;
10700 static_assert(sizeof(BlitFramebufferCHROMIUM) == 44,
10701 "size of BlitFramebufferCHROMIUM should be 44");
10702 static_assert(offsetof(BlitFramebufferCHROMIUM, header) == 0,
10703 "offset of BlitFramebufferCHROMIUM header should be 0");
10704 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
10705 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
10706 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
10707 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
10708 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
10709 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
10710 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
10711 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
10712 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
10713 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
10714 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
10715 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
10716 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
10717 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
10718 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
10719 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
10720 static_assert(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
10721 "offset of BlitFramebufferCHROMIUM mask should be 36");
10722 static_assert(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
10723 "offset of BlitFramebufferCHROMIUM filter should be 40");
10725 // GL_CHROMIUM_framebuffer_multisample
10726 struct RenderbufferStorageMultisampleCHROMIUM {
10727 typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
10728 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
10729 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10730 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10732 static uint32_t ComputeSize() {
10733 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10736 void SetHeader() { header.SetCmd<ValueType>(); }
10738 void Init(GLenum _target,
10739 GLsizei _samples,
10740 GLenum _internalformat,
10741 GLsizei _width,
10742 GLsizei _height) {
10743 SetHeader();
10744 target = _target;
10745 samples = _samples;
10746 internalformat = _internalformat;
10747 width = _width;
10748 height = _height;
10751 void* Set(void* cmd,
10752 GLenum _target,
10753 GLsizei _samples,
10754 GLenum _internalformat,
10755 GLsizei _width,
10756 GLsizei _height) {
10757 static_cast<ValueType*>(cmd)
10758 ->Init(_target, _samples, _internalformat, _width, _height);
10759 return NextCmdAddress<ValueType>(cmd);
10762 gpu::CommandHeader header;
10763 uint32_t target;
10764 int32_t samples;
10765 uint32_t internalformat;
10766 int32_t width;
10767 int32_t height;
10770 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
10771 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10772 static_assert(
10773 offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
10774 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10775 static_assert(
10776 offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
10777 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10778 static_assert(
10779 offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
10780 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10781 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM,
10782 internalformat) == 12,
10783 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10784 "should be 12");
10785 static_assert(
10786 offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
10787 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10788 static_assert(
10789 offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
10790 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10792 // GL_EXT_multisampled_render_to_texture
10793 struct RenderbufferStorageMultisampleEXT {
10794 typedef RenderbufferStorageMultisampleEXT ValueType;
10795 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
10796 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10797 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10799 static uint32_t ComputeSize() {
10800 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10803 void SetHeader() { header.SetCmd<ValueType>(); }
10805 void Init(GLenum _target,
10806 GLsizei _samples,
10807 GLenum _internalformat,
10808 GLsizei _width,
10809 GLsizei _height) {
10810 SetHeader();
10811 target = _target;
10812 samples = _samples;
10813 internalformat = _internalformat;
10814 width = _width;
10815 height = _height;
10818 void* Set(void* cmd,
10819 GLenum _target,
10820 GLsizei _samples,
10821 GLenum _internalformat,
10822 GLsizei _width,
10823 GLsizei _height) {
10824 static_cast<ValueType*>(cmd)
10825 ->Init(_target, _samples, _internalformat, _width, _height);
10826 return NextCmdAddress<ValueType>(cmd);
10829 gpu::CommandHeader header;
10830 uint32_t target;
10831 int32_t samples;
10832 uint32_t internalformat;
10833 int32_t width;
10834 int32_t height;
10837 static_assert(sizeof(RenderbufferStorageMultisampleEXT) == 24,
10838 "size of RenderbufferStorageMultisampleEXT should be 24");
10839 static_assert(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
10840 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10841 static_assert(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
10842 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10843 static_assert(
10844 offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
10845 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10846 static_assert(
10847 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
10848 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10849 static_assert(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
10850 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10851 static_assert(
10852 offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
10853 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10855 struct FramebufferTexture2DMultisampleEXT {
10856 typedef FramebufferTexture2DMultisampleEXT ValueType;
10857 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
10858 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10859 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10861 static uint32_t ComputeSize() {
10862 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10865 void SetHeader() { header.SetCmd<ValueType>(); }
10867 void Init(GLenum _target,
10868 GLenum _attachment,
10869 GLenum _textarget,
10870 GLuint _texture,
10871 GLsizei _samples) {
10872 SetHeader();
10873 target = _target;
10874 attachment = _attachment;
10875 textarget = _textarget;
10876 texture = _texture;
10877 samples = _samples;
10880 void* Set(void* cmd,
10881 GLenum _target,
10882 GLenum _attachment,
10883 GLenum _textarget,
10884 GLuint _texture,
10885 GLsizei _samples) {
10886 static_cast<ValueType*>(cmd)
10887 ->Init(_target, _attachment, _textarget, _texture, _samples);
10888 return NextCmdAddress<ValueType>(cmd);
10891 gpu::CommandHeader header;
10892 uint32_t target;
10893 uint32_t attachment;
10894 uint32_t textarget;
10895 uint32_t texture;
10896 int32_t samples;
10897 static const int32_t level = 0;
10900 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24,
10901 "size of FramebufferTexture2DMultisampleEXT should be 24");
10902 static_assert(
10903 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
10904 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10905 static_assert(
10906 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
10907 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10908 static_assert(
10909 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
10910 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10911 static_assert(
10912 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
10913 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10914 static_assert(
10915 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
10916 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10917 static_assert(
10918 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20,
10919 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10921 struct TexStorage2DEXT {
10922 typedef TexStorage2DEXT ValueType;
10923 static const CommandId kCmdId = kTexStorage2DEXT;
10924 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10925 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10927 static uint32_t ComputeSize() {
10928 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10931 void SetHeader() { header.SetCmd<ValueType>(); }
10933 void Init(GLenum _target,
10934 GLsizei _levels,
10935 GLenum _internalFormat,
10936 GLsizei _width,
10937 GLsizei _height) {
10938 SetHeader();
10939 target = _target;
10940 levels = _levels;
10941 internalFormat = _internalFormat;
10942 width = _width;
10943 height = _height;
10946 void* Set(void* cmd,
10947 GLenum _target,
10948 GLsizei _levels,
10949 GLenum _internalFormat,
10950 GLsizei _width,
10951 GLsizei _height) {
10952 static_cast<ValueType*>(cmd)
10953 ->Init(_target, _levels, _internalFormat, _width, _height);
10954 return NextCmdAddress<ValueType>(cmd);
10957 gpu::CommandHeader header;
10958 uint32_t target;
10959 int32_t levels;
10960 uint32_t internalFormat;
10961 int32_t width;
10962 int32_t height;
10965 static_assert(sizeof(TexStorage2DEXT) == 24,
10966 "size of TexStorage2DEXT should be 24");
10967 static_assert(offsetof(TexStorage2DEXT, header) == 0,
10968 "offset of TexStorage2DEXT header should be 0");
10969 static_assert(offsetof(TexStorage2DEXT, target) == 4,
10970 "offset of TexStorage2DEXT target should be 4");
10971 static_assert(offsetof(TexStorage2DEXT, levels) == 8,
10972 "offset of TexStorage2DEXT levels should be 8");
10973 static_assert(offsetof(TexStorage2DEXT, internalFormat) == 12,
10974 "offset of TexStorage2DEXT internalFormat should be 12");
10975 static_assert(offsetof(TexStorage2DEXT, width) == 16,
10976 "offset of TexStorage2DEXT width should be 16");
10977 static_assert(offsetof(TexStorage2DEXT, height) == 20,
10978 "offset of TexStorage2DEXT height should be 20");
10980 struct GenQueriesEXTImmediate {
10981 typedef GenQueriesEXTImmediate ValueType;
10982 static const CommandId kCmdId = kGenQueriesEXTImmediate;
10983 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10984 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10986 static uint32_t ComputeDataSize(GLsizei n) {
10987 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
10990 static uint32_t ComputeSize(GLsizei n) {
10991 return static_cast<uint32_t>(sizeof(ValueType) +
10992 ComputeDataSize(n)); // NOLINT
10995 void SetHeader(GLsizei n) {
10996 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
10999 void Init(GLsizei _n, GLuint* _queries) {
11000 SetHeader(_n);
11001 n = _n;
11002 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
11005 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
11006 static_cast<ValueType*>(cmd)->Init(_n, _queries);
11007 const uint32_t size = ComputeSize(_n);
11008 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11011 gpu::CommandHeader header;
11012 int32_t n;
11015 static_assert(sizeof(GenQueriesEXTImmediate) == 8,
11016 "size of GenQueriesEXTImmediate should be 8");
11017 static_assert(offsetof(GenQueriesEXTImmediate, header) == 0,
11018 "offset of GenQueriesEXTImmediate header should be 0");
11019 static_assert(offsetof(GenQueriesEXTImmediate, n) == 4,
11020 "offset of GenQueriesEXTImmediate n should be 4");
11022 struct DeleteQueriesEXTImmediate {
11023 typedef DeleteQueriesEXTImmediate ValueType;
11024 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
11025 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11026 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11028 static uint32_t ComputeDataSize(GLsizei n) {
11029 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11032 static uint32_t ComputeSize(GLsizei n) {
11033 return static_cast<uint32_t>(sizeof(ValueType) +
11034 ComputeDataSize(n)); // NOLINT
11037 void SetHeader(GLsizei n) {
11038 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11041 void Init(GLsizei _n, const GLuint* _queries) {
11042 SetHeader(_n);
11043 n = _n;
11044 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
11047 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
11048 static_cast<ValueType*>(cmd)->Init(_n, _queries);
11049 const uint32_t size = ComputeSize(_n);
11050 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11053 gpu::CommandHeader header;
11054 int32_t n;
11057 static_assert(sizeof(DeleteQueriesEXTImmediate) == 8,
11058 "size of DeleteQueriesEXTImmediate should be 8");
11059 static_assert(offsetof(DeleteQueriesEXTImmediate, header) == 0,
11060 "offset of DeleteQueriesEXTImmediate header should be 0");
11061 static_assert(offsetof(DeleteQueriesEXTImmediate, n) == 4,
11062 "offset of DeleteQueriesEXTImmediate n should be 4");
11064 struct BeginQueryEXT {
11065 typedef BeginQueryEXT ValueType;
11066 static const CommandId kCmdId = kBeginQueryEXT;
11067 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11068 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11070 static uint32_t ComputeSize() {
11071 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11074 void SetHeader() { header.SetCmd<ValueType>(); }
11076 void Init(GLenum _target,
11077 GLuint _id,
11078 uint32_t _sync_data_shm_id,
11079 uint32_t _sync_data_shm_offset) {
11080 SetHeader();
11081 target = _target;
11082 id = _id;
11083 sync_data_shm_id = _sync_data_shm_id;
11084 sync_data_shm_offset = _sync_data_shm_offset;
11087 void* Set(void* cmd,
11088 GLenum _target,
11089 GLuint _id,
11090 uint32_t _sync_data_shm_id,
11091 uint32_t _sync_data_shm_offset) {
11092 static_cast<ValueType*>(cmd)
11093 ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
11094 return NextCmdAddress<ValueType>(cmd);
11097 gpu::CommandHeader header;
11098 uint32_t target;
11099 uint32_t id;
11100 uint32_t sync_data_shm_id;
11101 uint32_t sync_data_shm_offset;
11104 static_assert(sizeof(BeginQueryEXT) == 20,
11105 "size of BeginQueryEXT should be 20");
11106 static_assert(offsetof(BeginQueryEXT, header) == 0,
11107 "offset of BeginQueryEXT header should be 0");
11108 static_assert(offsetof(BeginQueryEXT, target) == 4,
11109 "offset of BeginQueryEXT target should be 4");
11110 static_assert(offsetof(BeginQueryEXT, id) == 8,
11111 "offset of BeginQueryEXT id should be 8");
11112 static_assert(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
11113 "offset of BeginQueryEXT sync_data_shm_id should be 12");
11114 static_assert(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
11115 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
11117 struct BeginTransformFeedback {
11118 typedef BeginTransformFeedback ValueType;
11119 static const CommandId kCmdId = kBeginTransformFeedback;
11120 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11121 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11123 static uint32_t ComputeSize() {
11124 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11127 void SetHeader() { header.SetCmd<ValueType>(); }
11129 void Init(GLenum _primitivemode) {
11130 SetHeader();
11131 primitivemode = _primitivemode;
11134 void* Set(void* cmd, GLenum _primitivemode) {
11135 static_cast<ValueType*>(cmd)->Init(_primitivemode);
11136 return NextCmdAddress<ValueType>(cmd);
11139 gpu::CommandHeader header;
11140 uint32_t primitivemode;
11143 static_assert(sizeof(BeginTransformFeedback) == 8,
11144 "size of BeginTransformFeedback should be 8");
11145 static_assert(offsetof(BeginTransformFeedback, header) == 0,
11146 "offset of BeginTransformFeedback header should be 0");
11147 static_assert(offsetof(BeginTransformFeedback, primitivemode) == 4,
11148 "offset of BeginTransformFeedback primitivemode should be 4");
11150 struct EndQueryEXT {
11151 typedef EndQueryEXT ValueType;
11152 static const CommandId kCmdId = kEndQueryEXT;
11153 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11154 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11156 static uint32_t ComputeSize() {
11157 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11160 void SetHeader() { header.SetCmd<ValueType>(); }
11162 void Init(GLenum _target, GLuint _submit_count) {
11163 SetHeader();
11164 target = _target;
11165 submit_count = _submit_count;
11168 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
11169 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
11170 return NextCmdAddress<ValueType>(cmd);
11173 gpu::CommandHeader header;
11174 uint32_t target;
11175 uint32_t submit_count;
11178 static_assert(sizeof(EndQueryEXT) == 12, "size of EndQueryEXT should be 12");
11179 static_assert(offsetof(EndQueryEXT, header) == 0,
11180 "offset of EndQueryEXT header should be 0");
11181 static_assert(offsetof(EndQueryEXT, target) == 4,
11182 "offset of EndQueryEXT target should be 4");
11183 static_assert(offsetof(EndQueryEXT, submit_count) == 8,
11184 "offset of EndQueryEXT submit_count should be 8");
11186 struct EndTransformFeedback {
11187 typedef EndTransformFeedback ValueType;
11188 static const CommandId kCmdId = kEndTransformFeedback;
11189 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11190 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11192 static uint32_t ComputeSize() {
11193 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11196 void SetHeader() { header.SetCmd<ValueType>(); }
11198 void Init() { SetHeader(); }
11200 void* Set(void* cmd) {
11201 static_cast<ValueType*>(cmd)->Init();
11202 return NextCmdAddress<ValueType>(cmd);
11205 gpu::CommandHeader header;
11208 static_assert(sizeof(EndTransformFeedback) == 4,
11209 "size of EndTransformFeedback should be 4");
11210 static_assert(offsetof(EndTransformFeedback, header) == 0,
11211 "offset of EndTransformFeedback header should be 0");
11213 struct InsertEventMarkerEXT {
11214 typedef InsertEventMarkerEXT ValueType;
11215 static const CommandId kCmdId = kInsertEventMarkerEXT;
11216 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11217 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11219 static uint32_t ComputeSize() {
11220 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11223 void SetHeader() { header.SetCmd<ValueType>(); }
11225 void Init(GLuint _bucket_id) {
11226 SetHeader();
11227 bucket_id = _bucket_id;
11230 void* Set(void* cmd, GLuint _bucket_id) {
11231 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11232 return NextCmdAddress<ValueType>(cmd);
11235 gpu::CommandHeader header;
11236 uint32_t bucket_id;
11239 static_assert(sizeof(InsertEventMarkerEXT) == 8,
11240 "size of InsertEventMarkerEXT should be 8");
11241 static_assert(offsetof(InsertEventMarkerEXT, header) == 0,
11242 "offset of InsertEventMarkerEXT header should be 0");
11243 static_assert(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
11244 "offset of InsertEventMarkerEXT bucket_id should be 4");
11246 struct PushGroupMarkerEXT {
11247 typedef PushGroupMarkerEXT ValueType;
11248 static const CommandId kCmdId = kPushGroupMarkerEXT;
11249 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11250 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11252 static uint32_t ComputeSize() {
11253 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11256 void SetHeader() { header.SetCmd<ValueType>(); }
11258 void Init(GLuint _bucket_id) {
11259 SetHeader();
11260 bucket_id = _bucket_id;
11263 void* Set(void* cmd, GLuint _bucket_id) {
11264 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11265 return NextCmdAddress<ValueType>(cmd);
11268 gpu::CommandHeader header;
11269 uint32_t bucket_id;
11272 static_assert(sizeof(PushGroupMarkerEXT) == 8,
11273 "size of PushGroupMarkerEXT should be 8");
11274 static_assert(offsetof(PushGroupMarkerEXT, header) == 0,
11275 "offset of PushGroupMarkerEXT header should be 0");
11276 static_assert(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
11277 "offset of PushGroupMarkerEXT bucket_id should be 4");
11279 struct PopGroupMarkerEXT {
11280 typedef PopGroupMarkerEXT ValueType;
11281 static const CommandId kCmdId = kPopGroupMarkerEXT;
11282 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11283 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11285 static uint32_t ComputeSize() {
11286 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11289 void SetHeader() { header.SetCmd<ValueType>(); }
11291 void Init() { SetHeader(); }
11293 void* Set(void* cmd) {
11294 static_cast<ValueType*>(cmd)->Init();
11295 return NextCmdAddress<ValueType>(cmd);
11298 gpu::CommandHeader header;
11301 static_assert(sizeof(PopGroupMarkerEXT) == 4,
11302 "size of PopGroupMarkerEXT should be 4");
11303 static_assert(offsetof(PopGroupMarkerEXT, header) == 0,
11304 "offset of PopGroupMarkerEXT header should be 0");
11306 struct GenVertexArraysOESImmediate {
11307 typedef GenVertexArraysOESImmediate ValueType;
11308 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
11309 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11310 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11312 static uint32_t ComputeDataSize(GLsizei n) {
11313 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11316 static uint32_t ComputeSize(GLsizei n) {
11317 return static_cast<uint32_t>(sizeof(ValueType) +
11318 ComputeDataSize(n)); // NOLINT
11321 void SetHeader(GLsizei n) {
11322 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11325 void Init(GLsizei _n, GLuint* _arrays) {
11326 SetHeader(_n);
11327 n = _n;
11328 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
11331 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
11332 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
11333 const uint32_t size = ComputeSize(_n);
11334 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11337 gpu::CommandHeader header;
11338 int32_t n;
11341 static_assert(sizeof(GenVertexArraysOESImmediate) == 8,
11342 "size of GenVertexArraysOESImmediate should be 8");
11343 static_assert(offsetof(GenVertexArraysOESImmediate, header) == 0,
11344 "offset of GenVertexArraysOESImmediate header should be 0");
11345 static_assert(offsetof(GenVertexArraysOESImmediate, n) == 4,
11346 "offset of GenVertexArraysOESImmediate n should be 4");
11348 struct DeleteVertexArraysOESImmediate {
11349 typedef DeleteVertexArraysOESImmediate ValueType;
11350 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
11351 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11352 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11354 static uint32_t ComputeDataSize(GLsizei n) {
11355 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11358 static uint32_t ComputeSize(GLsizei n) {
11359 return static_cast<uint32_t>(sizeof(ValueType) +
11360 ComputeDataSize(n)); // NOLINT
11363 void SetHeader(GLsizei n) {
11364 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11367 void Init(GLsizei _n, const GLuint* _arrays) {
11368 SetHeader(_n);
11369 n = _n;
11370 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
11373 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
11374 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
11375 const uint32_t size = ComputeSize(_n);
11376 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11379 gpu::CommandHeader header;
11380 int32_t n;
11383 static_assert(sizeof(DeleteVertexArraysOESImmediate) == 8,
11384 "size of DeleteVertexArraysOESImmediate should be 8");
11385 static_assert(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
11386 "offset of DeleteVertexArraysOESImmediate header should be 0");
11387 static_assert(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
11388 "offset of DeleteVertexArraysOESImmediate n should be 4");
11390 struct IsVertexArrayOES {
11391 typedef IsVertexArrayOES ValueType;
11392 static const CommandId kCmdId = kIsVertexArrayOES;
11393 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11394 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11396 typedef uint32_t Result;
11398 static uint32_t ComputeSize() {
11399 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11402 void SetHeader() { header.SetCmd<ValueType>(); }
11404 void Init(GLuint _array,
11405 uint32_t _result_shm_id,
11406 uint32_t _result_shm_offset) {
11407 SetHeader();
11408 array = _array;
11409 result_shm_id = _result_shm_id;
11410 result_shm_offset = _result_shm_offset;
11413 void* Set(void* cmd,
11414 GLuint _array,
11415 uint32_t _result_shm_id,
11416 uint32_t _result_shm_offset) {
11417 static_cast<ValueType*>(cmd)
11418 ->Init(_array, _result_shm_id, _result_shm_offset);
11419 return NextCmdAddress<ValueType>(cmd);
11422 gpu::CommandHeader header;
11423 uint32_t array;
11424 uint32_t result_shm_id;
11425 uint32_t result_shm_offset;
11428 static_assert(sizeof(IsVertexArrayOES) == 16,
11429 "size of IsVertexArrayOES should be 16");
11430 static_assert(offsetof(IsVertexArrayOES, header) == 0,
11431 "offset of IsVertexArrayOES header should be 0");
11432 static_assert(offsetof(IsVertexArrayOES, array) == 4,
11433 "offset of IsVertexArrayOES array should be 4");
11434 static_assert(offsetof(IsVertexArrayOES, result_shm_id) == 8,
11435 "offset of IsVertexArrayOES result_shm_id should be 8");
11436 static_assert(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
11437 "offset of IsVertexArrayOES result_shm_offset should be 12");
11439 struct BindVertexArrayOES {
11440 typedef BindVertexArrayOES ValueType;
11441 static const CommandId kCmdId = kBindVertexArrayOES;
11442 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11443 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11445 static uint32_t ComputeSize() {
11446 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11449 void SetHeader() { header.SetCmd<ValueType>(); }
11451 void Init(GLuint _array) {
11452 SetHeader();
11453 array = _array;
11456 void* Set(void* cmd, GLuint _array) {
11457 static_cast<ValueType*>(cmd)->Init(_array);
11458 return NextCmdAddress<ValueType>(cmd);
11461 gpu::CommandHeader header;
11462 uint32_t array;
11465 static_assert(sizeof(BindVertexArrayOES) == 8,
11466 "size of BindVertexArrayOES should be 8");
11467 static_assert(offsetof(BindVertexArrayOES, header) == 0,
11468 "offset of BindVertexArrayOES header should be 0");
11469 static_assert(offsetof(BindVertexArrayOES, array) == 4,
11470 "offset of BindVertexArrayOES array should be 4");
11472 struct SwapBuffers {
11473 typedef SwapBuffers ValueType;
11474 static const CommandId kCmdId = kSwapBuffers;
11475 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11476 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11478 static uint32_t ComputeSize() {
11479 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11482 void SetHeader() { header.SetCmd<ValueType>(); }
11484 void Init() { SetHeader(); }
11486 void* Set(void* cmd) {
11487 static_cast<ValueType*>(cmd)->Init();
11488 return NextCmdAddress<ValueType>(cmd);
11491 gpu::CommandHeader header;
11494 static_assert(sizeof(SwapBuffers) == 4, "size of SwapBuffers should be 4");
11495 static_assert(offsetof(SwapBuffers, header) == 0,
11496 "offset of SwapBuffers header should be 0");
11498 struct GetMaxValueInBufferCHROMIUM {
11499 typedef GetMaxValueInBufferCHROMIUM ValueType;
11500 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
11501 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11502 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11504 typedef GLuint Result;
11506 static uint32_t ComputeSize() {
11507 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11510 void SetHeader() { header.SetCmd<ValueType>(); }
11512 void Init(GLuint _buffer_id,
11513 GLsizei _count,
11514 GLenum _type,
11515 GLuint _offset,
11516 uint32_t _result_shm_id,
11517 uint32_t _result_shm_offset) {
11518 SetHeader();
11519 buffer_id = _buffer_id;
11520 count = _count;
11521 type = _type;
11522 offset = _offset;
11523 result_shm_id = _result_shm_id;
11524 result_shm_offset = _result_shm_offset;
11527 void* Set(void* cmd,
11528 GLuint _buffer_id,
11529 GLsizei _count,
11530 GLenum _type,
11531 GLuint _offset,
11532 uint32_t _result_shm_id,
11533 uint32_t _result_shm_offset) {
11534 static_cast<ValueType*>(cmd)->Init(_buffer_id, _count, _type, _offset,
11535 _result_shm_id, _result_shm_offset);
11536 return NextCmdAddress<ValueType>(cmd);
11539 gpu::CommandHeader header;
11540 uint32_t buffer_id;
11541 int32_t count;
11542 uint32_t type;
11543 uint32_t offset;
11544 uint32_t result_shm_id;
11545 uint32_t result_shm_offset;
11548 static_assert(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
11549 "size of GetMaxValueInBufferCHROMIUM should be 28");
11550 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
11551 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
11552 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
11553 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
11554 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
11555 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
11556 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
11557 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
11558 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
11559 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
11560 static_assert(
11561 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
11562 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
11563 static_assert(
11564 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
11565 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
11567 struct EnableFeatureCHROMIUM {
11568 typedef EnableFeatureCHROMIUM ValueType;
11569 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
11570 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11571 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11573 typedef GLint Result;
11575 static uint32_t ComputeSize() {
11576 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11579 void SetHeader() { header.SetCmd<ValueType>(); }
11581 void Init(GLuint _bucket_id,
11582 uint32_t _result_shm_id,
11583 uint32_t _result_shm_offset) {
11584 SetHeader();
11585 bucket_id = _bucket_id;
11586 result_shm_id = _result_shm_id;
11587 result_shm_offset = _result_shm_offset;
11590 void* Set(void* cmd,
11591 GLuint _bucket_id,
11592 uint32_t _result_shm_id,
11593 uint32_t _result_shm_offset) {
11594 static_cast<ValueType*>(cmd)
11595 ->Init(_bucket_id, _result_shm_id, _result_shm_offset);
11596 return NextCmdAddress<ValueType>(cmd);
11599 gpu::CommandHeader header;
11600 uint32_t bucket_id;
11601 uint32_t result_shm_id;
11602 uint32_t result_shm_offset;
11605 static_assert(sizeof(EnableFeatureCHROMIUM) == 16,
11606 "size of EnableFeatureCHROMIUM should be 16");
11607 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0,
11608 "offset of EnableFeatureCHROMIUM header should be 0");
11609 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
11610 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
11611 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
11612 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
11613 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
11614 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
11616 struct MapBufferRange {
11617 typedef MapBufferRange ValueType;
11618 static const CommandId kCmdId = kMapBufferRange;
11619 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11620 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11622 typedef uint32_t Result;
11624 static uint32_t ComputeSize() {
11625 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11628 void SetHeader() { header.SetCmd<ValueType>(); }
11630 void Init(GLenum _target,
11631 GLintptr _offset,
11632 GLsizeiptr _size,
11633 GLbitfield _access,
11634 uint32_t _data_shm_id,
11635 uint32_t _data_shm_offset,
11636 uint32_t _result_shm_id,
11637 uint32_t _result_shm_offset) {
11638 SetHeader();
11639 target = _target;
11640 offset = _offset;
11641 size = _size;
11642 access = _access;
11643 data_shm_id = _data_shm_id;
11644 data_shm_offset = _data_shm_offset;
11645 result_shm_id = _result_shm_id;
11646 result_shm_offset = _result_shm_offset;
11649 void* Set(void* cmd,
11650 GLenum _target,
11651 GLintptr _offset,
11652 GLsizeiptr _size,
11653 GLbitfield _access,
11654 uint32_t _data_shm_id,
11655 uint32_t _data_shm_offset,
11656 uint32_t _result_shm_id,
11657 uint32_t _result_shm_offset) {
11658 static_cast<ValueType*>(cmd)->Init(_target, _offset, _size, _access,
11659 _data_shm_id, _data_shm_offset,
11660 _result_shm_id, _result_shm_offset);
11661 return NextCmdAddress<ValueType>(cmd);
11664 gpu::CommandHeader header;
11665 uint32_t target;
11666 int32_t offset;
11667 int32_t size;
11668 uint32_t access;
11669 uint32_t data_shm_id;
11670 uint32_t data_shm_offset;
11671 uint32_t result_shm_id;
11672 uint32_t result_shm_offset;
11675 static_assert(sizeof(MapBufferRange) == 36,
11676 "size of MapBufferRange should be 36");
11677 static_assert(offsetof(MapBufferRange, header) == 0,
11678 "offset of MapBufferRange header should be 0");
11679 static_assert(offsetof(MapBufferRange, target) == 4,
11680 "offset of MapBufferRange target should be 4");
11681 static_assert(offsetof(MapBufferRange, offset) == 8,
11682 "offset of MapBufferRange offset should be 8");
11683 static_assert(offsetof(MapBufferRange, size) == 12,
11684 "offset of MapBufferRange size should be 12");
11685 static_assert(offsetof(MapBufferRange, access) == 16,
11686 "offset of MapBufferRange access should be 16");
11687 static_assert(offsetof(MapBufferRange, data_shm_id) == 20,
11688 "offset of MapBufferRange data_shm_id should be 20");
11689 static_assert(offsetof(MapBufferRange, data_shm_offset) == 24,
11690 "offset of MapBufferRange data_shm_offset should be 24");
11691 static_assert(offsetof(MapBufferRange, result_shm_id) == 28,
11692 "offset of MapBufferRange result_shm_id should be 28");
11693 static_assert(offsetof(MapBufferRange, result_shm_offset) == 32,
11694 "offset of MapBufferRange result_shm_offset should be 32");
11696 struct UnmapBuffer {
11697 typedef UnmapBuffer ValueType;
11698 static const CommandId kCmdId = kUnmapBuffer;
11699 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11700 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11702 static uint32_t ComputeSize() {
11703 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11706 void SetHeader() { header.SetCmd<ValueType>(); }
11708 void Init(GLenum _target) {
11709 SetHeader();
11710 target = _target;
11713 void* Set(void* cmd, GLenum _target) {
11714 static_cast<ValueType*>(cmd)->Init(_target);
11715 return NextCmdAddress<ValueType>(cmd);
11718 gpu::CommandHeader header;
11719 uint32_t target;
11722 static_assert(sizeof(UnmapBuffer) == 8, "size of UnmapBuffer should be 8");
11723 static_assert(offsetof(UnmapBuffer, header) == 0,
11724 "offset of UnmapBuffer header should be 0");
11725 static_assert(offsetof(UnmapBuffer, target) == 4,
11726 "offset of UnmapBuffer target should be 4");
11728 struct ResizeCHROMIUM {
11729 typedef ResizeCHROMIUM ValueType;
11730 static const CommandId kCmdId = kResizeCHROMIUM;
11731 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11732 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11734 static uint32_t ComputeSize() {
11735 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11738 void SetHeader() { header.SetCmd<ValueType>(); }
11740 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
11741 SetHeader();
11742 width = _width;
11743 height = _height;
11744 scale_factor = _scale_factor;
11747 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
11748 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
11749 return NextCmdAddress<ValueType>(cmd);
11752 gpu::CommandHeader header;
11753 uint32_t width;
11754 uint32_t height;
11755 float scale_factor;
11758 static_assert(sizeof(ResizeCHROMIUM) == 16,
11759 "size of ResizeCHROMIUM should be 16");
11760 static_assert(offsetof(ResizeCHROMIUM, header) == 0,
11761 "offset of ResizeCHROMIUM header should be 0");
11762 static_assert(offsetof(ResizeCHROMIUM, width) == 4,
11763 "offset of ResizeCHROMIUM width should be 4");
11764 static_assert(offsetof(ResizeCHROMIUM, height) == 8,
11765 "offset of ResizeCHROMIUM height should be 8");
11766 static_assert(offsetof(ResizeCHROMIUM, scale_factor) == 12,
11767 "offset of ResizeCHROMIUM scale_factor should be 12");
11769 struct GetRequestableExtensionsCHROMIUM {
11770 typedef GetRequestableExtensionsCHROMIUM ValueType;
11771 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
11772 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11773 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11775 static uint32_t ComputeSize() {
11776 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11779 void SetHeader() { header.SetCmd<ValueType>(); }
11781 void Init(uint32_t _bucket_id) {
11782 SetHeader();
11783 bucket_id = _bucket_id;
11786 void* Set(void* cmd, uint32_t _bucket_id) {
11787 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11788 return NextCmdAddress<ValueType>(cmd);
11791 gpu::CommandHeader header;
11792 uint32_t bucket_id;
11795 static_assert(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
11796 "size of GetRequestableExtensionsCHROMIUM should be 8");
11797 static_assert(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
11798 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
11799 static_assert(
11800 offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
11801 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
11803 struct RequestExtensionCHROMIUM {
11804 typedef RequestExtensionCHROMIUM ValueType;
11805 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
11806 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11807 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11809 static uint32_t ComputeSize() {
11810 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11813 void SetHeader() { header.SetCmd<ValueType>(); }
11815 void Init(uint32_t _bucket_id) {
11816 SetHeader();
11817 bucket_id = _bucket_id;
11820 void* Set(void* cmd, uint32_t _bucket_id) {
11821 static_cast<ValueType*>(cmd)->Init(_bucket_id);
11822 return NextCmdAddress<ValueType>(cmd);
11825 gpu::CommandHeader header;
11826 uint32_t bucket_id;
11829 static_assert(sizeof(RequestExtensionCHROMIUM) == 8,
11830 "size of RequestExtensionCHROMIUM should be 8");
11831 static_assert(offsetof(RequestExtensionCHROMIUM, header) == 0,
11832 "offset of RequestExtensionCHROMIUM header should be 0");
11833 static_assert(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
11834 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
11836 struct GetProgramInfoCHROMIUM {
11837 typedef GetProgramInfoCHROMIUM ValueType;
11838 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
11839 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11840 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11842 struct Result {
11843 uint32_t link_status;
11844 uint32_t num_attribs;
11845 uint32_t num_uniforms;
11848 static uint32_t ComputeSize() {
11849 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11852 void SetHeader() { header.SetCmd<ValueType>(); }
11854 void Init(GLuint _program, uint32_t _bucket_id) {
11855 SetHeader();
11856 program = _program;
11857 bucket_id = _bucket_id;
11860 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11861 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11862 return NextCmdAddress<ValueType>(cmd);
11865 gpu::CommandHeader header;
11866 uint32_t program;
11867 uint32_t bucket_id;
11870 static_assert(sizeof(GetProgramInfoCHROMIUM) == 12,
11871 "size of GetProgramInfoCHROMIUM should be 12");
11872 static_assert(offsetof(GetProgramInfoCHROMIUM, header) == 0,
11873 "offset of GetProgramInfoCHROMIUM header should be 0");
11874 static_assert(offsetof(GetProgramInfoCHROMIUM, program) == 4,
11875 "offset of GetProgramInfoCHROMIUM program should be 4");
11876 static_assert(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
11877 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11878 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
11879 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11880 "0");
11881 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
11882 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11883 "4");
11884 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
11885 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11886 "8");
11888 struct GetUniformBlocksCHROMIUM {
11889 typedef GetUniformBlocksCHROMIUM ValueType;
11890 static const CommandId kCmdId = kGetUniformBlocksCHROMIUM;
11891 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11892 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11894 typedef uint32_t Result;
11896 static uint32_t ComputeSize() {
11897 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11900 void SetHeader() { header.SetCmd<ValueType>(); }
11902 void Init(GLuint _program, uint32_t _bucket_id) {
11903 SetHeader();
11904 program = _program;
11905 bucket_id = _bucket_id;
11908 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11909 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11910 return NextCmdAddress<ValueType>(cmd);
11913 gpu::CommandHeader header;
11914 uint32_t program;
11915 uint32_t bucket_id;
11918 static_assert(sizeof(GetUniformBlocksCHROMIUM) == 12,
11919 "size of GetUniformBlocksCHROMIUM should be 12");
11920 static_assert(offsetof(GetUniformBlocksCHROMIUM, header) == 0,
11921 "offset of GetUniformBlocksCHROMIUM header should be 0");
11922 static_assert(offsetof(GetUniformBlocksCHROMIUM, program) == 4,
11923 "offset of GetUniformBlocksCHROMIUM program should be 4");
11924 static_assert(offsetof(GetUniformBlocksCHROMIUM, bucket_id) == 8,
11925 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11927 struct GetTransformFeedbackVaryingsCHROMIUM {
11928 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType;
11929 static const CommandId kCmdId = kGetTransformFeedbackVaryingsCHROMIUM;
11930 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11931 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11933 typedef uint32_t Result;
11935 static uint32_t ComputeSize() {
11936 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11939 void SetHeader() { header.SetCmd<ValueType>(); }
11941 void Init(GLuint _program, uint32_t _bucket_id) {
11942 SetHeader();
11943 program = _program;
11944 bucket_id = _bucket_id;
11947 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11948 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11949 return NextCmdAddress<ValueType>(cmd);
11952 gpu::CommandHeader header;
11953 uint32_t program;
11954 uint32_t bucket_id;
11957 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM) == 12,
11958 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11959 static_assert(
11960 offsetof(GetTransformFeedbackVaryingsCHROMIUM, header) == 0,
11961 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11962 static_assert(
11963 offsetof(GetTransformFeedbackVaryingsCHROMIUM, program) == 4,
11964 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11965 static_assert(
11966 offsetof(GetTransformFeedbackVaryingsCHROMIUM, bucket_id) == 8,
11967 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11969 struct GetUniformsES3CHROMIUM {
11970 typedef GetUniformsES3CHROMIUM ValueType;
11971 static const CommandId kCmdId = kGetUniformsES3CHROMIUM;
11972 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11973 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11975 typedef uint32_t Result;
11977 static uint32_t ComputeSize() {
11978 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11981 void SetHeader() { header.SetCmd<ValueType>(); }
11983 void Init(GLuint _program, uint32_t _bucket_id) {
11984 SetHeader();
11985 program = _program;
11986 bucket_id = _bucket_id;
11989 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11990 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11991 return NextCmdAddress<ValueType>(cmd);
11994 gpu::CommandHeader header;
11995 uint32_t program;
11996 uint32_t bucket_id;
11999 static_assert(sizeof(GetUniformsES3CHROMIUM) == 12,
12000 "size of GetUniformsES3CHROMIUM should be 12");
12001 static_assert(offsetof(GetUniformsES3CHROMIUM, header) == 0,
12002 "offset of GetUniformsES3CHROMIUM header should be 0");
12003 static_assert(offsetof(GetUniformsES3CHROMIUM, program) == 4,
12004 "offset of GetUniformsES3CHROMIUM program should be 4");
12005 static_assert(offsetof(GetUniformsES3CHROMIUM, bucket_id) == 8,
12006 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
12008 struct GetTranslatedShaderSourceANGLE {
12009 typedef GetTranslatedShaderSourceANGLE ValueType;
12010 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
12011 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12012 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12014 static uint32_t ComputeSize() {
12015 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12018 void SetHeader() { header.SetCmd<ValueType>(); }
12020 void Init(GLuint _shader, uint32_t _bucket_id) {
12021 SetHeader();
12022 shader = _shader;
12023 bucket_id = _bucket_id;
12026 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
12027 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
12028 return NextCmdAddress<ValueType>(cmd);
12031 gpu::CommandHeader header;
12032 uint32_t shader;
12033 uint32_t bucket_id;
12036 static_assert(sizeof(GetTranslatedShaderSourceANGLE) == 12,
12037 "size of GetTranslatedShaderSourceANGLE should be 12");
12038 static_assert(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
12039 "offset of GetTranslatedShaderSourceANGLE header should be 0");
12040 static_assert(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
12041 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
12042 static_assert(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
12043 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
12045 struct PostSubBufferCHROMIUM {
12046 typedef PostSubBufferCHROMIUM ValueType;
12047 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
12048 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12049 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12051 static uint32_t ComputeSize() {
12052 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12055 void SetHeader() { header.SetCmd<ValueType>(); }
12057 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
12058 SetHeader();
12059 x = _x;
12060 y = _y;
12061 width = _width;
12062 height = _height;
12065 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
12066 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
12067 return NextCmdAddress<ValueType>(cmd);
12070 gpu::CommandHeader header;
12071 int32_t x;
12072 int32_t y;
12073 int32_t width;
12074 int32_t height;
12077 static_assert(sizeof(PostSubBufferCHROMIUM) == 20,
12078 "size of PostSubBufferCHROMIUM should be 20");
12079 static_assert(offsetof(PostSubBufferCHROMIUM, header) == 0,
12080 "offset of PostSubBufferCHROMIUM header should be 0");
12081 static_assert(offsetof(PostSubBufferCHROMIUM, x) == 4,
12082 "offset of PostSubBufferCHROMIUM x should be 4");
12083 static_assert(offsetof(PostSubBufferCHROMIUM, y) == 8,
12084 "offset of PostSubBufferCHROMIUM y should be 8");
12085 static_assert(offsetof(PostSubBufferCHROMIUM, width) == 12,
12086 "offset of PostSubBufferCHROMIUM width should be 12");
12087 static_assert(offsetof(PostSubBufferCHROMIUM, height) == 16,
12088 "offset of PostSubBufferCHROMIUM height should be 16");
12090 struct TexImageIOSurface2DCHROMIUM {
12091 typedef TexImageIOSurface2DCHROMIUM ValueType;
12092 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
12093 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12094 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12096 static uint32_t ComputeSize() {
12097 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12100 void SetHeader() { header.SetCmd<ValueType>(); }
12102 void Init(GLenum _target,
12103 GLsizei _width,
12104 GLsizei _height,
12105 GLuint _ioSurfaceId,
12106 GLuint _plane) {
12107 SetHeader();
12108 target = _target;
12109 width = _width;
12110 height = _height;
12111 ioSurfaceId = _ioSurfaceId;
12112 plane = _plane;
12115 void* Set(void* cmd,
12116 GLenum _target,
12117 GLsizei _width,
12118 GLsizei _height,
12119 GLuint _ioSurfaceId,
12120 GLuint _plane) {
12121 static_cast<ValueType*>(cmd)
12122 ->Init(_target, _width, _height, _ioSurfaceId, _plane);
12123 return NextCmdAddress<ValueType>(cmd);
12126 gpu::CommandHeader header;
12127 uint32_t target;
12128 int32_t width;
12129 int32_t height;
12130 uint32_t ioSurfaceId;
12131 uint32_t plane;
12134 static_assert(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
12135 "size of TexImageIOSurface2DCHROMIUM should be 24");
12136 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
12137 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
12138 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
12139 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
12140 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
12141 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
12142 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
12143 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
12144 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
12145 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
12146 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
12147 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
12149 struct CopyTextureCHROMIUM {
12150 typedef CopyTextureCHROMIUM ValueType;
12151 static const CommandId kCmdId = kCopyTextureCHROMIUM;
12152 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12153 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12155 static uint32_t ComputeSize() {
12156 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12159 void SetHeader() { header.SetCmd<ValueType>(); }
12161 void Init(GLenum _target,
12162 GLenum _source_id,
12163 GLenum _dest_id,
12164 GLint _internalformat,
12165 GLenum _dest_type) {
12166 SetHeader();
12167 target = _target;
12168 source_id = _source_id;
12169 dest_id = _dest_id;
12170 internalformat = _internalformat;
12171 dest_type = _dest_type;
12174 void* Set(void* cmd,
12175 GLenum _target,
12176 GLenum _source_id,
12177 GLenum _dest_id,
12178 GLint _internalformat,
12179 GLenum _dest_type) {
12180 static_cast<ValueType*>(cmd)
12181 ->Init(_target, _source_id, _dest_id, _internalformat, _dest_type);
12182 return NextCmdAddress<ValueType>(cmd);
12185 gpu::CommandHeader header;
12186 uint32_t target;
12187 uint32_t source_id;
12188 uint32_t dest_id;
12189 int32_t internalformat;
12190 uint32_t dest_type;
12193 static_assert(sizeof(CopyTextureCHROMIUM) == 24,
12194 "size of CopyTextureCHROMIUM should be 24");
12195 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0,
12196 "offset of CopyTextureCHROMIUM header should be 0");
12197 static_assert(offsetof(CopyTextureCHROMIUM, target) == 4,
12198 "offset of CopyTextureCHROMIUM target should be 4");
12199 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 8,
12200 "offset of CopyTextureCHROMIUM source_id should be 8");
12201 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
12202 "offset of CopyTextureCHROMIUM dest_id should be 12");
12203 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 16,
12204 "offset of CopyTextureCHROMIUM internalformat should be 16");
12205 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 20,
12206 "offset of CopyTextureCHROMIUM dest_type should be 20");
12208 struct CopySubTextureCHROMIUM {
12209 typedef CopySubTextureCHROMIUM ValueType;
12210 static const CommandId kCmdId = kCopySubTextureCHROMIUM;
12211 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12212 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12214 static uint32_t ComputeSize() {
12215 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12218 void SetHeader() { header.SetCmd<ValueType>(); }
12220 void Init(GLenum _target,
12221 GLenum _source_id,
12222 GLenum _dest_id,
12223 GLint _xoffset,
12224 GLint _yoffset,
12225 GLint _x,
12226 GLint _y,
12227 GLsizei _width,
12228 GLsizei _height) {
12229 SetHeader();
12230 target = _target;
12231 source_id = _source_id;
12232 dest_id = _dest_id;
12233 xoffset = _xoffset;
12234 yoffset = _yoffset;
12235 x = _x;
12236 y = _y;
12237 width = _width;
12238 height = _height;
12241 void* Set(void* cmd,
12242 GLenum _target,
12243 GLenum _source_id,
12244 GLenum _dest_id,
12245 GLint _xoffset,
12246 GLint _yoffset,
12247 GLint _x,
12248 GLint _y,
12249 GLsizei _width,
12250 GLsizei _height) {
12251 static_cast<ValueType*>(cmd)->Init(_target, _source_id, _dest_id, _xoffset,
12252 _yoffset, _x, _y, _width, _height);
12253 return NextCmdAddress<ValueType>(cmd);
12256 gpu::CommandHeader header;
12257 uint32_t target;
12258 uint32_t source_id;
12259 uint32_t dest_id;
12260 int32_t xoffset;
12261 int32_t yoffset;
12262 int32_t x;
12263 int32_t y;
12264 int32_t width;
12265 int32_t height;
12268 static_assert(sizeof(CopySubTextureCHROMIUM) == 40,
12269 "size of CopySubTextureCHROMIUM should be 40");
12270 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0,
12271 "offset of CopySubTextureCHROMIUM header should be 0");
12272 static_assert(offsetof(CopySubTextureCHROMIUM, target) == 4,
12273 "offset of CopySubTextureCHROMIUM target should be 4");
12274 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 8,
12275 "offset of CopySubTextureCHROMIUM source_id should be 8");
12276 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 12,
12277 "offset of CopySubTextureCHROMIUM dest_id should be 12");
12278 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 16,
12279 "offset of CopySubTextureCHROMIUM xoffset should be 16");
12280 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 20,
12281 "offset of CopySubTextureCHROMIUM yoffset should be 20");
12282 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 24,
12283 "offset of CopySubTextureCHROMIUM x should be 24");
12284 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 28,
12285 "offset of CopySubTextureCHROMIUM y should be 28");
12286 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 32,
12287 "offset of CopySubTextureCHROMIUM width should be 32");
12288 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 36,
12289 "offset of CopySubTextureCHROMIUM height should be 36");
12291 struct DrawArraysInstancedANGLE {
12292 typedef DrawArraysInstancedANGLE ValueType;
12293 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
12294 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12295 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12297 static uint32_t ComputeSize() {
12298 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12301 void SetHeader() { header.SetCmd<ValueType>(); }
12303 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
12304 SetHeader();
12305 mode = _mode;
12306 first = _first;
12307 count = _count;
12308 primcount = _primcount;
12311 void* Set(void* cmd,
12312 GLenum _mode,
12313 GLint _first,
12314 GLsizei _count,
12315 GLsizei _primcount) {
12316 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
12317 return NextCmdAddress<ValueType>(cmd);
12320 gpu::CommandHeader header;
12321 uint32_t mode;
12322 int32_t first;
12323 int32_t count;
12324 int32_t primcount;
12327 static_assert(sizeof(DrawArraysInstancedANGLE) == 20,
12328 "size of DrawArraysInstancedANGLE should be 20");
12329 static_assert(offsetof(DrawArraysInstancedANGLE, header) == 0,
12330 "offset of DrawArraysInstancedANGLE header should be 0");
12331 static_assert(offsetof(DrawArraysInstancedANGLE, mode) == 4,
12332 "offset of DrawArraysInstancedANGLE mode should be 4");
12333 static_assert(offsetof(DrawArraysInstancedANGLE, first) == 8,
12334 "offset of DrawArraysInstancedANGLE first should be 8");
12335 static_assert(offsetof(DrawArraysInstancedANGLE, count) == 12,
12336 "offset of DrawArraysInstancedANGLE count should be 12");
12337 static_assert(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
12338 "offset of DrawArraysInstancedANGLE primcount should be 16");
12340 struct DrawElementsInstancedANGLE {
12341 typedef DrawElementsInstancedANGLE ValueType;
12342 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
12343 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12344 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12346 static uint32_t ComputeSize() {
12347 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12350 void SetHeader() { header.SetCmd<ValueType>(); }
12352 void Init(GLenum _mode,
12353 GLsizei _count,
12354 GLenum _type,
12355 GLuint _index_offset,
12356 GLsizei _primcount) {
12357 SetHeader();
12358 mode = _mode;
12359 count = _count;
12360 type = _type;
12361 index_offset = _index_offset;
12362 primcount = _primcount;
12365 void* Set(void* cmd,
12366 GLenum _mode,
12367 GLsizei _count,
12368 GLenum _type,
12369 GLuint _index_offset,
12370 GLsizei _primcount) {
12371 static_cast<ValueType*>(cmd)
12372 ->Init(_mode, _count, _type, _index_offset, _primcount);
12373 return NextCmdAddress<ValueType>(cmd);
12376 gpu::CommandHeader header;
12377 uint32_t mode;
12378 int32_t count;
12379 uint32_t type;
12380 uint32_t index_offset;
12381 int32_t primcount;
12384 static_assert(sizeof(DrawElementsInstancedANGLE) == 24,
12385 "size of DrawElementsInstancedANGLE should be 24");
12386 static_assert(offsetof(DrawElementsInstancedANGLE, header) == 0,
12387 "offset of DrawElementsInstancedANGLE header should be 0");
12388 static_assert(offsetof(DrawElementsInstancedANGLE, mode) == 4,
12389 "offset of DrawElementsInstancedANGLE mode should be 4");
12390 static_assert(offsetof(DrawElementsInstancedANGLE, count) == 8,
12391 "offset of DrawElementsInstancedANGLE count should be 8");
12392 static_assert(offsetof(DrawElementsInstancedANGLE, type) == 12,
12393 "offset of DrawElementsInstancedANGLE type should be 12");
12394 static_assert(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
12395 "offset of DrawElementsInstancedANGLE index_offset should be 16");
12396 static_assert(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
12397 "offset of DrawElementsInstancedANGLE primcount should be 20");
12399 struct VertexAttribDivisorANGLE {
12400 typedef VertexAttribDivisorANGLE ValueType;
12401 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
12402 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12403 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12405 static uint32_t ComputeSize() {
12406 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12409 void SetHeader() { header.SetCmd<ValueType>(); }
12411 void Init(GLuint _index, GLuint _divisor) {
12412 SetHeader();
12413 index = _index;
12414 divisor = _divisor;
12417 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
12418 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
12419 return NextCmdAddress<ValueType>(cmd);
12422 gpu::CommandHeader header;
12423 uint32_t index;
12424 uint32_t divisor;
12427 static_assert(sizeof(VertexAttribDivisorANGLE) == 12,
12428 "size of VertexAttribDivisorANGLE should be 12");
12429 static_assert(offsetof(VertexAttribDivisorANGLE, header) == 0,
12430 "offset of VertexAttribDivisorANGLE header should be 0");
12431 static_assert(offsetof(VertexAttribDivisorANGLE, index) == 4,
12432 "offset of VertexAttribDivisorANGLE index should be 4");
12433 static_assert(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
12434 "offset of VertexAttribDivisorANGLE divisor should be 8");
12436 struct ProduceTextureCHROMIUMImmediate {
12437 typedef ProduceTextureCHROMIUMImmediate ValueType;
12438 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
12439 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12440 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12442 static uint32_t ComputeDataSize() {
12443 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12446 static uint32_t ComputeSize() {
12447 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12450 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12452 void Init(GLenum _target, const GLbyte* _mailbox) {
12453 SetHeader();
12454 target = _target;
12455 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12458 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
12459 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
12460 const uint32_t size = ComputeSize();
12461 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12464 gpu::CommandHeader header;
12465 uint32_t target;
12468 static_assert(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
12469 "size of ProduceTextureCHROMIUMImmediate should be 8");
12470 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
12471 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
12472 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
12473 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
12475 struct ProduceTextureDirectCHROMIUMImmediate {
12476 typedef ProduceTextureDirectCHROMIUMImmediate ValueType;
12477 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate;
12478 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12479 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12481 static uint32_t ComputeDataSize() {
12482 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12485 static uint32_t ComputeSize() {
12486 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12489 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12491 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) {
12492 SetHeader();
12493 texture = _texture;
12494 target = _target;
12495 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12498 void* Set(void* cmd,
12499 GLuint _texture,
12500 GLenum _target,
12501 const GLbyte* _mailbox) {
12502 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox);
12503 const uint32_t size = ComputeSize();
12504 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12507 gpu::CommandHeader header;
12508 uint32_t texture;
12509 uint32_t target;
12512 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12,
12513 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
12514 static_assert(
12515 offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0,
12516 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
12517 static_assert(
12518 offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4,
12519 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
12520 static_assert(
12521 offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8,
12522 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
12524 struct ConsumeTextureCHROMIUMImmediate {
12525 typedef ConsumeTextureCHROMIUMImmediate ValueType;
12526 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
12527 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12528 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12530 static uint32_t ComputeDataSize() {
12531 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
12534 static uint32_t ComputeSize() {
12535 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12538 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12540 void Init(GLenum _target, const GLbyte* _mailbox) {
12541 SetHeader();
12542 target = _target;
12543 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
12546 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
12547 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
12548 const uint32_t size = ComputeSize();
12549 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12552 gpu::CommandHeader header;
12553 uint32_t target;
12556 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
12557 "size of ConsumeTextureCHROMIUMImmediate should be 8");
12558 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
12559 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
12560 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
12561 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
12563 struct BindUniformLocationCHROMIUMBucket {
12564 typedef BindUniformLocationCHROMIUMBucket ValueType;
12565 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
12566 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12567 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12569 static uint32_t ComputeSize() {
12570 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12573 void SetHeader() { header.SetCmd<ValueType>(); }
12575 void Init(GLuint _program, GLint _location, uint32_t _name_bucket_id) {
12576 SetHeader();
12577 program = _program;
12578 location = _location;
12579 name_bucket_id = _name_bucket_id;
12582 void* Set(void* cmd,
12583 GLuint _program,
12584 GLint _location,
12585 uint32_t _name_bucket_id) {
12586 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
12587 return NextCmdAddress<ValueType>(cmd);
12590 gpu::CommandHeader header;
12591 uint32_t program;
12592 int32_t location;
12593 uint32_t name_bucket_id;
12596 static_assert(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
12597 "size of BindUniformLocationCHROMIUMBucket should be 16");
12598 static_assert(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
12599 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
12600 static_assert(
12601 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
12602 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
12603 static_assert(
12604 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
12605 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
12606 static_assert(
12607 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
12608 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
12610 struct GenValuebuffersCHROMIUMImmediate {
12611 typedef GenValuebuffersCHROMIUMImmediate ValueType;
12612 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate;
12613 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12614 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12616 static uint32_t ComputeDataSize(GLsizei n) {
12617 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
12620 static uint32_t ComputeSize(GLsizei n) {
12621 return static_cast<uint32_t>(sizeof(ValueType) +
12622 ComputeDataSize(n)); // NOLINT
12625 void SetHeader(GLsizei n) {
12626 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
12629 void Init(GLsizei _n, GLuint* _buffers) {
12630 SetHeader(_n);
12631 n = _n;
12632 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
12635 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
12636 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
12637 const uint32_t size = ComputeSize(_n);
12638 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12641 gpu::CommandHeader header;
12642 int32_t n;
12645 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate) == 8,
12646 "size of GenValuebuffersCHROMIUMImmediate should be 8");
12647 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0,
12648 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
12649 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4,
12650 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
12652 struct DeleteValuebuffersCHROMIUMImmediate {
12653 typedef DeleteValuebuffersCHROMIUMImmediate ValueType;
12654 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate;
12655 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12656 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12658 static uint32_t ComputeDataSize(GLsizei n) {
12659 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
12662 static uint32_t ComputeSize(GLsizei n) {
12663 return static_cast<uint32_t>(sizeof(ValueType) +
12664 ComputeDataSize(n)); // NOLINT
12667 void SetHeader(GLsizei n) {
12668 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
12671 void Init(GLsizei _n, const GLuint* _valuebuffers) {
12672 SetHeader(_n);
12673 n = _n;
12674 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n));
12677 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) {
12678 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers);
12679 const uint32_t size = ComputeSize(_n);
12680 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12683 gpu::CommandHeader header;
12684 int32_t n;
12687 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8,
12688 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
12689 static_assert(
12690 offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0,
12691 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
12692 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4,
12693 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
12695 struct IsValuebufferCHROMIUM {
12696 typedef IsValuebufferCHROMIUM ValueType;
12697 static const CommandId kCmdId = kIsValuebufferCHROMIUM;
12698 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12699 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12701 typedef uint32_t Result;
12703 static uint32_t ComputeSize() {
12704 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12707 void SetHeader() { header.SetCmd<ValueType>(); }
12709 void Init(GLuint _valuebuffer,
12710 uint32_t _result_shm_id,
12711 uint32_t _result_shm_offset) {
12712 SetHeader();
12713 valuebuffer = _valuebuffer;
12714 result_shm_id = _result_shm_id;
12715 result_shm_offset = _result_shm_offset;
12718 void* Set(void* cmd,
12719 GLuint _valuebuffer,
12720 uint32_t _result_shm_id,
12721 uint32_t _result_shm_offset) {
12722 static_cast<ValueType*>(cmd)
12723 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset);
12724 return NextCmdAddress<ValueType>(cmd);
12727 gpu::CommandHeader header;
12728 uint32_t valuebuffer;
12729 uint32_t result_shm_id;
12730 uint32_t result_shm_offset;
12733 static_assert(sizeof(IsValuebufferCHROMIUM) == 16,
12734 "size of IsValuebufferCHROMIUM should be 16");
12735 static_assert(offsetof(IsValuebufferCHROMIUM, header) == 0,
12736 "offset of IsValuebufferCHROMIUM header should be 0");
12737 static_assert(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4,
12738 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
12739 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8,
12740 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
12741 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12,
12742 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
12744 struct BindValuebufferCHROMIUM {
12745 typedef BindValuebufferCHROMIUM ValueType;
12746 static const CommandId kCmdId = kBindValuebufferCHROMIUM;
12747 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12748 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12750 static uint32_t ComputeSize() {
12751 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12754 void SetHeader() { header.SetCmd<ValueType>(); }
12756 void Init(GLenum _target, GLuint _valuebuffer) {
12757 SetHeader();
12758 target = _target;
12759 valuebuffer = _valuebuffer;
12762 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) {
12763 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer);
12764 return NextCmdAddress<ValueType>(cmd);
12767 gpu::CommandHeader header;
12768 uint32_t target;
12769 uint32_t valuebuffer;
12772 static_assert(sizeof(BindValuebufferCHROMIUM) == 12,
12773 "size of BindValuebufferCHROMIUM should be 12");
12774 static_assert(offsetof(BindValuebufferCHROMIUM, header) == 0,
12775 "offset of BindValuebufferCHROMIUM header should be 0");
12776 static_assert(offsetof(BindValuebufferCHROMIUM, target) == 4,
12777 "offset of BindValuebufferCHROMIUM target should be 4");
12778 static_assert(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8,
12779 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
12781 struct SubscribeValueCHROMIUM {
12782 typedef SubscribeValueCHROMIUM ValueType;
12783 static const CommandId kCmdId = kSubscribeValueCHROMIUM;
12784 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12785 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12787 static uint32_t ComputeSize() {
12788 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12791 void SetHeader() { header.SetCmd<ValueType>(); }
12793 void Init(GLenum _target, GLenum _subscription) {
12794 SetHeader();
12795 target = _target;
12796 subscription = _subscription;
12799 void* Set(void* cmd, GLenum _target, GLenum _subscription) {
12800 static_cast<ValueType*>(cmd)->Init(_target, _subscription);
12801 return NextCmdAddress<ValueType>(cmd);
12804 gpu::CommandHeader header;
12805 uint32_t target;
12806 uint32_t subscription;
12809 static_assert(sizeof(SubscribeValueCHROMIUM) == 12,
12810 "size of SubscribeValueCHROMIUM should be 12");
12811 static_assert(offsetof(SubscribeValueCHROMIUM, header) == 0,
12812 "offset of SubscribeValueCHROMIUM header should be 0");
12813 static_assert(offsetof(SubscribeValueCHROMIUM, target) == 4,
12814 "offset of SubscribeValueCHROMIUM target should be 4");
12815 static_assert(offsetof(SubscribeValueCHROMIUM, subscription) == 8,
12816 "offset of SubscribeValueCHROMIUM subscription should be 8");
12818 struct PopulateSubscribedValuesCHROMIUM {
12819 typedef PopulateSubscribedValuesCHROMIUM ValueType;
12820 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM;
12821 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12822 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12824 static uint32_t ComputeSize() {
12825 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12828 void SetHeader() { header.SetCmd<ValueType>(); }
12830 void Init(GLenum _target) {
12831 SetHeader();
12832 target = _target;
12835 void* Set(void* cmd, GLenum _target) {
12836 static_cast<ValueType*>(cmd)->Init(_target);
12837 return NextCmdAddress<ValueType>(cmd);
12840 gpu::CommandHeader header;
12841 uint32_t target;
12844 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM) == 8,
12845 "size of PopulateSubscribedValuesCHROMIUM should be 8");
12846 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0,
12847 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
12848 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4,
12849 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
12851 struct UniformValuebufferCHROMIUM {
12852 typedef UniformValuebufferCHROMIUM ValueType;
12853 static const CommandId kCmdId = kUniformValuebufferCHROMIUM;
12854 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12855 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12857 static uint32_t ComputeSize() {
12858 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12861 void SetHeader() { header.SetCmd<ValueType>(); }
12863 void Init(GLint _location, GLenum _target, GLenum _subscription) {
12864 SetHeader();
12865 location = _location;
12866 target = _target;
12867 subscription = _subscription;
12870 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) {
12871 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription);
12872 return NextCmdAddress<ValueType>(cmd);
12875 gpu::CommandHeader header;
12876 int32_t location;
12877 uint32_t target;
12878 uint32_t subscription;
12881 static_assert(sizeof(UniformValuebufferCHROMIUM) == 16,
12882 "size of UniformValuebufferCHROMIUM should be 16");
12883 static_assert(offsetof(UniformValuebufferCHROMIUM, header) == 0,
12884 "offset of UniformValuebufferCHROMIUM header should be 0");
12885 static_assert(offsetof(UniformValuebufferCHROMIUM, location) == 4,
12886 "offset of UniformValuebufferCHROMIUM location should be 4");
12887 static_assert(offsetof(UniformValuebufferCHROMIUM, target) == 8,
12888 "offset of UniformValuebufferCHROMIUM target should be 8");
12889 static_assert(offsetof(UniformValuebufferCHROMIUM, subscription) == 12,
12890 "offset of UniformValuebufferCHROMIUM subscription should be 12");
12892 struct BindTexImage2DCHROMIUM {
12893 typedef BindTexImage2DCHROMIUM ValueType;
12894 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
12895 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12896 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12898 static uint32_t ComputeSize() {
12899 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12902 void SetHeader() { header.SetCmd<ValueType>(); }
12904 void Init(GLenum _target, GLint _imageId) {
12905 SetHeader();
12906 target = _target;
12907 imageId = _imageId;
12910 void* Set(void* cmd, GLenum _target, GLint _imageId) {
12911 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
12912 return NextCmdAddress<ValueType>(cmd);
12915 gpu::CommandHeader header;
12916 uint32_t target;
12917 int32_t imageId;
12920 static_assert(sizeof(BindTexImage2DCHROMIUM) == 12,
12921 "size of BindTexImage2DCHROMIUM should be 12");
12922 static_assert(offsetof(BindTexImage2DCHROMIUM, header) == 0,
12923 "offset of BindTexImage2DCHROMIUM header should be 0");
12924 static_assert(offsetof(BindTexImage2DCHROMIUM, target) == 4,
12925 "offset of BindTexImage2DCHROMIUM target should be 4");
12926 static_assert(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
12927 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12929 struct ReleaseTexImage2DCHROMIUM {
12930 typedef ReleaseTexImage2DCHROMIUM ValueType;
12931 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
12932 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12933 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12935 static uint32_t ComputeSize() {
12936 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12939 void SetHeader() { header.SetCmd<ValueType>(); }
12941 void Init(GLenum _target, GLint _imageId) {
12942 SetHeader();
12943 target = _target;
12944 imageId = _imageId;
12947 void* Set(void* cmd, GLenum _target, GLint _imageId) {
12948 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
12949 return NextCmdAddress<ValueType>(cmd);
12952 gpu::CommandHeader header;
12953 uint32_t target;
12954 int32_t imageId;
12957 static_assert(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
12958 "size of ReleaseTexImage2DCHROMIUM should be 12");
12959 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
12960 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12961 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
12962 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12963 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
12964 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12966 struct TraceBeginCHROMIUM {
12967 typedef TraceBeginCHROMIUM ValueType;
12968 static const CommandId kCmdId = kTraceBeginCHROMIUM;
12969 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12970 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12972 static uint32_t ComputeSize() {
12973 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12976 void SetHeader() { header.SetCmd<ValueType>(); }
12978 void Init(GLuint _category_bucket_id, GLuint _name_bucket_id) {
12979 SetHeader();
12980 category_bucket_id = _category_bucket_id;
12981 name_bucket_id = _name_bucket_id;
12984 void* Set(void* cmd, GLuint _category_bucket_id, GLuint _name_bucket_id) {
12985 static_cast<ValueType*>(cmd)->Init(_category_bucket_id, _name_bucket_id);
12986 return NextCmdAddress<ValueType>(cmd);
12989 gpu::CommandHeader header;
12990 uint32_t category_bucket_id;
12991 uint32_t name_bucket_id;
12994 static_assert(sizeof(TraceBeginCHROMIUM) == 12,
12995 "size of TraceBeginCHROMIUM should be 12");
12996 static_assert(offsetof(TraceBeginCHROMIUM, header) == 0,
12997 "offset of TraceBeginCHROMIUM header should be 0");
12998 static_assert(offsetof(TraceBeginCHROMIUM, category_bucket_id) == 4,
12999 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
13000 static_assert(offsetof(TraceBeginCHROMIUM, name_bucket_id) == 8,
13001 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
13003 struct TraceEndCHROMIUM {
13004 typedef TraceEndCHROMIUM ValueType;
13005 static const CommandId kCmdId = kTraceEndCHROMIUM;
13006 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13007 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13009 static uint32_t ComputeSize() {
13010 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13013 void SetHeader() { header.SetCmd<ValueType>(); }
13015 void Init() { SetHeader(); }
13017 void* Set(void* cmd) {
13018 static_cast<ValueType*>(cmd)->Init();
13019 return NextCmdAddress<ValueType>(cmd);
13022 gpu::CommandHeader header;
13025 static_assert(sizeof(TraceEndCHROMIUM) == 4,
13026 "size of TraceEndCHROMIUM should be 4");
13027 static_assert(offsetof(TraceEndCHROMIUM, header) == 0,
13028 "offset of TraceEndCHROMIUM header should be 0");
13030 struct AsyncTexSubImage2DCHROMIUM {
13031 typedef AsyncTexSubImage2DCHROMIUM ValueType;
13032 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
13033 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13034 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13036 static uint32_t ComputeSize() {
13037 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13040 void SetHeader() { header.SetCmd<ValueType>(); }
13042 void Init(GLenum _target,
13043 GLint _level,
13044 GLint _xoffset,
13045 GLint _yoffset,
13046 GLsizei _width,
13047 GLsizei _height,
13048 GLenum _format,
13049 GLenum _type,
13050 uint32_t _data_shm_id,
13051 uint32_t _data_shm_offset,
13052 uint32_t _async_upload_token,
13053 uint32_t _sync_data_shm_id,
13054 uint32_t _sync_data_shm_offset) {
13055 SetHeader();
13056 target = _target;
13057 level = _level;
13058 xoffset = _xoffset;
13059 yoffset = _yoffset;
13060 width = _width;
13061 height = _height;
13062 format = _format;
13063 type = _type;
13064 data_shm_id = _data_shm_id;
13065 data_shm_offset = _data_shm_offset;
13066 async_upload_token = _async_upload_token;
13067 sync_data_shm_id = _sync_data_shm_id;
13068 sync_data_shm_offset = _sync_data_shm_offset;
13071 void* Set(void* cmd,
13072 GLenum _target,
13073 GLint _level,
13074 GLint _xoffset,
13075 GLint _yoffset,
13076 GLsizei _width,
13077 GLsizei _height,
13078 GLenum _format,
13079 GLenum _type,
13080 uint32_t _data_shm_id,
13081 uint32_t _data_shm_offset,
13082 uint32_t _async_upload_token,
13083 uint32_t _sync_data_shm_id,
13084 uint32_t _sync_data_shm_offset) {
13085 static_cast<ValueType*>(cmd)
13086 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
13087 _type, _data_shm_id, _data_shm_offset, _async_upload_token,
13088 _sync_data_shm_id, _sync_data_shm_offset);
13089 return NextCmdAddress<ValueType>(cmd);
13092 gpu::CommandHeader header;
13093 uint32_t target;
13094 int32_t level;
13095 int32_t xoffset;
13096 int32_t yoffset;
13097 int32_t width;
13098 int32_t height;
13099 uint32_t format;
13100 uint32_t type;
13101 uint32_t data_shm_id;
13102 uint32_t data_shm_offset;
13103 uint32_t async_upload_token;
13104 uint32_t sync_data_shm_id;
13105 uint32_t sync_data_shm_offset;
13108 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM) == 56,
13109 "size of AsyncTexSubImage2DCHROMIUM should be 56");
13110 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
13111 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
13112 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
13113 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
13114 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
13115 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
13116 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
13117 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
13118 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
13119 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
13120 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
13121 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
13122 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
13123 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
13124 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
13125 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
13126 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
13127 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
13128 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
13129 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
13130 static_assert(
13131 offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
13132 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
13133 static_assert(
13134 offsetof(AsyncTexSubImage2DCHROMIUM, async_upload_token) == 44,
13135 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
13136 static_assert(
13137 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_id) == 48,
13138 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
13139 static_assert(
13140 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_offset) == 52,
13141 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
13143 struct AsyncTexImage2DCHROMIUM {
13144 typedef AsyncTexImage2DCHROMIUM ValueType;
13145 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
13146 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13147 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13149 static uint32_t ComputeSize() {
13150 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13153 void SetHeader() { header.SetCmd<ValueType>(); }
13155 void Init(GLenum _target,
13156 GLint _level,
13157 GLint _internalformat,
13158 GLsizei _width,
13159 GLsizei _height,
13160 GLenum _format,
13161 GLenum _type,
13162 uint32_t _pixels_shm_id,
13163 uint32_t _pixels_shm_offset,
13164 uint32_t _async_upload_token,
13165 uint32_t _sync_data_shm_id,
13166 uint32_t _sync_data_shm_offset) {
13167 SetHeader();
13168 target = _target;
13169 level = _level;
13170 internalformat = _internalformat;
13171 width = _width;
13172 height = _height;
13173 format = _format;
13174 type = _type;
13175 pixels_shm_id = _pixels_shm_id;
13176 pixels_shm_offset = _pixels_shm_offset;
13177 async_upload_token = _async_upload_token;
13178 sync_data_shm_id = _sync_data_shm_id;
13179 sync_data_shm_offset = _sync_data_shm_offset;
13182 void* Set(void* cmd,
13183 GLenum _target,
13184 GLint _level,
13185 GLint _internalformat,
13186 GLsizei _width,
13187 GLsizei _height,
13188 GLenum _format,
13189 GLenum _type,
13190 uint32_t _pixels_shm_id,
13191 uint32_t _pixels_shm_offset,
13192 uint32_t _async_upload_token,
13193 uint32_t _sync_data_shm_id,
13194 uint32_t _sync_data_shm_offset) {
13195 static_cast<ValueType*>(cmd)
13196 ->Init(_target, _level, _internalformat, _width, _height, _format,
13197 _type, _pixels_shm_id, _pixels_shm_offset, _async_upload_token,
13198 _sync_data_shm_id, _sync_data_shm_offset);
13199 return NextCmdAddress<ValueType>(cmd);
13202 gpu::CommandHeader header;
13203 uint32_t target;
13204 int32_t level;
13205 int32_t internalformat;
13206 int32_t width;
13207 int32_t height;
13208 uint32_t format;
13209 uint32_t type;
13210 uint32_t pixels_shm_id;
13211 uint32_t pixels_shm_offset;
13212 uint32_t async_upload_token;
13213 uint32_t sync_data_shm_id;
13214 uint32_t sync_data_shm_offset;
13215 static const int32_t border = 0;
13218 static_assert(sizeof(AsyncTexImage2DCHROMIUM) == 52,
13219 "size of AsyncTexImage2DCHROMIUM should be 52");
13220 static_assert(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
13221 "offset of AsyncTexImage2DCHROMIUM header should be 0");
13222 static_assert(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
13223 "offset of AsyncTexImage2DCHROMIUM target should be 4");
13224 static_assert(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
13225 "offset of AsyncTexImage2DCHROMIUM level should be 8");
13226 static_assert(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
13227 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
13228 static_assert(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
13229 "offset of AsyncTexImage2DCHROMIUM width should be 16");
13230 static_assert(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
13231 "offset of AsyncTexImage2DCHROMIUM height should be 20");
13232 static_assert(offsetof(AsyncTexImage2DCHROMIUM, format) == 24,
13233 "offset of AsyncTexImage2DCHROMIUM format should be 24");
13234 static_assert(offsetof(AsyncTexImage2DCHROMIUM, type) == 28,
13235 "offset of AsyncTexImage2DCHROMIUM type should be 28");
13236 static_assert(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 32,
13237 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
13238 static_assert(
13239 offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 36,
13240 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
13241 static_assert(
13242 offsetof(AsyncTexImage2DCHROMIUM, async_upload_token) == 40,
13243 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
13244 static_assert(
13245 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_id) == 44,
13246 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
13247 static_assert(
13248 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_offset) == 48,
13249 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
13251 struct WaitAsyncTexImage2DCHROMIUM {
13252 typedef WaitAsyncTexImage2DCHROMIUM ValueType;
13253 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
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) {
13264 SetHeader();
13265 target = _target;
13268 void* Set(void* cmd, GLenum _target) {
13269 static_cast<ValueType*>(cmd)->Init(_target);
13270 return NextCmdAddress<ValueType>(cmd);
13273 gpu::CommandHeader header;
13274 uint32_t target;
13277 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
13278 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
13279 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
13280 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
13281 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
13282 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
13284 struct WaitAllAsyncTexImage2DCHROMIUM {
13285 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType;
13286 static const CommandId kCmdId = kWaitAllAsyncTexImage2DCHROMIUM;
13287 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13288 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13290 static uint32_t ComputeSize() {
13291 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13294 void SetHeader() { header.SetCmd<ValueType>(); }
13296 void Init() { SetHeader(); }
13298 void* Set(void* cmd) {
13299 static_cast<ValueType*>(cmd)->Init();
13300 return NextCmdAddress<ValueType>(cmd);
13303 gpu::CommandHeader header;
13306 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM) == 4,
13307 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
13308 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM, header) == 0,
13309 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
13311 struct DiscardFramebufferEXTImmediate {
13312 typedef DiscardFramebufferEXTImmediate ValueType;
13313 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
13314 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13315 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13317 static uint32_t ComputeDataSize(GLsizei count) {
13318 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
13321 static uint32_t ComputeSize(GLsizei count) {
13322 return static_cast<uint32_t>(sizeof(ValueType) +
13323 ComputeDataSize(count)); // NOLINT
13326 void SetHeader(GLsizei count) {
13327 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
13330 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
13331 SetHeader(_count);
13332 target = _target;
13333 count = _count;
13334 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
13337 void* Set(void* cmd,
13338 GLenum _target,
13339 GLsizei _count,
13340 const GLenum* _attachments) {
13341 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
13342 const uint32_t size = ComputeSize(_count);
13343 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13346 gpu::CommandHeader header;
13347 uint32_t target;
13348 int32_t count;
13351 static_assert(sizeof(DiscardFramebufferEXTImmediate) == 12,
13352 "size of DiscardFramebufferEXTImmediate should be 12");
13353 static_assert(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
13354 "offset of DiscardFramebufferEXTImmediate header should be 0");
13355 static_assert(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
13356 "offset of DiscardFramebufferEXTImmediate target should be 4");
13357 static_assert(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
13358 "offset of DiscardFramebufferEXTImmediate count should be 8");
13360 struct LoseContextCHROMIUM {
13361 typedef LoseContextCHROMIUM ValueType;
13362 static const CommandId kCmdId = kLoseContextCHROMIUM;
13363 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13364 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13366 static uint32_t ComputeSize() {
13367 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13370 void SetHeader() { header.SetCmd<ValueType>(); }
13372 void Init(GLenum _current, GLenum _other) {
13373 SetHeader();
13374 current = _current;
13375 other = _other;
13378 void* Set(void* cmd, GLenum _current, GLenum _other) {
13379 static_cast<ValueType*>(cmd)->Init(_current, _other);
13380 return NextCmdAddress<ValueType>(cmd);
13383 gpu::CommandHeader header;
13384 uint32_t current;
13385 uint32_t other;
13388 static_assert(sizeof(LoseContextCHROMIUM) == 12,
13389 "size of LoseContextCHROMIUM should be 12");
13390 static_assert(offsetof(LoseContextCHROMIUM, header) == 0,
13391 "offset of LoseContextCHROMIUM header should be 0");
13392 static_assert(offsetof(LoseContextCHROMIUM, current) == 4,
13393 "offset of LoseContextCHROMIUM current should be 4");
13394 static_assert(offsetof(LoseContextCHROMIUM, other) == 8,
13395 "offset of LoseContextCHROMIUM other should be 8");
13397 struct WaitSyncPointCHROMIUM {
13398 typedef WaitSyncPointCHROMIUM ValueType;
13399 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
13400 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13401 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13403 static uint32_t ComputeSize() {
13404 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13407 void SetHeader() { header.SetCmd<ValueType>(); }
13409 void Init(GLuint _sync_point) {
13410 SetHeader();
13411 sync_point = _sync_point;
13414 void* Set(void* cmd, GLuint _sync_point) {
13415 static_cast<ValueType*>(cmd)->Init(_sync_point);
13416 return NextCmdAddress<ValueType>(cmd);
13419 gpu::CommandHeader header;
13420 uint32_t sync_point;
13423 static_assert(sizeof(WaitSyncPointCHROMIUM) == 8,
13424 "size of WaitSyncPointCHROMIUM should be 8");
13425 static_assert(offsetof(WaitSyncPointCHROMIUM, header) == 0,
13426 "offset of WaitSyncPointCHROMIUM header should be 0");
13427 static_assert(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
13428 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
13430 struct DrawBuffersEXTImmediate {
13431 typedef DrawBuffersEXTImmediate ValueType;
13432 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
13433 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13434 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13436 static uint32_t ComputeDataSize(GLsizei count) {
13437 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
13440 static uint32_t ComputeSize(GLsizei count) {
13441 return static_cast<uint32_t>(sizeof(ValueType) +
13442 ComputeDataSize(count)); // NOLINT
13445 void SetHeader(GLsizei count) {
13446 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
13449 void Init(GLsizei _count, const GLenum* _bufs) {
13450 SetHeader(_count);
13451 count = _count;
13452 memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count));
13455 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
13456 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
13457 const uint32_t size = ComputeSize(_count);
13458 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13461 gpu::CommandHeader header;
13462 int32_t count;
13465 static_assert(sizeof(DrawBuffersEXTImmediate) == 8,
13466 "size of DrawBuffersEXTImmediate should be 8");
13467 static_assert(offsetof(DrawBuffersEXTImmediate, header) == 0,
13468 "offset of DrawBuffersEXTImmediate header should be 0");
13469 static_assert(offsetof(DrawBuffersEXTImmediate, count) == 4,
13470 "offset of DrawBuffersEXTImmediate count should be 4");
13472 struct DiscardBackbufferCHROMIUM {
13473 typedef DiscardBackbufferCHROMIUM ValueType;
13474 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
13475 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13476 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13478 static uint32_t ComputeSize() {
13479 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13482 void SetHeader() { header.SetCmd<ValueType>(); }
13484 void Init() { SetHeader(); }
13486 void* Set(void* cmd) {
13487 static_cast<ValueType*>(cmd)->Init();
13488 return NextCmdAddress<ValueType>(cmd);
13491 gpu::CommandHeader header;
13494 static_assert(sizeof(DiscardBackbufferCHROMIUM) == 4,
13495 "size of DiscardBackbufferCHROMIUM should be 4");
13496 static_assert(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
13497 "offset of DiscardBackbufferCHROMIUM header should be 0");
13499 struct ScheduleOverlayPlaneCHROMIUM {
13500 typedef ScheduleOverlayPlaneCHROMIUM ValueType;
13501 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM;
13502 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13503 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13505 static uint32_t ComputeSize() {
13506 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13509 void SetHeader() { header.SetCmd<ValueType>(); }
13511 void Init(GLint _plane_z_order,
13512 GLenum _plane_transform,
13513 GLuint _overlay_texture_id,
13514 GLint _bounds_x,
13515 GLint _bounds_y,
13516 GLint _bounds_width,
13517 GLint _bounds_height,
13518 GLfloat _uv_x,
13519 GLfloat _uv_y,
13520 GLfloat _uv_width,
13521 GLfloat _uv_height) {
13522 SetHeader();
13523 plane_z_order = _plane_z_order;
13524 plane_transform = _plane_transform;
13525 overlay_texture_id = _overlay_texture_id;
13526 bounds_x = _bounds_x;
13527 bounds_y = _bounds_y;
13528 bounds_width = _bounds_width;
13529 bounds_height = _bounds_height;
13530 uv_x = _uv_x;
13531 uv_y = _uv_y;
13532 uv_width = _uv_width;
13533 uv_height = _uv_height;
13536 void* Set(void* cmd,
13537 GLint _plane_z_order,
13538 GLenum _plane_transform,
13539 GLuint _overlay_texture_id,
13540 GLint _bounds_x,
13541 GLint _bounds_y,
13542 GLint _bounds_width,
13543 GLint _bounds_height,
13544 GLfloat _uv_x,
13545 GLfloat _uv_y,
13546 GLfloat _uv_width,
13547 GLfloat _uv_height) {
13548 static_cast<ValueType*>(cmd)->Init(_plane_z_order, _plane_transform,
13549 _overlay_texture_id, _bounds_x,
13550 _bounds_y, _bounds_width, _bounds_height,
13551 _uv_x, _uv_y, _uv_width, _uv_height);
13552 return NextCmdAddress<ValueType>(cmd);
13555 gpu::CommandHeader header;
13556 int32_t plane_z_order;
13557 uint32_t plane_transform;
13558 uint32_t overlay_texture_id;
13559 int32_t bounds_x;
13560 int32_t bounds_y;
13561 int32_t bounds_width;
13562 int32_t bounds_height;
13563 float uv_x;
13564 float uv_y;
13565 float uv_width;
13566 float uv_height;
13569 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48,
13570 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
13571 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0,
13572 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
13573 static_assert(
13574 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4,
13575 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
13576 static_assert(
13577 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8,
13578 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
13579 static_assert(
13580 offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12,
13581 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
13582 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16,
13583 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
13584 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20,
13585 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
13586 static_assert(
13587 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24,
13588 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
13589 static_assert(
13590 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28,
13591 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
13592 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32,
13593 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
13594 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36,
13595 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
13596 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
13597 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
13598 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
13599 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
13601 struct SwapInterval {
13602 typedef SwapInterval ValueType;
13603 static const CommandId kCmdId = kSwapInterval;
13604 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13605 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
13607 static uint32_t ComputeSize() {
13608 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13611 void SetHeader() { header.SetCmd<ValueType>(); }
13613 void Init(GLint _interval) {
13614 SetHeader();
13615 interval = _interval;
13618 void* Set(void* cmd, GLint _interval) {
13619 static_cast<ValueType*>(cmd)->Init(_interval);
13620 return NextCmdAddress<ValueType>(cmd);
13623 gpu::CommandHeader header;
13624 int32_t interval;
13627 static_assert(sizeof(SwapInterval) == 8, "size of SwapInterval should be 8");
13628 static_assert(offsetof(SwapInterval, header) == 0,
13629 "offset of SwapInterval header should be 0");
13630 static_assert(offsetof(SwapInterval, interval) == 4,
13631 "offset of SwapInterval interval should be 4");
13633 struct MatrixLoadfCHROMIUMImmediate {
13634 typedef MatrixLoadfCHROMIUMImmediate ValueType;
13635 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
13636 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13637 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13639 static uint32_t ComputeDataSize() {
13640 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
13643 static uint32_t ComputeSize() {
13644 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
13647 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
13649 void Init(GLenum _matrixMode, const GLfloat* _m) {
13650 SetHeader();
13651 matrixMode = _matrixMode;
13652 memcpy(ImmediateDataAddress(this), _m, ComputeDataSize());
13655 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) {
13656 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m);
13657 const uint32_t size = ComputeSize();
13658 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
13661 gpu::CommandHeader header;
13662 uint32_t matrixMode;
13665 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate) == 8,
13666 "size of MatrixLoadfCHROMIUMImmediate should be 8");
13667 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0,
13668 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
13669 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4,
13670 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
13672 struct MatrixLoadIdentityCHROMIUM {
13673 typedef MatrixLoadIdentityCHROMIUM ValueType;
13674 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM;
13675 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13676 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13678 static uint32_t ComputeSize() {
13679 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13682 void SetHeader() { header.SetCmd<ValueType>(); }
13684 void Init(GLenum _matrixMode) {
13685 SetHeader();
13686 matrixMode = _matrixMode;
13689 void* Set(void* cmd, GLenum _matrixMode) {
13690 static_cast<ValueType*>(cmd)->Init(_matrixMode);
13691 return NextCmdAddress<ValueType>(cmd);
13694 gpu::CommandHeader header;
13695 uint32_t matrixMode;
13698 static_assert(sizeof(MatrixLoadIdentityCHROMIUM) == 8,
13699 "size of MatrixLoadIdentityCHROMIUM should be 8");
13700 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0,
13701 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
13702 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4,
13703 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
13705 struct BlendBarrierKHR {
13706 typedef BlendBarrierKHR ValueType;
13707 static const CommandId kCmdId = kBlendBarrierKHR;
13708 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13709 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13711 static uint32_t ComputeSize() {
13712 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13715 void SetHeader() { header.SetCmd<ValueType>(); }
13717 void Init() { SetHeader(); }
13719 void* Set(void* cmd) {
13720 static_cast<ValueType*>(cmd)->Init();
13721 return NextCmdAddress<ValueType>(cmd);
13724 gpu::CommandHeader header;
13727 static_assert(sizeof(BlendBarrierKHR) == 4,
13728 "size of BlendBarrierKHR should be 4");
13729 static_assert(offsetof(BlendBarrierKHR, header) == 0,
13730 "offset of BlendBarrierKHR header should be 0");
13732 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_