Fix crash on app list start page keyboard navigation with <4 apps.
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format_autogen.h
blob76ca3dda267e8a9ee658063e6546062eec516e7f
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 CopyBufferSubData {
1637 typedef CopyBufferSubData ValueType;
1638 static const CommandId kCmdId = kCopyBufferSubData;
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 _readtarget,
1649 GLenum _writetarget,
1650 GLintptr _readoffset,
1651 GLintptr _writeoffset,
1652 GLsizeiptr _size) {
1653 SetHeader();
1654 readtarget = _readtarget;
1655 writetarget = _writetarget;
1656 readoffset = _readoffset;
1657 writeoffset = _writeoffset;
1658 size = _size;
1661 void* Set(void* cmd,
1662 GLenum _readtarget,
1663 GLenum _writetarget,
1664 GLintptr _readoffset,
1665 GLintptr _writeoffset,
1666 GLsizeiptr _size) {
1667 static_cast<ValueType*>(cmd)
1668 ->Init(_readtarget, _writetarget, _readoffset, _writeoffset, _size);
1669 return NextCmdAddress<ValueType>(cmd);
1672 gpu::CommandHeader header;
1673 uint32_t readtarget;
1674 uint32_t writetarget;
1675 int32_t readoffset;
1676 int32_t writeoffset;
1677 int32_t size;
1680 static_assert(sizeof(CopyBufferSubData) == 24,
1681 "size of CopyBufferSubData should be 24");
1682 static_assert(offsetof(CopyBufferSubData, header) == 0,
1683 "offset of CopyBufferSubData header should be 0");
1684 static_assert(offsetof(CopyBufferSubData, readtarget) == 4,
1685 "offset of CopyBufferSubData readtarget should be 4");
1686 static_assert(offsetof(CopyBufferSubData, writetarget) == 8,
1687 "offset of CopyBufferSubData writetarget should be 8");
1688 static_assert(offsetof(CopyBufferSubData, readoffset) == 12,
1689 "offset of CopyBufferSubData readoffset should be 12");
1690 static_assert(offsetof(CopyBufferSubData, writeoffset) == 16,
1691 "offset of CopyBufferSubData writeoffset should be 16");
1692 static_assert(offsetof(CopyBufferSubData, size) == 20,
1693 "offset of CopyBufferSubData size should be 20");
1695 struct CopyTexImage2D {
1696 typedef CopyTexImage2D ValueType;
1697 static const CommandId kCmdId = kCopyTexImage2D;
1698 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1699 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1701 static uint32_t ComputeSize() {
1702 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1705 void SetHeader() { header.SetCmd<ValueType>(); }
1707 void Init(GLenum _target,
1708 GLint _level,
1709 GLenum _internalformat,
1710 GLint _x,
1711 GLint _y,
1712 GLsizei _width,
1713 GLsizei _height) {
1714 SetHeader();
1715 target = _target;
1716 level = _level;
1717 internalformat = _internalformat;
1718 x = _x;
1719 y = _y;
1720 width = _width;
1721 height = _height;
1724 void* Set(void* cmd,
1725 GLenum _target,
1726 GLint _level,
1727 GLenum _internalformat,
1728 GLint _x,
1729 GLint _y,
1730 GLsizei _width,
1731 GLsizei _height) {
1732 static_cast<ValueType*>(cmd)
1733 ->Init(_target, _level, _internalformat, _x, _y, _width, _height);
1734 return NextCmdAddress<ValueType>(cmd);
1737 gpu::CommandHeader header;
1738 uint32_t target;
1739 int32_t level;
1740 uint32_t internalformat;
1741 int32_t x;
1742 int32_t y;
1743 int32_t width;
1744 int32_t height;
1745 static const int32_t border = 0;
1748 static_assert(sizeof(CopyTexImage2D) == 32,
1749 "size of CopyTexImage2D should be 32");
1750 static_assert(offsetof(CopyTexImage2D, header) == 0,
1751 "offset of CopyTexImage2D header should be 0");
1752 static_assert(offsetof(CopyTexImage2D, target) == 4,
1753 "offset of CopyTexImage2D target should be 4");
1754 static_assert(offsetof(CopyTexImage2D, level) == 8,
1755 "offset of CopyTexImage2D level should be 8");
1756 static_assert(offsetof(CopyTexImage2D, internalformat) == 12,
1757 "offset of CopyTexImage2D internalformat should be 12");
1758 static_assert(offsetof(CopyTexImage2D, x) == 16,
1759 "offset of CopyTexImage2D x should be 16");
1760 static_assert(offsetof(CopyTexImage2D, y) == 20,
1761 "offset of CopyTexImage2D y should be 20");
1762 static_assert(offsetof(CopyTexImage2D, width) == 24,
1763 "offset of CopyTexImage2D width should be 24");
1764 static_assert(offsetof(CopyTexImage2D, height) == 28,
1765 "offset of CopyTexImage2D height should be 28");
1767 struct CopyTexSubImage2D {
1768 typedef CopyTexSubImage2D ValueType;
1769 static const CommandId kCmdId = kCopyTexSubImage2D;
1770 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1771 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1773 static uint32_t ComputeSize() {
1774 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1777 void SetHeader() { header.SetCmd<ValueType>(); }
1779 void Init(GLenum _target,
1780 GLint _level,
1781 GLint _xoffset,
1782 GLint _yoffset,
1783 GLint _x,
1784 GLint _y,
1785 GLsizei _width,
1786 GLsizei _height) {
1787 SetHeader();
1788 target = _target;
1789 level = _level;
1790 xoffset = _xoffset;
1791 yoffset = _yoffset;
1792 x = _x;
1793 y = _y;
1794 width = _width;
1795 height = _height;
1798 void* Set(void* cmd,
1799 GLenum _target,
1800 GLint _level,
1801 GLint _xoffset,
1802 GLint _yoffset,
1803 GLint _x,
1804 GLint _y,
1805 GLsizei _width,
1806 GLsizei _height) {
1807 static_cast<ValueType*>(cmd)
1808 ->Init(_target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
1809 return NextCmdAddress<ValueType>(cmd);
1812 gpu::CommandHeader header;
1813 uint32_t target;
1814 int32_t level;
1815 int32_t xoffset;
1816 int32_t yoffset;
1817 int32_t x;
1818 int32_t y;
1819 int32_t width;
1820 int32_t height;
1823 static_assert(sizeof(CopyTexSubImage2D) == 36,
1824 "size of CopyTexSubImage2D should be 36");
1825 static_assert(offsetof(CopyTexSubImage2D, header) == 0,
1826 "offset of CopyTexSubImage2D header should be 0");
1827 static_assert(offsetof(CopyTexSubImage2D, target) == 4,
1828 "offset of CopyTexSubImage2D target should be 4");
1829 static_assert(offsetof(CopyTexSubImage2D, level) == 8,
1830 "offset of CopyTexSubImage2D level should be 8");
1831 static_assert(offsetof(CopyTexSubImage2D, xoffset) == 12,
1832 "offset of CopyTexSubImage2D xoffset should be 12");
1833 static_assert(offsetof(CopyTexSubImage2D, yoffset) == 16,
1834 "offset of CopyTexSubImage2D yoffset should be 16");
1835 static_assert(offsetof(CopyTexSubImage2D, x) == 20,
1836 "offset of CopyTexSubImage2D x should be 20");
1837 static_assert(offsetof(CopyTexSubImage2D, y) == 24,
1838 "offset of CopyTexSubImage2D y should be 24");
1839 static_assert(offsetof(CopyTexSubImage2D, width) == 28,
1840 "offset of CopyTexSubImage2D width should be 28");
1841 static_assert(offsetof(CopyTexSubImage2D, height) == 32,
1842 "offset of CopyTexSubImage2D height should be 32");
1844 struct CopyTexSubImage3D {
1845 typedef CopyTexSubImage3D ValueType;
1846 static const CommandId kCmdId = kCopyTexSubImage3D;
1847 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1850 static uint32_t ComputeSize() {
1851 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1854 void SetHeader() { header.SetCmd<ValueType>(); }
1856 void Init(GLenum _target,
1857 GLint _level,
1858 GLint _xoffset,
1859 GLint _yoffset,
1860 GLint _zoffset,
1861 GLint _x,
1862 GLint _y,
1863 GLsizei _width,
1864 GLsizei _height) {
1865 SetHeader();
1866 target = _target;
1867 level = _level;
1868 xoffset = _xoffset;
1869 yoffset = _yoffset;
1870 zoffset = _zoffset;
1871 x = _x;
1872 y = _y;
1873 width = _width;
1874 height = _height;
1877 void* Set(void* cmd,
1878 GLenum _target,
1879 GLint _level,
1880 GLint _xoffset,
1881 GLint _yoffset,
1882 GLint _zoffset,
1883 GLint _x,
1884 GLint _y,
1885 GLsizei _width,
1886 GLsizei _height) {
1887 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
1888 _zoffset, _x, _y, _width, _height);
1889 return NextCmdAddress<ValueType>(cmd);
1892 gpu::CommandHeader header;
1893 uint32_t target;
1894 int32_t level;
1895 int32_t xoffset;
1896 int32_t yoffset;
1897 int32_t zoffset;
1898 int32_t x;
1899 int32_t y;
1900 int32_t width;
1901 int32_t height;
1904 static_assert(sizeof(CopyTexSubImage3D) == 40,
1905 "size of CopyTexSubImage3D should be 40");
1906 static_assert(offsetof(CopyTexSubImage3D, header) == 0,
1907 "offset of CopyTexSubImage3D header should be 0");
1908 static_assert(offsetof(CopyTexSubImage3D, target) == 4,
1909 "offset of CopyTexSubImage3D target should be 4");
1910 static_assert(offsetof(CopyTexSubImage3D, level) == 8,
1911 "offset of CopyTexSubImage3D level should be 8");
1912 static_assert(offsetof(CopyTexSubImage3D, xoffset) == 12,
1913 "offset of CopyTexSubImage3D xoffset should be 12");
1914 static_assert(offsetof(CopyTexSubImage3D, yoffset) == 16,
1915 "offset of CopyTexSubImage3D yoffset should be 16");
1916 static_assert(offsetof(CopyTexSubImage3D, zoffset) == 20,
1917 "offset of CopyTexSubImage3D zoffset should be 20");
1918 static_assert(offsetof(CopyTexSubImage3D, x) == 24,
1919 "offset of CopyTexSubImage3D x should be 24");
1920 static_assert(offsetof(CopyTexSubImage3D, y) == 28,
1921 "offset of CopyTexSubImage3D y should be 28");
1922 static_assert(offsetof(CopyTexSubImage3D, width) == 32,
1923 "offset of CopyTexSubImage3D width should be 32");
1924 static_assert(offsetof(CopyTexSubImage3D, height) == 36,
1925 "offset of CopyTexSubImage3D height should be 36");
1927 struct CreateProgram {
1928 typedef CreateProgram ValueType;
1929 static const CommandId kCmdId = kCreateProgram;
1930 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1931 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1933 static uint32_t ComputeSize() {
1934 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1937 void SetHeader() { header.SetCmd<ValueType>(); }
1939 void Init(uint32_t _client_id) {
1940 SetHeader();
1941 client_id = _client_id;
1944 void* Set(void* cmd, uint32_t _client_id) {
1945 static_cast<ValueType*>(cmd)->Init(_client_id);
1946 return NextCmdAddress<ValueType>(cmd);
1949 gpu::CommandHeader header;
1950 uint32_t client_id;
1953 static_assert(sizeof(CreateProgram) == 8, "size of CreateProgram should be 8");
1954 static_assert(offsetof(CreateProgram, header) == 0,
1955 "offset of CreateProgram header should be 0");
1956 static_assert(offsetof(CreateProgram, client_id) == 4,
1957 "offset of CreateProgram client_id should be 4");
1959 struct CreateShader {
1960 typedef CreateShader ValueType;
1961 static const CommandId kCmdId = kCreateShader;
1962 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1963 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
1965 static uint32_t ComputeSize() {
1966 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
1969 void SetHeader() { header.SetCmd<ValueType>(); }
1971 void Init(GLenum _type, uint32_t _client_id) {
1972 SetHeader();
1973 type = _type;
1974 client_id = _client_id;
1977 void* Set(void* cmd, GLenum _type, uint32_t _client_id) {
1978 static_cast<ValueType*>(cmd)->Init(_type, _client_id);
1979 return NextCmdAddress<ValueType>(cmd);
1982 gpu::CommandHeader header;
1983 uint32_t type;
1984 uint32_t client_id;
1987 static_assert(sizeof(CreateShader) == 12, "size of CreateShader should be 12");
1988 static_assert(offsetof(CreateShader, header) == 0,
1989 "offset of CreateShader header should be 0");
1990 static_assert(offsetof(CreateShader, type) == 4,
1991 "offset of CreateShader type should be 4");
1992 static_assert(offsetof(CreateShader, client_id) == 8,
1993 "offset of CreateShader client_id should be 8");
1995 struct CullFace {
1996 typedef CullFace ValueType;
1997 static const CommandId kCmdId = kCullFace;
1998 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
1999 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2001 static uint32_t ComputeSize() {
2002 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2005 void SetHeader() { header.SetCmd<ValueType>(); }
2007 void Init(GLenum _mode) {
2008 SetHeader();
2009 mode = _mode;
2012 void* Set(void* cmd, GLenum _mode) {
2013 static_cast<ValueType*>(cmd)->Init(_mode);
2014 return NextCmdAddress<ValueType>(cmd);
2017 gpu::CommandHeader header;
2018 uint32_t mode;
2021 static_assert(sizeof(CullFace) == 8, "size of CullFace should be 8");
2022 static_assert(offsetof(CullFace, header) == 0,
2023 "offset of CullFace header should be 0");
2024 static_assert(offsetof(CullFace, mode) == 4,
2025 "offset of CullFace mode should be 4");
2027 struct DeleteBuffersImmediate {
2028 typedef DeleteBuffersImmediate ValueType;
2029 static const CommandId kCmdId = kDeleteBuffersImmediate;
2030 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2031 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2033 static uint32_t ComputeDataSize(GLsizei n) {
2034 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2037 static uint32_t ComputeSize(GLsizei n) {
2038 return static_cast<uint32_t>(sizeof(ValueType) +
2039 ComputeDataSize(n)); // NOLINT
2042 void SetHeader(GLsizei n) {
2043 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2046 void Init(GLsizei _n, const GLuint* _buffers) {
2047 SetHeader(_n);
2048 n = _n;
2049 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
2052 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
2053 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
2054 const uint32_t size = ComputeSize(_n);
2055 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2058 gpu::CommandHeader header;
2059 int32_t n;
2062 static_assert(sizeof(DeleteBuffersImmediate) == 8,
2063 "size of DeleteBuffersImmediate should be 8");
2064 static_assert(offsetof(DeleteBuffersImmediate, header) == 0,
2065 "offset of DeleteBuffersImmediate header should be 0");
2066 static_assert(offsetof(DeleteBuffersImmediate, n) == 4,
2067 "offset of DeleteBuffersImmediate n should be 4");
2069 struct DeleteFramebuffersImmediate {
2070 typedef DeleteFramebuffersImmediate ValueType;
2071 static const CommandId kCmdId = kDeleteFramebuffersImmediate;
2072 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2073 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2075 static uint32_t ComputeDataSize(GLsizei n) {
2076 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2079 static uint32_t ComputeSize(GLsizei n) {
2080 return static_cast<uint32_t>(sizeof(ValueType) +
2081 ComputeDataSize(n)); // NOLINT
2084 void SetHeader(GLsizei n) {
2085 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2088 void Init(GLsizei _n, const GLuint* _framebuffers) {
2089 SetHeader(_n);
2090 n = _n;
2091 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
2094 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
2095 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
2096 const uint32_t size = ComputeSize(_n);
2097 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2100 gpu::CommandHeader header;
2101 int32_t n;
2104 static_assert(sizeof(DeleteFramebuffersImmediate) == 8,
2105 "size of DeleteFramebuffersImmediate should be 8");
2106 static_assert(offsetof(DeleteFramebuffersImmediate, header) == 0,
2107 "offset of DeleteFramebuffersImmediate header should be 0");
2108 static_assert(offsetof(DeleteFramebuffersImmediate, n) == 4,
2109 "offset of DeleteFramebuffersImmediate n should be 4");
2111 struct DeleteProgram {
2112 typedef DeleteProgram ValueType;
2113 static const CommandId kCmdId = kDeleteProgram;
2114 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2115 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2117 static uint32_t ComputeSize() {
2118 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2121 void SetHeader() { header.SetCmd<ValueType>(); }
2123 void Init(GLuint _program) {
2124 SetHeader();
2125 program = _program;
2128 void* Set(void* cmd, GLuint _program) {
2129 static_cast<ValueType*>(cmd)->Init(_program);
2130 return NextCmdAddress<ValueType>(cmd);
2133 gpu::CommandHeader header;
2134 uint32_t program;
2137 static_assert(sizeof(DeleteProgram) == 8, "size of DeleteProgram should be 8");
2138 static_assert(offsetof(DeleteProgram, header) == 0,
2139 "offset of DeleteProgram header should be 0");
2140 static_assert(offsetof(DeleteProgram, program) == 4,
2141 "offset of DeleteProgram program should be 4");
2143 struct DeleteRenderbuffersImmediate {
2144 typedef DeleteRenderbuffersImmediate ValueType;
2145 static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
2146 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2147 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2149 static uint32_t ComputeDataSize(GLsizei n) {
2150 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2153 static uint32_t ComputeSize(GLsizei n) {
2154 return static_cast<uint32_t>(sizeof(ValueType) +
2155 ComputeDataSize(n)); // NOLINT
2158 void SetHeader(GLsizei n) {
2159 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2162 void Init(GLsizei _n, const GLuint* _renderbuffers) {
2163 SetHeader(_n);
2164 n = _n;
2165 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
2168 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
2169 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
2170 const uint32_t size = ComputeSize(_n);
2171 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2174 gpu::CommandHeader header;
2175 int32_t n;
2178 static_assert(sizeof(DeleteRenderbuffersImmediate) == 8,
2179 "size of DeleteRenderbuffersImmediate should be 8");
2180 static_assert(offsetof(DeleteRenderbuffersImmediate, header) == 0,
2181 "offset of DeleteRenderbuffersImmediate header should be 0");
2182 static_assert(offsetof(DeleteRenderbuffersImmediate, n) == 4,
2183 "offset of DeleteRenderbuffersImmediate n should be 4");
2185 struct DeleteSamplersImmediate {
2186 typedef DeleteSamplersImmediate ValueType;
2187 static const CommandId kCmdId = kDeleteSamplersImmediate;
2188 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2189 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2191 static uint32_t ComputeDataSize(GLsizei n) {
2192 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2195 static uint32_t ComputeSize(GLsizei n) {
2196 return static_cast<uint32_t>(sizeof(ValueType) +
2197 ComputeDataSize(n)); // NOLINT
2200 void SetHeader(GLsizei n) {
2201 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2204 void Init(GLsizei _n, const GLuint* _samplers) {
2205 SetHeader(_n);
2206 n = _n;
2207 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n));
2210 void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) {
2211 static_cast<ValueType*>(cmd)->Init(_n, _samplers);
2212 const uint32_t size = ComputeSize(_n);
2213 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2216 gpu::CommandHeader header;
2217 int32_t n;
2220 static_assert(sizeof(DeleteSamplersImmediate) == 8,
2221 "size of DeleteSamplersImmediate should be 8");
2222 static_assert(offsetof(DeleteSamplersImmediate, header) == 0,
2223 "offset of DeleteSamplersImmediate header should be 0");
2224 static_assert(offsetof(DeleteSamplersImmediate, n) == 4,
2225 "offset of DeleteSamplersImmediate n should be 4");
2227 struct DeleteSync {
2228 typedef DeleteSync ValueType;
2229 static const CommandId kCmdId = kDeleteSync;
2230 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2231 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2233 static uint32_t ComputeSize() {
2234 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2237 void SetHeader() { header.SetCmd<ValueType>(); }
2239 void Init(GLuint _sync) {
2240 SetHeader();
2241 sync = _sync;
2244 void* Set(void* cmd, GLuint _sync) {
2245 static_cast<ValueType*>(cmd)->Init(_sync);
2246 return NextCmdAddress<ValueType>(cmd);
2249 gpu::CommandHeader header;
2250 uint32_t sync;
2253 static_assert(sizeof(DeleteSync) == 8, "size of DeleteSync should be 8");
2254 static_assert(offsetof(DeleteSync, header) == 0,
2255 "offset of DeleteSync header should be 0");
2256 static_assert(offsetof(DeleteSync, sync) == 4,
2257 "offset of DeleteSync sync should be 4");
2259 struct DeleteShader {
2260 typedef DeleteShader ValueType;
2261 static const CommandId kCmdId = kDeleteShader;
2262 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2263 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2265 static uint32_t ComputeSize() {
2266 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2269 void SetHeader() { header.SetCmd<ValueType>(); }
2271 void Init(GLuint _shader) {
2272 SetHeader();
2273 shader = _shader;
2276 void* Set(void* cmd, GLuint _shader) {
2277 static_cast<ValueType*>(cmd)->Init(_shader);
2278 return NextCmdAddress<ValueType>(cmd);
2281 gpu::CommandHeader header;
2282 uint32_t shader;
2285 static_assert(sizeof(DeleteShader) == 8, "size of DeleteShader should be 8");
2286 static_assert(offsetof(DeleteShader, header) == 0,
2287 "offset of DeleteShader header should be 0");
2288 static_assert(offsetof(DeleteShader, shader) == 4,
2289 "offset of DeleteShader shader should be 4");
2291 struct DeleteTexturesImmediate {
2292 typedef DeleteTexturesImmediate ValueType;
2293 static const CommandId kCmdId = kDeleteTexturesImmediate;
2294 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2295 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2297 static uint32_t ComputeDataSize(GLsizei n) {
2298 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2301 static uint32_t ComputeSize(GLsizei n) {
2302 return static_cast<uint32_t>(sizeof(ValueType) +
2303 ComputeDataSize(n)); // NOLINT
2306 void SetHeader(GLsizei n) {
2307 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2310 void Init(GLsizei _n, const GLuint* _textures) {
2311 SetHeader(_n);
2312 n = _n;
2313 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
2316 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
2317 static_cast<ValueType*>(cmd)->Init(_n, _textures);
2318 const uint32_t size = ComputeSize(_n);
2319 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2322 gpu::CommandHeader header;
2323 int32_t n;
2326 static_assert(sizeof(DeleteTexturesImmediate) == 8,
2327 "size of DeleteTexturesImmediate should be 8");
2328 static_assert(offsetof(DeleteTexturesImmediate, header) == 0,
2329 "offset of DeleteTexturesImmediate header should be 0");
2330 static_assert(offsetof(DeleteTexturesImmediate, n) == 4,
2331 "offset of DeleteTexturesImmediate n should be 4");
2333 struct DeleteTransformFeedbacksImmediate {
2334 typedef DeleteTransformFeedbacksImmediate ValueType;
2335 static const CommandId kCmdId = kDeleteTransformFeedbacksImmediate;
2336 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
2337 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2339 static uint32_t ComputeDataSize(GLsizei n) {
2340 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
2343 static uint32_t ComputeSize(GLsizei n) {
2344 return static_cast<uint32_t>(sizeof(ValueType) +
2345 ComputeDataSize(n)); // NOLINT
2348 void SetHeader(GLsizei n) {
2349 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
2352 void Init(GLsizei _n, const GLuint* _ids) {
2353 SetHeader(_n);
2354 n = _n;
2355 memcpy(ImmediateDataAddress(this), _ids, ComputeDataSize(_n));
2358 void* Set(void* cmd, GLsizei _n, const GLuint* _ids) {
2359 static_cast<ValueType*>(cmd)->Init(_n, _ids);
2360 const uint32_t size = ComputeSize(_n);
2361 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
2364 gpu::CommandHeader header;
2365 int32_t n;
2368 static_assert(sizeof(DeleteTransformFeedbacksImmediate) == 8,
2369 "size of DeleteTransformFeedbacksImmediate should be 8");
2370 static_assert(offsetof(DeleteTransformFeedbacksImmediate, header) == 0,
2371 "offset of DeleteTransformFeedbacksImmediate header should be 0");
2372 static_assert(offsetof(DeleteTransformFeedbacksImmediate, n) == 4,
2373 "offset of DeleteTransformFeedbacksImmediate n should be 4");
2375 struct DepthFunc {
2376 typedef DepthFunc ValueType;
2377 static const CommandId kCmdId = kDepthFunc;
2378 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2379 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2381 static uint32_t ComputeSize() {
2382 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2385 void SetHeader() { header.SetCmd<ValueType>(); }
2387 void Init(GLenum _func) {
2388 SetHeader();
2389 func = _func;
2392 void* Set(void* cmd, GLenum _func) {
2393 static_cast<ValueType*>(cmd)->Init(_func);
2394 return NextCmdAddress<ValueType>(cmd);
2397 gpu::CommandHeader header;
2398 uint32_t func;
2401 static_assert(sizeof(DepthFunc) == 8, "size of DepthFunc should be 8");
2402 static_assert(offsetof(DepthFunc, header) == 0,
2403 "offset of DepthFunc header should be 0");
2404 static_assert(offsetof(DepthFunc, func) == 4,
2405 "offset of DepthFunc func should be 4");
2407 struct DepthMask {
2408 typedef DepthMask ValueType;
2409 static const CommandId kCmdId = kDepthMask;
2410 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2411 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2413 static uint32_t ComputeSize() {
2414 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2417 void SetHeader() { header.SetCmd<ValueType>(); }
2419 void Init(GLboolean _flag) {
2420 SetHeader();
2421 flag = _flag;
2424 void* Set(void* cmd, GLboolean _flag) {
2425 static_cast<ValueType*>(cmd)->Init(_flag);
2426 return NextCmdAddress<ValueType>(cmd);
2429 gpu::CommandHeader header;
2430 uint32_t flag;
2433 static_assert(sizeof(DepthMask) == 8, "size of DepthMask should be 8");
2434 static_assert(offsetof(DepthMask, header) == 0,
2435 "offset of DepthMask header should be 0");
2436 static_assert(offsetof(DepthMask, flag) == 4,
2437 "offset of DepthMask flag should be 4");
2439 struct DepthRangef {
2440 typedef DepthRangef ValueType;
2441 static const CommandId kCmdId = kDepthRangef;
2442 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2443 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2445 static uint32_t ComputeSize() {
2446 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2449 void SetHeader() { header.SetCmd<ValueType>(); }
2451 void Init(GLclampf _zNear, GLclampf _zFar) {
2452 SetHeader();
2453 zNear = _zNear;
2454 zFar = _zFar;
2457 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
2458 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
2459 return NextCmdAddress<ValueType>(cmd);
2462 gpu::CommandHeader header;
2463 float zNear;
2464 float zFar;
2467 static_assert(sizeof(DepthRangef) == 12, "size of DepthRangef should be 12");
2468 static_assert(offsetof(DepthRangef, header) == 0,
2469 "offset of DepthRangef header should be 0");
2470 static_assert(offsetof(DepthRangef, zNear) == 4,
2471 "offset of DepthRangef zNear should be 4");
2472 static_assert(offsetof(DepthRangef, zFar) == 8,
2473 "offset of DepthRangef zFar should be 8");
2475 struct DetachShader {
2476 typedef DetachShader ValueType;
2477 static const CommandId kCmdId = kDetachShader;
2478 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2479 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2481 static uint32_t ComputeSize() {
2482 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2485 void SetHeader() { header.SetCmd<ValueType>(); }
2487 void Init(GLuint _program, GLuint _shader) {
2488 SetHeader();
2489 program = _program;
2490 shader = _shader;
2493 void* Set(void* cmd, GLuint _program, GLuint _shader) {
2494 static_cast<ValueType*>(cmd)->Init(_program, _shader);
2495 return NextCmdAddress<ValueType>(cmd);
2498 gpu::CommandHeader header;
2499 uint32_t program;
2500 uint32_t shader;
2503 static_assert(sizeof(DetachShader) == 12, "size of DetachShader should be 12");
2504 static_assert(offsetof(DetachShader, header) == 0,
2505 "offset of DetachShader header should be 0");
2506 static_assert(offsetof(DetachShader, program) == 4,
2507 "offset of DetachShader program should be 4");
2508 static_assert(offsetof(DetachShader, shader) == 8,
2509 "offset of DetachShader shader should be 8");
2511 struct Disable {
2512 typedef Disable ValueType;
2513 static const CommandId kCmdId = kDisable;
2514 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2515 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2517 static uint32_t ComputeSize() {
2518 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2521 void SetHeader() { header.SetCmd<ValueType>(); }
2523 void Init(GLenum _cap) {
2524 SetHeader();
2525 cap = _cap;
2528 void* Set(void* cmd, GLenum _cap) {
2529 static_cast<ValueType*>(cmd)->Init(_cap);
2530 return NextCmdAddress<ValueType>(cmd);
2533 gpu::CommandHeader header;
2534 uint32_t cap;
2537 static_assert(sizeof(Disable) == 8, "size of Disable should be 8");
2538 static_assert(offsetof(Disable, header) == 0,
2539 "offset of Disable header should be 0");
2540 static_assert(offsetof(Disable, cap) == 4, "offset of Disable cap should be 4");
2542 struct DisableVertexAttribArray {
2543 typedef DisableVertexAttribArray ValueType;
2544 static const CommandId kCmdId = kDisableVertexAttribArray;
2545 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2546 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2548 static uint32_t ComputeSize() {
2549 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2552 void SetHeader() { header.SetCmd<ValueType>(); }
2554 void Init(GLuint _index) {
2555 SetHeader();
2556 index = _index;
2559 void* Set(void* cmd, GLuint _index) {
2560 static_cast<ValueType*>(cmd)->Init(_index);
2561 return NextCmdAddress<ValueType>(cmd);
2564 gpu::CommandHeader header;
2565 uint32_t index;
2568 static_assert(sizeof(DisableVertexAttribArray) == 8,
2569 "size of DisableVertexAttribArray should be 8");
2570 static_assert(offsetof(DisableVertexAttribArray, header) == 0,
2571 "offset of DisableVertexAttribArray header should be 0");
2572 static_assert(offsetof(DisableVertexAttribArray, index) == 4,
2573 "offset of DisableVertexAttribArray index should be 4");
2575 struct DrawArrays {
2576 typedef DrawArrays ValueType;
2577 static const CommandId kCmdId = kDrawArrays;
2578 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2579 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2581 static uint32_t ComputeSize() {
2582 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2585 void SetHeader() { header.SetCmd<ValueType>(); }
2587 void Init(GLenum _mode, GLint _first, GLsizei _count) {
2588 SetHeader();
2589 mode = _mode;
2590 first = _first;
2591 count = _count;
2594 void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
2595 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
2596 return NextCmdAddress<ValueType>(cmd);
2599 gpu::CommandHeader header;
2600 uint32_t mode;
2601 int32_t first;
2602 int32_t count;
2605 static_assert(sizeof(DrawArrays) == 16, "size of DrawArrays should be 16");
2606 static_assert(offsetof(DrawArrays, header) == 0,
2607 "offset of DrawArrays header should be 0");
2608 static_assert(offsetof(DrawArrays, mode) == 4,
2609 "offset of DrawArrays mode should be 4");
2610 static_assert(offsetof(DrawArrays, first) == 8,
2611 "offset of DrawArrays first should be 8");
2612 static_assert(offsetof(DrawArrays, count) == 12,
2613 "offset of DrawArrays count should be 12");
2615 struct DrawElements {
2616 typedef DrawElements ValueType;
2617 static const CommandId kCmdId = kDrawElements;
2618 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2619 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
2621 static uint32_t ComputeSize() {
2622 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2625 void SetHeader() { header.SetCmd<ValueType>(); }
2627 void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
2628 SetHeader();
2629 mode = _mode;
2630 count = _count;
2631 type = _type;
2632 index_offset = _index_offset;
2635 void* Set(void* cmd,
2636 GLenum _mode,
2637 GLsizei _count,
2638 GLenum _type,
2639 GLuint _index_offset) {
2640 static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
2641 return NextCmdAddress<ValueType>(cmd);
2644 gpu::CommandHeader header;
2645 uint32_t mode;
2646 int32_t count;
2647 uint32_t type;
2648 uint32_t index_offset;
2651 static_assert(sizeof(DrawElements) == 20, "size of DrawElements should be 20");
2652 static_assert(offsetof(DrawElements, header) == 0,
2653 "offset of DrawElements header should be 0");
2654 static_assert(offsetof(DrawElements, mode) == 4,
2655 "offset of DrawElements mode should be 4");
2656 static_assert(offsetof(DrawElements, count) == 8,
2657 "offset of DrawElements count should be 8");
2658 static_assert(offsetof(DrawElements, type) == 12,
2659 "offset of DrawElements type should be 12");
2660 static_assert(offsetof(DrawElements, index_offset) == 16,
2661 "offset of DrawElements index_offset should be 16");
2663 struct Enable {
2664 typedef Enable ValueType;
2665 static const CommandId kCmdId = kEnable;
2666 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2667 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2669 static uint32_t ComputeSize() {
2670 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2673 void SetHeader() { header.SetCmd<ValueType>(); }
2675 void Init(GLenum _cap) {
2676 SetHeader();
2677 cap = _cap;
2680 void* Set(void* cmd, GLenum _cap) {
2681 static_cast<ValueType*>(cmd)->Init(_cap);
2682 return NextCmdAddress<ValueType>(cmd);
2685 gpu::CommandHeader header;
2686 uint32_t cap;
2689 static_assert(sizeof(Enable) == 8, "size of Enable should be 8");
2690 static_assert(offsetof(Enable, header) == 0,
2691 "offset of Enable header should be 0");
2692 static_assert(offsetof(Enable, cap) == 4, "offset of Enable cap should be 4");
2694 struct EnableVertexAttribArray {
2695 typedef EnableVertexAttribArray ValueType;
2696 static const CommandId kCmdId = kEnableVertexAttribArray;
2697 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2698 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2700 static uint32_t ComputeSize() {
2701 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2704 void SetHeader() { header.SetCmd<ValueType>(); }
2706 void Init(GLuint _index) {
2707 SetHeader();
2708 index = _index;
2711 void* Set(void* cmd, GLuint _index) {
2712 static_cast<ValueType*>(cmd)->Init(_index);
2713 return NextCmdAddress<ValueType>(cmd);
2716 gpu::CommandHeader header;
2717 uint32_t index;
2720 static_assert(sizeof(EnableVertexAttribArray) == 8,
2721 "size of EnableVertexAttribArray should be 8");
2722 static_assert(offsetof(EnableVertexAttribArray, header) == 0,
2723 "offset of EnableVertexAttribArray header should be 0");
2724 static_assert(offsetof(EnableVertexAttribArray, index) == 4,
2725 "offset of EnableVertexAttribArray index should be 4");
2727 struct FenceSync {
2728 typedef FenceSync ValueType;
2729 static const CommandId kCmdId = kFenceSync;
2730 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2731 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2733 static uint32_t ComputeSize() {
2734 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2737 void SetHeader() { header.SetCmd<ValueType>(); }
2739 void Init(uint32_t _client_id) {
2740 SetHeader();
2741 client_id = _client_id;
2744 void* Set(void* cmd, uint32_t _client_id) {
2745 static_cast<ValueType*>(cmd)->Init(_client_id);
2746 return NextCmdAddress<ValueType>(cmd);
2749 gpu::CommandHeader header;
2750 uint32_t client_id;
2751 static const uint32_t condition = GL_SYNC_GPU_COMMANDS_COMPLETE;
2752 static const uint32_t flags = 0;
2755 static_assert(sizeof(FenceSync) == 8, "size of FenceSync should be 8");
2756 static_assert(offsetof(FenceSync, header) == 0,
2757 "offset of FenceSync header should be 0");
2758 static_assert(offsetof(FenceSync, client_id) == 4,
2759 "offset of FenceSync client_id should be 4");
2761 struct Finish {
2762 typedef Finish ValueType;
2763 static const CommandId kCmdId = kFinish;
2764 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2765 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2767 static uint32_t ComputeSize() {
2768 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2771 void SetHeader() { header.SetCmd<ValueType>(); }
2773 void Init() { SetHeader(); }
2775 void* Set(void* cmd) {
2776 static_cast<ValueType*>(cmd)->Init();
2777 return NextCmdAddress<ValueType>(cmd);
2780 gpu::CommandHeader header;
2783 static_assert(sizeof(Finish) == 4, "size of Finish should be 4");
2784 static_assert(offsetof(Finish, header) == 0,
2785 "offset of Finish header should be 0");
2787 struct Flush {
2788 typedef Flush ValueType;
2789 static const CommandId kCmdId = kFlush;
2790 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2791 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2793 static uint32_t ComputeSize() {
2794 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2797 void SetHeader() { header.SetCmd<ValueType>(); }
2799 void Init() { SetHeader(); }
2801 void* Set(void* cmd) {
2802 static_cast<ValueType*>(cmd)->Init();
2803 return NextCmdAddress<ValueType>(cmd);
2806 gpu::CommandHeader header;
2809 static_assert(sizeof(Flush) == 4, "size of Flush should be 4");
2810 static_assert(offsetof(Flush, header) == 0,
2811 "offset of Flush header should be 0");
2813 struct FramebufferRenderbuffer {
2814 typedef FramebufferRenderbuffer ValueType;
2815 static const CommandId kCmdId = kFramebufferRenderbuffer;
2816 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2817 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2819 static uint32_t ComputeSize() {
2820 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2823 void SetHeader() { header.SetCmd<ValueType>(); }
2825 void Init(GLenum _target,
2826 GLenum _attachment,
2827 GLenum _renderbuffertarget,
2828 GLuint _renderbuffer) {
2829 SetHeader();
2830 target = _target;
2831 attachment = _attachment;
2832 renderbuffertarget = _renderbuffertarget;
2833 renderbuffer = _renderbuffer;
2836 void* Set(void* cmd,
2837 GLenum _target,
2838 GLenum _attachment,
2839 GLenum _renderbuffertarget,
2840 GLuint _renderbuffer) {
2841 static_cast<ValueType*>(cmd)
2842 ->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
2843 return NextCmdAddress<ValueType>(cmd);
2846 gpu::CommandHeader header;
2847 uint32_t target;
2848 uint32_t attachment;
2849 uint32_t renderbuffertarget;
2850 uint32_t renderbuffer;
2853 static_assert(sizeof(FramebufferRenderbuffer) == 20,
2854 "size of FramebufferRenderbuffer should be 20");
2855 static_assert(offsetof(FramebufferRenderbuffer, header) == 0,
2856 "offset of FramebufferRenderbuffer header should be 0");
2857 static_assert(offsetof(FramebufferRenderbuffer, target) == 4,
2858 "offset of FramebufferRenderbuffer target should be 4");
2859 static_assert(offsetof(FramebufferRenderbuffer, attachment) == 8,
2860 "offset of FramebufferRenderbuffer attachment should be 8");
2861 static_assert(
2862 offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
2863 "offset of FramebufferRenderbuffer renderbuffertarget should be 12");
2864 static_assert(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
2865 "offset of FramebufferRenderbuffer renderbuffer should be 16");
2867 struct FramebufferTexture2D {
2868 typedef FramebufferTexture2D ValueType;
2869 static const CommandId kCmdId = kFramebufferTexture2D;
2870 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2871 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
2873 static uint32_t ComputeSize() {
2874 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2877 void SetHeader() { header.SetCmd<ValueType>(); }
2879 void Init(GLenum _target,
2880 GLenum _attachment,
2881 GLenum _textarget,
2882 GLuint _texture) {
2883 SetHeader();
2884 target = _target;
2885 attachment = _attachment;
2886 textarget = _textarget;
2887 texture = _texture;
2890 void* Set(void* cmd,
2891 GLenum _target,
2892 GLenum _attachment,
2893 GLenum _textarget,
2894 GLuint _texture) {
2895 static_cast<ValueType*>(cmd)
2896 ->Init(_target, _attachment, _textarget, _texture);
2897 return NextCmdAddress<ValueType>(cmd);
2900 gpu::CommandHeader header;
2901 uint32_t target;
2902 uint32_t attachment;
2903 uint32_t textarget;
2904 uint32_t texture;
2905 static const int32_t level = 0;
2908 static_assert(sizeof(FramebufferTexture2D) == 20,
2909 "size of FramebufferTexture2D should be 20");
2910 static_assert(offsetof(FramebufferTexture2D, header) == 0,
2911 "offset of FramebufferTexture2D header should be 0");
2912 static_assert(offsetof(FramebufferTexture2D, target) == 4,
2913 "offset of FramebufferTexture2D target should be 4");
2914 static_assert(offsetof(FramebufferTexture2D, attachment) == 8,
2915 "offset of FramebufferTexture2D attachment should be 8");
2916 static_assert(offsetof(FramebufferTexture2D, textarget) == 12,
2917 "offset of FramebufferTexture2D textarget should be 12");
2918 static_assert(offsetof(FramebufferTexture2D, texture) == 16,
2919 "offset of FramebufferTexture2D texture should be 16");
2921 struct FramebufferTextureLayer {
2922 typedef FramebufferTextureLayer ValueType;
2923 static const CommandId kCmdId = kFramebufferTextureLayer;
2924 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2925 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2927 static uint32_t ComputeSize() {
2928 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2931 void SetHeader() { header.SetCmd<ValueType>(); }
2933 void Init(GLenum _target,
2934 GLenum _attachment,
2935 GLuint _texture,
2936 GLint _level,
2937 GLint _layer) {
2938 SetHeader();
2939 target = _target;
2940 attachment = _attachment;
2941 texture = _texture;
2942 level = _level;
2943 layer = _layer;
2946 void* Set(void* cmd,
2947 GLenum _target,
2948 GLenum _attachment,
2949 GLuint _texture,
2950 GLint _level,
2951 GLint _layer) {
2952 static_cast<ValueType*>(cmd)
2953 ->Init(_target, _attachment, _texture, _level, _layer);
2954 return NextCmdAddress<ValueType>(cmd);
2957 gpu::CommandHeader header;
2958 uint32_t target;
2959 uint32_t attachment;
2960 uint32_t texture;
2961 int32_t level;
2962 int32_t layer;
2965 static_assert(sizeof(FramebufferTextureLayer) == 24,
2966 "size of FramebufferTextureLayer should be 24");
2967 static_assert(offsetof(FramebufferTextureLayer, header) == 0,
2968 "offset of FramebufferTextureLayer header should be 0");
2969 static_assert(offsetof(FramebufferTextureLayer, target) == 4,
2970 "offset of FramebufferTextureLayer target should be 4");
2971 static_assert(offsetof(FramebufferTextureLayer, attachment) == 8,
2972 "offset of FramebufferTextureLayer attachment should be 8");
2973 static_assert(offsetof(FramebufferTextureLayer, texture) == 12,
2974 "offset of FramebufferTextureLayer texture should be 12");
2975 static_assert(offsetof(FramebufferTextureLayer, level) == 16,
2976 "offset of FramebufferTextureLayer level should be 16");
2977 static_assert(offsetof(FramebufferTextureLayer, layer) == 20,
2978 "offset of FramebufferTextureLayer layer should be 20");
2980 struct FrontFace {
2981 typedef FrontFace ValueType;
2982 static const CommandId kCmdId = kFrontFace;
2983 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2984 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2986 static uint32_t ComputeSize() {
2987 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2990 void SetHeader() { header.SetCmd<ValueType>(); }
2992 void Init(GLenum _mode) {
2993 SetHeader();
2994 mode = _mode;
2997 void* Set(void* cmd, GLenum _mode) {
2998 static_cast<ValueType*>(cmd)->Init(_mode);
2999 return NextCmdAddress<ValueType>(cmd);
3002 gpu::CommandHeader header;
3003 uint32_t mode;
3006 static_assert(sizeof(FrontFace) == 8, "size of FrontFace should be 8");
3007 static_assert(offsetof(FrontFace, header) == 0,
3008 "offset of FrontFace header should be 0");
3009 static_assert(offsetof(FrontFace, mode) == 4,
3010 "offset of FrontFace mode should be 4");
3012 struct GenBuffersImmediate {
3013 typedef GenBuffersImmediate ValueType;
3014 static const CommandId kCmdId = kGenBuffersImmediate;
3015 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3016 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3018 static uint32_t ComputeDataSize(GLsizei n) {
3019 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3022 static uint32_t ComputeSize(GLsizei n) {
3023 return static_cast<uint32_t>(sizeof(ValueType) +
3024 ComputeDataSize(n)); // NOLINT
3027 void SetHeader(GLsizei n) {
3028 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3031 void Init(GLsizei _n, GLuint* _buffers) {
3032 SetHeader(_n);
3033 n = _n;
3034 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
3037 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
3038 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
3039 const uint32_t size = ComputeSize(_n);
3040 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3043 gpu::CommandHeader header;
3044 int32_t n;
3047 static_assert(sizeof(GenBuffersImmediate) == 8,
3048 "size of GenBuffersImmediate should be 8");
3049 static_assert(offsetof(GenBuffersImmediate, header) == 0,
3050 "offset of GenBuffersImmediate header should be 0");
3051 static_assert(offsetof(GenBuffersImmediate, n) == 4,
3052 "offset of GenBuffersImmediate n should be 4");
3054 struct GenerateMipmap {
3055 typedef GenerateMipmap ValueType;
3056 static const CommandId kCmdId = kGenerateMipmap;
3057 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3058 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3060 static uint32_t ComputeSize() {
3061 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3064 void SetHeader() { header.SetCmd<ValueType>(); }
3066 void Init(GLenum _target) {
3067 SetHeader();
3068 target = _target;
3071 void* Set(void* cmd, GLenum _target) {
3072 static_cast<ValueType*>(cmd)->Init(_target);
3073 return NextCmdAddress<ValueType>(cmd);
3076 gpu::CommandHeader header;
3077 uint32_t target;
3080 static_assert(sizeof(GenerateMipmap) == 8,
3081 "size of GenerateMipmap should be 8");
3082 static_assert(offsetof(GenerateMipmap, header) == 0,
3083 "offset of GenerateMipmap header should be 0");
3084 static_assert(offsetof(GenerateMipmap, target) == 4,
3085 "offset of GenerateMipmap target should be 4");
3087 struct GenFramebuffersImmediate {
3088 typedef GenFramebuffersImmediate ValueType;
3089 static const CommandId kCmdId = kGenFramebuffersImmediate;
3090 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3091 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3093 static uint32_t ComputeDataSize(GLsizei n) {
3094 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3097 static uint32_t ComputeSize(GLsizei n) {
3098 return static_cast<uint32_t>(sizeof(ValueType) +
3099 ComputeDataSize(n)); // NOLINT
3102 void SetHeader(GLsizei n) {
3103 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3106 void Init(GLsizei _n, GLuint* _framebuffers) {
3107 SetHeader(_n);
3108 n = _n;
3109 memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
3112 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
3113 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
3114 const uint32_t size = ComputeSize(_n);
3115 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3118 gpu::CommandHeader header;
3119 int32_t n;
3122 static_assert(sizeof(GenFramebuffersImmediate) == 8,
3123 "size of GenFramebuffersImmediate should be 8");
3124 static_assert(offsetof(GenFramebuffersImmediate, header) == 0,
3125 "offset of GenFramebuffersImmediate header should be 0");
3126 static_assert(offsetof(GenFramebuffersImmediate, n) == 4,
3127 "offset of GenFramebuffersImmediate n should be 4");
3129 struct GenRenderbuffersImmediate {
3130 typedef GenRenderbuffersImmediate ValueType;
3131 static const CommandId kCmdId = kGenRenderbuffersImmediate;
3132 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3133 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3135 static uint32_t ComputeDataSize(GLsizei n) {
3136 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3139 static uint32_t ComputeSize(GLsizei n) {
3140 return static_cast<uint32_t>(sizeof(ValueType) +
3141 ComputeDataSize(n)); // NOLINT
3144 void SetHeader(GLsizei n) {
3145 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3148 void Init(GLsizei _n, GLuint* _renderbuffers) {
3149 SetHeader(_n);
3150 n = _n;
3151 memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
3154 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
3155 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
3156 const uint32_t size = ComputeSize(_n);
3157 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3160 gpu::CommandHeader header;
3161 int32_t n;
3164 static_assert(sizeof(GenRenderbuffersImmediate) == 8,
3165 "size of GenRenderbuffersImmediate should be 8");
3166 static_assert(offsetof(GenRenderbuffersImmediate, header) == 0,
3167 "offset of GenRenderbuffersImmediate header should be 0");
3168 static_assert(offsetof(GenRenderbuffersImmediate, n) == 4,
3169 "offset of GenRenderbuffersImmediate n should be 4");
3171 struct GenSamplersImmediate {
3172 typedef GenSamplersImmediate ValueType;
3173 static const CommandId kCmdId = kGenSamplersImmediate;
3174 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3177 static uint32_t ComputeDataSize(GLsizei n) {
3178 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3181 static uint32_t ComputeSize(GLsizei n) {
3182 return static_cast<uint32_t>(sizeof(ValueType) +
3183 ComputeDataSize(n)); // NOLINT
3186 void SetHeader(GLsizei n) {
3187 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3190 void Init(GLsizei _n, GLuint* _samplers) {
3191 SetHeader(_n);
3192 n = _n;
3193 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n));
3196 void* Set(void* cmd, GLsizei _n, GLuint* _samplers) {
3197 static_cast<ValueType*>(cmd)->Init(_n, _samplers);
3198 const uint32_t size = ComputeSize(_n);
3199 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3202 gpu::CommandHeader header;
3203 int32_t n;
3206 static_assert(sizeof(GenSamplersImmediate) == 8,
3207 "size of GenSamplersImmediate should be 8");
3208 static_assert(offsetof(GenSamplersImmediate, header) == 0,
3209 "offset of GenSamplersImmediate header should be 0");
3210 static_assert(offsetof(GenSamplersImmediate, n) == 4,
3211 "offset of GenSamplersImmediate n should be 4");
3213 struct GenTexturesImmediate {
3214 typedef GenTexturesImmediate ValueType;
3215 static const CommandId kCmdId = kGenTexturesImmediate;
3216 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3217 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3219 static uint32_t ComputeDataSize(GLsizei n) {
3220 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3223 static uint32_t ComputeSize(GLsizei n) {
3224 return static_cast<uint32_t>(sizeof(ValueType) +
3225 ComputeDataSize(n)); // NOLINT
3228 void SetHeader(GLsizei n) {
3229 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3232 void Init(GLsizei _n, GLuint* _textures) {
3233 SetHeader(_n);
3234 n = _n;
3235 memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
3238 void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
3239 static_cast<ValueType*>(cmd)->Init(_n, _textures);
3240 const uint32_t size = ComputeSize(_n);
3241 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3244 gpu::CommandHeader header;
3245 int32_t n;
3248 static_assert(sizeof(GenTexturesImmediate) == 8,
3249 "size of GenTexturesImmediate should be 8");
3250 static_assert(offsetof(GenTexturesImmediate, header) == 0,
3251 "offset of GenTexturesImmediate header should be 0");
3252 static_assert(offsetof(GenTexturesImmediate, n) == 4,
3253 "offset of GenTexturesImmediate n should be 4");
3255 struct GenTransformFeedbacksImmediate {
3256 typedef GenTransformFeedbacksImmediate ValueType;
3257 static const CommandId kCmdId = kGenTransformFeedbacksImmediate;
3258 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
3259 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3261 static uint32_t ComputeDataSize(GLsizei n) {
3262 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
3265 static uint32_t ComputeSize(GLsizei n) {
3266 return static_cast<uint32_t>(sizeof(ValueType) +
3267 ComputeDataSize(n)); // NOLINT
3270 void SetHeader(GLsizei n) {
3271 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
3274 void Init(GLsizei _n, GLuint* _ids) {
3275 SetHeader(_n);
3276 n = _n;
3277 memcpy(ImmediateDataAddress(this), _ids, ComputeDataSize(_n));
3280 void* Set(void* cmd, GLsizei _n, GLuint* _ids) {
3281 static_cast<ValueType*>(cmd)->Init(_n, _ids);
3282 const uint32_t size = ComputeSize(_n);
3283 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
3286 gpu::CommandHeader header;
3287 int32_t n;
3290 static_assert(sizeof(GenTransformFeedbacksImmediate) == 8,
3291 "size of GenTransformFeedbacksImmediate should be 8");
3292 static_assert(offsetof(GenTransformFeedbacksImmediate, header) == 0,
3293 "offset of GenTransformFeedbacksImmediate header should be 0");
3294 static_assert(offsetof(GenTransformFeedbacksImmediate, n) == 4,
3295 "offset of GenTransformFeedbacksImmediate n should be 4");
3297 struct GetActiveAttrib {
3298 typedef GetActiveAttrib ValueType;
3299 static const CommandId kCmdId = kGetActiveAttrib;
3300 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3301 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3303 struct Result {
3304 int32_t success;
3305 int32_t size;
3306 uint32_t type;
3309 static uint32_t ComputeSize() {
3310 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3313 void SetHeader() { header.SetCmd<ValueType>(); }
3315 void Init(GLuint _program,
3316 GLuint _index,
3317 uint32_t _name_bucket_id,
3318 uint32_t _result_shm_id,
3319 uint32_t _result_shm_offset) {
3320 SetHeader();
3321 program = _program;
3322 index = _index;
3323 name_bucket_id = _name_bucket_id;
3324 result_shm_id = _result_shm_id;
3325 result_shm_offset = _result_shm_offset;
3328 void* Set(void* cmd,
3329 GLuint _program,
3330 GLuint _index,
3331 uint32_t _name_bucket_id,
3332 uint32_t _result_shm_id,
3333 uint32_t _result_shm_offset) {
3334 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3335 _result_shm_id, _result_shm_offset);
3336 return NextCmdAddress<ValueType>(cmd);
3339 gpu::CommandHeader header;
3340 uint32_t program;
3341 uint32_t index;
3342 uint32_t name_bucket_id;
3343 uint32_t result_shm_id;
3344 uint32_t result_shm_offset;
3347 static_assert(sizeof(GetActiveAttrib) == 24,
3348 "size of GetActiveAttrib should be 24");
3349 static_assert(offsetof(GetActiveAttrib, header) == 0,
3350 "offset of GetActiveAttrib header should be 0");
3351 static_assert(offsetof(GetActiveAttrib, program) == 4,
3352 "offset of GetActiveAttrib program should be 4");
3353 static_assert(offsetof(GetActiveAttrib, index) == 8,
3354 "offset of GetActiveAttrib index should be 8");
3355 static_assert(offsetof(GetActiveAttrib, name_bucket_id) == 12,
3356 "offset of GetActiveAttrib name_bucket_id should be 12");
3357 static_assert(offsetof(GetActiveAttrib, result_shm_id) == 16,
3358 "offset of GetActiveAttrib result_shm_id should be 16");
3359 static_assert(offsetof(GetActiveAttrib, result_shm_offset) == 20,
3360 "offset of GetActiveAttrib result_shm_offset should be 20");
3361 static_assert(offsetof(GetActiveAttrib::Result, success) == 0,
3362 "offset of GetActiveAttrib Result success should be "
3363 "0");
3364 static_assert(offsetof(GetActiveAttrib::Result, size) == 4,
3365 "offset of GetActiveAttrib Result size should be "
3366 "4");
3367 static_assert(offsetof(GetActiveAttrib::Result, type) == 8,
3368 "offset of GetActiveAttrib Result type should be "
3369 "8");
3371 struct GetActiveUniform {
3372 typedef GetActiveUniform ValueType;
3373 static const CommandId kCmdId = kGetActiveUniform;
3374 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3375 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3377 struct Result {
3378 int32_t success;
3379 int32_t size;
3380 uint32_t type;
3383 static uint32_t ComputeSize() {
3384 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3387 void SetHeader() { header.SetCmd<ValueType>(); }
3389 void Init(GLuint _program,
3390 GLuint _index,
3391 uint32_t _name_bucket_id,
3392 uint32_t _result_shm_id,
3393 uint32_t _result_shm_offset) {
3394 SetHeader();
3395 program = _program;
3396 index = _index;
3397 name_bucket_id = _name_bucket_id;
3398 result_shm_id = _result_shm_id;
3399 result_shm_offset = _result_shm_offset;
3402 void* Set(void* cmd,
3403 GLuint _program,
3404 GLuint _index,
3405 uint32_t _name_bucket_id,
3406 uint32_t _result_shm_id,
3407 uint32_t _result_shm_offset) {
3408 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3409 _result_shm_id, _result_shm_offset);
3410 return NextCmdAddress<ValueType>(cmd);
3413 gpu::CommandHeader header;
3414 uint32_t program;
3415 uint32_t index;
3416 uint32_t name_bucket_id;
3417 uint32_t result_shm_id;
3418 uint32_t result_shm_offset;
3421 static_assert(sizeof(GetActiveUniform) == 24,
3422 "size of GetActiveUniform should be 24");
3423 static_assert(offsetof(GetActiveUniform, header) == 0,
3424 "offset of GetActiveUniform header should be 0");
3425 static_assert(offsetof(GetActiveUniform, program) == 4,
3426 "offset of GetActiveUniform program should be 4");
3427 static_assert(offsetof(GetActiveUniform, index) == 8,
3428 "offset of GetActiveUniform index should be 8");
3429 static_assert(offsetof(GetActiveUniform, name_bucket_id) == 12,
3430 "offset of GetActiveUniform name_bucket_id should be 12");
3431 static_assert(offsetof(GetActiveUniform, result_shm_id) == 16,
3432 "offset of GetActiveUniform result_shm_id should be 16");
3433 static_assert(offsetof(GetActiveUniform, result_shm_offset) == 20,
3434 "offset of GetActiveUniform result_shm_offset should be 20");
3435 static_assert(offsetof(GetActiveUniform::Result, success) == 0,
3436 "offset of GetActiveUniform Result success should be "
3437 "0");
3438 static_assert(offsetof(GetActiveUniform::Result, size) == 4,
3439 "offset of GetActiveUniform Result size should be "
3440 "4");
3441 static_assert(offsetof(GetActiveUniform::Result, type) == 8,
3442 "offset of GetActiveUniform Result type should be "
3443 "8");
3445 struct GetActiveUniformBlockiv {
3446 typedef GetActiveUniformBlockiv ValueType;
3447 static const CommandId kCmdId = kGetActiveUniformBlockiv;
3448 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3449 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3451 typedef SizedResult<GLint> Result;
3453 static uint32_t ComputeSize() {
3454 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3457 void SetHeader() { header.SetCmd<ValueType>(); }
3459 void Init(GLuint _program,
3460 GLuint _index,
3461 GLenum _pname,
3462 uint32_t _params_shm_id,
3463 uint32_t _params_shm_offset) {
3464 SetHeader();
3465 program = _program;
3466 index = _index;
3467 pname = _pname;
3468 params_shm_id = _params_shm_id;
3469 params_shm_offset = _params_shm_offset;
3472 void* Set(void* cmd,
3473 GLuint _program,
3474 GLuint _index,
3475 GLenum _pname,
3476 uint32_t _params_shm_id,
3477 uint32_t _params_shm_offset) {
3478 static_cast<ValueType*>(cmd)
3479 ->Init(_program, _index, _pname, _params_shm_id, _params_shm_offset);
3480 return NextCmdAddress<ValueType>(cmd);
3483 gpu::CommandHeader header;
3484 uint32_t program;
3485 uint32_t index;
3486 uint32_t pname;
3487 uint32_t params_shm_id;
3488 uint32_t params_shm_offset;
3491 static_assert(sizeof(GetActiveUniformBlockiv) == 24,
3492 "size of GetActiveUniformBlockiv should be 24");
3493 static_assert(offsetof(GetActiveUniformBlockiv, header) == 0,
3494 "offset of GetActiveUniformBlockiv header should be 0");
3495 static_assert(offsetof(GetActiveUniformBlockiv, program) == 4,
3496 "offset of GetActiveUniformBlockiv program should be 4");
3497 static_assert(offsetof(GetActiveUniformBlockiv, index) == 8,
3498 "offset of GetActiveUniformBlockiv index should be 8");
3499 static_assert(offsetof(GetActiveUniformBlockiv, pname) == 12,
3500 "offset of GetActiveUniformBlockiv pname should be 12");
3501 static_assert(offsetof(GetActiveUniformBlockiv, params_shm_id) == 16,
3502 "offset of GetActiveUniformBlockiv params_shm_id should be 16");
3503 static_assert(
3504 offsetof(GetActiveUniformBlockiv, params_shm_offset) == 20,
3505 "offset of GetActiveUniformBlockiv params_shm_offset should be 20");
3507 struct GetActiveUniformBlockName {
3508 typedef GetActiveUniformBlockName ValueType;
3509 static const CommandId kCmdId = kGetActiveUniformBlockName;
3510 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3511 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3513 typedef int32_t Result;
3515 static uint32_t ComputeSize() {
3516 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3519 void SetHeader() { header.SetCmd<ValueType>(); }
3521 void Init(GLuint _program,
3522 GLuint _index,
3523 uint32_t _name_bucket_id,
3524 uint32_t _result_shm_id,
3525 uint32_t _result_shm_offset) {
3526 SetHeader();
3527 program = _program;
3528 index = _index;
3529 name_bucket_id = _name_bucket_id;
3530 result_shm_id = _result_shm_id;
3531 result_shm_offset = _result_shm_offset;
3534 void* Set(void* cmd,
3535 GLuint _program,
3536 GLuint _index,
3537 uint32_t _name_bucket_id,
3538 uint32_t _result_shm_id,
3539 uint32_t _result_shm_offset) {
3540 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
3541 _result_shm_id, _result_shm_offset);
3542 return NextCmdAddress<ValueType>(cmd);
3545 gpu::CommandHeader header;
3546 uint32_t program;
3547 uint32_t index;
3548 uint32_t name_bucket_id;
3549 uint32_t result_shm_id;
3550 uint32_t result_shm_offset;
3553 static_assert(sizeof(GetActiveUniformBlockName) == 24,
3554 "size of GetActiveUniformBlockName should be 24");
3555 static_assert(offsetof(GetActiveUniformBlockName, header) == 0,
3556 "offset of GetActiveUniformBlockName header should be 0");
3557 static_assert(offsetof(GetActiveUniformBlockName, program) == 4,
3558 "offset of GetActiveUniformBlockName program should be 4");
3559 static_assert(offsetof(GetActiveUniformBlockName, index) == 8,
3560 "offset of GetActiveUniformBlockName index should be 8");
3561 static_assert(
3562 offsetof(GetActiveUniformBlockName, name_bucket_id) == 12,
3563 "offset of GetActiveUniformBlockName name_bucket_id should be 12");
3564 static_assert(offsetof(GetActiveUniformBlockName, result_shm_id) == 16,
3565 "offset of GetActiveUniformBlockName result_shm_id should be 16");
3566 static_assert(
3567 offsetof(GetActiveUniformBlockName, result_shm_offset) == 20,
3568 "offset of GetActiveUniformBlockName result_shm_offset should be 20");
3570 struct GetActiveUniformsiv {
3571 typedef GetActiveUniformsiv ValueType;
3572 static const CommandId kCmdId = kGetActiveUniformsiv;
3573 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3574 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3576 typedef SizedResult<GLint> Result;
3578 static uint32_t ComputeSize() {
3579 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3582 void SetHeader() { header.SetCmd<ValueType>(); }
3584 void Init(GLuint _program,
3585 uint32_t _indices_bucket_id,
3586 GLenum _pname,
3587 uint32_t _params_shm_id,
3588 uint32_t _params_shm_offset) {
3589 SetHeader();
3590 program = _program;
3591 indices_bucket_id = _indices_bucket_id;
3592 pname = _pname;
3593 params_shm_id = _params_shm_id;
3594 params_shm_offset = _params_shm_offset;
3597 void* Set(void* cmd,
3598 GLuint _program,
3599 uint32_t _indices_bucket_id,
3600 GLenum _pname,
3601 uint32_t _params_shm_id,
3602 uint32_t _params_shm_offset) {
3603 static_cast<ValueType*>(cmd)->Init(_program, _indices_bucket_id, _pname,
3604 _params_shm_id, _params_shm_offset);
3605 return NextCmdAddress<ValueType>(cmd);
3608 gpu::CommandHeader header;
3609 uint32_t program;
3610 uint32_t indices_bucket_id;
3611 uint32_t pname;
3612 uint32_t params_shm_id;
3613 uint32_t params_shm_offset;
3616 static_assert(sizeof(GetActiveUniformsiv) == 24,
3617 "size of GetActiveUniformsiv should be 24");
3618 static_assert(offsetof(GetActiveUniformsiv, header) == 0,
3619 "offset of GetActiveUniformsiv header should be 0");
3620 static_assert(offsetof(GetActiveUniformsiv, program) == 4,
3621 "offset of GetActiveUniformsiv program should be 4");
3622 static_assert(offsetof(GetActiveUniformsiv, indices_bucket_id) == 8,
3623 "offset of GetActiveUniformsiv indices_bucket_id should be 8");
3624 static_assert(offsetof(GetActiveUniformsiv, pname) == 12,
3625 "offset of GetActiveUniformsiv pname should be 12");
3626 static_assert(offsetof(GetActiveUniformsiv, params_shm_id) == 16,
3627 "offset of GetActiveUniformsiv params_shm_id should be 16");
3628 static_assert(offsetof(GetActiveUniformsiv, params_shm_offset) == 20,
3629 "offset of GetActiveUniformsiv params_shm_offset should be 20");
3631 struct GetAttachedShaders {
3632 typedef GetAttachedShaders ValueType;
3633 static const CommandId kCmdId = kGetAttachedShaders;
3634 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3635 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3637 typedef SizedResult<GLuint> Result;
3639 static uint32_t ComputeSize() {
3640 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3643 void SetHeader() { header.SetCmd<ValueType>(); }
3645 void Init(GLuint _program,
3646 uint32_t _result_shm_id,
3647 uint32_t _result_shm_offset,
3648 uint32_t _result_size) {
3649 SetHeader();
3650 program = _program;
3651 result_shm_id = _result_shm_id;
3652 result_shm_offset = _result_shm_offset;
3653 result_size = _result_size;
3656 void* Set(void* cmd,
3657 GLuint _program,
3658 uint32_t _result_shm_id,
3659 uint32_t _result_shm_offset,
3660 uint32_t _result_size) {
3661 static_cast<ValueType*>(cmd)
3662 ->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
3663 return NextCmdAddress<ValueType>(cmd);
3666 gpu::CommandHeader header;
3667 uint32_t program;
3668 uint32_t result_shm_id;
3669 uint32_t result_shm_offset;
3670 uint32_t result_size;
3673 static_assert(sizeof(GetAttachedShaders) == 20,
3674 "size of GetAttachedShaders should be 20");
3675 static_assert(offsetof(GetAttachedShaders, header) == 0,
3676 "offset of GetAttachedShaders header should be 0");
3677 static_assert(offsetof(GetAttachedShaders, program) == 4,
3678 "offset of GetAttachedShaders program should be 4");
3679 static_assert(offsetof(GetAttachedShaders, result_shm_id) == 8,
3680 "offset of GetAttachedShaders result_shm_id should be 8");
3681 static_assert(offsetof(GetAttachedShaders, result_shm_offset) == 12,
3682 "offset of GetAttachedShaders result_shm_offset should be 12");
3683 static_assert(offsetof(GetAttachedShaders, result_size) == 16,
3684 "offset of GetAttachedShaders result_size should be 16");
3686 struct GetAttribLocation {
3687 typedef GetAttribLocation ValueType;
3688 static const CommandId kCmdId = kGetAttribLocation;
3689 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3690 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3692 typedef GLint Result;
3694 static uint32_t ComputeSize() {
3695 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3698 void SetHeader() { header.SetCmd<ValueType>(); }
3700 void Init(GLuint _program,
3701 uint32_t _name_bucket_id,
3702 uint32_t _location_shm_id,
3703 uint32_t _location_shm_offset) {
3704 SetHeader();
3705 program = _program;
3706 name_bucket_id = _name_bucket_id;
3707 location_shm_id = _location_shm_id;
3708 location_shm_offset = _location_shm_offset;
3711 void* Set(void* cmd,
3712 GLuint _program,
3713 uint32_t _name_bucket_id,
3714 uint32_t _location_shm_id,
3715 uint32_t _location_shm_offset) {
3716 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
3717 _location_shm_id, _location_shm_offset);
3718 return NextCmdAddress<ValueType>(cmd);
3721 gpu::CommandHeader header;
3722 uint32_t program;
3723 uint32_t name_bucket_id;
3724 uint32_t location_shm_id;
3725 uint32_t location_shm_offset;
3728 static_assert(sizeof(GetAttribLocation) == 20,
3729 "size of GetAttribLocation should be 20");
3730 static_assert(offsetof(GetAttribLocation, header) == 0,
3731 "offset of GetAttribLocation header should be 0");
3732 static_assert(offsetof(GetAttribLocation, program) == 4,
3733 "offset of GetAttribLocation program should be 4");
3734 static_assert(offsetof(GetAttribLocation, name_bucket_id) == 8,
3735 "offset of GetAttribLocation name_bucket_id should be 8");
3736 static_assert(offsetof(GetAttribLocation, location_shm_id) == 12,
3737 "offset of GetAttribLocation location_shm_id should be 12");
3738 static_assert(offsetof(GetAttribLocation, location_shm_offset) == 16,
3739 "offset of GetAttribLocation location_shm_offset should be 16");
3741 struct GetBooleanv {
3742 typedef GetBooleanv ValueType;
3743 static const CommandId kCmdId = kGetBooleanv;
3744 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3745 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3747 typedef SizedResult<GLboolean> Result;
3749 static uint32_t ComputeSize() {
3750 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3753 void SetHeader() { header.SetCmd<ValueType>(); }
3755 void Init(GLenum _pname,
3756 uint32_t _params_shm_id,
3757 uint32_t _params_shm_offset) {
3758 SetHeader();
3759 pname = _pname;
3760 params_shm_id = _params_shm_id;
3761 params_shm_offset = _params_shm_offset;
3764 void* Set(void* cmd,
3765 GLenum _pname,
3766 uint32_t _params_shm_id,
3767 uint32_t _params_shm_offset) {
3768 static_cast<ValueType*>(cmd)
3769 ->Init(_pname, _params_shm_id, _params_shm_offset);
3770 return NextCmdAddress<ValueType>(cmd);
3773 gpu::CommandHeader header;
3774 uint32_t pname;
3775 uint32_t params_shm_id;
3776 uint32_t params_shm_offset;
3779 static_assert(sizeof(GetBooleanv) == 16, "size of GetBooleanv should be 16");
3780 static_assert(offsetof(GetBooleanv, header) == 0,
3781 "offset of GetBooleanv header should be 0");
3782 static_assert(offsetof(GetBooleanv, pname) == 4,
3783 "offset of GetBooleanv pname should be 4");
3784 static_assert(offsetof(GetBooleanv, params_shm_id) == 8,
3785 "offset of GetBooleanv params_shm_id should be 8");
3786 static_assert(offsetof(GetBooleanv, params_shm_offset) == 12,
3787 "offset of GetBooleanv params_shm_offset should be 12");
3789 struct GetBufferParameteriv {
3790 typedef GetBufferParameteriv ValueType;
3791 static const CommandId kCmdId = kGetBufferParameteriv;
3792 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3793 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3795 typedef SizedResult<GLint> Result;
3797 static uint32_t ComputeSize() {
3798 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3801 void SetHeader() { header.SetCmd<ValueType>(); }
3803 void Init(GLenum _target,
3804 GLenum _pname,
3805 uint32_t _params_shm_id,
3806 uint32_t _params_shm_offset) {
3807 SetHeader();
3808 target = _target;
3809 pname = _pname;
3810 params_shm_id = _params_shm_id;
3811 params_shm_offset = _params_shm_offset;
3814 void* Set(void* cmd,
3815 GLenum _target,
3816 GLenum _pname,
3817 uint32_t _params_shm_id,
3818 uint32_t _params_shm_offset) {
3819 static_cast<ValueType*>(cmd)
3820 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
3821 return NextCmdAddress<ValueType>(cmd);
3824 gpu::CommandHeader header;
3825 uint32_t target;
3826 uint32_t pname;
3827 uint32_t params_shm_id;
3828 uint32_t params_shm_offset;
3831 static_assert(sizeof(GetBufferParameteriv) == 20,
3832 "size of GetBufferParameteriv should be 20");
3833 static_assert(offsetof(GetBufferParameteriv, header) == 0,
3834 "offset of GetBufferParameteriv header should be 0");
3835 static_assert(offsetof(GetBufferParameteriv, target) == 4,
3836 "offset of GetBufferParameteriv target should be 4");
3837 static_assert(offsetof(GetBufferParameteriv, pname) == 8,
3838 "offset of GetBufferParameteriv pname should be 8");
3839 static_assert(offsetof(GetBufferParameteriv, params_shm_id) == 12,
3840 "offset of GetBufferParameteriv params_shm_id should be 12");
3841 static_assert(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
3842 "offset of GetBufferParameteriv params_shm_offset should be 16");
3844 struct GetError {
3845 typedef GetError ValueType;
3846 static const CommandId kCmdId = kGetError;
3847 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3848 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3850 typedef GLenum Result;
3852 static uint32_t ComputeSize() {
3853 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3856 void SetHeader() { header.SetCmd<ValueType>(); }
3858 void Init(uint32_t _result_shm_id, uint32_t _result_shm_offset) {
3859 SetHeader();
3860 result_shm_id = _result_shm_id;
3861 result_shm_offset = _result_shm_offset;
3864 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
3865 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
3866 return NextCmdAddress<ValueType>(cmd);
3869 gpu::CommandHeader header;
3870 uint32_t result_shm_id;
3871 uint32_t result_shm_offset;
3874 static_assert(sizeof(GetError) == 12, "size of GetError should be 12");
3875 static_assert(offsetof(GetError, header) == 0,
3876 "offset of GetError header should be 0");
3877 static_assert(offsetof(GetError, result_shm_id) == 4,
3878 "offset of GetError result_shm_id should be 4");
3879 static_assert(offsetof(GetError, result_shm_offset) == 8,
3880 "offset of GetError result_shm_offset should be 8");
3882 struct GetFloatv {
3883 typedef GetFloatv ValueType;
3884 static const CommandId kCmdId = kGetFloatv;
3885 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3886 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3888 typedef SizedResult<GLfloat> Result;
3890 static uint32_t ComputeSize() {
3891 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3894 void SetHeader() { header.SetCmd<ValueType>(); }
3896 void Init(GLenum _pname,
3897 uint32_t _params_shm_id,
3898 uint32_t _params_shm_offset) {
3899 SetHeader();
3900 pname = _pname;
3901 params_shm_id = _params_shm_id;
3902 params_shm_offset = _params_shm_offset;
3905 void* Set(void* cmd,
3906 GLenum _pname,
3907 uint32_t _params_shm_id,
3908 uint32_t _params_shm_offset) {
3909 static_cast<ValueType*>(cmd)
3910 ->Init(_pname, _params_shm_id, _params_shm_offset);
3911 return NextCmdAddress<ValueType>(cmd);
3914 gpu::CommandHeader header;
3915 uint32_t pname;
3916 uint32_t params_shm_id;
3917 uint32_t params_shm_offset;
3920 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16");
3921 static_assert(offsetof(GetFloatv, header) == 0,
3922 "offset of GetFloatv header should be 0");
3923 static_assert(offsetof(GetFloatv, pname) == 4,
3924 "offset of GetFloatv pname should be 4");
3925 static_assert(offsetof(GetFloatv, params_shm_id) == 8,
3926 "offset of GetFloatv params_shm_id should be 8");
3927 static_assert(offsetof(GetFloatv, params_shm_offset) == 12,
3928 "offset of GetFloatv params_shm_offset should be 12");
3930 struct GetFragDataLocation {
3931 typedef GetFragDataLocation ValueType;
3932 static const CommandId kCmdId = kGetFragDataLocation;
3933 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3934 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3936 typedef GLint Result;
3938 static uint32_t ComputeSize() {
3939 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3942 void SetHeader() { header.SetCmd<ValueType>(); }
3944 void Init(GLuint _program,
3945 uint32_t _name_bucket_id,
3946 uint32_t _location_shm_id,
3947 uint32_t _location_shm_offset) {
3948 SetHeader();
3949 program = _program;
3950 name_bucket_id = _name_bucket_id;
3951 location_shm_id = _location_shm_id;
3952 location_shm_offset = _location_shm_offset;
3955 void* Set(void* cmd,
3956 GLuint _program,
3957 uint32_t _name_bucket_id,
3958 uint32_t _location_shm_id,
3959 uint32_t _location_shm_offset) {
3960 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
3961 _location_shm_id, _location_shm_offset);
3962 return NextCmdAddress<ValueType>(cmd);
3965 gpu::CommandHeader header;
3966 uint32_t program;
3967 uint32_t name_bucket_id;
3968 uint32_t location_shm_id;
3969 uint32_t location_shm_offset;
3972 static_assert(sizeof(GetFragDataLocation) == 20,
3973 "size of GetFragDataLocation should be 20");
3974 static_assert(offsetof(GetFragDataLocation, header) == 0,
3975 "offset of GetFragDataLocation header should be 0");
3976 static_assert(offsetof(GetFragDataLocation, program) == 4,
3977 "offset of GetFragDataLocation program should be 4");
3978 static_assert(offsetof(GetFragDataLocation, name_bucket_id) == 8,
3979 "offset of GetFragDataLocation name_bucket_id should be 8");
3980 static_assert(offsetof(GetFragDataLocation, location_shm_id) == 12,
3981 "offset of GetFragDataLocation location_shm_id should be 12");
3982 static_assert(offsetof(GetFragDataLocation, location_shm_offset) == 16,
3983 "offset of GetFragDataLocation location_shm_offset should be 16");
3985 struct GetFramebufferAttachmentParameteriv {
3986 typedef GetFramebufferAttachmentParameteriv ValueType;
3987 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
3988 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3989 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3991 typedef SizedResult<GLint> Result;
3993 static uint32_t ComputeSize() {
3994 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3997 void SetHeader() { header.SetCmd<ValueType>(); }
3999 void Init(GLenum _target,
4000 GLenum _attachment,
4001 GLenum _pname,
4002 uint32_t _params_shm_id,
4003 uint32_t _params_shm_offset) {
4004 SetHeader();
4005 target = _target;
4006 attachment = _attachment;
4007 pname = _pname;
4008 params_shm_id = _params_shm_id;
4009 params_shm_offset = _params_shm_offset;
4012 void* Set(void* cmd,
4013 GLenum _target,
4014 GLenum _attachment,
4015 GLenum _pname,
4016 uint32_t _params_shm_id,
4017 uint32_t _params_shm_offset) {
4018 static_cast<ValueType*>(cmd)->Init(_target, _attachment, _pname,
4019 _params_shm_id, _params_shm_offset);
4020 return NextCmdAddress<ValueType>(cmd);
4023 gpu::CommandHeader header;
4024 uint32_t target;
4025 uint32_t attachment;
4026 uint32_t pname;
4027 uint32_t params_shm_id;
4028 uint32_t params_shm_offset;
4031 static_assert(sizeof(GetFramebufferAttachmentParameteriv) == 24,
4032 "size of GetFramebufferAttachmentParameteriv should be 24");
4033 static_assert(
4034 offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
4035 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4036 static_assert(
4037 offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
4038 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4039 static_assert(
4040 offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
4041 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4042 static_assert(
4043 offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
4044 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4045 static_assert(
4046 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
4047 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4048 static_assert(offsetof(GetFramebufferAttachmentParameteriv,
4049 params_shm_offset) == 20,
4050 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4051 "should be 20");
4053 struct GetIntegerv {
4054 typedef GetIntegerv ValueType;
4055 static const CommandId kCmdId = kGetIntegerv;
4056 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4057 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4059 typedef SizedResult<GLint> Result;
4061 static uint32_t ComputeSize() {
4062 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4065 void SetHeader() { header.SetCmd<ValueType>(); }
4067 void Init(GLenum _pname,
4068 uint32_t _params_shm_id,
4069 uint32_t _params_shm_offset) {
4070 SetHeader();
4071 pname = _pname;
4072 params_shm_id = _params_shm_id;
4073 params_shm_offset = _params_shm_offset;
4076 void* Set(void* cmd,
4077 GLenum _pname,
4078 uint32_t _params_shm_id,
4079 uint32_t _params_shm_offset) {
4080 static_cast<ValueType*>(cmd)
4081 ->Init(_pname, _params_shm_id, _params_shm_offset);
4082 return NextCmdAddress<ValueType>(cmd);
4085 gpu::CommandHeader header;
4086 uint32_t pname;
4087 uint32_t params_shm_id;
4088 uint32_t params_shm_offset;
4091 static_assert(sizeof(GetIntegerv) == 16, "size of GetIntegerv should be 16");
4092 static_assert(offsetof(GetIntegerv, header) == 0,
4093 "offset of GetIntegerv header should be 0");
4094 static_assert(offsetof(GetIntegerv, pname) == 4,
4095 "offset of GetIntegerv pname should be 4");
4096 static_assert(offsetof(GetIntegerv, params_shm_id) == 8,
4097 "offset of GetIntegerv params_shm_id should be 8");
4098 static_assert(offsetof(GetIntegerv, params_shm_offset) == 12,
4099 "offset of GetIntegerv params_shm_offset should be 12");
4101 struct GetInternalformativ {
4102 typedef GetInternalformativ ValueType;
4103 static const CommandId kCmdId = kGetInternalformativ;
4104 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4105 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4107 typedef SizedResult<GLint> Result;
4109 static uint32_t ComputeSize() {
4110 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4113 void SetHeader() { header.SetCmd<ValueType>(); }
4115 void Init(GLenum _target,
4116 GLenum _format,
4117 GLenum _pname,
4118 GLsizei _bufSize,
4119 uint32_t _params_shm_id,
4120 uint32_t _params_shm_offset) {
4121 SetHeader();
4122 target = _target;
4123 format = _format;
4124 pname = _pname;
4125 bufSize = _bufSize;
4126 params_shm_id = _params_shm_id;
4127 params_shm_offset = _params_shm_offset;
4130 void* Set(void* cmd,
4131 GLenum _target,
4132 GLenum _format,
4133 GLenum _pname,
4134 GLsizei _bufSize,
4135 uint32_t _params_shm_id,
4136 uint32_t _params_shm_offset) {
4137 static_cast<ValueType*>(cmd)->Init(_target, _format, _pname, _bufSize,
4138 _params_shm_id, _params_shm_offset);
4139 return NextCmdAddress<ValueType>(cmd);
4142 gpu::CommandHeader header;
4143 uint32_t target;
4144 uint32_t format;
4145 uint32_t pname;
4146 int32_t bufSize;
4147 uint32_t params_shm_id;
4148 uint32_t params_shm_offset;
4151 static_assert(sizeof(GetInternalformativ) == 28,
4152 "size of GetInternalformativ should be 28");
4153 static_assert(offsetof(GetInternalformativ, header) == 0,
4154 "offset of GetInternalformativ header should be 0");
4155 static_assert(offsetof(GetInternalformativ, target) == 4,
4156 "offset of GetInternalformativ target should be 4");
4157 static_assert(offsetof(GetInternalformativ, format) == 8,
4158 "offset of GetInternalformativ format should be 8");
4159 static_assert(offsetof(GetInternalformativ, pname) == 12,
4160 "offset of GetInternalformativ pname should be 12");
4161 static_assert(offsetof(GetInternalformativ, bufSize) == 16,
4162 "offset of GetInternalformativ bufSize should be 16");
4163 static_assert(offsetof(GetInternalformativ, params_shm_id) == 20,
4164 "offset of GetInternalformativ params_shm_id should be 20");
4165 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 24,
4166 "offset of GetInternalformativ params_shm_offset should be 24");
4168 struct GetProgramiv {
4169 typedef GetProgramiv ValueType;
4170 static const CommandId kCmdId = kGetProgramiv;
4171 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4172 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4174 typedef SizedResult<GLint> Result;
4176 static uint32_t ComputeSize() {
4177 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4180 void SetHeader() { header.SetCmd<ValueType>(); }
4182 void Init(GLuint _program,
4183 GLenum _pname,
4184 uint32_t _params_shm_id,
4185 uint32_t _params_shm_offset) {
4186 SetHeader();
4187 program = _program;
4188 pname = _pname;
4189 params_shm_id = _params_shm_id;
4190 params_shm_offset = _params_shm_offset;
4193 void* Set(void* cmd,
4194 GLuint _program,
4195 GLenum _pname,
4196 uint32_t _params_shm_id,
4197 uint32_t _params_shm_offset) {
4198 static_cast<ValueType*>(cmd)
4199 ->Init(_program, _pname, _params_shm_id, _params_shm_offset);
4200 return NextCmdAddress<ValueType>(cmd);
4203 gpu::CommandHeader header;
4204 uint32_t program;
4205 uint32_t pname;
4206 uint32_t params_shm_id;
4207 uint32_t params_shm_offset;
4210 static_assert(sizeof(GetProgramiv) == 20, "size of GetProgramiv should be 20");
4211 static_assert(offsetof(GetProgramiv, header) == 0,
4212 "offset of GetProgramiv header should be 0");
4213 static_assert(offsetof(GetProgramiv, program) == 4,
4214 "offset of GetProgramiv program should be 4");
4215 static_assert(offsetof(GetProgramiv, pname) == 8,
4216 "offset of GetProgramiv pname should be 8");
4217 static_assert(offsetof(GetProgramiv, params_shm_id) == 12,
4218 "offset of GetProgramiv params_shm_id should be 12");
4219 static_assert(offsetof(GetProgramiv, params_shm_offset) == 16,
4220 "offset of GetProgramiv params_shm_offset should be 16");
4222 struct GetProgramInfoLog {
4223 typedef GetProgramInfoLog ValueType;
4224 static const CommandId kCmdId = kGetProgramInfoLog;
4225 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4226 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4228 static uint32_t ComputeSize() {
4229 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4232 void SetHeader() { header.SetCmd<ValueType>(); }
4234 void Init(GLuint _program, uint32_t _bucket_id) {
4235 SetHeader();
4236 program = _program;
4237 bucket_id = _bucket_id;
4240 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
4241 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
4242 return NextCmdAddress<ValueType>(cmd);
4245 gpu::CommandHeader header;
4246 uint32_t program;
4247 uint32_t bucket_id;
4250 static_assert(sizeof(GetProgramInfoLog) == 12,
4251 "size of GetProgramInfoLog should be 12");
4252 static_assert(offsetof(GetProgramInfoLog, header) == 0,
4253 "offset of GetProgramInfoLog header should be 0");
4254 static_assert(offsetof(GetProgramInfoLog, program) == 4,
4255 "offset of GetProgramInfoLog program should be 4");
4256 static_assert(offsetof(GetProgramInfoLog, bucket_id) == 8,
4257 "offset of GetProgramInfoLog bucket_id should be 8");
4259 struct GetRenderbufferParameteriv {
4260 typedef GetRenderbufferParameteriv ValueType;
4261 static const CommandId kCmdId = kGetRenderbufferParameteriv;
4262 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4263 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4265 typedef SizedResult<GLint> Result;
4267 static uint32_t ComputeSize() {
4268 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4271 void SetHeader() { header.SetCmd<ValueType>(); }
4273 void Init(GLenum _target,
4274 GLenum _pname,
4275 uint32_t _params_shm_id,
4276 uint32_t _params_shm_offset) {
4277 SetHeader();
4278 target = _target;
4279 pname = _pname;
4280 params_shm_id = _params_shm_id;
4281 params_shm_offset = _params_shm_offset;
4284 void* Set(void* cmd,
4285 GLenum _target,
4286 GLenum _pname,
4287 uint32_t _params_shm_id,
4288 uint32_t _params_shm_offset) {
4289 static_cast<ValueType*>(cmd)
4290 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4291 return NextCmdAddress<ValueType>(cmd);
4294 gpu::CommandHeader header;
4295 uint32_t target;
4296 uint32_t pname;
4297 uint32_t params_shm_id;
4298 uint32_t params_shm_offset;
4301 static_assert(sizeof(GetRenderbufferParameteriv) == 20,
4302 "size of GetRenderbufferParameteriv should be 20");
4303 static_assert(offsetof(GetRenderbufferParameteriv, header) == 0,
4304 "offset of GetRenderbufferParameteriv header should be 0");
4305 static_assert(offsetof(GetRenderbufferParameteriv, target) == 4,
4306 "offset of GetRenderbufferParameteriv target should be 4");
4307 static_assert(offsetof(GetRenderbufferParameteriv, pname) == 8,
4308 "offset of GetRenderbufferParameteriv pname should be 8");
4309 static_assert(
4310 offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
4311 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4312 static_assert(
4313 offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
4314 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4316 struct GetSamplerParameterfv {
4317 typedef GetSamplerParameterfv ValueType;
4318 static const CommandId kCmdId = kGetSamplerParameterfv;
4319 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4320 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4322 typedef SizedResult<GLfloat> Result;
4324 static uint32_t ComputeSize() {
4325 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4328 void SetHeader() { header.SetCmd<ValueType>(); }
4330 void Init(GLuint _sampler,
4331 GLenum _pname,
4332 uint32_t _params_shm_id,
4333 uint32_t _params_shm_offset) {
4334 SetHeader();
4335 sampler = _sampler;
4336 pname = _pname;
4337 params_shm_id = _params_shm_id;
4338 params_shm_offset = _params_shm_offset;
4341 void* Set(void* cmd,
4342 GLuint _sampler,
4343 GLenum _pname,
4344 uint32_t _params_shm_id,
4345 uint32_t _params_shm_offset) {
4346 static_cast<ValueType*>(cmd)
4347 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4348 return NextCmdAddress<ValueType>(cmd);
4351 gpu::CommandHeader header;
4352 uint32_t sampler;
4353 uint32_t pname;
4354 uint32_t params_shm_id;
4355 uint32_t params_shm_offset;
4358 static_assert(sizeof(GetSamplerParameterfv) == 20,
4359 "size of GetSamplerParameterfv should be 20");
4360 static_assert(offsetof(GetSamplerParameterfv, header) == 0,
4361 "offset of GetSamplerParameterfv header should be 0");
4362 static_assert(offsetof(GetSamplerParameterfv, sampler) == 4,
4363 "offset of GetSamplerParameterfv sampler should be 4");
4364 static_assert(offsetof(GetSamplerParameterfv, pname) == 8,
4365 "offset of GetSamplerParameterfv pname should be 8");
4366 static_assert(offsetof(GetSamplerParameterfv, params_shm_id) == 12,
4367 "offset of GetSamplerParameterfv params_shm_id should be 12");
4368 static_assert(offsetof(GetSamplerParameterfv, params_shm_offset) == 16,
4369 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4371 struct GetSamplerParameteriv {
4372 typedef GetSamplerParameteriv ValueType;
4373 static const CommandId kCmdId = kGetSamplerParameteriv;
4374 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4375 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4377 typedef SizedResult<GLint> Result;
4379 static uint32_t ComputeSize() {
4380 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4383 void SetHeader() { header.SetCmd<ValueType>(); }
4385 void Init(GLuint _sampler,
4386 GLenum _pname,
4387 uint32_t _params_shm_id,
4388 uint32_t _params_shm_offset) {
4389 SetHeader();
4390 sampler = _sampler;
4391 pname = _pname;
4392 params_shm_id = _params_shm_id;
4393 params_shm_offset = _params_shm_offset;
4396 void* Set(void* cmd,
4397 GLuint _sampler,
4398 GLenum _pname,
4399 uint32_t _params_shm_id,
4400 uint32_t _params_shm_offset) {
4401 static_cast<ValueType*>(cmd)
4402 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset);
4403 return NextCmdAddress<ValueType>(cmd);
4406 gpu::CommandHeader header;
4407 uint32_t sampler;
4408 uint32_t pname;
4409 uint32_t params_shm_id;
4410 uint32_t params_shm_offset;
4413 static_assert(sizeof(GetSamplerParameteriv) == 20,
4414 "size of GetSamplerParameteriv should be 20");
4415 static_assert(offsetof(GetSamplerParameteriv, header) == 0,
4416 "offset of GetSamplerParameteriv header should be 0");
4417 static_assert(offsetof(GetSamplerParameteriv, sampler) == 4,
4418 "offset of GetSamplerParameteriv sampler should be 4");
4419 static_assert(offsetof(GetSamplerParameteriv, pname) == 8,
4420 "offset of GetSamplerParameteriv pname should be 8");
4421 static_assert(offsetof(GetSamplerParameteriv, params_shm_id) == 12,
4422 "offset of GetSamplerParameteriv params_shm_id should be 12");
4423 static_assert(offsetof(GetSamplerParameteriv, params_shm_offset) == 16,
4424 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4426 struct GetShaderiv {
4427 typedef GetShaderiv ValueType;
4428 static const CommandId kCmdId = kGetShaderiv;
4429 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4430 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4432 typedef SizedResult<GLint> Result;
4434 static uint32_t ComputeSize() {
4435 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4438 void SetHeader() { header.SetCmd<ValueType>(); }
4440 void Init(GLuint _shader,
4441 GLenum _pname,
4442 uint32_t _params_shm_id,
4443 uint32_t _params_shm_offset) {
4444 SetHeader();
4445 shader = _shader;
4446 pname = _pname;
4447 params_shm_id = _params_shm_id;
4448 params_shm_offset = _params_shm_offset;
4451 void* Set(void* cmd,
4452 GLuint _shader,
4453 GLenum _pname,
4454 uint32_t _params_shm_id,
4455 uint32_t _params_shm_offset) {
4456 static_cast<ValueType*>(cmd)
4457 ->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
4458 return NextCmdAddress<ValueType>(cmd);
4461 gpu::CommandHeader header;
4462 uint32_t shader;
4463 uint32_t pname;
4464 uint32_t params_shm_id;
4465 uint32_t params_shm_offset;
4468 static_assert(sizeof(GetShaderiv) == 20, "size of GetShaderiv should be 20");
4469 static_assert(offsetof(GetShaderiv, header) == 0,
4470 "offset of GetShaderiv header should be 0");
4471 static_assert(offsetof(GetShaderiv, shader) == 4,
4472 "offset of GetShaderiv shader should be 4");
4473 static_assert(offsetof(GetShaderiv, pname) == 8,
4474 "offset of GetShaderiv pname should be 8");
4475 static_assert(offsetof(GetShaderiv, params_shm_id) == 12,
4476 "offset of GetShaderiv params_shm_id should be 12");
4477 static_assert(offsetof(GetShaderiv, params_shm_offset) == 16,
4478 "offset of GetShaderiv params_shm_offset should be 16");
4480 struct GetShaderInfoLog {
4481 typedef GetShaderInfoLog ValueType;
4482 static const CommandId kCmdId = kGetShaderInfoLog;
4483 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4484 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4486 static uint32_t ComputeSize() {
4487 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4490 void SetHeader() { header.SetCmd<ValueType>(); }
4492 void Init(GLuint _shader, uint32_t _bucket_id) {
4493 SetHeader();
4494 shader = _shader;
4495 bucket_id = _bucket_id;
4498 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
4499 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
4500 return NextCmdAddress<ValueType>(cmd);
4503 gpu::CommandHeader header;
4504 uint32_t shader;
4505 uint32_t bucket_id;
4508 static_assert(sizeof(GetShaderInfoLog) == 12,
4509 "size of GetShaderInfoLog should be 12");
4510 static_assert(offsetof(GetShaderInfoLog, header) == 0,
4511 "offset of GetShaderInfoLog header should be 0");
4512 static_assert(offsetof(GetShaderInfoLog, shader) == 4,
4513 "offset of GetShaderInfoLog shader should be 4");
4514 static_assert(offsetof(GetShaderInfoLog, bucket_id) == 8,
4515 "offset of GetShaderInfoLog bucket_id should be 8");
4517 struct GetShaderPrecisionFormat {
4518 typedef GetShaderPrecisionFormat ValueType;
4519 static const CommandId kCmdId = kGetShaderPrecisionFormat;
4520 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4521 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4523 struct Result {
4524 int32_t success;
4525 int32_t min_range;
4526 int32_t max_range;
4527 int32_t precision;
4530 static uint32_t ComputeSize() {
4531 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4534 void SetHeader() { header.SetCmd<ValueType>(); }
4536 void Init(GLenum _shadertype,
4537 GLenum _precisiontype,
4538 uint32_t _result_shm_id,
4539 uint32_t _result_shm_offset) {
4540 SetHeader();
4541 shadertype = _shadertype;
4542 precisiontype = _precisiontype;
4543 result_shm_id = _result_shm_id;
4544 result_shm_offset = _result_shm_offset;
4547 void* Set(void* cmd,
4548 GLenum _shadertype,
4549 GLenum _precisiontype,
4550 uint32_t _result_shm_id,
4551 uint32_t _result_shm_offset) {
4552 static_cast<ValueType*>(cmd)
4553 ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
4554 return NextCmdAddress<ValueType>(cmd);
4557 gpu::CommandHeader header;
4558 uint32_t shadertype;
4559 uint32_t precisiontype;
4560 uint32_t result_shm_id;
4561 uint32_t result_shm_offset;
4564 static_assert(sizeof(GetShaderPrecisionFormat) == 20,
4565 "size of GetShaderPrecisionFormat should be 20");
4566 static_assert(offsetof(GetShaderPrecisionFormat, header) == 0,
4567 "offset of GetShaderPrecisionFormat header should be 0");
4568 static_assert(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
4569 "offset of GetShaderPrecisionFormat shadertype should be 4");
4570 static_assert(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
4571 "offset of GetShaderPrecisionFormat precisiontype should be 8");
4572 static_assert(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
4573 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
4574 static_assert(
4575 offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
4576 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
4577 static_assert(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
4578 "offset of GetShaderPrecisionFormat Result success should be "
4579 "0");
4580 static_assert(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
4581 "offset of GetShaderPrecisionFormat Result min_range should be "
4582 "4");
4583 static_assert(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
4584 "offset of GetShaderPrecisionFormat Result max_range should be "
4585 "8");
4586 static_assert(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
4587 "offset of GetShaderPrecisionFormat Result precision should be "
4588 "12");
4590 struct GetShaderSource {
4591 typedef GetShaderSource ValueType;
4592 static const CommandId kCmdId = kGetShaderSource;
4593 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4594 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4596 static uint32_t ComputeSize() {
4597 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4600 void SetHeader() { header.SetCmd<ValueType>(); }
4602 void Init(GLuint _shader, uint32_t _bucket_id) {
4603 SetHeader();
4604 shader = _shader;
4605 bucket_id = _bucket_id;
4608 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
4609 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
4610 return NextCmdAddress<ValueType>(cmd);
4613 gpu::CommandHeader header;
4614 uint32_t shader;
4615 uint32_t bucket_id;
4618 static_assert(sizeof(GetShaderSource) == 12,
4619 "size of GetShaderSource should be 12");
4620 static_assert(offsetof(GetShaderSource, header) == 0,
4621 "offset of GetShaderSource header should be 0");
4622 static_assert(offsetof(GetShaderSource, shader) == 4,
4623 "offset of GetShaderSource shader should be 4");
4624 static_assert(offsetof(GetShaderSource, bucket_id) == 8,
4625 "offset of GetShaderSource bucket_id should be 8");
4627 struct GetString {
4628 typedef GetString ValueType;
4629 static const CommandId kCmdId = kGetString;
4630 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4631 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4633 static uint32_t ComputeSize() {
4634 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4637 void SetHeader() { header.SetCmd<ValueType>(); }
4639 void Init(GLenum _name, uint32_t _bucket_id) {
4640 SetHeader();
4641 name = _name;
4642 bucket_id = _bucket_id;
4645 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) {
4646 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
4647 return NextCmdAddress<ValueType>(cmd);
4650 gpu::CommandHeader header;
4651 uint32_t name;
4652 uint32_t bucket_id;
4655 static_assert(sizeof(GetString) == 12, "size of GetString should be 12");
4656 static_assert(offsetof(GetString, header) == 0,
4657 "offset of GetString header should be 0");
4658 static_assert(offsetof(GetString, name) == 4,
4659 "offset of GetString name should be 4");
4660 static_assert(offsetof(GetString, bucket_id) == 8,
4661 "offset of GetString bucket_id should be 8");
4663 struct GetTexParameterfv {
4664 typedef GetTexParameterfv ValueType;
4665 static const CommandId kCmdId = kGetTexParameterfv;
4666 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4667 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4669 typedef SizedResult<GLfloat> Result;
4671 static uint32_t ComputeSize() {
4672 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4675 void SetHeader() { header.SetCmd<ValueType>(); }
4677 void Init(GLenum _target,
4678 GLenum _pname,
4679 uint32_t _params_shm_id,
4680 uint32_t _params_shm_offset) {
4681 SetHeader();
4682 target = _target;
4683 pname = _pname;
4684 params_shm_id = _params_shm_id;
4685 params_shm_offset = _params_shm_offset;
4688 void* Set(void* cmd,
4689 GLenum _target,
4690 GLenum _pname,
4691 uint32_t _params_shm_id,
4692 uint32_t _params_shm_offset) {
4693 static_cast<ValueType*>(cmd)
4694 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4695 return NextCmdAddress<ValueType>(cmd);
4698 gpu::CommandHeader header;
4699 uint32_t target;
4700 uint32_t pname;
4701 uint32_t params_shm_id;
4702 uint32_t params_shm_offset;
4705 static_assert(sizeof(GetTexParameterfv) == 20,
4706 "size of GetTexParameterfv should be 20");
4707 static_assert(offsetof(GetTexParameterfv, header) == 0,
4708 "offset of GetTexParameterfv header should be 0");
4709 static_assert(offsetof(GetTexParameterfv, target) == 4,
4710 "offset of GetTexParameterfv target should be 4");
4711 static_assert(offsetof(GetTexParameterfv, pname) == 8,
4712 "offset of GetTexParameterfv pname should be 8");
4713 static_assert(offsetof(GetTexParameterfv, params_shm_id) == 12,
4714 "offset of GetTexParameterfv params_shm_id should be 12");
4715 static_assert(offsetof(GetTexParameterfv, params_shm_offset) == 16,
4716 "offset of GetTexParameterfv params_shm_offset should be 16");
4718 struct GetTexParameteriv {
4719 typedef GetTexParameteriv ValueType;
4720 static const CommandId kCmdId = kGetTexParameteriv;
4721 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4722 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4724 typedef SizedResult<GLint> Result;
4726 static uint32_t ComputeSize() {
4727 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4730 void SetHeader() { header.SetCmd<ValueType>(); }
4732 void Init(GLenum _target,
4733 GLenum _pname,
4734 uint32_t _params_shm_id,
4735 uint32_t _params_shm_offset) {
4736 SetHeader();
4737 target = _target;
4738 pname = _pname;
4739 params_shm_id = _params_shm_id;
4740 params_shm_offset = _params_shm_offset;
4743 void* Set(void* cmd,
4744 GLenum _target,
4745 GLenum _pname,
4746 uint32_t _params_shm_id,
4747 uint32_t _params_shm_offset) {
4748 static_cast<ValueType*>(cmd)
4749 ->Init(_target, _pname, _params_shm_id, _params_shm_offset);
4750 return NextCmdAddress<ValueType>(cmd);
4753 gpu::CommandHeader header;
4754 uint32_t target;
4755 uint32_t pname;
4756 uint32_t params_shm_id;
4757 uint32_t params_shm_offset;
4760 static_assert(sizeof(GetTexParameteriv) == 20,
4761 "size of GetTexParameteriv should be 20");
4762 static_assert(offsetof(GetTexParameteriv, header) == 0,
4763 "offset of GetTexParameteriv header should be 0");
4764 static_assert(offsetof(GetTexParameteriv, target) == 4,
4765 "offset of GetTexParameteriv target should be 4");
4766 static_assert(offsetof(GetTexParameteriv, pname) == 8,
4767 "offset of GetTexParameteriv pname should be 8");
4768 static_assert(offsetof(GetTexParameteriv, params_shm_id) == 12,
4769 "offset of GetTexParameteriv params_shm_id should be 12");
4770 static_assert(offsetof(GetTexParameteriv, params_shm_offset) == 16,
4771 "offset of GetTexParameteriv params_shm_offset should be 16");
4773 struct GetTransformFeedbackVarying {
4774 typedef GetTransformFeedbackVarying ValueType;
4775 static const CommandId kCmdId = kGetTransformFeedbackVarying;
4776 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4777 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4779 struct Result {
4780 int32_t success;
4781 int32_t size;
4782 uint32_t type;
4785 static uint32_t ComputeSize() {
4786 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4789 void SetHeader() { header.SetCmd<ValueType>(); }
4791 void Init(GLuint _program,
4792 GLuint _index,
4793 uint32_t _name_bucket_id,
4794 uint32_t _result_shm_id,
4795 uint32_t _result_shm_offset) {
4796 SetHeader();
4797 program = _program;
4798 index = _index;
4799 name_bucket_id = _name_bucket_id;
4800 result_shm_id = _result_shm_id;
4801 result_shm_offset = _result_shm_offset;
4804 void* Set(void* cmd,
4805 GLuint _program,
4806 GLuint _index,
4807 uint32_t _name_bucket_id,
4808 uint32_t _result_shm_id,
4809 uint32_t _result_shm_offset) {
4810 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id,
4811 _result_shm_id, _result_shm_offset);
4812 return NextCmdAddress<ValueType>(cmd);
4815 gpu::CommandHeader header;
4816 uint32_t program;
4817 uint32_t index;
4818 uint32_t name_bucket_id;
4819 uint32_t result_shm_id;
4820 uint32_t result_shm_offset;
4823 static_assert(sizeof(GetTransformFeedbackVarying) == 24,
4824 "size of GetTransformFeedbackVarying should be 24");
4825 static_assert(offsetof(GetTransformFeedbackVarying, header) == 0,
4826 "offset of GetTransformFeedbackVarying header should be 0");
4827 static_assert(offsetof(GetTransformFeedbackVarying, program) == 4,
4828 "offset of GetTransformFeedbackVarying program should be 4");
4829 static_assert(offsetof(GetTransformFeedbackVarying, index) == 8,
4830 "offset of GetTransformFeedbackVarying index should be 8");
4831 static_assert(
4832 offsetof(GetTransformFeedbackVarying, name_bucket_id) == 12,
4833 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
4834 static_assert(
4835 offsetof(GetTransformFeedbackVarying, result_shm_id) == 16,
4836 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
4837 static_assert(
4838 offsetof(GetTransformFeedbackVarying, result_shm_offset) == 20,
4839 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
4840 static_assert(offsetof(GetTransformFeedbackVarying::Result, success) == 0,
4841 "offset of GetTransformFeedbackVarying Result success should be "
4842 "0");
4843 static_assert(offsetof(GetTransformFeedbackVarying::Result, size) == 4,
4844 "offset of GetTransformFeedbackVarying Result size should be "
4845 "4");
4846 static_assert(offsetof(GetTransformFeedbackVarying::Result, type) == 8,
4847 "offset of GetTransformFeedbackVarying Result type should be "
4848 "8");
4850 struct GetUniformBlockIndex {
4851 typedef GetUniformBlockIndex ValueType;
4852 static const CommandId kCmdId = kGetUniformBlockIndex;
4853 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4854 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4856 typedef GLuint Result;
4858 static uint32_t ComputeSize() {
4859 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4862 void SetHeader() { header.SetCmd<ValueType>(); }
4864 void Init(GLuint _program,
4865 uint32_t _name_bucket_id,
4866 uint32_t _index_shm_id,
4867 uint32_t _index_shm_offset) {
4868 SetHeader();
4869 program = _program;
4870 name_bucket_id = _name_bucket_id;
4871 index_shm_id = _index_shm_id;
4872 index_shm_offset = _index_shm_offset;
4875 void* Set(void* cmd,
4876 GLuint _program,
4877 uint32_t _name_bucket_id,
4878 uint32_t _index_shm_id,
4879 uint32_t _index_shm_offset) {
4880 static_cast<ValueType*>(cmd)
4881 ->Init(_program, _name_bucket_id, _index_shm_id, _index_shm_offset);
4882 return NextCmdAddress<ValueType>(cmd);
4885 gpu::CommandHeader header;
4886 uint32_t program;
4887 uint32_t name_bucket_id;
4888 uint32_t index_shm_id;
4889 uint32_t index_shm_offset;
4892 static_assert(sizeof(GetUniformBlockIndex) == 20,
4893 "size of GetUniformBlockIndex should be 20");
4894 static_assert(offsetof(GetUniformBlockIndex, header) == 0,
4895 "offset of GetUniformBlockIndex header should be 0");
4896 static_assert(offsetof(GetUniformBlockIndex, program) == 4,
4897 "offset of GetUniformBlockIndex program should be 4");
4898 static_assert(offsetof(GetUniformBlockIndex, name_bucket_id) == 8,
4899 "offset of GetUniformBlockIndex name_bucket_id should be 8");
4900 static_assert(offsetof(GetUniformBlockIndex, index_shm_id) == 12,
4901 "offset of GetUniformBlockIndex index_shm_id should be 12");
4902 static_assert(offsetof(GetUniformBlockIndex, index_shm_offset) == 16,
4903 "offset of GetUniformBlockIndex index_shm_offset should be 16");
4905 struct GetUniformfv {
4906 typedef GetUniformfv ValueType;
4907 static const CommandId kCmdId = kGetUniformfv;
4908 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4909 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4911 typedef SizedResult<GLfloat> Result;
4913 static uint32_t ComputeSize() {
4914 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4917 void SetHeader() { header.SetCmd<ValueType>(); }
4919 void Init(GLuint _program,
4920 GLint _location,
4921 uint32_t _params_shm_id,
4922 uint32_t _params_shm_offset) {
4923 SetHeader();
4924 program = _program;
4925 location = _location;
4926 params_shm_id = _params_shm_id;
4927 params_shm_offset = _params_shm_offset;
4930 void* Set(void* cmd,
4931 GLuint _program,
4932 GLint _location,
4933 uint32_t _params_shm_id,
4934 uint32_t _params_shm_offset) {
4935 static_cast<ValueType*>(cmd)
4936 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
4937 return NextCmdAddress<ValueType>(cmd);
4940 gpu::CommandHeader header;
4941 uint32_t program;
4942 int32_t location;
4943 uint32_t params_shm_id;
4944 uint32_t params_shm_offset;
4947 static_assert(sizeof(GetUniformfv) == 20, "size of GetUniformfv should be 20");
4948 static_assert(offsetof(GetUniformfv, header) == 0,
4949 "offset of GetUniformfv header should be 0");
4950 static_assert(offsetof(GetUniformfv, program) == 4,
4951 "offset of GetUniformfv program should be 4");
4952 static_assert(offsetof(GetUniformfv, location) == 8,
4953 "offset of GetUniformfv location should be 8");
4954 static_assert(offsetof(GetUniformfv, params_shm_id) == 12,
4955 "offset of GetUniformfv params_shm_id should be 12");
4956 static_assert(offsetof(GetUniformfv, params_shm_offset) == 16,
4957 "offset of GetUniformfv params_shm_offset should be 16");
4959 struct GetUniformiv {
4960 typedef GetUniformiv ValueType;
4961 static const CommandId kCmdId = kGetUniformiv;
4962 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4963 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4965 typedef SizedResult<GLint> Result;
4967 static uint32_t ComputeSize() {
4968 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4971 void SetHeader() { header.SetCmd<ValueType>(); }
4973 void Init(GLuint _program,
4974 GLint _location,
4975 uint32_t _params_shm_id,
4976 uint32_t _params_shm_offset) {
4977 SetHeader();
4978 program = _program;
4979 location = _location;
4980 params_shm_id = _params_shm_id;
4981 params_shm_offset = _params_shm_offset;
4984 void* Set(void* cmd,
4985 GLuint _program,
4986 GLint _location,
4987 uint32_t _params_shm_id,
4988 uint32_t _params_shm_offset) {
4989 static_cast<ValueType*>(cmd)
4990 ->Init(_program, _location, _params_shm_id, _params_shm_offset);
4991 return NextCmdAddress<ValueType>(cmd);
4994 gpu::CommandHeader header;
4995 uint32_t program;
4996 int32_t location;
4997 uint32_t params_shm_id;
4998 uint32_t params_shm_offset;
5001 static_assert(sizeof(GetUniformiv) == 20, "size of GetUniformiv should be 20");
5002 static_assert(offsetof(GetUniformiv, header) == 0,
5003 "offset of GetUniformiv header should be 0");
5004 static_assert(offsetof(GetUniformiv, program) == 4,
5005 "offset of GetUniformiv program should be 4");
5006 static_assert(offsetof(GetUniformiv, location) == 8,
5007 "offset of GetUniformiv location should be 8");
5008 static_assert(offsetof(GetUniformiv, params_shm_id) == 12,
5009 "offset of GetUniformiv params_shm_id should be 12");
5010 static_assert(offsetof(GetUniformiv, params_shm_offset) == 16,
5011 "offset of GetUniformiv params_shm_offset should be 16");
5013 struct GetUniformIndices {
5014 typedef GetUniformIndices ValueType;
5015 static const CommandId kCmdId = kGetUniformIndices;
5016 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5017 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5019 typedef SizedResult<GLuint> Result;
5021 static uint32_t ComputeSize() {
5022 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5025 void SetHeader() { header.SetCmd<ValueType>(); }
5027 void Init(GLuint _program,
5028 uint32_t _names_bucket_id,
5029 uint32_t _indices_shm_id,
5030 uint32_t _indices_shm_offset) {
5031 SetHeader();
5032 program = _program;
5033 names_bucket_id = _names_bucket_id;
5034 indices_shm_id = _indices_shm_id;
5035 indices_shm_offset = _indices_shm_offset;
5038 void* Set(void* cmd,
5039 GLuint _program,
5040 uint32_t _names_bucket_id,
5041 uint32_t _indices_shm_id,
5042 uint32_t _indices_shm_offset) {
5043 static_cast<ValueType*>(cmd)->Init(_program, _names_bucket_id,
5044 _indices_shm_id, _indices_shm_offset);
5045 return NextCmdAddress<ValueType>(cmd);
5048 gpu::CommandHeader header;
5049 uint32_t program;
5050 uint32_t names_bucket_id;
5051 uint32_t indices_shm_id;
5052 uint32_t indices_shm_offset;
5055 static_assert(sizeof(GetUniformIndices) == 20,
5056 "size of GetUniformIndices should be 20");
5057 static_assert(offsetof(GetUniformIndices, header) == 0,
5058 "offset of GetUniformIndices header should be 0");
5059 static_assert(offsetof(GetUniformIndices, program) == 4,
5060 "offset of GetUniformIndices program should be 4");
5061 static_assert(offsetof(GetUniformIndices, names_bucket_id) == 8,
5062 "offset of GetUniformIndices names_bucket_id should be 8");
5063 static_assert(offsetof(GetUniformIndices, indices_shm_id) == 12,
5064 "offset of GetUniformIndices indices_shm_id should be 12");
5065 static_assert(offsetof(GetUniformIndices, indices_shm_offset) == 16,
5066 "offset of GetUniformIndices indices_shm_offset should be 16");
5068 struct GetUniformLocation {
5069 typedef GetUniformLocation ValueType;
5070 static const CommandId kCmdId = kGetUniformLocation;
5071 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5072 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5074 typedef GLint Result;
5076 static uint32_t ComputeSize() {
5077 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5080 void SetHeader() { header.SetCmd<ValueType>(); }
5082 void Init(GLuint _program,
5083 uint32_t _name_bucket_id,
5084 uint32_t _location_shm_id,
5085 uint32_t _location_shm_offset) {
5086 SetHeader();
5087 program = _program;
5088 name_bucket_id = _name_bucket_id;
5089 location_shm_id = _location_shm_id;
5090 location_shm_offset = _location_shm_offset;
5093 void* Set(void* cmd,
5094 GLuint _program,
5095 uint32_t _name_bucket_id,
5096 uint32_t _location_shm_id,
5097 uint32_t _location_shm_offset) {
5098 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
5099 _location_shm_id, _location_shm_offset);
5100 return NextCmdAddress<ValueType>(cmd);
5103 gpu::CommandHeader header;
5104 uint32_t program;
5105 uint32_t name_bucket_id;
5106 uint32_t location_shm_id;
5107 uint32_t location_shm_offset;
5110 static_assert(sizeof(GetUniformLocation) == 20,
5111 "size of GetUniformLocation should be 20");
5112 static_assert(offsetof(GetUniformLocation, header) == 0,
5113 "offset of GetUniformLocation header should be 0");
5114 static_assert(offsetof(GetUniformLocation, program) == 4,
5115 "offset of GetUniformLocation program should be 4");
5116 static_assert(offsetof(GetUniformLocation, name_bucket_id) == 8,
5117 "offset of GetUniformLocation name_bucket_id should be 8");
5118 static_assert(offsetof(GetUniformLocation, location_shm_id) == 12,
5119 "offset of GetUniformLocation location_shm_id should be 12");
5120 static_assert(offsetof(GetUniformLocation, location_shm_offset) == 16,
5121 "offset of GetUniformLocation location_shm_offset should be 16");
5123 struct GetVertexAttribfv {
5124 typedef GetVertexAttribfv ValueType;
5125 static const CommandId kCmdId = kGetVertexAttribfv;
5126 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5127 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5129 typedef SizedResult<GLfloat> Result;
5131 static uint32_t ComputeSize() {
5132 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5135 void SetHeader() { header.SetCmd<ValueType>(); }
5137 void Init(GLuint _index,
5138 GLenum _pname,
5139 uint32_t _params_shm_id,
5140 uint32_t _params_shm_offset) {
5141 SetHeader();
5142 index = _index;
5143 pname = _pname;
5144 params_shm_id = _params_shm_id;
5145 params_shm_offset = _params_shm_offset;
5148 void* Set(void* cmd,
5149 GLuint _index,
5150 GLenum _pname,
5151 uint32_t _params_shm_id,
5152 uint32_t _params_shm_offset) {
5153 static_cast<ValueType*>(cmd)
5154 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5155 return NextCmdAddress<ValueType>(cmd);
5158 gpu::CommandHeader header;
5159 uint32_t index;
5160 uint32_t pname;
5161 uint32_t params_shm_id;
5162 uint32_t params_shm_offset;
5165 static_assert(sizeof(GetVertexAttribfv) == 20,
5166 "size of GetVertexAttribfv should be 20");
5167 static_assert(offsetof(GetVertexAttribfv, header) == 0,
5168 "offset of GetVertexAttribfv header should be 0");
5169 static_assert(offsetof(GetVertexAttribfv, index) == 4,
5170 "offset of GetVertexAttribfv index should be 4");
5171 static_assert(offsetof(GetVertexAttribfv, pname) == 8,
5172 "offset of GetVertexAttribfv pname should be 8");
5173 static_assert(offsetof(GetVertexAttribfv, params_shm_id) == 12,
5174 "offset of GetVertexAttribfv params_shm_id should be 12");
5175 static_assert(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
5176 "offset of GetVertexAttribfv params_shm_offset should be 16");
5178 struct GetVertexAttribiv {
5179 typedef GetVertexAttribiv ValueType;
5180 static const CommandId kCmdId = kGetVertexAttribiv;
5181 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5182 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5184 typedef SizedResult<GLint> Result;
5186 static uint32_t ComputeSize() {
5187 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5190 void SetHeader() { header.SetCmd<ValueType>(); }
5192 void Init(GLuint _index,
5193 GLenum _pname,
5194 uint32_t _params_shm_id,
5195 uint32_t _params_shm_offset) {
5196 SetHeader();
5197 index = _index;
5198 pname = _pname;
5199 params_shm_id = _params_shm_id;
5200 params_shm_offset = _params_shm_offset;
5203 void* Set(void* cmd,
5204 GLuint _index,
5205 GLenum _pname,
5206 uint32_t _params_shm_id,
5207 uint32_t _params_shm_offset) {
5208 static_cast<ValueType*>(cmd)
5209 ->Init(_index, _pname, _params_shm_id, _params_shm_offset);
5210 return NextCmdAddress<ValueType>(cmd);
5213 gpu::CommandHeader header;
5214 uint32_t index;
5215 uint32_t pname;
5216 uint32_t params_shm_id;
5217 uint32_t params_shm_offset;
5220 static_assert(sizeof(GetVertexAttribiv) == 20,
5221 "size of GetVertexAttribiv should be 20");
5222 static_assert(offsetof(GetVertexAttribiv, header) == 0,
5223 "offset of GetVertexAttribiv header should be 0");
5224 static_assert(offsetof(GetVertexAttribiv, index) == 4,
5225 "offset of GetVertexAttribiv index should be 4");
5226 static_assert(offsetof(GetVertexAttribiv, pname) == 8,
5227 "offset of GetVertexAttribiv pname should be 8");
5228 static_assert(offsetof(GetVertexAttribiv, params_shm_id) == 12,
5229 "offset of GetVertexAttribiv params_shm_id should be 12");
5230 static_assert(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
5231 "offset of GetVertexAttribiv params_shm_offset should be 16");
5233 struct GetVertexAttribPointerv {
5234 typedef GetVertexAttribPointerv ValueType;
5235 static const CommandId kCmdId = kGetVertexAttribPointerv;
5236 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5237 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5239 typedef SizedResult<GLuint> Result;
5241 static uint32_t ComputeSize() {
5242 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5245 void SetHeader() { header.SetCmd<ValueType>(); }
5247 void Init(GLuint _index,
5248 GLenum _pname,
5249 uint32_t _pointer_shm_id,
5250 uint32_t _pointer_shm_offset) {
5251 SetHeader();
5252 index = _index;
5253 pname = _pname;
5254 pointer_shm_id = _pointer_shm_id;
5255 pointer_shm_offset = _pointer_shm_offset;
5258 void* Set(void* cmd,
5259 GLuint _index,
5260 GLenum _pname,
5261 uint32_t _pointer_shm_id,
5262 uint32_t _pointer_shm_offset) {
5263 static_cast<ValueType*>(cmd)
5264 ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
5265 return NextCmdAddress<ValueType>(cmd);
5268 gpu::CommandHeader header;
5269 uint32_t index;
5270 uint32_t pname;
5271 uint32_t pointer_shm_id;
5272 uint32_t pointer_shm_offset;
5275 static_assert(sizeof(GetVertexAttribPointerv) == 20,
5276 "size of GetVertexAttribPointerv should be 20");
5277 static_assert(offsetof(GetVertexAttribPointerv, header) == 0,
5278 "offset of GetVertexAttribPointerv header should be 0");
5279 static_assert(offsetof(GetVertexAttribPointerv, index) == 4,
5280 "offset of GetVertexAttribPointerv index should be 4");
5281 static_assert(offsetof(GetVertexAttribPointerv, pname) == 8,
5282 "offset of GetVertexAttribPointerv pname should be 8");
5283 static_assert(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
5284 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
5285 static_assert(
5286 offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
5287 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
5289 struct Hint {
5290 typedef Hint ValueType;
5291 static const CommandId kCmdId = kHint;
5292 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5293 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5295 static uint32_t ComputeSize() {
5296 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5299 void SetHeader() { header.SetCmd<ValueType>(); }
5301 void Init(GLenum _target, GLenum _mode) {
5302 SetHeader();
5303 target = _target;
5304 mode = _mode;
5307 void* Set(void* cmd, GLenum _target, GLenum _mode) {
5308 static_cast<ValueType*>(cmd)->Init(_target, _mode);
5309 return NextCmdAddress<ValueType>(cmd);
5312 gpu::CommandHeader header;
5313 uint32_t target;
5314 uint32_t mode;
5317 static_assert(sizeof(Hint) == 12, "size of Hint should be 12");
5318 static_assert(offsetof(Hint, header) == 0, "offset of Hint header should be 0");
5319 static_assert(offsetof(Hint, target) == 4, "offset of Hint target should be 4");
5320 static_assert(offsetof(Hint, mode) == 8, "offset of Hint mode should be 8");
5322 struct InvalidateFramebufferImmediate {
5323 typedef InvalidateFramebufferImmediate ValueType;
5324 static const CommandId kCmdId = kInvalidateFramebufferImmediate;
5325 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5326 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5328 static uint32_t ComputeDataSize(GLsizei count) {
5329 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
5332 static uint32_t ComputeSize(GLsizei count) {
5333 return static_cast<uint32_t>(sizeof(ValueType) +
5334 ComputeDataSize(count)); // NOLINT
5337 void SetHeader(GLsizei count) {
5338 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5341 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
5342 SetHeader(_count);
5343 target = _target;
5344 count = _count;
5345 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
5348 void* Set(void* cmd,
5349 GLenum _target,
5350 GLsizei _count,
5351 const GLenum* _attachments) {
5352 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
5353 const uint32_t size = ComputeSize(_count);
5354 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5357 gpu::CommandHeader header;
5358 uint32_t target;
5359 int32_t count;
5362 static_assert(sizeof(InvalidateFramebufferImmediate) == 12,
5363 "size of InvalidateFramebufferImmediate should be 12");
5364 static_assert(offsetof(InvalidateFramebufferImmediate, header) == 0,
5365 "offset of InvalidateFramebufferImmediate header should be 0");
5366 static_assert(offsetof(InvalidateFramebufferImmediate, target) == 4,
5367 "offset of InvalidateFramebufferImmediate target should be 4");
5368 static_assert(offsetof(InvalidateFramebufferImmediate, count) == 8,
5369 "offset of InvalidateFramebufferImmediate count should be 8");
5371 struct InvalidateSubFramebufferImmediate {
5372 typedef InvalidateSubFramebufferImmediate ValueType;
5373 static const CommandId kCmdId = kInvalidateSubFramebufferImmediate;
5374 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
5375 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5377 static uint32_t ComputeDataSize(GLsizei count) {
5378 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
5381 static uint32_t ComputeSize(GLsizei count) {
5382 return static_cast<uint32_t>(sizeof(ValueType) +
5383 ComputeDataSize(count)); // NOLINT
5386 void SetHeader(GLsizei count) {
5387 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
5390 void Init(GLenum _target,
5391 GLsizei _count,
5392 const GLenum* _attachments,
5393 GLint _x,
5394 GLint _y,
5395 GLsizei _width,
5396 GLsizei _height) {
5397 SetHeader(_count);
5398 target = _target;
5399 count = _count;
5400 x = _x;
5401 y = _y;
5402 width = _width;
5403 height = _height;
5404 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
5407 void* Set(void* cmd,
5408 GLenum _target,
5409 GLsizei _count,
5410 const GLenum* _attachments,
5411 GLint _x,
5412 GLint _y,
5413 GLsizei _width,
5414 GLsizei _height) {
5415 static_cast<ValueType*>(cmd)
5416 ->Init(_target, _count, _attachments, _x, _y, _width, _height);
5417 const uint32_t size = ComputeSize(_count);
5418 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
5421 gpu::CommandHeader header;
5422 uint32_t target;
5423 int32_t count;
5424 int32_t x;
5425 int32_t y;
5426 int32_t width;
5427 int32_t height;
5430 static_assert(sizeof(InvalidateSubFramebufferImmediate) == 28,
5431 "size of InvalidateSubFramebufferImmediate should be 28");
5432 static_assert(offsetof(InvalidateSubFramebufferImmediate, header) == 0,
5433 "offset of InvalidateSubFramebufferImmediate header should be 0");
5434 static_assert(offsetof(InvalidateSubFramebufferImmediate, target) == 4,
5435 "offset of InvalidateSubFramebufferImmediate target should be 4");
5436 static_assert(offsetof(InvalidateSubFramebufferImmediate, count) == 8,
5437 "offset of InvalidateSubFramebufferImmediate count should be 8");
5438 static_assert(offsetof(InvalidateSubFramebufferImmediate, x) == 12,
5439 "offset of InvalidateSubFramebufferImmediate x should be 12");
5440 static_assert(offsetof(InvalidateSubFramebufferImmediate, y) == 16,
5441 "offset of InvalidateSubFramebufferImmediate y should be 16");
5442 static_assert(offsetof(InvalidateSubFramebufferImmediate, width) == 20,
5443 "offset of InvalidateSubFramebufferImmediate width should be 20");
5444 static_assert(
5445 offsetof(InvalidateSubFramebufferImmediate, height) == 24,
5446 "offset of InvalidateSubFramebufferImmediate height should be 24");
5448 struct IsBuffer {
5449 typedef IsBuffer ValueType;
5450 static const CommandId kCmdId = kIsBuffer;
5451 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5452 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5454 typedef uint32_t Result;
5456 static uint32_t ComputeSize() {
5457 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5460 void SetHeader() { header.SetCmd<ValueType>(); }
5462 void Init(GLuint _buffer,
5463 uint32_t _result_shm_id,
5464 uint32_t _result_shm_offset) {
5465 SetHeader();
5466 buffer = _buffer;
5467 result_shm_id = _result_shm_id;
5468 result_shm_offset = _result_shm_offset;
5471 void* Set(void* cmd,
5472 GLuint _buffer,
5473 uint32_t _result_shm_id,
5474 uint32_t _result_shm_offset) {
5475 static_cast<ValueType*>(cmd)
5476 ->Init(_buffer, _result_shm_id, _result_shm_offset);
5477 return NextCmdAddress<ValueType>(cmd);
5480 gpu::CommandHeader header;
5481 uint32_t buffer;
5482 uint32_t result_shm_id;
5483 uint32_t result_shm_offset;
5486 static_assert(sizeof(IsBuffer) == 16, "size of IsBuffer should be 16");
5487 static_assert(offsetof(IsBuffer, header) == 0,
5488 "offset of IsBuffer header should be 0");
5489 static_assert(offsetof(IsBuffer, buffer) == 4,
5490 "offset of IsBuffer buffer should be 4");
5491 static_assert(offsetof(IsBuffer, result_shm_id) == 8,
5492 "offset of IsBuffer result_shm_id should be 8");
5493 static_assert(offsetof(IsBuffer, result_shm_offset) == 12,
5494 "offset of IsBuffer result_shm_offset should be 12");
5496 struct IsEnabled {
5497 typedef IsEnabled ValueType;
5498 static const CommandId kCmdId = kIsEnabled;
5499 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5502 typedef uint32_t Result;
5504 static uint32_t ComputeSize() {
5505 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5508 void SetHeader() { header.SetCmd<ValueType>(); }
5510 void Init(GLenum _cap, uint32_t _result_shm_id, uint32_t _result_shm_offset) {
5511 SetHeader();
5512 cap = _cap;
5513 result_shm_id = _result_shm_id;
5514 result_shm_offset = _result_shm_offset;
5517 void* Set(void* cmd,
5518 GLenum _cap,
5519 uint32_t _result_shm_id,
5520 uint32_t _result_shm_offset) {
5521 static_cast<ValueType*>(cmd)
5522 ->Init(_cap, _result_shm_id, _result_shm_offset);
5523 return NextCmdAddress<ValueType>(cmd);
5526 gpu::CommandHeader header;
5527 uint32_t cap;
5528 uint32_t result_shm_id;
5529 uint32_t result_shm_offset;
5532 static_assert(sizeof(IsEnabled) == 16, "size of IsEnabled should be 16");
5533 static_assert(offsetof(IsEnabled, header) == 0,
5534 "offset of IsEnabled header should be 0");
5535 static_assert(offsetof(IsEnabled, cap) == 4,
5536 "offset of IsEnabled cap should be 4");
5537 static_assert(offsetof(IsEnabled, result_shm_id) == 8,
5538 "offset of IsEnabled result_shm_id should be 8");
5539 static_assert(offsetof(IsEnabled, result_shm_offset) == 12,
5540 "offset of IsEnabled result_shm_offset should be 12");
5542 struct IsFramebuffer {
5543 typedef IsFramebuffer ValueType;
5544 static const CommandId kCmdId = kIsFramebuffer;
5545 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5546 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5548 typedef uint32_t Result;
5550 static uint32_t ComputeSize() {
5551 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5554 void SetHeader() { header.SetCmd<ValueType>(); }
5556 void Init(GLuint _framebuffer,
5557 uint32_t _result_shm_id,
5558 uint32_t _result_shm_offset) {
5559 SetHeader();
5560 framebuffer = _framebuffer;
5561 result_shm_id = _result_shm_id;
5562 result_shm_offset = _result_shm_offset;
5565 void* Set(void* cmd,
5566 GLuint _framebuffer,
5567 uint32_t _result_shm_id,
5568 uint32_t _result_shm_offset) {
5569 static_cast<ValueType*>(cmd)
5570 ->Init(_framebuffer, _result_shm_id, _result_shm_offset);
5571 return NextCmdAddress<ValueType>(cmd);
5574 gpu::CommandHeader header;
5575 uint32_t framebuffer;
5576 uint32_t result_shm_id;
5577 uint32_t result_shm_offset;
5580 static_assert(sizeof(IsFramebuffer) == 16,
5581 "size of IsFramebuffer should be 16");
5582 static_assert(offsetof(IsFramebuffer, header) == 0,
5583 "offset of IsFramebuffer header should be 0");
5584 static_assert(offsetof(IsFramebuffer, framebuffer) == 4,
5585 "offset of IsFramebuffer framebuffer should be 4");
5586 static_assert(offsetof(IsFramebuffer, result_shm_id) == 8,
5587 "offset of IsFramebuffer result_shm_id should be 8");
5588 static_assert(offsetof(IsFramebuffer, result_shm_offset) == 12,
5589 "offset of IsFramebuffer result_shm_offset should be 12");
5591 struct IsProgram {
5592 typedef IsProgram ValueType;
5593 static const CommandId kCmdId = kIsProgram;
5594 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5597 typedef uint32_t Result;
5599 static uint32_t ComputeSize() {
5600 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5603 void SetHeader() { header.SetCmd<ValueType>(); }
5605 void Init(GLuint _program,
5606 uint32_t _result_shm_id,
5607 uint32_t _result_shm_offset) {
5608 SetHeader();
5609 program = _program;
5610 result_shm_id = _result_shm_id;
5611 result_shm_offset = _result_shm_offset;
5614 void* Set(void* cmd,
5615 GLuint _program,
5616 uint32_t _result_shm_id,
5617 uint32_t _result_shm_offset) {
5618 static_cast<ValueType*>(cmd)
5619 ->Init(_program, _result_shm_id, _result_shm_offset);
5620 return NextCmdAddress<ValueType>(cmd);
5623 gpu::CommandHeader header;
5624 uint32_t program;
5625 uint32_t result_shm_id;
5626 uint32_t result_shm_offset;
5629 static_assert(sizeof(IsProgram) == 16, "size of IsProgram should be 16");
5630 static_assert(offsetof(IsProgram, header) == 0,
5631 "offset of IsProgram header should be 0");
5632 static_assert(offsetof(IsProgram, program) == 4,
5633 "offset of IsProgram program should be 4");
5634 static_assert(offsetof(IsProgram, result_shm_id) == 8,
5635 "offset of IsProgram result_shm_id should be 8");
5636 static_assert(offsetof(IsProgram, result_shm_offset) == 12,
5637 "offset of IsProgram result_shm_offset should be 12");
5639 struct IsRenderbuffer {
5640 typedef IsRenderbuffer ValueType;
5641 static const CommandId kCmdId = kIsRenderbuffer;
5642 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5643 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5645 typedef uint32_t Result;
5647 static uint32_t ComputeSize() {
5648 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5651 void SetHeader() { header.SetCmd<ValueType>(); }
5653 void Init(GLuint _renderbuffer,
5654 uint32_t _result_shm_id,
5655 uint32_t _result_shm_offset) {
5656 SetHeader();
5657 renderbuffer = _renderbuffer;
5658 result_shm_id = _result_shm_id;
5659 result_shm_offset = _result_shm_offset;
5662 void* Set(void* cmd,
5663 GLuint _renderbuffer,
5664 uint32_t _result_shm_id,
5665 uint32_t _result_shm_offset) {
5666 static_cast<ValueType*>(cmd)
5667 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
5668 return NextCmdAddress<ValueType>(cmd);
5671 gpu::CommandHeader header;
5672 uint32_t renderbuffer;
5673 uint32_t result_shm_id;
5674 uint32_t result_shm_offset;
5677 static_assert(sizeof(IsRenderbuffer) == 16,
5678 "size of IsRenderbuffer should be 16");
5679 static_assert(offsetof(IsRenderbuffer, header) == 0,
5680 "offset of IsRenderbuffer header should be 0");
5681 static_assert(offsetof(IsRenderbuffer, renderbuffer) == 4,
5682 "offset of IsRenderbuffer renderbuffer should be 4");
5683 static_assert(offsetof(IsRenderbuffer, result_shm_id) == 8,
5684 "offset of IsRenderbuffer result_shm_id should be 8");
5685 static_assert(offsetof(IsRenderbuffer, result_shm_offset) == 12,
5686 "offset of IsRenderbuffer result_shm_offset should be 12");
5688 struct IsSampler {
5689 typedef IsSampler ValueType;
5690 static const CommandId kCmdId = kIsSampler;
5691 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5692 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5694 typedef uint32_t Result;
5696 static uint32_t ComputeSize() {
5697 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5700 void SetHeader() { header.SetCmd<ValueType>(); }
5702 void Init(GLuint _sampler,
5703 uint32_t _result_shm_id,
5704 uint32_t _result_shm_offset) {
5705 SetHeader();
5706 sampler = _sampler;
5707 result_shm_id = _result_shm_id;
5708 result_shm_offset = _result_shm_offset;
5711 void* Set(void* cmd,
5712 GLuint _sampler,
5713 uint32_t _result_shm_id,
5714 uint32_t _result_shm_offset) {
5715 static_cast<ValueType*>(cmd)
5716 ->Init(_sampler, _result_shm_id, _result_shm_offset);
5717 return NextCmdAddress<ValueType>(cmd);
5720 gpu::CommandHeader header;
5721 uint32_t sampler;
5722 uint32_t result_shm_id;
5723 uint32_t result_shm_offset;
5726 static_assert(sizeof(IsSampler) == 16, "size of IsSampler should be 16");
5727 static_assert(offsetof(IsSampler, header) == 0,
5728 "offset of IsSampler header should be 0");
5729 static_assert(offsetof(IsSampler, sampler) == 4,
5730 "offset of IsSampler sampler should be 4");
5731 static_assert(offsetof(IsSampler, result_shm_id) == 8,
5732 "offset of IsSampler result_shm_id should be 8");
5733 static_assert(offsetof(IsSampler, result_shm_offset) == 12,
5734 "offset of IsSampler result_shm_offset should be 12");
5736 struct IsShader {
5737 typedef IsShader ValueType;
5738 static const CommandId kCmdId = kIsShader;
5739 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5740 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5742 typedef uint32_t Result;
5744 static uint32_t ComputeSize() {
5745 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5748 void SetHeader() { header.SetCmd<ValueType>(); }
5750 void Init(GLuint _shader,
5751 uint32_t _result_shm_id,
5752 uint32_t _result_shm_offset) {
5753 SetHeader();
5754 shader = _shader;
5755 result_shm_id = _result_shm_id;
5756 result_shm_offset = _result_shm_offset;
5759 void* Set(void* cmd,
5760 GLuint _shader,
5761 uint32_t _result_shm_id,
5762 uint32_t _result_shm_offset) {
5763 static_cast<ValueType*>(cmd)
5764 ->Init(_shader, _result_shm_id, _result_shm_offset);
5765 return NextCmdAddress<ValueType>(cmd);
5768 gpu::CommandHeader header;
5769 uint32_t shader;
5770 uint32_t result_shm_id;
5771 uint32_t result_shm_offset;
5774 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16");
5775 static_assert(offsetof(IsShader, header) == 0,
5776 "offset of IsShader header should be 0");
5777 static_assert(offsetof(IsShader, shader) == 4,
5778 "offset of IsShader shader should be 4");
5779 static_assert(offsetof(IsShader, result_shm_id) == 8,
5780 "offset of IsShader result_shm_id should be 8");
5781 static_assert(offsetof(IsShader, result_shm_offset) == 12,
5782 "offset of IsShader result_shm_offset should be 12");
5784 struct IsSync {
5785 typedef IsSync ValueType;
5786 static const CommandId kCmdId = kIsSync;
5787 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5788 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5790 typedef uint32_t Result;
5792 static uint32_t ComputeSize() {
5793 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5796 void SetHeader() { header.SetCmd<ValueType>(); }
5798 void Init(GLuint _sync,
5799 uint32_t _result_shm_id,
5800 uint32_t _result_shm_offset) {
5801 SetHeader();
5802 sync = _sync;
5803 result_shm_id = _result_shm_id;
5804 result_shm_offset = _result_shm_offset;
5807 void* Set(void* cmd,
5808 GLuint _sync,
5809 uint32_t _result_shm_id,
5810 uint32_t _result_shm_offset) {
5811 static_cast<ValueType*>(cmd)
5812 ->Init(_sync, _result_shm_id, _result_shm_offset);
5813 return NextCmdAddress<ValueType>(cmd);
5816 gpu::CommandHeader header;
5817 uint32_t sync;
5818 uint32_t result_shm_id;
5819 uint32_t result_shm_offset;
5822 static_assert(sizeof(IsSync) == 16, "size of IsSync should be 16");
5823 static_assert(offsetof(IsSync, header) == 0,
5824 "offset of IsSync header should be 0");
5825 static_assert(offsetof(IsSync, sync) == 4, "offset of IsSync sync should be 4");
5826 static_assert(offsetof(IsSync, result_shm_id) == 8,
5827 "offset of IsSync result_shm_id should be 8");
5828 static_assert(offsetof(IsSync, result_shm_offset) == 12,
5829 "offset of IsSync result_shm_offset should be 12");
5831 struct IsTexture {
5832 typedef IsTexture ValueType;
5833 static const CommandId kCmdId = kIsTexture;
5834 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5835 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5837 typedef uint32_t Result;
5839 static uint32_t ComputeSize() {
5840 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5843 void SetHeader() { header.SetCmd<ValueType>(); }
5845 void Init(GLuint _texture,
5846 uint32_t _result_shm_id,
5847 uint32_t _result_shm_offset) {
5848 SetHeader();
5849 texture = _texture;
5850 result_shm_id = _result_shm_id;
5851 result_shm_offset = _result_shm_offset;
5854 void* Set(void* cmd,
5855 GLuint _texture,
5856 uint32_t _result_shm_id,
5857 uint32_t _result_shm_offset) {
5858 static_cast<ValueType*>(cmd)
5859 ->Init(_texture, _result_shm_id, _result_shm_offset);
5860 return NextCmdAddress<ValueType>(cmd);
5863 gpu::CommandHeader header;
5864 uint32_t texture;
5865 uint32_t result_shm_id;
5866 uint32_t result_shm_offset;
5869 static_assert(sizeof(IsTexture) == 16, "size of IsTexture should be 16");
5870 static_assert(offsetof(IsTexture, header) == 0,
5871 "offset of IsTexture header should be 0");
5872 static_assert(offsetof(IsTexture, texture) == 4,
5873 "offset of IsTexture texture should be 4");
5874 static_assert(offsetof(IsTexture, result_shm_id) == 8,
5875 "offset of IsTexture result_shm_id should be 8");
5876 static_assert(offsetof(IsTexture, result_shm_offset) == 12,
5877 "offset of IsTexture result_shm_offset should be 12");
5879 struct IsTransformFeedback {
5880 typedef IsTransformFeedback ValueType;
5881 static const CommandId kCmdId = kIsTransformFeedback;
5882 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5883 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5885 typedef uint32_t Result;
5887 static uint32_t ComputeSize() {
5888 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5891 void SetHeader() { header.SetCmd<ValueType>(); }
5893 void Init(GLuint _transformfeedback,
5894 uint32_t _result_shm_id,
5895 uint32_t _result_shm_offset) {
5896 SetHeader();
5897 transformfeedback = _transformfeedback;
5898 result_shm_id = _result_shm_id;
5899 result_shm_offset = _result_shm_offset;
5902 void* Set(void* cmd,
5903 GLuint _transformfeedback,
5904 uint32_t _result_shm_id,
5905 uint32_t _result_shm_offset) {
5906 static_cast<ValueType*>(cmd)
5907 ->Init(_transformfeedback, _result_shm_id, _result_shm_offset);
5908 return NextCmdAddress<ValueType>(cmd);
5911 gpu::CommandHeader header;
5912 uint32_t transformfeedback;
5913 uint32_t result_shm_id;
5914 uint32_t result_shm_offset;
5917 static_assert(sizeof(IsTransformFeedback) == 16,
5918 "size of IsTransformFeedback should be 16");
5919 static_assert(offsetof(IsTransformFeedback, header) == 0,
5920 "offset of IsTransformFeedback header should be 0");
5921 static_assert(offsetof(IsTransformFeedback, transformfeedback) == 4,
5922 "offset of IsTransformFeedback transformfeedback should be 4");
5923 static_assert(offsetof(IsTransformFeedback, result_shm_id) == 8,
5924 "offset of IsTransformFeedback result_shm_id should be 8");
5925 static_assert(offsetof(IsTransformFeedback, result_shm_offset) == 12,
5926 "offset of IsTransformFeedback result_shm_offset should be 12");
5928 struct LineWidth {
5929 typedef LineWidth ValueType;
5930 static const CommandId kCmdId = kLineWidth;
5931 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5932 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5934 static uint32_t ComputeSize() {
5935 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5938 void SetHeader() { header.SetCmd<ValueType>(); }
5940 void Init(GLfloat _width) {
5941 SetHeader();
5942 width = _width;
5945 void* Set(void* cmd, GLfloat _width) {
5946 static_cast<ValueType*>(cmd)->Init(_width);
5947 return NextCmdAddress<ValueType>(cmd);
5950 gpu::CommandHeader header;
5951 float width;
5954 static_assert(sizeof(LineWidth) == 8, "size of LineWidth should be 8");
5955 static_assert(offsetof(LineWidth, header) == 0,
5956 "offset of LineWidth header should be 0");
5957 static_assert(offsetof(LineWidth, width) == 4,
5958 "offset of LineWidth width should be 4");
5960 struct LinkProgram {
5961 typedef LinkProgram ValueType;
5962 static const CommandId kCmdId = kLinkProgram;
5963 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5964 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5966 static uint32_t ComputeSize() {
5967 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5970 void SetHeader() { header.SetCmd<ValueType>(); }
5972 void Init(GLuint _program) {
5973 SetHeader();
5974 program = _program;
5977 void* Set(void* cmd, GLuint _program) {
5978 static_cast<ValueType*>(cmd)->Init(_program);
5979 return NextCmdAddress<ValueType>(cmd);
5982 gpu::CommandHeader header;
5983 uint32_t program;
5986 static_assert(sizeof(LinkProgram) == 8, "size of LinkProgram should be 8");
5987 static_assert(offsetof(LinkProgram, header) == 0,
5988 "offset of LinkProgram header should be 0");
5989 static_assert(offsetof(LinkProgram, program) == 4,
5990 "offset of LinkProgram program should be 4");
5992 struct PauseTransformFeedback {
5993 typedef PauseTransformFeedback ValueType;
5994 static const CommandId kCmdId = kPauseTransformFeedback;
5995 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5996 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5998 static uint32_t ComputeSize() {
5999 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6002 void SetHeader() { header.SetCmd<ValueType>(); }
6004 void Init() { SetHeader(); }
6006 void* Set(void* cmd) {
6007 static_cast<ValueType*>(cmd)->Init();
6008 return NextCmdAddress<ValueType>(cmd);
6011 gpu::CommandHeader header;
6014 static_assert(sizeof(PauseTransformFeedback) == 4,
6015 "size of PauseTransformFeedback should be 4");
6016 static_assert(offsetof(PauseTransformFeedback, header) == 0,
6017 "offset of PauseTransformFeedback header should be 0");
6019 struct PixelStorei {
6020 typedef PixelStorei ValueType;
6021 static const CommandId kCmdId = kPixelStorei;
6022 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6023 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6025 static uint32_t ComputeSize() {
6026 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6029 void SetHeader() { header.SetCmd<ValueType>(); }
6031 void Init(GLenum _pname, GLint _param) {
6032 SetHeader();
6033 pname = _pname;
6034 param = _param;
6037 void* Set(void* cmd, GLenum _pname, GLint _param) {
6038 static_cast<ValueType*>(cmd)->Init(_pname, _param);
6039 return NextCmdAddress<ValueType>(cmd);
6042 gpu::CommandHeader header;
6043 uint32_t pname;
6044 int32_t param;
6047 static_assert(sizeof(PixelStorei) == 12, "size of PixelStorei should be 12");
6048 static_assert(offsetof(PixelStorei, header) == 0,
6049 "offset of PixelStorei header should be 0");
6050 static_assert(offsetof(PixelStorei, pname) == 4,
6051 "offset of PixelStorei pname should be 4");
6052 static_assert(offsetof(PixelStorei, param) == 8,
6053 "offset of PixelStorei param should be 8");
6055 struct PolygonOffset {
6056 typedef PolygonOffset ValueType;
6057 static const CommandId kCmdId = kPolygonOffset;
6058 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6059 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6061 static uint32_t ComputeSize() {
6062 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6065 void SetHeader() { header.SetCmd<ValueType>(); }
6067 void Init(GLfloat _factor, GLfloat _units) {
6068 SetHeader();
6069 factor = _factor;
6070 units = _units;
6073 void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
6074 static_cast<ValueType*>(cmd)->Init(_factor, _units);
6075 return NextCmdAddress<ValueType>(cmd);
6078 gpu::CommandHeader header;
6079 float factor;
6080 float units;
6083 static_assert(sizeof(PolygonOffset) == 12,
6084 "size of PolygonOffset should be 12");
6085 static_assert(offsetof(PolygonOffset, header) == 0,
6086 "offset of PolygonOffset header should be 0");
6087 static_assert(offsetof(PolygonOffset, factor) == 4,
6088 "offset of PolygonOffset factor should be 4");
6089 static_assert(offsetof(PolygonOffset, units) == 8,
6090 "offset of PolygonOffset units should be 8");
6092 struct ReadBuffer {
6093 typedef ReadBuffer ValueType;
6094 static const CommandId kCmdId = kReadBuffer;
6095 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6096 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6098 static uint32_t ComputeSize() {
6099 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6102 void SetHeader() { header.SetCmd<ValueType>(); }
6104 void Init(GLenum _src) {
6105 SetHeader();
6106 src = _src;
6109 void* Set(void* cmd, GLenum _src) {
6110 static_cast<ValueType*>(cmd)->Init(_src);
6111 return NextCmdAddress<ValueType>(cmd);
6114 gpu::CommandHeader header;
6115 uint32_t src;
6118 static_assert(sizeof(ReadBuffer) == 8, "size of ReadBuffer should be 8");
6119 static_assert(offsetof(ReadBuffer, header) == 0,
6120 "offset of ReadBuffer header should be 0");
6121 static_assert(offsetof(ReadBuffer, src) == 4,
6122 "offset of ReadBuffer src should be 4");
6124 // ReadPixels has the result separated from the pixel buffer so that
6125 // it is easier to specify the result going to some specific place
6126 // that exactly fits the rectangle of pixels.
6127 struct ReadPixels {
6128 typedef ReadPixels ValueType;
6129 static const CommandId kCmdId = kReadPixels;
6130 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6131 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6133 typedef uint32_t Result;
6135 static uint32_t ComputeSize() {
6136 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6139 void SetHeader() { header.SetCmd<ValueType>(); }
6141 void Init(GLint _x,
6142 GLint _y,
6143 GLsizei _width,
6144 GLsizei _height,
6145 GLenum _format,
6146 GLenum _type,
6147 uint32_t _pixels_shm_id,
6148 uint32_t _pixels_shm_offset,
6149 uint32_t _result_shm_id,
6150 uint32_t _result_shm_offset,
6151 GLboolean _async) {
6152 SetHeader();
6153 x = _x;
6154 y = _y;
6155 width = _width;
6156 height = _height;
6157 format = _format;
6158 type = _type;
6159 pixels_shm_id = _pixels_shm_id;
6160 pixels_shm_offset = _pixels_shm_offset;
6161 result_shm_id = _result_shm_id;
6162 result_shm_offset = _result_shm_offset;
6163 async = _async;
6166 void* Set(void* cmd,
6167 GLint _x,
6168 GLint _y,
6169 GLsizei _width,
6170 GLsizei _height,
6171 GLenum _format,
6172 GLenum _type,
6173 uint32_t _pixels_shm_id,
6174 uint32_t _pixels_shm_offset,
6175 uint32_t _result_shm_id,
6176 uint32_t _result_shm_offset,
6177 GLboolean _async) {
6178 static_cast<ValueType*>(cmd)
6179 ->Init(_x, _y, _width, _height, _format, _type, _pixels_shm_id,
6180 _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
6181 return NextCmdAddress<ValueType>(cmd);
6184 gpu::CommandHeader header;
6185 int32_t x;
6186 int32_t y;
6187 int32_t width;
6188 int32_t height;
6189 uint32_t format;
6190 uint32_t type;
6191 uint32_t pixels_shm_id;
6192 uint32_t pixels_shm_offset;
6193 uint32_t result_shm_id;
6194 uint32_t result_shm_offset;
6195 uint32_t async;
6198 static_assert(sizeof(ReadPixels) == 48, "size of ReadPixels should be 48");
6199 static_assert(offsetof(ReadPixels, header) == 0,
6200 "offset of ReadPixels header should be 0");
6201 static_assert(offsetof(ReadPixels, x) == 4,
6202 "offset of ReadPixels x should be 4");
6203 static_assert(offsetof(ReadPixels, y) == 8,
6204 "offset of ReadPixels y should be 8");
6205 static_assert(offsetof(ReadPixels, width) == 12,
6206 "offset of ReadPixels width should be 12");
6207 static_assert(offsetof(ReadPixels, height) == 16,
6208 "offset of ReadPixels height should be 16");
6209 static_assert(offsetof(ReadPixels, format) == 20,
6210 "offset of ReadPixels format should be 20");
6211 static_assert(offsetof(ReadPixels, type) == 24,
6212 "offset of ReadPixels type should be 24");
6213 static_assert(offsetof(ReadPixels, pixels_shm_id) == 28,
6214 "offset of ReadPixels pixels_shm_id should be 28");
6215 static_assert(offsetof(ReadPixels, pixels_shm_offset) == 32,
6216 "offset of ReadPixels pixels_shm_offset should be 32");
6217 static_assert(offsetof(ReadPixels, result_shm_id) == 36,
6218 "offset of ReadPixels result_shm_id should be 36");
6219 static_assert(offsetof(ReadPixels, result_shm_offset) == 40,
6220 "offset of ReadPixels result_shm_offset should be 40");
6221 static_assert(offsetof(ReadPixels, async) == 44,
6222 "offset of ReadPixels async should be 44");
6224 struct ReleaseShaderCompiler {
6225 typedef ReleaseShaderCompiler ValueType;
6226 static const CommandId kCmdId = kReleaseShaderCompiler;
6227 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6228 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6230 static uint32_t ComputeSize() {
6231 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6234 void SetHeader() { header.SetCmd<ValueType>(); }
6236 void Init() { SetHeader(); }
6238 void* Set(void* cmd) {
6239 static_cast<ValueType*>(cmd)->Init();
6240 return NextCmdAddress<ValueType>(cmd);
6243 gpu::CommandHeader header;
6246 static_assert(sizeof(ReleaseShaderCompiler) == 4,
6247 "size of ReleaseShaderCompiler should be 4");
6248 static_assert(offsetof(ReleaseShaderCompiler, header) == 0,
6249 "offset of ReleaseShaderCompiler header should be 0");
6251 struct RenderbufferStorage {
6252 typedef RenderbufferStorage ValueType;
6253 static const CommandId kCmdId = kRenderbufferStorage;
6254 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6255 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6257 static uint32_t ComputeSize() {
6258 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6261 void SetHeader() { header.SetCmd<ValueType>(); }
6263 void Init(GLenum _target,
6264 GLenum _internalformat,
6265 GLsizei _width,
6266 GLsizei _height) {
6267 SetHeader();
6268 target = _target;
6269 internalformat = _internalformat;
6270 width = _width;
6271 height = _height;
6274 void* Set(void* cmd,
6275 GLenum _target,
6276 GLenum _internalformat,
6277 GLsizei _width,
6278 GLsizei _height) {
6279 static_cast<ValueType*>(cmd)
6280 ->Init(_target, _internalformat, _width, _height);
6281 return NextCmdAddress<ValueType>(cmd);
6284 gpu::CommandHeader header;
6285 uint32_t target;
6286 uint32_t internalformat;
6287 int32_t width;
6288 int32_t height;
6291 static_assert(sizeof(RenderbufferStorage) == 20,
6292 "size of RenderbufferStorage should be 20");
6293 static_assert(offsetof(RenderbufferStorage, header) == 0,
6294 "offset of RenderbufferStorage header should be 0");
6295 static_assert(offsetof(RenderbufferStorage, target) == 4,
6296 "offset of RenderbufferStorage target should be 4");
6297 static_assert(offsetof(RenderbufferStorage, internalformat) == 8,
6298 "offset of RenderbufferStorage internalformat should be 8");
6299 static_assert(offsetof(RenderbufferStorage, width) == 12,
6300 "offset of RenderbufferStorage width should be 12");
6301 static_assert(offsetof(RenderbufferStorage, height) == 16,
6302 "offset of RenderbufferStorage height should be 16");
6304 struct ResumeTransformFeedback {
6305 typedef ResumeTransformFeedback ValueType;
6306 static const CommandId kCmdId = kResumeTransformFeedback;
6307 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6308 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6310 static uint32_t ComputeSize() {
6311 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6314 void SetHeader() { header.SetCmd<ValueType>(); }
6316 void Init() { SetHeader(); }
6318 void* Set(void* cmd) {
6319 static_cast<ValueType*>(cmd)->Init();
6320 return NextCmdAddress<ValueType>(cmd);
6323 gpu::CommandHeader header;
6326 static_assert(sizeof(ResumeTransformFeedback) == 4,
6327 "size of ResumeTransformFeedback should be 4");
6328 static_assert(offsetof(ResumeTransformFeedback, header) == 0,
6329 "offset of ResumeTransformFeedback header should be 0");
6331 struct SampleCoverage {
6332 typedef SampleCoverage ValueType;
6333 static const CommandId kCmdId = kSampleCoverage;
6334 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6335 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6337 static uint32_t ComputeSize() {
6338 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6341 void SetHeader() { header.SetCmd<ValueType>(); }
6343 void Init(GLclampf _value, GLboolean _invert) {
6344 SetHeader();
6345 value = _value;
6346 invert = _invert;
6349 void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
6350 static_cast<ValueType*>(cmd)->Init(_value, _invert);
6351 return NextCmdAddress<ValueType>(cmd);
6354 gpu::CommandHeader header;
6355 float value;
6356 uint32_t invert;
6359 static_assert(sizeof(SampleCoverage) == 12,
6360 "size of SampleCoverage should be 12");
6361 static_assert(offsetof(SampleCoverage, header) == 0,
6362 "offset of SampleCoverage header should be 0");
6363 static_assert(offsetof(SampleCoverage, value) == 4,
6364 "offset of SampleCoverage value should be 4");
6365 static_assert(offsetof(SampleCoverage, invert) == 8,
6366 "offset of SampleCoverage invert should be 8");
6368 struct SamplerParameterf {
6369 typedef SamplerParameterf ValueType;
6370 static const CommandId kCmdId = kSamplerParameterf;
6371 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6372 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6374 static uint32_t ComputeSize() {
6375 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6378 void SetHeader() { header.SetCmd<ValueType>(); }
6380 void Init(GLuint _sampler, GLenum _pname, GLfloat _param) {
6381 SetHeader();
6382 sampler = _sampler;
6383 pname = _pname;
6384 param = _param;
6387 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLfloat _param) {
6388 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
6389 return NextCmdAddress<ValueType>(cmd);
6392 gpu::CommandHeader header;
6393 uint32_t sampler;
6394 uint32_t pname;
6395 float param;
6398 static_assert(sizeof(SamplerParameterf) == 16,
6399 "size of SamplerParameterf should be 16");
6400 static_assert(offsetof(SamplerParameterf, header) == 0,
6401 "offset of SamplerParameterf header should be 0");
6402 static_assert(offsetof(SamplerParameterf, sampler) == 4,
6403 "offset of SamplerParameterf sampler should be 4");
6404 static_assert(offsetof(SamplerParameterf, pname) == 8,
6405 "offset of SamplerParameterf pname should be 8");
6406 static_assert(offsetof(SamplerParameterf, param) == 12,
6407 "offset of SamplerParameterf param should be 12");
6409 struct SamplerParameterfvImmediate {
6410 typedef SamplerParameterfvImmediate ValueType;
6411 static const CommandId kCmdId = kSamplerParameterfvImmediate;
6412 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6413 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6415 static uint32_t ComputeDataSize() {
6416 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
6419 static uint32_t ComputeSize() {
6420 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
6423 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6425 void Init(GLuint _sampler, GLenum _pname, const GLfloat* _params) {
6426 SetHeader();
6427 sampler = _sampler;
6428 pname = _pname;
6429 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
6432 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLfloat* _params) {
6433 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
6434 const uint32_t size = ComputeSize();
6435 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6438 gpu::CommandHeader header;
6439 uint32_t sampler;
6440 uint32_t pname;
6443 static_assert(sizeof(SamplerParameterfvImmediate) == 12,
6444 "size of SamplerParameterfvImmediate should be 12");
6445 static_assert(offsetof(SamplerParameterfvImmediate, header) == 0,
6446 "offset of SamplerParameterfvImmediate header should be 0");
6447 static_assert(offsetof(SamplerParameterfvImmediate, sampler) == 4,
6448 "offset of SamplerParameterfvImmediate sampler should be 4");
6449 static_assert(offsetof(SamplerParameterfvImmediate, pname) == 8,
6450 "offset of SamplerParameterfvImmediate pname should be 8");
6452 struct SamplerParameteri {
6453 typedef SamplerParameteri ValueType;
6454 static const CommandId kCmdId = kSamplerParameteri;
6455 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6456 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6458 static uint32_t ComputeSize() {
6459 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6462 void SetHeader() { header.SetCmd<ValueType>(); }
6464 void Init(GLuint _sampler, GLenum _pname, GLint _param) {
6465 SetHeader();
6466 sampler = _sampler;
6467 pname = _pname;
6468 param = _param;
6471 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLint _param) {
6472 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param);
6473 return NextCmdAddress<ValueType>(cmd);
6476 gpu::CommandHeader header;
6477 uint32_t sampler;
6478 uint32_t pname;
6479 int32_t param;
6482 static_assert(sizeof(SamplerParameteri) == 16,
6483 "size of SamplerParameteri should be 16");
6484 static_assert(offsetof(SamplerParameteri, header) == 0,
6485 "offset of SamplerParameteri header should be 0");
6486 static_assert(offsetof(SamplerParameteri, sampler) == 4,
6487 "offset of SamplerParameteri sampler should be 4");
6488 static_assert(offsetof(SamplerParameteri, pname) == 8,
6489 "offset of SamplerParameteri pname should be 8");
6490 static_assert(offsetof(SamplerParameteri, param) == 12,
6491 "offset of SamplerParameteri param should be 12");
6493 struct SamplerParameterivImmediate {
6494 typedef SamplerParameterivImmediate ValueType;
6495 static const CommandId kCmdId = kSamplerParameterivImmediate;
6496 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
6497 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6499 static uint32_t ComputeDataSize() {
6500 return static_cast<uint32_t>(sizeof(GLint) * 1);
6503 static uint32_t ComputeSize() {
6504 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
6507 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
6509 void Init(GLuint _sampler, GLenum _pname, const GLint* _params) {
6510 SetHeader();
6511 sampler = _sampler;
6512 pname = _pname;
6513 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
6516 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLint* _params) {
6517 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params);
6518 const uint32_t size = ComputeSize();
6519 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
6522 gpu::CommandHeader header;
6523 uint32_t sampler;
6524 uint32_t pname;
6527 static_assert(sizeof(SamplerParameterivImmediate) == 12,
6528 "size of SamplerParameterivImmediate should be 12");
6529 static_assert(offsetof(SamplerParameterivImmediate, header) == 0,
6530 "offset of SamplerParameterivImmediate header should be 0");
6531 static_assert(offsetof(SamplerParameterivImmediate, sampler) == 4,
6532 "offset of SamplerParameterivImmediate sampler should be 4");
6533 static_assert(offsetof(SamplerParameterivImmediate, pname) == 8,
6534 "offset of SamplerParameterivImmediate pname should be 8");
6536 struct Scissor {
6537 typedef Scissor ValueType;
6538 static const CommandId kCmdId = kScissor;
6539 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6540 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6542 static uint32_t ComputeSize() {
6543 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6546 void SetHeader() { header.SetCmd<ValueType>(); }
6548 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
6549 SetHeader();
6550 x = _x;
6551 y = _y;
6552 width = _width;
6553 height = _height;
6556 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
6557 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
6558 return NextCmdAddress<ValueType>(cmd);
6561 gpu::CommandHeader header;
6562 int32_t x;
6563 int32_t y;
6564 int32_t width;
6565 int32_t height;
6568 static_assert(sizeof(Scissor) == 20, "size of Scissor should be 20");
6569 static_assert(offsetof(Scissor, header) == 0,
6570 "offset of Scissor header should be 0");
6571 static_assert(offsetof(Scissor, x) == 4, "offset of Scissor x should be 4");
6572 static_assert(offsetof(Scissor, y) == 8, "offset of Scissor y should be 8");
6573 static_assert(offsetof(Scissor, width) == 12,
6574 "offset of Scissor width should be 12");
6575 static_assert(offsetof(Scissor, height) == 16,
6576 "offset of Scissor height should be 16");
6578 struct ShaderBinary {
6579 typedef ShaderBinary ValueType;
6580 static const CommandId kCmdId = kShaderBinary;
6581 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6582 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6584 static uint32_t ComputeSize() {
6585 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6588 void SetHeader() { header.SetCmd<ValueType>(); }
6590 void Init(GLsizei _n,
6591 uint32_t _shaders_shm_id,
6592 uint32_t _shaders_shm_offset,
6593 GLenum _binaryformat,
6594 uint32_t _binary_shm_id,
6595 uint32_t _binary_shm_offset,
6596 GLsizei _length) {
6597 SetHeader();
6598 n = _n;
6599 shaders_shm_id = _shaders_shm_id;
6600 shaders_shm_offset = _shaders_shm_offset;
6601 binaryformat = _binaryformat;
6602 binary_shm_id = _binary_shm_id;
6603 binary_shm_offset = _binary_shm_offset;
6604 length = _length;
6607 void* Set(void* cmd,
6608 GLsizei _n,
6609 uint32_t _shaders_shm_id,
6610 uint32_t _shaders_shm_offset,
6611 GLenum _binaryformat,
6612 uint32_t _binary_shm_id,
6613 uint32_t _binary_shm_offset,
6614 GLsizei _length) {
6615 static_cast<ValueType*>(cmd)->Init(_n, _shaders_shm_id, _shaders_shm_offset,
6616 _binaryformat, _binary_shm_id,
6617 _binary_shm_offset, _length);
6618 return NextCmdAddress<ValueType>(cmd);
6621 gpu::CommandHeader header;
6622 int32_t n;
6623 uint32_t shaders_shm_id;
6624 uint32_t shaders_shm_offset;
6625 uint32_t binaryformat;
6626 uint32_t binary_shm_id;
6627 uint32_t binary_shm_offset;
6628 int32_t length;
6631 static_assert(sizeof(ShaderBinary) == 32, "size of ShaderBinary should be 32");
6632 static_assert(offsetof(ShaderBinary, header) == 0,
6633 "offset of ShaderBinary header should be 0");
6634 static_assert(offsetof(ShaderBinary, n) == 4,
6635 "offset of ShaderBinary n should be 4");
6636 static_assert(offsetof(ShaderBinary, shaders_shm_id) == 8,
6637 "offset of ShaderBinary shaders_shm_id should be 8");
6638 static_assert(offsetof(ShaderBinary, shaders_shm_offset) == 12,
6639 "offset of ShaderBinary shaders_shm_offset should be 12");
6640 static_assert(offsetof(ShaderBinary, binaryformat) == 16,
6641 "offset of ShaderBinary binaryformat should be 16");
6642 static_assert(offsetof(ShaderBinary, binary_shm_id) == 20,
6643 "offset of ShaderBinary binary_shm_id should be 20");
6644 static_assert(offsetof(ShaderBinary, binary_shm_offset) == 24,
6645 "offset of ShaderBinary binary_shm_offset should be 24");
6646 static_assert(offsetof(ShaderBinary, length) == 28,
6647 "offset of ShaderBinary length should be 28");
6649 struct ShaderSourceBucket {
6650 typedef ShaderSourceBucket ValueType;
6651 static const CommandId kCmdId = kShaderSourceBucket;
6652 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6653 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6655 static uint32_t ComputeSize() {
6656 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6659 void SetHeader() { header.SetCmd<ValueType>(); }
6661 void Init(GLuint _shader, uint32_t _str_bucket_id) {
6662 SetHeader();
6663 shader = _shader;
6664 str_bucket_id = _str_bucket_id;
6667 void* Set(void* cmd, GLuint _shader, uint32_t _str_bucket_id) {
6668 static_cast<ValueType*>(cmd)->Init(_shader, _str_bucket_id);
6669 return NextCmdAddress<ValueType>(cmd);
6672 gpu::CommandHeader header;
6673 uint32_t shader;
6674 uint32_t str_bucket_id;
6677 static_assert(sizeof(ShaderSourceBucket) == 12,
6678 "size of ShaderSourceBucket should be 12");
6679 static_assert(offsetof(ShaderSourceBucket, header) == 0,
6680 "offset of ShaderSourceBucket header should be 0");
6681 static_assert(offsetof(ShaderSourceBucket, shader) == 4,
6682 "offset of ShaderSourceBucket shader should be 4");
6683 static_assert(offsetof(ShaderSourceBucket, str_bucket_id) == 8,
6684 "offset of ShaderSourceBucket str_bucket_id should be 8");
6686 struct StencilFunc {
6687 typedef StencilFunc ValueType;
6688 static const CommandId kCmdId = kStencilFunc;
6689 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6690 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6692 static uint32_t ComputeSize() {
6693 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6696 void SetHeader() { header.SetCmd<ValueType>(); }
6698 void Init(GLenum _func, GLint _ref, GLuint _mask) {
6699 SetHeader();
6700 func = _func;
6701 ref = _ref;
6702 mask = _mask;
6705 void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
6706 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
6707 return NextCmdAddress<ValueType>(cmd);
6710 gpu::CommandHeader header;
6711 uint32_t func;
6712 int32_t ref;
6713 uint32_t mask;
6716 static_assert(sizeof(StencilFunc) == 16, "size of StencilFunc should be 16");
6717 static_assert(offsetof(StencilFunc, header) == 0,
6718 "offset of StencilFunc header should be 0");
6719 static_assert(offsetof(StencilFunc, func) == 4,
6720 "offset of StencilFunc func should be 4");
6721 static_assert(offsetof(StencilFunc, ref) == 8,
6722 "offset of StencilFunc ref should be 8");
6723 static_assert(offsetof(StencilFunc, mask) == 12,
6724 "offset of StencilFunc mask should be 12");
6726 struct StencilFuncSeparate {
6727 typedef StencilFuncSeparate ValueType;
6728 static const CommandId kCmdId = kStencilFuncSeparate;
6729 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6730 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6732 static uint32_t ComputeSize() {
6733 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6736 void SetHeader() { header.SetCmd<ValueType>(); }
6738 void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
6739 SetHeader();
6740 face = _face;
6741 func = _func;
6742 ref = _ref;
6743 mask = _mask;
6746 void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
6747 static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
6748 return NextCmdAddress<ValueType>(cmd);
6751 gpu::CommandHeader header;
6752 uint32_t face;
6753 uint32_t func;
6754 int32_t ref;
6755 uint32_t mask;
6758 static_assert(sizeof(StencilFuncSeparate) == 20,
6759 "size of StencilFuncSeparate should be 20");
6760 static_assert(offsetof(StencilFuncSeparate, header) == 0,
6761 "offset of StencilFuncSeparate header should be 0");
6762 static_assert(offsetof(StencilFuncSeparate, face) == 4,
6763 "offset of StencilFuncSeparate face should be 4");
6764 static_assert(offsetof(StencilFuncSeparate, func) == 8,
6765 "offset of StencilFuncSeparate func should be 8");
6766 static_assert(offsetof(StencilFuncSeparate, ref) == 12,
6767 "offset of StencilFuncSeparate ref should be 12");
6768 static_assert(offsetof(StencilFuncSeparate, mask) == 16,
6769 "offset of StencilFuncSeparate mask should be 16");
6771 struct StencilMask {
6772 typedef StencilMask ValueType;
6773 static const CommandId kCmdId = kStencilMask;
6774 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6775 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6777 static uint32_t ComputeSize() {
6778 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6781 void SetHeader() { header.SetCmd<ValueType>(); }
6783 void Init(GLuint _mask) {
6784 SetHeader();
6785 mask = _mask;
6788 void* Set(void* cmd, GLuint _mask) {
6789 static_cast<ValueType*>(cmd)->Init(_mask);
6790 return NextCmdAddress<ValueType>(cmd);
6793 gpu::CommandHeader header;
6794 uint32_t mask;
6797 static_assert(sizeof(StencilMask) == 8, "size of StencilMask should be 8");
6798 static_assert(offsetof(StencilMask, header) == 0,
6799 "offset of StencilMask header should be 0");
6800 static_assert(offsetof(StencilMask, mask) == 4,
6801 "offset of StencilMask mask should be 4");
6803 struct StencilMaskSeparate {
6804 typedef StencilMaskSeparate ValueType;
6805 static const CommandId kCmdId = kStencilMaskSeparate;
6806 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6807 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6809 static uint32_t ComputeSize() {
6810 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6813 void SetHeader() { header.SetCmd<ValueType>(); }
6815 void Init(GLenum _face, GLuint _mask) {
6816 SetHeader();
6817 face = _face;
6818 mask = _mask;
6821 void* Set(void* cmd, GLenum _face, GLuint _mask) {
6822 static_cast<ValueType*>(cmd)->Init(_face, _mask);
6823 return NextCmdAddress<ValueType>(cmd);
6826 gpu::CommandHeader header;
6827 uint32_t face;
6828 uint32_t mask;
6831 static_assert(sizeof(StencilMaskSeparate) == 12,
6832 "size of StencilMaskSeparate should be 12");
6833 static_assert(offsetof(StencilMaskSeparate, header) == 0,
6834 "offset of StencilMaskSeparate header should be 0");
6835 static_assert(offsetof(StencilMaskSeparate, face) == 4,
6836 "offset of StencilMaskSeparate face should be 4");
6837 static_assert(offsetof(StencilMaskSeparate, mask) == 8,
6838 "offset of StencilMaskSeparate mask should be 8");
6840 struct StencilOp {
6841 typedef StencilOp ValueType;
6842 static const CommandId kCmdId = kStencilOp;
6843 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6844 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6846 static uint32_t ComputeSize() {
6847 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6850 void SetHeader() { header.SetCmd<ValueType>(); }
6852 void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
6853 SetHeader();
6854 fail = _fail;
6855 zfail = _zfail;
6856 zpass = _zpass;
6859 void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
6860 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
6861 return NextCmdAddress<ValueType>(cmd);
6864 gpu::CommandHeader header;
6865 uint32_t fail;
6866 uint32_t zfail;
6867 uint32_t zpass;
6870 static_assert(sizeof(StencilOp) == 16, "size of StencilOp should be 16");
6871 static_assert(offsetof(StencilOp, header) == 0,
6872 "offset of StencilOp header should be 0");
6873 static_assert(offsetof(StencilOp, fail) == 4,
6874 "offset of StencilOp fail should be 4");
6875 static_assert(offsetof(StencilOp, zfail) == 8,
6876 "offset of StencilOp zfail should be 8");
6877 static_assert(offsetof(StencilOp, zpass) == 12,
6878 "offset of StencilOp zpass should be 12");
6880 struct StencilOpSeparate {
6881 typedef StencilOpSeparate ValueType;
6882 static const CommandId kCmdId = kStencilOpSeparate;
6883 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6884 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6886 static uint32_t ComputeSize() {
6887 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6890 void SetHeader() { header.SetCmd<ValueType>(); }
6892 void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
6893 SetHeader();
6894 face = _face;
6895 fail = _fail;
6896 zfail = _zfail;
6897 zpass = _zpass;
6900 void* Set(void* cmd,
6901 GLenum _face,
6902 GLenum _fail,
6903 GLenum _zfail,
6904 GLenum _zpass) {
6905 static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
6906 return NextCmdAddress<ValueType>(cmd);
6909 gpu::CommandHeader header;
6910 uint32_t face;
6911 uint32_t fail;
6912 uint32_t zfail;
6913 uint32_t zpass;
6916 static_assert(sizeof(StencilOpSeparate) == 20,
6917 "size of StencilOpSeparate should be 20");
6918 static_assert(offsetof(StencilOpSeparate, header) == 0,
6919 "offset of StencilOpSeparate header should be 0");
6920 static_assert(offsetof(StencilOpSeparate, face) == 4,
6921 "offset of StencilOpSeparate face should be 4");
6922 static_assert(offsetof(StencilOpSeparate, fail) == 8,
6923 "offset of StencilOpSeparate fail should be 8");
6924 static_assert(offsetof(StencilOpSeparate, zfail) == 12,
6925 "offset of StencilOpSeparate zfail should be 12");
6926 static_assert(offsetof(StencilOpSeparate, zpass) == 16,
6927 "offset of StencilOpSeparate zpass should be 16");
6929 struct TexImage2D {
6930 typedef TexImage2D ValueType;
6931 static const CommandId kCmdId = kTexImage2D;
6932 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6933 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6935 static uint32_t ComputeSize() {
6936 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6939 void SetHeader() { header.SetCmd<ValueType>(); }
6941 void Init(GLenum _target,
6942 GLint _level,
6943 GLint _internalformat,
6944 GLsizei _width,
6945 GLsizei _height,
6946 GLenum _format,
6947 GLenum _type,
6948 uint32_t _pixels_shm_id,
6949 uint32_t _pixels_shm_offset) {
6950 SetHeader();
6951 target = _target;
6952 level = _level;
6953 internalformat = _internalformat;
6954 width = _width;
6955 height = _height;
6956 format = _format;
6957 type = _type;
6958 pixels_shm_id = _pixels_shm_id;
6959 pixels_shm_offset = _pixels_shm_offset;
6962 void* Set(void* cmd,
6963 GLenum _target,
6964 GLint _level,
6965 GLint _internalformat,
6966 GLsizei _width,
6967 GLsizei _height,
6968 GLenum _format,
6969 GLenum _type,
6970 uint32_t _pixels_shm_id,
6971 uint32_t _pixels_shm_offset) {
6972 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
6973 _height, _format, _type, _pixels_shm_id,
6974 _pixels_shm_offset);
6975 return NextCmdAddress<ValueType>(cmd);
6978 gpu::CommandHeader header;
6979 uint32_t target;
6980 int32_t level;
6981 int32_t internalformat;
6982 int32_t width;
6983 int32_t height;
6984 uint32_t format;
6985 uint32_t type;
6986 uint32_t pixels_shm_id;
6987 uint32_t pixels_shm_offset;
6988 static const int32_t border = 0;
6991 static_assert(sizeof(TexImage2D) == 40, "size of TexImage2D should be 40");
6992 static_assert(offsetof(TexImage2D, header) == 0,
6993 "offset of TexImage2D header should be 0");
6994 static_assert(offsetof(TexImage2D, target) == 4,
6995 "offset of TexImage2D target should be 4");
6996 static_assert(offsetof(TexImage2D, level) == 8,
6997 "offset of TexImage2D level should be 8");
6998 static_assert(offsetof(TexImage2D, internalformat) == 12,
6999 "offset of TexImage2D internalformat should be 12");
7000 static_assert(offsetof(TexImage2D, width) == 16,
7001 "offset of TexImage2D width should be 16");
7002 static_assert(offsetof(TexImage2D, height) == 20,
7003 "offset of TexImage2D height should be 20");
7004 static_assert(offsetof(TexImage2D, format) == 24,
7005 "offset of TexImage2D format should be 24");
7006 static_assert(offsetof(TexImage2D, type) == 28,
7007 "offset of TexImage2D type should be 28");
7008 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32,
7009 "offset of TexImage2D pixels_shm_id should be 32");
7010 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36,
7011 "offset of TexImage2D pixels_shm_offset should be 36");
7013 struct TexImage3D {
7014 typedef TexImage3D ValueType;
7015 static const CommandId kCmdId = kTexImage3D;
7016 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7017 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7019 static uint32_t ComputeSize() {
7020 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7023 void SetHeader() { header.SetCmd<ValueType>(); }
7025 void Init(GLenum _target,
7026 GLint _level,
7027 GLint _internalformat,
7028 GLsizei _width,
7029 GLsizei _height,
7030 GLsizei _depth,
7031 GLenum _format,
7032 GLenum _type,
7033 uint32_t _pixels_shm_id,
7034 uint32_t _pixels_shm_offset) {
7035 SetHeader();
7036 target = _target;
7037 level = _level;
7038 internalformat = _internalformat;
7039 width = _width;
7040 height = _height;
7041 depth = _depth;
7042 format = _format;
7043 type = _type;
7044 pixels_shm_id = _pixels_shm_id;
7045 pixels_shm_offset = _pixels_shm_offset;
7048 void* Set(void* cmd,
7049 GLenum _target,
7050 GLint _level,
7051 GLint _internalformat,
7052 GLsizei _width,
7053 GLsizei _height,
7054 GLsizei _depth,
7055 GLenum _format,
7056 GLenum _type,
7057 uint32_t _pixels_shm_id,
7058 uint32_t _pixels_shm_offset) {
7059 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
7060 _height, _depth, _format, _type,
7061 _pixels_shm_id, _pixels_shm_offset);
7062 return NextCmdAddress<ValueType>(cmd);
7065 gpu::CommandHeader header;
7066 uint32_t target;
7067 int32_t level;
7068 int32_t internalformat;
7069 int32_t width;
7070 int32_t height;
7071 int32_t depth;
7072 uint32_t format;
7073 uint32_t type;
7074 uint32_t pixels_shm_id;
7075 uint32_t pixels_shm_offset;
7076 static const int32_t border = 0;
7079 static_assert(sizeof(TexImage3D) == 44, "size of TexImage3D should be 44");
7080 static_assert(offsetof(TexImage3D, header) == 0,
7081 "offset of TexImage3D header should be 0");
7082 static_assert(offsetof(TexImage3D, target) == 4,
7083 "offset of TexImage3D target should be 4");
7084 static_assert(offsetof(TexImage3D, level) == 8,
7085 "offset of TexImage3D level should be 8");
7086 static_assert(offsetof(TexImage3D, internalformat) == 12,
7087 "offset of TexImage3D internalformat should be 12");
7088 static_assert(offsetof(TexImage3D, width) == 16,
7089 "offset of TexImage3D width should be 16");
7090 static_assert(offsetof(TexImage3D, height) == 20,
7091 "offset of TexImage3D height should be 20");
7092 static_assert(offsetof(TexImage3D, depth) == 24,
7093 "offset of TexImage3D depth should be 24");
7094 static_assert(offsetof(TexImage3D, format) == 28,
7095 "offset of TexImage3D format should be 28");
7096 static_assert(offsetof(TexImage3D, type) == 32,
7097 "offset of TexImage3D type should be 32");
7098 static_assert(offsetof(TexImage3D, pixels_shm_id) == 36,
7099 "offset of TexImage3D pixels_shm_id should be 36");
7100 static_assert(offsetof(TexImage3D, pixels_shm_offset) == 40,
7101 "offset of TexImage3D pixels_shm_offset should be 40");
7103 struct TexParameterf {
7104 typedef TexParameterf ValueType;
7105 static const CommandId kCmdId = kTexParameterf;
7106 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7107 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7109 static uint32_t ComputeSize() {
7110 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7113 void SetHeader() { header.SetCmd<ValueType>(); }
7115 void Init(GLenum _target, GLenum _pname, GLfloat _param) {
7116 SetHeader();
7117 target = _target;
7118 pname = _pname;
7119 param = _param;
7122 void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
7123 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7124 return NextCmdAddress<ValueType>(cmd);
7127 gpu::CommandHeader header;
7128 uint32_t target;
7129 uint32_t pname;
7130 float param;
7133 static_assert(sizeof(TexParameterf) == 16,
7134 "size of TexParameterf should be 16");
7135 static_assert(offsetof(TexParameterf, header) == 0,
7136 "offset of TexParameterf header should be 0");
7137 static_assert(offsetof(TexParameterf, target) == 4,
7138 "offset of TexParameterf target should be 4");
7139 static_assert(offsetof(TexParameterf, pname) == 8,
7140 "offset of TexParameterf pname should be 8");
7141 static_assert(offsetof(TexParameterf, param) == 12,
7142 "offset of TexParameterf param should be 12");
7144 struct TexParameterfvImmediate {
7145 typedef TexParameterfvImmediate ValueType;
7146 static const CommandId kCmdId = kTexParameterfvImmediate;
7147 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7148 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7150 static uint32_t ComputeDataSize() {
7151 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
7154 static uint32_t ComputeSize() {
7155 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7158 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7160 void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
7161 SetHeader();
7162 target = _target;
7163 pname = _pname;
7164 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7167 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
7168 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
7169 const uint32_t size = ComputeSize();
7170 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7173 gpu::CommandHeader header;
7174 uint32_t target;
7175 uint32_t pname;
7178 static_assert(sizeof(TexParameterfvImmediate) == 12,
7179 "size of TexParameterfvImmediate should be 12");
7180 static_assert(offsetof(TexParameterfvImmediate, header) == 0,
7181 "offset of TexParameterfvImmediate header should be 0");
7182 static_assert(offsetof(TexParameterfvImmediate, target) == 4,
7183 "offset of TexParameterfvImmediate target should be 4");
7184 static_assert(offsetof(TexParameterfvImmediate, pname) == 8,
7185 "offset of TexParameterfvImmediate pname should be 8");
7187 struct TexParameteri {
7188 typedef TexParameteri ValueType;
7189 static const CommandId kCmdId = kTexParameteri;
7190 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7191 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7193 static uint32_t ComputeSize() {
7194 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7197 void SetHeader() { header.SetCmd<ValueType>(); }
7199 void Init(GLenum _target, GLenum _pname, GLint _param) {
7200 SetHeader();
7201 target = _target;
7202 pname = _pname;
7203 param = _param;
7206 void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
7207 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
7208 return NextCmdAddress<ValueType>(cmd);
7211 gpu::CommandHeader header;
7212 uint32_t target;
7213 uint32_t pname;
7214 int32_t param;
7217 static_assert(sizeof(TexParameteri) == 16,
7218 "size of TexParameteri should be 16");
7219 static_assert(offsetof(TexParameteri, header) == 0,
7220 "offset of TexParameteri header should be 0");
7221 static_assert(offsetof(TexParameteri, target) == 4,
7222 "offset of TexParameteri target should be 4");
7223 static_assert(offsetof(TexParameteri, pname) == 8,
7224 "offset of TexParameteri pname should be 8");
7225 static_assert(offsetof(TexParameteri, param) == 12,
7226 "offset of TexParameteri param should be 12");
7228 struct TexParameterivImmediate {
7229 typedef TexParameterivImmediate ValueType;
7230 static const CommandId kCmdId = kTexParameterivImmediate;
7231 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7232 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7234 static uint32_t ComputeDataSize() {
7235 return static_cast<uint32_t>(sizeof(GLint) * 1);
7238 static uint32_t ComputeSize() {
7239 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
7242 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
7244 void Init(GLenum _target, GLenum _pname, const GLint* _params) {
7245 SetHeader();
7246 target = _target;
7247 pname = _pname;
7248 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize());
7251 void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
7252 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
7253 const uint32_t size = ComputeSize();
7254 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7257 gpu::CommandHeader header;
7258 uint32_t target;
7259 uint32_t pname;
7262 static_assert(sizeof(TexParameterivImmediate) == 12,
7263 "size of TexParameterivImmediate should be 12");
7264 static_assert(offsetof(TexParameterivImmediate, header) == 0,
7265 "offset of TexParameterivImmediate header should be 0");
7266 static_assert(offsetof(TexParameterivImmediate, target) == 4,
7267 "offset of TexParameterivImmediate target should be 4");
7268 static_assert(offsetof(TexParameterivImmediate, pname) == 8,
7269 "offset of TexParameterivImmediate pname should be 8");
7271 struct TexStorage3D {
7272 typedef TexStorage3D ValueType;
7273 static const CommandId kCmdId = kTexStorage3D;
7274 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7277 static uint32_t ComputeSize() {
7278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7281 void SetHeader() { header.SetCmd<ValueType>(); }
7283 void Init(GLenum _target,
7284 GLsizei _levels,
7285 GLenum _internalFormat,
7286 GLsizei _width,
7287 GLsizei _height,
7288 GLsizei _depth) {
7289 SetHeader();
7290 target = _target;
7291 levels = _levels;
7292 internalFormat = _internalFormat;
7293 width = _width;
7294 height = _height;
7295 depth = _depth;
7298 void* Set(void* cmd,
7299 GLenum _target,
7300 GLsizei _levels,
7301 GLenum _internalFormat,
7302 GLsizei _width,
7303 GLsizei _height,
7304 GLsizei _depth) {
7305 static_cast<ValueType*>(cmd)
7306 ->Init(_target, _levels, _internalFormat, _width, _height, _depth);
7307 return NextCmdAddress<ValueType>(cmd);
7310 gpu::CommandHeader header;
7311 uint32_t target;
7312 int32_t levels;
7313 uint32_t internalFormat;
7314 int32_t width;
7315 int32_t height;
7316 int32_t depth;
7319 static_assert(sizeof(TexStorage3D) == 28, "size of TexStorage3D should be 28");
7320 static_assert(offsetof(TexStorage3D, header) == 0,
7321 "offset of TexStorage3D header should be 0");
7322 static_assert(offsetof(TexStorage3D, target) == 4,
7323 "offset of TexStorage3D target should be 4");
7324 static_assert(offsetof(TexStorage3D, levels) == 8,
7325 "offset of TexStorage3D levels should be 8");
7326 static_assert(offsetof(TexStorage3D, internalFormat) == 12,
7327 "offset of TexStorage3D internalFormat should be 12");
7328 static_assert(offsetof(TexStorage3D, width) == 16,
7329 "offset of TexStorage3D width should be 16");
7330 static_assert(offsetof(TexStorage3D, height) == 20,
7331 "offset of TexStorage3D height should be 20");
7332 static_assert(offsetof(TexStorage3D, depth) == 24,
7333 "offset of TexStorage3D depth should be 24");
7335 struct TexSubImage2D {
7336 typedef TexSubImage2D ValueType;
7337 static const CommandId kCmdId = kTexSubImage2D;
7338 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7339 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7341 static uint32_t ComputeSize() {
7342 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7345 void SetHeader() { header.SetCmd<ValueType>(); }
7347 void Init(GLenum _target,
7348 GLint _level,
7349 GLint _xoffset,
7350 GLint _yoffset,
7351 GLsizei _width,
7352 GLsizei _height,
7353 GLenum _format,
7354 GLenum _type,
7355 uint32_t _pixels_shm_id,
7356 uint32_t _pixels_shm_offset,
7357 GLboolean _internal) {
7358 SetHeader();
7359 target = _target;
7360 level = _level;
7361 xoffset = _xoffset;
7362 yoffset = _yoffset;
7363 width = _width;
7364 height = _height;
7365 format = _format;
7366 type = _type;
7367 pixels_shm_id = _pixels_shm_id;
7368 pixels_shm_offset = _pixels_shm_offset;
7369 internal = _internal;
7372 void* Set(void* cmd,
7373 GLenum _target,
7374 GLint _level,
7375 GLint _xoffset,
7376 GLint _yoffset,
7377 GLsizei _width,
7378 GLsizei _height,
7379 GLenum _format,
7380 GLenum _type,
7381 uint32_t _pixels_shm_id,
7382 uint32_t _pixels_shm_offset,
7383 GLboolean _internal) {
7384 static_cast<ValueType*>(cmd)
7385 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
7386 _type, _pixels_shm_id, _pixels_shm_offset, _internal);
7387 return NextCmdAddress<ValueType>(cmd);
7390 gpu::CommandHeader header;
7391 uint32_t target;
7392 int32_t level;
7393 int32_t xoffset;
7394 int32_t yoffset;
7395 int32_t width;
7396 int32_t height;
7397 uint32_t format;
7398 uint32_t type;
7399 uint32_t pixels_shm_id;
7400 uint32_t pixels_shm_offset;
7401 uint32_t internal;
7404 static_assert(sizeof(TexSubImage2D) == 48,
7405 "size of TexSubImage2D should be 48");
7406 static_assert(offsetof(TexSubImage2D, header) == 0,
7407 "offset of TexSubImage2D header should be 0");
7408 static_assert(offsetof(TexSubImage2D, target) == 4,
7409 "offset of TexSubImage2D target should be 4");
7410 static_assert(offsetof(TexSubImage2D, level) == 8,
7411 "offset of TexSubImage2D level should be 8");
7412 static_assert(offsetof(TexSubImage2D, xoffset) == 12,
7413 "offset of TexSubImage2D xoffset should be 12");
7414 static_assert(offsetof(TexSubImage2D, yoffset) == 16,
7415 "offset of TexSubImage2D yoffset should be 16");
7416 static_assert(offsetof(TexSubImage2D, width) == 20,
7417 "offset of TexSubImage2D width should be 20");
7418 static_assert(offsetof(TexSubImage2D, height) == 24,
7419 "offset of TexSubImage2D height should be 24");
7420 static_assert(offsetof(TexSubImage2D, format) == 28,
7421 "offset of TexSubImage2D format should be 28");
7422 static_assert(offsetof(TexSubImage2D, type) == 32,
7423 "offset of TexSubImage2D type should be 32");
7424 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36,
7425 "offset of TexSubImage2D pixels_shm_id should be 36");
7426 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
7427 "offset of TexSubImage2D pixels_shm_offset should be 40");
7428 static_assert(offsetof(TexSubImage2D, internal) == 44,
7429 "offset of TexSubImage2D internal should be 44");
7431 struct TexSubImage3D {
7432 typedef TexSubImage3D ValueType;
7433 static const CommandId kCmdId = kTexSubImage3D;
7434 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7435 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7437 static uint32_t ComputeSize() {
7438 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7441 void SetHeader() { header.SetCmd<ValueType>(); }
7443 void Init(GLenum _target,
7444 GLint _level,
7445 GLint _xoffset,
7446 GLint _yoffset,
7447 GLint _zoffset,
7448 GLsizei _width,
7449 GLsizei _height,
7450 GLsizei _depth,
7451 GLenum _format,
7452 GLenum _type,
7453 uint32_t _pixels_shm_id,
7454 uint32_t _pixels_shm_offset,
7455 GLboolean _internal) {
7456 SetHeader();
7457 target = _target;
7458 level = _level;
7459 xoffset = _xoffset;
7460 yoffset = _yoffset;
7461 zoffset = _zoffset;
7462 width = _width;
7463 height = _height;
7464 depth = _depth;
7465 format = _format;
7466 type = _type;
7467 pixels_shm_id = _pixels_shm_id;
7468 pixels_shm_offset = _pixels_shm_offset;
7469 internal = _internal;
7472 void* Set(void* cmd,
7473 GLenum _target,
7474 GLint _level,
7475 GLint _xoffset,
7476 GLint _yoffset,
7477 GLint _zoffset,
7478 GLsizei _width,
7479 GLsizei _height,
7480 GLsizei _depth,
7481 GLenum _format,
7482 GLenum _type,
7483 uint32_t _pixels_shm_id,
7484 uint32_t _pixels_shm_offset,
7485 GLboolean _internal) {
7486 static_cast<ValueType*>(cmd)->Init(
7487 _target, _level, _xoffset, _yoffset, _zoffset, _width, _height, _depth,
7488 _format, _type, _pixels_shm_id, _pixels_shm_offset, _internal);
7489 return NextCmdAddress<ValueType>(cmd);
7492 gpu::CommandHeader header;
7493 uint32_t target;
7494 int32_t level;
7495 int32_t xoffset;
7496 int32_t yoffset;
7497 int32_t zoffset;
7498 int32_t width;
7499 int32_t height;
7500 int32_t depth;
7501 uint32_t format;
7502 uint32_t type;
7503 uint32_t pixels_shm_id;
7504 uint32_t pixels_shm_offset;
7505 uint32_t internal;
7508 static_assert(sizeof(TexSubImage3D) == 56,
7509 "size of TexSubImage3D should be 56");
7510 static_assert(offsetof(TexSubImage3D, header) == 0,
7511 "offset of TexSubImage3D header should be 0");
7512 static_assert(offsetof(TexSubImage3D, target) == 4,
7513 "offset of TexSubImage3D target should be 4");
7514 static_assert(offsetof(TexSubImage3D, level) == 8,
7515 "offset of TexSubImage3D level should be 8");
7516 static_assert(offsetof(TexSubImage3D, xoffset) == 12,
7517 "offset of TexSubImage3D xoffset should be 12");
7518 static_assert(offsetof(TexSubImage3D, yoffset) == 16,
7519 "offset of TexSubImage3D yoffset should be 16");
7520 static_assert(offsetof(TexSubImage3D, zoffset) == 20,
7521 "offset of TexSubImage3D zoffset should be 20");
7522 static_assert(offsetof(TexSubImage3D, width) == 24,
7523 "offset of TexSubImage3D width should be 24");
7524 static_assert(offsetof(TexSubImage3D, height) == 28,
7525 "offset of TexSubImage3D height should be 28");
7526 static_assert(offsetof(TexSubImage3D, depth) == 32,
7527 "offset of TexSubImage3D depth should be 32");
7528 static_assert(offsetof(TexSubImage3D, format) == 36,
7529 "offset of TexSubImage3D format should be 36");
7530 static_assert(offsetof(TexSubImage3D, type) == 40,
7531 "offset of TexSubImage3D type should be 40");
7532 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44,
7533 "offset of TexSubImage3D pixels_shm_id should be 44");
7534 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48,
7535 "offset of TexSubImage3D pixels_shm_offset should be 48");
7536 static_assert(offsetof(TexSubImage3D, internal) == 52,
7537 "offset of TexSubImage3D internal should be 52");
7539 struct TransformFeedbackVaryingsBucket {
7540 typedef TransformFeedbackVaryingsBucket ValueType;
7541 static const CommandId kCmdId = kTransformFeedbackVaryingsBucket;
7542 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7543 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7545 static uint32_t ComputeSize() {
7546 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7549 void SetHeader() { header.SetCmd<ValueType>(); }
7551 void Init(GLuint _program, uint32_t _varyings_bucket_id, GLenum _buffermode) {
7552 SetHeader();
7553 program = _program;
7554 varyings_bucket_id = _varyings_bucket_id;
7555 buffermode = _buffermode;
7558 void* Set(void* cmd,
7559 GLuint _program,
7560 uint32_t _varyings_bucket_id,
7561 GLenum _buffermode) {
7562 static_cast<ValueType*>(cmd)
7563 ->Init(_program, _varyings_bucket_id, _buffermode);
7564 return NextCmdAddress<ValueType>(cmd);
7567 gpu::CommandHeader header;
7568 uint32_t program;
7569 uint32_t varyings_bucket_id;
7570 uint32_t buffermode;
7573 static_assert(sizeof(TransformFeedbackVaryingsBucket) == 16,
7574 "size of TransformFeedbackVaryingsBucket should be 16");
7575 static_assert(offsetof(TransformFeedbackVaryingsBucket, header) == 0,
7576 "offset of TransformFeedbackVaryingsBucket header should be 0");
7577 static_assert(offsetof(TransformFeedbackVaryingsBucket, program) == 4,
7578 "offset of TransformFeedbackVaryingsBucket program should be 4");
7579 static_assert(
7580 offsetof(TransformFeedbackVaryingsBucket, varyings_bucket_id) == 8,
7581 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
7582 static_assert(
7583 offsetof(TransformFeedbackVaryingsBucket, buffermode) == 12,
7584 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
7586 struct Uniform1f {
7587 typedef Uniform1f ValueType;
7588 static const CommandId kCmdId = kUniform1f;
7589 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7590 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7592 static uint32_t ComputeSize() {
7593 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7596 void SetHeader() { header.SetCmd<ValueType>(); }
7598 void Init(GLint _location, GLfloat _x) {
7599 SetHeader();
7600 location = _location;
7601 x = _x;
7604 void* Set(void* cmd, GLint _location, GLfloat _x) {
7605 static_cast<ValueType*>(cmd)->Init(_location, _x);
7606 return NextCmdAddress<ValueType>(cmd);
7609 gpu::CommandHeader header;
7610 int32_t location;
7611 float x;
7614 static_assert(sizeof(Uniform1f) == 12, "size of Uniform1f should be 12");
7615 static_assert(offsetof(Uniform1f, header) == 0,
7616 "offset of Uniform1f header should be 0");
7617 static_assert(offsetof(Uniform1f, location) == 4,
7618 "offset of Uniform1f location should be 4");
7619 static_assert(offsetof(Uniform1f, x) == 8, "offset of Uniform1f x should be 8");
7621 struct Uniform1fvImmediate {
7622 typedef Uniform1fvImmediate ValueType;
7623 static const CommandId kCmdId = kUniform1fvImmediate;
7624 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7625 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7627 static uint32_t ComputeDataSize(GLsizei count) {
7628 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT
7631 static uint32_t ComputeSize(GLsizei count) {
7632 return static_cast<uint32_t>(sizeof(ValueType) +
7633 ComputeDataSize(count)); // NOLINT
7636 void SetHeader(GLsizei count) {
7637 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7640 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
7641 SetHeader(_count);
7642 location = _location;
7643 count = _count;
7644 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
7647 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
7648 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7649 const uint32_t size = ComputeSize(_count);
7650 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7653 gpu::CommandHeader header;
7654 int32_t location;
7655 int32_t count;
7658 static_assert(sizeof(Uniform1fvImmediate) == 12,
7659 "size of Uniform1fvImmediate should be 12");
7660 static_assert(offsetof(Uniform1fvImmediate, header) == 0,
7661 "offset of Uniform1fvImmediate header should be 0");
7662 static_assert(offsetof(Uniform1fvImmediate, location) == 4,
7663 "offset of Uniform1fvImmediate location should be 4");
7664 static_assert(offsetof(Uniform1fvImmediate, count) == 8,
7665 "offset of Uniform1fvImmediate count should be 8");
7667 struct Uniform1i {
7668 typedef Uniform1i ValueType;
7669 static const CommandId kCmdId = kUniform1i;
7670 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7671 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7673 static uint32_t ComputeSize() {
7674 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7677 void SetHeader() { header.SetCmd<ValueType>(); }
7679 void Init(GLint _location, GLint _x) {
7680 SetHeader();
7681 location = _location;
7682 x = _x;
7685 void* Set(void* cmd, GLint _location, GLint _x) {
7686 static_cast<ValueType*>(cmd)->Init(_location, _x);
7687 return NextCmdAddress<ValueType>(cmd);
7690 gpu::CommandHeader header;
7691 int32_t location;
7692 int32_t x;
7695 static_assert(sizeof(Uniform1i) == 12, "size of Uniform1i should be 12");
7696 static_assert(offsetof(Uniform1i, header) == 0,
7697 "offset of Uniform1i header should be 0");
7698 static_assert(offsetof(Uniform1i, location) == 4,
7699 "offset of Uniform1i location should be 4");
7700 static_assert(offsetof(Uniform1i, x) == 8, "offset of Uniform1i x should be 8");
7702 struct Uniform1ivImmediate {
7703 typedef Uniform1ivImmediate ValueType;
7704 static const CommandId kCmdId = kUniform1ivImmediate;
7705 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7706 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7708 static uint32_t ComputeDataSize(GLsizei count) {
7709 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT
7712 static uint32_t ComputeSize(GLsizei count) {
7713 return static_cast<uint32_t>(sizeof(ValueType) +
7714 ComputeDataSize(count)); // NOLINT
7717 void SetHeader(GLsizei count) {
7718 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7721 void Init(GLint _location, GLsizei _count, const GLint* _v) {
7722 SetHeader(_count);
7723 location = _location;
7724 count = _count;
7725 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
7728 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
7729 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7730 const uint32_t size = ComputeSize(_count);
7731 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7734 gpu::CommandHeader header;
7735 int32_t location;
7736 int32_t count;
7739 static_assert(sizeof(Uniform1ivImmediate) == 12,
7740 "size of Uniform1ivImmediate should be 12");
7741 static_assert(offsetof(Uniform1ivImmediate, header) == 0,
7742 "offset of Uniform1ivImmediate header should be 0");
7743 static_assert(offsetof(Uniform1ivImmediate, location) == 4,
7744 "offset of Uniform1ivImmediate location should be 4");
7745 static_assert(offsetof(Uniform1ivImmediate, count) == 8,
7746 "offset of Uniform1ivImmediate count should be 8");
7748 struct Uniform1ui {
7749 typedef Uniform1ui ValueType;
7750 static const CommandId kCmdId = kUniform1ui;
7751 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7752 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7754 static uint32_t ComputeSize() {
7755 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7758 void SetHeader() { header.SetCmd<ValueType>(); }
7760 void Init(GLint _location, GLuint _x) {
7761 SetHeader();
7762 location = _location;
7763 x = _x;
7766 void* Set(void* cmd, GLint _location, GLuint _x) {
7767 static_cast<ValueType*>(cmd)->Init(_location, _x);
7768 return NextCmdAddress<ValueType>(cmd);
7771 gpu::CommandHeader header;
7772 int32_t location;
7773 uint32_t x;
7776 static_assert(sizeof(Uniform1ui) == 12, "size of Uniform1ui should be 12");
7777 static_assert(offsetof(Uniform1ui, header) == 0,
7778 "offset of Uniform1ui header should be 0");
7779 static_assert(offsetof(Uniform1ui, location) == 4,
7780 "offset of Uniform1ui location should be 4");
7781 static_assert(offsetof(Uniform1ui, x) == 8,
7782 "offset of Uniform1ui x should be 8");
7784 struct Uniform1uivImmediate {
7785 typedef Uniform1uivImmediate ValueType;
7786 static const CommandId kCmdId = kUniform1uivImmediate;
7787 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7788 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7790 static uint32_t ComputeDataSize(GLsizei count) {
7791 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT
7794 static uint32_t ComputeSize(GLsizei count) {
7795 return static_cast<uint32_t>(sizeof(ValueType) +
7796 ComputeDataSize(count)); // NOLINT
7799 void SetHeader(GLsizei count) {
7800 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7803 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
7804 SetHeader(_count);
7805 location = _location;
7806 count = _count;
7807 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
7810 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
7811 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7812 const uint32_t size = ComputeSize(_count);
7813 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7816 gpu::CommandHeader header;
7817 int32_t location;
7818 int32_t count;
7821 static_assert(sizeof(Uniform1uivImmediate) == 12,
7822 "size of Uniform1uivImmediate should be 12");
7823 static_assert(offsetof(Uniform1uivImmediate, header) == 0,
7824 "offset of Uniform1uivImmediate header should be 0");
7825 static_assert(offsetof(Uniform1uivImmediate, location) == 4,
7826 "offset of Uniform1uivImmediate location should be 4");
7827 static_assert(offsetof(Uniform1uivImmediate, count) == 8,
7828 "offset of Uniform1uivImmediate count should be 8");
7830 struct Uniform2f {
7831 typedef Uniform2f ValueType;
7832 static const CommandId kCmdId = kUniform2f;
7833 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
7834 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7836 static uint32_t ComputeSize() {
7837 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
7840 void SetHeader() { header.SetCmd<ValueType>(); }
7842 void Init(GLint _location, GLfloat _x, GLfloat _y) {
7843 SetHeader();
7844 location = _location;
7845 x = _x;
7846 y = _y;
7849 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
7850 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
7851 return NextCmdAddress<ValueType>(cmd);
7854 gpu::CommandHeader header;
7855 int32_t location;
7856 float x;
7857 float y;
7860 static_assert(sizeof(Uniform2f) == 16, "size of Uniform2f should be 16");
7861 static_assert(offsetof(Uniform2f, header) == 0,
7862 "offset of Uniform2f header should be 0");
7863 static_assert(offsetof(Uniform2f, location) == 4,
7864 "offset of Uniform2f location should be 4");
7865 static_assert(offsetof(Uniform2f, x) == 8, "offset of Uniform2f x should be 8");
7866 static_assert(offsetof(Uniform2f, y) == 12,
7867 "offset of Uniform2f y should be 12");
7869 struct Uniform2fvImmediate {
7870 typedef Uniform2fvImmediate ValueType;
7871 static const CommandId kCmdId = kUniform2fvImmediate;
7872 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7873 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7875 static uint32_t ComputeDataSize(GLsizei count) {
7876 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT
7879 static uint32_t ComputeSize(GLsizei count) {
7880 return static_cast<uint32_t>(sizeof(ValueType) +
7881 ComputeDataSize(count)); // NOLINT
7884 void SetHeader(GLsizei count) {
7885 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7888 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
7889 SetHeader(_count);
7890 location = _location;
7891 count = _count;
7892 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
7895 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
7896 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7897 const uint32_t size = ComputeSize(_count);
7898 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7901 gpu::CommandHeader header;
7902 int32_t location;
7903 int32_t count;
7906 static_assert(sizeof(Uniform2fvImmediate) == 12,
7907 "size of Uniform2fvImmediate should be 12");
7908 static_assert(offsetof(Uniform2fvImmediate, header) == 0,
7909 "offset of Uniform2fvImmediate header should be 0");
7910 static_assert(offsetof(Uniform2fvImmediate, location) == 4,
7911 "offset of Uniform2fvImmediate location should be 4");
7912 static_assert(offsetof(Uniform2fvImmediate, count) == 8,
7913 "offset of Uniform2fvImmediate count should be 8");
7915 struct Uniform2i {
7916 typedef Uniform2i ValueType;
7917 static const CommandId kCmdId = kUniform2i;
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(GLint _location, GLint _x, GLint _y) {
7928 SetHeader();
7929 location = _location;
7930 x = _x;
7931 y = _y;
7934 void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
7935 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
7936 return NextCmdAddress<ValueType>(cmd);
7939 gpu::CommandHeader header;
7940 int32_t location;
7941 int32_t x;
7942 int32_t y;
7945 static_assert(sizeof(Uniform2i) == 16, "size of Uniform2i should be 16");
7946 static_assert(offsetof(Uniform2i, header) == 0,
7947 "offset of Uniform2i header should be 0");
7948 static_assert(offsetof(Uniform2i, location) == 4,
7949 "offset of Uniform2i location should be 4");
7950 static_assert(offsetof(Uniform2i, x) == 8, "offset of Uniform2i x should be 8");
7951 static_assert(offsetof(Uniform2i, y) == 12,
7952 "offset of Uniform2i y should be 12");
7954 struct Uniform2ivImmediate {
7955 typedef Uniform2ivImmediate ValueType;
7956 static const CommandId kCmdId = kUniform2ivImmediate;
7957 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
7958 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
7960 static uint32_t ComputeDataSize(GLsizei count) {
7961 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT
7964 static uint32_t ComputeSize(GLsizei count) {
7965 return static_cast<uint32_t>(sizeof(ValueType) +
7966 ComputeDataSize(count)); // NOLINT
7969 void SetHeader(GLsizei count) {
7970 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
7973 void Init(GLint _location, GLsizei _count, const GLint* _v) {
7974 SetHeader(_count);
7975 location = _location;
7976 count = _count;
7977 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
7980 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
7981 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
7982 const uint32_t size = ComputeSize(_count);
7983 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
7986 gpu::CommandHeader header;
7987 int32_t location;
7988 int32_t count;
7991 static_assert(sizeof(Uniform2ivImmediate) == 12,
7992 "size of Uniform2ivImmediate should be 12");
7993 static_assert(offsetof(Uniform2ivImmediate, header) == 0,
7994 "offset of Uniform2ivImmediate header should be 0");
7995 static_assert(offsetof(Uniform2ivImmediate, location) == 4,
7996 "offset of Uniform2ivImmediate location should be 4");
7997 static_assert(offsetof(Uniform2ivImmediate, count) == 8,
7998 "offset of Uniform2ivImmediate count should be 8");
8000 struct Uniform2ui {
8001 typedef Uniform2ui ValueType;
8002 static const CommandId kCmdId = kUniform2ui;
8003 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8004 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8006 static uint32_t ComputeSize() {
8007 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8010 void SetHeader() { header.SetCmd<ValueType>(); }
8012 void Init(GLint _location, GLuint _x, GLuint _y) {
8013 SetHeader();
8014 location = _location;
8015 x = _x;
8016 y = _y;
8019 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y) {
8020 static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
8021 return NextCmdAddress<ValueType>(cmd);
8024 gpu::CommandHeader header;
8025 int32_t location;
8026 uint32_t x;
8027 uint32_t y;
8030 static_assert(sizeof(Uniform2ui) == 16, "size of Uniform2ui should be 16");
8031 static_assert(offsetof(Uniform2ui, header) == 0,
8032 "offset of Uniform2ui header should be 0");
8033 static_assert(offsetof(Uniform2ui, location) == 4,
8034 "offset of Uniform2ui location should be 4");
8035 static_assert(offsetof(Uniform2ui, x) == 8,
8036 "offset of Uniform2ui x should be 8");
8037 static_assert(offsetof(Uniform2ui, y) == 12,
8038 "offset of Uniform2ui y should be 12");
8040 struct Uniform2uivImmediate {
8041 typedef Uniform2uivImmediate ValueType;
8042 static const CommandId kCmdId = kUniform2uivImmediate;
8043 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8044 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8046 static uint32_t ComputeDataSize(GLsizei count) {
8047 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT
8050 static uint32_t ComputeSize(GLsizei count) {
8051 return static_cast<uint32_t>(sizeof(ValueType) +
8052 ComputeDataSize(count)); // NOLINT
8055 void SetHeader(GLsizei count) {
8056 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8059 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8060 SetHeader(_count);
8061 location = _location;
8062 count = _count;
8063 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8066 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8067 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8068 const uint32_t size = ComputeSize(_count);
8069 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8072 gpu::CommandHeader header;
8073 int32_t location;
8074 int32_t count;
8077 static_assert(sizeof(Uniform2uivImmediate) == 12,
8078 "size of Uniform2uivImmediate should be 12");
8079 static_assert(offsetof(Uniform2uivImmediate, header) == 0,
8080 "offset of Uniform2uivImmediate header should be 0");
8081 static_assert(offsetof(Uniform2uivImmediate, location) == 4,
8082 "offset of Uniform2uivImmediate location should be 4");
8083 static_assert(offsetof(Uniform2uivImmediate, count) == 8,
8084 "offset of Uniform2uivImmediate count should be 8");
8086 struct Uniform3f {
8087 typedef Uniform3f ValueType;
8088 static const CommandId kCmdId = kUniform3f;
8089 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8090 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8092 static uint32_t ComputeSize() {
8093 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8096 void SetHeader() { header.SetCmd<ValueType>(); }
8098 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8099 SetHeader();
8100 location = _location;
8101 x = _x;
8102 y = _y;
8103 z = _z;
8106 void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
8107 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8108 return NextCmdAddress<ValueType>(cmd);
8111 gpu::CommandHeader header;
8112 int32_t location;
8113 float x;
8114 float y;
8115 float z;
8118 static_assert(sizeof(Uniform3f) == 20, "size of Uniform3f should be 20");
8119 static_assert(offsetof(Uniform3f, header) == 0,
8120 "offset of Uniform3f header should be 0");
8121 static_assert(offsetof(Uniform3f, location) == 4,
8122 "offset of Uniform3f location should be 4");
8123 static_assert(offsetof(Uniform3f, x) == 8, "offset of Uniform3f x should be 8");
8124 static_assert(offsetof(Uniform3f, y) == 12,
8125 "offset of Uniform3f y should be 12");
8126 static_assert(offsetof(Uniform3f, z) == 16,
8127 "offset of Uniform3f z should be 16");
8129 struct Uniform3fvImmediate {
8130 typedef Uniform3fvImmediate ValueType;
8131 static const CommandId kCmdId = kUniform3fvImmediate;
8132 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8133 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8135 static uint32_t ComputeDataSize(GLsizei count) {
8136 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT
8139 static uint32_t ComputeSize(GLsizei count) {
8140 return static_cast<uint32_t>(sizeof(ValueType) +
8141 ComputeDataSize(count)); // NOLINT
8144 void SetHeader(GLsizei count) {
8145 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8148 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8149 SetHeader(_count);
8150 location = _location;
8151 count = _count;
8152 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8155 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8156 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8157 const uint32_t size = ComputeSize(_count);
8158 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8161 gpu::CommandHeader header;
8162 int32_t location;
8163 int32_t count;
8166 static_assert(sizeof(Uniform3fvImmediate) == 12,
8167 "size of Uniform3fvImmediate should be 12");
8168 static_assert(offsetof(Uniform3fvImmediate, header) == 0,
8169 "offset of Uniform3fvImmediate header should be 0");
8170 static_assert(offsetof(Uniform3fvImmediate, location) == 4,
8171 "offset of Uniform3fvImmediate location should be 4");
8172 static_assert(offsetof(Uniform3fvImmediate, count) == 8,
8173 "offset of Uniform3fvImmediate count should be 8");
8175 struct Uniform3i {
8176 typedef Uniform3i ValueType;
8177 static const CommandId kCmdId = kUniform3i;
8178 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8179 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8181 static uint32_t ComputeSize() {
8182 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8185 void SetHeader() { header.SetCmd<ValueType>(); }
8187 void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
8188 SetHeader();
8189 location = _location;
8190 x = _x;
8191 y = _y;
8192 z = _z;
8195 void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
8196 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8197 return NextCmdAddress<ValueType>(cmd);
8200 gpu::CommandHeader header;
8201 int32_t location;
8202 int32_t x;
8203 int32_t y;
8204 int32_t z;
8207 static_assert(sizeof(Uniform3i) == 20, "size of Uniform3i should be 20");
8208 static_assert(offsetof(Uniform3i, header) == 0,
8209 "offset of Uniform3i header should be 0");
8210 static_assert(offsetof(Uniform3i, location) == 4,
8211 "offset of Uniform3i location should be 4");
8212 static_assert(offsetof(Uniform3i, x) == 8, "offset of Uniform3i x should be 8");
8213 static_assert(offsetof(Uniform3i, y) == 12,
8214 "offset of Uniform3i y should be 12");
8215 static_assert(offsetof(Uniform3i, z) == 16,
8216 "offset of Uniform3i z should be 16");
8218 struct Uniform3ivImmediate {
8219 typedef Uniform3ivImmediate ValueType;
8220 static const CommandId kCmdId = kUniform3ivImmediate;
8221 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8222 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8224 static uint32_t ComputeDataSize(GLsizei count) {
8225 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT
8228 static uint32_t ComputeSize(GLsizei count) {
8229 return static_cast<uint32_t>(sizeof(ValueType) +
8230 ComputeDataSize(count)); // NOLINT
8233 void SetHeader(GLsizei count) {
8234 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8237 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8238 SetHeader(_count);
8239 location = _location;
8240 count = _count;
8241 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8244 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8245 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8246 const uint32_t size = ComputeSize(_count);
8247 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8250 gpu::CommandHeader header;
8251 int32_t location;
8252 int32_t count;
8255 static_assert(sizeof(Uniform3ivImmediate) == 12,
8256 "size of Uniform3ivImmediate should be 12");
8257 static_assert(offsetof(Uniform3ivImmediate, header) == 0,
8258 "offset of Uniform3ivImmediate header should be 0");
8259 static_assert(offsetof(Uniform3ivImmediate, location) == 4,
8260 "offset of Uniform3ivImmediate location should be 4");
8261 static_assert(offsetof(Uniform3ivImmediate, count) == 8,
8262 "offset of Uniform3ivImmediate count should be 8");
8264 struct Uniform3ui {
8265 typedef Uniform3ui ValueType;
8266 static const CommandId kCmdId = kUniform3ui;
8267 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8268 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8270 static uint32_t ComputeSize() {
8271 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8274 void SetHeader() { header.SetCmd<ValueType>(); }
8276 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z) {
8277 SetHeader();
8278 location = _location;
8279 x = _x;
8280 y = _y;
8281 z = _z;
8284 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y, GLuint _z) {
8285 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
8286 return NextCmdAddress<ValueType>(cmd);
8289 gpu::CommandHeader header;
8290 int32_t location;
8291 uint32_t x;
8292 uint32_t y;
8293 uint32_t z;
8296 static_assert(sizeof(Uniform3ui) == 20, "size of Uniform3ui should be 20");
8297 static_assert(offsetof(Uniform3ui, header) == 0,
8298 "offset of Uniform3ui header should be 0");
8299 static_assert(offsetof(Uniform3ui, location) == 4,
8300 "offset of Uniform3ui location should be 4");
8301 static_assert(offsetof(Uniform3ui, x) == 8,
8302 "offset of Uniform3ui x should be 8");
8303 static_assert(offsetof(Uniform3ui, y) == 12,
8304 "offset of Uniform3ui y should be 12");
8305 static_assert(offsetof(Uniform3ui, z) == 16,
8306 "offset of Uniform3ui z should be 16");
8308 struct Uniform3uivImmediate {
8309 typedef Uniform3uivImmediate ValueType;
8310 static const CommandId kCmdId = kUniform3uivImmediate;
8311 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8312 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8314 static uint32_t ComputeDataSize(GLsizei count) {
8315 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT
8318 static uint32_t ComputeSize(GLsizei count) {
8319 return static_cast<uint32_t>(sizeof(ValueType) +
8320 ComputeDataSize(count)); // NOLINT
8323 void SetHeader(GLsizei count) {
8324 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8327 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8328 SetHeader(_count);
8329 location = _location;
8330 count = _count;
8331 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8334 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8335 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8336 const uint32_t size = ComputeSize(_count);
8337 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8340 gpu::CommandHeader header;
8341 int32_t location;
8342 int32_t count;
8345 static_assert(sizeof(Uniform3uivImmediate) == 12,
8346 "size of Uniform3uivImmediate should be 12");
8347 static_assert(offsetof(Uniform3uivImmediate, header) == 0,
8348 "offset of Uniform3uivImmediate header should be 0");
8349 static_assert(offsetof(Uniform3uivImmediate, location) == 4,
8350 "offset of Uniform3uivImmediate location should be 4");
8351 static_assert(offsetof(Uniform3uivImmediate, count) == 8,
8352 "offset of Uniform3uivImmediate count should be 8");
8354 struct Uniform4f {
8355 typedef Uniform4f ValueType;
8356 static const CommandId kCmdId = kUniform4f;
8357 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8358 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8360 static uint32_t ComputeSize() {
8361 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8364 void SetHeader() { header.SetCmd<ValueType>(); }
8366 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
8367 SetHeader();
8368 location = _location;
8369 x = _x;
8370 y = _y;
8371 z = _z;
8372 w = _w;
8375 void* Set(void* cmd,
8376 GLint _location,
8377 GLfloat _x,
8378 GLfloat _y,
8379 GLfloat _z,
8380 GLfloat _w) {
8381 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
8382 return NextCmdAddress<ValueType>(cmd);
8385 gpu::CommandHeader header;
8386 int32_t location;
8387 float x;
8388 float y;
8389 float z;
8390 float w;
8393 static_assert(sizeof(Uniform4f) == 24, "size of Uniform4f should be 24");
8394 static_assert(offsetof(Uniform4f, header) == 0,
8395 "offset of Uniform4f header should be 0");
8396 static_assert(offsetof(Uniform4f, location) == 4,
8397 "offset of Uniform4f location should be 4");
8398 static_assert(offsetof(Uniform4f, x) == 8, "offset of Uniform4f x should be 8");
8399 static_assert(offsetof(Uniform4f, y) == 12,
8400 "offset of Uniform4f y should be 12");
8401 static_assert(offsetof(Uniform4f, z) == 16,
8402 "offset of Uniform4f z should be 16");
8403 static_assert(offsetof(Uniform4f, w) == 20,
8404 "offset of Uniform4f w should be 20");
8406 struct Uniform4fvImmediate {
8407 typedef Uniform4fvImmediate ValueType;
8408 static const CommandId kCmdId = kUniform4fvImmediate;
8409 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8410 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8412 static uint32_t ComputeDataSize(GLsizei count) {
8413 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
8416 static uint32_t ComputeSize(GLsizei count) {
8417 return static_cast<uint32_t>(sizeof(ValueType) +
8418 ComputeDataSize(count)); // NOLINT
8421 void SetHeader(GLsizei count) {
8422 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8425 void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
8426 SetHeader(_count);
8427 location = _location;
8428 count = _count;
8429 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8432 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
8433 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8434 const uint32_t size = ComputeSize(_count);
8435 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8438 gpu::CommandHeader header;
8439 int32_t location;
8440 int32_t count;
8443 static_assert(sizeof(Uniform4fvImmediate) == 12,
8444 "size of Uniform4fvImmediate should be 12");
8445 static_assert(offsetof(Uniform4fvImmediate, header) == 0,
8446 "offset of Uniform4fvImmediate header should be 0");
8447 static_assert(offsetof(Uniform4fvImmediate, location) == 4,
8448 "offset of Uniform4fvImmediate location should be 4");
8449 static_assert(offsetof(Uniform4fvImmediate, count) == 8,
8450 "offset of Uniform4fvImmediate count should be 8");
8452 struct Uniform4i {
8453 typedef Uniform4i ValueType;
8454 static const CommandId kCmdId = kUniform4i;
8455 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8456 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8458 static uint32_t ComputeSize() {
8459 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8462 void SetHeader() { header.SetCmd<ValueType>(); }
8464 void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
8465 SetHeader();
8466 location = _location;
8467 x = _x;
8468 y = _y;
8469 z = _z;
8470 w = _w;
8473 void* Set(void* cmd,
8474 GLint _location,
8475 GLint _x,
8476 GLint _y,
8477 GLint _z,
8478 GLint _w) {
8479 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
8480 return NextCmdAddress<ValueType>(cmd);
8483 gpu::CommandHeader header;
8484 int32_t location;
8485 int32_t x;
8486 int32_t y;
8487 int32_t z;
8488 int32_t w;
8491 static_assert(sizeof(Uniform4i) == 24, "size of Uniform4i should be 24");
8492 static_assert(offsetof(Uniform4i, header) == 0,
8493 "offset of Uniform4i header should be 0");
8494 static_assert(offsetof(Uniform4i, location) == 4,
8495 "offset of Uniform4i location should be 4");
8496 static_assert(offsetof(Uniform4i, x) == 8, "offset of Uniform4i x should be 8");
8497 static_assert(offsetof(Uniform4i, y) == 12,
8498 "offset of Uniform4i y should be 12");
8499 static_assert(offsetof(Uniform4i, z) == 16,
8500 "offset of Uniform4i z should be 16");
8501 static_assert(offsetof(Uniform4i, w) == 20,
8502 "offset of Uniform4i w should be 20");
8504 struct Uniform4ivImmediate {
8505 typedef Uniform4ivImmediate ValueType;
8506 static const CommandId kCmdId = kUniform4ivImmediate;
8507 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8508 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8510 static uint32_t ComputeDataSize(GLsizei count) {
8511 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT
8514 static uint32_t ComputeSize(GLsizei count) {
8515 return static_cast<uint32_t>(sizeof(ValueType) +
8516 ComputeDataSize(count)); // NOLINT
8519 void SetHeader(GLsizei count) {
8520 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8523 void Init(GLint _location, GLsizei _count, const GLint* _v) {
8524 SetHeader(_count);
8525 location = _location;
8526 count = _count;
8527 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8530 void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
8531 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8532 const uint32_t size = ComputeSize(_count);
8533 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8536 gpu::CommandHeader header;
8537 int32_t location;
8538 int32_t count;
8541 static_assert(sizeof(Uniform4ivImmediate) == 12,
8542 "size of Uniform4ivImmediate should be 12");
8543 static_assert(offsetof(Uniform4ivImmediate, header) == 0,
8544 "offset of Uniform4ivImmediate header should be 0");
8545 static_assert(offsetof(Uniform4ivImmediate, location) == 4,
8546 "offset of Uniform4ivImmediate location should be 4");
8547 static_assert(offsetof(Uniform4ivImmediate, count) == 8,
8548 "offset of Uniform4ivImmediate count should be 8");
8550 struct Uniform4ui {
8551 typedef Uniform4ui ValueType;
8552 static const CommandId kCmdId = kUniform4ui;
8553 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8554 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8556 static uint32_t ComputeSize() {
8557 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8560 void SetHeader() { header.SetCmd<ValueType>(); }
8562 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
8563 SetHeader();
8564 location = _location;
8565 x = _x;
8566 y = _y;
8567 z = _z;
8568 w = _w;
8571 void* Set(void* cmd,
8572 GLint _location,
8573 GLuint _x,
8574 GLuint _y,
8575 GLuint _z,
8576 GLuint _w) {
8577 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
8578 return NextCmdAddress<ValueType>(cmd);
8581 gpu::CommandHeader header;
8582 int32_t location;
8583 uint32_t x;
8584 uint32_t y;
8585 uint32_t z;
8586 uint32_t w;
8589 static_assert(sizeof(Uniform4ui) == 24, "size of Uniform4ui should be 24");
8590 static_assert(offsetof(Uniform4ui, header) == 0,
8591 "offset of Uniform4ui header should be 0");
8592 static_assert(offsetof(Uniform4ui, location) == 4,
8593 "offset of Uniform4ui location should be 4");
8594 static_assert(offsetof(Uniform4ui, x) == 8,
8595 "offset of Uniform4ui x should be 8");
8596 static_assert(offsetof(Uniform4ui, y) == 12,
8597 "offset of Uniform4ui y should be 12");
8598 static_assert(offsetof(Uniform4ui, z) == 16,
8599 "offset of Uniform4ui z should be 16");
8600 static_assert(offsetof(Uniform4ui, w) == 20,
8601 "offset of Uniform4ui w should be 20");
8603 struct Uniform4uivImmediate {
8604 typedef Uniform4uivImmediate ValueType;
8605 static const CommandId kCmdId = kUniform4uivImmediate;
8606 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8607 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8609 static uint32_t ComputeDataSize(GLsizei count) {
8610 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT
8613 static uint32_t ComputeSize(GLsizei count) {
8614 return static_cast<uint32_t>(sizeof(ValueType) +
8615 ComputeDataSize(count)); // NOLINT
8618 void SetHeader(GLsizei count) {
8619 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8622 void Init(GLint _location, GLsizei _count, const GLuint* _v) {
8623 SetHeader(_count);
8624 location = _location;
8625 count = _count;
8626 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count));
8629 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) {
8630 static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
8631 const uint32_t size = ComputeSize(_count);
8632 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8635 gpu::CommandHeader header;
8636 int32_t location;
8637 int32_t count;
8640 static_assert(sizeof(Uniform4uivImmediate) == 12,
8641 "size of Uniform4uivImmediate should be 12");
8642 static_assert(offsetof(Uniform4uivImmediate, header) == 0,
8643 "offset of Uniform4uivImmediate header should be 0");
8644 static_assert(offsetof(Uniform4uivImmediate, location) == 4,
8645 "offset of Uniform4uivImmediate location should be 4");
8646 static_assert(offsetof(Uniform4uivImmediate, count) == 8,
8647 "offset of Uniform4uivImmediate count should be 8");
8649 struct UniformBlockBinding {
8650 typedef UniformBlockBinding ValueType;
8651 static const CommandId kCmdId = kUniformBlockBinding;
8652 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
8653 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8655 static uint32_t ComputeSize() {
8656 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
8659 void SetHeader() { header.SetCmd<ValueType>(); }
8661 void Init(GLuint _program, GLuint _index, GLuint _binding) {
8662 SetHeader();
8663 program = _program;
8664 index = _index;
8665 binding = _binding;
8668 void* Set(void* cmd, GLuint _program, GLuint _index, GLuint _binding) {
8669 static_cast<ValueType*>(cmd)->Init(_program, _index, _binding);
8670 return NextCmdAddress<ValueType>(cmd);
8673 gpu::CommandHeader header;
8674 uint32_t program;
8675 uint32_t index;
8676 uint32_t binding;
8679 static_assert(sizeof(UniformBlockBinding) == 16,
8680 "size of UniformBlockBinding should be 16");
8681 static_assert(offsetof(UniformBlockBinding, header) == 0,
8682 "offset of UniformBlockBinding header should be 0");
8683 static_assert(offsetof(UniformBlockBinding, program) == 4,
8684 "offset of UniformBlockBinding program should be 4");
8685 static_assert(offsetof(UniformBlockBinding, index) == 8,
8686 "offset of UniformBlockBinding index should be 8");
8687 static_assert(offsetof(UniformBlockBinding, binding) == 12,
8688 "offset of UniformBlockBinding binding should be 12");
8690 struct UniformMatrix2fvImmediate {
8691 typedef UniformMatrix2fvImmediate ValueType;
8692 static const CommandId kCmdId = kUniformMatrix2fvImmediate;
8693 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8694 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8696 static uint32_t ComputeDataSize(GLsizei count) {
8697 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT
8700 static uint32_t ComputeSize(GLsizei count) {
8701 return static_cast<uint32_t>(sizeof(ValueType) +
8702 ComputeDataSize(count)); // NOLINT
8705 void SetHeader(GLsizei count) {
8706 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8709 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8710 SetHeader(_count);
8711 location = _location;
8712 count = _count;
8713 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8716 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8717 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8718 const uint32_t size = ComputeSize(_count);
8719 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8722 gpu::CommandHeader header;
8723 int32_t location;
8724 int32_t count;
8725 static const uint32_t transpose = false;
8728 static_assert(sizeof(UniformMatrix2fvImmediate) == 12,
8729 "size of UniformMatrix2fvImmediate should be 12");
8730 static_assert(offsetof(UniformMatrix2fvImmediate, header) == 0,
8731 "offset of UniformMatrix2fvImmediate header should be 0");
8732 static_assert(offsetof(UniformMatrix2fvImmediate, location) == 4,
8733 "offset of UniformMatrix2fvImmediate location should be 4");
8734 static_assert(offsetof(UniformMatrix2fvImmediate, count) == 8,
8735 "offset of UniformMatrix2fvImmediate count should be 8");
8737 struct UniformMatrix2x3fvImmediate {
8738 typedef UniformMatrix2x3fvImmediate ValueType;
8739 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate;
8740 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8741 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8743 static uint32_t ComputeDataSize(GLsizei count) {
8744 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
8747 static uint32_t ComputeSize(GLsizei count) {
8748 return static_cast<uint32_t>(sizeof(ValueType) +
8749 ComputeDataSize(count)); // NOLINT
8752 void SetHeader(GLsizei count) {
8753 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8756 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8757 SetHeader(_count);
8758 location = _location;
8759 count = _count;
8760 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8763 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8764 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8765 const uint32_t size = ComputeSize(_count);
8766 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8769 gpu::CommandHeader header;
8770 int32_t location;
8771 int32_t count;
8772 static const uint32_t transpose = false;
8775 static_assert(sizeof(UniformMatrix2x3fvImmediate) == 12,
8776 "size of UniformMatrix2x3fvImmediate should be 12");
8777 static_assert(offsetof(UniformMatrix2x3fvImmediate, header) == 0,
8778 "offset of UniformMatrix2x3fvImmediate header should be 0");
8779 static_assert(offsetof(UniformMatrix2x3fvImmediate, location) == 4,
8780 "offset of UniformMatrix2x3fvImmediate location should be 4");
8781 static_assert(offsetof(UniformMatrix2x3fvImmediate, count) == 8,
8782 "offset of UniformMatrix2x3fvImmediate count should be 8");
8784 struct UniformMatrix2x4fvImmediate {
8785 typedef UniformMatrix2x4fvImmediate ValueType;
8786 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate;
8787 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8788 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8790 static uint32_t ComputeDataSize(GLsizei count) {
8791 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
8794 static uint32_t ComputeSize(GLsizei count) {
8795 return static_cast<uint32_t>(sizeof(ValueType) +
8796 ComputeDataSize(count)); // NOLINT
8799 void SetHeader(GLsizei count) {
8800 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8803 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8804 SetHeader(_count);
8805 location = _location;
8806 count = _count;
8807 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8810 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8811 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8812 const uint32_t size = ComputeSize(_count);
8813 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8816 gpu::CommandHeader header;
8817 int32_t location;
8818 int32_t count;
8819 static const uint32_t transpose = false;
8822 static_assert(sizeof(UniformMatrix2x4fvImmediate) == 12,
8823 "size of UniformMatrix2x4fvImmediate should be 12");
8824 static_assert(offsetof(UniformMatrix2x4fvImmediate, header) == 0,
8825 "offset of UniformMatrix2x4fvImmediate header should be 0");
8826 static_assert(offsetof(UniformMatrix2x4fvImmediate, location) == 4,
8827 "offset of UniformMatrix2x4fvImmediate location should be 4");
8828 static_assert(offsetof(UniformMatrix2x4fvImmediate, count) == 8,
8829 "offset of UniformMatrix2x4fvImmediate count should be 8");
8831 struct UniformMatrix3fvImmediate {
8832 typedef UniformMatrix3fvImmediate ValueType;
8833 static const CommandId kCmdId = kUniformMatrix3fvImmediate;
8834 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8835 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8837 static uint32_t ComputeDataSize(GLsizei count) {
8838 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT
8841 static uint32_t ComputeSize(GLsizei count) {
8842 return static_cast<uint32_t>(sizeof(ValueType) +
8843 ComputeDataSize(count)); // NOLINT
8846 void SetHeader(GLsizei count) {
8847 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8850 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8851 SetHeader(_count);
8852 location = _location;
8853 count = _count;
8854 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8857 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8858 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8859 const uint32_t size = ComputeSize(_count);
8860 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8863 gpu::CommandHeader header;
8864 int32_t location;
8865 int32_t count;
8866 static const uint32_t transpose = false;
8869 static_assert(sizeof(UniformMatrix3fvImmediate) == 12,
8870 "size of UniformMatrix3fvImmediate should be 12");
8871 static_assert(offsetof(UniformMatrix3fvImmediate, header) == 0,
8872 "offset of UniformMatrix3fvImmediate header should be 0");
8873 static_assert(offsetof(UniformMatrix3fvImmediate, location) == 4,
8874 "offset of UniformMatrix3fvImmediate location should be 4");
8875 static_assert(offsetof(UniformMatrix3fvImmediate, count) == 8,
8876 "offset of UniformMatrix3fvImmediate count should be 8");
8878 struct UniformMatrix3x2fvImmediate {
8879 typedef UniformMatrix3x2fvImmediate ValueType;
8880 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate;
8881 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8882 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8884 static uint32_t ComputeDataSize(GLsizei count) {
8885 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT
8888 static uint32_t ComputeSize(GLsizei count) {
8889 return static_cast<uint32_t>(sizeof(ValueType) +
8890 ComputeDataSize(count)); // NOLINT
8893 void SetHeader(GLsizei count) {
8894 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8897 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8898 SetHeader(_count);
8899 location = _location;
8900 count = _count;
8901 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8904 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8905 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8906 const uint32_t size = ComputeSize(_count);
8907 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8910 gpu::CommandHeader header;
8911 int32_t location;
8912 int32_t count;
8913 static const uint32_t transpose = false;
8916 static_assert(sizeof(UniformMatrix3x2fvImmediate) == 12,
8917 "size of UniformMatrix3x2fvImmediate should be 12");
8918 static_assert(offsetof(UniformMatrix3x2fvImmediate, header) == 0,
8919 "offset of UniformMatrix3x2fvImmediate header should be 0");
8920 static_assert(offsetof(UniformMatrix3x2fvImmediate, location) == 4,
8921 "offset of UniformMatrix3x2fvImmediate location should be 4");
8922 static_assert(offsetof(UniformMatrix3x2fvImmediate, count) == 8,
8923 "offset of UniformMatrix3x2fvImmediate count should be 8");
8925 struct UniformMatrix3x4fvImmediate {
8926 typedef UniformMatrix3x4fvImmediate ValueType;
8927 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate;
8928 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8929 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8931 static uint32_t ComputeDataSize(GLsizei count) {
8932 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
8935 static uint32_t ComputeSize(GLsizei count) {
8936 return static_cast<uint32_t>(sizeof(ValueType) +
8937 ComputeDataSize(count)); // NOLINT
8940 void SetHeader(GLsizei count) {
8941 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8944 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8945 SetHeader(_count);
8946 location = _location;
8947 count = _count;
8948 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8951 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8952 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
8953 const uint32_t size = ComputeSize(_count);
8954 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
8957 gpu::CommandHeader header;
8958 int32_t location;
8959 int32_t count;
8960 static const uint32_t transpose = false;
8963 static_assert(sizeof(UniformMatrix3x4fvImmediate) == 12,
8964 "size of UniformMatrix3x4fvImmediate should be 12");
8965 static_assert(offsetof(UniformMatrix3x4fvImmediate, header) == 0,
8966 "offset of UniformMatrix3x4fvImmediate header should be 0");
8967 static_assert(offsetof(UniformMatrix3x4fvImmediate, location) == 4,
8968 "offset of UniformMatrix3x4fvImmediate location should be 4");
8969 static_assert(offsetof(UniformMatrix3x4fvImmediate, count) == 8,
8970 "offset of UniformMatrix3x4fvImmediate count should be 8");
8972 struct UniformMatrix4fvImmediate {
8973 typedef UniformMatrix4fvImmediate ValueType;
8974 static const CommandId kCmdId = kUniformMatrix4fvImmediate;
8975 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
8976 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
8978 static uint32_t ComputeDataSize(GLsizei count) {
8979 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT
8982 static uint32_t ComputeSize(GLsizei count) {
8983 return static_cast<uint32_t>(sizeof(ValueType) +
8984 ComputeDataSize(count)); // NOLINT
8987 void SetHeader(GLsizei count) {
8988 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
8991 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
8992 SetHeader(_count);
8993 location = _location;
8994 count = _count;
8995 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
8998 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
8999 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9000 const uint32_t size = ComputeSize(_count);
9001 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9004 gpu::CommandHeader header;
9005 int32_t location;
9006 int32_t count;
9007 static const uint32_t transpose = false;
9010 static_assert(sizeof(UniformMatrix4fvImmediate) == 12,
9011 "size of UniformMatrix4fvImmediate should be 12");
9012 static_assert(offsetof(UniformMatrix4fvImmediate, header) == 0,
9013 "offset of UniformMatrix4fvImmediate header should be 0");
9014 static_assert(offsetof(UniformMatrix4fvImmediate, location) == 4,
9015 "offset of UniformMatrix4fvImmediate location should be 4");
9016 static_assert(offsetof(UniformMatrix4fvImmediate, count) == 8,
9017 "offset of UniformMatrix4fvImmediate count should be 8");
9019 struct UniformMatrix4x2fvImmediate {
9020 typedef UniformMatrix4x2fvImmediate ValueType;
9021 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate;
9022 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9023 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9025 static uint32_t ComputeDataSize(GLsizei count) {
9026 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT
9029 static uint32_t ComputeSize(GLsizei count) {
9030 return static_cast<uint32_t>(sizeof(ValueType) +
9031 ComputeDataSize(count)); // NOLINT
9034 void SetHeader(GLsizei count) {
9035 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9038 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9039 SetHeader(_count);
9040 location = _location;
9041 count = _count;
9042 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9045 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9046 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9047 const uint32_t size = ComputeSize(_count);
9048 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9051 gpu::CommandHeader header;
9052 int32_t location;
9053 int32_t count;
9054 static const uint32_t transpose = false;
9057 static_assert(sizeof(UniformMatrix4x2fvImmediate) == 12,
9058 "size of UniformMatrix4x2fvImmediate should be 12");
9059 static_assert(offsetof(UniformMatrix4x2fvImmediate, header) == 0,
9060 "offset of UniformMatrix4x2fvImmediate header should be 0");
9061 static_assert(offsetof(UniformMatrix4x2fvImmediate, location) == 4,
9062 "offset of UniformMatrix4x2fvImmediate location should be 4");
9063 static_assert(offsetof(UniformMatrix4x2fvImmediate, count) == 8,
9064 "offset of UniformMatrix4x2fvImmediate count should be 8");
9066 struct UniformMatrix4x3fvImmediate {
9067 typedef UniformMatrix4x3fvImmediate ValueType;
9068 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate;
9069 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9070 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9072 static uint32_t ComputeDataSize(GLsizei count) {
9073 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT
9076 static uint32_t ComputeSize(GLsizei count) {
9077 return static_cast<uint32_t>(sizeof(ValueType) +
9078 ComputeDataSize(count)); // NOLINT
9081 void SetHeader(GLsizei count) {
9082 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
9085 void Init(GLint _location, GLsizei _count, const GLfloat* _value) {
9086 SetHeader(_count);
9087 location = _location;
9088 count = _count;
9089 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count));
9092 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) {
9093 static_cast<ValueType*>(cmd)->Init(_location, _count, _value);
9094 const uint32_t size = ComputeSize(_count);
9095 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9098 gpu::CommandHeader header;
9099 int32_t location;
9100 int32_t count;
9101 static const uint32_t transpose = false;
9104 static_assert(sizeof(UniformMatrix4x3fvImmediate) == 12,
9105 "size of UniformMatrix4x3fvImmediate should be 12");
9106 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0,
9107 "offset of UniformMatrix4x3fvImmediate header should be 0");
9108 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4,
9109 "offset of UniformMatrix4x3fvImmediate location should be 4");
9110 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8,
9111 "offset of UniformMatrix4x3fvImmediate count should be 8");
9113 struct UseProgram {
9114 typedef UseProgram ValueType;
9115 static const CommandId kCmdId = kUseProgram;
9116 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9117 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9119 static uint32_t ComputeSize() {
9120 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9123 void SetHeader() { header.SetCmd<ValueType>(); }
9125 void Init(GLuint _program) {
9126 SetHeader();
9127 program = _program;
9130 void* Set(void* cmd, GLuint _program) {
9131 static_cast<ValueType*>(cmd)->Init(_program);
9132 return NextCmdAddress<ValueType>(cmd);
9135 gpu::CommandHeader header;
9136 uint32_t program;
9139 static_assert(sizeof(UseProgram) == 8, "size of UseProgram should be 8");
9140 static_assert(offsetof(UseProgram, header) == 0,
9141 "offset of UseProgram header should be 0");
9142 static_assert(offsetof(UseProgram, program) == 4,
9143 "offset of UseProgram program should be 4");
9145 struct ValidateProgram {
9146 typedef ValidateProgram ValueType;
9147 static const CommandId kCmdId = kValidateProgram;
9148 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9149 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9151 static uint32_t ComputeSize() {
9152 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9155 void SetHeader() { header.SetCmd<ValueType>(); }
9157 void Init(GLuint _program) {
9158 SetHeader();
9159 program = _program;
9162 void* Set(void* cmd, GLuint _program) {
9163 static_cast<ValueType*>(cmd)->Init(_program);
9164 return NextCmdAddress<ValueType>(cmd);
9167 gpu::CommandHeader header;
9168 uint32_t program;
9171 static_assert(sizeof(ValidateProgram) == 8,
9172 "size of ValidateProgram should be 8");
9173 static_assert(offsetof(ValidateProgram, header) == 0,
9174 "offset of ValidateProgram header should be 0");
9175 static_assert(offsetof(ValidateProgram, program) == 4,
9176 "offset of ValidateProgram program should be 4");
9178 struct VertexAttrib1f {
9179 typedef VertexAttrib1f ValueType;
9180 static const CommandId kCmdId = kVertexAttrib1f;
9181 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9182 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9184 static uint32_t ComputeSize() {
9185 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9188 void SetHeader() { header.SetCmd<ValueType>(); }
9190 void Init(GLuint _indx, GLfloat _x) {
9191 SetHeader();
9192 indx = _indx;
9193 x = _x;
9196 void* Set(void* cmd, GLuint _indx, GLfloat _x) {
9197 static_cast<ValueType*>(cmd)->Init(_indx, _x);
9198 return NextCmdAddress<ValueType>(cmd);
9201 gpu::CommandHeader header;
9202 uint32_t indx;
9203 float x;
9206 static_assert(sizeof(VertexAttrib1f) == 12,
9207 "size of VertexAttrib1f should be 12");
9208 static_assert(offsetof(VertexAttrib1f, header) == 0,
9209 "offset of VertexAttrib1f header should be 0");
9210 static_assert(offsetof(VertexAttrib1f, indx) == 4,
9211 "offset of VertexAttrib1f indx should be 4");
9212 static_assert(offsetof(VertexAttrib1f, x) == 8,
9213 "offset of VertexAttrib1f x should be 8");
9215 struct VertexAttrib1fvImmediate {
9216 typedef VertexAttrib1fvImmediate ValueType;
9217 static const CommandId kCmdId = kVertexAttrib1fvImmediate;
9218 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9219 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9221 static uint32_t ComputeDataSize() {
9222 return static_cast<uint32_t>(sizeof(GLfloat) * 1);
9225 static uint32_t ComputeSize() {
9226 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9229 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9231 void Init(GLuint _indx, const GLfloat* _values) {
9232 SetHeader();
9233 indx = _indx;
9234 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9237 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
9238 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9239 const uint32_t size = ComputeSize();
9240 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9243 gpu::CommandHeader header;
9244 uint32_t indx;
9247 static_assert(sizeof(VertexAttrib1fvImmediate) == 8,
9248 "size of VertexAttrib1fvImmediate should be 8");
9249 static_assert(offsetof(VertexAttrib1fvImmediate, header) == 0,
9250 "offset of VertexAttrib1fvImmediate header should be 0");
9251 static_assert(offsetof(VertexAttrib1fvImmediate, indx) == 4,
9252 "offset of VertexAttrib1fvImmediate indx should be 4");
9254 struct VertexAttrib2f {
9255 typedef VertexAttrib2f ValueType;
9256 static const CommandId kCmdId = kVertexAttrib2f;
9257 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9258 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9260 static uint32_t ComputeSize() {
9261 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9264 void SetHeader() { header.SetCmd<ValueType>(); }
9266 void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
9267 SetHeader();
9268 indx = _indx;
9269 x = _x;
9270 y = _y;
9273 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
9274 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
9275 return NextCmdAddress<ValueType>(cmd);
9278 gpu::CommandHeader header;
9279 uint32_t indx;
9280 float x;
9281 float y;
9284 static_assert(sizeof(VertexAttrib2f) == 16,
9285 "size of VertexAttrib2f should be 16");
9286 static_assert(offsetof(VertexAttrib2f, header) == 0,
9287 "offset of VertexAttrib2f header should be 0");
9288 static_assert(offsetof(VertexAttrib2f, indx) == 4,
9289 "offset of VertexAttrib2f indx should be 4");
9290 static_assert(offsetof(VertexAttrib2f, x) == 8,
9291 "offset of VertexAttrib2f x should be 8");
9292 static_assert(offsetof(VertexAttrib2f, y) == 12,
9293 "offset of VertexAttrib2f y should be 12");
9295 struct VertexAttrib2fvImmediate {
9296 typedef VertexAttrib2fvImmediate ValueType;
9297 static const CommandId kCmdId = kVertexAttrib2fvImmediate;
9298 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9299 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9301 static uint32_t ComputeDataSize() {
9302 return static_cast<uint32_t>(sizeof(GLfloat) * 2);
9305 static uint32_t ComputeSize() {
9306 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9309 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9311 void Init(GLuint _indx, const GLfloat* _values) {
9312 SetHeader();
9313 indx = _indx;
9314 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9317 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
9318 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9319 const uint32_t size = ComputeSize();
9320 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9323 gpu::CommandHeader header;
9324 uint32_t indx;
9327 static_assert(sizeof(VertexAttrib2fvImmediate) == 8,
9328 "size of VertexAttrib2fvImmediate should be 8");
9329 static_assert(offsetof(VertexAttrib2fvImmediate, header) == 0,
9330 "offset of VertexAttrib2fvImmediate header should be 0");
9331 static_assert(offsetof(VertexAttrib2fvImmediate, indx) == 4,
9332 "offset of VertexAttrib2fvImmediate indx should be 4");
9334 struct VertexAttrib3f {
9335 typedef VertexAttrib3f ValueType;
9336 static const CommandId kCmdId = kVertexAttrib3f;
9337 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9338 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9340 static uint32_t ComputeSize() {
9341 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9344 void SetHeader() { header.SetCmd<ValueType>(); }
9346 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
9347 SetHeader();
9348 indx = _indx;
9349 x = _x;
9350 y = _y;
9351 z = _z;
9354 void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
9355 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
9356 return NextCmdAddress<ValueType>(cmd);
9359 gpu::CommandHeader header;
9360 uint32_t indx;
9361 float x;
9362 float y;
9363 float z;
9366 static_assert(sizeof(VertexAttrib3f) == 20,
9367 "size of VertexAttrib3f should be 20");
9368 static_assert(offsetof(VertexAttrib3f, header) == 0,
9369 "offset of VertexAttrib3f header should be 0");
9370 static_assert(offsetof(VertexAttrib3f, indx) == 4,
9371 "offset of VertexAttrib3f indx should be 4");
9372 static_assert(offsetof(VertexAttrib3f, x) == 8,
9373 "offset of VertexAttrib3f x should be 8");
9374 static_assert(offsetof(VertexAttrib3f, y) == 12,
9375 "offset of VertexAttrib3f y should be 12");
9376 static_assert(offsetof(VertexAttrib3f, z) == 16,
9377 "offset of VertexAttrib3f z should be 16");
9379 struct VertexAttrib3fvImmediate {
9380 typedef VertexAttrib3fvImmediate ValueType;
9381 static const CommandId kCmdId = kVertexAttrib3fvImmediate;
9382 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9383 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9385 static uint32_t ComputeDataSize() {
9386 return static_cast<uint32_t>(sizeof(GLfloat) * 3);
9389 static uint32_t ComputeSize() {
9390 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9393 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9395 void Init(GLuint _indx, const GLfloat* _values) {
9396 SetHeader();
9397 indx = _indx;
9398 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9401 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
9402 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9403 const uint32_t size = ComputeSize();
9404 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9407 gpu::CommandHeader header;
9408 uint32_t indx;
9411 static_assert(sizeof(VertexAttrib3fvImmediate) == 8,
9412 "size of VertexAttrib3fvImmediate should be 8");
9413 static_assert(offsetof(VertexAttrib3fvImmediate, header) == 0,
9414 "offset of VertexAttrib3fvImmediate header should be 0");
9415 static_assert(offsetof(VertexAttrib3fvImmediate, indx) == 4,
9416 "offset of VertexAttrib3fvImmediate indx should be 4");
9418 struct VertexAttrib4f {
9419 typedef VertexAttrib4f ValueType;
9420 static const CommandId kCmdId = kVertexAttrib4f;
9421 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9422 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9424 static uint32_t ComputeSize() {
9425 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9428 void SetHeader() { header.SetCmd<ValueType>(); }
9430 void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
9431 SetHeader();
9432 indx = _indx;
9433 x = _x;
9434 y = _y;
9435 z = _z;
9436 w = _w;
9439 void* Set(void* cmd,
9440 GLuint _indx,
9441 GLfloat _x,
9442 GLfloat _y,
9443 GLfloat _z,
9444 GLfloat _w) {
9445 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
9446 return NextCmdAddress<ValueType>(cmd);
9449 gpu::CommandHeader header;
9450 uint32_t indx;
9451 float x;
9452 float y;
9453 float z;
9454 float w;
9457 static_assert(sizeof(VertexAttrib4f) == 24,
9458 "size of VertexAttrib4f should be 24");
9459 static_assert(offsetof(VertexAttrib4f, header) == 0,
9460 "offset of VertexAttrib4f header should be 0");
9461 static_assert(offsetof(VertexAttrib4f, indx) == 4,
9462 "offset of VertexAttrib4f indx should be 4");
9463 static_assert(offsetof(VertexAttrib4f, x) == 8,
9464 "offset of VertexAttrib4f x should be 8");
9465 static_assert(offsetof(VertexAttrib4f, y) == 12,
9466 "offset of VertexAttrib4f y should be 12");
9467 static_assert(offsetof(VertexAttrib4f, z) == 16,
9468 "offset of VertexAttrib4f z should be 16");
9469 static_assert(offsetof(VertexAttrib4f, w) == 20,
9470 "offset of VertexAttrib4f w should be 20");
9472 struct VertexAttrib4fvImmediate {
9473 typedef VertexAttrib4fvImmediate ValueType;
9474 static const CommandId kCmdId = kVertexAttrib4fvImmediate;
9475 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9476 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9478 static uint32_t ComputeDataSize() {
9479 return static_cast<uint32_t>(sizeof(GLfloat) * 4);
9482 static uint32_t ComputeSize() {
9483 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9486 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9488 void Init(GLuint _indx, const GLfloat* _values) {
9489 SetHeader();
9490 indx = _indx;
9491 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9494 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
9495 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9496 const uint32_t size = ComputeSize();
9497 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9500 gpu::CommandHeader header;
9501 uint32_t indx;
9504 static_assert(sizeof(VertexAttrib4fvImmediate) == 8,
9505 "size of VertexAttrib4fvImmediate should be 8");
9506 static_assert(offsetof(VertexAttrib4fvImmediate, header) == 0,
9507 "offset of VertexAttrib4fvImmediate header should be 0");
9508 static_assert(offsetof(VertexAttrib4fvImmediate, indx) == 4,
9509 "offset of VertexAttrib4fvImmediate indx should be 4");
9511 struct VertexAttribI4i {
9512 typedef VertexAttribI4i ValueType;
9513 static const CommandId kCmdId = kVertexAttribI4i;
9514 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9515 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9517 static uint32_t ComputeSize() {
9518 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9521 void SetHeader() { header.SetCmd<ValueType>(); }
9523 void Init(GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
9524 SetHeader();
9525 indx = _indx;
9526 x = _x;
9527 y = _y;
9528 z = _z;
9529 w = _w;
9532 void* Set(void* cmd, GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) {
9533 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
9534 return NextCmdAddress<ValueType>(cmd);
9537 gpu::CommandHeader header;
9538 uint32_t indx;
9539 int32_t x;
9540 int32_t y;
9541 int32_t z;
9542 int32_t w;
9545 static_assert(sizeof(VertexAttribI4i) == 24,
9546 "size of VertexAttribI4i should be 24");
9547 static_assert(offsetof(VertexAttribI4i, header) == 0,
9548 "offset of VertexAttribI4i header should be 0");
9549 static_assert(offsetof(VertexAttribI4i, indx) == 4,
9550 "offset of VertexAttribI4i indx should be 4");
9551 static_assert(offsetof(VertexAttribI4i, x) == 8,
9552 "offset of VertexAttribI4i x should be 8");
9553 static_assert(offsetof(VertexAttribI4i, y) == 12,
9554 "offset of VertexAttribI4i y should be 12");
9555 static_assert(offsetof(VertexAttribI4i, z) == 16,
9556 "offset of VertexAttribI4i z should be 16");
9557 static_assert(offsetof(VertexAttribI4i, w) == 20,
9558 "offset of VertexAttribI4i w should be 20");
9560 struct VertexAttribI4ivImmediate {
9561 typedef VertexAttribI4ivImmediate ValueType;
9562 static const CommandId kCmdId = kVertexAttribI4ivImmediate;
9563 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9564 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9566 static uint32_t ComputeDataSize() {
9567 return static_cast<uint32_t>(sizeof(GLint) * 4);
9570 static uint32_t ComputeSize() {
9571 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9574 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9576 void Init(GLuint _indx, const GLint* _values) {
9577 SetHeader();
9578 indx = _indx;
9579 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9582 void* Set(void* cmd, GLuint _indx, const GLint* _values) {
9583 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9584 const uint32_t size = ComputeSize();
9585 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9588 gpu::CommandHeader header;
9589 uint32_t indx;
9592 static_assert(sizeof(VertexAttribI4ivImmediate) == 8,
9593 "size of VertexAttribI4ivImmediate should be 8");
9594 static_assert(offsetof(VertexAttribI4ivImmediate, header) == 0,
9595 "offset of VertexAttribI4ivImmediate header should be 0");
9596 static_assert(offsetof(VertexAttribI4ivImmediate, indx) == 4,
9597 "offset of VertexAttribI4ivImmediate indx should be 4");
9599 struct VertexAttribI4ui {
9600 typedef VertexAttribI4ui ValueType;
9601 static const CommandId kCmdId = kVertexAttribI4ui;
9602 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9603 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9605 static uint32_t ComputeSize() {
9606 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9609 void SetHeader() { header.SetCmd<ValueType>(); }
9611 void Init(GLuint _indx, GLuint _x, GLuint _y, GLuint _z, GLuint _w) {
9612 SetHeader();
9613 indx = _indx;
9614 x = _x;
9615 y = _y;
9616 z = _z;
9617 w = _w;
9620 void* Set(void* cmd,
9621 GLuint _indx,
9622 GLuint _x,
9623 GLuint _y,
9624 GLuint _z,
9625 GLuint _w) {
9626 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
9627 return NextCmdAddress<ValueType>(cmd);
9630 gpu::CommandHeader header;
9631 uint32_t indx;
9632 uint32_t x;
9633 uint32_t y;
9634 uint32_t z;
9635 uint32_t w;
9638 static_assert(sizeof(VertexAttribI4ui) == 24,
9639 "size of VertexAttribI4ui should be 24");
9640 static_assert(offsetof(VertexAttribI4ui, header) == 0,
9641 "offset of VertexAttribI4ui header should be 0");
9642 static_assert(offsetof(VertexAttribI4ui, indx) == 4,
9643 "offset of VertexAttribI4ui indx should be 4");
9644 static_assert(offsetof(VertexAttribI4ui, x) == 8,
9645 "offset of VertexAttribI4ui x should be 8");
9646 static_assert(offsetof(VertexAttribI4ui, y) == 12,
9647 "offset of VertexAttribI4ui y should be 12");
9648 static_assert(offsetof(VertexAttribI4ui, z) == 16,
9649 "offset of VertexAttribI4ui z should be 16");
9650 static_assert(offsetof(VertexAttribI4ui, w) == 20,
9651 "offset of VertexAttribI4ui w should be 20");
9653 struct VertexAttribI4uivImmediate {
9654 typedef VertexAttribI4uivImmediate ValueType;
9655 static const CommandId kCmdId = kVertexAttribI4uivImmediate;
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() {
9660 return static_cast<uint32_t>(sizeof(GLuint) * 4);
9663 static uint32_t ComputeSize() {
9664 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
9667 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9669 void Init(GLuint _indx, const GLuint* _values) {
9670 SetHeader();
9671 indx = _indx;
9672 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize());
9675 void* Set(void* cmd, GLuint _indx, const GLuint* _values) {
9676 static_cast<ValueType*>(cmd)->Init(_indx, _values);
9677 const uint32_t size = ComputeSize();
9678 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9681 gpu::CommandHeader header;
9682 uint32_t indx;
9685 static_assert(sizeof(VertexAttribI4uivImmediate) == 8,
9686 "size of VertexAttribI4uivImmediate should be 8");
9687 static_assert(offsetof(VertexAttribI4uivImmediate, header) == 0,
9688 "offset of VertexAttribI4uivImmediate header should be 0");
9689 static_assert(offsetof(VertexAttribI4uivImmediate, indx) == 4,
9690 "offset of VertexAttribI4uivImmediate indx should be 4");
9692 struct VertexAttribIPointer {
9693 typedef VertexAttribIPointer ValueType;
9694 static const CommandId kCmdId = kVertexAttribIPointer;
9695 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9696 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9698 static uint32_t ComputeSize() {
9699 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9702 void SetHeader() { header.SetCmd<ValueType>(); }
9704 void Init(GLuint _indx,
9705 GLint _size,
9706 GLenum _type,
9707 GLsizei _stride,
9708 GLuint _offset) {
9709 SetHeader();
9710 indx = _indx;
9711 size = _size;
9712 type = _type;
9713 stride = _stride;
9714 offset = _offset;
9717 void* Set(void* cmd,
9718 GLuint _indx,
9719 GLint _size,
9720 GLenum _type,
9721 GLsizei _stride,
9722 GLuint _offset) {
9723 static_cast<ValueType*>(cmd)->Init(_indx, _size, _type, _stride, _offset);
9724 return NextCmdAddress<ValueType>(cmd);
9727 gpu::CommandHeader header;
9728 uint32_t indx;
9729 int32_t size;
9730 uint32_t type;
9731 int32_t stride;
9732 uint32_t offset;
9735 static_assert(sizeof(VertexAttribIPointer) == 24,
9736 "size of VertexAttribIPointer should be 24");
9737 static_assert(offsetof(VertexAttribIPointer, header) == 0,
9738 "offset of VertexAttribIPointer header should be 0");
9739 static_assert(offsetof(VertexAttribIPointer, indx) == 4,
9740 "offset of VertexAttribIPointer indx should be 4");
9741 static_assert(offsetof(VertexAttribIPointer, size) == 8,
9742 "offset of VertexAttribIPointer size should be 8");
9743 static_assert(offsetof(VertexAttribIPointer, type) == 12,
9744 "offset of VertexAttribIPointer type should be 12");
9745 static_assert(offsetof(VertexAttribIPointer, stride) == 16,
9746 "offset of VertexAttribIPointer stride should be 16");
9747 static_assert(offsetof(VertexAttribIPointer, offset) == 20,
9748 "offset of VertexAttribIPointer offset should be 20");
9750 struct VertexAttribPointer {
9751 typedef VertexAttribPointer ValueType;
9752 static const CommandId kCmdId = kVertexAttribPointer;
9753 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9754 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9756 static uint32_t ComputeSize() {
9757 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9760 void SetHeader() { header.SetCmd<ValueType>(); }
9762 void Init(GLuint _indx,
9763 GLint _size,
9764 GLenum _type,
9765 GLboolean _normalized,
9766 GLsizei _stride,
9767 GLuint _offset) {
9768 SetHeader();
9769 indx = _indx;
9770 size = _size;
9771 type = _type;
9772 normalized = _normalized;
9773 stride = _stride;
9774 offset = _offset;
9777 void* Set(void* cmd,
9778 GLuint _indx,
9779 GLint _size,
9780 GLenum _type,
9781 GLboolean _normalized,
9782 GLsizei _stride,
9783 GLuint _offset) {
9784 static_cast<ValueType*>(cmd)
9785 ->Init(_indx, _size, _type, _normalized, _stride, _offset);
9786 return NextCmdAddress<ValueType>(cmd);
9789 gpu::CommandHeader header;
9790 uint32_t indx;
9791 int32_t size;
9792 uint32_t type;
9793 uint32_t normalized;
9794 int32_t stride;
9795 uint32_t offset;
9798 static_assert(sizeof(VertexAttribPointer) == 28,
9799 "size of VertexAttribPointer should be 28");
9800 static_assert(offsetof(VertexAttribPointer, header) == 0,
9801 "offset of VertexAttribPointer header should be 0");
9802 static_assert(offsetof(VertexAttribPointer, indx) == 4,
9803 "offset of VertexAttribPointer indx should be 4");
9804 static_assert(offsetof(VertexAttribPointer, size) == 8,
9805 "offset of VertexAttribPointer size should be 8");
9806 static_assert(offsetof(VertexAttribPointer, type) == 12,
9807 "offset of VertexAttribPointer type should be 12");
9808 static_assert(offsetof(VertexAttribPointer, normalized) == 16,
9809 "offset of VertexAttribPointer normalized should be 16");
9810 static_assert(offsetof(VertexAttribPointer, stride) == 20,
9811 "offset of VertexAttribPointer stride should be 20");
9812 static_assert(offsetof(VertexAttribPointer, offset) == 24,
9813 "offset of VertexAttribPointer offset should be 24");
9815 struct Viewport {
9816 typedef Viewport ValueType;
9817 static const CommandId kCmdId = kViewport;
9818 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9819 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9821 static uint32_t ComputeSize() {
9822 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9825 void SetHeader() { header.SetCmd<ValueType>(); }
9827 void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
9828 SetHeader();
9829 x = _x;
9830 y = _y;
9831 width = _width;
9832 height = _height;
9835 void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
9836 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
9837 return NextCmdAddress<ValueType>(cmd);
9840 gpu::CommandHeader header;
9841 int32_t x;
9842 int32_t y;
9843 int32_t width;
9844 int32_t height;
9847 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20");
9848 static_assert(offsetof(Viewport, header) == 0,
9849 "offset of Viewport header should be 0");
9850 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4");
9851 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8");
9852 static_assert(offsetof(Viewport, width) == 12,
9853 "offset of Viewport width should be 12");
9854 static_assert(offsetof(Viewport, height) == 16,
9855 "offset of Viewport height should be 16");
9857 struct WaitSync {
9858 typedef WaitSync ValueType;
9859 static const CommandId kCmdId = kWaitSync;
9860 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9863 static uint32_t ComputeSize() {
9864 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9867 void SetHeader() { header.SetCmd<ValueType>(); }
9869 void Init(GLuint _sync,
9870 GLbitfield _flags,
9871 GLuint _timeout_0,
9872 GLuint _timeout_1) {
9873 SetHeader();
9874 sync = _sync;
9875 flags = _flags;
9876 timeout_0 = _timeout_0;
9877 timeout_1 = _timeout_1;
9880 void* Set(void* cmd,
9881 GLuint _sync,
9882 GLbitfield _flags,
9883 GLuint _timeout_0,
9884 GLuint _timeout_1) {
9885 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1);
9886 return NextCmdAddress<ValueType>(cmd);
9889 gpu::CommandHeader header;
9890 uint32_t sync;
9891 uint32_t flags;
9892 uint32_t timeout_0;
9893 uint32_t timeout_1;
9896 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20");
9897 static_assert(offsetof(WaitSync, header) == 0,
9898 "offset of WaitSync header should be 0");
9899 static_assert(offsetof(WaitSync, sync) == 4,
9900 "offset of WaitSync sync should be 4");
9901 static_assert(offsetof(WaitSync, flags) == 8,
9902 "offset of WaitSync flags should be 8");
9903 static_assert(offsetof(WaitSync, timeout_0) == 12,
9904 "offset of WaitSync timeout_0 should be 12");
9905 static_assert(offsetof(WaitSync, timeout_1) == 16,
9906 "offset of WaitSync timeout_1 should be 16");
9908 struct BlitFramebufferCHROMIUM {
9909 typedef BlitFramebufferCHROMIUM ValueType;
9910 static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
9911 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9912 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9914 static uint32_t ComputeSize() {
9915 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9918 void SetHeader() { header.SetCmd<ValueType>(); }
9920 void Init(GLint _srcX0,
9921 GLint _srcY0,
9922 GLint _srcX1,
9923 GLint _srcY1,
9924 GLint _dstX0,
9925 GLint _dstY0,
9926 GLint _dstX1,
9927 GLint _dstY1,
9928 GLbitfield _mask,
9929 GLenum _filter) {
9930 SetHeader();
9931 srcX0 = _srcX0;
9932 srcY0 = _srcY0;
9933 srcX1 = _srcX1;
9934 srcY1 = _srcY1;
9935 dstX0 = _dstX0;
9936 dstY0 = _dstY0;
9937 dstX1 = _dstX1;
9938 dstY1 = _dstY1;
9939 mask = _mask;
9940 filter = _filter;
9943 void* Set(void* cmd,
9944 GLint _srcX0,
9945 GLint _srcY0,
9946 GLint _srcX1,
9947 GLint _srcY1,
9948 GLint _dstX0,
9949 GLint _dstY0,
9950 GLint _dstX1,
9951 GLint _dstY1,
9952 GLbitfield _mask,
9953 GLenum _filter) {
9954 static_cast<ValueType*>(cmd)->Init(_srcX0, _srcY0, _srcX1, _srcY1, _dstX0,
9955 _dstY0, _dstX1, _dstY1, _mask, _filter);
9956 return NextCmdAddress<ValueType>(cmd);
9959 gpu::CommandHeader header;
9960 int32_t srcX0;
9961 int32_t srcY0;
9962 int32_t srcX1;
9963 int32_t srcY1;
9964 int32_t dstX0;
9965 int32_t dstY0;
9966 int32_t dstX1;
9967 int32_t dstY1;
9968 uint32_t mask;
9969 uint32_t filter;
9972 static_assert(sizeof(BlitFramebufferCHROMIUM) == 44,
9973 "size of BlitFramebufferCHROMIUM should be 44");
9974 static_assert(offsetof(BlitFramebufferCHROMIUM, header) == 0,
9975 "offset of BlitFramebufferCHROMIUM header should be 0");
9976 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
9977 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
9978 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
9979 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
9980 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
9981 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
9982 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
9983 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
9984 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
9985 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
9986 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
9987 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
9988 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
9989 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
9990 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
9991 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
9992 static_assert(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
9993 "offset of BlitFramebufferCHROMIUM mask should be 36");
9994 static_assert(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
9995 "offset of BlitFramebufferCHROMIUM filter should be 40");
9997 // GL_CHROMIUM_framebuffer_multisample
9998 struct RenderbufferStorageMultisampleCHROMIUM {
9999 typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
10000 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
10001 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10002 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10004 static uint32_t ComputeSize() {
10005 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10008 void SetHeader() { header.SetCmd<ValueType>(); }
10010 void Init(GLenum _target,
10011 GLsizei _samples,
10012 GLenum _internalformat,
10013 GLsizei _width,
10014 GLsizei _height) {
10015 SetHeader();
10016 target = _target;
10017 samples = _samples;
10018 internalformat = _internalformat;
10019 width = _width;
10020 height = _height;
10023 void* Set(void* cmd,
10024 GLenum _target,
10025 GLsizei _samples,
10026 GLenum _internalformat,
10027 GLsizei _width,
10028 GLsizei _height) {
10029 static_cast<ValueType*>(cmd)
10030 ->Init(_target, _samples, _internalformat, _width, _height);
10031 return NextCmdAddress<ValueType>(cmd);
10034 gpu::CommandHeader header;
10035 uint32_t target;
10036 int32_t samples;
10037 uint32_t internalformat;
10038 int32_t width;
10039 int32_t height;
10042 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
10043 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10044 static_assert(
10045 offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
10046 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10047 static_assert(
10048 offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
10049 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10050 static_assert(
10051 offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
10052 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10053 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM,
10054 internalformat) == 12,
10055 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10056 "should be 12");
10057 static_assert(
10058 offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
10059 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10060 static_assert(
10061 offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
10062 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10064 // GL_EXT_multisampled_render_to_texture
10065 struct RenderbufferStorageMultisampleEXT {
10066 typedef RenderbufferStorageMultisampleEXT ValueType;
10067 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
10068 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10069 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10071 static uint32_t ComputeSize() {
10072 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10075 void SetHeader() { header.SetCmd<ValueType>(); }
10077 void Init(GLenum _target,
10078 GLsizei _samples,
10079 GLenum _internalformat,
10080 GLsizei _width,
10081 GLsizei _height) {
10082 SetHeader();
10083 target = _target;
10084 samples = _samples;
10085 internalformat = _internalformat;
10086 width = _width;
10087 height = _height;
10090 void* Set(void* cmd,
10091 GLenum _target,
10092 GLsizei _samples,
10093 GLenum _internalformat,
10094 GLsizei _width,
10095 GLsizei _height) {
10096 static_cast<ValueType*>(cmd)
10097 ->Init(_target, _samples, _internalformat, _width, _height);
10098 return NextCmdAddress<ValueType>(cmd);
10101 gpu::CommandHeader header;
10102 uint32_t target;
10103 int32_t samples;
10104 uint32_t internalformat;
10105 int32_t width;
10106 int32_t height;
10109 static_assert(sizeof(RenderbufferStorageMultisampleEXT) == 24,
10110 "size of RenderbufferStorageMultisampleEXT should be 24");
10111 static_assert(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
10112 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10113 static_assert(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
10114 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10115 static_assert(
10116 offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
10117 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10118 static_assert(
10119 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
10120 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10121 static_assert(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
10122 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10123 static_assert(
10124 offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
10125 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10127 struct FramebufferTexture2DMultisampleEXT {
10128 typedef FramebufferTexture2DMultisampleEXT ValueType;
10129 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
10130 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10131 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10133 static uint32_t ComputeSize() {
10134 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10137 void SetHeader() { header.SetCmd<ValueType>(); }
10139 void Init(GLenum _target,
10140 GLenum _attachment,
10141 GLenum _textarget,
10142 GLuint _texture,
10143 GLsizei _samples) {
10144 SetHeader();
10145 target = _target;
10146 attachment = _attachment;
10147 textarget = _textarget;
10148 texture = _texture;
10149 samples = _samples;
10152 void* Set(void* cmd,
10153 GLenum _target,
10154 GLenum _attachment,
10155 GLenum _textarget,
10156 GLuint _texture,
10157 GLsizei _samples) {
10158 static_cast<ValueType*>(cmd)
10159 ->Init(_target, _attachment, _textarget, _texture, _samples);
10160 return NextCmdAddress<ValueType>(cmd);
10163 gpu::CommandHeader header;
10164 uint32_t target;
10165 uint32_t attachment;
10166 uint32_t textarget;
10167 uint32_t texture;
10168 int32_t samples;
10169 static const int32_t level = 0;
10172 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24,
10173 "size of FramebufferTexture2DMultisampleEXT should be 24");
10174 static_assert(
10175 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
10176 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10177 static_assert(
10178 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
10179 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10180 static_assert(
10181 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
10182 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10183 static_assert(
10184 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
10185 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10186 static_assert(
10187 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
10188 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10189 static_assert(
10190 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20,
10191 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10193 struct TexStorage2DEXT {
10194 typedef TexStorage2DEXT ValueType;
10195 static const CommandId kCmdId = kTexStorage2DEXT;
10196 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10197 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10199 static uint32_t ComputeSize() {
10200 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10203 void SetHeader() { header.SetCmd<ValueType>(); }
10205 void Init(GLenum _target,
10206 GLsizei _levels,
10207 GLenum _internalFormat,
10208 GLsizei _width,
10209 GLsizei _height) {
10210 SetHeader();
10211 target = _target;
10212 levels = _levels;
10213 internalFormat = _internalFormat;
10214 width = _width;
10215 height = _height;
10218 void* Set(void* cmd,
10219 GLenum _target,
10220 GLsizei _levels,
10221 GLenum _internalFormat,
10222 GLsizei _width,
10223 GLsizei _height) {
10224 static_cast<ValueType*>(cmd)
10225 ->Init(_target, _levels, _internalFormat, _width, _height);
10226 return NextCmdAddress<ValueType>(cmd);
10229 gpu::CommandHeader header;
10230 uint32_t target;
10231 int32_t levels;
10232 uint32_t internalFormat;
10233 int32_t width;
10234 int32_t height;
10237 static_assert(sizeof(TexStorage2DEXT) == 24,
10238 "size of TexStorage2DEXT should be 24");
10239 static_assert(offsetof(TexStorage2DEXT, header) == 0,
10240 "offset of TexStorage2DEXT header should be 0");
10241 static_assert(offsetof(TexStorage2DEXT, target) == 4,
10242 "offset of TexStorage2DEXT target should be 4");
10243 static_assert(offsetof(TexStorage2DEXT, levels) == 8,
10244 "offset of TexStorage2DEXT levels should be 8");
10245 static_assert(offsetof(TexStorage2DEXT, internalFormat) == 12,
10246 "offset of TexStorage2DEXT internalFormat should be 12");
10247 static_assert(offsetof(TexStorage2DEXT, width) == 16,
10248 "offset of TexStorage2DEXT width should be 16");
10249 static_assert(offsetof(TexStorage2DEXT, height) == 20,
10250 "offset of TexStorage2DEXT height should be 20");
10252 struct GenQueriesEXTImmediate {
10253 typedef GenQueriesEXTImmediate ValueType;
10254 static const CommandId kCmdId = kGenQueriesEXTImmediate;
10255 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10256 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10258 static uint32_t ComputeDataSize(GLsizei n) {
10259 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
10262 static uint32_t ComputeSize(GLsizei n) {
10263 return static_cast<uint32_t>(sizeof(ValueType) +
10264 ComputeDataSize(n)); // NOLINT
10267 void SetHeader(GLsizei n) {
10268 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
10271 void Init(GLsizei _n, GLuint* _queries) {
10272 SetHeader(_n);
10273 n = _n;
10274 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
10277 void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
10278 static_cast<ValueType*>(cmd)->Init(_n, _queries);
10279 const uint32_t size = ComputeSize(_n);
10280 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10283 gpu::CommandHeader header;
10284 int32_t n;
10287 static_assert(sizeof(GenQueriesEXTImmediate) == 8,
10288 "size of GenQueriesEXTImmediate should be 8");
10289 static_assert(offsetof(GenQueriesEXTImmediate, header) == 0,
10290 "offset of GenQueriesEXTImmediate header should be 0");
10291 static_assert(offsetof(GenQueriesEXTImmediate, n) == 4,
10292 "offset of GenQueriesEXTImmediate n should be 4");
10294 struct DeleteQueriesEXTImmediate {
10295 typedef DeleteQueriesEXTImmediate ValueType;
10296 static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
10297 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10298 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10300 static uint32_t ComputeDataSize(GLsizei n) {
10301 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
10304 static uint32_t ComputeSize(GLsizei n) {
10305 return static_cast<uint32_t>(sizeof(ValueType) +
10306 ComputeDataSize(n)); // NOLINT
10309 void SetHeader(GLsizei n) {
10310 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
10313 void Init(GLsizei _n, const GLuint* _queries) {
10314 SetHeader(_n);
10315 n = _n;
10316 memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n));
10319 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
10320 static_cast<ValueType*>(cmd)->Init(_n, _queries);
10321 const uint32_t size = ComputeSize(_n);
10322 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10325 gpu::CommandHeader header;
10326 int32_t n;
10329 static_assert(sizeof(DeleteQueriesEXTImmediate) == 8,
10330 "size of DeleteQueriesEXTImmediate should be 8");
10331 static_assert(offsetof(DeleteQueriesEXTImmediate, header) == 0,
10332 "offset of DeleteQueriesEXTImmediate header should be 0");
10333 static_assert(offsetof(DeleteQueriesEXTImmediate, n) == 4,
10334 "offset of DeleteQueriesEXTImmediate n should be 4");
10336 struct BeginQueryEXT {
10337 typedef BeginQueryEXT ValueType;
10338 static const CommandId kCmdId = kBeginQueryEXT;
10339 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10340 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10342 static uint32_t ComputeSize() {
10343 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10346 void SetHeader() { header.SetCmd<ValueType>(); }
10348 void Init(GLenum _target,
10349 GLuint _id,
10350 uint32_t _sync_data_shm_id,
10351 uint32_t _sync_data_shm_offset) {
10352 SetHeader();
10353 target = _target;
10354 id = _id;
10355 sync_data_shm_id = _sync_data_shm_id;
10356 sync_data_shm_offset = _sync_data_shm_offset;
10359 void* Set(void* cmd,
10360 GLenum _target,
10361 GLuint _id,
10362 uint32_t _sync_data_shm_id,
10363 uint32_t _sync_data_shm_offset) {
10364 static_cast<ValueType*>(cmd)
10365 ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
10366 return NextCmdAddress<ValueType>(cmd);
10369 gpu::CommandHeader header;
10370 uint32_t target;
10371 uint32_t id;
10372 uint32_t sync_data_shm_id;
10373 uint32_t sync_data_shm_offset;
10376 static_assert(sizeof(BeginQueryEXT) == 20,
10377 "size of BeginQueryEXT should be 20");
10378 static_assert(offsetof(BeginQueryEXT, header) == 0,
10379 "offset of BeginQueryEXT header should be 0");
10380 static_assert(offsetof(BeginQueryEXT, target) == 4,
10381 "offset of BeginQueryEXT target should be 4");
10382 static_assert(offsetof(BeginQueryEXT, id) == 8,
10383 "offset of BeginQueryEXT id should be 8");
10384 static_assert(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
10385 "offset of BeginQueryEXT sync_data_shm_id should be 12");
10386 static_assert(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
10387 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
10389 struct BeginTransformFeedback {
10390 typedef BeginTransformFeedback ValueType;
10391 static const CommandId kCmdId = kBeginTransformFeedback;
10392 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10393 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10395 static uint32_t ComputeSize() {
10396 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10399 void SetHeader() { header.SetCmd<ValueType>(); }
10401 void Init(GLenum _primitivemode) {
10402 SetHeader();
10403 primitivemode = _primitivemode;
10406 void* Set(void* cmd, GLenum _primitivemode) {
10407 static_cast<ValueType*>(cmd)->Init(_primitivemode);
10408 return NextCmdAddress<ValueType>(cmd);
10411 gpu::CommandHeader header;
10412 uint32_t primitivemode;
10415 static_assert(sizeof(BeginTransformFeedback) == 8,
10416 "size of BeginTransformFeedback should be 8");
10417 static_assert(offsetof(BeginTransformFeedback, header) == 0,
10418 "offset of BeginTransformFeedback header should be 0");
10419 static_assert(offsetof(BeginTransformFeedback, primitivemode) == 4,
10420 "offset of BeginTransformFeedback primitivemode should be 4");
10422 struct EndQueryEXT {
10423 typedef EndQueryEXT ValueType;
10424 static const CommandId kCmdId = kEndQueryEXT;
10425 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10426 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10428 static uint32_t ComputeSize() {
10429 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10432 void SetHeader() { header.SetCmd<ValueType>(); }
10434 void Init(GLenum _target, GLuint _submit_count) {
10435 SetHeader();
10436 target = _target;
10437 submit_count = _submit_count;
10440 void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
10441 static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
10442 return NextCmdAddress<ValueType>(cmd);
10445 gpu::CommandHeader header;
10446 uint32_t target;
10447 uint32_t submit_count;
10450 static_assert(sizeof(EndQueryEXT) == 12, "size of EndQueryEXT should be 12");
10451 static_assert(offsetof(EndQueryEXT, header) == 0,
10452 "offset of EndQueryEXT header should be 0");
10453 static_assert(offsetof(EndQueryEXT, target) == 4,
10454 "offset of EndQueryEXT target should be 4");
10455 static_assert(offsetof(EndQueryEXT, submit_count) == 8,
10456 "offset of EndQueryEXT submit_count should be 8");
10458 struct EndTransformFeedback {
10459 typedef EndTransformFeedback ValueType;
10460 static const CommandId kCmdId = kEndTransformFeedback;
10461 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10462 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10464 static uint32_t ComputeSize() {
10465 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10468 void SetHeader() { header.SetCmd<ValueType>(); }
10470 void Init() { SetHeader(); }
10472 void* Set(void* cmd) {
10473 static_cast<ValueType*>(cmd)->Init();
10474 return NextCmdAddress<ValueType>(cmd);
10477 gpu::CommandHeader header;
10480 static_assert(sizeof(EndTransformFeedback) == 4,
10481 "size of EndTransformFeedback should be 4");
10482 static_assert(offsetof(EndTransformFeedback, header) == 0,
10483 "offset of EndTransformFeedback header should be 0");
10485 struct InsertEventMarkerEXT {
10486 typedef InsertEventMarkerEXT ValueType;
10487 static const CommandId kCmdId = kInsertEventMarkerEXT;
10488 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10489 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10491 static uint32_t ComputeSize() {
10492 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10495 void SetHeader() { header.SetCmd<ValueType>(); }
10497 void Init(GLuint _bucket_id) {
10498 SetHeader();
10499 bucket_id = _bucket_id;
10502 void* Set(void* cmd, GLuint _bucket_id) {
10503 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10504 return NextCmdAddress<ValueType>(cmd);
10507 gpu::CommandHeader header;
10508 uint32_t bucket_id;
10511 static_assert(sizeof(InsertEventMarkerEXT) == 8,
10512 "size of InsertEventMarkerEXT should be 8");
10513 static_assert(offsetof(InsertEventMarkerEXT, header) == 0,
10514 "offset of InsertEventMarkerEXT header should be 0");
10515 static_assert(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
10516 "offset of InsertEventMarkerEXT bucket_id should be 4");
10518 struct PushGroupMarkerEXT {
10519 typedef PushGroupMarkerEXT ValueType;
10520 static const CommandId kCmdId = kPushGroupMarkerEXT;
10521 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10522 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10524 static uint32_t ComputeSize() {
10525 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10528 void SetHeader() { header.SetCmd<ValueType>(); }
10530 void Init(GLuint _bucket_id) {
10531 SetHeader();
10532 bucket_id = _bucket_id;
10535 void* Set(void* cmd, GLuint _bucket_id) {
10536 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10537 return NextCmdAddress<ValueType>(cmd);
10540 gpu::CommandHeader header;
10541 uint32_t bucket_id;
10544 static_assert(sizeof(PushGroupMarkerEXT) == 8,
10545 "size of PushGroupMarkerEXT should be 8");
10546 static_assert(offsetof(PushGroupMarkerEXT, header) == 0,
10547 "offset of PushGroupMarkerEXT header should be 0");
10548 static_assert(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
10549 "offset of PushGroupMarkerEXT bucket_id should be 4");
10551 struct PopGroupMarkerEXT {
10552 typedef PopGroupMarkerEXT ValueType;
10553 static const CommandId kCmdId = kPopGroupMarkerEXT;
10554 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10555 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10557 static uint32_t ComputeSize() {
10558 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10561 void SetHeader() { header.SetCmd<ValueType>(); }
10563 void Init() { SetHeader(); }
10565 void* Set(void* cmd) {
10566 static_cast<ValueType*>(cmd)->Init();
10567 return NextCmdAddress<ValueType>(cmd);
10570 gpu::CommandHeader header;
10573 static_assert(sizeof(PopGroupMarkerEXT) == 4,
10574 "size of PopGroupMarkerEXT should be 4");
10575 static_assert(offsetof(PopGroupMarkerEXT, header) == 0,
10576 "offset of PopGroupMarkerEXT header should be 0");
10578 struct GenVertexArraysOESImmediate {
10579 typedef GenVertexArraysOESImmediate ValueType;
10580 static const CommandId kCmdId = kGenVertexArraysOESImmediate;
10581 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10582 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10584 static uint32_t ComputeDataSize(GLsizei n) {
10585 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
10588 static uint32_t ComputeSize(GLsizei n) {
10589 return static_cast<uint32_t>(sizeof(ValueType) +
10590 ComputeDataSize(n)); // NOLINT
10593 void SetHeader(GLsizei n) {
10594 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
10597 void Init(GLsizei _n, GLuint* _arrays) {
10598 SetHeader(_n);
10599 n = _n;
10600 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
10603 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
10604 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
10605 const uint32_t size = ComputeSize(_n);
10606 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10609 gpu::CommandHeader header;
10610 int32_t n;
10613 static_assert(sizeof(GenVertexArraysOESImmediate) == 8,
10614 "size of GenVertexArraysOESImmediate should be 8");
10615 static_assert(offsetof(GenVertexArraysOESImmediate, header) == 0,
10616 "offset of GenVertexArraysOESImmediate header should be 0");
10617 static_assert(offsetof(GenVertexArraysOESImmediate, n) == 4,
10618 "offset of GenVertexArraysOESImmediate n should be 4");
10620 struct DeleteVertexArraysOESImmediate {
10621 typedef DeleteVertexArraysOESImmediate ValueType;
10622 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
10623 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
10624 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10626 static uint32_t ComputeDataSize(GLsizei n) {
10627 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
10630 static uint32_t ComputeSize(GLsizei n) {
10631 return static_cast<uint32_t>(sizeof(ValueType) +
10632 ComputeDataSize(n)); // NOLINT
10635 void SetHeader(GLsizei n) {
10636 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
10639 void Init(GLsizei _n, const GLuint* _arrays) {
10640 SetHeader(_n);
10641 n = _n;
10642 memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n));
10645 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
10646 static_cast<ValueType*>(cmd)->Init(_n, _arrays);
10647 const uint32_t size = ComputeSize(_n);
10648 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
10651 gpu::CommandHeader header;
10652 int32_t n;
10655 static_assert(sizeof(DeleteVertexArraysOESImmediate) == 8,
10656 "size of DeleteVertexArraysOESImmediate should be 8");
10657 static_assert(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
10658 "offset of DeleteVertexArraysOESImmediate header should be 0");
10659 static_assert(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
10660 "offset of DeleteVertexArraysOESImmediate n should be 4");
10662 struct IsVertexArrayOES {
10663 typedef IsVertexArrayOES ValueType;
10664 static const CommandId kCmdId = kIsVertexArrayOES;
10665 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10666 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10668 typedef uint32_t Result;
10670 static uint32_t ComputeSize() {
10671 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10674 void SetHeader() { header.SetCmd<ValueType>(); }
10676 void Init(GLuint _array,
10677 uint32_t _result_shm_id,
10678 uint32_t _result_shm_offset) {
10679 SetHeader();
10680 array = _array;
10681 result_shm_id = _result_shm_id;
10682 result_shm_offset = _result_shm_offset;
10685 void* Set(void* cmd,
10686 GLuint _array,
10687 uint32_t _result_shm_id,
10688 uint32_t _result_shm_offset) {
10689 static_cast<ValueType*>(cmd)
10690 ->Init(_array, _result_shm_id, _result_shm_offset);
10691 return NextCmdAddress<ValueType>(cmd);
10694 gpu::CommandHeader header;
10695 uint32_t array;
10696 uint32_t result_shm_id;
10697 uint32_t result_shm_offset;
10700 static_assert(sizeof(IsVertexArrayOES) == 16,
10701 "size of IsVertexArrayOES should be 16");
10702 static_assert(offsetof(IsVertexArrayOES, header) == 0,
10703 "offset of IsVertexArrayOES header should be 0");
10704 static_assert(offsetof(IsVertexArrayOES, array) == 4,
10705 "offset of IsVertexArrayOES array should be 4");
10706 static_assert(offsetof(IsVertexArrayOES, result_shm_id) == 8,
10707 "offset of IsVertexArrayOES result_shm_id should be 8");
10708 static_assert(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
10709 "offset of IsVertexArrayOES result_shm_offset should be 12");
10711 struct BindVertexArrayOES {
10712 typedef BindVertexArrayOES ValueType;
10713 static const CommandId kCmdId = kBindVertexArrayOES;
10714 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10715 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10717 static uint32_t ComputeSize() {
10718 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10721 void SetHeader() { header.SetCmd<ValueType>(); }
10723 void Init(GLuint _array) {
10724 SetHeader();
10725 array = _array;
10728 void* Set(void* cmd, GLuint _array) {
10729 static_cast<ValueType*>(cmd)->Init(_array);
10730 return NextCmdAddress<ValueType>(cmd);
10733 gpu::CommandHeader header;
10734 uint32_t array;
10737 static_assert(sizeof(BindVertexArrayOES) == 8,
10738 "size of BindVertexArrayOES should be 8");
10739 static_assert(offsetof(BindVertexArrayOES, header) == 0,
10740 "offset of BindVertexArrayOES header should be 0");
10741 static_assert(offsetof(BindVertexArrayOES, array) == 4,
10742 "offset of BindVertexArrayOES array should be 4");
10744 struct SwapBuffers {
10745 typedef SwapBuffers ValueType;
10746 static const CommandId kCmdId = kSwapBuffers;
10747 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10748 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
10750 static uint32_t ComputeSize() {
10751 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10754 void SetHeader() { header.SetCmd<ValueType>(); }
10756 void Init() { SetHeader(); }
10758 void* Set(void* cmd) {
10759 static_cast<ValueType*>(cmd)->Init();
10760 return NextCmdAddress<ValueType>(cmd);
10763 gpu::CommandHeader header;
10766 static_assert(sizeof(SwapBuffers) == 4, "size of SwapBuffers should be 4");
10767 static_assert(offsetof(SwapBuffers, header) == 0,
10768 "offset of SwapBuffers header should be 0");
10770 struct GetMaxValueInBufferCHROMIUM {
10771 typedef GetMaxValueInBufferCHROMIUM ValueType;
10772 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
10773 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10776 typedef GLuint Result;
10778 static uint32_t ComputeSize() {
10779 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10782 void SetHeader() { header.SetCmd<ValueType>(); }
10784 void Init(GLuint _buffer_id,
10785 GLsizei _count,
10786 GLenum _type,
10787 GLuint _offset,
10788 uint32_t _result_shm_id,
10789 uint32_t _result_shm_offset) {
10790 SetHeader();
10791 buffer_id = _buffer_id;
10792 count = _count;
10793 type = _type;
10794 offset = _offset;
10795 result_shm_id = _result_shm_id;
10796 result_shm_offset = _result_shm_offset;
10799 void* Set(void* cmd,
10800 GLuint _buffer_id,
10801 GLsizei _count,
10802 GLenum _type,
10803 GLuint _offset,
10804 uint32_t _result_shm_id,
10805 uint32_t _result_shm_offset) {
10806 static_cast<ValueType*>(cmd)->Init(_buffer_id, _count, _type, _offset,
10807 _result_shm_id, _result_shm_offset);
10808 return NextCmdAddress<ValueType>(cmd);
10811 gpu::CommandHeader header;
10812 uint32_t buffer_id;
10813 int32_t count;
10814 uint32_t type;
10815 uint32_t offset;
10816 uint32_t result_shm_id;
10817 uint32_t result_shm_offset;
10820 static_assert(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
10821 "size of GetMaxValueInBufferCHROMIUM should be 28");
10822 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
10823 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
10824 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
10825 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
10826 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
10827 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
10828 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
10829 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
10830 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
10831 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
10832 static_assert(
10833 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
10834 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
10835 static_assert(
10836 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
10837 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
10839 struct EnableFeatureCHROMIUM {
10840 typedef EnableFeatureCHROMIUM ValueType;
10841 static const CommandId kCmdId = kEnableFeatureCHROMIUM;
10842 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10843 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10845 typedef GLint Result;
10847 static uint32_t ComputeSize() {
10848 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10851 void SetHeader() { header.SetCmd<ValueType>(); }
10853 void Init(GLuint _bucket_id,
10854 uint32_t _result_shm_id,
10855 uint32_t _result_shm_offset) {
10856 SetHeader();
10857 bucket_id = _bucket_id;
10858 result_shm_id = _result_shm_id;
10859 result_shm_offset = _result_shm_offset;
10862 void* Set(void* cmd,
10863 GLuint _bucket_id,
10864 uint32_t _result_shm_id,
10865 uint32_t _result_shm_offset) {
10866 static_cast<ValueType*>(cmd)
10867 ->Init(_bucket_id, _result_shm_id, _result_shm_offset);
10868 return NextCmdAddress<ValueType>(cmd);
10871 gpu::CommandHeader header;
10872 uint32_t bucket_id;
10873 uint32_t result_shm_id;
10874 uint32_t result_shm_offset;
10877 static_assert(sizeof(EnableFeatureCHROMIUM) == 16,
10878 "size of EnableFeatureCHROMIUM should be 16");
10879 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0,
10880 "offset of EnableFeatureCHROMIUM header should be 0");
10881 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
10882 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
10883 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
10884 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
10885 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
10886 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
10888 struct ResizeCHROMIUM {
10889 typedef ResizeCHROMIUM ValueType;
10890 static const CommandId kCmdId = kResizeCHROMIUM;
10891 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10892 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10894 static uint32_t ComputeSize() {
10895 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10898 void SetHeader() { header.SetCmd<ValueType>(); }
10900 void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
10901 SetHeader();
10902 width = _width;
10903 height = _height;
10904 scale_factor = _scale_factor;
10907 void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
10908 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
10909 return NextCmdAddress<ValueType>(cmd);
10912 gpu::CommandHeader header;
10913 uint32_t width;
10914 uint32_t height;
10915 float scale_factor;
10918 static_assert(sizeof(ResizeCHROMIUM) == 16,
10919 "size of ResizeCHROMIUM should be 16");
10920 static_assert(offsetof(ResizeCHROMIUM, header) == 0,
10921 "offset of ResizeCHROMIUM header should be 0");
10922 static_assert(offsetof(ResizeCHROMIUM, width) == 4,
10923 "offset of ResizeCHROMIUM width should be 4");
10924 static_assert(offsetof(ResizeCHROMIUM, height) == 8,
10925 "offset of ResizeCHROMIUM height should be 8");
10926 static_assert(offsetof(ResizeCHROMIUM, scale_factor) == 12,
10927 "offset of ResizeCHROMIUM scale_factor should be 12");
10929 struct GetRequestableExtensionsCHROMIUM {
10930 typedef GetRequestableExtensionsCHROMIUM ValueType;
10931 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
10932 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10933 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10935 static uint32_t ComputeSize() {
10936 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10939 void SetHeader() { header.SetCmd<ValueType>(); }
10941 void Init(uint32_t _bucket_id) {
10942 SetHeader();
10943 bucket_id = _bucket_id;
10946 void* Set(void* cmd, uint32_t _bucket_id) {
10947 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10948 return NextCmdAddress<ValueType>(cmd);
10951 gpu::CommandHeader header;
10952 uint32_t bucket_id;
10955 static_assert(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
10956 "size of GetRequestableExtensionsCHROMIUM should be 8");
10957 static_assert(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
10958 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
10959 static_assert(
10960 offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
10961 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
10963 struct RequestExtensionCHROMIUM {
10964 typedef RequestExtensionCHROMIUM ValueType;
10965 static const CommandId kCmdId = kRequestExtensionCHROMIUM;
10966 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10967 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10969 static uint32_t ComputeSize() {
10970 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10973 void SetHeader() { header.SetCmd<ValueType>(); }
10975 void Init(uint32_t _bucket_id) {
10976 SetHeader();
10977 bucket_id = _bucket_id;
10980 void* Set(void* cmd, uint32_t _bucket_id) {
10981 static_cast<ValueType*>(cmd)->Init(_bucket_id);
10982 return NextCmdAddress<ValueType>(cmd);
10985 gpu::CommandHeader header;
10986 uint32_t bucket_id;
10989 static_assert(sizeof(RequestExtensionCHROMIUM) == 8,
10990 "size of RequestExtensionCHROMIUM should be 8");
10991 static_assert(offsetof(RequestExtensionCHROMIUM, header) == 0,
10992 "offset of RequestExtensionCHROMIUM header should be 0");
10993 static_assert(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
10994 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
10996 struct GetProgramInfoCHROMIUM {
10997 typedef GetProgramInfoCHROMIUM ValueType;
10998 static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
10999 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11002 struct Result {
11003 uint32_t link_status;
11004 uint32_t num_attribs;
11005 uint32_t num_uniforms;
11008 static uint32_t ComputeSize() {
11009 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11012 void SetHeader() { header.SetCmd<ValueType>(); }
11014 void Init(GLuint _program, uint32_t _bucket_id) {
11015 SetHeader();
11016 program = _program;
11017 bucket_id = _bucket_id;
11020 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11021 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11022 return NextCmdAddress<ValueType>(cmd);
11025 gpu::CommandHeader header;
11026 uint32_t program;
11027 uint32_t bucket_id;
11030 static_assert(sizeof(GetProgramInfoCHROMIUM) == 12,
11031 "size of GetProgramInfoCHROMIUM should be 12");
11032 static_assert(offsetof(GetProgramInfoCHROMIUM, header) == 0,
11033 "offset of GetProgramInfoCHROMIUM header should be 0");
11034 static_assert(offsetof(GetProgramInfoCHROMIUM, program) == 4,
11035 "offset of GetProgramInfoCHROMIUM program should be 4");
11036 static_assert(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
11037 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11038 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
11039 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11040 "0");
11041 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
11042 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11043 "4");
11044 static_assert(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
11045 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11046 "8");
11048 struct GetUniformBlocksCHROMIUM {
11049 typedef GetUniformBlocksCHROMIUM ValueType;
11050 static const CommandId kCmdId = kGetUniformBlocksCHROMIUM;
11051 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11052 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11054 typedef uint32_t Result;
11056 static uint32_t ComputeSize() {
11057 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11060 void SetHeader() { header.SetCmd<ValueType>(); }
11062 void Init(GLuint _program, uint32_t _bucket_id) {
11063 SetHeader();
11064 program = _program;
11065 bucket_id = _bucket_id;
11068 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11069 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11070 return NextCmdAddress<ValueType>(cmd);
11073 gpu::CommandHeader header;
11074 uint32_t program;
11075 uint32_t bucket_id;
11078 static_assert(sizeof(GetUniformBlocksCHROMIUM) == 12,
11079 "size of GetUniformBlocksCHROMIUM should be 12");
11080 static_assert(offsetof(GetUniformBlocksCHROMIUM, header) == 0,
11081 "offset of GetUniformBlocksCHROMIUM header should be 0");
11082 static_assert(offsetof(GetUniformBlocksCHROMIUM, program) == 4,
11083 "offset of GetUniformBlocksCHROMIUM program should be 4");
11084 static_assert(offsetof(GetUniformBlocksCHROMIUM, bucket_id) == 8,
11085 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11087 struct GetTransformFeedbackVaryingsCHROMIUM {
11088 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType;
11089 static const CommandId kCmdId = kGetTransformFeedbackVaryingsCHROMIUM;
11090 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11091 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11093 typedef uint32_t Result;
11095 static uint32_t ComputeSize() {
11096 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11099 void SetHeader() { header.SetCmd<ValueType>(); }
11101 void Init(GLuint _program, uint32_t _bucket_id) {
11102 SetHeader();
11103 program = _program;
11104 bucket_id = _bucket_id;
11107 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11108 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11109 return NextCmdAddress<ValueType>(cmd);
11112 gpu::CommandHeader header;
11113 uint32_t program;
11114 uint32_t bucket_id;
11117 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM) == 12,
11118 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11119 static_assert(
11120 offsetof(GetTransformFeedbackVaryingsCHROMIUM, header) == 0,
11121 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11122 static_assert(
11123 offsetof(GetTransformFeedbackVaryingsCHROMIUM, program) == 4,
11124 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11125 static_assert(
11126 offsetof(GetTransformFeedbackVaryingsCHROMIUM, bucket_id) == 8,
11127 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11129 struct GetUniformsES3CHROMIUM {
11130 typedef GetUniformsES3CHROMIUM ValueType;
11131 static const CommandId kCmdId = kGetUniformsES3CHROMIUM;
11132 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11133 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11135 typedef uint32_t Result;
11137 static uint32_t ComputeSize() {
11138 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11141 void SetHeader() { header.SetCmd<ValueType>(); }
11143 void Init(GLuint _program, uint32_t _bucket_id) {
11144 SetHeader();
11145 program = _program;
11146 bucket_id = _bucket_id;
11149 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) {
11150 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
11151 return NextCmdAddress<ValueType>(cmd);
11154 gpu::CommandHeader header;
11155 uint32_t program;
11156 uint32_t bucket_id;
11159 static_assert(sizeof(GetUniformsES3CHROMIUM) == 12,
11160 "size of GetUniformsES3CHROMIUM should be 12");
11161 static_assert(offsetof(GetUniformsES3CHROMIUM, header) == 0,
11162 "offset of GetUniformsES3CHROMIUM header should be 0");
11163 static_assert(offsetof(GetUniformsES3CHROMIUM, program) == 4,
11164 "offset of GetUniformsES3CHROMIUM program should be 4");
11165 static_assert(offsetof(GetUniformsES3CHROMIUM, bucket_id) == 8,
11166 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
11168 struct GetTranslatedShaderSourceANGLE {
11169 typedef GetTranslatedShaderSourceANGLE ValueType;
11170 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
11171 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11172 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11174 static uint32_t ComputeSize() {
11175 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11178 void SetHeader() { header.SetCmd<ValueType>(); }
11180 void Init(GLuint _shader, uint32_t _bucket_id) {
11181 SetHeader();
11182 shader = _shader;
11183 bucket_id = _bucket_id;
11186 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) {
11187 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
11188 return NextCmdAddress<ValueType>(cmd);
11191 gpu::CommandHeader header;
11192 uint32_t shader;
11193 uint32_t bucket_id;
11196 static_assert(sizeof(GetTranslatedShaderSourceANGLE) == 12,
11197 "size of GetTranslatedShaderSourceANGLE should be 12");
11198 static_assert(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
11199 "offset of GetTranslatedShaderSourceANGLE header should be 0");
11200 static_assert(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
11201 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
11202 static_assert(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
11203 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
11205 struct PostSubBufferCHROMIUM {
11206 typedef PostSubBufferCHROMIUM ValueType;
11207 static const CommandId kCmdId = kPostSubBufferCHROMIUM;
11208 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11209 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11211 static uint32_t ComputeSize() {
11212 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11215 void SetHeader() { header.SetCmd<ValueType>(); }
11217 void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
11218 SetHeader();
11219 x = _x;
11220 y = _y;
11221 width = _width;
11222 height = _height;
11225 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
11226 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
11227 return NextCmdAddress<ValueType>(cmd);
11230 gpu::CommandHeader header;
11231 int32_t x;
11232 int32_t y;
11233 int32_t width;
11234 int32_t height;
11237 static_assert(sizeof(PostSubBufferCHROMIUM) == 20,
11238 "size of PostSubBufferCHROMIUM should be 20");
11239 static_assert(offsetof(PostSubBufferCHROMIUM, header) == 0,
11240 "offset of PostSubBufferCHROMIUM header should be 0");
11241 static_assert(offsetof(PostSubBufferCHROMIUM, x) == 4,
11242 "offset of PostSubBufferCHROMIUM x should be 4");
11243 static_assert(offsetof(PostSubBufferCHROMIUM, y) == 8,
11244 "offset of PostSubBufferCHROMIUM y should be 8");
11245 static_assert(offsetof(PostSubBufferCHROMIUM, width) == 12,
11246 "offset of PostSubBufferCHROMIUM width should be 12");
11247 static_assert(offsetof(PostSubBufferCHROMIUM, height) == 16,
11248 "offset of PostSubBufferCHROMIUM height should be 16");
11250 struct TexImageIOSurface2DCHROMIUM {
11251 typedef TexImageIOSurface2DCHROMIUM ValueType;
11252 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
11253 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11254 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11256 static uint32_t ComputeSize() {
11257 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11260 void SetHeader() { header.SetCmd<ValueType>(); }
11262 void Init(GLenum _target,
11263 GLsizei _width,
11264 GLsizei _height,
11265 GLuint _ioSurfaceId,
11266 GLuint _plane) {
11267 SetHeader();
11268 target = _target;
11269 width = _width;
11270 height = _height;
11271 ioSurfaceId = _ioSurfaceId;
11272 plane = _plane;
11275 void* Set(void* cmd,
11276 GLenum _target,
11277 GLsizei _width,
11278 GLsizei _height,
11279 GLuint _ioSurfaceId,
11280 GLuint _plane) {
11281 static_cast<ValueType*>(cmd)
11282 ->Init(_target, _width, _height, _ioSurfaceId, _plane);
11283 return NextCmdAddress<ValueType>(cmd);
11286 gpu::CommandHeader header;
11287 uint32_t target;
11288 int32_t width;
11289 int32_t height;
11290 uint32_t ioSurfaceId;
11291 uint32_t plane;
11294 static_assert(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
11295 "size of TexImageIOSurface2DCHROMIUM should be 24");
11296 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
11297 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
11298 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
11299 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
11300 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
11301 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
11302 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
11303 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
11304 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
11305 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
11306 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
11307 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
11309 struct CopyTextureCHROMIUM {
11310 typedef CopyTextureCHROMIUM ValueType;
11311 static const CommandId kCmdId = kCopyTextureCHROMIUM;
11312 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11313 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11315 static uint32_t ComputeSize() {
11316 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11319 void SetHeader() { header.SetCmd<ValueType>(); }
11321 void Init(GLenum _target,
11322 GLenum _source_id,
11323 GLenum _dest_id,
11324 GLint _level,
11325 GLint _internalformat,
11326 GLenum _dest_type) {
11327 SetHeader();
11328 target = _target;
11329 source_id = _source_id;
11330 dest_id = _dest_id;
11331 level = _level;
11332 internalformat = _internalformat;
11333 dest_type = _dest_type;
11336 void* Set(void* cmd,
11337 GLenum _target,
11338 GLenum _source_id,
11339 GLenum _dest_id,
11340 GLint _level,
11341 GLint _internalformat,
11342 GLenum _dest_type) {
11343 static_cast<ValueType*>(cmd)->Init(_target, _source_id, _dest_id, _level,
11344 _internalformat, _dest_type);
11345 return NextCmdAddress<ValueType>(cmd);
11348 gpu::CommandHeader header;
11349 uint32_t target;
11350 uint32_t source_id;
11351 uint32_t dest_id;
11352 int32_t level;
11353 int32_t internalformat;
11354 uint32_t dest_type;
11357 static_assert(sizeof(CopyTextureCHROMIUM) == 28,
11358 "size of CopyTextureCHROMIUM should be 28");
11359 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0,
11360 "offset of CopyTextureCHROMIUM header should be 0");
11361 static_assert(offsetof(CopyTextureCHROMIUM, target) == 4,
11362 "offset of CopyTextureCHROMIUM target should be 4");
11363 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 8,
11364 "offset of CopyTextureCHROMIUM source_id should be 8");
11365 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
11366 "offset of CopyTextureCHROMIUM dest_id should be 12");
11367 static_assert(offsetof(CopyTextureCHROMIUM, level) == 16,
11368 "offset of CopyTextureCHROMIUM level should be 16");
11369 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 20,
11370 "offset of CopyTextureCHROMIUM internalformat should be 20");
11371 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 24,
11372 "offset of CopyTextureCHROMIUM dest_type should be 24");
11374 struct DrawArraysInstancedANGLE {
11375 typedef DrawArraysInstancedANGLE ValueType;
11376 static const CommandId kCmdId = kDrawArraysInstancedANGLE;
11377 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11378 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11380 static uint32_t ComputeSize() {
11381 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11384 void SetHeader() { header.SetCmd<ValueType>(); }
11386 void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
11387 SetHeader();
11388 mode = _mode;
11389 first = _first;
11390 count = _count;
11391 primcount = _primcount;
11394 void* Set(void* cmd,
11395 GLenum _mode,
11396 GLint _first,
11397 GLsizei _count,
11398 GLsizei _primcount) {
11399 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
11400 return NextCmdAddress<ValueType>(cmd);
11403 gpu::CommandHeader header;
11404 uint32_t mode;
11405 int32_t first;
11406 int32_t count;
11407 int32_t primcount;
11410 static_assert(sizeof(DrawArraysInstancedANGLE) == 20,
11411 "size of DrawArraysInstancedANGLE should be 20");
11412 static_assert(offsetof(DrawArraysInstancedANGLE, header) == 0,
11413 "offset of DrawArraysInstancedANGLE header should be 0");
11414 static_assert(offsetof(DrawArraysInstancedANGLE, mode) == 4,
11415 "offset of DrawArraysInstancedANGLE mode should be 4");
11416 static_assert(offsetof(DrawArraysInstancedANGLE, first) == 8,
11417 "offset of DrawArraysInstancedANGLE first should be 8");
11418 static_assert(offsetof(DrawArraysInstancedANGLE, count) == 12,
11419 "offset of DrawArraysInstancedANGLE count should be 12");
11420 static_assert(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
11421 "offset of DrawArraysInstancedANGLE primcount should be 16");
11423 struct DrawElementsInstancedANGLE {
11424 typedef DrawElementsInstancedANGLE ValueType;
11425 static const CommandId kCmdId = kDrawElementsInstancedANGLE;
11426 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11427 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11429 static uint32_t ComputeSize() {
11430 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11433 void SetHeader() { header.SetCmd<ValueType>(); }
11435 void Init(GLenum _mode,
11436 GLsizei _count,
11437 GLenum _type,
11438 GLuint _index_offset,
11439 GLsizei _primcount) {
11440 SetHeader();
11441 mode = _mode;
11442 count = _count;
11443 type = _type;
11444 index_offset = _index_offset;
11445 primcount = _primcount;
11448 void* Set(void* cmd,
11449 GLenum _mode,
11450 GLsizei _count,
11451 GLenum _type,
11452 GLuint _index_offset,
11453 GLsizei _primcount) {
11454 static_cast<ValueType*>(cmd)
11455 ->Init(_mode, _count, _type, _index_offset, _primcount);
11456 return NextCmdAddress<ValueType>(cmd);
11459 gpu::CommandHeader header;
11460 uint32_t mode;
11461 int32_t count;
11462 uint32_t type;
11463 uint32_t index_offset;
11464 int32_t primcount;
11467 static_assert(sizeof(DrawElementsInstancedANGLE) == 24,
11468 "size of DrawElementsInstancedANGLE should be 24");
11469 static_assert(offsetof(DrawElementsInstancedANGLE, header) == 0,
11470 "offset of DrawElementsInstancedANGLE header should be 0");
11471 static_assert(offsetof(DrawElementsInstancedANGLE, mode) == 4,
11472 "offset of DrawElementsInstancedANGLE mode should be 4");
11473 static_assert(offsetof(DrawElementsInstancedANGLE, count) == 8,
11474 "offset of DrawElementsInstancedANGLE count should be 8");
11475 static_assert(offsetof(DrawElementsInstancedANGLE, type) == 12,
11476 "offset of DrawElementsInstancedANGLE type should be 12");
11477 static_assert(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
11478 "offset of DrawElementsInstancedANGLE index_offset should be 16");
11479 static_assert(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
11480 "offset of DrawElementsInstancedANGLE primcount should be 20");
11482 struct VertexAttribDivisorANGLE {
11483 typedef VertexAttribDivisorANGLE ValueType;
11484 static const CommandId kCmdId = kVertexAttribDivisorANGLE;
11485 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11486 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11488 static uint32_t ComputeSize() {
11489 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11492 void SetHeader() { header.SetCmd<ValueType>(); }
11494 void Init(GLuint _index, GLuint _divisor) {
11495 SetHeader();
11496 index = _index;
11497 divisor = _divisor;
11500 void* Set(void* cmd, GLuint _index, GLuint _divisor) {
11501 static_cast<ValueType*>(cmd)->Init(_index, _divisor);
11502 return NextCmdAddress<ValueType>(cmd);
11505 gpu::CommandHeader header;
11506 uint32_t index;
11507 uint32_t divisor;
11510 static_assert(sizeof(VertexAttribDivisorANGLE) == 12,
11511 "size of VertexAttribDivisorANGLE should be 12");
11512 static_assert(offsetof(VertexAttribDivisorANGLE, header) == 0,
11513 "offset of VertexAttribDivisorANGLE header should be 0");
11514 static_assert(offsetof(VertexAttribDivisorANGLE, index) == 4,
11515 "offset of VertexAttribDivisorANGLE index should be 4");
11516 static_assert(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
11517 "offset of VertexAttribDivisorANGLE divisor should be 8");
11519 struct ProduceTextureCHROMIUMImmediate {
11520 typedef ProduceTextureCHROMIUMImmediate ValueType;
11521 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
11522 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11523 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11525 static uint32_t ComputeDataSize() {
11526 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
11529 static uint32_t ComputeSize() {
11530 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
11533 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
11535 void Init(GLenum _target, const GLbyte* _mailbox) {
11536 SetHeader();
11537 target = _target;
11538 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
11541 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
11542 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
11543 const uint32_t size = ComputeSize();
11544 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11547 gpu::CommandHeader header;
11548 uint32_t target;
11551 static_assert(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
11552 "size of ProduceTextureCHROMIUMImmediate should be 8");
11553 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
11554 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
11555 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
11556 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
11558 struct ProduceTextureDirectCHROMIUMImmediate {
11559 typedef ProduceTextureDirectCHROMIUMImmediate ValueType;
11560 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate;
11561 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11562 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11564 static uint32_t ComputeDataSize() {
11565 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
11568 static uint32_t ComputeSize() {
11569 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
11572 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
11574 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) {
11575 SetHeader();
11576 texture = _texture;
11577 target = _target;
11578 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
11581 void* Set(void* cmd,
11582 GLuint _texture,
11583 GLenum _target,
11584 const GLbyte* _mailbox) {
11585 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox);
11586 const uint32_t size = ComputeSize();
11587 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11590 gpu::CommandHeader header;
11591 uint32_t texture;
11592 uint32_t target;
11595 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12,
11596 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
11597 static_assert(
11598 offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0,
11599 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
11600 static_assert(
11601 offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4,
11602 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
11603 static_assert(
11604 offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8,
11605 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
11607 struct ConsumeTextureCHROMIUMImmediate {
11608 typedef ConsumeTextureCHROMIUMImmediate ValueType;
11609 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
11610 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11611 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
11613 static uint32_t ComputeDataSize() {
11614 return static_cast<uint32_t>(sizeof(GLbyte) * 64);
11617 static uint32_t ComputeSize() {
11618 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
11621 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
11623 void Init(GLenum _target, const GLbyte* _mailbox) {
11624 SetHeader();
11625 target = _target;
11626 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
11629 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
11630 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
11631 const uint32_t size = ComputeSize();
11632 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11635 gpu::CommandHeader header;
11636 uint32_t target;
11639 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
11640 "size of ConsumeTextureCHROMIUMImmediate should be 8");
11641 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
11642 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
11643 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
11644 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
11646 struct BindUniformLocationCHROMIUMBucket {
11647 typedef BindUniformLocationCHROMIUMBucket ValueType;
11648 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
11649 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11650 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11652 static uint32_t ComputeSize() {
11653 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11656 void SetHeader() { header.SetCmd<ValueType>(); }
11658 void Init(GLuint _program, GLint _location, uint32_t _name_bucket_id) {
11659 SetHeader();
11660 program = _program;
11661 location = _location;
11662 name_bucket_id = _name_bucket_id;
11665 void* Set(void* cmd,
11666 GLuint _program,
11667 GLint _location,
11668 uint32_t _name_bucket_id) {
11669 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
11670 return NextCmdAddress<ValueType>(cmd);
11673 gpu::CommandHeader header;
11674 uint32_t program;
11675 int32_t location;
11676 uint32_t name_bucket_id;
11679 static_assert(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
11680 "size of BindUniformLocationCHROMIUMBucket should be 16");
11681 static_assert(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
11682 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
11683 static_assert(
11684 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
11685 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
11686 static_assert(
11687 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
11688 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
11689 static_assert(
11690 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
11691 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
11693 struct GenValuebuffersCHROMIUMImmediate {
11694 typedef GenValuebuffersCHROMIUMImmediate ValueType;
11695 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate;
11696 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11697 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11699 static uint32_t ComputeDataSize(GLsizei n) {
11700 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11703 static uint32_t ComputeSize(GLsizei n) {
11704 return static_cast<uint32_t>(sizeof(ValueType) +
11705 ComputeDataSize(n)); // NOLINT
11708 void SetHeader(GLsizei n) {
11709 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11712 void Init(GLsizei _n, GLuint* _buffers) {
11713 SetHeader(_n);
11714 n = _n;
11715 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
11718 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
11719 static_cast<ValueType*>(cmd)->Init(_n, _buffers);
11720 const uint32_t size = ComputeSize(_n);
11721 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11724 gpu::CommandHeader header;
11725 int32_t n;
11728 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate) == 8,
11729 "size of GenValuebuffersCHROMIUMImmediate should be 8");
11730 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0,
11731 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
11732 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4,
11733 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
11735 struct DeleteValuebuffersCHROMIUMImmediate {
11736 typedef DeleteValuebuffersCHROMIUMImmediate ValueType;
11737 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate;
11738 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
11739 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11741 static uint32_t ComputeDataSize(GLsizei n) {
11742 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT
11745 static uint32_t ComputeSize(GLsizei n) {
11746 return static_cast<uint32_t>(sizeof(ValueType) +
11747 ComputeDataSize(n)); // NOLINT
11750 void SetHeader(GLsizei n) {
11751 header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
11754 void Init(GLsizei _n, const GLuint* _valuebuffers) {
11755 SetHeader(_n);
11756 n = _n;
11757 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n));
11760 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) {
11761 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers);
11762 const uint32_t size = ComputeSize(_n);
11763 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
11766 gpu::CommandHeader header;
11767 int32_t n;
11770 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8,
11771 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
11772 static_assert(
11773 offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0,
11774 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
11775 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4,
11776 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
11778 struct IsValuebufferCHROMIUM {
11779 typedef IsValuebufferCHROMIUM ValueType;
11780 static const CommandId kCmdId = kIsValuebufferCHROMIUM;
11781 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11782 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11784 typedef uint32_t Result;
11786 static uint32_t ComputeSize() {
11787 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11790 void SetHeader() { header.SetCmd<ValueType>(); }
11792 void Init(GLuint _valuebuffer,
11793 uint32_t _result_shm_id,
11794 uint32_t _result_shm_offset) {
11795 SetHeader();
11796 valuebuffer = _valuebuffer;
11797 result_shm_id = _result_shm_id;
11798 result_shm_offset = _result_shm_offset;
11801 void* Set(void* cmd,
11802 GLuint _valuebuffer,
11803 uint32_t _result_shm_id,
11804 uint32_t _result_shm_offset) {
11805 static_cast<ValueType*>(cmd)
11806 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset);
11807 return NextCmdAddress<ValueType>(cmd);
11810 gpu::CommandHeader header;
11811 uint32_t valuebuffer;
11812 uint32_t result_shm_id;
11813 uint32_t result_shm_offset;
11816 static_assert(sizeof(IsValuebufferCHROMIUM) == 16,
11817 "size of IsValuebufferCHROMIUM should be 16");
11818 static_assert(offsetof(IsValuebufferCHROMIUM, header) == 0,
11819 "offset of IsValuebufferCHROMIUM header should be 0");
11820 static_assert(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4,
11821 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
11822 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8,
11823 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
11824 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12,
11825 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
11827 struct BindValuebufferCHROMIUM {
11828 typedef BindValuebufferCHROMIUM ValueType;
11829 static const CommandId kCmdId = kBindValuebufferCHROMIUM;
11830 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11831 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11833 static uint32_t ComputeSize() {
11834 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11837 void SetHeader() { header.SetCmd<ValueType>(); }
11839 void Init(GLenum _target, GLuint _valuebuffer) {
11840 SetHeader();
11841 target = _target;
11842 valuebuffer = _valuebuffer;
11845 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) {
11846 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer);
11847 return NextCmdAddress<ValueType>(cmd);
11850 gpu::CommandHeader header;
11851 uint32_t target;
11852 uint32_t valuebuffer;
11855 static_assert(sizeof(BindValuebufferCHROMIUM) == 12,
11856 "size of BindValuebufferCHROMIUM should be 12");
11857 static_assert(offsetof(BindValuebufferCHROMIUM, header) == 0,
11858 "offset of BindValuebufferCHROMIUM header should be 0");
11859 static_assert(offsetof(BindValuebufferCHROMIUM, target) == 4,
11860 "offset of BindValuebufferCHROMIUM target should be 4");
11861 static_assert(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8,
11862 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
11864 struct SubscribeValueCHROMIUM {
11865 typedef SubscribeValueCHROMIUM ValueType;
11866 static const CommandId kCmdId = kSubscribeValueCHROMIUM;
11867 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11868 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11870 static uint32_t ComputeSize() {
11871 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11874 void SetHeader() { header.SetCmd<ValueType>(); }
11876 void Init(GLenum _target, GLenum _subscription) {
11877 SetHeader();
11878 target = _target;
11879 subscription = _subscription;
11882 void* Set(void* cmd, GLenum _target, GLenum _subscription) {
11883 static_cast<ValueType*>(cmd)->Init(_target, _subscription);
11884 return NextCmdAddress<ValueType>(cmd);
11887 gpu::CommandHeader header;
11888 uint32_t target;
11889 uint32_t subscription;
11892 static_assert(sizeof(SubscribeValueCHROMIUM) == 12,
11893 "size of SubscribeValueCHROMIUM should be 12");
11894 static_assert(offsetof(SubscribeValueCHROMIUM, header) == 0,
11895 "offset of SubscribeValueCHROMIUM header should be 0");
11896 static_assert(offsetof(SubscribeValueCHROMIUM, target) == 4,
11897 "offset of SubscribeValueCHROMIUM target should be 4");
11898 static_assert(offsetof(SubscribeValueCHROMIUM, subscription) == 8,
11899 "offset of SubscribeValueCHROMIUM subscription should be 8");
11901 struct PopulateSubscribedValuesCHROMIUM {
11902 typedef PopulateSubscribedValuesCHROMIUM ValueType;
11903 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM;
11904 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11905 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11907 static uint32_t ComputeSize() {
11908 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11911 void SetHeader() { header.SetCmd<ValueType>(); }
11913 void Init(GLenum _target) {
11914 SetHeader();
11915 target = _target;
11918 void* Set(void* cmd, GLenum _target) {
11919 static_cast<ValueType*>(cmd)->Init(_target);
11920 return NextCmdAddress<ValueType>(cmd);
11923 gpu::CommandHeader header;
11924 uint32_t target;
11927 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM) == 8,
11928 "size of PopulateSubscribedValuesCHROMIUM should be 8");
11929 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0,
11930 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
11931 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4,
11932 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
11934 struct UniformValuebufferCHROMIUM {
11935 typedef UniformValuebufferCHROMIUM ValueType;
11936 static const CommandId kCmdId = kUniformValuebufferCHROMIUM;
11937 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11938 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11940 static uint32_t ComputeSize() {
11941 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11944 void SetHeader() { header.SetCmd<ValueType>(); }
11946 void Init(GLint _location, GLenum _target, GLenum _subscription) {
11947 SetHeader();
11948 location = _location;
11949 target = _target;
11950 subscription = _subscription;
11953 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) {
11954 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription);
11955 return NextCmdAddress<ValueType>(cmd);
11958 gpu::CommandHeader header;
11959 int32_t location;
11960 uint32_t target;
11961 uint32_t subscription;
11964 static_assert(sizeof(UniformValuebufferCHROMIUM) == 16,
11965 "size of UniformValuebufferCHROMIUM should be 16");
11966 static_assert(offsetof(UniformValuebufferCHROMIUM, header) == 0,
11967 "offset of UniformValuebufferCHROMIUM header should be 0");
11968 static_assert(offsetof(UniformValuebufferCHROMIUM, location) == 4,
11969 "offset of UniformValuebufferCHROMIUM location should be 4");
11970 static_assert(offsetof(UniformValuebufferCHROMIUM, target) == 8,
11971 "offset of UniformValuebufferCHROMIUM target should be 8");
11972 static_assert(offsetof(UniformValuebufferCHROMIUM, subscription) == 12,
11973 "offset of UniformValuebufferCHROMIUM subscription should be 12");
11975 struct BindTexImage2DCHROMIUM {
11976 typedef BindTexImage2DCHROMIUM ValueType;
11977 static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
11978 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11979 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11981 static uint32_t ComputeSize() {
11982 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11985 void SetHeader() { header.SetCmd<ValueType>(); }
11987 void Init(GLenum _target, GLint _imageId) {
11988 SetHeader();
11989 target = _target;
11990 imageId = _imageId;
11993 void* Set(void* cmd, GLenum _target, GLint _imageId) {
11994 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
11995 return NextCmdAddress<ValueType>(cmd);
11998 gpu::CommandHeader header;
11999 uint32_t target;
12000 int32_t imageId;
12003 static_assert(sizeof(BindTexImage2DCHROMIUM) == 12,
12004 "size of BindTexImage2DCHROMIUM should be 12");
12005 static_assert(offsetof(BindTexImage2DCHROMIUM, header) == 0,
12006 "offset of BindTexImage2DCHROMIUM header should be 0");
12007 static_assert(offsetof(BindTexImage2DCHROMIUM, target) == 4,
12008 "offset of BindTexImage2DCHROMIUM target should be 4");
12009 static_assert(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
12010 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12012 struct ReleaseTexImage2DCHROMIUM {
12013 typedef ReleaseTexImage2DCHROMIUM ValueType;
12014 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
12015 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12016 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12018 static uint32_t ComputeSize() {
12019 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12022 void SetHeader() { header.SetCmd<ValueType>(); }
12024 void Init(GLenum _target, GLint _imageId) {
12025 SetHeader();
12026 target = _target;
12027 imageId = _imageId;
12030 void* Set(void* cmd, GLenum _target, GLint _imageId) {
12031 static_cast<ValueType*>(cmd)->Init(_target, _imageId);
12032 return NextCmdAddress<ValueType>(cmd);
12035 gpu::CommandHeader header;
12036 uint32_t target;
12037 int32_t imageId;
12040 static_assert(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
12041 "size of ReleaseTexImage2DCHROMIUM should be 12");
12042 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
12043 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12044 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
12045 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12046 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
12047 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12049 struct TraceBeginCHROMIUM {
12050 typedef TraceBeginCHROMIUM ValueType;
12051 static const CommandId kCmdId = kTraceBeginCHROMIUM;
12052 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12053 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12055 static uint32_t ComputeSize() {
12056 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12059 void SetHeader() { header.SetCmd<ValueType>(); }
12061 void Init(GLuint _category_bucket_id, GLuint _name_bucket_id) {
12062 SetHeader();
12063 category_bucket_id = _category_bucket_id;
12064 name_bucket_id = _name_bucket_id;
12067 void* Set(void* cmd, GLuint _category_bucket_id, GLuint _name_bucket_id) {
12068 static_cast<ValueType*>(cmd)->Init(_category_bucket_id, _name_bucket_id);
12069 return NextCmdAddress<ValueType>(cmd);
12072 gpu::CommandHeader header;
12073 uint32_t category_bucket_id;
12074 uint32_t name_bucket_id;
12077 static_assert(sizeof(TraceBeginCHROMIUM) == 12,
12078 "size of TraceBeginCHROMIUM should be 12");
12079 static_assert(offsetof(TraceBeginCHROMIUM, header) == 0,
12080 "offset of TraceBeginCHROMIUM header should be 0");
12081 static_assert(offsetof(TraceBeginCHROMIUM, category_bucket_id) == 4,
12082 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
12083 static_assert(offsetof(TraceBeginCHROMIUM, name_bucket_id) == 8,
12084 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
12086 struct TraceEndCHROMIUM {
12087 typedef TraceEndCHROMIUM ValueType;
12088 static const CommandId kCmdId = kTraceEndCHROMIUM;
12089 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12090 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12092 static uint32_t ComputeSize() {
12093 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12096 void SetHeader() { header.SetCmd<ValueType>(); }
12098 void Init() { SetHeader(); }
12100 void* Set(void* cmd) {
12101 static_cast<ValueType*>(cmd)->Init();
12102 return NextCmdAddress<ValueType>(cmd);
12105 gpu::CommandHeader header;
12108 static_assert(sizeof(TraceEndCHROMIUM) == 4,
12109 "size of TraceEndCHROMIUM should be 4");
12110 static_assert(offsetof(TraceEndCHROMIUM, header) == 0,
12111 "offset of TraceEndCHROMIUM header should be 0");
12113 struct AsyncTexSubImage2DCHROMIUM {
12114 typedef AsyncTexSubImage2DCHROMIUM ValueType;
12115 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
12116 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12117 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12119 static uint32_t ComputeSize() {
12120 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12123 void SetHeader() { header.SetCmd<ValueType>(); }
12125 void Init(GLenum _target,
12126 GLint _level,
12127 GLint _xoffset,
12128 GLint _yoffset,
12129 GLsizei _width,
12130 GLsizei _height,
12131 GLenum _format,
12132 GLenum _type,
12133 uint32_t _data_shm_id,
12134 uint32_t _data_shm_offset,
12135 uint32_t _async_upload_token,
12136 uint32_t _sync_data_shm_id,
12137 uint32_t _sync_data_shm_offset) {
12138 SetHeader();
12139 target = _target;
12140 level = _level;
12141 xoffset = _xoffset;
12142 yoffset = _yoffset;
12143 width = _width;
12144 height = _height;
12145 format = _format;
12146 type = _type;
12147 data_shm_id = _data_shm_id;
12148 data_shm_offset = _data_shm_offset;
12149 async_upload_token = _async_upload_token;
12150 sync_data_shm_id = _sync_data_shm_id;
12151 sync_data_shm_offset = _sync_data_shm_offset;
12154 void* Set(void* cmd,
12155 GLenum _target,
12156 GLint _level,
12157 GLint _xoffset,
12158 GLint _yoffset,
12159 GLsizei _width,
12160 GLsizei _height,
12161 GLenum _format,
12162 GLenum _type,
12163 uint32_t _data_shm_id,
12164 uint32_t _data_shm_offset,
12165 uint32_t _async_upload_token,
12166 uint32_t _sync_data_shm_id,
12167 uint32_t _sync_data_shm_offset) {
12168 static_cast<ValueType*>(cmd)
12169 ->Init(_target, _level, _xoffset, _yoffset, _width, _height, _format,
12170 _type, _data_shm_id, _data_shm_offset, _async_upload_token,
12171 _sync_data_shm_id, _sync_data_shm_offset);
12172 return NextCmdAddress<ValueType>(cmd);
12175 gpu::CommandHeader header;
12176 uint32_t target;
12177 int32_t level;
12178 int32_t xoffset;
12179 int32_t yoffset;
12180 int32_t width;
12181 int32_t height;
12182 uint32_t format;
12183 uint32_t type;
12184 uint32_t data_shm_id;
12185 uint32_t data_shm_offset;
12186 uint32_t async_upload_token;
12187 uint32_t sync_data_shm_id;
12188 uint32_t sync_data_shm_offset;
12191 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM) == 56,
12192 "size of AsyncTexSubImage2DCHROMIUM should be 56");
12193 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
12194 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
12195 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
12196 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
12197 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
12198 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
12199 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
12200 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
12201 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
12202 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
12203 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
12204 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
12205 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
12206 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
12207 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
12208 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
12209 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
12210 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
12211 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
12212 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
12213 static_assert(
12214 offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
12215 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
12216 static_assert(
12217 offsetof(AsyncTexSubImage2DCHROMIUM, async_upload_token) == 44,
12218 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
12219 static_assert(
12220 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_id) == 48,
12221 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
12222 static_assert(
12223 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_offset) == 52,
12224 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
12226 struct AsyncTexImage2DCHROMIUM {
12227 typedef AsyncTexImage2DCHROMIUM ValueType;
12228 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
12229 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12230 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12232 static uint32_t ComputeSize() {
12233 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12236 void SetHeader() { header.SetCmd<ValueType>(); }
12238 void Init(GLenum _target,
12239 GLint _level,
12240 GLint _internalformat,
12241 GLsizei _width,
12242 GLsizei _height,
12243 GLenum _format,
12244 GLenum _type,
12245 uint32_t _pixels_shm_id,
12246 uint32_t _pixels_shm_offset,
12247 uint32_t _async_upload_token,
12248 uint32_t _sync_data_shm_id,
12249 uint32_t _sync_data_shm_offset) {
12250 SetHeader();
12251 target = _target;
12252 level = _level;
12253 internalformat = _internalformat;
12254 width = _width;
12255 height = _height;
12256 format = _format;
12257 type = _type;
12258 pixels_shm_id = _pixels_shm_id;
12259 pixels_shm_offset = _pixels_shm_offset;
12260 async_upload_token = _async_upload_token;
12261 sync_data_shm_id = _sync_data_shm_id;
12262 sync_data_shm_offset = _sync_data_shm_offset;
12265 void* Set(void* cmd,
12266 GLenum _target,
12267 GLint _level,
12268 GLint _internalformat,
12269 GLsizei _width,
12270 GLsizei _height,
12271 GLenum _format,
12272 GLenum _type,
12273 uint32_t _pixels_shm_id,
12274 uint32_t _pixels_shm_offset,
12275 uint32_t _async_upload_token,
12276 uint32_t _sync_data_shm_id,
12277 uint32_t _sync_data_shm_offset) {
12278 static_cast<ValueType*>(cmd)
12279 ->Init(_target, _level, _internalformat, _width, _height, _format,
12280 _type, _pixels_shm_id, _pixels_shm_offset, _async_upload_token,
12281 _sync_data_shm_id, _sync_data_shm_offset);
12282 return NextCmdAddress<ValueType>(cmd);
12285 gpu::CommandHeader header;
12286 uint32_t target;
12287 int32_t level;
12288 int32_t internalformat;
12289 int32_t width;
12290 int32_t height;
12291 uint32_t format;
12292 uint32_t type;
12293 uint32_t pixels_shm_id;
12294 uint32_t pixels_shm_offset;
12295 uint32_t async_upload_token;
12296 uint32_t sync_data_shm_id;
12297 uint32_t sync_data_shm_offset;
12298 static const int32_t border = 0;
12301 static_assert(sizeof(AsyncTexImage2DCHROMIUM) == 52,
12302 "size of AsyncTexImage2DCHROMIUM should be 52");
12303 static_assert(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
12304 "offset of AsyncTexImage2DCHROMIUM header should be 0");
12305 static_assert(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
12306 "offset of AsyncTexImage2DCHROMIUM target should be 4");
12307 static_assert(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
12308 "offset of AsyncTexImage2DCHROMIUM level should be 8");
12309 static_assert(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
12310 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
12311 static_assert(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
12312 "offset of AsyncTexImage2DCHROMIUM width should be 16");
12313 static_assert(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
12314 "offset of AsyncTexImage2DCHROMIUM height should be 20");
12315 static_assert(offsetof(AsyncTexImage2DCHROMIUM, format) == 24,
12316 "offset of AsyncTexImage2DCHROMIUM format should be 24");
12317 static_assert(offsetof(AsyncTexImage2DCHROMIUM, type) == 28,
12318 "offset of AsyncTexImage2DCHROMIUM type should be 28");
12319 static_assert(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 32,
12320 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
12321 static_assert(
12322 offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 36,
12323 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
12324 static_assert(
12325 offsetof(AsyncTexImage2DCHROMIUM, async_upload_token) == 40,
12326 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
12327 static_assert(
12328 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_id) == 44,
12329 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
12330 static_assert(
12331 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_offset) == 48,
12332 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
12334 struct WaitAsyncTexImage2DCHROMIUM {
12335 typedef WaitAsyncTexImage2DCHROMIUM ValueType;
12336 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
12337 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12338 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12340 static uint32_t ComputeSize() {
12341 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12344 void SetHeader() { header.SetCmd<ValueType>(); }
12346 void Init(GLenum _target) {
12347 SetHeader();
12348 target = _target;
12351 void* Set(void* cmd, GLenum _target) {
12352 static_cast<ValueType*>(cmd)->Init(_target);
12353 return NextCmdAddress<ValueType>(cmd);
12356 gpu::CommandHeader header;
12357 uint32_t target;
12360 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
12361 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
12362 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
12363 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
12364 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
12365 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
12367 struct WaitAllAsyncTexImage2DCHROMIUM {
12368 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType;
12369 static const CommandId kCmdId = kWaitAllAsyncTexImage2DCHROMIUM;
12370 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12371 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12373 static uint32_t ComputeSize() {
12374 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12377 void SetHeader() { header.SetCmd<ValueType>(); }
12379 void Init() { SetHeader(); }
12381 void* Set(void* cmd) {
12382 static_cast<ValueType*>(cmd)->Init();
12383 return NextCmdAddress<ValueType>(cmd);
12386 gpu::CommandHeader header;
12389 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM) == 4,
12390 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
12391 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM, header) == 0,
12392 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
12394 struct DiscardFramebufferEXTImmediate {
12395 typedef DiscardFramebufferEXTImmediate ValueType;
12396 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
12397 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12398 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12400 static uint32_t ComputeDataSize(GLsizei count) {
12401 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
12404 static uint32_t ComputeSize(GLsizei count) {
12405 return static_cast<uint32_t>(sizeof(ValueType) +
12406 ComputeDataSize(count)); // NOLINT
12409 void SetHeader(GLsizei count) {
12410 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
12413 void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
12414 SetHeader(_count);
12415 target = _target;
12416 count = _count;
12417 memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count));
12420 void* Set(void* cmd,
12421 GLenum _target,
12422 GLsizei _count,
12423 const GLenum* _attachments) {
12424 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
12425 const uint32_t size = ComputeSize(_count);
12426 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12429 gpu::CommandHeader header;
12430 uint32_t target;
12431 int32_t count;
12434 static_assert(sizeof(DiscardFramebufferEXTImmediate) == 12,
12435 "size of DiscardFramebufferEXTImmediate should be 12");
12436 static_assert(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
12437 "offset of DiscardFramebufferEXTImmediate header should be 0");
12438 static_assert(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
12439 "offset of DiscardFramebufferEXTImmediate target should be 4");
12440 static_assert(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
12441 "offset of DiscardFramebufferEXTImmediate count should be 8");
12443 struct LoseContextCHROMIUM {
12444 typedef LoseContextCHROMIUM ValueType;
12445 static const CommandId kCmdId = kLoseContextCHROMIUM;
12446 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12447 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12449 static uint32_t ComputeSize() {
12450 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12453 void SetHeader() { header.SetCmd<ValueType>(); }
12455 void Init(GLenum _current, GLenum _other) {
12456 SetHeader();
12457 current = _current;
12458 other = _other;
12461 void* Set(void* cmd, GLenum _current, GLenum _other) {
12462 static_cast<ValueType*>(cmd)->Init(_current, _other);
12463 return NextCmdAddress<ValueType>(cmd);
12466 gpu::CommandHeader header;
12467 uint32_t current;
12468 uint32_t other;
12471 static_assert(sizeof(LoseContextCHROMIUM) == 12,
12472 "size of LoseContextCHROMIUM should be 12");
12473 static_assert(offsetof(LoseContextCHROMIUM, header) == 0,
12474 "offset of LoseContextCHROMIUM header should be 0");
12475 static_assert(offsetof(LoseContextCHROMIUM, current) == 4,
12476 "offset of LoseContextCHROMIUM current should be 4");
12477 static_assert(offsetof(LoseContextCHROMIUM, other) == 8,
12478 "offset of LoseContextCHROMIUM other should be 8");
12480 struct WaitSyncPointCHROMIUM {
12481 typedef WaitSyncPointCHROMIUM ValueType;
12482 static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
12483 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12484 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12486 static uint32_t ComputeSize() {
12487 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12490 void SetHeader() { header.SetCmd<ValueType>(); }
12492 void Init(GLuint _sync_point) {
12493 SetHeader();
12494 sync_point = _sync_point;
12497 void* Set(void* cmd, GLuint _sync_point) {
12498 static_cast<ValueType*>(cmd)->Init(_sync_point);
12499 return NextCmdAddress<ValueType>(cmd);
12502 gpu::CommandHeader header;
12503 uint32_t sync_point;
12506 static_assert(sizeof(WaitSyncPointCHROMIUM) == 8,
12507 "size of WaitSyncPointCHROMIUM should be 8");
12508 static_assert(offsetof(WaitSyncPointCHROMIUM, header) == 0,
12509 "offset of WaitSyncPointCHROMIUM header should be 0");
12510 static_assert(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
12511 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
12513 struct DrawBuffersEXTImmediate {
12514 typedef DrawBuffersEXTImmediate ValueType;
12515 static const CommandId kCmdId = kDrawBuffersEXTImmediate;
12516 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12517 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12519 static uint32_t ComputeDataSize(GLsizei count) {
12520 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT
12523 static uint32_t ComputeSize(GLsizei count) {
12524 return static_cast<uint32_t>(sizeof(ValueType) +
12525 ComputeDataSize(count)); // NOLINT
12528 void SetHeader(GLsizei count) {
12529 header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
12532 void Init(GLsizei _count, const GLenum* _bufs) {
12533 SetHeader(_count);
12534 count = _count;
12535 memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count));
12538 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
12539 static_cast<ValueType*>(cmd)->Init(_count, _bufs);
12540 const uint32_t size = ComputeSize(_count);
12541 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12544 gpu::CommandHeader header;
12545 int32_t count;
12548 static_assert(sizeof(DrawBuffersEXTImmediate) == 8,
12549 "size of DrawBuffersEXTImmediate should be 8");
12550 static_assert(offsetof(DrawBuffersEXTImmediate, header) == 0,
12551 "offset of DrawBuffersEXTImmediate header should be 0");
12552 static_assert(offsetof(DrawBuffersEXTImmediate, count) == 4,
12553 "offset of DrawBuffersEXTImmediate count should be 4");
12555 struct DiscardBackbufferCHROMIUM {
12556 typedef DiscardBackbufferCHROMIUM ValueType;
12557 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
12558 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12559 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12561 static uint32_t ComputeSize() {
12562 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12565 void SetHeader() { header.SetCmd<ValueType>(); }
12567 void Init() { SetHeader(); }
12569 void* Set(void* cmd) {
12570 static_cast<ValueType*>(cmd)->Init();
12571 return NextCmdAddress<ValueType>(cmd);
12574 gpu::CommandHeader header;
12577 static_assert(sizeof(DiscardBackbufferCHROMIUM) == 4,
12578 "size of DiscardBackbufferCHROMIUM should be 4");
12579 static_assert(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
12580 "offset of DiscardBackbufferCHROMIUM header should be 0");
12582 struct ScheduleOverlayPlaneCHROMIUM {
12583 typedef ScheduleOverlayPlaneCHROMIUM ValueType;
12584 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM;
12585 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12586 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12588 static uint32_t ComputeSize() {
12589 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12592 void SetHeader() { header.SetCmd<ValueType>(); }
12594 void Init(GLint _plane_z_order,
12595 GLenum _plane_transform,
12596 GLuint _overlay_texture_id,
12597 GLint _bounds_x,
12598 GLint _bounds_y,
12599 GLint _bounds_width,
12600 GLint _bounds_height,
12601 GLfloat _uv_x,
12602 GLfloat _uv_y,
12603 GLfloat _uv_width,
12604 GLfloat _uv_height) {
12605 SetHeader();
12606 plane_z_order = _plane_z_order;
12607 plane_transform = _plane_transform;
12608 overlay_texture_id = _overlay_texture_id;
12609 bounds_x = _bounds_x;
12610 bounds_y = _bounds_y;
12611 bounds_width = _bounds_width;
12612 bounds_height = _bounds_height;
12613 uv_x = _uv_x;
12614 uv_y = _uv_y;
12615 uv_width = _uv_width;
12616 uv_height = _uv_height;
12619 void* Set(void* cmd,
12620 GLint _plane_z_order,
12621 GLenum _plane_transform,
12622 GLuint _overlay_texture_id,
12623 GLint _bounds_x,
12624 GLint _bounds_y,
12625 GLint _bounds_width,
12626 GLint _bounds_height,
12627 GLfloat _uv_x,
12628 GLfloat _uv_y,
12629 GLfloat _uv_width,
12630 GLfloat _uv_height) {
12631 static_cast<ValueType*>(cmd)->Init(_plane_z_order, _plane_transform,
12632 _overlay_texture_id, _bounds_x,
12633 _bounds_y, _bounds_width, _bounds_height,
12634 _uv_x, _uv_y, _uv_width, _uv_height);
12635 return NextCmdAddress<ValueType>(cmd);
12638 gpu::CommandHeader header;
12639 int32_t plane_z_order;
12640 uint32_t plane_transform;
12641 uint32_t overlay_texture_id;
12642 int32_t bounds_x;
12643 int32_t bounds_y;
12644 int32_t bounds_width;
12645 int32_t bounds_height;
12646 float uv_x;
12647 float uv_y;
12648 float uv_width;
12649 float uv_height;
12652 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48,
12653 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
12654 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0,
12655 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
12656 static_assert(
12657 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4,
12658 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
12659 static_assert(
12660 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8,
12661 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
12662 static_assert(
12663 offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12,
12664 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
12665 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16,
12666 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
12667 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20,
12668 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
12669 static_assert(
12670 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24,
12671 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
12672 static_assert(
12673 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28,
12674 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
12675 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32,
12676 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
12677 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36,
12678 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
12679 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
12680 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
12681 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
12682 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
12684 struct SwapInterval {
12685 typedef SwapInterval ValueType;
12686 static const CommandId kCmdId = kSwapInterval;
12687 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12688 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
12690 static uint32_t ComputeSize() {
12691 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12694 void SetHeader() { header.SetCmd<ValueType>(); }
12696 void Init(GLint _interval) {
12697 SetHeader();
12698 interval = _interval;
12701 void* Set(void* cmd, GLint _interval) {
12702 static_cast<ValueType*>(cmd)->Init(_interval);
12703 return NextCmdAddress<ValueType>(cmd);
12706 gpu::CommandHeader header;
12707 int32_t interval;
12710 static_assert(sizeof(SwapInterval) == 8, "size of SwapInterval should be 8");
12711 static_assert(offsetof(SwapInterval, header) == 0,
12712 "offset of SwapInterval header should be 0");
12713 static_assert(offsetof(SwapInterval, interval) == 4,
12714 "offset of SwapInterval interval should be 4");
12716 struct MatrixLoadfCHROMIUMImmediate {
12717 typedef MatrixLoadfCHROMIUMImmediate ValueType;
12718 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
12719 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
12720 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12722 static uint32_t ComputeDataSize() {
12723 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
12726 static uint32_t ComputeSize() {
12727 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
12730 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
12732 void Init(GLenum _matrixMode, const GLfloat* _m) {
12733 SetHeader();
12734 matrixMode = _matrixMode;
12735 memcpy(ImmediateDataAddress(this), _m, ComputeDataSize());
12738 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) {
12739 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m);
12740 const uint32_t size = ComputeSize();
12741 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
12744 gpu::CommandHeader header;
12745 uint32_t matrixMode;
12748 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate) == 8,
12749 "size of MatrixLoadfCHROMIUMImmediate should be 8");
12750 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0,
12751 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
12752 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4,
12753 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
12755 struct MatrixLoadIdentityCHROMIUM {
12756 typedef MatrixLoadIdentityCHROMIUM ValueType;
12757 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM;
12758 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12759 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12761 static uint32_t ComputeSize() {
12762 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12765 void SetHeader() { header.SetCmd<ValueType>(); }
12767 void Init(GLenum _matrixMode) {
12768 SetHeader();
12769 matrixMode = _matrixMode;
12772 void* Set(void* cmd, GLenum _matrixMode) {
12773 static_cast<ValueType*>(cmd)->Init(_matrixMode);
12774 return NextCmdAddress<ValueType>(cmd);
12777 gpu::CommandHeader header;
12778 uint32_t matrixMode;
12781 static_assert(sizeof(MatrixLoadIdentityCHROMIUM) == 8,
12782 "size of MatrixLoadIdentityCHROMIUM should be 8");
12783 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0,
12784 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
12785 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4,
12786 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
12788 struct BlendBarrierKHR {
12789 typedef BlendBarrierKHR ValueType;
12790 static const CommandId kCmdId = kBlendBarrierKHR;
12791 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12792 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12794 static uint32_t ComputeSize() {
12795 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12798 void SetHeader() { header.SetCmd<ValueType>(); }
12800 void Init() { SetHeader(); }
12802 void* Set(void* cmd) {
12803 static_cast<ValueType*>(cmd)->Init();
12804 return NextCmdAddress<ValueType>(cmd);
12807 gpu::CommandHeader header;
12810 static_assert(sizeof(BlendBarrierKHR) == 4,
12811 "size of BlendBarrierKHR should be 4");
12812 static_assert(offsetof(BlendBarrierKHR, header) == 0,
12813 "offset of BlendBarrierKHR header should be 0");
12815 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_