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
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
) {
34 void* Set(void* cmd
, GLenum _texture
) {
35 static_cast<ValueType
*>(cmd
)->Init(_texture
);
36 return NextCmdAddress
<ValueType
>(cmd
);
39 gpu::CommandHeader header
;
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");
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
) {
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
;
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
) {
101 name_bucket_id
= _name_bucket_id
;
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
;
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");
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
) {
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
;
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
) {
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
;
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
,
237 static_cast<ValueType
*>(cmd
)
238 ->Init(_target
, _index
, _buffer
, _offset
, _size
);
239 return NextCmdAddress
<ValueType
>(cmd
);
242 gpu::CommandHeader header
;
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
) {
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
;
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
) {
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
;
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");
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
) {
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
;
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");
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
) {
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
;
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
) {
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
;
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");
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
) {
473 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
474 return NextCmdAddress
<ValueType
>(cmd
);
477 gpu::CommandHeader header
;
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
) {
513 void* Set(void* cmd
, GLenum _mode
) {
514 static_cast<ValueType
*>(cmd
)->Init(_mode
);
515 return NextCmdAddress
<ValueType
>(cmd
);
518 gpu::CommandHeader header
;
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
) {
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
;
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");
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
) {
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
;
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
,
620 srcAlpha
= _srcAlpha
;
621 dstAlpha
= _dstAlpha
;
629 static_cast<ValueType
*>(cmd
)->Init(_srcRGB
, _dstRGB
, _srcAlpha
, _dstAlpha
);
630 return NextCmdAddress
<ValueType
>(cmd
);
633 gpu::CommandHeader header
;
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");
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
,
667 uint32_t _data_shm_id
,
668 uint32_t _data_shm_offset
,
673 data_shm_id
= _data_shm_id
;
674 data_shm_offset
= _data_shm_offset
;
681 uint32_t _data_shm_id
,
682 uint32_t _data_shm_offset
,
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
;
692 uint32_t data_shm_id
;
693 uint32_t data_shm_offset
;
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
,
726 uint32_t _data_shm_id
,
727 uint32_t _data_shm_offset
) {
732 data_shm_id
= _data_shm_id
;
733 data_shm_offset
= _data_shm_offset
;
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
;
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
) {
789 result_shm_id
= _result_shm_id
;
790 result_shm_offset
= _result_shm_offset
;
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
;
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");
817 offsetof(CheckFramebufferStatus
, result_shm_offset
) == 12,
818 "offset of CheckFramebufferStatus result_shm_offset should be 12");
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
) {
837 void* Set(void* cmd
, GLbitfield _mask
) {
838 static_cast<ValueType
*>(cmd
)->Init(_mask
);
839 return NextCmdAddress
<ValueType
>(cmd
);
842 gpu::CommandHeader header
;
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
,
869 drawbuffers
= _drawbuffers
;
879 static_cast<ValueType
*>(cmd
)->Init(_buffer
, _drawbuffers
, _depth
, _stencil
);
880 return NextCmdAddress
<ValueType
>(cmd
);
883 gpu::CommandHeader header
;
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
) {
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
));
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
;
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
) {
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
));
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
;
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
) {
1034 drawbuffers
= _drawbuffers
;
1035 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize());
1038 void* Set(void* cmd
,
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
;
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");
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
) {
1081 void* Set(void* cmd
,
1086 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
1087 return NextCmdAddress
<ValueType
>(cmd
);
1090 gpu::CommandHeader header
;
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
) {
1126 void* Set(void* cmd
, GLclampf _depth
) {
1127 static_cast<ValueType
*>(cmd
)->Init(_depth
);
1128 return NextCmdAddress
<ValueType
>(cmd
);
1131 gpu::CommandHeader header
;
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
) {
1158 void* Set(void* cmd
, GLint _s
) {
1159 static_cast<ValueType
*>(cmd
)->Init(_s
);
1160 return NextCmdAddress
<ValueType
>(cmd
);
1163 gpu::CommandHeader header
;
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
,
1191 uint32_t _result_shm_id
,
1192 uint32_t _result_shm_offset
) {
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
,
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
;
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");
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
,
1263 void* Set(void* cmd
,
1268 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
1269 return NextCmdAddress
<ValueType
>(cmd
);
1272 gpu::CommandHeader header
;
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
) {
1308 void* Set(void* cmd
, GLuint _shader
) {
1309 static_cast<ValueType
*>(cmd
)->Init(_shader
);
1310 return NextCmdAddress
<ValueType
>(cmd
);
1313 gpu::CommandHeader header
;
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
,
1337 GLenum _internalformat
,
1340 GLuint _bucket_id
) {
1344 internalformat
= _internalformat
;
1347 bucket_id
= _bucket_id
;
1350 void* Set(void* cmd
,
1353 GLenum _internalformat
,
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
;
1365 uint32_t internalformat
;
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");
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
,
1404 GLenum _internalformat
,
1408 uint32_t _data_shm_id
,
1409 uint32_t _data_shm_offset
) {
1413 internalformat
= _internalformat
;
1416 imageSize
= _imageSize
;
1417 data_shm_id
= _data_shm_id
;
1418 data_shm_offset
= _data_shm_offset
;
1421 void* Set(void* cmd
,
1424 GLenum _internalformat
,
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
,
1433 return NextCmdAddress
<ValueType
>(cmd
);
1436 gpu::CommandHeader header
;
1439 uint32_t internalformat
;
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
,
1488 GLuint _bucket_id
) {
1497 bucket_id
= _bucket_id
;
1500 void* Set(void* cmd
,
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
;
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
,
1566 uint32_t _data_shm_id
,
1567 uint32_t _data_shm_offset
) {
1576 imageSize
= _imageSize
;
1577 data_shm_id
= _data_shm_id
;
1578 data_shm_offset
= _data_shm_offset
;
1581 void* Set(void* cmd
,
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
;
1607 uint32_t data_shm_id
;
1608 uint32_t data_shm_offset
;
1611 static_assert(sizeof(CompressedTexSubImage2D
) == 44,
1612 "size of CompressedTexSubImage2D should be 44");
1613 static_assert(offsetof(CompressedTexSubImage2D
, header
) == 0,
1614 "offset of CompressedTexSubImage2D header should be 0");
1615 static_assert(offsetof(CompressedTexSubImage2D
, target
) == 4,
1616 "offset of CompressedTexSubImage2D target should be 4");
1617 static_assert(offsetof(CompressedTexSubImage2D
, level
) == 8,
1618 "offset of CompressedTexSubImage2D level should be 8");
1619 static_assert(offsetof(CompressedTexSubImage2D
, xoffset
) == 12,
1620 "offset of CompressedTexSubImage2D xoffset should be 12");
1621 static_assert(offsetof(CompressedTexSubImage2D
, yoffset
) == 16,
1622 "offset of CompressedTexSubImage2D yoffset should be 16");
1623 static_assert(offsetof(CompressedTexSubImage2D
, width
) == 20,
1624 "offset of CompressedTexSubImage2D width should be 20");
1625 static_assert(offsetof(CompressedTexSubImage2D
, height
) == 24,
1626 "offset of CompressedTexSubImage2D height should be 24");
1627 static_assert(offsetof(CompressedTexSubImage2D
, format
) == 28,
1628 "offset of CompressedTexSubImage2D format should be 28");
1629 static_assert(offsetof(CompressedTexSubImage2D
, imageSize
) == 32,
1630 "offset of CompressedTexSubImage2D imageSize should be 32");
1631 static_assert(offsetof(CompressedTexSubImage2D
, data_shm_id
) == 36,
1632 "offset of CompressedTexSubImage2D data_shm_id should be 36");
1633 static_assert(offsetof(CompressedTexSubImage2D
, data_shm_offset
) == 40,
1634 "offset of CompressedTexSubImage2D data_shm_offset should be 40");
1636 struct CompressedTexImage3DBucket
{
1637 typedef CompressedTexImage3DBucket ValueType
;
1638 static const CommandId kCmdId
= kCompressedTexImage3DBucket
;
1639 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1640 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1642 static uint32_t ComputeSize() {
1643 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1646 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1648 void Init(GLenum _target
,
1650 GLenum _internalformat
,
1654 GLuint _bucket_id
) {
1658 internalformat
= _internalformat
;
1662 bucket_id
= _bucket_id
;
1665 void* Set(void* cmd
,
1668 GLenum _internalformat
,
1672 GLuint _bucket_id
) {
1673 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
1674 _height
, _depth
, _bucket_id
);
1675 return NextCmdAddress
<ValueType
>(cmd
);
1678 gpu::CommandHeader header
;
1681 uint32_t internalformat
;
1686 static const int32_t border
= 0;
1689 static_assert(sizeof(CompressedTexImage3DBucket
) == 32,
1690 "size of CompressedTexImage3DBucket should be 32");
1691 static_assert(offsetof(CompressedTexImage3DBucket
, header
) == 0,
1692 "offset of CompressedTexImage3DBucket header should be 0");
1693 static_assert(offsetof(CompressedTexImage3DBucket
, target
) == 4,
1694 "offset of CompressedTexImage3DBucket target should be 4");
1695 static_assert(offsetof(CompressedTexImage3DBucket
, level
) == 8,
1696 "offset of CompressedTexImage3DBucket level should be 8");
1698 offsetof(CompressedTexImage3DBucket
, internalformat
) == 12,
1699 "offset of CompressedTexImage3DBucket internalformat should be 12");
1700 static_assert(offsetof(CompressedTexImage3DBucket
, width
) == 16,
1701 "offset of CompressedTexImage3DBucket width should be 16");
1702 static_assert(offsetof(CompressedTexImage3DBucket
, height
) == 20,
1703 "offset of CompressedTexImage3DBucket height should be 20");
1704 static_assert(offsetof(CompressedTexImage3DBucket
, depth
) == 24,
1705 "offset of CompressedTexImage3DBucket depth should be 24");
1706 static_assert(offsetof(CompressedTexImage3DBucket
, bucket_id
) == 28,
1707 "offset of CompressedTexImage3DBucket bucket_id should be 28");
1709 struct CompressedTexImage3D
{
1710 typedef CompressedTexImage3D ValueType
;
1711 static const CommandId kCmdId
= kCompressedTexImage3D
;
1712 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1713 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1715 static uint32_t ComputeSize() {
1716 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1719 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1721 void Init(GLenum _target
,
1723 GLenum _internalformat
,
1728 uint32_t _data_shm_id
,
1729 uint32_t _data_shm_offset
) {
1733 internalformat
= _internalformat
;
1737 imageSize
= _imageSize
;
1738 data_shm_id
= _data_shm_id
;
1739 data_shm_offset
= _data_shm_offset
;
1742 void* Set(void* cmd
,
1745 GLenum _internalformat
,
1750 uint32_t _data_shm_id
,
1751 uint32_t _data_shm_offset
) {
1752 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
1753 _height
, _depth
, _imageSize
,
1754 _data_shm_id
, _data_shm_offset
);
1755 return NextCmdAddress
<ValueType
>(cmd
);
1758 gpu::CommandHeader header
;
1761 uint32_t internalformat
;
1766 uint32_t data_shm_id
;
1767 uint32_t data_shm_offset
;
1768 static const int32_t border
= 0;
1771 static_assert(sizeof(CompressedTexImage3D
) == 40,
1772 "size of CompressedTexImage3D should be 40");
1773 static_assert(offsetof(CompressedTexImage3D
, header
) == 0,
1774 "offset of CompressedTexImage3D header should be 0");
1775 static_assert(offsetof(CompressedTexImage3D
, target
) == 4,
1776 "offset of CompressedTexImage3D target should be 4");
1777 static_assert(offsetof(CompressedTexImage3D
, level
) == 8,
1778 "offset of CompressedTexImage3D level should be 8");
1779 static_assert(offsetof(CompressedTexImage3D
, internalformat
) == 12,
1780 "offset of CompressedTexImage3D internalformat should be 12");
1781 static_assert(offsetof(CompressedTexImage3D
, width
) == 16,
1782 "offset of CompressedTexImage3D width should be 16");
1783 static_assert(offsetof(CompressedTexImage3D
, height
) == 20,
1784 "offset of CompressedTexImage3D height should be 20");
1785 static_assert(offsetof(CompressedTexImage3D
, depth
) == 24,
1786 "offset of CompressedTexImage3D depth should be 24");
1787 static_assert(offsetof(CompressedTexImage3D
, imageSize
) == 28,
1788 "offset of CompressedTexImage3D imageSize should be 28");
1789 static_assert(offsetof(CompressedTexImage3D
, data_shm_id
) == 32,
1790 "offset of CompressedTexImage3D data_shm_id should be 32");
1791 static_assert(offsetof(CompressedTexImage3D
, data_shm_offset
) == 36,
1792 "offset of CompressedTexImage3D data_shm_offset should be 36");
1794 struct CopyBufferSubData
{
1795 typedef CopyBufferSubData ValueType
;
1796 static const CommandId kCmdId
= kCopyBufferSubData
;
1797 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1798 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1800 static uint32_t ComputeSize() {
1801 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1804 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1806 void Init(GLenum _readtarget
,
1807 GLenum _writetarget
,
1808 GLintptr _readoffset
,
1809 GLintptr _writeoffset
,
1812 readtarget
= _readtarget
;
1813 writetarget
= _writetarget
;
1814 readoffset
= _readoffset
;
1815 writeoffset
= _writeoffset
;
1819 void* Set(void* cmd
,
1821 GLenum _writetarget
,
1822 GLintptr _readoffset
,
1823 GLintptr _writeoffset
,
1825 static_cast<ValueType
*>(cmd
)
1826 ->Init(_readtarget
, _writetarget
, _readoffset
, _writeoffset
, _size
);
1827 return NextCmdAddress
<ValueType
>(cmd
);
1830 gpu::CommandHeader header
;
1831 uint32_t readtarget
;
1832 uint32_t writetarget
;
1834 int32_t writeoffset
;
1838 static_assert(sizeof(CopyBufferSubData
) == 24,
1839 "size of CopyBufferSubData should be 24");
1840 static_assert(offsetof(CopyBufferSubData
, header
) == 0,
1841 "offset of CopyBufferSubData header should be 0");
1842 static_assert(offsetof(CopyBufferSubData
, readtarget
) == 4,
1843 "offset of CopyBufferSubData readtarget should be 4");
1844 static_assert(offsetof(CopyBufferSubData
, writetarget
) == 8,
1845 "offset of CopyBufferSubData writetarget should be 8");
1846 static_assert(offsetof(CopyBufferSubData
, readoffset
) == 12,
1847 "offset of CopyBufferSubData readoffset should be 12");
1848 static_assert(offsetof(CopyBufferSubData
, writeoffset
) == 16,
1849 "offset of CopyBufferSubData writeoffset should be 16");
1850 static_assert(offsetof(CopyBufferSubData
, size
) == 20,
1851 "offset of CopyBufferSubData size should be 20");
1853 struct CopyTexImage2D
{
1854 typedef CopyTexImage2D ValueType
;
1855 static const CommandId kCmdId
= kCopyTexImage2D
;
1856 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1857 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1859 static uint32_t ComputeSize() {
1860 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1863 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1865 void Init(GLenum _target
,
1867 GLenum _internalformat
,
1875 internalformat
= _internalformat
;
1882 void* Set(void* cmd
,
1885 GLenum _internalformat
,
1890 static_cast<ValueType
*>(cmd
)
1891 ->Init(_target
, _level
, _internalformat
, _x
, _y
, _width
, _height
);
1892 return NextCmdAddress
<ValueType
>(cmd
);
1895 gpu::CommandHeader header
;
1898 uint32_t internalformat
;
1903 static const int32_t border
= 0;
1906 static_assert(sizeof(CopyTexImage2D
) == 32,
1907 "size of CopyTexImage2D should be 32");
1908 static_assert(offsetof(CopyTexImage2D
, header
) == 0,
1909 "offset of CopyTexImage2D header should be 0");
1910 static_assert(offsetof(CopyTexImage2D
, target
) == 4,
1911 "offset of CopyTexImage2D target should be 4");
1912 static_assert(offsetof(CopyTexImage2D
, level
) == 8,
1913 "offset of CopyTexImage2D level should be 8");
1914 static_assert(offsetof(CopyTexImage2D
, internalformat
) == 12,
1915 "offset of CopyTexImage2D internalformat should be 12");
1916 static_assert(offsetof(CopyTexImage2D
, x
) == 16,
1917 "offset of CopyTexImage2D x should be 16");
1918 static_assert(offsetof(CopyTexImage2D
, y
) == 20,
1919 "offset of CopyTexImage2D y should be 20");
1920 static_assert(offsetof(CopyTexImage2D
, width
) == 24,
1921 "offset of CopyTexImage2D width should be 24");
1922 static_assert(offsetof(CopyTexImage2D
, height
) == 28,
1923 "offset of CopyTexImage2D height should be 28");
1925 struct CopyTexSubImage2D
{
1926 typedef CopyTexSubImage2D ValueType
;
1927 static const CommandId kCmdId
= kCopyTexSubImage2D
;
1928 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1929 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1931 static uint32_t ComputeSize() {
1932 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1935 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1937 void Init(GLenum _target
,
1956 void* Set(void* cmd
,
1965 static_cast<ValueType
*>(cmd
)
1966 ->Init(_target
, _level
, _xoffset
, _yoffset
, _x
, _y
, _width
, _height
);
1967 return NextCmdAddress
<ValueType
>(cmd
);
1970 gpu::CommandHeader header
;
1981 static_assert(sizeof(CopyTexSubImage2D
) == 36,
1982 "size of CopyTexSubImage2D should be 36");
1983 static_assert(offsetof(CopyTexSubImage2D
, header
) == 0,
1984 "offset of CopyTexSubImage2D header should be 0");
1985 static_assert(offsetof(CopyTexSubImage2D
, target
) == 4,
1986 "offset of CopyTexSubImage2D target should be 4");
1987 static_assert(offsetof(CopyTexSubImage2D
, level
) == 8,
1988 "offset of CopyTexSubImage2D level should be 8");
1989 static_assert(offsetof(CopyTexSubImage2D
, xoffset
) == 12,
1990 "offset of CopyTexSubImage2D xoffset should be 12");
1991 static_assert(offsetof(CopyTexSubImage2D
, yoffset
) == 16,
1992 "offset of CopyTexSubImage2D yoffset should be 16");
1993 static_assert(offsetof(CopyTexSubImage2D
, x
) == 20,
1994 "offset of CopyTexSubImage2D x should be 20");
1995 static_assert(offsetof(CopyTexSubImage2D
, y
) == 24,
1996 "offset of CopyTexSubImage2D y should be 24");
1997 static_assert(offsetof(CopyTexSubImage2D
, width
) == 28,
1998 "offset of CopyTexSubImage2D width should be 28");
1999 static_assert(offsetof(CopyTexSubImage2D
, height
) == 32,
2000 "offset of CopyTexSubImage2D height should be 32");
2002 struct CopyTexSubImage3D
{
2003 typedef CopyTexSubImage3D ValueType
;
2004 static const CommandId kCmdId
= kCopyTexSubImage3D
;
2005 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2006 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2008 static uint32_t ComputeSize() {
2009 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2012 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2014 void Init(GLenum _target
,
2035 void* Set(void* cmd
,
2045 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
2046 _zoffset
, _x
, _y
, _width
, _height
);
2047 return NextCmdAddress
<ValueType
>(cmd
);
2050 gpu::CommandHeader header
;
2062 static_assert(sizeof(CopyTexSubImage3D
) == 40,
2063 "size of CopyTexSubImage3D should be 40");
2064 static_assert(offsetof(CopyTexSubImage3D
, header
) == 0,
2065 "offset of CopyTexSubImage3D header should be 0");
2066 static_assert(offsetof(CopyTexSubImage3D
, target
) == 4,
2067 "offset of CopyTexSubImage3D target should be 4");
2068 static_assert(offsetof(CopyTexSubImage3D
, level
) == 8,
2069 "offset of CopyTexSubImage3D level should be 8");
2070 static_assert(offsetof(CopyTexSubImage3D
, xoffset
) == 12,
2071 "offset of CopyTexSubImage3D xoffset should be 12");
2072 static_assert(offsetof(CopyTexSubImage3D
, yoffset
) == 16,
2073 "offset of CopyTexSubImage3D yoffset should be 16");
2074 static_assert(offsetof(CopyTexSubImage3D
, zoffset
) == 20,
2075 "offset of CopyTexSubImage3D zoffset should be 20");
2076 static_assert(offsetof(CopyTexSubImage3D
, x
) == 24,
2077 "offset of CopyTexSubImage3D x should be 24");
2078 static_assert(offsetof(CopyTexSubImage3D
, y
) == 28,
2079 "offset of CopyTexSubImage3D y should be 28");
2080 static_assert(offsetof(CopyTexSubImage3D
, width
) == 32,
2081 "offset of CopyTexSubImage3D width should be 32");
2082 static_assert(offsetof(CopyTexSubImage3D
, height
) == 36,
2083 "offset of CopyTexSubImage3D height should be 36");
2085 struct CreateProgram
{
2086 typedef CreateProgram ValueType
;
2087 static const CommandId kCmdId
= kCreateProgram
;
2088 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2089 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2091 static uint32_t ComputeSize() {
2092 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2095 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2097 void Init(uint32_t _client_id
) {
2099 client_id
= _client_id
;
2102 void* Set(void* cmd
, uint32_t _client_id
) {
2103 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
2104 return NextCmdAddress
<ValueType
>(cmd
);
2107 gpu::CommandHeader header
;
2111 static_assert(sizeof(CreateProgram
) == 8, "size of CreateProgram should be 8");
2112 static_assert(offsetof(CreateProgram
, header
) == 0,
2113 "offset of CreateProgram header should be 0");
2114 static_assert(offsetof(CreateProgram
, client_id
) == 4,
2115 "offset of CreateProgram client_id should be 4");
2117 struct CreateShader
{
2118 typedef CreateShader ValueType
;
2119 static const CommandId kCmdId
= kCreateShader
;
2120 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2121 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2123 static uint32_t ComputeSize() {
2124 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2127 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2129 void Init(GLenum _type
, uint32_t _client_id
) {
2132 client_id
= _client_id
;
2135 void* Set(void* cmd
, GLenum _type
, uint32_t _client_id
) {
2136 static_cast<ValueType
*>(cmd
)->Init(_type
, _client_id
);
2137 return NextCmdAddress
<ValueType
>(cmd
);
2140 gpu::CommandHeader header
;
2145 static_assert(sizeof(CreateShader
) == 12, "size of CreateShader should be 12");
2146 static_assert(offsetof(CreateShader
, header
) == 0,
2147 "offset of CreateShader header should be 0");
2148 static_assert(offsetof(CreateShader
, type
) == 4,
2149 "offset of CreateShader type should be 4");
2150 static_assert(offsetof(CreateShader
, client_id
) == 8,
2151 "offset of CreateShader client_id should be 8");
2154 typedef CullFace ValueType
;
2155 static const CommandId kCmdId
= kCullFace
;
2156 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2157 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2159 static uint32_t ComputeSize() {
2160 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2163 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2165 void Init(GLenum _mode
) {
2170 void* Set(void* cmd
, GLenum _mode
) {
2171 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2172 return NextCmdAddress
<ValueType
>(cmd
);
2175 gpu::CommandHeader header
;
2179 static_assert(sizeof(CullFace
) == 8, "size of CullFace should be 8");
2180 static_assert(offsetof(CullFace
, header
) == 0,
2181 "offset of CullFace header should be 0");
2182 static_assert(offsetof(CullFace
, mode
) == 4,
2183 "offset of CullFace mode should be 4");
2185 struct DeleteBuffersImmediate
{
2186 typedef DeleteBuffersImmediate ValueType
;
2187 static const CommandId kCmdId
= kDeleteBuffersImmediate
;
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
* _buffers
) {
2207 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
2210 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _buffers
) {
2211 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
2212 const uint32_t size
= ComputeSize(_n
);
2213 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2216 gpu::CommandHeader header
;
2220 static_assert(sizeof(DeleteBuffersImmediate
) == 8,
2221 "size of DeleteBuffersImmediate should be 8");
2222 static_assert(offsetof(DeleteBuffersImmediate
, header
) == 0,
2223 "offset of DeleteBuffersImmediate header should be 0");
2224 static_assert(offsetof(DeleteBuffersImmediate
, n
) == 4,
2225 "offset of DeleteBuffersImmediate n should be 4");
2227 struct DeleteFramebuffersImmediate
{
2228 typedef DeleteFramebuffersImmediate ValueType
;
2229 static const CommandId kCmdId
= kDeleteFramebuffersImmediate
;
2230 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2231 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2233 static uint32_t ComputeDataSize(GLsizei n
) {
2234 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2237 static uint32_t ComputeSize(GLsizei n
) {
2238 return static_cast<uint32_t>(sizeof(ValueType
) +
2239 ComputeDataSize(n
)); // NOLINT
2242 void SetHeader(GLsizei n
) {
2243 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2246 void Init(GLsizei _n
, const GLuint
* _framebuffers
) {
2249 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
2252 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _framebuffers
) {
2253 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
2254 const uint32_t size
= ComputeSize(_n
);
2255 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2258 gpu::CommandHeader header
;
2262 static_assert(sizeof(DeleteFramebuffersImmediate
) == 8,
2263 "size of DeleteFramebuffersImmediate should be 8");
2264 static_assert(offsetof(DeleteFramebuffersImmediate
, header
) == 0,
2265 "offset of DeleteFramebuffersImmediate header should be 0");
2266 static_assert(offsetof(DeleteFramebuffersImmediate
, n
) == 4,
2267 "offset of DeleteFramebuffersImmediate n should be 4");
2269 struct DeleteProgram
{
2270 typedef DeleteProgram ValueType
;
2271 static const CommandId kCmdId
= kDeleteProgram
;
2272 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2273 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2275 static uint32_t ComputeSize() {
2276 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2279 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2281 void Init(GLuint _program
) {
2286 void* Set(void* cmd
, GLuint _program
) {
2287 static_cast<ValueType
*>(cmd
)->Init(_program
);
2288 return NextCmdAddress
<ValueType
>(cmd
);
2291 gpu::CommandHeader header
;
2295 static_assert(sizeof(DeleteProgram
) == 8, "size of DeleteProgram should be 8");
2296 static_assert(offsetof(DeleteProgram
, header
) == 0,
2297 "offset of DeleteProgram header should be 0");
2298 static_assert(offsetof(DeleteProgram
, program
) == 4,
2299 "offset of DeleteProgram program should be 4");
2301 struct DeleteRenderbuffersImmediate
{
2302 typedef DeleteRenderbuffersImmediate ValueType
;
2303 static const CommandId kCmdId
= kDeleteRenderbuffersImmediate
;
2304 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2305 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2307 static uint32_t ComputeDataSize(GLsizei n
) {
2308 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2311 static uint32_t ComputeSize(GLsizei n
) {
2312 return static_cast<uint32_t>(sizeof(ValueType
) +
2313 ComputeDataSize(n
)); // NOLINT
2316 void SetHeader(GLsizei n
) {
2317 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2320 void Init(GLsizei _n
, const GLuint
* _renderbuffers
) {
2323 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
2326 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _renderbuffers
) {
2327 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
2328 const uint32_t size
= ComputeSize(_n
);
2329 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2332 gpu::CommandHeader header
;
2336 static_assert(sizeof(DeleteRenderbuffersImmediate
) == 8,
2337 "size of DeleteRenderbuffersImmediate should be 8");
2338 static_assert(offsetof(DeleteRenderbuffersImmediate
, header
) == 0,
2339 "offset of DeleteRenderbuffersImmediate header should be 0");
2340 static_assert(offsetof(DeleteRenderbuffersImmediate
, n
) == 4,
2341 "offset of DeleteRenderbuffersImmediate n should be 4");
2343 struct DeleteSamplersImmediate
{
2344 typedef DeleteSamplersImmediate ValueType
;
2345 static const CommandId kCmdId
= kDeleteSamplersImmediate
;
2346 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2347 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2349 static uint32_t ComputeDataSize(GLsizei n
) {
2350 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2353 static uint32_t ComputeSize(GLsizei n
) {
2354 return static_cast<uint32_t>(sizeof(ValueType
) +
2355 ComputeDataSize(n
)); // NOLINT
2358 void SetHeader(GLsizei n
) {
2359 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2362 void Init(GLsizei _n
, const GLuint
* _samplers
) {
2365 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
2368 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _samplers
) {
2369 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
2370 const uint32_t size
= ComputeSize(_n
);
2371 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2374 gpu::CommandHeader header
;
2378 static_assert(sizeof(DeleteSamplersImmediate
) == 8,
2379 "size of DeleteSamplersImmediate should be 8");
2380 static_assert(offsetof(DeleteSamplersImmediate
, header
) == 0,
2381 "offset of DeleteSamplersImmediate header should be 0");
2382 static_assert(offsetof(DeleteSamplersImmediate
, n
) == 4,
2383 "offset of DeleteSamplersImmediate n should be 4");
2386 typedef DeleteSync ValueType
;
2387 static const CommandId kCmdId
= kDeleteSync
;
2388 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2389 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2391 static uint32_t ComputeSize() {
2392 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2395 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2397 void Init(GLuint _sync
) {
2402 void* Set(void* cmd
, GLuint _sync
) {
2403 static_cast<ValueType
*>(cmd
)->Init(_sync
);
2404 return NextCmdAddress
<ValueType
>(cmd
);
2407 gpu::CommandHeader header
;
2411 static_assert(sizeof(DeleteSync
) == 8, "size of DeleteSync should be 8");
2412 static_assert(offsetof(DeleteSync
, header
) == 0,
2413 "offset of DeleteSync header should be 0");
2414 static_assert(offsetof(DeleteSync
, sync
) == 4,
2415 "offset of DeleteSync sync should be 4");
2417 struct DeleteShader
{
2418 typedef DeleteShader ValueType
;
2419 static const CommandId kCmdId
= kDeleteShader
;
2420 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2421 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2423 static uint32_t ComputeSize() {
2424 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2427 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2429 void Init(GLuint _shader
) {
2434 void* Set(void* cmd
, GLuint _shader
) {
2435 static_cast<ValueType
*>(cmd
)->Init(_shader
);
2436 return NextCmdAddress
<ValueType
>(cmd
);
2439 gpu::CommandHeader header
;
2443 static_assert(sizeof(DeleteShader
) == 8, "size of DeleteShader should be 8");
2444 static_assert(offsetof(DeleteShader
, header
) == 0,
2445 "offset of DeleteShader header should be 0");
2446 static_assert(offsetof(DeleteShader
, shader
) == 4,
2447 "offset of DeleteShader shader should be 4");
2449 struct DeleteTexturesImmediate
{
2450 typedef DeleteTexturesImmediate ValueType
;
2451 static const CommandId kCmdId
= kDeleteTexturesImmediate
;
2452 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2453 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2455 static uint32_t ComputeDataSize(GLsizei n
) {
2456 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2459 static uint32_t ComputeSize(GLsizei n
) {
2460 return static_cast<uint32_t>(sizeof(ValueType
) +
2461 ComputeDataSize(n
)); // NOLINT
2464 void SetHeader(GLsizei n
) {
2465 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2468 void Init(GLsizei _n
, const GLuint
* _textures
) {
2471 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
2474 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _textures
) {
2475 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
2476 const uint32_t size
= ComputeSize(_n
);
2477 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2480 gpu::CommandHeader header
;
2484 static_assert(sizeof(DeleteTexturesImmediate
) == 8,
2485 "size of DeleteTexturesImmediate should be 8");
2486 static_assert(offsetof(DeleteTexturesImmediate
, header
) == 0,
2487 "offset of DeleteTexturesImmediate header should be 0");
2488 static_assert(offsetof(DeleteTexturesImmediate
, n
) == 4,
2489 "offset of DeleteTexturesImmediate n should be 4");
2491 struct DeleteTransformFeedbacksImmediate
{
2492 typedef DeleteTransformFeedbacksImmediate ValueType
;
2493 static const CommandId kCmdId
= kDeleteTransformFeedbacksImmediate
;
2494 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2495 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2497 static uint32_t ComputeDataSize(GLsizei n
) {
2498 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2501 static uint32_t ComputeSize(GLsizei n
) {
2502 return static_cast<uint32_t>(sizeof(ValueType
) +
2503 ComputeDataSize(n
)); // NOLINT
2506 void SetHeader(GLsizei n
) {
2507 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2510 void Init(GLsizei _n
, const GLuint
* _ids
) {
2513 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
2516 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _ids
) {
2517 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
2518 const uint32_t size
= ComputeSize(_n
);
2519 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2522 gpu::CommandHeader header
;
2526 static_assert(sizeof(DeleteTransformFeedbacksImmediate
) == 8,
2527 "size of DeleteTransformFeedbacksImmediate should be 8");
2528 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, header
) == 0,
2529 "offset of DeleteTransformFeedbacksImmediate header should be 0");
2530 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, n
) == 4,
2531 "offset of DeleteTransformFeedbacksImmediate n should be 4");
2534 typedef DepthFunc ValueType
;
2535 static const CommandId kCmdId
= kDepthFunc
;
2536 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2537 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2539 static uint32_t ComputeSize() {
2540 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2543 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2545 void Init(GLenum _func
) {
2550 void* Set(void* cmd
, GLenum _func
) {
2551 static_cast<ValueType
*>(cmd
)->Init(_func
);
2552 return NextCmdAddress
<ValueType
>(cmd
);
2555 gpu::CommandHeader header
;
2559 static_assert(sizeof(DepthFunc
) == 8, "size of DepthFunc should be 8");
2560 static_assert(offsetof(DepthFunc
, header
) == 0,
2561 "offset of DepthFunc header should be 0");
2562 static_assert(offsetof(DepthFunc
, func
) == 4,
2563 "offset of DepthFunc func should be 4");
2566 typedef DepthMask ValueType
;
2567 static const CommandId kCmdId
= kDepthMask
;
2568 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2569 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2571 static uint32_t ComputeSize() {
2572 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2575 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2577 void Init(GLboolean _flag
) {
2582 void* Set(void* cmd
, GLboolean _flag
) {
2583 static_cast<ValueType
*>(cmd
)->Init(_flag
);
2584 return NextCmdAddress
<ValueType
>(cmd
);
2587 gpu::CommandHeader header
;
2591 static_assert(sizeof(DepthMask
) == 8, "size of DepthMask should be 8");
2592 static_assert(offsetof(DepthMask
, header
) == 0,
2593 "offset of DepthMask header should be 0");
2594 static_assert(offsetof(DepthMask
, flag
) == 4,
2595 "offset of DepthMask flag should be 4");
2597 struct DepthRangef
{
2598 typedef DepthRangef ValueType
;
2599 static const CommandId kCmdId
= kDepthRangef
;
2600 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2601 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2603 static uint32_t ComputeSize() {
2604 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2607 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2609 void Init(GLclampf _zNear
, GLclampf _zFar
) {
2615 void* Set(void* cmd
, GLclampf _zNear
, GLclampf _zFar
) {
2616 static_cast<ValueType
*>(cmd
)->Init(_zNear
, _zFar
);
2617 return NextCmdAddress
<ValueType
>(cmd
);
2620 gpu::CommandHeader header
;
2625 static_assert(sizeof(DepthRangef
) == 12, "size of DepthRangef should be 12");
2626 static_assert(offsetof(DepthRangef
, header
) == 0,
2627 "offset of DepthRangef header should be 0");
2628 static_assert(offsetof(DepthRangef
, zNear
) == 4,
2629 "offset of DepthRangef zNear should be 4");
2630 static_assert(offsetof(DepthRangef
, zFar
) == 8,
2631 "offset of DepthRangef zFar should be 8");
2633 struct DetachShader
{
2634 typedef DetachShader ValueType
;
2635 static const CommandId kCmdId
= kDetachShader
;
2636 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2637 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2639 static uint32_t ComputeSize() {
2640 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2643 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2645 void Init(GLuint _program
, GLuint _shader
) {
2651 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
2652 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
2653 return NextCmdAddress
<ValueType
>(cmd
);
2656 gpu::CommandHeader header
;
2661 static_assert(sizeof(DetachShader
) == 12, "size of DetachShader should be 12");
2662 static_assert(offsetof(DetachShader
, header
) == 0,
2663 "offset of DetachShader header should be 0");
2664 static_assert(offsetof(DetachShader
, program
) == 4,
2665 "offset of DetachShader program should be 4");
2666 static_assert(offsetof(DetachShader
, shader
) == 8,
2667 "offset of DetachShader shader should be 8");
2670 typedef Disable ValueType
;
2671 static const CommandId kCmdId
= kDisable
;
2672 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2673 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2675 static uint32_t ComputeSize() {
2676 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2679 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2681 void Init(GLenum _cap
) {
2686 void* Set(void* cmd
, GLenum _cap
) {
2687 static_cast<ValueType
*>(cmd
)->Init(_cap
);
2688 return NextCmdAddress
<ValueType
>(cmd
);
2691 gpu::CommandHeader header
;
2695 static_assert(sizeof(Disable
) == 8, "size of Disable should be 8");
2696 static_assert(offsetof(Disable
, header
) == 0,
2697 "offset of Disable header should be 0");
2698 static_assert(offsetof(Disable
, cap
) == 4, "offset of Disable cap should be 4");
2700 struct DisableVertexAttribArray
{
2701 typedef DisableVertexAttribArray ValueType
;
2702 static const CommandId kCmdId
= kDisableVertexAttribArray
;
2703 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2704 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2706 static uint32_t ComputeSize() {
2707 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2710 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2712 void Init(GLuint _index
) {
2717 void* Set(void* cmd
, GLuint _index
) {
2718 static_cast<ValueType
*>(cmd
)->Init(_index
);
2719 return NextCmdAddress
<ValueType
>(cmd
);
2722 gpu::CommandHeader header
;
2726 static_assert(sizeof(DisableVertexAttribArray
) == 8,
2727 "size of DisableVertexAttribArray should be 8");
2728 static_assert(offsetof(DisableVertexAttribArray
, header
) == 0,
2729 "offset of DisableVertexAttribArray header should be 0");
2730 static_assert(offsetof(DisableVertexAttribArray
, index
) == 4,
2731 "offset of DisableVertexAttribArray index should be 4");
2734 typedef DrawArrays ValueType
;
2735 static const CommandId kCmdId
= kDrawArrays
;
2736 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2737 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2739 static uint32_t ComputeSize() {
2740 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2743 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2745 void Init(GLenum _mode
, GLint _first
, GLsizei _count
) {
2752 void* Set(void* cmd
, GLenum _mode
, GLint _first
, GLsizei _count
) {
2753 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
);
2754 return NextCmdAddress
<ValueType
>(cmd
);
2757 gpu::CommandHeader header
;
2763 static_assert(sizeof(DrawArrays
) == 16, "size of DrawArrays should be 16");
2764 static_assert(offsetof(DrawArrays
, header
) == 0,
2765 "offset of DrawArrays header should be 0");
2766 static_assert(offsetof(DrawArrays
, mode
) == 4,
2767 "offset of DrawArrays mode should be 4");
2768 static_assert(offsetof(DrawArrays
, first
) == 8,
2769 "offset of DrawArrays first should be 8");
2770 static_assert(offsetof(DrawArrays
, count
) == 12,
2771 "offset of DrawArrays count should be 12");
2773 struct DrawElements
{
2774 typedef DrawElements ValueType
;
2775 static const CommandId kCmdId
= kDrawElements
;
2776 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2777 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2779 static uint32_t ComputeSize() {
2780 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2783 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2785 void Init(GLenum _mode
, GLsizei _count
, GLenum _type
, GLuint _index_offset
) {
2790 index_offset
= _index_offset
;
2793 void* Set(void* cmd
,
2797 GLuint _index_offset
) {
2798 static_cast<ValueType
*>(cmd
)->Init(_mode
, _count
, _type
, _index_offset
);
2799 return NextCmdAddress
<ValueType
>(cmd
);
2802 gpu::CommandHeader header
;
2806 uint32_t index_offset
;
2809 static_assert(sizeof(DrawElements
) == 20, "size of DrawElements should be 20");
2810 static_assert(offsetof(DrawElements
, header
) == 0,
2811 "offset of DrawElements header should be 0");
2812 static_assert(offsetof(DrawElements
, mode
) == 4,
2813 "offset of DrawElements mode should be 4");
2814 static_assert(offsetof(DrawElements
, count
) == 8,
2815 "offset of DrawElements count should be 8");
2816 static_assert(offsetof(DrawElements
, type
) == 12,
2817 "offset of DrawElements type should be 12");
2818 static_assert(offsetof(DrawElements
, index_offset
) == 16,
2819 "offset of DrawElements index_offset should be 16");
2822 typedef Enable ValueType
;
2823 static const CommandId kCmdId
= kEnable
;
2824 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2825 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2827 static uint32_t ComputeSize() {
2828 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2831 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2833 void Init(GLenum _cap
) {
2838 void* Set(void* cmd
, GLenum _cap
) {
2839 static_cast<ValueType
*>(cmd
)->Init(_cap
);
2840 return NextCmdAddress
<ValueType
>(cmd
);
2843 gpu::CommandHeader header
;
2847 static_assert(sizeof(Enable
) == 8, "size of Enable should be 8");
2848 static_assert(offsetof(Enable
, header
) == 0,
2849 "offset of Enable header should be 0");
2850 static_assert(offsetof(Enable
, cap
) == 4, "offset of Enable cap should be 4");
2852 struct EnableVertexAttribArray
{
2853 typedef EnableVertexAttribArray ValueType
;
2854 static const CommandId kCmdId
= kEnableVertexAttribArray
;
2855 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2856 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2858 static uint32_t ComputeSize() {
2859 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2862 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2864 void Init(GLuint _index
) {
2869 void* Set(void* cmd
, GLuint _index
) {
2870 static_cast<ValueType
*>(cmd
)->Init(_index
);
2871 return NextCmdAddress
<ValueType
>(cmd
);
2874 gpu::CommandHeader header
;
2878 static_assert(sizeof(EnableVertexAttribArray
) == 8,
2879 "size of EnableVertexAttribArray should be 8");
2880 static_assert(offsetof(EnableVertexAttribArray
, header
) == 0,
2881 "offset of EnableVertexAttribArray header should be 0");
2882 static_assert(offsetof(EnableVertexAttribArray
, index
) == 4,
2883 "offset of EnableVertexAttribArray index should be 4");
2886 typedef FenceSync ValueType
;
2887 static const CommandId kCmdId
= kFenceSync
;
2888 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2891 static uint32_t ComputeSize() {
2892 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2895 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2897 void Init(uint32_t _client_id
) {
2899 client_id
= _client_id
;
2902 void* Set(void* cmd
, uint32_t _client_id
) {
2903 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
2904 return NextCmdAddress
<ValueType
>(cmd
);
2907 gpu::CommandHeader header
;
2909 static const uint32_t condition
= GL_SYNC_GPU_COMMANDS_COMPLETE
;
2910 static const uint32_t flags
= 0;
2913 static_assert(sizeof(FenceSync
) == 8, "size of FenceSync should be 8");
2914 static_assert(offsetof(FenceSync
, header
) == 0,
2915 "offset of FenceSync header should be 0");
2916 static_assert(offsetof(FenceSync
, client_id
) == 4,
2917 "offset of FenceSync client_id should be 4");
2920 typedef Finish ValueType
;
2921 static const CommandId kCmdId
= kFinish
;
2922 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2923 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2925 static uint32_t ComputeSize() {
2926 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2929 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2931 void Init() { SetHeader(); }
2933 void* Set(void* cmd
) {
2934 static_cast<ValueType
*>(cmd
)->Init();
2935 return NextCmdAddress
<ValueType
>(cmd
);
2938 gpu::CommandHeader header
;
2941 static_assert(sizeof(Finish
) == 4, "size of Finish should be 4");
2942 static_assert(offsetof(Finish
, header
) == 0,
2943 "offset of Finish header should be 0");
2946 typedef Flush ValueType
;
2947 static const CommandId kCmdId
= kFlush
;
2948 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2949 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2951 static uint32_t ComputeSize() {
2952 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2955 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2957 void Init() { SetHeader(); }
2959 void* Set(void* cmd
) {
2960 static_cast<ValueType
*>(cmd
)->Init();
2961 return NextCmdAddress
<ValueType
>(cmd
);
2964 gpu::CommandHeader header
;
2967 static_assert(sizeof(Flush
) == 4, "size of Flush should be 4");
2968 static_assert(offsetof(Flush
, header
) == 0,
2969 "offset of Flush header should be 0");
2971 struct FramebufferRenderbuffer
{
2972 typedef FramebufferRenderbuffer ValueType
;
2973 static const CommandId kCmdId
= kFramebufferRenderbuffer
;
2974 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2975 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2977 static uint32_t ComputeSize() {
2978 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2981 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2983 void Init(GLenum _target
,
2985 GLenum _renderbuffertarget
,
2986 GLuint _renderbuffer
) {
2989 attachment
= _attachment
;
2990 renderbuffertarget
= _renderbuffertarget
;
2991 renderbuffer
= _renderbuffer
;
2994 void* Set(void* cmd
,
2997 GLenum _renderbuffertarget
,
2998 GLuint _renderbuffer
) {
2999 static_cast<ValueType
*>(cmd
)
3000 ->Init(_target
, _attachment
, _renderbuffertarget
, _renderbuffer
);
3001 return NextCmdAddress
<ValueType
>(cmd
);
3004 gpu::CommandHeader header
;
3006 uint32_t attachment
;
3007 uint32_t renderbuffertarget
;
3008 uint32_t renderbuffer
;
3011 static_assert(sizeof(FramebufferRenderbuffer
) == 20,
3012 "size of FramebufferRenderbuffer should be 20");
3013 static_assert(offsetof(FramebufferRenderbuffer
, header
) == 0,
3014 "offset of FramebufferRenderbuffer header should be 0");
3015 static_assert(offsetof(FramebufferRenderbuffer
, target
) == 4,
3016 "offset of FramebufferRenderbuffer target should be 4");
3017 static_assert(offsetof(FramebufferRenderbuffer
, attachment
) == 8,
3018 "offset of FramebufferRenderbuffer attachment should be 8");
3020 offsetof(FramebufferRenderbuffer
, renderbuffertarget
) == 12,
3021 "offset of FramebufferRenderbuffer renderbuffertarget should be 12");
3022 static_assert(offsetof(FramebufferRenderbuffer
, renderbuffer
) == 16,
3023 "offset of FramebufferRenderbuffer renderbuffer should be 16");
3025 struct FramebufferTexture2D
{
3026 typedef FramebufferTexture2D ValueType
;
3027 static const CommandId kCmdId
= kFramebufferTexture2D
;
3028 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3029 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
3031 static uint32_t ComputeSize() {
3032 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3035 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3037 void Init(GLenum _target
,
3043 attachment
= _attachment
;
3044 textarget
= _textarget
;
3048 void* Set(void* cmd
,
3053 static_cast<ValueType
*>(cmd
)
3054 ->Init(_target
, _attachment
, _textarget
, _texture
);
3055 return NextCmdAddress
<ValueType
>(cmd
);
3058 gpu::CommandHeader header
;
3060 uint32_t attachment
;
3063 static const int32_t level
= 0;
3066 static_assert(sizeof(FramebufferTexture2D
) == 20,
3067 "size of FramebufferTexture2D should be 20");
3068 static_assert(offsetof(FramebufferTexture2D
, header
) == 0,
3069 "offset of FramebufferTexture2D header should be 0");
3070 static_assert(offsetof(FramebufferTexture2D
, target
) == 4,
3071 "offset of FramebufferTexture2D target should be 4");
3072 static_assert(offsetof(FramebufferTexture2D
, attachment
) == 8,
3073 "offset of FramebufferTexture2D attachment should be 8");
3074 static_assert(offsetof(FramebufferTexture2D
, textarget
) == 12,
3075 "offset of FramebufferTexture2D textarget should be 12");
3076 static_assert(offsetof(FramebufferTexture2D
, texture
) == 16,
3077 "offset of FramebufferTexture2D texture should be 16");
3079 struct FramebufferTextureLayer
{
3080 typedef FramebufferTextureLayer ValueType
;
3081 static const CommandId kCmdId
= kFramebufferTextureLayer
;
3082 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3083 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3085 static uint32_t ComputeSize() {
3086 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3089 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3091 void Init(GLenum _target
,
3098 attachment
= _attachment
;
3104 void* Set(void* cmd
,
3110 static_cast<ValueType
*>(cmd
)
3111 ->Init(_target
, _attachment
, _texture
, _level
, _layer
);
3112 return NextCmdAddress
<ValueType
>(cmd
);
3115 gpu::CommandHeader header
;
3117 uint32_t attachment
;
3123 static_assert(sizeof(FramebufferTextureLayer
) == 24,
3124 "size of FramebufferTextureLayer should be 24");
3125 static_assert(offsetof(FramebufferTextureLayer
, header
) == 0,
3126 "offset of FramebufferTextureLayer header should be 0");
3127 static_assert(offsetof(FramebufferTextureLayer
, target
) == 4,
3128 "offset of FramebufferTextureLayer target should be 4");
3129 static_assert(offsetof(FramebufferTextureLayer
, attachment
) == 8,
3130 "offset of FramebufferTextureLayer attachment should be 8");
3131 static_assert(offsetof(FramebufferTextureLayer
, texture
) == 12,
3132 "offset of FramebufferTextureLayer texture should be 12");
3133 static_assert(offsetof(FramebufferTextureLayer
, level
) == 16,
3134 "offset of FramebufferTextureLayer level should be 16");
3135 static_assert(offsetof(FramebufferTextureLayer
, layer
) == 20,
3136 "offset of FramebufferTextureLayer layer should be 20");
3139 typedef FrontFace ValueType
;
3140 static const CommandId kCmdId
= kFrontFace
;
3141 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3142 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3144 static uint32_t ComputeSize() {
3145 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3148 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3150 void Init(GLenum _mode
) {
3155 void* Set(void* cmd
, GLenum _mode
) {
3156 static_cast<ValueType
*>(cmd
)->Init(_mode
);
3157 return NextCmdAddress
<ValueType
>(cmd
);
3160 gpu::CommandHeader header
;
3164 static_assert(sizeof(FrontFace
) == 8, "size of FrontFace should be 8");
3165 static_assert(offsetof(FrontFace
, header
) == 0,
3166 "offset of FrontFace header should be 0");
3167 static_assert(offsetof(FrontFace
, mode
) == 4,
3168 "offset of FrontFace mode should be 4");
3170 struct GenBuffersImmediate
{
3171 typedef GenBuffersImmediate ValueType
;
3172 static const CommandId kCmdId
= kGenBuffersImmediate
;
3173 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3174 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3176 static uint32_t ComputeDataSize(GLsizei n
) {
3177 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3180 static uint32_t ComputeSize(GLsizei n
) {
3181 return static_cast<uint32_t>(sizeof(ValueType
) +
3182 ComputeDataSize(n
)); // NOLINT
3185 void SetHeader(GLsizei n
) {
3186 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3189 void Init(GLsizei _n
, GLuint
* _buffers
) {
3192 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
3195 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
3196 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
3197 const uint32_t size
= ComputeSize(_n
);
3198 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3201 gpu::CommandHeader header
;
3205 static_assert(sizeof(GenBuffersImmediate
) == 8,
3206 "size of GenBuffersImmediate should be 8");
3207 static_assert(offsetof(GenBuffersImmediate
, header
) == 0,
3208 "offset of GenBuffersImmediate header should be 0");
3209 static_assert(offsetof(GenBuffersImmediate
, n
) == 4,
3210 "offset of GenBuffersImmediate n should be 4");
3212 struct GenerateMipmap
{
3213 typedef GenerateMipmap ValueType
;
3214 static const CommandId kCmdId
= kGenerateMipmap
;
3215 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3216 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3218 static uint32_t ComputeSize() {
3219 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3222 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3224 void Init(GLenum _target
) {
3229 void* Set(void* cmd
, GLenum _target
) {
3230 static_cast<ValueType
*>(cmd
)->Init(_target
);
3231 return NextCmdAddress
<ValueType
>(cmd
);
3234 gpu::CommandHeader header
;
3238 static_assert(sizeof(GenerateMipmap
) == 8,
3239 "size of GenerateMipmap should be 8");
3240 static_assert(offsetof(GenerateMipmap
, header
) == 0,
3241 "offset of GenerateMipmap header should be 0");
3242 static_assert(offsetof(GenerateMipmap
, target
) == 4,
3243 "offset of GenerateMipmap target should be 4");
3245 struct GenFramebuffersImmediate
{
3246 typedef GenFramebuffersImmediate ValueType
;
3247 static const CommandId kCmdId
= kGenFramebuffersImmediate
;
3248 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3249 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3251 static uint32_t ComputeDataSize(GLsizei n
) {
3252 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3255 static uint32_t ComputeSize(GLsizei n
) {
3256 return static_cast<uint32_t>(sizeof(ValueType
) +
3257 ComputeDataSize(n
)); // NOLINT
3260 void SetHeader(GLsizei n
) {
3261 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3264 void Init(GLsizei _n
, GLuint
* _framebuffers
) {
3267 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
3270 void* Set(void* cmd
, GLsizei _n
, GLuint
* _framebuffers
) {
3271 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
3272 const uint32_t size
= ComputeSize(_n
);
3273 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3276 gpu::CommandHeader header
;
3280 static_assert(sizeof(GenFramebuffersImmediate
) == 8,
3281 "size of GenFramebuffersImmediate should be 8");
3282 static_assert(offsetof(GenFramebuffersImmediate
, header
) == 0,
3283 "offset of GenFramebuffersImmediate header should be 0");
3284 static_assert(offsetof(GenFramebuffersImmediate
, n
) == 4,
3285 "offset of GenFramebuffersImmediate n should be 4");
3287 struct GenRenderbuffersImmediate
{
3288 typedef GenRenderbuffersImmediate ValueType
;
3289 static const CommandId kCmdId
= kGenRenderbuffersImmediate
;
3290 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3291 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3293 static uint32_t ComputeDataSize(GLsizei n
) {
3294 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3297 static uint32_t ComputeSize(GLsizei n
) {
3298 return static_cast<uint32_t>(sizeof(ValueType
) +
3299 ComputeDataSize(n
)); // NOLINT
3302 void SetHeader(GLsizei n
) {
3303 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3306 void Init(GLsizei _n
, GLuint
* _renderbuffers
) {
3309 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
3312 void* Set(void* cmd
, GLsizei _n
, GLuint
* _renderbuffers
) {
3313 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
3314 const uint32_t size
= ComputeSize(_n
);
3315 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3318 gpu::CommandHeader header
;
3322 static_assert(sizeof(GenRenderbuffersImmediate
) == 8,
3323 "size of GenRenderbuffersImmediate should be 8");
3324 static_assert(offsetof(GenRenderbuffersImmediate
, header
) == 0,
3325 "offset of GenRenderbuffersImmediate header should be 0");
3326 static_assert(offsetof(GenRenderbuffersImmediate
, n
) == 4,
3327 "offset of GenRenderbuffersImmediate n should be 4");
3329 struct GenSamplersImmediate
{
3330 typedef GenSamplersImmediate ValueType
;
3331 static const CommandId kCmdId
= kGenSamplersImmediate
;
3332 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3333 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3335 static uint32_t ComputeDataSize(GLsizei n
) {
3336 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3339 static uint32_t ComputeSize(GLsizei n
) {
3340 return static_cast<uint32_t>(sizeof(ValueType
) +
3341 ComputeDataSize(n
)); // NOLINT
3344 void SetHeader(GLsizei n
) {
3345 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3348 void Init(GLsizei _n
, GLuint
* _samplers
) {
3351 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
3354 void* Set(void* cmd
, GLsizei _n
, GLuint
* _samplers
) {
3355 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
3356 const uint32_t size
= ComputeSize(_n
);
3357 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3360 gpu::CommandHeader header
;
3364 static_assert(sizeof(GenSamplersImmediate
) == 8,
3365 "size of GenSamplersImmediate should be 8");
3366 static_assert(offsetof(GenSamplersImmediate
, header
) == 0,
3367 "offset of GenSamplersImmediate header should be 0");
3368 static_assert(offsetof(GenSamplersImmediate
, n
) == 4,
3369 "offset of GenSamplersImmediate n should be 4");
3371 struct GenTexturesImmediate
{
3372 typedef GenTexturesImmediate ValueType
;
3373 static const CommandId kCmdId
= kGenTexturesImmediate
;
3374 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3377 static uint32_t ComputeDataSize(GLsizei n
) {
3378 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3381 static uint32_t ComputeSize(GLsizei n
) {
3382 return static_cast<uint32_t>(sizeof(ValueType
) +
3383 ComputeDataSize(n
)); // NOLINT
3386 void SetHeader(GLsizei n
) {
3387 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3390 void Init(GLsizei _n
, GLuint
* _textures
) {
3393 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
3396 void* Set(void* cmd
, GLsizei _n
, GLuint
* _textures
) {
3397 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
3398 const uint32_t size
= ComputeSize(_n
);
3399 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3402 gpu::CommandHeader header
;
3406 static_assert(sizeof(GenTexturesImmediate
) == 8,
3407 "size of GenTexturesImmediate should be 8");
3408 static_assert(offsetof(GenTexturesImmediate
, header
) == 0,
3409 "offset of GenTexturesImmediate header should be 0");
3410 static_assert(offsetof(GenTexturesImmediate
, n
) == 4,
3411 "offset of GenTexturesImmediate n should be 4");
3413 struct GenTransformFeedbacksImmediate
{
3414 typedef GenTransformFeedbacksImmediate ValueType
;
3415 static const CommandId kCmdId
= kGenTransformFeedbacksImmediate
;
3416 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3417 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3419 static uint32_t ComputeDataSize(GLsizei n
) {
3420 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3423 static uint32_t ComputeSize(GLsizei n
) {
3424 return static_cast<uint32_t>(sizeof(ValueType
) +
3425 ComputeDataSize(n
)); // NOLINT
3428 void SetHeader(GLsizei n
) {
3429 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3432 void Init(GLsizei _n
, GLuint
* _ids
) {
3435 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
3438 void* Set(void* cmd
, GLsizei _n
, GLuint
* _ids
) {
3439 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
3440 const uint32_t size
= ComputeSize(_n
);
3441 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3444 gpu::CommandHeader header
;
3448 static_assert(sizeof(GenTransformFeedbacksImmediate
) == 8,
3449 "size of GenTransformFeedbacksImmediate should be 8");
3450 static_assert(offsetof(GenTransformFeedbacksImmediate
, header
) == 0,
3451 "offset of GenTransformFeedbacksImmediate header should be 0");
3452 static_assert(offsetof(GenTransformFeedbacksImmediate
, n
) == 4,
3453 "offset of GenTransformFeedbacksImmediate n should be 4");
3455 struct GetActiveAttrib
{
3456 typedef GetActiveAttrib ValueType
;
3457 static const CommandId kCmdId
= kGetActiveAttrib
;
3458 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3459 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3467 static uint32_t ComputeSize() {
3468 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3471 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3473 void Init(GLuint _program
,
3475 uint32_t _name_bucket_id
,
3476 uint32_t _result_shm_id
,
3477 uint32_t _result_shm_offset
) {
3481 name_bucket_id
= _name_bucket_id
;
3482 result_shm_id
= _result_shm_id
;
3483 result_shm_offset
= _result_shm_offset
;
3486 void* Set(void* cmd
,
3489 uint32_t _name_bucket_id
,
3490 uint32_t _result_shm_id
,
3491 uint32_t _result_shm_offset
) {
3492 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3493 _result_shm_id
, _result_shm_offset
);
3494 return NextCmdAddress
<ValueType
>(cmd
);
3497 gpu::CommandHeader header
;
3500 uint32_t name_bucket_id
;
3501 uint32_t result_shm_id
;
3502 uint32_t result_shm_offset
;
3505 static_assert(sizeof(GetActiveAttrib
) == 24,
3506 "size of GetActiveAttrib should be 24");
3507 static_assert(offsetof(GetActiveAttrib
, header
) == 0,
3508 "offset of GetActiveAttrib header should be 0");
3509 static_assert(offsetof(GetActiveAttrib
, program
) == 4,
3510 "offset of GetActiveAttrib program should be 4");
3511 static_assert(offsetof(GetActiveAttrib
, index
) == 8,
3512 "offset of GetActiveAttrib index should be 8");
3513 static_assert(offsetof(GetActiveAttrib
, name_bucket_id
) == 12,
3514 "offset of GetActiveAttrib name_bucket_id should be 12");
3515 static_assert(offsetof(GetActiveAttrib
, result_shm_id
) == 16,
3516 "offset of GetActiveAttrib result_shm_id should be 16");
3517 static_assert(offsetof(GetActiveAttrib
, result_shm_offset
) == 20,
3518 "offset of GetActiveAttrib result_shm_offset should be 20");
3519 static_assert(offsetof(GetActiveAttrib::Result
, success
) == 0,
3520 "offset of GetActiveAttrib Result success should be "
3522 static_assert(offsetof(GetActiveAttrib::Result
, size
) == 4,
3523 "offset of GetActiveAttrib Result size should be "
3525 static_assert(offsetof(GetActiveAttrib::Result
, type
) == 8,
3526 "offset of GetActiveAttrib Result type should be "
3529 struct GetActiveUniform
{
3530 typedef GetActiveUniform ValueType
;
3531 static const CommandId kCmdId
= kGetActiveUniform
;
3532 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3533 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3541 static uint32_t ComputeSize() {
3542 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3545 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3547 void Init(GLuint _program
,
3549 uint32_t _name_bucket_id
,
3550 uint32_t _result_shm_id
,
3551 uint32_t _result_shm_offset
) {
3555 name_bucket_id
= _name_bucket_id
;
3556 result_shm_id
= _result_shm_id
;
3557 result_shm_offset
= _result_shm_offset
;
3560 void* Set(void* cmd
,
3563 uint32_t _name_bucket_id
,
3564 uint32_t _result_shm_id
,
3565 uint32_t _result_shm_offset
) {
3566 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3567 _result_shm_id
, _result_shm_offset
);
3568 return NextCmdAddress
<ValueType
>(cmd
);
3571 gpu::CommandHeader header
;
3574 uint32_t name_bucket_id
;
3575 uint32_t result_shm_id
;
3576 uint32_t result_shm_offset
;
3579 static_assert(sizeof(GetActiveUniform
) == 24,
3580 "size of GetActiveUniform should be 24");
3581 static_assert(offsetof(GetActiveUniform
, header
) == 0,
3582 "offset of GetActiveUniform header should be 0");
3583 static_assert(offsetof(GetActiveUniform
, program
) == 4,
3584 "offset of GetActiveUniform program should be 4");
3585 static_assert(offsetof(GetActiveUniform
, index
) == 8,
3586 "offset of GetActiveUniform index should be 8");
3587 static_assert(offsetof(GetActiveUniform
, name_bucket_id
) == 12,
3588 "offset of GetActiveUniform name_bucket_id should be 12");
3589 static_assert(offsetof(GetActiveUniform
, result_shm_id
) == 16,
3590 "offset of GetActiveUniform result_shm_id should be 16");
3591 static_assert(offsetof(GetActiveUniform
, result_shm_offset
) == 20,
3592 "offset of GetActiveUniform result_shm_offset should be 20");
3593 static_assert(offsetof(GetActiveUniform::Result
, success
) == 0,
3594 "offset of GetActiveUniform Result success should be "
3596 static_assert(offsetof(GetActiveUniform::Result
, size
) == 4,
3597 "offset of GetActiveUniform Result size should be "
3599 static_assert(offsetof(GetActiveUniform::Result
, type
) == 8,
3600 "offset of GetActiveUniform Result type should be "
3603 struct GetActiveUniformBlockiv
{
3604 typedef GetActiveUniformBlockiv ValueType
;
3605 static const CommandId kCmdId
= kGetActiveUniformBlockiv
;
3606 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3607 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3609 typedef SizedResult
<GLint
> Result
;
3611 static uint32_t ComputeSize() {
3612 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3615 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3617 void Init(GLuint _program
,
3620 uint32_t _params_shm_id
,
3621 uint32_t _params_shm_offset
) {
3626 params_shm_id
= _params_shm_id
;
3627 params_shm_offset
= _params_shm_offset
;
3630 void* Set(void* cmd
,
3634 uint32_t _params_shm_id
,
3635 uint32_t _params_shm_offset
) {
3636 static_cast<ValueType
*>(cmd
)
3637 ->Init(_program
, _index
, _pname
, _params_shm_id
, _params_shm_offset
);
3638 return NextCmdAddress
<ValueType
>(cmd
);
3641 gpu::CommandHeader header
;
3645 uint32_t params_shm_id
;
3646 uint32_t params_shm_offset
;
3649 static_assert(sizeof(GetActiveUniformBlockiv
) == 24,
3650 "size of GetActiveUniformBlockiv should be 24");
3651 static_assert(offsetof(GetActiveUniformBlockiv
, header
) == 0,
3652 "offset of GetActiveUniformBlockiv header should be 0");
3653 static_assert(offsetof(GetActiveUniformBlockiv
, program
) == 4,
3654 "offset of GetActiveUniformBlockiv program should be 4");
3655 static_assert(offsetof(GetActiveUniformBlockiv
, index
) == 8,
3656 "offset of GetActiveUniformBlockiv index should be 8");
3657 static_assert(offsetof(GetActiveUniformBlockiv
, pname
) == 12,
3658 "offset of GetActiveUniformBlockiv pname should be 12");
3659 static_assert(offsetof(GetActiveUniformBlockiv
, params_shm_id
) == 16,
3660 "offset of GetActiveUniformBlockiv params_shm_id should be 16");
3662 offsetof(GetActiveUniformBlockiv
, params_shm_offset
) == 20,
3663 "offset of GetActiveUniformBlockiv params_shm_offset should be 20");
3665 struct GetActiveUniformBlockName
{
3666 typedef GetActiveUniformBlockName ValueType
;
3667 static const CommandId kCmdId
= kGetActiveUniformBlockName
;
3668 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3669 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3671 typedef int32_t Result
;
3673 static uint32_t ComputeSize() {
3674 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3677 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3679 void Init(GLuint _program
,
3681 uint32_t _name_bucket_id
,
3682 uint32_t _result_shm_id
,
3683 uint32_t _result_shm_offset
) {
3687 name_bucket_id
= _name_bucket_id
;
3688 result_shm_id
= _result_shm_id
;
3689 result_shm_offset
= _result_shm_offset
;
3692 void* Set(void* cmd
,
3695 uint32_t _name_bucket_id
,
3696 uint32_t _result_shm_id
,
3697 uint32_t _result_shm_offset
) {
3698 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3699 _result_shm_id
, _result_shm_offset
);
3700 return NextCmdAddress
<ValueType
>(cmd
);
3703 gpu::CommandHeader header
;
3706 uint32_t name_bucket_id
;
3707 uint32_t result_shm_id
;
3708 uint32_t result_shm_offset
;
3711 static_assert(sizeof(GetActiveUniformBlockName
) == 24,
3712 "size of GetActiveUniformBlockName should be 24");
3713 static_assert(offsetof(GetActiveUniformBlockName
, header
) == 0,
3714 "offset of GetActiveUniformBlockName header should be 0");
3715 static_assert(offsetof(GetActiveUniformBlockName
, program
) == 4,
3716 "offset of GetActiveUniformBlockName program should be 4");
3717 static_assert(offsetof(GetActiveUniformBlockName
, index
) == 8,
3718 "offset of GetActiveUniformBlockName index should be 8");
3720 offsetof(GetActiveUniformBlockName
, name_bucket_id
) == 12,
3721 "offset of GetActiveUniformBlockName name_bucket_id should be 12");
3722 static_assert(offsetof(GetActiveUniformBlockName
, result_shm_id
) == 16,
3723 "offset of GetActiveUniformBlockName result_shm_id should be 16");
3725 offsetof(GetActiveUniformBlockName
, result_shm_offset
) == 20,
3726 "offset of GetActiveUniformBlockName result_shm_offset should be 20");
3728 struct GetActiveUniformsiv
{
3729 typedef GetActiveUniformsiv ValueType
;
3730 static const CommandId kCmdId
= kGetActiveUniformsiv
;
3731 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3732 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3734 typedef SizedResult
<GLint
> Result
;
3736 static uint32_t ComputeSize() {
3737 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3740 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3742 void Init(GLuint _program
,
3743 uint32_t _indices_bucket_id
,
3745 uint32_t _params_shm_id
,
3746 uint32_t _params_shm_offset
) {
3749 indices_bucket_id
= _indices_bucket_id
;
3751 params_shm_id
= _params_shm_id
;
3752 params_shm_offset
= _params_shm_offset
;
3755 void* Set(void* cmd
,
3757 uint32_t _indices_bucket_id
,
3759 uint32_t _params_shm_id
,
3760 uint32_t _params_shm_offset
) {
3761 static_cast<ValueType
*>(cmd
)->Init(_program
, _indices_bucket_id
, _pname
,
3762 _params_shm_id
, _params_shm_offset
);
3763 return NextCmdAddress
<ValueType
>(cmd
);
3766 gpu::CommandHeader header
;
3768 uint32_t indices_bucket_id
;
3770 uint32_t params_shm_id
;
3771 uint32_t params_shm_offset
;
3774 static_assert(sizeof(GetActiveUniformsiv
) == 24,
3775 "size of GetActiveUniformsiv should be 24");
3776 static_assert(offsetof(GetActiveUniformsiv
, header
) == 0,
3777 "offset of GetActiveUniformsiv header should be 0");
3778 static_assert(offsetof(GetActiveUniformsiv
, program
) == 4,
3779 "offset of GetActiveUniformsiv program should be 4");
3780 static_assert(offsetof(GetActiveUniformsiv
, indices_bucket_id
) == 8,
3781 "offset of GetActiveUniformsiv indices_bucket_id should be 8");
3782 static_assert(offsetof(GetActiveUniformsiv
, pname
) == 12,
3783 "offset of GetActiveUniformsiv pname should be 12");
3784 static_assert(offsetof(GetActiveUniformsiv
, params_shm_id
) == 16,
3785 "offset of GetActiveUniformsiv params_shm_id should be 16");
3786 static_assert(offsetof(GetActiveUniformsiv
, params_shm_offset
) == 20,
3787 "offset of GetActiveUniformsiv params_shm_offset should be 20");
3789 struct GetAttachedShaders
{
3790 typedef GetAttachedShaders ValueType
;
3791 static const CommandId kCmdId
= kGetAttachedShaders
;
3792 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3793 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3795 typedef SizedResult
<GLuint
> Result
;
3797 static uint32_t ComputeSize() {
3798 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3801 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3803 void Init(GLuint _program
,
3804 uint32_t _result_shm_id
,
3805 uint32_t _result_shm_offset
,
3806 uint32_t _result_size
) {
3809 result_shm_id
= _result_shm_id
;
3810 result_shm_offset
= _result_shm_offset
;
3811 result_size
= _result_size
;
3814 void* Set(void* cmd
,
3816 uint32_t _result_shm_id
,
3817 uint32_t _result_shm_offset
,
3818 uint32_t _result_size
) {
3819 static_cast<ValueType
*>(cmd
)
3820 ->Init(_program
, _result_shm_id
, _result_shm_offset
, _result_size
);
3821 return NextCmdAddress
<ValueType
>(cmd
);
3824 gpu::CommandHeader header
;
3826 uint32_t result_shm_id
;
3827 uint32_t result_shm_offset
;
3828 uint32_t result_size
;
3831 static_assert(sizeof(GetAttachedShaders
) == 20,
3832 "size of GetAttachedShaders should be 20");
3833 static_assert(offsetof(GetAttachedShaders
, header
) == 0,
3834 "offset of GetAttachedShaders header should be 0");
3835 static_assert(offsetof(GetAttachedShaders
, program
) == 4,
3836 "offset of GetAttachedShaders program should be 4");
3837 static_assert(offsetof(GetAttachedShaders
, result_shm_id
) == 8,
3838 "offset of GetAttachedShaders result_shm_id should be 8");
3839 static_assert(offsetof(GetAttachedShaders
, result_shm_offset
) == 12,
3840 "offset of GetAttachedShaders result_shm_offset should be 12");
3841 static_assert(offsetof(GetAttachedShaders
, result_size
) == 16,
3842 "offset of GetAttachedShaders result_size should be 16");
3844 struct GetAttribLocation
{
3845 typedef GetAttribLocation ValueType
;
3846 static const CommandId kCmdId
= kGetAttribLocation
;
3847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3850 typedef GLint Result
;
3852 static uint32_t ComputeSize() {
3853 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3856 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3858 void Init(GLuint _program
,
3859 uint32_t _name_bucket_id
,
3860 uint32_t _location_shm_id
,
3861 uint32_t _location_shm_offset
) {
3864 name_bucket_id
= _name_bucket_id
;
3865 location_shm_id
= _location_shm_id
;
3866 location_shm_offset
= _location_shm_offset
;
3869 void* Set(void* cmd
,
3871 uint32_t _name_bucket_id
,
3872 uint32_t _location_shm_id
,
3873 uint32_t _location_shm_offset
) {
3874 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
3875 _location_shm_id
, _location_shm_offset
);
3876 return NextCmdAddress
<ValueType
>(cmd
);
3879 gpu::CommandHeader header
;
3881 uint32_t name_bucket_id
;
3882 uint32_t location_shm_id
;
3883 uint32_t location_shm_offset
;
3886 static_assert(sizeof(GetAttribLocation
) == 20,
3887 "size of GetAttribLocation should be 20");
3888 static_assert(offsetof(GetAttribLocation
, header
) == 0,
3889 "offset of GetAttribLocation header should be 0");
3890 static_assert(offsetof(GetAttribLocation
, program
) == 4,
3891 "offset of GetAttribLocation program should be 4");
3892 static_assert(offsetof(GetAttribLocation
, name_bucket_id
) == 8,
3893 "offset of GetAttribLocation name_bucket_id should be 8");
3894 static_assert(offsetof(GetAttribLocation
, location_shm_id
) == 12,
3895 "offset of GetAttribLocation location_shm_id should be 12");
3896 static_assert(offsetof(GetAttribLocation
, location_shm_offset
) == 16,
3897 "offset of GetAttribLocation location_shm_offset should be 16");
3899 struct GetBooleanv
{
3900 typedef GetBooleanv ValueType
;
3901 static const CommandId kCmdId
= kGetBooleanv
;
3902 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3903 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3905 typedef SizedResult
<GLboolean
> Result
;
3907 static uint32_t ComputeSize() {
3908 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3911 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3913 void Init(GLenum _pname
,
3914 uint32_t _params_shm_id
,
3915 uint32_t _params_shm_offset
) {
3918 params_shm_id
= _params_shm_id
;
3919 params_shm_offset
= _params_shm_offset
;
3922 void* Set(void* cmd
,
3924 uint32_t _params_shm_id
,
3925 uint32_t _params_shm_offset
) {
3926 static_cast<ValueType
*>(cmd
)
3927 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
3928 return NextCmdAddress
<ValueType
>(cmd
);
3931 gpu::CommandHeader header
;
3933 uint32_t params_shm_id
;
3934 uint32_t params_shm_offset
;
3937 static_assert(sizeof(GetBooleanv
) == 16, "size of GetBooleanv should be 16");
3938 static_assert(offsetof(GetBooleanv
, header
) == 0,
3939 "offset of GetBooleanv header should be 0");
3940 static_assert(offsetof(GetBooleanv
, pname
) == 4,
3941 "offset of GetBooleanv pname should be 4");
3942 static_assert(offsetof(GetBooleanv
, params_shm_id
) == 8,
3943 "offset of GetBooleanv params_shm_id should be 8");
3944 static_assert(offsetof(GetBooleanv
, params_shm_offset
) == 12,
3945 "offset of GetBooleanv params_shm_offset should be 12");
3947 struct GetBufferParameteriv
{
3948 typedef GetBufferParameteriv ValueType
;
3949 static const CommandId kCmdId
= kGetBufferParameteriv
;
3950 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3951 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3953 typedef SizedResult
<GLint
> Result
;
3955 static uint32_t ComputeSize() {
3956 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3959 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3961 void Init(GLenum _target
,
3963 uint32_t _params_shm_id
,
3964 uint32_t _params_shm_offset
) {
3968 params_shm_id
= _params_shm_id
;
3969 params_shm_offset
= _params_shm_offset
;
3972 void* Set(void* cmd
,
3975 uint32_t _params_shm_id
,
3976 uint32_t _params_shm_offset
) {
3977 static_cast<ValueType
*>(cmd
)
3978 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3979 return NextCmdAddress
<ValueType
>(cmd
);
3982 gpu::CommandHeader header
;
3985 uint32_t params_shm_id
;
3986 uint32_t params_shm_offset
;
3989 static_assert(sizeof(GetBufferParameteriv
) == 20,
3990 "size of GetBufferParameteriv should be 20");
3991 static_assert(offsetof(GetBufferParameteriv
, header
) == 0,
3992 "offset of GetBufferParameteriv header should be 0");
3993 static_assert(offsetof(GetBufferParameteriv
, target
) == 4,
3994 "offset of GetBufferParameteriv target should be 4");
3995 static_assert(offsetof(GetBufferParameteriv
, pname
) == 8,
3996 "offset of GetBufferParameteriv pname should be 8");
3997 static_assert(offsetof(GetBufferParameteriv
, params_shm_id
) == 12,
3998 "offset of GetBufferParameteriv params_shm_id should be 12");
3999 static_assert(offsetof(GetBufferParameteriv
, params_shm_offset
) == 16,
4000 "offset of GetBufferParameteriv params_shm_offset should be 16");
4003 typedef GetError ValueType
;
4004 static const CommandId kCmdId
= kGetError
;
4005 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4006 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4008 typedef GLenum Result
;
4010 static uint32_t ComputeSize() {
4011 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4014 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4016 void Init(uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
4018 result_shm_id
= _result_shm_id
;
4019 result_shm_offset
= _result_shm_offset
;
4022 void* Set(void* cmd
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
4023 static_cast<ValueType
*>(cmd
)->Init(_result_shm_id
, _result_shm_offset
);
4024 return NextCmdAddress
<ValueType
>(cmd
);
4027 gpu::CommandHeader header
;
4028 uint32_t result_shm_id
;
4029 uint32_t result_shm_offset
;
4032 static_assert(sizeof(GetError
) == 12, "size of GetError should be 12");
4033 static_assert(offsetof(GetError
, header
) == 0,
4034 "offset of GetError header should be 0");
4035 static_assert(offsetof(GetError
, result_shm_id
) == 4,
4036 "offset of GetError result_shm_id should be 4");
4037 static_assert(offsetof(GetError
, result_shm_offset
) == 8,
4038 "offset of GetError result_shm_offset should be 8");
4041 typedef GetFloatv ValueType
;
4042 static const CommandId kCmdId
= kGetFloatv
;
4043 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4044 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4046 typedef SizedResult
<GLfloat
> Result
;
4048 static uint32_t ComputeSize() {
4049 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4052 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4054 void Init(GLenum _pname
,
4055 uint32_t _params_shm_id
,
4056 uint32_t _params_shm_offset
) {
4059 params_shm_id
= _params_shm_id
;
4060 params_shm_offset
= _params_shm_offset
;
4063 void* Set(void* cmd
,
4065 uint32_t _params_shm_id
,
4066 uint32_t _params_shm_offset
) {
4067 static_cast<ValueType
*>(cmd
)
4068 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4069 return NextCmdAddress
<ValueType
>(cmd
);
4072 gpu::CommandHeader header
;
4074 uint32_t params_shm_id
;
4075 uint32_t params_shm_offset
;
4078 static_assert(sizeof(GetFloatv
) == 16, "size of GetFloatv should be 16");
4079 static_assert(offsetof(GetFloatv
, header
) == 0,
4080 "offset of GetFloatv header should be 0");
4081 static_assert(offsetof(GetFloatv
, pname
) == 4,
4082 "offset of GetFloatv pname should be 4");
4083 static_assert(offsetof(GetFloatv
, params_shm_id
) == 8,
4084 "offset of GetFloatv params_shm_id should be 8");
4085 static_assert(offsetof(GetFloatv
, params_shm_offset
) == 12,
4086 "offset of GetFloatv params_shm_offset should be 12");
4088 struct GetFragDataLocation
{
4089 typedef GetFragDataLocation ValueType
;
4090 static const CommandId kCmdId
= kGetFragDataLocation
;
4091 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4092 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4094 typedef GLint Result
;
4096 static uint32_t ComputeSize() {
4097 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4100 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4102 void Init(GLuint _program
,
4103 uint32_t _name_bucket_id
,
4104 uint32_t _location_shm_id
,
4105 uint32_t _location_shm_offset
) {
4108 name_bucket_id
= _name_bucket_id
;
4109 location_shm_id
= _location_shm_id
;
4110 location_shm_offset
= _location_shm_offset
;
4113 void* Set(void* cmd
,
4115 uint32_t _name_bucket_id
,
4116 uint32_t _location_shm_id
,
4117 uint32_t _location_shm_offset
) {
4118 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
4119 _location_shm_id
, _location_shm_offset
);
4120 return NextCmdAddress
<ValueType
>(cmd
);
4123 gpu::CommandHeader header
;
4125 uint32_t name_bucket_id
;
4126 uint32_t location_shm_id
;
4127 uint32_t location_shm_offset
;
4130 static_assert(sizeof(GetFragDataLocation
) == 20,
4131 "size of GetFragDataLocation should be 20");
4132 static_assert(offsetof(GetFragDataLocation
, header
) == 0,
4133 "offset of GetFragDataLocation header should be 0");
4134 static_assert(offsetof(GetFragDataLocation
, program
) == 4,
4135 "offset of GetFragDataLocation program should be 4");
4136 static_assert(offsetof(GetFragDataLocation
, name_bucket_id
) == 8,
4137 "offset of GetFragDataLocation name_bucket_id should be 8");
4138 static_assert(offsetof(GetFragDataLocation
, location_shm_id
) == 12,
4139 "offset of GetFragDataLocation location_shm_id should be 12");
4140 static_assert(offsetof(GetFragDataLocation
, location_shm_offset
) == 16,
4141 "offset of GetFragDataLocation location_shm_offset should be 16");
4143 struct GetFramebufferAttachmentParameteriv
{
4144 typedef GetFramebufferAttachmentParameteriv ValueType
;
4145 static const CommandId kCmdId
= kGetFramebufferAttachmentParameteriv
;
4146 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4147 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4149 typedef SizedResult
<GLint
> Result
;
4151 static uint32_t ComputeSize() {
4152 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4155 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4157 void Init(GLenum _target
,
4160 uint32_t _params_shm_id
,
4161 uint32_t _params_shm_offset
) {
4164 attachment
= _attachment
;
4166 params_shm_id
= _params_shm_id
;
4167 params_shm_offset
= _params_shm_offset
;
4170 void* Set(void* cmd
,
4174 uint32_t _params_shm_id
,
4175 uint32_t _params_shm_offset
) {
4176 static_cast<ValueType
*>(cmd
)->Init(_target
, _attachment
, _pname
,
4177 _params_shm_id
, _params_shm_offset
);
4178 return NextCmdAddress
<ValueType
>(cmd
);
4181 gpu::CommandHeader header
;
4183 uint32_t attachment
;
4185 uint32_t params_shm_id
;
4186 uint32_t params_shm_offset
;
4189 static_assert(sizeof(GetFramebufferAttachmentParameteriv
) == 24,
4190 "size of GetFramebufferAttachmentParameteriv should be 24");
4192 offsetof(GetFramebufferAttachmentParameteriv
, header
) == 0,
4193 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4195 offsetof(GetFramebufferAttachmentParameteriv
, target
) == 4,
4196 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4198 offsetof(GetFramebufferAttachmentParameteriv
, attachment
) == 8,
4199 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4201 offsetof(GetFramebufferAttachmentParameteriv
, pname
) == 12,
4202 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4204 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_id
) == 16,
4205 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4206 static_assert(offsetof(GetFramebufferAttachmentParameteriv
,
4207 params_shm_offset
) == 20,
4208 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4211 struct GetInteger64v
{
4212 typedef GetInteger64v ValueType
;
4213 static const CommandId kCmdId
= kGetInteger64v
;
4214 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4215 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4217 typedef SizedResult
<GLint64
> Result
;
4219 static uint32_t ComputeSize() {
4220 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4223 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4225 void Init(GLenum _pname
,
4226 uint32_t _params_shm_id
,
4227 uint32_t _params_shm_offset
) {
4230 params_shm_id
= _params_shm_id
;
4231 params_shm_offset
= _params_shm_offset
;
4234 void* Set(void* cmd
,
4236 uint32_t _params_shm_id
,
4237 uint32_t _params_shm_offset
) {
4238 static_cast<ValueType
*>(cmd
)
4239 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4240 return NextCmdAddress
<ValueType
>(cmd
);
4243 gpu::CommandHeader header
;
4245 uint32_t params_shm_id
;
4246 uint32_t params_shm_offset
;
4249 static_assert(sizeof(GetInteger64v
) == 16,
4250 "size of GetInteger64v should be 16");
4251 static_assert(offsetof(GetInteger64v
, header
) == 0,
4252 "offset of GetInteger64v header should be 0");
4253 static_assert(offsetof(GetInteger64v
, pname
) == 4,
4254 "offset of GetInteger64v pname should be 4");
4255 static_assert(offsetof(GetInteger64v
, params_shm_id
) == 8,
4256 "offset of GetInteger64v params_shm_id should be 8");
4257 static_assert(offsetof(GetInteger64v
, params_shm_offset
) == 12,
4258 "offset of GetInteger64v params_shm_offset should be 12");
4260 struct GetIntegeri_v
{
4261 typedef GetIntegeri_v ValueType
;
4262 static const CommandId kCmdId
= kGetIntegeri_v
;
4263 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4264 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4266 typedef SizedResult
<GLint
> Result
;
4268 static uint32_t ComputeSize() {
4269 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4272 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4274 void Init(GLenum _pname
,
4276 uint32_t _data_shm_id
,
4277 uint32_t _data_shm_offset
) {
4281 data_shm_id
= _data_shm_id
;
4282 data_shm_offset
= _data_shm_offset
;
4285 void* Set(void* cmd
,
4288 uint32_t _data_shm_id
,
4289 uint32_t _data_shm_offset
) {
4290 static_cast<ValueType
*>(cmd
)
4291 ->Init(_pname
, _index
, _data_shm_id
, _data_shm_offset
);
4292 return NextCmdAddress
<ValueType
>(cmd
);
4295 gpu::CommandHeader header
;
4298 uint32_t data_shm_id
;
4299 uint32_t data_shm_offset
;
4302 static_assert(sizeof(GetIntegeri_v
) == 20,
4303 "size of GetIntegeri_v should be 20");
4304 static_assert(offsetof(GetIntegeri_v
, header
) == 0,
4305 "offset of GetIntegeri_v header should be 0");
4306 static_assert(offsetof(GetIntegeri_v
, pname
) == 4,
4307 "offset of GetIntegeri_v pname should be 4");
4308 static_assert(offsetof(GetIntegeri_v
, index
) == 8,
4309 "offset of GetIntegeri_v index should be 8");
4310 static_assert(offsetof(GetIntegeri_v
, data_shm_id
) == 12,
4311 "offset of GetIntegeri_v data_shm_id should be 12");
4312 static_assert(offsetof(GetIntegeri_v
, data_shm_offset
) == 16,
4313 "offset of GetIntegeri_v data_shm_offset should be 16");
4315 struct GetInteger64i_v
{
4316 typedef GetInteger64i_v ValueType
;
4317 static const CommandId kCmdId
= kGetInteger64i_v
;
4318 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4319 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4321 typedef SizedResult
<GLint64
> Result
;
4323 static uint32_t ComputeSize() {
4324 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4327 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4329 void Init(GLenum _pname
,
4331 uint32_t _data_shm_id
,
4332 uint32_t _data_shm_offset
) {
4336 data_shm_id
= _data_shm_id
;
4337 data_shm_offset
= _data_shm_offset
;
4340 void* Set(void* cmd
,
4343 uint32_t _data_shm_id
,
4344 uint32_t _data_shm_offset
) {
4345 static_cast<ValueType
*>(cmd
)
4346 ->Init(_pname
, _index
, _data_shm_id
, _data_shm_offset
);
4347 return NextCmdAddress
<ValueType
>(cmd
);
4350 gpu::CommandHeader header
;
4353 uint32_t data_shm_id
;
4354 uint32_t data_shm_offset
;
4357 static_assert(sizeof(GetInteger64i_v
) == 20,
4358 "size of GetInteger64i_v should be 20");
4359 static_assert(offsetof(GetInteger64i_v
, header
) == 0,
4360 "offset of GetInteger64i_v header should be 0");
4361 static_assert(offsetof(GetInteger64i_v
, pname
) == 4,
4362 "offset of GetInteger64i_v pname should be 4");
4363 static_assert(offsetof(GetInteger64i_v
, index
) == 8,
4364 "offset of GetInteger64i_v index should be 8");
4365 static_assert(offsetof(GetInteger64i_v
, data_shm_id
) == 12,
4366 "offset of GetInteger64i_v data_shm_id should be 12");
4367 static_assert(offsetof(GetInteger64i_v
, data_shm_offset
) == 16,
4368 "offset of GetInteger64i_v data_shm_offset should be 16");
4370 struct GetIntegerv
{
4371 typedef GetIntegerv ValueType
;
4372 static const CommandId kCmdId
= kGetIntegerv
;
4373 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4374 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4376 typedef SizedResult
<GLint
> Result
;
4378 static uint32_t ComputeSize() {
4379 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4382 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4384 void Init(GLenum _pname
,
4385 uint32_t _params_shm_id
,
4386 uint32_t _params_shm_offset
) {
4389 params_shm_id
= _params_shm_id
;
4390 params_shm_offset
= _params_shm_offset
;
4393 void* Set(void* cmd
,
4395 uint32_t _params_shm_id
,
4396 uint32_t _params_shm_offset
) {
4397 static_cast<ValueType
*>(cmd
)
4398 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4399 return NextCmdAddress
<ValueType
>(cmd
);
4402 gpu::CommandHeader header
;
4404 uint32_t params_shm_id
;
4405 uint32_t params_shm_offset
;
4408 static_assert(sizeof(GetIntegerv
) == 16, "size of GetIntegerv should be 16");
4409 static_assert(offsetof(GetIntegerv
, header
) == 0,
4410 "offset of GetIntegerv header should be 0");
4411 static_assert(offsetof(GetIntegerv
, pname
) == 4,
4412 "offset of GetIntegerv pname should be 4");
4413 static_assert(offsetof(GetIntegerv
, params_shm_id
) == 8,
4414 "offset of GetIntegerv params_shm_id should be 8");
4415 static_assert(offsetof(GetIntegerv
, params_shm_offset
) == 12,
4416 "offset of GetIntegerv params_shm_offset should be 12");
4418 struct GetInternalformativ
{
4419 typedef GetInternalformativ ValueType
;
4420 static const CommandId kCmdId
= kGetInternalformativ
;
4421 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4422 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4424 typedef SizedResult
<GLint
> Result
;
4426 static uint32_t ComputeSize() {
4427 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4430 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4432 void Init(GLenum _target
,
4436 uint32_t _params_shm_id
,
4437 uint32_t _params_shm_offset
) {
4443 params_shm_id
= _params_shm_id
;
4444 params_shm_offset
= _params_shm_offset
;
4447 void* Set(void* cmd
,
4452 uint32_t _params_shm_id
,
4453 uint32_t _params_shm_offset
) {
4454 static_cast<ValueType
*>(cmd
)->Init(_target
, _format
, _pname
, _bufSize
,
4455 _params_shm_id
, _params_shm_offset
);
4456 return NextCmdAddress
<ValueType
>(cmd
);
4459 gpu::CommandHeader header
;
4464 uint32_t params_shm_id
;
4465 uint32_t params_shm_offset
;
4468 static_assert(sizeof(GetInternalformativ
) == 28,
4469 "size of GetInternalformativ should be 28");
4470 static_assert(offsetof(GetInternalformativ
, header
) == 0,
4471 "offset of GetInternalformativ header should be 0");
4472 static_assert(offsetof(GetInternalformativ
, target
) == 4,
4473 "offset of GetInternalformativ target should be 4");
4474 static_assert(offsetof(GetInternalformativ
, format
) == 8,
4475 "offset of GetInternalformativ format should be 8");
4476 static_assert(offsetof(GetInternalformativ
, pname
) == 12,
4477 "offset of GetInternalformativ pname should be 12");
4478 static_assert(offsetof(GetInternalformativ
, bufSize
) == 16,
4479 "offset of GetInternalformativ bufSize should be 16");
4480 static_assert(offsetof(GetInternalformativ
, params_shm_id
) == 20,
4481 "offset of GetInternalformativ params_shm_id should be 20");
4482 static_assert(offsetof(GetInternalformativ
, params_shm_offset
) == 24,
4483 "offset of GetInternalformativ params_shm_offset should be 24");
4485 struct GetProgramiv
{
4486 typedef GetProgramiv ValueType
;
4487 static const CommandId kCmdId
= kGetProgramiv
;
4488 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4489 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4491 typedef SizedResult
<GLint
> Result
;
4493 static uint32_t ComputeSize() {
4494 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4497 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4499 void Init(GLuint _program
,
4501 uint32_t _params_shm_id
,
4502 uint32_t _params_shm_offset
) {
4506 params_shm_id
= _params_shm_id
;
4507 params_shm_offset
= _params_shm_offset
;
4510 void* Set(void* cmd
,
4513 uint32_t _params_shm_id
,
4514 uint32_t _params_shm_offset
) {
4515 static_cast<ValueType
*>(cmd
)
4516 ->Init(_program
, _pname
, _params_shm_id
, _params_shm_offset
);
4517 return NextCmdAddress
<ValueType
>(cmd
);
4520 gpu::CommandHeader header
;
4523 uint32_t params_shm_id
;
4524 uint32_t params_shm_offset
;
4527 static_assert(sizeof(GetProgramiv
) == 20, "size of GetProgramiv should be 20");
4528 static_assert(offsetof(GetProgramiv
, header
) == 0,
4529 "offset of GetProgramiv header should be 0");
4530 static_assert(offsetof(GetProgramiv
, program
) == 4,
4531 "offset of GetProgramiv program should be 4");
4532 static_assert(offsetof(GetProgramiv
, pname
) == 8,
4533 "offset of GetProgramiv pname should be 8");
4534 static_assert(offsetof(GetProgramiv
, params_shm_id
) == 12,
4535 "offset of GetProgramiv params_shm_id should be 12");
4536 static_assert(offsetof(GetProgramiv
, params_shm_offset
) == 16,
4537 "offset of GetProgramiv params_shm_offset should be 16");
4539 struct GetProgramInfoLog
{
4540 typedef GetProgramInfoLog ValueType
;
4541 static const CommandId kCmdId
= kGetProgramInfoLog
;
4542 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4543 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4545 static uint32_t ComputeSize() {
4546 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4549 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4551 void Init(GLuint _program
, uint32_t _bucket_id
) {
4554 bucket_id
= _bucket_id
;
4557 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
4558 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
4559 return NextCmdAddress
<ValueType
>(cmd
);
4562 gpu::CommandHeader header
;
4567 static_assert(sizeof(GetProgramInfoLog
) == 12,
4568 "size of GetProgramInfoLog should be 12");
4569 static_assert(offsetof(GetProgramInfoLog
, header
) == 0,
4570 "offset of GetProgramInfoLog header should be 0");
4571 static_assert(offsetof(GetProgramInfoLog
, program
) == 4,
4572 "offset of GetProgramInfoLog program should be 4");
4573 static_assert(offsetof(GetProgramInfoLog
, bucket_id
) == 8,
4574 "offset of GetProgramInfoLog bucket_id should be 8");
4576 struct GetRenderbufferParameteriv
{
4577 typedef GetRenderbufferParameteriv ValueType
;
4578 static const CommandId kCmdId
= kGetRenderbufferParameteriv
;
4579 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4580 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4582 typedef SizedResult
<GLint
> Result
;
4584 static uint32_t ComputeSize() {
4585 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4588 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4590 void Init(GLenum _target
,
4592 uint32_t _params_shm_id
,
4593 uint32_t _params_shm_offset
) {
4597 params_shm_id
= _params_shm_id
;
4598 params_shm_offset
= _params_shm_offset
;
4601 void* Set(void* cmd
,
4604 uint32_t _params_shm_id
,
4605 uint32_t _params_shm_offset
) {
4606 static_cast<ValueType
*>(cmd
)
4607 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4608 return NextCmdAddress
<ValueType
>(cmd
);
4611 gpu::CommandHeader header
;
4614 uint32_t params_shm_id
;
4615 uint32_t params_shm_offset
;
4618 static_assert(sizeof(GetRenderbufferParameteriv
) == 20,
4619 "size of GetRenderbufferParameteriv should be 20");
4620 static_assert(offsetof(GetRenderbufferParameteriv
, header
) == 0,
4621 "offset of GetRenderbufferParameteriv header should be 0");
4622 static_assert(offsetof(GetRenderbufferParameteriv
, target
) == 4,
4623 "offset of GetRenderbufferParameteriv target should be 4");
4624 static_assert(offsetof(GetRenderbufferParameteriv
, pname
) == 8,
4625 "offset of GetRenderbufferParameteriv pname should be 8");
4627 offsetof(GetRenderbufferParameteriv
, params_shm_id
) == 12,
4628 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4630 offsetof(GetRenderbufferParameteriv
, params_shm_offset
) == 16,
4631 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4633 struct GetSamplerParameterfv
{
4634 typedef GetSamplerParameterfv ValueType
;
4635 static const CommandId kCmdId
= kGetSamplerParameterfv
;
4636 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4637 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4639 typedef SizedResult
<GLfloat
> Result
;
4641 static uint32_t ComputeSize() {
4642 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4645 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4647 void Init(GLuint _sampler
,
4649 uint32_t _params_shm_id
,
4650 uint32_t _params_shm_offset
) {
4654 params_shm_id
= _params_shm_id
;
4655 params_shm_offset
= _params_shm_offset
;
4658 void* Set(void* cmd
,
4661 uint32_t _params_shm_id
,
4662 uint32_t _params_shm_offset
) {
4663 static_cast<ValueType
*>(cmd
)
4664 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4665 return NextCmdAddress
<ValueType
>(cmd
);
4668 gpu::CommandHeader header
;
4671 uint32_t params_shm_id
;
4672 uint32_t params_shm_offset
;
4675 static_assert(sizeof(GetSamplerParameterfv
) == 20,
4676 "size of GetSamplerParameterfv should be 20");
4677 static_assert(offsetof(GetSamplerParameterfv
, header
) == 0,
4678 "offset of GetSamplerParameterfv header should be 0");
4679 static_assert(offsetof(GetSamplerParameterfv
, sampler
) == 4,
4680 "offset of GetSamplerParameterfv sampler should be 4");
4681 static_assert(offsetof(GetSamplerParameterfv
, pname
) == 8,
4682 "offset of GetSamplerParameterfv pname should be 8");
4683 static_assert(offsetof(GetSamplerParameterfv
, params_shm_id
) == 12,
4684 "offset of GetSamplerParameterfv params_shm_id should be 12");
4685 static_assert(offsetof(GetSamplerParameterfv
, params_shm_offset
) == 16,
4686 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4688 struct GetSamplerParameteriv
{
4689 typedef GetSamplerParameteriv ValueType
;
4690 static const CommandId kCmdId
= kGetSamplerParameteriv
;
4691 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4692 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4694 typedef SizedResult
<GLint
> Result
;
4696 static uint32_t ComputeSize() {
4697 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4700 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4702 void Init(GLuint _sampler
,
4704 uint32_t _params_shm_id
,
4705 uint32_t _params_shm_offset
) {
4709 params_shm_id
= _params_shm_id
;
4710 params_shm_offset
= _params_shm_offset
;
4713 void* Set(void* cmd
,
4716 uint32_t _params_shm_id
,
4717 uint32_t _params_shm_offset
) {
4718 static_cast<ValueType
*>(cmd
)
4719 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4720 return NextCmdAddress
<ValueType
>(cmd
);
4723 gpu::CommandHeader header
;
4726 uint32_t params_shm_id
;
4727 uint32_t params_shm_offset
;
4730 static_assert(sizeof(GetSamplerParameteriv
) == 20,
4731 "size of GetSamplerParameteriv should be 20");
4732 static_assert(offsetof(GetSamplerParameteriv
, header
) == 0,
4733 "offset of GetSamplerParameteriv header should be 0");
4734 static_assert(offsetof(GetSamplerParameteriv
, sampler
) == 4,
4735 "offset of GetSamplerParameteriv sampler should be 4");
4736 static_assert(offsetof(GetSamplerParameteriv
, pname
) == 8,
4737 "offset of GetSamplerParameteriv pname should be 8");
4738 static_assert(offsetof(GetSamplerParameteriv
, params_shm_id
) == 12,
4739 "offset of GetSamplerParameteriv params_shm_id should be 12");
4740 static_assert(offsetof(GetSamplerParameteriv
, params_shm_offset
) == 16,
4741 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4743 struct GetShaderiv
{
4744 typedef GetShaderiv ValueType
;
4745 static const CommandId kCmdId
= kGetShaderiv
;
4746 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4747 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4749 typedef SizedResult
<GLint
> Result
;
4751 static uint32_t ComputeSize() {
4752 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4755 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4757 void Init(GLuint _shader
,
4759 uint32_t _params_shm_id
,
4760 uint32_t _params_shm_offset
) {
4764 params_shm_id
= _params_shm_id
;
4765 params_shm_offset
= _params_shm_offset
;
4768 void* Set(void* cmd
,
4771 uint32_t _params_shm_id
,
4772 uint32_t _params_shm_offset
) {
4773 static_cast<ValueType
*>(cmd
)
4774 ->Init(_shader
, _pname
, _params_shm_id
, _params_shm_offset
);
4775 return NextCmdAddress
<ValueType
>(cmd
);
4778 gpu::CommandHeader header
;
4781 uint32_t params_shm_id
;
4782 uint32_t params_shm_offset
;
4785 static_assert(sizeof(GetShaderiv
) == 20, "size of GetShaderiv should be 20");
4786 static_assert(offsetof(GetShaderiv
, header
) == 0,
4787 "offset of GetShaderiv header should be 0");
4788 static_assert(offsetof(GetShaderiv
, shader
) == 4,
4789 "offset of GetShaderiv shader should be 4");
4790 static_assert(offsetof(GetShaderiv
, pname
) == 8,
4791 "offset of GetShaderiv pname should be 8");
4792 static_assert(offsetof(GetShaderiv
, params_shm_id
) == 12,
4793 "offset of GetShaderiv params_shm_id should be 12");
4794 static_assert(offsetof(GetShaderiv
, params_shm_offset
) == 16,
4795 "offset of GetShaderiv params_shm_offset should be 16");
4797 struct GetShaderInfoLog
{
4798 typedef GetShaderInfoLog ValueType
;
4799 static const CommandId kCmdId
= kGetShaderInfoLog
;
4800 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4801 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4803 static uint32_t ComputeSize() {
4804 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4807 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4809 void Init(GLuint _shader
, uint32_t _bucket_id
) {
4812 bucket_id
= _bucket_id
;
4815 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
4816 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
4817 return NextCmdAddress
<ValueType
>(cmd
);
4820 gpu::CommandHeader header
;
4825 static_assert(sizeof(GetShaderInfoLog
) == 12,
4826 "size of GetShaderInfoLog should be 12");
4827 static_assert(offsetof(GetShaderInfoLog
, header
) == 0,
4828 "offset of GetShaderInfoLog header should be 0");
4829 static_assert(offsetof(GetShaderInfoLog
, shader
) == 4,
4830 "offset of GetShaderInfoLog shader should be 4");
4831 static_assert(offsetof(GetShaderInfoLog
, bucket_id
) == 8,
4832 "offset of GetShaderInfoLog bucket_id should be 8");
4834 struct GetShaderPrecisionFormat
{
4835 typedef GetShaderPrecisionFormat ValueType
;
4836 static const CommandId kCmdId
= kGetShaderPrecisionFormat
;
4837 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4838 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4847 static uint32_t ComputeSize() {
4848 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4851 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4853 void Init(GLenum _shadertype
,
4854 GLenum _precisiontype
,
4855 uint32_t _result_shm_id
,
4856 uint32_t _result_shm_offset
) {
4858 shadertype
= _shadertype
;
4859 precisiontype
= _precisiontype
;
4860 result_shm_id
= _result_shm_id
;
4861 result_shm_offset
= _result_shm_offset
;
4864 void* Set(void* cmd
,
4866 GLenum _precisiontype
,
4867 uint32_t _result_shm_id
,
4868 uint32_t _result_shm_offset
) {
4869 static_cast<ValueType
*>(cmd
)
4870 ->Init(_shadertype
, _precisiontype
, _result_shm_id
, _result_shm_offset
);
4871 return NextCmdAddress
<ValueType
>(cmd
);
4874 gpu::CommandHeader header
;
4875 uint32_t shadertype
;
4876 uint32_t precisiontype
;
4877 uint32_t result_shm_id
;
4878 uint32_t result_shm_offset
;
4881 static_assert(sizeof(GetShaderPrecisionFormat
) == 20,
4882 "size of GetShaderPrecisionFormat should be 20");
4883 static_assert(offsetof(GetShaderPrecisionFormat
, header
) == 0,
4884 "offset of GetShaderPrecisionFormat header should be 0");
4885 static_assert(offsetof(GetShaderPrecisionFormat
, shadertype
) == 4,
4886 "offset of GetShaderPrecisionFormat shadertype should be 4");
4887 static_assert(offsetof(GetShaderPrecisionFormat
, precisiontype
) == 8,
4888 "offset of GetShaderPrecisionFormat precisiontype should be 8");
4889 static_assert(offsetof(GetShaderPrecisionFormat
, result_shm_id
) == 12,
4890 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
4892 offsetof(GetShaderPrecisionFormat
, result_shm_offset
) == 16,
4893 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
4894 static_assert(offsetof(GetShaderPrecisionFormat::Result
, success
) == 0,
4895 "offset of GetShaderPrecisionFormat Result success should be "
4897 static_assert(offsetof(GetShaderPrecisionFormat::Result
, min_range
) == 4,
4898 "offset of GetShaderPrecisionFormat Result min_range should be "
4900 static_assert(offsetof(GetShaderPrecisionFormat::Result
, max_range
) == 8,
4901 "offset of GetShaderPrecisionFormat Result max_range should be "
4903 static_assert(offsetof(GetShaderPrecisionFormat::Result
, precision
) == 12,
4904 "offset of GetShaderPrecisionFormat Result precision should be "
4907 struct GetShaderSource
{
4908 typedef GetShaderSource ValueType
;
4909 static const CommandId kCmdId
= kGetShaderSource
;
4910 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4911 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4913 static uint32_t ComputeSize() {
4914 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4917 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4919 void Init(GLuint _shader
, uint32_t _bucket_id
) {
4922 bucket_id
= _bucket_id
;
4925 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
4926 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
4927 return NextCmdAddress
<ValueType
>(cmd
);
4930 gpu::CommandHeader header
;
4935 static_assert(sizeof(GetShaderSource
) == 12,
4936 "size of GetShaderSource should be 12");
4937 static_assert(offsetof(GetShaderSource
, header
) == 0,
4938 "offset of GetShaderSource header should be 0");
4939 static_assert(offsetof(GetShaderSource
, shader
) == 4,
4940 "offset of GetShaderSource shader should be 4");
4941 static_assert(offsetof(GetShaderSource
, bucket_id
) == 8,
4942 "offset of GetShaderSource bucket_id should be 8");
4945 typedef GetString ValueType
;
4946 static const CommandId kCmdId
= kGetString
;
4947 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4948 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4950 static uint32_t ComputeSize() {
4951 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4954 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4956 void Init(GLenum _name
, uint32_t _bucket_id
) {
4959 bucket_id
= _bucket_id
;
4962 void* Set(void* cmd
, GLenum _name
, uint32_t _bucket_id
) {
4963 static_cast<ValueType
*>(cmd
)->Init(_name
, _bucket_id
);
4964 return NextCmdAddress
<ValueType
>(cmd
);
4967 gpu::CommandHeader header
;
4972 static_assert(sizeof(GetString
) == 12, "size of GetString should be 12");
4973 static_assert(offsetof(GetString
, header
) == 0,
4974 "offset of GetString header should be 0");
4975 static_assert(offsetof(GetString
, name
) == 4,
4976 "offset of GetString name should be 4");
4977 static_assert(offsetof(GetString
, bucket_id
) == 8,
4978 "offset of GetString bucket_id should be 8");
4981 typedef GetSynciv ValueType
;
4982 static const CommandId kCmdId
= kGetSynciv
;
4983 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4984 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4986 typedef SizedResult
<GLint
> Result
;
4988 static uint32_t ComputeSize() {
4989 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4992 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4994 void Init(GLuint _sync
,
4996 uint32_t _values_shm_id
,
4997 uint32_t _values_shm_offset
) {
5001 values_shm_id
= _values_shm_id
;
5002 values_shm_offset
= _values_shm_offset
;
5005 void* Set(void* cmd
,
5008 uint32_t _values_shm_id
,
5009 uint32_t _values_shm_offset
) {
5010 static_cast<ValueType
*>(cmd
)
5011 ->Init(_sync
, _pname
, _values_shm_id
, _values_shm_offset
);
5012 return NextCmdAddress
<ValueType
>(cmd
);
5015 gpu::CommandHeader header
;
5018 uint32_t values_shm_id
;
5019 uint32_t values_shm_offset
;
5022 static_assert(sizeof(GetSynciv
) == 20, "size of GetSynciv should be 20");
5023 static_assert(offsetof(GetSynciv
, header
) == 0,
5024 "offset of GetSynciv header should be 0");
5025 static_assert(offsetof(GetSynciv
, sync
) == 4,
5026 "offset of GetSynciv sync should be 4");
5027 static_assert(offsetof(GetSynciv
, pname
) == 8,
5028 "offset of GetSynciv pname should be 8");
5029 static_assert(offsetof(GetSynciv
, values_shm_id
) == 12,
5030 "offset of GetSynciv values_shm_id should be 12");
5031 static_assert(offsetof(GetSynciv
, values_shm_offset
) == 16,
5032 "offset of GetSynciv values_shm_offset should be 16");
5034 struct GetTexParameterfv
{
5035 typedef GetTexParameterfv ValueType
;
5036 static const CommandId kCmdId
= kGetTexParameterfv
;
5037 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5038 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5040 typedef SizedResult
<GLfloat
> Result
;
5042 static uint32_t ComputeSize() {
5043 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5046 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5048 void Init(GLenum _target
,
5050 uint32_t _params_shm_id
,
5051 uint32_t _params_shm_offset
) {
5055 params_shm_id
= _params_shm_id
;
5056 params_shm_offset
= _params_shm_offset
;
5059 void* Set(void* cmd
,
5062 uint32_t _params_shm_id
,
5063 uint32_t _params_shm_offset
) {
5064 static_cast<ValueType
*>(cmd
)
5065 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
5066 return NextCmdAddress
<ValueType
>(cmd
);
5069 gpu::CommandHeader header
;
5072 uint32_t params_shm_id
;
5073 uint32_t params_shm_offset
;
5076 static_assert(sizeof(GetTexParameterfv
) == 20,
5077 "size of GetTexParameterfv should be 20");
5078 static_assert(offsetof(GetTexParameterfv
, header
) == 0,
5079 "offset of GetTexParameterfv header should be 0");
5080 static_assert(offsetof(GetTexParameterfv
, target
) == 4,
5081 "offset of GetTexParameterfv target should be 4");
5082 static_assert(offsetof(GetTexParameterfv
, pname
) == 8,
5083 "offset of GetTexParameterfv pname should be 8");
5084 static_assert(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
5085 "offset of GetTexParameterfv params_shm_id should be 12");
5086 static_assert(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
5087 "offset of GetTexParameterfv params_shm_offset should be 16");
5089 struct GetTexParameteriv
{
5090 typedef GetTexParameteriv ValueType
;
5091 static const CommandId kCmdId
= kGetTexParameteriv
;
5092 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5093 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5095 typedef SizedResult
<GLint
> Result
;
5097 static uint32_t ComputeSize() {
5098 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5101 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5103 void Init(GLenum _target
,
5105 uint32_t _params_shm_id
,
5106 uint32_t _params_shm_offset
) {
5110 params_shm_id
= _params_shm_id
;
5111 params_shm_offset
= _params_shm_offset
;
5114 void* Set(void* cmd
,
5117 uint32_t _params_shm_id
,
5118 uint32_t _params_shm_offset
) {
5119 static_cast<ValueType
*>(cmd
)
5120 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
5121 return NextCmdAddress
<ValueType
>(cmd
);
5124 gpu::CommandHeader header
;
5127 uint32_t params_shm_id
;
5128 uint32_t params_shm_offset
;
5131 static_assert(sizeof(GetTexParameteriv
) == 20,
5132 "size of GetTexParameteriv should be 20");
5133 static_assert(offsetof(GetTexParameteriv
, header
) == 0,
5134 "offset of GetTexParameteriv header should be 0");
5135 static_assert(offsetof(GetTexParameteriv
, target
) == 4,
5136 "offset of GetTexParameteriv target should be 4");
5137 static_assert(offsetof(GetTexParameteriv
, pname
) == 8,
5138 "offset of GetTexParameteriv pname should be 8");
5139 static_assert(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
5140 "offset of GetTexParameteriv params_shm_id should be 12");
5141 static_assert(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
5142 "offset of GetTexParameteriv params_shm_offset should be 16");
5144 struct GetTransformFeedbackVarying
{
5145 typedef GetTransformFeedbackVarying ValueType
;
5146 static const CommandId kCmdId
= kGetTransformFeedbackVarying
;
5147 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5148 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5156 static uint32_t ComputeSize() {
5157 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5160 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5162 void Init(GLuint _program
,
5164 uint32_t _name_bucket_id
,
5165 uint32_t _result_shm_id
,
5166 uint32_t _result_shm_offset
) {
5170 name_bucket_id
= _name_bucket_id
;
5171 result_shm_id
= _result_shm_id
;
5172 result_shm_offset
= _result_shm_offset
;
5175 void* Set(void* cmd
,
5178 uint32_t _name_bucket_id
,
5179 uint32_t _result_shm_id
,
5180 uint32_t _result_shm_offset
) {
5181 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
5182 _result_shm_id
, _result_shm_offset
);
5183 return NextCmdAddress
<ValueType
>(cmd
);
5186 gpu::CommandHeader header
;
5189 uint32_t name_bucket_id
;
5190 uint32_t result_shm_id
;
5191 uint32_t result_shm_offset
;
5194 static_assert(sizeof(GetTransformFeedbackVarying
) == 24,
5195 "size of GetTransformFeedbackVarying should be 24");
5196 static_assert(offsetof(GetTransformFeedbackVarying
, header
) == 0,
5197 "offset of GetTransformFeedbackVarying header should be 0");
5198 static_assert(offsetof(GetTransformFeedbackVarying
, program
) == 4,
5199 "offset of GetTransformFeedbackVarying program should be 4");
5200 static_assert(offsetof(GetTransformFeedbackVarying
, index
) == 8,
5201 "offset of GetTransformFeedbackVarying index should be 8");
5203 offsetof(GetTransformFeedbackVarying
, name_bucket_id
) == 12,
5204 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
5206 offsetof(GetTransformFeedbackVarying
, result_shm_id
) == 16,
5207 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
5209 offsetof(GetTransformFeedbackVarying
, result_shm_offset
) == 20,
5210 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
5211 static_assert(offsetof(GetTransformFeedbackVarying::Result
, success
) == 0,
5212 "offset of GetTransformFeedbackVarying Result success should be "
5214 static_assert(offsetof(GetTransformFeedbackVarying::Result
, size
) == 4,
5215 "offset of GetTransformFeedbackVarying Result size should be "
5217 static_assert(offsetof(GetTransformFeedbackVarying::Result
, type
) == 8,
5218 "offset of GetTransformFeedbackVarying Result type should be "
5221 struct GetUniformBlockIndex
{
5222 typedef GetUniformBlockIndex ValueType
;
5223 static const CommandId kCmdId
= kGetUniformBlockIndex
;
5224 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5225 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5227 typedef GLuint Result
;
5229 static uint32_t ComputeSize() {
5230 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5233 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5235 void Init(GLuint _program
,
5236 uint32_t _name_bucket_id
,
5237 uint32_t _index_shm_id
,
5238 uint32_t _index_shm_offset
) {
5241 name_bucket_id
= _name_bucket_id
;
5242 index_shm_id
= _index_shm_id
;
5243 index_shm_offset
= _index_shm_offset
;
5246 void* Set(void* cmd
,
5248 uint32_t _name_bucket_id
,
5249 uint32_t _index_shm_id
,
5250 uint32_t _index_shm_offset
) {
5251 static_cast<ValueType
*>(cmd
)
5252 ->Init(_program
, _name_bucket_id
, _index_shm_id
, _index_shm_offset
);
5253 return NextCmdAddress
<ValueType
>(cmd
);
5256 gpu::CommandHeader header
;
5258 uint32_t name_bucket_id
;
5259 uint32_t index_shm_id
;
5260 uint32_t index_shm_offset
;
5263 static_assert(sizeof(GetUniformBlockIndex
) == 20,
5264 "size of GetUniformBlockIndex should be 20");
5265 static_assert(offsetof(GetUniformBlockIndex
, header
) == 0,
5266 "offset of GetUniformBlockIndex header should be 0");
5267 static_assert(offsetof(GetUniformBlockIndex
, program
) == 4,
5268 "offset of GetUniformBlockIndex program should be 4");
5269 static_assert(offsetof(GetUniformBlockIndex
, name_bucket_id
) == 8,
5270 "offset of GetUniformBlockIndex name_bucket_id should be 8");
5271 static_assert(offsetof(GetUniformBlockIndex
, index_shm_id
) == 12,
5272 "offset of GetUniformBlockIndex index_shm_id should be 12");
5273 static_assert(offsetof(GetUniformBlockIndex
, index_shm_offset
) == 16,
5274 "offset of GetUniformBlockIndex index_shm_offset should be 16");
5276 struct GetUniformfv
{
5277 typedef GetUniformfv ValueType
;
5278 static const CommandId kCmdId
= kGetUniformfv
;
5279 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5280 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5282 typedef SizedResult
<GLfloat
> Result
;
5284 static uint32_t ComputeSize() {
5285 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5288 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5290 void Init(GLuint _program
,
5292 uint32_t _params_shm_id
,
5293 uint32_t _params_shm_offset
) {
5296 location
= _location
;
5297 params_shm_id
= _params_shm_id
;
5298 params_shm_offset
= _params_shm_offset
;
5301 void* Set(void* cmd
,
5304 uint32_t _params_shm_id
,
5305 uint32_t _params_shm_offset
) {
5306 static_cast<ValueType
*>(cmd
)
5307 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5308 return NextCmdAddress
<ValueType
>(cmd
);
5311 gpu::CommandHeader header
;
5314 uint32_t params_shm_id
;
5315 uint32_t params_shm_offset
;
5318 static_assert(sizeof(GetUniformfv
) == 20, "size of GetUniformfv should be 20");
5319 static_assert(offsetof(GetUniformfv
, header
) == 0,
5320 "offset of GetUniformfv header should be 0");
5321 static_assert(offsetof(GetUniformfv
, program
) == 4,
5322 "offset of GetUniformfv program should be 4");
5323 static_assert(offsetof(GetUniformfv
, location
) == 8,
5324 "offset of GetUniformfv location should be 8");
5325 static_assert(offsetof(GetUniformfv
, params_shm_id
) == 12,
5326 "offset of GetUniformfv params_shm_id should be 12");
5327 static_assert(offsetof(GetUniformfv
, params_shm_offset
) == 16,
5328 "offset of GetUniformfv params_shm_offset should be 16");
5330 struct GetUniformiv
{
5331 typedef GetUniformiv ValueType
;
5332 static const CommandId kCmdId
= kGetUniformiv
;
5333 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5334 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5336 typedef SizedResult
<GLint
> Result
;
5338 static uint32_t ComputeSize() {
5339 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5342 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5344 void Init(GLuint _program
,
5346 uint32_t _params_shm_id
,
5347 uint32_t _params_shm_offset
) {
5350 location
= _location
;
5351 params_shm_id
= _params_shm_id
;
5352 params_shm_offset
= _params_shm_offset
;
5355 void* Set(void* cmd
,
5358 uint32_t _params_shm_id
,
5359 uint32_t _params_shm_offset
) {
5360 static_cast<ValueType
*>(cmd
)
5361 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5362 return NextCmdAddress
<ValueType
>(cmd
);
5365 gpu::CommandHeader header
;
5368 uint32_t params_shm_id
;
5369 uint32_t params_shm_offset
;
5372 static_assert(sizeof(GetUniformiv
) == 20, "size of GetUniformiv should be 20");
5373 static_assert(offsetof(GetUniformiv
, header
) == 0,
5374 "offset of GetUniformiv header should be 0");
5375 static_assert(offsetof(GetUniformiv
, program
) == 4,
5376 "offset of GetUniformiv program should be 4");
5377 static_assert(offsetof(GetUniformiv
, location
) == 8,
5378 "offset of GetUniformiv location should be 8");
5379 static_assert(offsetof(GetUniformiv
, params_shm_id
) == 12,
5380 "offset of GetUniformiv params_shm_id should be 12");
5381 static_assert(offsetof(GetUniformiv
, params_shm_offset
) == 16,
5382 "offset of GetUniformiv params_shm_offset should be 16");
5384 struct GetUniformIndices
{
5385 typedef GetUniformIndices ValueType
;
5386 static const CommandId kCmdId
= kGetUniformIndices
;
5387 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5388 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5390 typedef SizedResult
<GLuint
> Result
;
5392 static uint32_t ComputeSize() {
5393 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5396 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5398 void Init(GLuint _program
,
5399 uint32_t _names_bucket_id
,
5400 uint32_t _indices_shm_id
,
5401 uint32_t _indices_shm_offset
) {
5404 names_bucket_id
= _names_bucket_id
;
5405 indices_shm_id
= _indices_shm_id
;
5406 indices_shm_offset
= _indices_shm_offset
;
5409 void* Set(void* cmd
,
5411 uint32_t _names_bucket_id
,
5412 uint32_t _indices_shm_id
,
5413 uint32_t _indices_shm_offset
) {
5414 static_cast<ValueType
*>(cmd
)->Init(_program
, _names_bucket_id
,
5415 _indices_shm_id
, _indices_shm_offset
);
5416 return NextCmdAddress
<ValueType
>(cmd
);
5419 gpu::CommandHeader header
;
5421 uint32_t names_bucket_id
;
5422 uint32_t indices_shm_id
;
5423 uint32_t indices_shm_offset
;
5426 static_assert(sizeof(GetUniformIndices
) == 20,
5427 "size of GetUniformIndices should be 20");
5428 static_assert(offsetof(GetUniformIndices
, header
) == 0,
5429 "offset of GetUniformIndices header should be 0");
5430 static_assert(offsetof(GetUniformIndices
, program
) == 4,
5431 "offset of GetUniformIndices program should be 4");
5432 static_assert(offsetof(GetUniformIndices
, names_bucket_id
) == 8,
5433 "offset of GetUniformIndices names_bucket_id should be 8");
5434 static_assert(offsetof(GetUniformIndices
, indices_shm_id
) == 12,
5435 "offset of GetUniformIndices indices_shm_id should be 12");
5436 static_assert(offsetof(GetUniformIndices
, indices_shm_offset
) == 16,
5437 "offset of GetUniformIndices indices_shm_offset should be 16");
5439 struct GetUniformLocation
{
5440 typedef GetUniformLocation ValueType
;
5441 static const CommandId kCmdId
= kGetUniformLocation
;
5442 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5443 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5445 typedef GLint Result
;
5447 static uint32_t ComputeSize() {
5448 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5451 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5453 void Init(GLuint _program
,
5454 uint32_t _name_bucket_id
,
5455 uint32_t _location_shm_id
,
5456 uint32_t _location_shm_offset
) {
5459 name_bucket_id
= _name_bucket_id
;
5460 location_shm_id
= _location_shm_id
;
5461 location_shm_offset
= _location_shm_offset
;
5464 void* Set(void* cmd
,
5466 uint32_t _name_bucket_id
,
5467 uint32_t _location_shm_id
,
5468 uint32_t _location_shm_offset
) {
5469 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
5470 _location_shm_id
, _location_shm_offset
);
5471 return NextCmdAddress
<ValueType
>(cmd
);
5474 gpu::CommandHeader header
;
5476 uint32_t name_bucket_id
;
5477 uint32_t location_shm_id
;
5478 uint32_t location_shm_offset
;
5481 static_assert(sizeof(GetUniformLocation
) == 20,
5482 "size of GetUniformLocation should be 20");
5483 static_assert(offsetof(GetUniformLocation
, header
) == 0,
5484 "offset of GetUniformLocation header should be 0");
5485 static_assert(offsetof(GetUniformLocation
, program
) == 4,
5486 "offset of GetUniformLocation program should be 4");
5487 static_assert(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
5488 "offset of GetUniformLocation name_bucket_id should be 8");
5489 static_assert(offsetof(GetUniformLocation
, location_shm_id
) == 12,
5490 "offset of GetUniformLocation location_shm_id should be 12");
5491 static_assert(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
5492 "offset of GetUniformLocation location_shm_offset should be 16");
5494 struct GetVertexAttribfv
{
5495 typedef GetVertexAttribfv ValueType
;
5496 static const CommandId kCmdId
= kGetVertexAttribfv
;
5497 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5498 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5500 typedef SizedResult
<GLfloat
> Result
;
5502 static uint32_t ComputeSize() {
5503 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5506 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5508 void Init(GLuint _index
,
5510 uint32_t _params_shm_id
,
5511 uint32_t _params_shm_offset
) {
5515 params_shm_id
= _params_shm_id
;
5516 params_shm_offset
= _params_shm_offset
;
5519 void* Set(void* cmd
,
5522 uint32_t _params_shm_id
,
5523 uint32_t _params_shm_offset
) {
5524 static_cast<ValueType
*>(cmd
)
5525 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5526 return NextCmdAddress
<ValueType
>(cmd
);
5529 gpu::CommandHeader header
;
5532 uint32_t params_shm_id
;
5533 uint32_t params_shm_offset
;
5536 static_assert(sizeof(GetVertexAttribfv
) == 20,
5537 "size of GetVertexAttribfv should be 20");
5538 static_assert(offsetof(GetVertexAttribfv
, header
) == 0,
5539 "offset of GetVertexAttribfv header should be 0");
5540 static_assert(offsetof(GetVertexAttribfv
, index
) == 4,
5541 "offset of GetVertexAttribfv index should be 4");
5542 static_assert(offsetof(GetVertexAttribfv
, pname
) == 8,
5543 "offset of GetVertexAttribfv pname should be 8");
5544 static_assert(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
5545 "offset of GetVertexAttribfv params_shm_id should be 12");
5546 static_assert(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
5547 "offset of GetVertexAttribfv params_shm_offset should be 16");
5549 struct GetVertexAttribiv
{
5550 typedef GetVertexAttribiv ValueType
;
5551 static const CommandId kCmdId
= kGetVertexAttribiv
;
5552 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5553 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5555 typedef SizedResult
<GLint
> Result
;
5557 static uint32_t ComputeSize() {
5558 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5561 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5563 void Init(GLuint _index
,
5565 uint32_t _params_shm_id
,
5566 uint32_t _params_shm_offset
) {
5570 params_shm_id
= _params_shm_id
;
5571 params_shm_offset
= _params_shm_offset
;
5574 void* Set(void* cmd
,
5577 uint32_t _params_shm_id
,
5578 uint32_t _params_shm_offset
) {
5579 static_cast<ValueType
*>(cmd
)
5580 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5581 return NextCmdAddress
<ValueType
>(cmd
);
5584 gpu::CommandHeader header
;
5587 uint32_t params_shm_id
;
5588 uint32_t params_shm_offset
;
5591 static_assert(sizeof(GetVertexAttribiv
) == 20,
5592 "size of GetVertexAttribiv should be 20");
5593 static_assert(offsetof(GetVertexAttribiv
, header
) == 0,
5594 "offset of GetVertexAttribiv header should be 0");
5595 static_assert(offsetof(GetVertexAttribiv
, index
) == 4,
5596 "offset of GetVertexAttribiv index should be 4");
5597 static_assert(offsetof(GetVertexAttribiv
, pname
) == 8,
5598 "offset of GetVertexAttribiv pname should be 8");
5599 static_assert(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
5600 "offset of GetVertexAttribiv params_shm_id should be 12");
5601 static_assert(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
5602 "offset of GetVertexAttribiv params_shm_offset should be 16");
5604 struct GetVertexAttribPointerv
{
5605 typedef GetVertexAttribPointerv ValueType
;
5606 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
5607 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5608 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5610 typedef SizedResult
<GLuint
> Result
;
5612 static uint32_t ComputeSize() {
5613 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5616 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5618 void Init(GLuint _index
,
5620 uint32_t _pointer_shm_id
,
5621 uint32_t _pointer_shm_offset
) {
5625 pointer_shm_id
= _pointer_shm_id
;
5626 pointer_shm_offset
= _pointer_shm_offset
;
5629 void* Set(void* cmd
,
5632 uint32_t _pointer_shm_id
,
5633 uint32_t _pointer_shm_offset
) {
5634 static_cast<ValueType
*>(cmd
)
5635 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
5636 return NextCmdAddress
<ValueType
>(cmd
);
5639 gpu::CommandHeader header
;
5642 uint32_t pointer_shm_id
;
5643 uint32_t pointer_shm_offset
;
5646 static_assert(sizeof(GetVertexAttribPointerv
) == 20,
5647 "size of GetVertexAttribPointerv should be 20");
5648 static_assert(offsetof(GetVertexAttribPointerv
, header
) == 0,
5649 "offset of GetVertexAttribPointerv header should be 0");
5650 static_assert(offsetof(GetVertexAttribPointerv
, index
) == 4,
5651 "offset of GetVertexAttribPointerv index should be 4");
5652 static_assert(offsetof(GetVertexAttribPointerv
, pname
) == 8,
5653 "offset of GetVertexAttribPointerv pname should be 8");
5654 static_assert(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
5655 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
5657 offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
5658 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
5661 typedef Hint ValueType
;
5662 static const CommandId kCmdId
= kHint
;
5663 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5664 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5666 static uint32_t ComputeSize() {
5667 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5670 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5672 void Init(GLenum _target
, GLenum _mode
) {
5678 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
5679 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
5680 return NextCmdAddress
<ValueType
>(cmd
);
5683 gpu::CommandHeader header
;
5688 static_assert(sizeof(Hint
) == 12, "size of Hint should be 12");
5689 static_assert(offsetof(Hint
, header
) == 0, "offset of Hint header should be 0");
5690 static_assert(offsetof(Hint
, target
) == 4, "offset of Hint target should be 4");
5691 static_assert(offsetof(Hint
, mode
) == 8, "offset of Hint mode should be 8");
5693 struct InvalidateFramebufferImmediate
{
5694 typedef InvalidateFramebufferImmediate ValueType
;
5695 static const CommandId kCmdId
= kInvalidateFramebufferImmediate
;
5696 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5697 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5699 static uint32_t ComputeDataSize(GLsizei count
) {
5700 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5703 static uint32_t ComputeSize(GLsizei count
) {
5704 return static_cast<uint32_t>(sizeof(ValueType
) +
5705 ComputeDataSize(count
)); // NOLINT
5708 void SetHeader(GLsizei count
) {
5709 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5712 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
5716 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5719 void* Set(void* cmd
,
5722 const GLenum
* _attachments
) {
5723 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
5724 const uint32_t size
= ComputeSize(_count
);
5725 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5728 gpu::CommandHeader header
;
5733 static_assert(sizeof(InvalidateFramebufferImmediate
) == 12,
5734 "size of InvalidateFramebufferImmediate should be 12");
5735 static_assert(offsetof(InvalidateFramebufferImmediate
, header
) == 0,
5736 "offset of InvalidateFramebufferImmediate header should be 0");
5737 static_assert(offsetof(InvalidateFramebufferImmediate
, target
) == 4,
5738 "offset of InvalidateFramebufferImmediate target should be 4");
5739 static_assert(offsetof(InvalidateFramebufferImmediate
, count
) == 8,
5740 "offset of InvalidateFramebufferImmediate count should be 8");
5742 struct InvalidateSubFramebufferImmediate
{
5743 typedef InvalidateSubFramebufferImmediate ValueType
;
5744 static const CommandId kCmdId
= kInvalidateSubFramebufferImmediate
;
5745 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5746 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5748 static uint32_t ComputeDataSize(GLsizei count
) {
5749 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5752 static uint32_t ComputeSize(GLsizei count
) {
5753 return static_cast<uint32_t>(sizeof(ValueType
) +
5754 ComputeDataSize(count
)); // NOLINT
5757 void SetHeader(GLsizei count
) {
5758 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5761 void Init(GLenum _target
,
5763 const GLenum
* _attachments
,
5775 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5778 void* Set(void* cmd
,
5781 const GLenum
* _attachments
,
5786 static_cast<ValueType
*>(cmd
)
5787 ->Init(_target
, _count
, _attachments
, _x
, _y
, _width
, _height
);
5788 const uint32_t size
= ComputeSize(_count
);
5789 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5792 gpu::CommandHeader header
;
5801 static_assert(sizeof(InvalidateSubFramebufferImmediate
) == 28,
5802 "size of InvalidateSubFramebufferImmediate should be 28");
5803 static_assert(offsetof(InvalidateSubFramebufferImmediate
, header
) == 0,
5804 "offset of InvalidateSubFramebufferImmediate header should be 0");
5805 static_assert(offsetof(InvalidateSubFramebufferImmediate
, target
) == 4,
5806 "offset of InvalidateSubFramebufferImmediate target should be 4");
5807 static_assert(offsetof(InvalidateSubFramebufferImmediate
, count
) == 8,
5808 "offset of InvalidateSubFramebufferImmediate count should be 8");
5809 static_assert(offsetof(InvalidateSubFramebufferImmediate
, x
) == 12,
5810 "offset of InvalidateSubFramebufferImmediate x should be 12");
5811 static_assert(offsetof(InvalidateSubFramebufferImmediate
, y
) == 16,
5812 "offset of InvalidateSubFramebufferImmediate y should be 16");
5813 static_assert(offsetof(InvalidateSubFramebufferImmediate
, width
) == 20,
5814 "offset of InvalidateSubFramebufferImmediate width should be 20");
5816 offsetof(InvalidateSubFramebufferImmediate
, height
) == 24,
5817 "offset of InvalidateSubFramebufferImmediate height should be 24");
5820 typedef IsBuffer ValueType
;
5821 static const CommandId kCmdId
= kIsBuffer
;
5822 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5823 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5825 typedef uint32_t Result
;
5827 static uint32_t ComputeSize() {
5828 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5831 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5833 void Init(GLuint _buffer
,
5834 uint32_t _result_shm_id
,
5835 uint32_t _result_shm_offset
) {
5838 result_shm_id
= _result_shm_id
;
5839 result_shm_offset
= _result_shm_offset
;
5842 void* Set(void* cmd
,
5844 uint32_t _result_shm_id
,
5845 uint32_t _result_shm_offset
) {
5846 static_cast<ValueType
*>(cmd
)
5847 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
5848 return NextCmdAddress
<ValueType
>(cmd
);
5851 gpu::CommandHeader header
;
5853 uint32_t result_shm_id
;
5854 uint32_t result_shm_offset
;
5857 static_assert(sizeof(IsBuffer
) == 16, "size of IsBuffer should be 16");
5858 static_assert(offsetof(IsBuffer
, header
) == 0,
5859 "offset of IsBuffer header should be 0");
5860 static_assert(offsetof(IsBuffer
, buffer
) == 4,
5861 "offset of IsBuffer buffer should be 4");
5862 static_assert(offsetof(IsBuffer
, result_shm_id
) == 8,
5863 "offset of IsBuffer result_shm_id should be 8");
5864 static_assert(offsetof(IsBuffer
, result_shm_offset
) == 12,
5865 "offset of IsBuffer result_shm_offset should be 12");
5868 typedef IsEnabled ValueType
;
5869 static const CommandId kCmdId
= kIsEnabled
;
5870 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5871 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5873 typedef uint32_t Result
;
5875 static uint32_t ComputeSize() {
5876 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5879 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5881 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
5884 result_shm_id
= _result_shm_id
;
5885 result_shm_offset
= _result_shm_offset
;
5888 void* Set(void* cmd
,
5890 uint32_t _result_shm_id
,
5891 uint32_t _result_shm_offset
) {
5892 static_cast<ValueType
*>(cmd
)
5893 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
5894 return NextCmdAddress
<ValueType
>(cmd
);
5897 gpu::CommandHeader header
;
5899 uint32_t result_shm_id
;
5900 uint32_t result_shm_offset
;
5903 static_assert(sizeof(IsEnabled
) == 16, "size of IsEnabled should be 16");
5904 static_assert(offsetof(IsEnabled
, header
) == 0,
5905 "offset of IsEnabled header should be 0");
5906 static_assert(offsetof(IsEnabled
, cap
) == 4,
5907 "offset of IsEnabled cap should be 4");
5908 static_assert(offsetof(IsEnabled
, result_shm_id
) == 8,
5909 "offset of IsEnabled result_shm_id should be 8");
5910 static_assert(offsetof(IsEnabled
, result_shm_offset
) == 12,
5911 "offset of IsEnabled result_shm_offset should be 12");
5913 struct IsFramebuffer
{
5914 typedef IsFramebuffer ValueType
;
5915 static const CommandId kCmdId
= kIsFramebuffer
;
5916 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5917 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5919 typedef uint32_t Result
;
5921 static uint32_t ComputeSize() {
5922 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5925 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5927 void Init(GLuint _framebuffer
,
5928 uint32_t _result_shm_id
,
5929 uint32_t _result_shm_offset
) {
5931 framebuffer
= _framebuffer
;
5932 result_shm_id
= _result_shm_id
;
5933 result_shm_offset
= _result_shm_offset
;
5936 void* Set(void* cmd
,
5937 GLuint _framebuffer
,
5938 uint32_t _result_shm_id
,
5939 uint32_t _result_shm_offset
) {
5940 static_cast<ValueType
*>(cmd
)
5941 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
5942 return NextCmdAddress
<ValueType
>(cmd
);
5945 gpu::CommandHeader header
;
5946 uint32_t framebuffer
;
5947 uint32_t result_shm_id
;
5948 uint32_t result_shm_offset
;
5951 static_assert(sizeof(IsFramebuffer
) == 16,
5952 "size of IsFramebuffer should be 16");
5953 static_assert(offsetof(IsFramebuffer
, header
) == 0,
5954 "offset of IsFramebuffer header should be 0");
5955 static_assert(offsetof(IsFramebuffer
, framebuffer
) == 4,
5956 "offset of IsFramebuffer framebuffer should be 4");
5957 static_assert(offsetof(IsFramebuffer
, result_shm_id
) == 8,
5958 "offset of IsFramebuffer result_shm_id should be 8");
5959 static_assert(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
5960 "offset of IsFramebuffer result_shm_offset should be 12");
5963 typedef IsProgram ValueType
;
5964 static const CommandId kCmdId
= kIsProgram
;
5965 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5966 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5968 typedef uint32_t Result
;
5970 static uint32_t ComputeSize() {
5971 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5974 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5976 void Init(GLuint _program
,
5977 uint32_t _result_shm_id
,
5978 uint32_t _result_shm_offset
) {
5981 result_shm_id
= _result_shm_id
;
5982 result_shm_offset
= _result_shm_offset
;
5985 void* Set(void* cmd
,
5987 uint32_t _result_shm_id
,
5988 uint32_t _result_shm_offset
) {
5989 static_cast<ValueType
*>(cmd
)
5990 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
5991 return NextCmdAddress
<ValueType
>(cmd
);
5994 gpu::CommandHeader header
;
5996 uint32_t result_shm_id
;
5997 uint32_t result_shm_offset
;
6000 static_assert(sizeof(IsProgram
) == 16, "size of IsProgram should be 16");
6001 static_assert(offsetof(IsProgram
, header
) == 0,
6002 "offset of IsProgram header should be 0");
6003 static_assert(offsetof(IsProgram
, program
) == 4,
6004 "offset of IsProgram program should be 4");
6005 static_assert(offsetof(IsProgram
, result_shm_id
) == 8,
6006 "offset of IsProgram result_shm_id should be 8");
6007 static_assert(offsetof(IsProgram
, result_shm_offset
) == 12,
6008 "offset of IsProgram result_shm_offset should be 12");
6010 struct IsRenderbuffer
{
6011 typedef IsRenderbuffer ValueType
;
6012 static const CommandId kCmdId
= kIsRenderbuffer
;
6013 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6014 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6016 typedef uint32_t Result
;
6018 static uint32_t ComputeSize() {
6019 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6022 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6024 void Init(GLuint _renderbuffer
,
6025 uint32_t _result_shm_id
,
6026 uint32_t _result_shm_offset
) {
6028 renderbuffer
= _renderbuffer
;
6029 result_shm_id
= _result_shm_id
;
6030 result_shm_offset
= _result_shm_offset
;
6033 void* Set(void* cmd
,
6034 GLuint _renderbuffer
,
6035 uint32_t _result_shm_id
,
6036 uint32_t _result_shm_offset
) {
6037 static_cast<ValueType
*>(cmd
)
6038 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
6039 return NextCmdAddress
<ValueType
>(cmd
);
6042 gpu::CommandHeader header
;
6043 uint32_t renderbuffer
;
6044 uint32_t result_shm_id
;
6045 uint32_t result_shm_offset
;
6048 static_assert(sizeof(IsRenderbuffer
) == 16,
6049 "size of IsRenderbuffer should be 16");
6050 static_assert(offsetof(IsRenderbuffer
, header
) == 0,
6051 "offset of IsRenderbuffer header should be 0");
6052 static_assert(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
6053 "offset of IsRenderbuffer renderbuffer should be 4");
6054 static_assert(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
6055 "offset of IsRenderbuffer result_shm_id should be 8");
6056 static_assert(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
6057 "offset of IsRenderbuffer result_shm_offset should be 12");
6060 typedef IsSampler ValueType
;
6061 static const CommandId kCmdId
= kIsSampler
;
6062 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6063 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6065 typedef uint32_t Result
;
6067 static uint32_t ComputeSize() {
6068 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6071 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6073 void Init(GLuint _sampler
,
6074 uint32_t _result_shm_id
,
6075 uint32_t _result_shm_offset
) {
6078 result_shm_id
= _result_shm_id
;
6079 result_shm_offset
= _result_shm_offset
;
6082 void* Set(void* cmd
,
6084 uint32_t _result_shm_id
,
6085 uint32_t _result_shm_offset
) {
6086 static_cast<ValueType
*>(cmd
)
6087 ->Init(_sampler
, _result_shm_id
, _result_shm_offset
);
6088 return NextCmdAddress
<ValueType
>(cmd
);
6091 gpu::CommandHeader header
;
6093 uint32_t result_shm_id
;
6094 uint32_t result_shm_offset
;
6097 static_assert(sizeof(IsSampler
) == 16, "size of IsSampler should be 16");
6098 static_assert(offsetof(IsSampler
, header
) == 0,
6099 "offset of IsSampler header should be 0");
6100 static_assert(offsetof(IsSampler
, sampler
) == 4,
6101 "offset of IsSampler sampler should be 4");
6102 static_assert(offsetof(IsSampler
, result_shm_id
) == 8,
6103 "offset of IsSampler result_shm_id should be 8");
6104 static_assert(offsetof(IsSampler
, result_shm_offset
) == 12,
6105 "offset of IsSampler result_shm_offset should be 12");
6108 typedef IsShader ValueType
;
6109 static const CommandId kCmdId
= kIsShader
;
6110 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6111 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6113 typedef uint32_t Result
;
6115 static uint32_t ComputeSize() {
6116 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6119 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6121 void Init(GLuint _shader
,
6122 uint32_t _result_shm_id
,
6123 uint32_t _result_shm_offset
) {
6126 result_shm_id
= _result_shm_id
;
6127 result_shm_offset
= _result_shm_offset
;
6130 void* Set(void* cmd
,
6132 uint32_t _result_shm_id
,
6133 uint32_t _result_shm_offset
) {
6134 static_cast<ValueType
*>(cmd
)
6135 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
6136 return NextCmdAddress
<ValueType
>(cmd
);
6139 gpu::CommandHeader header
;
6141 uint32_t result_shm_id
;
6142 uint32_t result_shm_offset
;
6145 static_assert(sizeof(IsShader
) == 16, "size of IsShader should be 16");
6146 static_assert(offsetof(IsShader
, header
) == 0,
6147 "offset of IsShader header should be 0");
6148 static_assert(offsetof(IsShader
, shader
) == 4,
6149 "offset of IsShader shader should be 4");
6150 static_assert(offsetof(IsShader
, result_shm_id
) == 8,
6151 "offset of IsShader result_shm_id should be 8");
6152 static_assert(offsetof(IsShader
, result_shm_offset
) == 12,
6153 "offset of IsShader result_shm_offset should be 12");
6156 typedef IsSync ValueType
;
6157 static const CommandId kCmdId
= kIsSync
;
6158 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6159 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6161 typedef uint32_t Result
;
6163 static uint32_t ComputeSize() {
6164 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6167 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6169 void Init(GLuint _sync
,
6170 uint32_t _result_shm_id
,
6171 uint32_t _result_shm_offset
) {
6174 result_shm_id
= _result_shm_id
;
6175 result_shm_offset
= _result_shm_offset
;
6178 void* Set(void* cmd
,
6180 uint32_t _result_shm_id
,
6181 uint32_t _result_shm_offset
) {
6182 static_cast<ValueType
*>(cmd
)
6183 ->Init(_sync
, _result_shm_id
, _result_shm_offset
);
6184 return NextCmdAddress
<ValueType
>(cmd
);
6187 gpu::CommandHeader header
;
6189 uint32_t result_shm_id
;
6190 uint32_t result_shm_offset
;
6193 static_assert(sizeof(IsSync
) == 16, "size of IsSync should be 16");
6194 static_assert(offsetof(IsSync
, header
) == 0,
6195 "offset of IsSync header should be 0");
6196 static_assert(offsetof(IsSync
, sync
) == 4, "offset of IsSync sync should be 4");
6197 static_assert(offsetof(IsSync
, result_shm_id
) == 8,
6198 "offset of IsSync result_shm_id should be 8");
6199 static_assert(offsetof(IsSync
, result_shm_offset
) == 12,
6200 "offset of IsSync result_shm_offset should be 12");
6203 typedef IsTexture ValueType
;
6204 static const CommandId kCmdId
= kIsTexture
;
6205 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6206 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6208 typedef uint32_t Result
;
6210 static uint32_t ComputeSize() {
6211 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6214 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6216 void Init(GLuint _texture
,
6217 uint32_t _result_shm_id
,
6218 uint32_t _result_shm_offset
) {
6221 result_shm_id
= _result_shm_id
;
6222 result_shm_offset
= _result_shm_offset
;
6225 void* Set(void* cmd
,
6227 uint32_t _result_shm_id
,
6228 uint32_t _result_shm_offset
) {
6229 static_cast<ValueType
*>(cmd
)
6230 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
6231 return NextCmdAddress
<ValueType
>(cmd
);
6234 gpu::CommandHeader header
;
6236 uint32_t result_shm_id
;
6237 uint32_t result_shm_offset
;
6240 static_assert(sizeof(IsTexture
) == 16, "size of IsTexture should be 16");
6241 static_assert(offsetof(IsTexture
, header
) == 0,
6242 "offset of IsTexture header should be 0");
6243 static_assert(offsetof(IsTexture
, texture
) == 4,
6244 "offset of IsTexture texture should be 4");
6245 static_assert(offsetof(IsTexture
, result_shm_id
) == 8,
6246 "offset of IsTexture result_shm_id should be 8");
6247 static_assert(offsetof(IsTexture
, result_shm_offset
) == 12,
6248 "offset of IsTexture result_shm_offset should be 12");
6250 struct IsTransformFeedback
{
6251 typedef IsTransformFeedback ValueType
;
6252 static const CommandId kCmdId
= kIsTransformFeedback
;
6253 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6254 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6256 typedef uint32_t Result
;
6258 static uint32_t ComputeSize() {
6259 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6262 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6264 void Init(GLuint _transformfeedback
,
6265 uint32_t _result_shm_id
,
6266 uint32_t _result_shm_offset
) {
6268 transformfeedback
= _transformfeedback
;
6269 result_shm_id
= _result_shm_id
;
6270 result_shm_offset
= _result_shm_offset
;
6273 void* Set(void* cmd
,
6274 GLuint _transformfeedback
,
6275 uint32_t _result_shm_id
,
6276 uint32_t _result_shm_offset
) {
6277 static_cast<ValueType
*>(cmd
)
6278 ->Init(_transformfeedback
, _result_shm_id
, _result_shm_offset
);
6279 return NextCmdAddress
<ValueType
>(cmd
);
6282 gpu::CommandHeader header
;
6283 uint32_t transformfeedback
;
6284 uint32_t result_shm_id
;
6285 uint32_t result_shm_offset
;
6288 static_assert(sizeof(IsTransformFeedback
) == 16,
6289 "size of IsTransformFeedback should be 16");
6290 static_assert(offsetof(IsTransformFeedback
, header
) == 0,
6291 "offset of IsTransformFeedback header should be 0");
6292 static_assert(offsetof(IsTransformFeedback
, transformfeedback
) == 4,
6293 "offset of IsTransformFeedback transformfeedback should be 4");
6294 static_assert(offsetof(IsTransformFeedback
, result_shm_id
) == 8,
6295 "offset of IsTransformFeedback result_shm_id should be 8");
6296 static_assert(offsetof(IsTransformFeedback
, result_shm_offset
) == 12,
6297 "offset of IsTransformFeedback result_shm_offset should be 12");
6300 typedef LineWidth ValueType
;
6301 static const CommandId kCmdId
= kLineWidth
;
6302 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6303 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6305 static uint32_t ComputeSize() {
6306 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6309 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6311 void Init(GLfloat _width
) {
6316 void* Set(void* cmd
, GLfloat _width
) {
6317 static_cast<ValueType
*>(cmd
)->Init(_width
);
6318 return NextCmdAddress
<ValueType
>(cmd
);
6321 gpu::CommandHeader header
;
6325 static_assert(sizeof(LineWidth
) == 8, "size of LineWidth should be 8");
6326 static_assert(offsetof(LineWidth
, header
) == 0,
6327 "offset of LineWidth header should be 0");
6328 static_assert(offsetof(LineWidth
, width
) == 4,
6329 "offset of LineWidth width should be 4");
6331 struct LinkProgram
{
6332 typedef LinkProgram ValueType
;
6333 static const CommandId kCmdId
= kLinkProgram
;
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(GLuint _program
) {
6348 void* Set(void* cmd
, GLuint _program
) {
6349 static_cast<ValueType
*>(cmd
)->Init(_program
);
6350 return NextCmdAddress
<ValueType
>(cmd
);
6353 gpu::CommandHeader header
;
6357 static_assert(sizeof(LinkProgram
) == 8, "size of LinkProgram should be 8");
6358 static_assert(offsetof(LinkProgram
, header
) == 0,
6359 "offset of LinkProgram header should be 0");
6360 static_assert(offsetof(LinkProgram
, program
) == 4,
6361 "offset of LinkProgram program should be 4");
6363 struct PauseTransformFeedback
{
6364 typedef PauseTransformFeedback ValueType
;
6365 static const CommandId kCmdId
= kPauseTransformFeedback
;
6366 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6367 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6369 static uint32_t ComputeSize() {
6370 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6373 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6375 void Init() { SetHeader(); }
6377 void* Set(void* cmd
) {
6378 static_cast<ValueType
*>(cmd
)->Init();
6379 return NextCmdAddress
<ValueType
>(cmd
);
6382 gpu::CommandHeader header
;
6385 static_assert(sizeof(PauseTransformFeedback
) == 4,
6386 "size of PauseTransformFeedback should be 4");
6387 static_assert(offsetof(PauseTransformFeedback
, header
) == 0,
6388 "offset of PauseTransformFeedback header should be 0");
6390 struct PixelStorei
{
6391 typedef PixelStorei ValueType
;
6392 static const CommandId kCmdId
= kPixelStorei
;
6393 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6394 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6396 static uint32_t ComputeSize() {
6397 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6400 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6402 void Init(GLenum _pname
, GLint _param
) {
6408 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
6409 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
6410 return NextCmdAddress
<ValueType
>(cmd
);
6413 gpu::CommandHeader header
;
6418 static_assert(sizeof(PixelStorei
) == 12, "size of PixelStorei should be 12");
6419 static_assert(offsetof(PixelStorei
, header
) == 0,
6420 "offset of PixelStorei header should be 0");
6421 static_assert(offsetof(PixelStorei
, pname
) == 4,
6422 "offset of PixelStorei pname should be 4");
6423 static_assert(offsetof(PixelStorei
, param
) == 8,
6424 "offset of PixelStorei param should be 8");
6426 struct PolygonOffset
{
6427 typedef PolygonOffset ValueType
;
6428 static const CommandId kCmdId
= kPolygonOffset
;
6429 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6430 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6432 static uint32_t ComputeSize() {
6433 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6436 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6438 void Init(GLfloat _factor
, GLfloat _units
) {
6444 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
6445 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
6446 return NextCmdAddress
<ValueType
>(cmd
);
6449 gpu::CommandHeader header
;
6454 static_assert(sizeof(PolygonOffset
) == 12,
6455 "size of PolygonOffset should be 12");
6456 static_assert(offsetof(PolygonOffset
, header
) == 0,
6457 "offset of PolygonOffset header should be 0");
6458 static_assert(offsetof(PolygonOffset
, factor
) == 4,
6459 "offset of PolygonOffset factor should be 4");
6460 static_assert(offsetof(PolygonOffset
, units
) == 8,
6461 "offset of PolygonOffset units should be 8");
6464 typedef ReadBuffer ValueType
;
6465 static const CommandId kCmdId
= kReadBuffer
;
6466 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6467 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6469 static uint32_t ComputeSize() {
6470 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6473 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6475 void Init(GLenum _src
) {
6480 void* Set(void* cmd
, GLenum _src
) {
6481 static_cast<ValueType
*>(cmd
)->Init(_src
);
6482 return NextCmdAddress
<ValueType
>(cmd
);
6485 gpu::CommandHeader header
;
6489 static_assert(sizeof(ReadBuffer
) == 8, "size of ReadBuffer should be 8");
6490 static_assert(offsetof(ReadBuffer
, header
) == 0,
6491 "offset of ReadBuffer header should be 0");
6492 static_assert(offsetof(ReadBuffer
, src
) == 4,
6493 "offset of ReadBuffer src should be 4");
6495 // ReadPixels has the result separated from the pixel buffer so that
6496 // it is easier to specify the result going to some specific place
6497 // that exactly fits the rectangle of pixels.
6499 typedef ReadPixels ValueType
;
6500 static const CommandId kCmdId
= kReadPixels
;
6501 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6502 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6504 typedef uint32_t Result
;
6506 static uint32_t ComputeSize() {
6507 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6510 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6518 uint32_t _pixels_shm_id
,
6519 uint32_t _pixels_shm_offset
,
6520 uint32_t _result_shm_id
,
6521 uint32_t _result_shm_offset
,
6530 pixels_shm_id
= _pixels_shm_id
;
6531 pixels_shm_offset
= _pixels_shm_offset
;
6532 result_shm_id
= _result_shm_id
;
6533 result_shm_offset
= _result_shm_offset
;
6537 void* Set(void* cmd
,
6544 uint32_t _pixels_shm_id
,
6545 uint32_t _pixels_shm_offset
,
6546 uint32_t _result_shm_id
,
6547 uint32_t _result_shm_offset
,
6549 static_cast<ValueType
*>(cmd
)
6550 ->Init(_x
, _y
, _width
, _height
, _format
, _type
, _pixels_shm_id
,
6551 _pixels_shm_offset
, _result_shm_id
, _result_shm_offset
, _async
);
6552 return NextCmdAddress
<ValueType
>(cmd
);
6555 gpu::CommandHeader header
;
6562 uint32_t pixels_shm_id
;
6563 uint32_t pixels_shm_offset
;
6564 uint32_t result_shm_id
;
6565 uint32_t result_shm_offset
;
6569 static_assert(sizeof(ReadPixels
) == 48, "size of ReadPixels should be 48");
6570 static_assert(offsetof(ReadPixels
, header
) == 0,
6571 "offset of ReadPixels header should be 0");
6572 static_assert(offsetof(ReadPixels
, x
) == 4,
6573 "offset of ReadPixels x should be 4");
6574 static_assert(offsetof(ReadPixels
, y
) == 8,
6575 "offset of ReadPixels y should be 8");
6576 static_assert(offsetof(ReadPixels
, width
) == 12,
6577 "offset of ReadPixels width should be 12");
6578 static_assert(offsetof(ReadPixels
, height
) == 16,
6579 "offset of ReadPixels height should be 16");
6580 static_assert(offsetof(ReadPixels
, format
) == 20,
6581 "offset of ReadPixels format should be 20");
6582 static_assert(offsetof(ReadPixels
, type
) == 24,
6583 "offset of ReadPixels type should be 24");
6584 static_assert(offsetof(ReadPixels
, pixels_shm_id
) == 28,
6585 "offset of ReadPixels pixels_shm_id should be 28");
6586 static_assert(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
6587 "offset of ReadPixels pixels_shm_offset should be 32");
6588 static_assert(offsetof(ReadPixels
, result_shm_id
) == 36,
6589 "offset of ReadPixels result_shm_id should be 36");
6590 static_assert(offsetof(ReadPixels
, result_shm_offset
) == 40,
6591 "offset of ReadPixels result_shm_offset should be 40");
6592 static_assert(offsetof(ReadPixels
, async
) == 44,
6593 "offset of ReadPixels async should be 44");
6595 struct ReleaseShaderCompiler
{
6596 typedef ReleaseShaderCompiler ValueType
;
6597 static const CommandId kCmdId
= kReleaseShaderCompiler
;
6598 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6599 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6601 static uint32_t ComputeSize() {
6602 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6605 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6607 void Init() { SetHeader(); }
6609 void* Set(void* cmd
) {
6610 static_cast<ValueType
*>(cmd
)->Init();
6611 return NextCmdAddress
<ValueType
>(cmd
);
6614 gpu::CommandHeader header
;
6617 static_assert(sizeof(ReleaseShaderCompiler
) == 4,
6618 "size of ReleaseShaderCompiler should be 4");
6619 static_assert(offsetof(ReleaseShaderCompiler
, header
) == 0,
6620 "offset of ReleaseShaderCompiler header should be 0");
6622 struct RenderbufferStorage
{
6623 typedef RenderbufferStorage ValueType
;
6624 static const CommandId kCmdId
= kRenderbufferStorage
;
6625 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6626 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6628 static uint32_t ComputeSize() {
6629 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6632 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6634 void Init(GLenum _target
,
6635 GLenum _internalformat
,
6640 internalformat
= _internalformat
;
6645 void* Set(void* cmd
,
6647 GLenum _internalformat
,
6650 static_cast<ValueType
*>(cmd
)
6651 ->Init(_target
, _internalformat
, _width
, _height
);
6652 return NextCmdAddress
<ValueType
>(cmd
);
6655 gpu::CommandHeader header
;
6657 uint32_t internalformat
;
6662 static_assert(sizeof(RenderbufferStorage
) == 20,
6663 "size of RenderbufferStorage should be 20");
6664 static_assert(offsetof(RenderbufferStorage
, header
) == 0,
6665 "offset of RenderbufferStorage header should be 0");
6666 static_assert(offsetof(RenderbufferStorage
, target
) == 4,
6667 "offset of RenderbufferStorage target should be 4");
6668 static_assert(offsetof(RenderbufferStorage
, internalformat
) == 8,
6669 "offset of RenderbufferStorage internalformat should be 8");
6670 static_assert(offsetof(RenderbufferStorage
, width
) == 12,
6671 "offset of RenderbufferStorage width should be 12");
6672 static_assert(offsetof(RenderbufferStorage
, height
) == 16,
6673 "offset of RenderbufferStorage height should be 16");
6675 struct ResumeTransformFeedback
{
6676 typedef ResumeTransformFeedback ValueType
;
6677 static const CommandId kCmdId
= kResumeTransformFeedback
;
6678 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6679 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6681 static uint32_t ComputeSize() {
6682 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6685 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6687 void Init() { SetHeader(); }
6689 void* Set(void* cmd
) {
6690 static_cast<ValueType
*>(cmd
)->Init();
6691 return NextCmdAddress
<ValueType
>(cmd
);
6694 gpu::CommandHeader header
;
6697 static_assert(sizeof(ResumeTransformFeedback
) == 4,
6698 "size of ResumeTransformFeedback should be 4");
6699 static_assert(offsetof(ResumeTransformFeedback
, header
) == 0,
6700 "offset of ResumeTransformFeedback header should be 0");
6702 struct SampleCoverage
{
6703 typedef SampleCoverage ValueType
;
6704 static const CommandId kCmdId
= kSampleCoverage
;
6705 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6706 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6708 static uint32_t ComputeSize() {
6709 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6712 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6714 void Init(GLclampf _value
, GLboolean _invert
) {
6720 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
6721 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
6722 return NextCmdAddress
<ValueType
>(cmd
);
6725 gpu::CommandHeader header
;
6730 static_assert(sizeof(SampleCoverage
) == 12,
6731 "size of SampleCoverage should be 12");
6732 static_assert(offsetof(SampleCoverage
, header
) == 0,
6733 "offset of SampleCoverage header should be 0");
6734 static_assert(offsetof(SampleCoverage
, value
) == 4,
6735 "offset of SampleCoverage value should be 4");
6736 static_assert(offsetof(SampleCoverage
, invert
) == 8,
6737 "offset of SampleCoverage invert should be 8");
6739 struct SamplerParameterf
{
6740 typedef SamplerParameterf ValueType
;
6741 static const CommandId kCmdId
= kSamplerParameterf
;
6742 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6743 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6745 static uint32_t ComputeSize() {
6746 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6749 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6751 void Init(GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6758 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6759 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6760 return NextCmdAddress
<ValueType
>(cmd
);
6763 gpu::CommandHeader header
;
6769 static_assert(sizeof(SamplerParameterf
) == 16,
6770 "size of SamplerParameterf should be 16");
6771 static_assert(offsetof(SamplerParameterf
, header
) == 0,
6772 "offset of SamplerParameterf header should be 0");
6773 static_assert(offsetof(SamplerParameterf
, sampler
) == 4,
6774 "offset of SamplerParameterf sampler should be 4");
6775 static_assert(offsetof(SamplerParameterf
, pname
) == 8,
6776 "offset of SamplerParameterf pname should be 8");
6777 static_assert(offsetof(SamplerParameterf
, param
) == 12,
6778 "offset of SamplerParameterf param should be 12");
6780 struct SamplerParameterfvImmediate
{
6781 typedef SamplerParameterfvImmediate ValueType
;
6782 static const CommandId kCmdId
= kSamplerParameterfvImmediate
;
6783 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6784 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6786 static uint32_t ComputeDataSize() {
6787 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
6790 static uint32_t ComputeSize() {
6791 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6794 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6796 void Init(GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6800 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6803 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6804 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6805 const uint32_t size
= ComputeSize();
6806 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6809 gpu::CommandHeader header
;
6814 static_assert(sizeof(SamplerParameterfvImmediate
) == 12,
6815 "size of SamplerParameterfvImmediate should be 12");
6816 static_assert(offsetof(SamplerParameterfvImmediate
, header
) == 0,
6817 "offset of SamplerParameterfvImmediate header should be 0");
6818 static_assert(offsetof(SamplerParameterfvImmediate
, sampler
) == 4,
6819 "offset of SamplerParameterfvImmediate sampler should be 4");
6820 static_assert(offsetof(SamplerParameterfvImmediate
, pname
) == 8,
6821 "offset of SamplerParameterfvImmediate pname should be 8");
6823 struct SamplerParameteri
{
6824 typedef SamplerParameteri ValueType
;
6825 static const CommandId kCmdId
= kSamplerParameteri
;
6826 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6827 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6829 static uint32_t ComputeSize() {
6830 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6833 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6835 void Init(GLuint _sampler
, GLenum _pname
, GLint _param
) {
6842 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLint _param
) {
6843 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6844 return NextCmdAddress
<ValueType
>(cmd
);
6847 gpu::CommandHeader header
;
6853 static_assert(sizeof(SamplerParameteri
) == 16,
6854 "size of SamplerParameteri should be 16");
6855 static_assert(offsetof(SamplerParameteri
, header
) == 0,
6856 "offset of SamplerParameteri header should be 0");
6857 static_assert(offsetof(SamplerParameteri
, sampler
) == 4,
6858 "offset of SamplerParameteri sampler should be 4");
6859 static_assert(offsetof(SamplerParameteri
, pname
) == 8,
6860 "offset of SamplerParameteri pname should be 8");
6861 static_assert(offsetof(SamplerParameteri
, param
) == 12,
6862 "offset of SamplerParameteri param should be 12");
6864 struct SamplerParameterivImmediate
{
6865 typedef SamplerParameterivImmediate ValueType
;
6866 static const CommandId kCmdId
= kSamplerParameterivImmediate
;
6867 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6868 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6870 static uint32_t ComputeDataSize() {
6871 return static_cast<uint32_t>(sizeof(GLint
) * 1);
6874 static uint32_t ComputeSize() {
6875 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6878 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6880 void Init(GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6884 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6887 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6888 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6889 const uint32_t size
= ComputeSize();
6890 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6893 gpu::CommandHeader header
;
6898 static_assert(sizeof(SamplerParameterivImmediate
) == 12,
6899 "size of SamplerParameterivImmediate should be 12");
6900 static_assert(offsetof(SamplerParameterivImmediate
, header
) == 0,
6901 "offset of SamplerParameterivImmediate header should be 0");
6902 static_assert(offsetof(SamplerParameterivImmediate
, sampler
) == 4,
6903 "offset of SamplerParameterivImmediate sampler should be 4");
6904 static_assert(offsetof(SamplerParameterivImmediate
, pname
) == 8,
6905 "offset of SamplerParameterivImmediate pname should be 8");
6908 typedef Scissor ValueType
;
6909 static const CommandId kCmdId
= kScissor
;
6910 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6911 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6913 static uint32_t ComputeSize() {
6914 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6917 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6919 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6927 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6928 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
6929 return NextCmdAddress
<ValueType
>(cmd
);
6932 gpu::CommandHeader header
;
6939 static_assert(sizeof(Scissor
) == 20, "size of Scissor should be 20");
6940 static_assert(offsetof(Scissor
, header
) == 0,
6941 "offset of Scissor header should be 0");
6942 static_assert(offsetof(Scissor
, x
) == 4, "offset of Scissor x should be 4");
6943 static_assert(offsetof(Scissor
, y
) == 8, "offset of Scissor y should be 8");
6944 static_assert(offsetof(Scissor
, width
) == 12,
6945 "offset of Scissor width should be 12");
6946 static_assert(offsetof(Scissor
, height
) == 16,
6947 "offset of Scissor height should be 16");
6949 struct ShaderBinary
{
6950 typedef ShaderBinary ValueType
;
6951 static const CommandId kCmdId
= kShaderBinary
;
6952 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6953 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6955 static uint32_t ComputeSize() {
6956 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6959 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6961 void Init(GLsizei _n
,
6962 uint32_t _shaders_shm_id
,
6963 uint32_t _shaders_shm_offset
,
6964 GLenum _binaryformat
,
6965 uint32_t _binary_shm_id
,
6966 uint32_t _binary_shm_offset
,
6970 shaders_shm_id
= _shaders_shm_id
;
6971 shaders_shm_offset
= _shaders_shm_offset
;
6972 binaryformat
= _binaryformat
;
6973 binary_shm_id
= _binary_shm_id
;
6974 binary_shm_offset
= _binary_shm_offset
;
6978 void* Set(void* cmd
,
6980 uint32_t _shaders_shm_id
,
6981 uint32_t _shaders_shm_offset
,
6982 GLenum _binaryformat
,
6983 uint32_t _binary_shm_id
,
6984 uint32_t _binary_shm_offset
,
6986 static_cast<ValueType
*>(cmd
)->Init(_n
, _shaders_shm_id
, _shaders_shm_offset
,
6987 _binaryformat
, _binary_shm_id
,
6988 _binary_shm_offset
, _length
);
6989 return NextCmdAddress
<ValueType
>(cmd
);
6992 gpu::CommandHeader header
;
6994 uint32_t shaders_shm_id
;
6995 uint32_t shaders_shm_offset
;
6996 uint32_t binaryformat
;
6997 uint32_t binary_shm_id
;
6998 uint32_t binary_shm_offset
;
7002 static_assert(sizeof(ShaderBinary
) == 32, "size of ShaderBinary should be 32");
7003 static_assert(offsetof(ShaderBinary
, header
) == 0,
7004 "offset of ShaderBinary header should be 0");
7005 static_assert(offsetof(ShaderBinary
, n
) == 4,
7006 "offset of ShaderBinary n should be 4");
7007 static_assert(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
7008 "offset of ShaderBinary shaders_shm_id should be 8");
7009 static_assert(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
7010 "offset of ShaderBinary shaders_shm_offset should be 12");
7011 static_assert(offsetof(ShaderBinary
, binaryformat
) == 16,
7012 "offset of ShaderBinary binaryformat should be 16");
7013 static_assert(offsetof(ShaderBinary
, binary_shm_id
) == 20,
7014 "offset of ShaderBinary binary_shm_id should be 20");
7015 static_assert(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
7016 "offset of ShaderBinary binary_shm_offset should be 24");
7017 static_assert(offsetof(ShaderBinary
, length
) == 28,
7018 "offset of ShaderBinary length should be 28");
7020 struct ShaderSourceBucket
{
7021 typedef ShaderSourceBucket ValueType
;
7022 static const CommandId kCmdId
= kShaderSourceBucket
;
7023 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7024 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7026 static uint32_t ComputeSize() {
7027 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7030 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7032 void Init(GLuint _shader
, uint32_t _str_bucket_id
) {
7035 str_bucket_id
= _str_bucket_id
;
7038 void* Set(void* cmd
, GLuint _shader
, uint32_t _str_bucket_id
) {
7039 static_cast<ValueType
*>(cmd
)->Init(_shader
, _str_bucket_id
);
7040 return NextCmdAddress
<ValueType
>(cmd
);
7043 gpu::CommandHeader header
;
7045 uint32_t str_bucket_id
;
7048 static_assert(sizeof(ShaderSourceBucket
) == 12,
7049 "size of ShaderSourceBucket should be 12");
7050 static_assert(offsetof(ShaderSourceBucket
, header
) == 0,
7051 "offset of ShaderSourceBucket header should be 0");
7052 static_assert(offsetof(ShaderSourceBucket
, shader
) == 4,
7053 "offset of ShaderSourceBucket shader should be 4");
7054 static_assert(offsetof(ShaderSourceBucket
, str_bucket_id
) == 8,
7055 "offset of ShaderSourceBucket str_bucket_id should be 8");
7057 struct StencilFunc
{
7058 typedef StencilFunc ValueType
;
7059 static const CommandId kCmdId
= kStencilFunc
;
7060 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7061 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7063 static uint32_t ComputeSize() {
7064 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7067 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7069 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
7076 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7077 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
7078 return NextCmdAddress
<ValueType
>(cmd
);
7081 gpu::CommandHeader header
;
7087 static_assert(sizeof(StencilFunc
) == 16, "size of StencilFunc should be 16");
7088 static_assert(offsetof(StencilFunc
, header
) == 0,
7089 "offset of StencilFunc header should be 0");
7090 static_assert(offsetof(StencilFunc
, func
) == 4,
7091 "offset of StencilFunc func should be 4");
7092 static_assert(offsetof(StencilFunc
, ref
) == 8,
7093 "offset of StencilFunc ref should be 8");
7094 static_assert(offsetof(StencilFunc
, mask
) == 12,
7095 "offset of StencilFunc mask should be 12");
7097 struct StencilFuncSeparate
{
7098 typedef StencilFuncSeparate ValueType
;
7099 static const CommandId kCmdId
= kStencilFuncSeparate
;
7100 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7101 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7103 static uint32_t ComputeSize() {
7104 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7107 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7109 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7117 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7118 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
7119 return NextCmdAddress
<ValueType
>(cmd
);
7122 gpu::CommandHeader header
;
7129 static_assert(sizeof(StencilFuncSeparate
) == 20,
7130 "size of StencilFuncSeparate should be 20");
7131 static_assert(offsetof(StencilFuncSeparate
, header
) == 0,
7132 "offset of StencilFuncSeparate header should be 0");
7133 static_assert(offsetof(StencilFuncSeparate
, face
) == 4,
7134 "offset of StencilFuncSeparate face should be 4");
7135 static_assert(offsetof(StencilFuncSeparate
, func
) == 8,
7136 "offset of StencilFuncSeparate func should be 8");
7137 static_assert(offsetof(StencilFuncSeparate
, ref
) == 12,
7138 "offset of StencilFuncSeparate ref should be 12");
7139 static_assert(offsetof(StencilFuncSeparate
, mask
) == 16,
7140 "offset of StencilFuncSeparate mask should be 16");
7142 struct StencilMask
{
7143 typedef StencilMask ValueType
;
7144 static const CommandId kCmdId
= kStencilMask
;
7145 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7146 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7148 static uint32_t ComputeSize() {
7149 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7152 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7154 void Init(GLuint _mask
) {
7159 void* Set(void* cmd
, GLuint _mask
) {
7160 static_cast<ValueType
*>(cmd
)->Init(_mask
);
7161 return NextCmdAddress
<ValueType
>(cmd
);
7164 gpu::CommandHeader header
;
7168 static_assert(sizeof(StencilMask
) == 8, "size of StencilMask should be 8");
7169 static_assert(offsetof(StencilMask
, header
) == 0,
7170 "offset of StencilMask header should be 0");
7171 static_assert(offsetof(StencilMask
, mask
) == 4,
7172 "offset of StencilMask mask should be 4");
7174 struct StencilMaskSeparate
{
7175 typedef StencilMaskSeparate ValueType
;
7176 static const CommandId kCmdId
= kStencilMaskSeparate
;
7177 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7178 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7180 static uint32_t ComputeSize() {
7181 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7184 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7186 void Init(GLenum _face
, GLuint _mask
) {
7192 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
7193 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
7194 return NextCmdAddress
<ValueType
>(cmd
);
7197 gpu::CommandHeader header
;
7202 static_assert(sizeof(StencilMaskSeparate
) == 12,
7203 "size of StencilMaskSeparate should be 12");
7204 static_assert(offsetof(StencilMaskSeparate
, header
) == 0,
7205 "offset of StencilMaskSeparate header should be 0");
7206 static_assert(offsetof(StencilMaskSeparate
, face
) == 4,
7207 "offset of StencilMaskSeparate face should be 4");
7208 static_assert(offsetof(StencilMaskSeparate
, mask
) == 8,
7209 "offset of StencilMaskSeparate mask should be 8");
7212 typedef StencilOp ValueType
;
7213 static const CommandId kCmdId
= kStencilOp
;
7214 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7215 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7217 static uint32_t ComputeSize() {
7218 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7221 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7223 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7230 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7231 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
7232 return NextCmdAddress
<ValueType
>(cmd
);
7235 gpu::CommandHeader header
;
7241 static_assert(sizeof(StencilOp
) == 16, "size of StencilOp should be 16");
7242 static_assert(offsetof(StencilOp
, header
) == 0,
7243 "offset of StencilOp header should be 0");
7244 static_assert(offsetof(StencilOp
, fail
) == 4,
7245 "offset of StencilOp fail should be 4");
7246 static_assert(offsetof(StencilOp
, zfail
) == 8,
7247 "offset of StencilOp zfail should be 8");
7248 static_assert(offsetof(StencilOp
, zpass
) == 12,
7249 "offset of StencilOp zpass should be 12");
7251 struct StencilOpSeparate
{
7252 typedef StencilOpSeparate ValueType
;
7253 static const CommandId kCmdId
= kStencilOpSeparate
;
7254 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7255 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7257 static uint32_t ComputeSize() {
7258 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7261 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7263 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7271 void* Set(void* cmd
,
7276 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
7277 return NextCmdAddress
<ValueType
>(cmd
);
7280 gpu::CommandHeader header
;
7287 static_assert(sizeof(StencilOpSeparate
) == 20,
7288 "size of StencilOpSeparate should be 20");
7289 static_assert(offsetof(StencilOpSeparate
, header
) == 0,
7290 "offset of StencilOpSeparate header should be 0");
7291 static_assert(offsetof(StencilOpSeparate
, face
) == 4,
7292 "offset of StencilOpSeparate face should be 4");
7293 static_assert(offsetof(StencilOpSeparate
, fail
) == 8,
7294 "offset of StencilOpSeparate fail should be 8");
7295 static_assert(offsetof(StencilOpSeparate
, zfail
) == 12,
7296 "offset of StencilOpSeparate zfail should be 12");
7297 static_assert(offsetof(StencilOpSeparate
, zpass
) == 16,
7298 "offset of StencilOpSeparate zpass should be 16");
7301 typedef TexImage2D ValueType
;
7302 static const CommandId kCmdId
= kTexImage2D
;
7303 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7304 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7306 static uint32_t ComputeSize() {
7307 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7310 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7312 void Init(GLenum _target
,
7314 GLint _internalformat
,
7319 uint32_t _pixels_shm_id
,
7320 uint32_t _pixels_shm_offset
) {
7324 internalformat
= _internalformat
;
7329 pixels_shm_id
= _pixels_shm_id
;
7330 pixels_shm_offset
= _pixels_shm_offset
;
7333 void* Set(void* cmd
,
7336 GLint _internalformat
,
7341 uint32_t _pixels_shm_id
,
7342 uint32_t _pixels_shm_offset
) {
7343 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7344 _height
, _format
, _type
, _pixels_shm_id
,
7345 _pixels_shm_offset
);
7346 return NextCmdAddress
<ValueType
>(cmd
);
7349 gpu::CommandHeader header
;
7352 int32_t internalformat
;
7357 uint32_t pixels_shm_id
;
7358 uint32_t pixels_shm_offset
;
7359 static const int32_t border
= 0;
7362 static_assert(sizeof(TexImage2D
) == 40, "size of TexImage2D should be 40");
7363 static_assert(offsetof(TexImage2D
, header
) == 0,
7364 "offset of TexImage2D header should be 0");
7365 static_assert(offsetof(TexImage2D
, target
) == 4,
7366 "offset of TexImage2D target should be 4");
7367 static_assert(offsetof(TexImage2D
, level
) == 8,
7368 "offset of TexImage2D level should be 8");
7369 static_assert(offsetof(TexImage2D
, internalformat
) == 12,
7370 "offset of TexImage2D internalformat should be 12");
7371 static_assert(offsetof(TexImage2D
, width
) == 16,
7372 "offset of TexImage2D width should be 16");
7373 static_assert(offsetof(TexImage2D
, height
) == 20,
7374 "offset of TexImage2D height should be 20");
7375 static_assert(offsetof(TexImage2D
, format
) == 24,
7376 "offset of TexImage2D format should be 24");
7377 static_assert(offsetof(TexImage2D
, type
) == 28,
7378 "offset of TexImage2D type should be 28");
7379 static_assert(offsetof(TexImage2D
, pixels_shm_id
) == 32,
7380 "offset of TexImage2D pixels_shm_id should be 32");
7381 static_assert(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
7382 "offset of TexImage2D pixels_shm_offset should be 36");
7385 typedef TexImage3D ValueType
;
7386 static const CommandId kCmdId
= kTexImage3D
;
7387 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7388 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7390 static uint32_t ComputeSize() {
7391 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7394 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7396 void Init(GLenum _target
,
7398 GLint _internalformat
,
7404 uint32_t _pixels_shm_id
,
7405 uint32_t _pixels_shm_offset
) {
7409 internalformat
= _internalformat
;
7415 pixels_shm_id
= _pixels_shm_id
;
7416 pixels_shm_offset
= _pixels_shm_offset
;
7419 void* Set(void* cmd
,
7422 GLint _internalformat
,
7428 uint32_t _pixels_shm_id
,
7429 uint32_t _pixels_shm_offset
) {
7430 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7431 _height
, _depth
, _format
, _type
,
7432 _pixels_shm_id
, _pixels_shm_offset
);
7433 return NextCmdAddress
<ValueType
>(cmd
);
7436 gpu::CommandHeader header
;
7439 int32_t internalformat
;
7445 uint32_t pixels_shm_id
;
7446 uint32_t pixels_shm_offset
;
7447 static const int32_t border
= 0;
7450 static_assert(sizeof(TexImage3D
) == 44, "size of TexImage3D should be 44");
7451 static_assert(offsetof(TexImage3D
, header
) == 0,
7452 "offset of TexImage3D header should be 0");
7453 static_assert(offsetof(TexImage3D
, target
) == 4,
7454 "offset of TexImage3D target should be 4");
7455 static_assert(offsetof(TexImage3D
, level
) == 8,
7456 "offset of TexImage3D level should be 8");
7457 static_assert(offsetof(TexImage3D
, internalformat
) == 12,
7458 "offset of TexImage3D internalformat should be 12");
7459 static_assert(offsetof(TexImage3D
, width
) == 16,
7460 "offset of TexImage3D width should be 16");
7461 static_assert(offsetof(TexImage3D
, height
) == 20,
7462 "offset of TexImage3D height should be 20");
7463 static_assert(offsetof(TexImage3D
, depth
) == 24,
7464 "offset of TexImage3D depth should be 24");
7465 static_assert(offsetof(TexImage3D
, format
) == 28,
7466 "offset of TexImage3D format should be 28");
7467 static_assert(offsetof(TexImage3D
, type
) == 32,
7468 "offset of TexImage3D type should be 32");
7469 static_assert(offsetof(TexImage3D
, pixels_shm_id
) == 36,
7470 "offset of TexImage3D pixels_shm_id should be 36");
7471 static_assert(offsetof(TexImage3D
, pixels_shm_offset
) == 40,
7472 "offset of TexImage3D pixels_shm_offset should be 40");
7474 struct TexParameterf
{
7475 typedef TexParameterf ValueType
;
7476 static const CommandId kCmdId
= kTexParameterf
;
7477 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7478 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7480 static uint32_t ComputeSize() {
7481 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7484 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7486 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
7493 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
7494 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7495 return NextCmdAddress
<ValueType
>(cmd
);
7498 gpu::CommandHeader header
;
7504 static_assert(sizeof(TexParameterf
) == 16,
7505 "size of TexParameterf should be 16");
7506 static_assert(offsetof(TexParameterf
, header
) == 0,
7507 "offset of TexParameterf header should be 0");
7508 static_assert(offsetof(TexParameterf
, target
) == 4,
7509 "offset of TexParameterf target should be 4");
7510 static_assert(offsetof(TexParameterf
, pname
) == 8,
7511 "offset of TexParameterf pname should be 8");
7512 static_assert(offsetof(TexParameterf
, param
) == 12,
7513 "offset of TexParameterf param should be 12");
7515 struct TexParameterfvImmediate
{
7516 typedef TexParameterfvImmediate ValueType
;
7517 static const CommandId kCmdId
= kTexParameterfvImmediate
;
7518 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7519 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7521 static uint32_t ComputeDataSize() {
7522 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
7525 static uint32_t ComputeSize() {
7526 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7529 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7531 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7535 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7538 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7539 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7540 const uint32_t size
= ComputeSize();
7541 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7544 gpu::CommandHeader header
;
7549 static_assert(sizeof(TexParameterfvImmediate
) == 12,
7550 "size of TexParameterfvImmediate should be 12");
7551 static_assert(offsetof(TexParameterfvImmediate
, header
) == 0,
7552 "offset of TexParameterfvImmediate header should be 0");
7553 static_assert(offsetof(TexParameterfvImmediate
, target
) == 4,
7554 "offset of TexParameterfvImmediate target should be 4");
7555 static_assert(offsetof(TexParameterfvImmediate
, pname
) == 8,
7556 "offset of TexParameterfvImmediate pname should be 8");
7558 struct TexParameteri
{
7559 typedef TexParameteri ValueType
;
7560 static const CommandId kCmdId
= kTexParameteri
;
7561 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7562 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7564 static uint32_t ComputeSize() {
7565 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7568 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7570 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
7577 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
7578 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7579 return NextCmdAddress
<ValueType
>(cmd
);
7582 gpu::CommandHeader header
;
7588 static_assert(sizeof(TexParameteri
) == 16,
7589 "size of TexParameteri should be 16");
7590 static_assert(offsetof(TexParameteri
, header
) == 0,
7591 "offset of TexParameteri header should be 0");
7592 static_assert(offsetof(TexParameteri
, target
) == 4,
7593 "offset of TexParameteri target should be 4");
7594 static_assert(offsetof(TexParameteri
, pname
) == 8,
7595 "offset of TexParameteri pname should be 8");
7596 static_assert(offsetof(TexParameteri
, param
) == 12,
7597 "offset of TexParameteri param should be 12");
7599 struct TexParameterivImmediate
{
7600 typedef TexParameterivImmediate ValueType
;
7601 static const CommandId kCmdId
= kTexParameterivImmediate
;
7602 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7603 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7605 static uint32_t ComputeDataSize() {
7606 return static_cast<uint32_t>(sizeof(GLint
) * 1);
7609 static uint32_t ComputeSize() {
7610 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7613 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7615 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7619 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7622 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7623 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7624 const uint32_t size
= ComputeSize();
7625 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7628 gpu::CommandHeader header
;
7633 static_assert(sizeof(TexParameterivImmediate
) == 12,
7634 "size of TexParameterivImmediate should be 12");
7635 static_assert(offsetof(TexParameterivImmediate
, header
) == 0,
7636 "offset of TexParameterivImmediate header should be 0");
7637 static_assert(offsetof(TexParameterivImmediate
, target
) == 4,
7638 "offset of TexParameterivImmediate target should be 4");
7639 static_assert(offsetof(TexParameterivImmediate
, pname
) == 8,
7640 "offset of TexParameterivImmediate pname should be 8");
7642 struct TexStorage3D
{
7643 typedef TexStorage3D ValueType
;
7644 static const CommandId kCmdId
= kTexStorage3D
;
7645 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7646 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7648 static uint32_t ComputeSize() {
7649 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7652 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7654 void Init(GLenum _target
,
7656 GLenum _internalFormat
,
7663 internalFormat
= _internalFormat
;
7669 void* Set(void* cmd
,
7672 GLenum _internalFormat
,
7676 static_cast<ValueType
*>(cmd
)
7677 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
, _depth
);
7678 return NextCmdAddress
<ValueType
>(cmd
);
7681 gpu::CommandHeader header
;
7684 uint32_t internalFormat
;
7690 static_assert(sizeof(TexStorage3D
) == 28, "size of TexStorage3D should be 28");
7691 static_assert(offsetof(TexStorage3D
, header
) == 0,
7692 "offset of TexStorage3D header should be 0");
7693 static_assert(offsetof(TexStorage3D
, target
) == 4,
7694 "offset of TexStorage3D target should be 4");
7695 static_assert(offsetof(TexStorage3D
, levels
) == 8,
7696 "offset of TexStorage3D levels should be 8");
7697 static_assert(offsetof(TexStorage3D
, internalFormat
) == 12,
7698 "offset of TexStorage3D internalFormat should be 12");
7699 static_assert(offsetof(TexStorage3D
, width
) == 16,
7700 "offset of TexStorage3D width should be 16");
7701 static_assert(offsetof(TexStorage3D
, height
) == 20,
7702 "offset of TexStorage3D height should be 20");
7703 static_assert(offsetof(TexStorage3D
, depth
) == 24,
7704 "offset of TexStorage3D depth should be 24");
7706 struct TexSubImage2D
{
7707 typedef TexSubImage2D ValueType
;
7708 static const CommandId kCmdId
= kTexSubImage2D
;
7709 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7710 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7712 static uint32_t ComputeSize() {
7713 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7716 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7718 void Init(GLenum _target
,
7726 uint32_t _pixels_shm_id
,
7727 uint32_t _pixels_shm_offset
,
7728 GLboolean _internal
) {
7738 pixels_shm_id
= _pixels_shm_id
;
7739 pixels_shm_offset
= _pixels_shm_offset
;
7740 internal
= _internal
;
7743 void* Set(void* cmd
,
7752 uint32_t _pixels_shm_id
,
7753 uint32_t _pixels_shm_offset
,
7754 GLboolean _internal
) {
7755 static_cast<ValueType
*>(cmd
)
7756 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
7757 _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7758 return NextCmdAddress
<ValueType
>(cmd
);
7761 gpu::CommandHeader header
;
7770 uint32_t pixels_shm_id
;
7771 uint32_t pixels_shm_offset
;
7775 static_assert(sizeof(TexSubImage2D
) == 48,
7776 "size of TexSubImage2D should be 48");
7777 static_assert(offsetof(TexSubImage2D
, header
) == 0,
7778 "offset of TexSubImage2D header should be 0");
7779 static_assert(offsetof(TexSubImage2D
, target
) == 4,
7780 "offset of TexSubImage2D target should be 4");
7781 static_assert(offsetof(TexSubImage2D
, level
) == 8,
7782 "offset of TexSubImage2D level should be 8");
7783 static_assert(offsetof(TexSubImage2D
, xoffset
) == 12,
7784 "offset of TexSubImage2D xoffset should be 12");
7785 static_assert(offsetof(TexSubImage2D
, yoffset
) == 16,
7786 "offset of TexSubImage2D yoffset should be 16");
7787 static_assert(offsetof(TexSubImage2D
, width
) == 20,
7788 "offset of TexSubImage2D width should be 20");
7789 static_assert(offsetof(TexSubImage2D
, height
) == 24,
7790 "offset of TexSubImage2D height should be 24");
7791 static_assert(offsetof(TexSubImage2D
, format
) == 28,
7792 "offset of TexSubImage2D format should be 28");
7793 static_assert(offsetof(TexSubImage2D
, type
) == 32,
7794 "offset of TexSubImage2D type should be 32");
7795 static_assert(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
7796 "offset of TexSubImage2D pixels_shm_id should be 36");
7797 static_assert(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
7798 "offset of TexSubImage2D pixels_shm_offset should be 40");
7799 static_assert(offsetof(TexSubImage2D
, internal
) == 44,
7800 "offset of TexSubImage2D internal should be 44");
7802 struct TexSubImage3D
{
7803 typedef TexSubImage3D ValueType
;
7804 static const CommandId kCmdId
= kTexSubImage3D
;
7805 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7806 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7808 static uint32_t ComputeSize() {
7809 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7812 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7814 void Init(GLenum _target
,
7824 uint32_t _pixels_shm_id
,
7825 uint32_t _pixels_shm_offset
,
7826 GLboolean _internal
) {
7838 pixels_shm_id
= _pixels_shm_id
;
7839 pixels_shm_offset
= _pixels_shm_offset
;
7840 internal
= _internal
;
7843 void* Set(void* cmd
,
7854 uint32_t _pixels_shm_id
,
7855 uint32_t _pixels_shm_offset
,
7856 GLboolean _internal
) {
7857 static_cast<ValueType
*>(cmd
)->Init(
7858 _target
, _level
, _xoffset
, _yoffset
, _zoffset
, _width
, _height
, _depth
,
7859 _format
, _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7860 return NextCmdAddress
<ValueType
>(cmd
);
7863 gpu::CommandHeader header
;
7874 uint32_t pixels_shm_id
;
7875 uint32_t pixels_shm_offset
;
7879 static_assert(sizeof(TexSubImage3D
) == 56,
7880 "size of TexSubImage3D should be 56");
7881 static_assert(offsetof(TexSubImage3D
, header
) == 0,
7882 "offset of TexSubImage3D header should be 0");
7883 static_assert(offsetof(TexSubImage3D
, target
) == 4,
7884 "offset of TexSubImage3D target should be 4");
7885 static_assert(offsetof(TexSubImage3D
, level
) == 8,
7886 "offset of TexSubImage3D level should be 8");
7887 static_assert(offsetof(TexSubImage3D
, xoffset
) == 12,
7888 "offset of TexSubImage3D xoffset should be 12");
7889 static_assert(offsetof(TexSubImage3D
, yoffset
) == 16,
7890 "offset of TexSubImage3D yoffset should be 16");
7891 static_assert(offsetof(TexSubImage3D
, zoffset
) == 20,
7892 "offset of TexSubImage3D zoffset should be 20");
7893 static_assert(offsetof(TexSubImage3D
, width
) == 24,
7894 "offset of TexSubImage3D width should be 24");
7895 static_assert(offsetof(TexSubImage3D
, height
) == 28,
7896 "offset of TexSubImage3D height should be 28");
7897 static_assert(offsetof(TexSubImage3D
, depth
) == 32,
7898 "offset of TexSubImage3D depth should be 32");
7899 static_assert(offsetof(TexSubImage3D
, format
) == 36,
7900 "offset of TexSubImage3D format should be 36");
7901 static_assert(offsetof(TexSubImage3D
, type
) == 40,
7902 "offset of TexSubImage3D type should be 40");
7903 static_assert(offsetof(TexSubImage3D
, pixels_shm_id
) == 44,
7904 "offset of TexSubImage3D pixels_shm_id should be 44");
7905 static_assert(offsetof(TexSubImage3D
, pixels_shm_offset
) == 48,
7906 "offset of TexSubImage3D pixels_shm_offset should be 48");
7907 static_assert(offsetof(TexSubImage3D
, internal
) == 52,
7908 "offset of TexSubImage3D internal should be 52");
7910 struct TransformFeedbackVaryingsBucket
{
7911 typedef TransformFeedbackVaryingsBucket ValueType
;
7912 static const CommandId kCmdId
= kTransformFeedbackVaryingsBucket
;
7913 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7914 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7916 static uint32_t ComputeSize() {
7917 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7920 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7922 void Init(GLuint _program
, uint32_t _varyings_bucket_id
, GLenum _buffermode
) {
7925 varyings_bucket_id
= _varyings_bucket_id
;
7926 buffermode
= _buffermode
;
7929 void* Set(void* cmd
,
7931 uint32_t _varyings_bucket_id
,
7932 GLenum _buffermode
) {
7933 static_cast<ValueType
*>(cmd
)
7934 ->Init(_program
, _varyings_bucket_id
, _buffermode
);
7935 return NextCmdAddress
<ValueType
>(cmd
);
7938 gpu::CommandHeader header
;
7940 uint32_t varyings_bucket_id
;
7941 uint32_t buffermode
;
7944 static_assert(sizeof(TransformFeedbackVaryingsBucket
) == 16,
7945 "size of TransformFeedbackVaryingsBucket should be 16");
7946 static_assert(offsetof(TransformFeedbackVaryingsBucket
, header
) == 0,
7947 "offset of TransformFeedbackVaryingsBucket header should be 0");
7948 static_assert(offsetof(TransformFeedbackVaryingsBucket
, program
) == 4,
7949 "offset of TransformFeedbackVaryingsBucket program should be 4");
7951 offsetof(TransformFeedbackVaryingsBucket
, varyings_bucket_id
) == 8,
7952 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
7954 offsetof(TransformFeedbackVaryingsBucket
, buffermode
) == 12,
7955 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
7958 typedef Uniform1f ValueType
;
7959 static const CommandId kCmdId
= kUniform1f
;
7960 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7961 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7963 static uint32_t ComputeSize() {
7964 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7967 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7969 void Init(GLint _location
, GLfloat _x
) {
7971 location
= _location
;
7975 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
7976 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7977 return NextCmdAddress
<ValueType
>(cmd
);
7980 gpu::CommandHeader header
;
7985 static_assert(sizeof(Uniform1f
) == 12, "size of Uniform1f should be 12");
7986 static_assert(offsetof(Uniform1f
, header
) == 0,
7987 "offset of Uniform1f header should be 0");
7988 static_assert(offsetof(Uniform1f
, location
) == 4,
7989 "offset of Uniform1f location should be 4");
7990 static_assert(offsetof(Uniform1f
, x
) == 8, "offset of Uniform1f x should be 8");
7992 struct Uniform1fvImmediate
{
7993 typedef Uniform1fvImmediate ValueType
;
7994 static const CommandId kCmdId
= kUniform1fvImmediate
;
7995 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7996 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7998 static uint32_t ComputeDataSize(GLsizei count
) {
7999 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
8002 static uint32_t ComputeSize(GLsizei count
) {
8003 return static_cast<uint32_t>(sizeof(ValueType
) +
8004 ComputeDataSize(count
)); // NOLINT
8007 void SetHeader(GLsizei count
) {
8008 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8011 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8013 location
= _location
;
8015 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8018 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8019 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8020 const uint32_t size
= ComputeSize(_count
);
8021 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8024 gpu::CommandHeader header
;
8029 static_assert(sizeof(Uniform1fvImmediate
) == 12,
8030 "size of Uniform1fvImmediate should be 12");
8031 static_assert(offsetof(Uniform1fvImmediate
, header
) == 0,
8032 "offset of Uniform1fvImmediate header should be 0");
8033 static_assert(offsetof(Uniform1fvImmediate
, location
) == 4,
8034 "offset of Uniform1fvImmediate location should be 4");
8035 static_assert(offsetof(Uniform1fvImmediate
, count
) == 8,
8036 "offset of Uniform1fvImmediate count should be 8");
8039 typedef Uniform1i ValueType
;
8040 static const CommandId kCmdId
= kUniform1i
;
8041 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8042 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8044 static uint32_t ComputeSize() {
8045 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8048 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8050 void Init(GLint _location
, GLint _x
) {
8052 location
= _location
;
8056 void* Set(void* cmd
, GLint _location
, GLint _x
) {
8057 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
8058 return NextCmdAddress
<ValueType
>(cmd
);
8061 gpu::CommandHeader header
;
8066 static_assert(sizeof(Uniform1i
) == 12, "size of Uniform1i should be 12");
8067 static_assert(offsetof(Uniform1i
, header
) == 0,
8068 "offset of Uniform1i header should be 0");
8069 static_assert(offsetof(Uniform1i
, location
) == 4,
8070 "offset of Uniform1i location should be 4");
8071 static_assert(offsetof(Uniform1i
, x
) == 8, "offset of Uniform1i x should be 8");
8073 struct Uniform1ivImmediate
{
8074 typedef Uniform1ivImmediate ValueType
;
8075 static const CommandId kCmdId
= kUniform1ivImmediate
;
8076 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8077 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8079 static uint32_t ComputeDataSize(GLsizei count
) {
8080 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
8083 static uint32_t ComputeSize(GLsizei count
) {
8084 return static_cast<uint32_t>(sizeof(ValueType
) +
8085 ComputeDataSize(count
)); // NOLINT
8088 void SetHeader(GLsizei count
) {
8089 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8092 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8094 location
= _location
;
8096 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8099 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8100 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8101 const uint32_t size
= ComputeSize(_count
);
8102 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8105 gpu::CommandHeader header
;
8110 static_assert(sizeof(Uniform1ivImmediate
) == 12,
8111 "size of Uniform1ivImmediate should be 12");
8112 static_assert(offsetof(Uniform1ivImmediate
, header
) == 0,
8113 "offset of Uniform1ivImmediate header should be 0");
8114 static_assert(offsetof(Uniform1ivImmediate
, location
) == 4,
8115 "offset of Uniform1ivImmediate location should be 4");
8116 static_assert(offsetof(Uniform1ivImmediate
, count
) == 8,
8117 "offset of Uniform1ivImmediate count should be 8");
8120 typedef Uniform1ui ValueType
;
8121 static const CommandId kCmdId
= kUniform1ui
;
8122 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8123 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8125 static uint32_t ComputeSize() {
8126 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8129 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8131 void Init(GLint _location
, GLuint _x
) {
8133 location
= _location
;
8137 void* Set(void* cmd
, GLint _location
, GLuint _x
) {
8138 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
8139 return NextCmdAddress
<ValueType
>(cmd
);
8142 gpu::CommandHeader header
;
8147 static_assert(sizeof(Uniform1ui
) == 12, "size of Uniform1ui should be 12");
8148 static_assert(offsetof(Uniform1ui
, header
) == 0,
8149 "offset of Uniform1ui header should be 0");
8150 static_assert(offsetof(Uniform1ui
, location
) == 4,
8151 "offset of Uniform1ui location should be 4");
8152 static_assert(offsetof(Uniform1ui
, x
) == 8,
8153 "offset of Uniform1ui x should be 8");
8155 struct Uniform1uivImmediate
{
8156 typedef Uniform1uivImmediate ValueType
;
8157 static const CommandId kCmdId
= kUniform1uivImmediate
;
8158 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8159 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8161 static uint32_t ComputeDataSize(GLsizei count
) {
8162 return static_cast<uint32_t>(sizeof(GLuint
) * 1 * count
); // NOLINT
8165 static uint32_t ComputeSize(GLsizei count
) {
8166 return static_cast<uint32_t>(sizeof(ValueType
) +
8167 ComputeDataSize(count
)); // NOLINT
8170 void SetHeader(GLsizei count
) {
8171 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8174 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8176 location
= _location
;
8178 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8181 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8182 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8183 const uint32_t size
= ComputeSize(_count
);
8184 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8187 gpu::CommandHeader header
;
8192 static_assert(sizeof(Uniform1uivImmediate
) == 12,
8193 "size of Uniform1uivImmediate should be 12");
8194 static_assert(offsetof(Uniform1uivImmediate
, header
) == 0,
8195 "offset of Uniform1uivImmediate header should be 0");
8196 static_assert(offsetof(Uniform1uivImmediate
, location
) == 4,
8197 "offset of Uniform1uivImmediate location should be 4");
8198 static_assert(offsetof(Uniform1uivImmediate
, count
) == 8,
8199 "offset of Uniform1uivImmediate count should be 8");
8202 typedef Uniform2f ValueType
;
8203 static const CommandId kCmdId
= kUniform2f
;
8204 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8205 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8207 static uint32_t ComputeSize() {
8208 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8211 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8213 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
8215 location
= _location
;
8220 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
8221 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8222 return NextCmdAddress
<ValueType
>(cmd
);
8225 gpu::CommandHeader header
;
8231 static_assert(sizeof(Uniform2f
) == 16, "size of Uniform2f should be 16");
8232 static_assert(offsetof(Uniform2f
, header
) == 0,
8233 "offset of Uniform2f header should be 0");
8234 static_assert(offsetof(Uniform2f
, location
) == 4,
8235 "offset of Uniform2f location should be 4");
8236 static_assert(offsetof(Uniform2f
, x
) == 8, "offset of Uniform2f x should be 8");
8237 static_assert(offsetof(Uniform2f
, y
) == 12,
8238 "offset of Uniform2f y should be 12");
8240 struct Uniform2fvImmediate
{
8241 typedef Uniform2fvImmediate ValueType
;
8242 static const CommandId kCmdId
= kUniform2fvImmediate
;
8243 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8244 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8246 static uint32_t ComputeDataSize(GLsizei count
) {
8247 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
8250 static uint32_t ComputeSize(GLsizei count
) {
8251 return static_cast<uint32_t>(sizeof(ValueType
) +
8252 ComputeDataSize(count
)); // NOLINT
8255 void SetHeader(GLsizei count
) {
8256 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8259 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8261 location
= _location
;
8263 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8266 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8267 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8268 const uint32_t size
= ComputeSize(_count
);
8269 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8272 gpu::CommandHeader header
;
8277 static_assert(sizeof(Uniform2fvImmediate
) == 12,
8278 "size of Uniform2fvImmediate should be 12");
8279 static_assert(offsetof(Uniform2fvImmediate
, header
) == 0,
8280 "offset of Uniform2fvImmediate header should be 0");
8281 static_assert(offsetof(Uniform2fvImmediate
, location
) == 4,
8282 "offset of Uniform2fvImmediate location should be 4");
8283 static_assert(offsetof(Uniform2fvImmediate
, count
) == 8,
8284 "offset of Uniform2fvImmediate count should be 8");
8287 typedef Uniform2i ValueType
;
8288 static const CommandId kCmdId
= kUniform2i
;
8289 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8290 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8292 static uint32_t ComputeSize() {
8293 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8296 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8298 void Init(GLint _location
, GLint _x
, GLint _y
) {
8300 location
= _location
;
8305 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
8306 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8307 return NextCmdAddress
<ValueType
>(cmd
);
8310 gpu::CommandHeader header
;
8316 static_assert(sizeof(Uniform2i
) == 16, "size of Uniform2i should be 16");
8317 static_assert(offsetof(Uniform2i
, header
) == 0,
8318 "offset of Uniform2i header should be 0");
8319 static_assert(offsetof(Uniform2i
, location
) == 4,
8320 "offset of Uniform2i location should be 4");
8321 static_assert(offsetof(Uniform2i
, x
) == 8, "offset of Uniform2i x should be 8");
8322 static_assert(offsetof(Uniform2i
, y
) == 12,
8323 "offset of Uniform2i y should be 12");
8325 struct Uniform2ivImmediate
{
8326 typedef Uniform2ivImmediate ValueType
;
8327 static const CommandId kCmdId
= kUniform2ivImmediate
;
8328 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8329 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8331 static uint32_t ComputeDataSize(GLsizei count
) {
8332 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
8335 static uint32_t ComputeSize(GLsizei count
) {
8336 return static_cast<uint32_t>(sizeof(ValueType
) +
8337 ComputeDataSize(count
)); // NOLINT
8340 void SetHeader(GLsizei count
) {
8341 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8344 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8346 location
= _location
;
8348 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8351 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8352 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8353 const uint32_t size
= ComputeSize(_count
);
8354 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8357 gpu::CommandHeader header
;
8362 static_assert(sizeof(Uniform2ivImmediate
) == 12,
8363 "size of Uniform2ivImmediate should be 12");
8364 static_assert(offsetof(Uniform2ivImmediate
, header
) == 0,
8365 "offset of Uniform2ivImmediate header should be 0");
8366 static_assert(offsetof(Uniform2ivImmediate
, location
) == 4,
8367 "offset of Uniform2ivImmediate location should be 4");
8368 static_assert(offsetof(Uniform2ivImmediate
, count
) == 8,
8369 "offset of Uniform2ivImmediate count should be 8");
8372 typedef Uniform2ui ValueType
;
8373 static const CommandId kCmdId
= kUniform2ui
;
8374 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8377 static uint32_t ComputeSize() {
8378 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8381 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8383 void Init(GLint _location
, GLuint _x
, GLuint _y
) {
8385 location
= _location
;
8390 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
) {
8391 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8392 return NextCmdAddress
<ValueType
>(cmd
);
8395 gpu::CommandHeader header
;
8401 static_assert(sizeof(Uniform2ui
) == 16, "size of Uniform2ui should be 16");
8402 static_assert(offsetof(Uniform2ui
, header
) == 0,
8403 "offset of Uniform2ui header should be 0");
8404 static_assert(offsetof(Uniform2ui
, location
) == 4,
8405 "offset of Uniform2ui location should be 4");
8406 static_assert(offsetof(Uniform2ui
, x
) == 8,
8407 "offset of Uniform2ui x should be 8");
8408 static_assert(offsetof(Uniform2ui
, y
) == 12,
8409 "offset of Uniform2ui y should be 12");
8411 struct Uniform2uivImmediate
{
8412 typedef Uniform2uivImmediate ValueType
;
8413 static const CommandId kCmdId
= kUniform2uivImmediate
;
8414 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8415 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8417 static uint32_t ComputeDataSize(GLsizei count
) {
8418 return static_cast<uint32_t>(sizeof(GLuint
) * 2 * count
); // NOLINT
8421 static uint32_t ComputeSize(GLsizei count
) {
8422 return static_cast<uint32_t>(sizeof(ValueType
) +
8423 ComputeDataSize(count
)); // NOLINT
8426 void SetHeader(GLsizei count
) {
8427 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8430 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8432 location
= _location
;
8434 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8437 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8438 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8439 const uint32_t size
= ComputeSize(_count
);
8440 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8443 gpu::CommandHeader header
;
8448 static_assert(sizeof(Uniform2uivImmediate
) == 12,
8449 "size of Uniform2uivImmediate should be 12");
8450 static_assert(offsetof(Uniform2uivImmediate
, header
) == 0,
8451 "offset of Uniform2uivImmediate header should be 0");
8452 static_assert(offsetof(Uniform2uivImmediate
, location
) == 4,
8453 "offset of Uniform2uivImmediate location should be 4");
8454 static_assert(offsetof(Uniform2uivImmediate
, count
) == 8,
8455 "offset of Uniform2uivImmediate count should be 8");
8458 typedef Uniform3f ValueType
;
8459 static const CommandId kCmdId
= kUniform3f
;
8460 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8461 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8463 static uint32_t ComputeSize() {
8464 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8467 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8469 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8471 location
= _location
;
8477 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8478 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8479 return NextCmdAddress
<ValueType
>(cmd
);
8482 gpu::CommandHeader header
;
8489 static_assert(sizeof(Uniform3f
) == 20, "size of Uniform3f should be 20");
8490 static_assert(offsetof(Uniform3f
, header
) == 0,
8491 "offset of Uniform3f header should be 0");
8492 static_assert(offsetof(Uniform3f
, location
) == 4,
8493 "offset of Uniform3f location should be 4");
8494 static_assert(offsetof(Uniform3f
, x
) == 8, "offset of Uniform3f x should be 8");
8495 static_assert(offsetof(Uniform3f
, y
) == 12,
8496 "offset of Uniform3f y should be 12");
8497 static_assert(offsetof(Uniform3f
, z
) == 16,
8498 "offset of Uniform3f z should be 16");
8500 struct Uniform3fvImmediate
{
8501 typedef Uniform3fvImmediate ValueType
;
8502 static const CommandId kCmdId
= kUniform3fvImmediate
;
8503 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8504 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8506 static uint32_t ComputeDataSize(GLsizei count
) {
8507 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
8510 static uint32_t ComputeSize(GLsizei count
) {
8511 return static_cast<uint32_t>(sizeof(ValueType
) +
8512 ComputeDataSize(count
)); // NOLINT
8515 void SetHeader(GLsizei count
) {
8516 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8519 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8521 location
= _location
;
8523 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8526 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8527 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8528 const uint32_t size
= ComputeSize(_count
);
8529 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8532 gpu::CommandHeader header
;
8537 static_assert(sizeof(Uniform3fvImmediate
) == 12,
8538 "size of Uniform3fvImmediate should be 12");
8539 static_assert(offsetof(Uniform3fvImmediate
, header
) == 0,
8540 "offset of Uniform3fvImmediate header should be 0");
8541 static_assert(offsetof(Uniform3fvImmediate
, location
) == 4,
8542 "offset of Uniform3fvImmediate location should be 4");
8543 static_assert(offsetof(Uniform3fvImmediate
, count
) == 8,
8544 "offset of Uniform3fvImmediate count should be 8");
8547 typedef Uniform3i ValueType
;
8548 static const CommandId kCmdId
= kUniform3i
;
8549 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8550 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8552 static uint32_t ComputeSize() {
8553 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8556 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8558 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8560 location
= _location
;
8566 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8567 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8568 return NextCmdAddress
<ValueType
>(cmd
);
8571 gpu::CommandHeader header
;
8578 static_assert(sizeof(Uniform3i
) == 20, "size of Uniform3i should be 20");
8579 static_assert(offsetof(Uniform3i
, header
) == 0,
8580 "offset of Uniform3i header should be 0");
8581 static_assert(offsetof(Uniform3i
, location
) == 4,
8582 "offset of Uniform3i location should be 4");
8583 static_assert(offsetof(Uniform3i
, x
) == 8, "offset of Uniform3i x should be 8");
8584 static_assert(offsetof(Uniform3i
, y
) == 12,
8585 "offset of Uniform3i y should be 12");
8586 static_assert(offsetof(Uniform3i
, z
) == 16,
8587 "offset of Uniform3i z should be 16");
8589 struct Uniform3ivImmediate
{
8590 typedef Uniform3ivImmediate ValueType
;
8591 static const CommandId kCmdId
= kUniform3ivImmediate
;
8592 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8593 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8595 static uint32_t ComputeDataSize(GLsizei count
) {
8596 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
8599 static uint32_t ComputeSize(GLsizei count
) {
8600 return static_cast<uint32_t>(sizeof(ValueType
) +
8601 ComputeDataSize(count
)); // NOLINT
8604 void SetHeader(GLsizei count
) {
8605 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8608 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8610 location
= _location
;
8612 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8615 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8616 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8617 const uint32_t size
= ComputeSize(_count
);
8618 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8621 gpu::CommandHeader header
;
8626 static_assert(sizeof(Uniform3ivImmediate
) == 12,
8627 "size of Uniform3ivImmediate should be 12");
8628 static_assert(offsetof(Uniform3ivImmediate
, header
) == 0,
8629 "offset of Uniform3ivImmediate header should be 0");
8630 static_assert(offsetof(Uniform3ivImmediate
, location
) == 4,
8631 "offset of Uniform3ivImmediate location should be 4");
8632 static_assert(offsetof(Uniform3ivImmediate
, count
) == 8,
8633 "offset of Uniform3ivImmediate count should be 8");
8636 typedef Uniform3ui ValueType
;
8637 static const CommandId kCmdId
= kUniform3ui
;
8638 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8639 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8641 static uint32_t ComputeSize() {
8642 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8645 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8647 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8649 location
= _location
;
8655 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8656 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8657 return NextCmdAddress
<ValueType
>(cmd
);
8660 gpu::CommandHeader header
;
8667 static_assert(sizeof(Uniform3ui
) == 20, "size of Uniform3ui should be 20");
8668 static_assert(offsetof(Uniform3ui
, header
) == 0,
8669 "offset of Uniform3ui header should be 0");
8670 static_assert(offsetof(Uniform3ui
, location
) == 4,
8671 "offset of Uniform3ui location should be 4");
8672 static_assert(offsetof(Uniform3ui
, x
) == 8,
8673 "offset of Uniform3ui x should be 8");
8674 static_assert(offsetof(Uniform3ui
, y
) == 12,
8675 "offset of Uniform3ui y should be 12");
8676 static_assert(offsetof(Uniform3ui
, z
) == 16,
8677 "offset of Uniform3ui z should be 16");
8679 struct Uniform3uivImmediate
{
8680 typedef Uniform3uivImmediate ValueType
;
8681 static const CommandId kCmdId
= kUniform3uivImmediate
;
8682 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8683 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8685 static uint32_t ComputeDataSize(GLsizei count
) {
8686 return static_cast<uint32_t>(sizeof(GLuint
) * 3 * count
); // NOLINT
8689 static uint32_t ComputeSize(GLsizei count
) {
8690 return static_cast<uint32_t>(sizeof(ValueType
) +
8691 ComputeDataSize(count
)); // NOLINT
8694 void SetHeader(GLsizei count
) {
8695 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8698 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8700 location
= _location
;
8702 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8705 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8706 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8707 const uint32_t size
= ComputeSize(_count
);
8708 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8711 gpu::CommandHeader header
;
8716 static_assert(sizeof(Uniform3uivImmediate
) == 12,
8717 "size of Uniform3uivImmediate should be 12");
8718 static_assert(offsetof(Uniform3uivImmediate
, header
) == 0,
8719 "offset of Uniform3uivImmediate header should be 0");
8720 static_assert(offsetof(Uniform3uivImmediate
, location
) == 4,
8721 "offset of Uniform3uivImmediate location should be 4");
8722 static_assert(offsetof(Uniform3uivImmediate
, count
) == 8,
8723 "offset of Uniform3uivImmediate count should be 8");
8726 typedef Uniform4f ValueType
;
8727 static const CommandId kCmdId
= kUniform4f
;
8728 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8729 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8731 static uint32_t ComputeSize() {
8732 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8735 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8737 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
8739 location
= _location
;
8746 void* Set(void* cmd
,
8752 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8753 return NextCmdAddress
<ValueType
>(cmd
);
8756 gpu::CommandHeader header
;
8764 static_assert(sizeof(Uniform4f
) == 24, "size of Uniform4f should be 24");
8765 static_assert(offsetof(Uniform4f
, header
) == 0,
8766 "offset of Uniform4f header should be 0");
8767 static_assert(offsetof(Uniform4f
, location
) == 4,
8768 "offset of Uniform4f location should be 4");
8769 static_assert(offsetof(Uniform4f
, x
) == 8, "offset of Uniform4f x should be 8");
8770 static_assert(offsetof(Uniform4f
, y
) == 12,
8771 "offset of Uniform4f y should be 12");
8772 static_assert(offsetof(Uniform4f
, z
) == 16,
8773 "offset of Uniform4f z should be 16");
8774 static_assert(offsetof(Uniform4f
, w
) == 20,
8775 "offset of Uniform4f w should be 20");
8777 struct Uniform4fvImmediate
{
8778 typedef Uniform4fvImmediate ValueType
;
8779 static const CommandId kCmdId
= kUniform4fvImmediate
;
8780 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8781 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8783 static uint32_t ComputeDataSize(GLsizei count
) {
8784 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
8787 static uint32_t ComputeSize(GLsizei count
) {
8788 return static_cast<uint32_t>(sizeof(ValueType
) +
8789 ComputeDataSize(count
)); // NOLINT
8792 void SetHeader(GLsizei count
) {
8793 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8796 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8798 location
= _location
;
8800 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8803 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8804 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8805 const uint32_t size
= ComputeSize(_count
);
8806 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8809 gpu::CommandHeader header
;
8814 static_assert(sizeof(Uniform4fvImmediate
) == 12,
8815 "size of Uniform4fvImmediate should be 12");
8816 static_assert(offsetof(Uniform4fvImmediate
, header
) == 0,
8817 "offset of Uniform4fvImmediate header should be 0");
8818 static_assert(offsetof(Uniform4fvImmediate
, location
) == 4,
8819 "offset of Uniform4fvImmediate location should be 4");
8820 static_assert(offsetof(Uniform4fvImmediate
, count
) == 8,
8821 "offset of Uniform4fvImmediate count should be 8");
8824 typedef Uniform4i ValueType
;
8825 static const CommandId kCmdId
= kUniform4i
;
8826 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8827 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8829 static uint32_t ComputeSize() {
8830 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8833 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8835 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
8837 location
= _location
;
8844 void* Set(void* cmd
,
8850 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8851 return NextCmdAddress
<ValueType
>(cmd
);
8854 gpu::CommandHeader header
;
8862 static_assert(sizeof(Uniform4i
) == 24, "size of Uniform4i should be 24");
8863 static_assert(offsetof(Uniform4i
, header
) == 0,
8864 "offset of Uniform4i header should be 0");
8865 static_assert(offsetof(Uniform4i
, location
) == 4,
8866 "offset of Uniform4i location should be 4");
8867 static_assert(offsetof(Uniform4i
, x
) == 8, "offset of Uniform4i x should be 8");
8868 static_assert(offsetof(Uniform4i
, y
) == 12,
8869 "offset of Uniform4i y should be 12");
8870 static_assert(offsetof(Uniform4i
, z
) == 16,
8871 "offset of Uniform4i z should be 16");
8872 static_assert(offsetof(Uniform4i
, w
) == 20,
8873 "offset of Uniform4i w should be 20");
8875 struct Uniform4ivImmediate
{
8876 typedef Uniform4ivImmediate ValueType
;
8877 static const CommandId kCmdId
= kUniform4ivImmediate
;
8878 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8879 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8881 static uint32_t ComputeDataSize(GLsizei count
) {
8882 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
8885 static uint32_t ComputeSize(GLsizei count
) {
8886 return static_cast<uint32_t>(sizeof(ValueType
) +
8887 ComputeDataSize(count
)); // NOLINT
8890 void SetHeader(GLsizei count
) {
8891 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8894 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8896 location
= _location
;
8898 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8901 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8902 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8903 const uint32_t size
= ComputeSize(_count
);
8904 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8907 gpu::CommandHeader header
;
8912 static_assert(sizeof(Uniform4ivImmediate
) == 12,
8913 "size of Uniform4ivImmediate should be 12");
8914 static_assert(offsetof(Uniform4ivImmediate
, header
) == 0,
8915 "offset of Uniform4ivImmediate header should be 0");
8916 static_assert(offsetof(Uniform4ivImmediate
, location
) == 4,
8917 "offset of Uniform4ivImmediate location should be 4");
8918 static_assert(offsetof(Uniform4ivImmediate
, count
) == 8,
8919 "offset of Uniform4ivImmediate count should be 8");
8922 typedef Uniform4ui ValueType
;
8923 static const CommandId kCmdId
= kUniform4ui
;
8924 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8925 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8927 static uint32_t ComputeSize() {
8928 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8931 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8933 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
8935 location
= _location
;
8942 void* Set(void* cmd
,
8948 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8949 return NextCmdAddress
<ValueType
>(cmd
);
8952 gpu::CommandHeader header
;
8960 static_assert(sizeof(Uniform4ui
) == 24, "size of Uniform4ui should be 24");
8961 static_assert(offsetof(Uniform4ui
, header
) == 0,
8962 "offset of Uniform4ui header should be 0");
8963 static_assert(offsetof(Uniform4ui
, location
) == 4,
8964 "offset of Uniform4ui location should be 4");
8965 static_assert(offsetof(Uniform4ui
, x
) == 8,
8966 "offset of Uniform4ui x should be 8");
8967 static_assert(offsetof(Uniform4ui
, y
) == 12,
8968 "offset of Uniform4ui y should be 12");
8969 static_assert(offsetof(Uniform4ui
, z
) == 16,
8970 "offset of Uniform4ui z should be 16");
8971 static_assert(offsetof(Uniform4ui
, w
) == 20,
8972 "offset of Uniform4ui w should be 20");
8974 struct Uniform4uivImmediate
{
8975 typedef Uniform4uivImmediate ValueType
;
8976 static const CommandId kCmdId
= kUniform4uivImmediate
;
8977 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8978 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8980 static uint32_t ComputeDataSize(GLsizei count
) {
8981 return static_cast<uint32_t>(sizeof(GLuint
) * 4 * count
); // NOLINT
8984 static uint32_t ComputeSize(GLsizei count
) {
8985 return static_cast<uint32_t>(sizeof(ValueType
) +
8986 ComputeDataSize(count
)); // NOLINT
8989 void SetHeader(GLsizei count
) {
8990 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8993 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8995 location
= _location
;
8997 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
9000 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
9001 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
9002 const uint32_t size
= ComputeSize(_count
);
9003 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9006 gpu::CommandHeader header
;
9011 static_assert(sizeof(Uniform4uivImmediate
) == 12,
9012 "size of Uniform4uivImmediate should be 12");
9013 static_assert(offsetof(Uniform4uivImmediate
, header
) == 0,
9014 "offset of Uniform4uivImmediate header should be 0");
9015 static_assert(offsetof(Uniform4uivImmediate
, location
) == 4,
9016 "offset of Uniform4uivImmediate location should be 4");
9017 static_assert(offsetof(Uniform4uivImmediate
, count
) == 8,
9018 "offset of Uniform4uivImmediate count should be 8");
9020 struct UniformBlockBinding
{
9021 typedef UniformBlockBinding ValueType
;
9022 static const CommandId kCmdId
= kUniformBlockBinding
;
9023 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9024 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9026 static uint32_t ComputeSize() {
9027 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9030 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9032 void Init(GLuint _program
, GLuint _index
, GLuint _binding
) {
9039 void* Set(void* cmd
, GLuint _program
, GLuint _index
, GLuint _binding
) {
9040 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _binding
);
9041 return NextCmdAddress
<ValueType
>(cmd
);
9044 gpu::CommandHeader header
;
9050 static_assert(sizeof(UniformBlockBinding
) == 16,
9051 "size of UniformBlockBinding should be 16");
9052 static_assert(offsetof(UniformBlockBinding
, header
) == 0,
9053 "offset of UniformBlockBinding header should be 0");
9054 static_assert(offsetof(UniformBlockBinding
, program
) == 4,
9055 "offset of UniformBlockBinding program should be 4");
9056 static_assert(offsetof(UniformBlockBinding
, index
) == 8,
9057 "offset of UniformBlockBinding index should be 8");
9058 static_assert(offsetof(UniformBlockBinding
, binding
) == 12,
9059 "offset of UniformBlockBinding binding should be 12");
9061 struct UniformMatrix2fvImmediate
{
9062 typedef UniformMatrix2fvImmediate ValueType
;
9063 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
9064 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9065 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9067 static uint32_t ComputeDataSize(GLsizei count
) {
9068 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
9071 static uint32_t ComputeSize(GLsizei count
) {
9072 return static_cast<uint32_t>(sizeof(ValueType
) +
9073 ComputeDataSize(count
)); // NOLINT
9076 void SetHeader(GLsizei count
) {
9077 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9080 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9082 location
= _location
;
9084 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9087 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9088 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9089 const uint32_t size
= ComputeSize(_count
);
9090 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9093 gpu::CommandHeader header
;
9096 static const uint32_t transpose
= false;
9099 static_assert(sizeof(UniformMatrix2fvImmediate
) == 12,
9100 "size of UniformMatrix2fvImmediate should be 12");
9101 static_assert(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
9102 "offset of UniformMatrix2fvImmediate header should be 0");
9103 static_assert(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
9104 "offset of UniformMatrix2fvImmediate location should be 4");
9105 static_assert(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
9106 "offset of UniformMatrix2fvImmediate count should be 8");
9108 struct UniformMatrix2x3fvImmediate
{
9109 typedef UniformMatrix2x3fvImmediate ValueType
;
9110 static const CommandId kCmdId
= kUniformMatrix2x3fvImmediate
;
9111 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9112 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9114 static uint32_t ComputeDataSize(GLsizei count
) {
9115 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
9118 static uint32_t ComputeSize(GLsizei count
) {
9119 return static_cast<uint32_t>(sizeof(ValueType
) +
9120 ComputeDataSize(count
)); // NOLINT
9123 void SetHeader(GLsizei count
) {
9124 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9127 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9129 location
= _location
;
9131 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9134 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9135 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9136 const uint32_t size
= ComputeSize(_count
);
9137 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9140 gpu::CommandHeader header
;
9143 static const uint32_t transpose
= false;
9146 static_assert(sizeof(UniformMatrix2x3fvImmediate
) == 12,
9147 "size of UniformMatrix2x3fvImmediate should be 12");
9148 static_assert(offsetof(UniformMatrix2x3fvImmediate
, header
) == 0,
9149 "offset of UniformMatrix2x3fvImmediate header should be 0");
9150 static_assert(offsetof(UniformMatrix2x3fvImmediate
, location
) == 4,
9151 "offset of UniformMatrix2x3fvImmediate location should be 4");
9152 static_assert(offsetof(UniformMatrix2x3fvImmediate
, count
) == 8,
9153 "offset of UniformMatrix2x3fvImmediate count should be 8");
9155 struct UniformMatrix2x4fvImmediate
{
9156 typedef UniformMatrix2x4fvImmediate ValueType
;
9157 static const CommandId kCmdId
= kUniformMatrix2x4fvImmediate
;
9158 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9159 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9161 static uint32_t ComputeDataSize(GLsizei count
) {
9162 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9165 static uint32_t ComputeSize(GLsizei count
) {
9166 return static_cast<uint32_t>(sizeof(ValueType
) +
9167 ComputeDataSize(count
)); // NOLINT
9170 void SetHeader(GLsizei count
) {
9171 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9174 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9176 location
= _location
;
9178 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9181 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9182 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9183 const uint32_t size
= ComputeSize(_count
);
9184 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9187 gpu::CommandHeader header
;
9190 static const uint32_t transpose
= false;
9193 static_assert(sizeof(UniformMatrix2x4fvImmediate
) == 12,
9194 "size of UniformMatrix2x4fvImmediate should be 12");
9195 static_assert(offsetof(UniformMatrix2x4fvImmediate
, header
) == 0,
9196 "offset of UniformMatrix2x4fvImmediate header should be 0");
9197 static_assert(offsetof(UniformMatrix2x4fvImmediate
, location
) == 4,
9198 "offset of UniformMatrix2x4fvImmediate location should be 4");
9199 static_assert(offsetof(UniformMatrix2x4fvImmediate
, count
) == 8,
9200 "offset of UniformMatrix2x4fvImmediate count should be 8");
9202 struct UniformMatrix3fvImmediate
{
9203 typedef UniformMatrix3fvImmediate ValueType
;
9204 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
9205 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9206 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9208 static uint32_t ComputeDataSize(GLsizei count
) {
9209 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
9212 static uint32_t ComputeSize(GLsizei count
) {
9213 return static_cast<uint32_t>(sizeof(ValueType
) +
9214 ComputeDataSize(count
)); // NOLINT
9217 void SetHeader(GLsizei count
) {
9218 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9221 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9223 location
= _location
;
9225 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9228 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9229 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9230 const uint32_t size
= ComputeSize(_count
);
9231 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9234 gpu::CommandHeader header
;
9237 static const uint32_t transpose
= false;
9240 static_assert(sizeof(UniformMatrix3fvImmediate
) == 12,
9241 "size of UniformMatrix3fvImmediate should be 12");
9242 static_assert(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
9243 "offset of UniformMatrix3fvImmediate header should be 0");
9244 static_assert(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
9245 "offset of UniformMatrix3fvImmediate location should be 4");
9246 static_assert(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
9247 "offset of UniformMatrix3fvImmediate count should be 8");
9249 struct UniformMatrix3x2fvImmediate
{
9250 typedef UniformMatrix3x2fvImmediate ValueType
;
9251 static const CommandId kCmdId
= kUniformMatrix3x2fvImmediate
;
9252 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9253 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9255 static uint32_t ComputeDataSize(GLsizei count
) {
9256 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
9259 static uint32_t ComputeSize(GLsizei count
) {
9260 return static_cast<uint32_t>(sizeof(ValueType
) +
9261 ComputeDataSize(count
)); // NOLINT
9264 void SetHeader(GLsizei count
) {
9265 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9268 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9270 location
= _location
;
9272 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9275 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9276 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9277 const uint32_t size
= ComputeSize(_count
);
9278 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9281 gpu::CommandHeader header
;
9284 static const uint32_t transpose
= false;
9287 static_assert(sizeof(UniformMatrix3x2fvImmediate
) == 12,
9288 "size of UniformMatrix3x2fvImmediate should be 12");
9289 static_assert(offsetof(UniformMatrix3x2fvImmediate
, header
) == 0,
9290 "offset of UniformMatrix3x2fvImmediate header should be 0");
9291 static_assert(offsetof(UniformMatrix3x2fvImmediate
, location
) == 4,
9292 "offset of UniformMatrix3x2fvImmediate location should be 4");
9293 static_assert(offsetof(UniformMatrix3x2fvImmediate
, count
) == 8,
9294 "offset of UniformMatrix3x2fvImmediate count should be 8");
9296 struct UniformMatrix3x4fvImmediate
{
9297 typedef UniformMatrix3x4fvImmediate ValueType
;
9298 static const CommandId kCmdId
= kUniformMatrix3x4fvImmediate
;
9299 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9300 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9302 static uint32_t ComputeDataSize(GLsizei count
) {
9303 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9306 static uint32_t ComputeSize(GLsizei count
) {
9307 return static_cast<uint32_t>(sizeof(ValueType
) +
9308 ComputeDataSize(count
)); // NOLINT
9311 void SetHeader(GLsizei count
) {
9312 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9315 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9317 location
= _location
;
9319 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9322 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9323 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9324 const uint32_t size
= ComputeSize(_count
);
9325 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9328 gpu::CommandHeader header
;
9331 static const uint32_t transpose
= false;
9334 static_assert(sizeof(UniformMatrix3x4fvImmediate
) == 12,
9335 "size of UniformMatrix3x4fvImmediate should be 12");
9336 static_assert(offsetof(UniformMatrix3x4fvImmediate
, header
) == 0,
9337 "offset of UniformMatrix3x4fvImmediate header should be 0");
9338 static_assert(offsetof(UniformMatrix3x4fvImmediate
, location
) == 4,
9339 "offset of UniformMatrix3x4fvImmediate location should be 4");
9340 static_assert(offsetof(UniformMatrix3x4fvImmediate
, count
) == 8,
9341 "offset of UniformMatrix3x4fvImmediate count should be 8");
9343 struct UniformMatrix4fvImmediate
{
9344 typedef UniformMatrix4fvImmediate ValueType
;
9345 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
9346 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9347 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9349 static uint32_t ComputeDataSize(GLsizei count
) {
9350 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
9353 static uint32_t ComputeSize(GLsizei count
) {
9354 return static_cast<uint32_t>(sizeof(ValueType
) +
9355 ComputeDataSize(count
)); // NOLINT
9358 void SetHeader(GLsizei count
) {
9359 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9362 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9364 location
= _location
;
9366 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9369 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9370 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9371 const uint32_t size
= ComputeSize(_count
);
9372 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9375 gpu::CommandHeader header
;
9378 static const uint32_t transpose
= false;
9381 static_assert(sizeof(UniformMatrix4fvImmediate
) == 12,
9382 "size of UniformMatrix4fvImmediate should be 12");
9383 static_assert(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
9384 "offset of UniformMatrix4fvImmediate header should be 0");
9385 static_assert(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
9386 "offset of UniformMatrix4fvImmediate location should be 4");
9387 static_assert(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
9388 "offset of UniformMatrix4fvImmediate count should be 8");
9390 struct UniformMatrix4x2fvImmediate
{
9391 typedef UniformMatrix4x2fvImmediate ValueType
;
9392 static const CommandId kCmdId
= kUniformMatrix4x2fvImmediate
;
9393 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9394 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9396 static uint32_t ComputeDataSize(GLsizei count
) {
9397 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9400 static uint32_t ComputeSize(GLsizei count
) {
9401 return static_cast<uint32_t>(sizeof(ValueType
) +
9402 ComputeDataSize(count
)); // NOLINT
9405 void SetHeader(GLsizei count
) {
9406 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9409 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9411 location
= _location
;
9413 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9416 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9417 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9418 const uint32_t size
= ComputeSize(_count
);
9419 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9422 gpu::CommandHeader header
;
9425 static const uint32_t transpose
= false;
9428 static_assert(sizeof(UniformMatrix4x2fvImmediate
) == 12,
9429 "size of UniformMatrix4x2fvImmediate should be 12");
9430 static_assert(offsetof(UniformMatrix4x2fvImmediate
, header
) == 0,
9431 "offset of UniformMatrix4x2fvImmediate header should be 0");
9432 static_assert(offsetof(UniformMatrix4x2fvImmediate
, location
) == 4,
9433 "offset of UniformMatrix4x2fvImmediate location should be 4");
9434 static_assert(offsetof(UniformMatrix4x2fvImmediate
, count
) == 8,
9435 "offset of UniformMatrix4x2fvImmediate count should be 8");
9437 struct UniformMatrix4x3fvImmediate
{
9438 typedef UniformMatrix4x3fvImmediate ValueType
;
9439 static const CommandId kCmdId
= kUniformMatrix4x3fvImmediate
;
9440 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9441 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9443 static uint32_t ComputeDataSize(GLsizei count
) {
9444 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9447 static uint32_t ComputeSize(GLsizei count
) {
9448 return static_cast<uint32_t>(sizeof(ValueType
) +
9449 ComputeDataSize(count
)); // NOLINT
9452 void SetHeader(GLsizei count
) {
9453 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9456 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9458 location
= _location
;
9460 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9463 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9464 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9465 const uint32_t size
= ComputeSize(_count
);
9466 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9469 gpu::CommandHeader header
;
9472 static const uint32_t transpose
= false;
9475 static_assert(sizeof(UniformMatrix4x3fvImmediate
) == 12,
9476 "size of UniformMatrix4x3fvImmediate should be 12");
9477 static_assert(offsetof(UniformMatrix4x3fvImmediate
, header
) == 0,
9478 "offset of UniformMatrix4x3fvImmediate header should be 0");
9479 static_assert(offsetof(UniformMatrix4x3fvImmediate
, location
) == 4,
9480 "offset of UniformMatrix4x3fvImmediate location should be 4");
9481 static_assert(offsetof(UniformMatrix4x3fvImmediate
, count
) == 8,
9482 "offset of UniformMatrix4x3fvImmediate count should be 8");
9485 typedef UseProgram ValueType
;
9486 static const CommandId kCmdId
= kUseProgram
;
9487 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9488 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9490 static uint32_t ComputeSize() {
9491 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9494 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9496 void Init(GLuint _program
) {
9501 void* Set(void* cmd
, GLuint _program
) {
9502 static_cast<ValueType
*>(cmd
)->Init(_program
);
9503 return NextCmdAddress
<ValueType
>(cmd
);
9506 gpu::CommandHeader header
;
9510 static_assert(sizeof(UseProgram
) == 8, "size of UseProgram should be 8");
9511 static_assert(offsetof(UseProgram
, header
) == 0,
9512 "offset of UseProgram header should be 0");
9513 static_assert(offsetof(UseProgram
, program
) == 4,
9514 "offset of UseProgram program should be 4");
9516 struct ValidateProgram
{
9517 typedef ValidateProgram ValueType
;
9518 static const CommandId kCmdId
= kValidateProgram
;
9519 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9520 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9522 static uint32_t ComputeSize() {
9523 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9526 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9528 void Init(GLuint _program
) {
9533 void* Set(void* cmd
, GLuint _program
) {
9534 static_cast<ValueType
*>(cmd
)->Init(_program
);
9535 return NextCmdAddress
<ValueType
>(cmd
);
9538 gpu::CommandHeader header
;
9542 static_assert(sizeof(ValidateProgram
) == 8,
9543 "size of ValidateProgram should be 8");
9544 static_assert(offsetof(ValidateProgram
, header
) == 0,
9545 "offset of ValidateProgram header should be 0");
9546 static_assert(offsetof(ValidateProgram
, program
) == 4,
9547 "offset of ValidateProgram program should be 4");
9549 struct VertexAttrib1f
{
9550 typedef VertexAttrib1f ValueType
;
9551 static const CommandId kCmdId
= kVertexAttrib1f
;
9552 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9553 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9555 static uint32_t ComputeSize() {
9556 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9559 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9561 void Init(GLuint _indx
, GLfloat _x
) {
9567 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
9568 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
9569 return NextCmdAddress
<ValueType
>(cmd
);
9572 gpu::CommandHeader header
;
9577 static_assert(sizeof(VertexAttrib1f
) == 12,
9578 "size of VertexAttrib1f should be 12");
9579 static_assert(offsetof(VertexAttrib1f
, header
) == 0,
9580 "offset of VertexAttrib1f header should be 0");
9581 static_assert(offsetof(VertexAttrib1f
, indx
) == 4,
9582 "offset of VertexAttrib1f indx should be 4");
9583 static_assert(offsetof(VertexAttrib1f
, x
) == 8,
9584 "offset of VertexAttrib1f x should be 8");
9586 struct VertexAttrib1fvImmediate
{
9587 typedef VertexAttrib1fvImmediate ValueType
;
9588 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
9589 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9590 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9592 static uint32_t ComputeDataSize() {
9593 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
9596 static uint32_t ComputeSize() {
9597 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9600 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9602 void Init(GLuint _indx
, const GLfloat
* _values
) {
9605 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9608 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9609 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9610 const uint32_t size
= ComputeSize();
9611 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9614 gpu::CommandHeader header
;
9618 static_assert(sizeof(VertexAttrib1fvImmediate
) == 8,
9619 "size of VertexAttrib1fvImmediate should be 8");
9620 static_assert(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
9621 "offset of VertexAttrib1fvImmediate header should be 0");
9622 static_assert(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
9623 "offset of VertexAttrib1fvImmediate indx should be 4");
9625 struct VertexAttrib2f
{
9626 typedef VertexAttrib2f ValueType
;
9627 static const CommandId kCmdId
= kVertexAttrib2f
;
9628 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9629 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9631 static uint32_t ComputeSize() {
9632 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9635 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9637 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9644 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9645 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
9646 return NextCmdAddress
<ValueType
>(cmd
);
9649 gpu::CommandHeader header
;
9655 static_assert(sizeof(VertexAttrib2f
) == 16,
9656 "size of VertexAttrib2f should be 16");
9657 static_assert(offsetof(VertexAttrib2f
, header
) == 0,
9658 "offset of VertexAttrib2f header should be 0");
9659 static_assert(offsetof(VertexAttrib2f
, indx
) == 4,
9660 "offset of VertexAttrib2f indx should be 4");
9661 static_assert(offsetof(VertexAttrib2f
, x
) == 8,
9662 "offset of VertexAttrib2f x should be 8");
9663 static_assert(offsetof(VertexAttrib2f
, y
) == 12,
9664 "offset of VertexAttrib2f y should be 12");
9666 struct VertexAttrib2fvImmediate
{
9667 typedef VertexAttrib2fvImmediate ValueType
;
9668 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
9669 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9670 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9672 static uint32_t ComputeDataSize() {
9673 return static_cast<uint32_t>(sizeof(GLfloat
) * 2);
9676 static uint32_t ComputeSize() {
9677 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9680 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9682 void Init(GLuint _indx
, const GLfloat
* _values
) {
9685 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9688 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9689 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9690 const uint32_t size
= ComputeSize();
9691 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9694 gpu::CommandHeader header
;
9698 static_assert(sizeof(VertexAttrib2fvImmediate
) == 8,
9699 "size of VertexAttrib2fvImmediate should be 8");
9700 static_assert(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
9701 "offset of VertexAttrib2fvImmediate header should be 0");
9702 static_assert(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
9703 "offset of VertexAttrib2fvImmediate indx should be 4");
9705 struct VertexAttrib3f
{
9706 typedef VertexAttrib3f ValueType
;
9707 static const CommandId kCmdId
= kVertexAttrib3f
;
9708 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9709 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9711 static uint32_t ComputeSize() {
9712 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9715 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9717 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9725 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9726 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
9727 return NextCmdAddress
<ValueType
>(cmd
);
9730 gpu::CommandHeader header
;
9737 static_assert(sizeof(VertexAttrib3f
) == 20,
9738 "size of VertexAttrib3f should be 20");
9739 static_assert(offsetof(VertexAttrib3f
, header
) == 0,
9740 "offset of VertexAttrib3f header should be 0");
9741 static_assert(offsetof(VertexAttrib3f
, indx
) == 4,
9742 "offset of VertexAttrib3f indx should be 4");
9743 static_assert(offsetof(VertexAttrib3f
, x
) == 8,
9744 "offset of VertexAttrib3f x should be 8");
9745 static_assert(offsetof(VertexAttrib3f
, y
) == 12,
9746 "offset of VertexAttrib3f y should be 12");
9747 static_assert(offsetof(VertexAttrib3f
, z
) == 16,
9748 "offset of VertexAttrib3f z should be 16");
9750 struct VertexAttrib3fvImmediate
{
9751 typedef VertexAttrib3fvImmediate ValueType
;
9752 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
9753 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9754 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9756 static uint32_t ComputeDataSize() {
9757 return static_cast<uint32_t>(sizeof(GLfloat
) * 3);
9760 static uint32_t ComputeSize() {
9761 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9764 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9766 void Init(GLuint _indx
, const GLfloat
* _values
) {
9769 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9772 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9773 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9774 const uint32_t size
= ComputeSize();
9775 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9778 gpu::CommandHeader header
;
9782 static_assert(sizeof(VertexAttrib3fvImmediate
) == 8,
9783 "size of VertexAttrib3fvImmediate should be 8");
9784 static_assert(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
9785 "offset of VertexAttrib3fvImmediate header should be 0");
9786 static_assert(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
9787 "offset of VertexAttrib3fvImmediate indx should be 4");
9789 struct VertexAttrib4f
{
9790 typedef VertexAttrib4f ValueType
;
9791 static const CommandId kCmdId
= kVertexAttrib4f
;
9792 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9793 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9795 static uint32_t ComputeSize() {
9796 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9799 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9801 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
9810 void* Set(void* cmd
,
9816 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9817 return NextCmdAddress
<ValueType
>(cmd
);
9820 gpu::CommandHeader header
;
9828 static_assert(sizeof(VertexAttrib4f
) == 24,
9829 "size of VertexAttrib4f should be 24");
9830 static_assert(offsetof(VertexAttrib4f
, header
) == 0,
9831 "offset of VertexAttrib4f header should be 0");
9832 static_assert(offsetof(VertexAttrib4f
, indx
) == 4,
9833 "offset of VertexAttrib4f indx should be 4");
9834 static_assert(offsetof(VertexAttrib4f
, x
) == 8,
9835 "offset of VertexAttrib4f x should be 8");
9836 static_assert(offsetof(VertexAttrib4f
, y
) == 12,
9837 "offset of VertexAttrib4f y should be 12");
9838 static_assert(offsetof(VertexAttrib4f
, z
) == 16,
9839 "offset of VertexAttrib4f z should be 16");
9840 static_assert(offsetof(VertexAttrib4f
, w
) == 20,
9841 "offset of VertexAttrib4f w should be 20");
9843 struct VertexAttrib4fvImmediate
{
9844 typedef VertexAttrib4fvImmediate ValueType
;
9845 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
9846 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9847 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9849 static uint32_t ComputeDataSize() {
9850 return static_cast<uint32_t>(sizeof(GLfloat
) * 4);
9853 static uint32_t ComputeSize() {
9854 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9857 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9859 void Init(GLuint _indx
, const GLfloat
* _values
) {
9862 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9865 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9866 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9867 const uint32_t size
= ComputeSize();
9868 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9871 gpu::CommandHeader header
;
9875 static_assert(sizeof(VertexAttrib4fvImmediate
) == 8,
9876 "size of VertexAttrib4fvImmediate should be 8");
9877 static_assert(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
9878 "offset of VertexAttrib4fvImmediate header should be 0");
9879 static_assert(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
9880 "offset of VertexAttrib4fvImmediate indx should be 4");
9882 struct VertexAttribI4i
{
9883 typedef VertexAttribI4i ValueType
;
9884 static const CommandId kCmdId
= kVertexAttribI4i
;
9885 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9886 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9888 static uint32_t ComputeSize() {
9889 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9892 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9894 void Init(GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9903 void* Set(void* cmd
, GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9904 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9905 return NextCmdAddress
<ValueType
>(cmd
);
9908 gpu::CommandHeader header
;
9916 static_assert(sizeof(VertexAttribI4i
) == 24,
9917 "size of VertexAttribI4i should be 24");
9918 static_assert(offsetof(VertexAttribI4i
, header
) == 0,
9919 "offset of VertexAttribI4i header should be 0");
9920 static_assert(offsetof(VertexAttribI4i
, indx
) == 4,
9921 "offset of VertexAttribI4i indx should be 4");
9922 static_assert(offsetof(VertexAttribI4i
, x
) == 8,
9923 "offset of VertexAttribI4i x should be 8");
9924 static_assert(offsetof(VertexAttribI4i
, y
) == 12,
9925 "offset of VertexAttribI4i y should be 12");
9926 static_assert(offsetof(VertexAttribI4i
, z
) == 16,
9927 "offset of VertexAttribI4i z should be 16");
9928 static_assert(offsetof(VertexAttribI4i
, w
) == 20,
9929 "offset of VertexAttribI4i w should be 20");
9931 struct VertexAttribI4ivImmediate
{
9932 typedef VertexAttribI4ivImmediate ValueType
;
9933 static const CommandId kCmdId
= kVertexAttribI4ivImmediate
;
9934 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9935 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9937 static uint32_t ComputeDataSize() {
9938 return static_cast<uint32_t>(sizeof(GLint
) * 4);
9941 static uint32_t ComputeSize() {
9942 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9945 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9947 void Init(GLuint _indx
, const GLint
* _values
) {
9950 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9953 void* Set(void* cmd
, GLuint _indx
, const GLint
* _values
) {
9954 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9955 const uint32_t size
= ComputeSize();
9956 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9959 gpu::CommandHeader header
;
9963 static_assert(sizeof(VertexAttribI4ivImmediate
) == 8,
9964 "size of VertexAttribI4ivImmediate should be 8");
9965 static_assert(offsetof(VertexAttribI4ivImmediate
, header
) == 0,
9966 "offset of VertexAttribI4ivImmediate header should be 0");
9967 static_assert(offsetof(VertexAttribI4ivImmediate
, indx
) == 4,
9968 "offset of VertexAttribI4ivImmediate indx should be 4");
9970 struct VertexAttribI4ui
{
9971 typedef VertexAttribI4ui ValueType
;
9972 static const CommandId kCmdId
= kVertexAttribI4ui
;
9973 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9974 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9976 static uint32_t ComputeSize() {
9977 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9980 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9982 void Init(GLuint _indx
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
9991 void* Set(void* cmd
,
9997 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9998 return NextCmdAddress
<ValueType
>(cmd
);
10001 gpu::CommandHeader header
;
10009 static_assert(sizeof(VertexAttribI4ui
) == 24,
10010 "size of VertexAttribI4ui should be 24");
10011 static_assert(offsetof(VertexAttribI4ui
, header
) == 0,
10012 "offset of VertexAttribI4ui header should be 0");
10013 static_assert(offsetof(VertexAttribI4ui
, indx
) == 4,
10014 "offset of VertexAttribI4ui indx should be 4");
10015 static_assert(offsetof(VertexAttribI4ui
, x
) == 8,
10016 "offset of VertexAttribI4ui x should be 8");
10017 static_assert(offsetof(VertexAttribI4ui
, y
) == 12,
10018 "offset of VertexAttribI4ui y should be 12");
10019 static_assert(offsetof(VertexAttribI4ui
, z
) == 16,
10020 "offset of VertexAttribI4ui z should be 16");
10021 static_assert(offsetof(VertexAttribI4ui
, w
) == 20,
10022 "offset of VertexAttribI4ui w should be 20");
10024 struct VertexAttribI4uivImmediate
{
10025 typedef VertexAttribI4uivImmediate ValueType
;
10026 static const CommandId kCmdId
= kVertexAttribI4uivImmediate
;
10027 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10028 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10030 static uint32_t ComputeDataSize() {
10031 return static_cast<uint32_t>(sizeof(GLuint
) * 4);
10034 static uint32_t ComputeSize() {
10035 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10038 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10040 void Init(GLuint _indx
, const GLuint
* _values
) {
10043 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10046 void* Set(void* cmd
, GLuint _indx
, const GLuint
* _values
) {
10047 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10048 const uint32_t size
= ComputeSize();
10049 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10052 gpu::CommandHeader header
;
10056 static_assert(sizeof(VertexAttribI4uivImmediate
) == 8,
10057 "size of VertexAttribI4uivImmediate should be 8");
10058 static_assert(offsetof(VertexAttribI4uivImmediate
, header
) == 0,
10059 "offset of VertexAttribI4uivImmediate header should be 0");
10060 static_assert(offsetof(VertexAttribI4uivImmediate
, indx
) == 4,
10061 "offset of VertexAttribI4uivImmediate indx should be 4");
10063 struct VertexAttribIPointer
{
10064 typedef VertexAttribIPointer ValueType
;
10065 static const CommandId kCmdId
= kVertexAttribIPointer
;
10066 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10067 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10069 static uint32_t ComputeSize() {
10070 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10073 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10075 void Init(GLuint _indx
,
10088 void* Set(void* cmd
,
10094 static_cast<ValueType
*>(cmd
)->Init(_indx
, _size
, _type
, _stride
, _offset
);
10095 return NextCmdAddress
<ValueType
>(cmd
);
10098 gpu::CommandHeader header
;
10106 static_assert(sizeof(VertexAttribIPointer
) == 24,
10107 "size of VertexAttribIPointer should be 24");
10108 static_assert(offsetof(VertexAttribIPointer
, header
) == 0,
10109 "offset of VertexAttribIPointer header should be 0");
10110 static_assert(offsetof(VertexAttribIPointer
, indx
) == 4,
10111 "offset of VertexAttribIPointer indx should be 4");
10112 static_assert(offsetof(VertexAttribIPointer
, size
) == 8,
10113 "offset of VertexAttribIPointer size should be 8");
10114 static_assert(offsetof(VertexAttribIPointer
, type
) == 12,
10115 "offset of VertexAttribIPointer type should be 12");
10116 static_assert(offsetof(VertexAttribIPointer
, stride
) == 16,
10117 "offset of VertexAttribIPointer stride should be 16");
10118 static_assert(offsetof(VertexAttribIPointer
, offset
) == 20,
10119 "offset of VertexAttribIPointer offset should be 20");
10121 struct VertexAttribPointer
{
10122 typedef VertexAttribPointer ValueType
;
10123 static const CommandId kCmdId
= kVertexAttribPointer
;
10124 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10125 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10127 static uint32_t ComputeSize() {
10128 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10131 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10133 void Init(GLuint _indx
,
10136 GLboolean _normalized
,
10143 normalized
= _normalized
;
10148 void* Set(void* cmd
,
10152 GLboolean _normalized
,
10155 static_cast<ValueType
*>(cmd
)
10156 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
10157 return NextCmdAddress
<ValueType
>(cmd
);
10160 gpu::CommandHeader header
;
10164 uint32_t normalized
;
10169 static_assert(sizeof(VertexAttribPointer
) == 28,
10170 "size of VertexAttribPointer should be 28");
10171 static_assert(offsetof(VertexAttribPointer
, header
) == 0,
10172 "offset of VertexAttribPointer header should be 0");
10173 static_assert(offsetof(VertexAttribPointer
, indx
) == 4,
10174 "offset of VertexAttribPointer indx should be 4");
10175 static_assert(offsetof(VertexAttribPointer
, size
) == 8,
10176 "offset of VertexAttribPointer size should be 8");
10177 static_assert(offsetof(VertexAttribPointer
, type
) == 12,
10178 "offset of VertexAttribPointer type should be 12");
10179 static_assert(offsetof(VertexAttribPointer
, normalized
) == 16,
10180 "offset of VertexAttribPointer normalized should be 16");
10181 static_assert(offsetof(VertexAttribPointer
, stride
) == 20,
10182 "offset of VertexAttribPointer stride should be 20");
10183 static_assert(offsetof(VertexAttribPointer
, offset
) == 24,
10184 "offset of VertexAttribPointer offset should be 24");
10187 typedef Viewport ValueType
;
10188 static const CommandId kCmdId
= kViewport
;
10189 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10190 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10192 static uint32_t ComputeSize() {
10193 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10196 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10198 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
10206 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
10207 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
10208 return NextCmdAddress
<ValueType
>(cmd
);
10211 gpu::CommandHeader header
;
10218 static_assert(sizeof(Viewport
) == 20, "size of Viewport should be 20");
10219 static_assert(offsetof(Viewport
, header
) == 0,
10220 "offset of Viewport header should be 0");
10221 static_assert(offsetof(Viewport
, x
) == 4, "offset of Viewport x should be 4");
10222 static_assert(offsetof(Viewport
, y
) == 8, "offset of Viewport y should be 8");
10223 static_assert(offsetof(Viewport
, width
) == 12,
10224 "offset of Viewport width should be 12");
10225 static_assert(offsetof(Viewport
, height
) == 16,
10226 "offset of Viewport height should be 16");
10229 typedef WaitSync ValueType
;
10230 static const CommandId kCmdId
= kWaitSync
;
10231 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10232 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10234 static uint32_t ComputeSize() {
10235 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10238 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10240 void Init(GLuint _sync
,
10243 GLuint _timeout_1
) {
10247 timeout_0
= _timeout_0
;
10248 timeout_1
= _timeout_1
;
10251 void* Set(void* cmd
,
10255 GLuint _timeout_1
) {
10256 static_cast<ValueType
*>(cmd
)->Init(_sync
, _flags
, _timeout_0
, _timeout_1
);
10257 return NextCmdAddress
<ValueType
>(cmd
);
10260 gpu::CommandHeader header
;
10263 uint32_t timeout_0
;
10264 uint32_t timeout_1
;
10267 static_assert(sizeof(WaitSync
) == 20, "size of WaitSync should be 20");
10268 static_assert(offsetof(WaitSync
, header
) == 0,
10269 "offset of WaitSync header should be 0");
10270 static_assert(offsetof(WaitSync
, sync
) == 4,
10271 "offset of WaitSync sync should be 4");
10272 static_assert(offsetof(WaitSync
, flags
) == 8,
10273 "offset of WaitSync flags should be 8");
10274 static_assert(offsetof(WaitSync
, timeout_0
) == 12,
10275 "offset of WaitSync timeout_0 should be 12");
10276 static_assert(offsetof(WaitSync
, timeout_1
) == 16,
10277 "offset of WaitSync timeout_1 should be 16");
10279 struct BlitFramebufferCHROMIUM
{
10280 typedef BlitFramebufferCHROMIUM ValueType
;
10281 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
10282 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10283 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10285 static uint32_t ComputeSize() {
10286 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10289 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10291 void Init(GLint _srcX0
,
10314 void* Set(void* cmd
,
10325 static_cast<ValueType
*>(cmd
)->Init(_srcX0
, _srcY0
, _srcX1
, _srcY1
, _dstX0
,
10326 _dstY0
, _dstX1
, _dstY1
, _mask
, _filter
);
10327 return NextCmdAddress
<ValueType
>(cmd
);
10330 gpu::CommandHeader header
;
10343 static_assert(sizeof(BlitFramebufferCHROMIUM
) == 44,
10344 "size of BlitFramebufferCHROMIUM should be 44");
10345 static_assert(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
10346 "offset of BlitFramebufferCHROMIUM header should be 0");
10347 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
10348 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
10349 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
10350 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
10351 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
10352 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
10353 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
10354 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
10355 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
10356 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
10357 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
10358 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
10359 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
10360 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
10361 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
10362 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
10363 static_assert(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
10364 "offset of BlitFramebufferCHROMIUM mask should be 36");
10365 static_assert(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
10366 "offset of BlitFramebufferCHROMIUM filter should be 40");
10368 // GL_CHROMIUM_framebuffer_multisample
10369 struct RenderbufferStorageMultisampleCHROMIUM
{
10370 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
10371 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
10372 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10373 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10375 static uint32_t ComputeSize() {
10376 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10379 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10381 void Init(GLenum _target
,
10383 GLenum _internalformat
,
10388 samples
= _samples
;
10389 internalformat
= _internalformat
;
10394 void* Set(void* cmd
,
10397 GLenum _internalformat
,
10400 static_cast<ValueType
*>(cmd
)
10401 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10402 return NextCmdAddress
<ValueType
>(cmd
);
10405 gpu::CommandHeader header
;
10408 uint32_t internalformat
;
10413 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
10414 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10416 offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
10417 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10419 offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
10420 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10422 offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
10423 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10424 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM
,
10425 internalformat
) == 12,
10426 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10429 offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
10430 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10432 offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
10433 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10435 // GL_EXT_multisampled_render_to_texture
10436 struct RenderbufferStorageMultisampleEXT
{
10437 typedef RenderbufferStorageMultisampleEXT ValueType
;
10438 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
10439 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10440 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10442 static uint32_t ComputeSize() {
10443 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10446 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10448 void Init(GLenum _target
,
10450 GLenum _internalformat
,
10455 samples
= _samples
;
10456 internalformat
= _internalformat
;
10461 void* Set(void* cmd
,
10464 GLenum _internalformat
,
10467 static_cast<ValueType
*>(cmd
)
10468 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10469 return NextCmdAddress
<ValueType
>(cmd
);
10472 gpu::CommandHeader header
;
10475 uint32_t internalformat
;
10480 static_assert(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
10481 "size of RenderbufferStorageMultisampleEXT should be 24");
10482 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
10483 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10484 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
10485 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10487 offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
10488 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10490 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
10491 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10492 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
10493 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10495 offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
10496 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10498 struct FramebufferTexture2DMultisampleEXT
{
10499 typedef FramebufferTexture2DMultisampleEXT ValueType
;
10500 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
10501 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10502 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10504 static uint32_t ComputeSize() {
10505 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10508 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10510 void Init(GLenum _target
,
10511 GLenum _attachment
,
10514 GLsizei _samples
) {
10517 attachment
= _attachment
;
10518 textarget
= _textarget
;
10519 texture
= _texture
;
10520 samples
= _samples
;
10523 void* Set(void* cmd
,
10525 GLenum _attachment
,
10528 GLsizei _samples
) {
10529 static_cast<ValueType
*>(cmd
)
10530 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
10531 return NextCmdAddress
<ValueType
>(cmd
);
10534 gpu::CommandHeader header
;
10536 uint32_t attachment
;
10537 uint32_t textarget
;
10540 static const int32_t level
= 0;
10543 static_assert(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
10544 "size of FramebufferTexture2DMultisampleEXT should be 24");
10546 offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
10547 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10549 offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
10550 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10552 offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
10553 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10555 offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
10556 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10558 offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
10559 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10561 offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
10562 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10564 struct TexStorage2DEXT
{
10565 typedef TexStorage2DEXT ValueType
;
10566 static const CommandId kCmdId
= kTexStorage2DEXT
;
10567 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10568 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10570 static uint32_t ComputeSize() {
10571 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10574 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10576 void Init(GLenum _target
,
10578 GLenum _internalFormat
,
10584 internalFormat
= _internalFormat
;
10589 void* Set(void* cmd
,
10592 GLenum _internalFormat
,
10595 static_cast<ValueType
*>(cmd
)
10596 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
10597 return NextCmdAddress
<ValueType
>(cmd
);
10600 gpu::CommandHeader header
;
10603 uint32_t internalFormat
;
10608 static_assert(sizeof(TexStorage2DEXT
) == 24,
10609 "size of TexStorage2DEXT should be 24");
10610 static_assert(offsetof(TexStorage2DEXT
, header
) == 0,
10611 "offset of TexStorage2DEXT header should be 0");
10612 static_assert(offsetof(TexStorage2DEXT
, target
) == 4,
10613 "offset of TexStorage2DEXT target should be 4");
10614 static_assert(offsetof(TexStorage2DEXT
, levels
) == 8,
10615 "offset of TexStorage2DEXT levels should be 8");
10616 static_assert(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
10617 "offset of TexStorage2DEXT internalFormat should be 12");
10618 static_assert(offsetof(TexStorage2DEXT
, width
) == 16,
10619 "offset of TexStorage2DEXT width should be 16");
10620 static_assert(offsetof(TexStorage2DEXT
, height
) == 20,
10621 "offset of TexStorage2DEXT height should be 20");
10623 struct GenQueriesEXTImmediate
{
10624 typedef GenQueriesEXTImmediate ValueType
;
10625 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
10626 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10627 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10629 static uint32_t ComputeDataSize(GLsizei n
) {
10630 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10633 static uint32_t ComputeSize(GLsizei n
) {
10634 return static_cast<uint32_t>(sizeof(ValueType
) +
10635 ComputeDataSize(n
)); // NOLINT
10638 void SetHeader(GLsizei n
) {
10639 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10642 void Init(GLsizei _n
, GLuint
* _queries
) {
10645 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10648 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
10649 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10650 const uint32_t size
= ComputeSize(_n
);
10651 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10654 gpu::CommandHeader header
;
10658 static_assert(sizeof(GenQueriesEXTImmediate
) == 8,
10659 "size of GenQueriesEXTImmediate should be 8");
10660 static_assert(offsetof(GenQueriesEXTImmediate
, header
) == 0,
10661 "offset of GenQueriesEXTImmediate header should be 0");
10662 static_assert(offsetof(GenQueriesEXTImmediate
, n
) == 4,
10663 "offset of GenQueriesEXTImmediate n should be 4");
10665 struct DeleteQueriesEXTImmediate
{
10666 typedef DeleteQueriesEXTImmediate ValueType
;
10667 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
10668 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10669 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10671 static uint32_t ComputeDataSize(GLsizei n
) {
10672 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10675 static uint32_t ComputeSize(GLsizei n
) {
10676 return static_cast<uint32_t>(sizeof(ValueType
) +
10677 ComputeDataSize(n
)); // NOLINT
10680 void SetHeader(GLsizei n
) {
10681 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10684 void Init(GLsizei _n
, const GLuint
* _queries
) {
10687 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10690 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
10691 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10692 const uint32_t size
= ComputeSize(_n
);
10693 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10696 gpu::CommandHeader header
;
10700 static_assert(sizeof(DeleteQueriesEXTImmediate
) == 8,
10701 "size of DeleteQueriesEXTImmediate should be 8");
10702 static_assert(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
10703 "offset of DeleteQueriesEXTImmediate header should be 0");
10704 static_assert(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
10705 "offset of DeleteQueriesEXTImmediate n should be 4");
10707 struct BeginQueryEXT
{
10708 typedef BeginQueryEXT ValueType
;
10709 static const CommandId kCmdId
= kBeginQueryEXT
;
10710 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10711 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10713 static uint32_t ComputeSize() {
10714 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10717 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10719 void Init(GLenum _target
,
10721 uint32_t _sync_data_shm_id
,
10722 uint32_t _sync_data_shm_offset
) {
10726 sync_data_shm_id
= _sync_data_shm_id
;
10727 sync_data_shm_offset
= _sync_data_shm_offset
;
10730 void* Set(void* cmd
,
10733 uint32_t _sync_data_shm_id
,
10734 uint32_t _sync_data_shm_offset
) {
10735 static_cast<ValueType
*>(cmd
)
10736 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
10737 return NextCmdAddress
<ValueType
>(cmd
);
10740 gpu::CommandHeader header
;
10743 uint32_t sync_data_shm_id
;
10744 uint32_t sync_data_shm_offset
;
10747 static_assert(sizeof(BeginQueryEXT
) == 20,
10748 "size of BeginQueryEXT should be 20");
10749 static_assert(offsetof(BeginQueryEXT
, header
) == 0,
10750 "offset of BeginQueryEXT header should be 0");
10751 static_assert(offsetof(BeginQueryEXT
, target
) == 4,
10752 "offset of BeginQueryEXT target should be 4");
10753 static_assert(offsetof(BeginQueryEXT
, id
) == 8,
10754 "offset of BeginQueryEXT id should be 8");
10755 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
10756 "offset of BeginQueryEXT sync_data_shm_id should be 12");
10757 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
10758 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
10760 struct BeginTransformFeedback
{
10761 typedef BeginTransformFeedback ValueType
;
10762 static const CommandId kCmdId
= kBeginTransformFeedback
;
10763 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10764 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10766 static uint32_t ComputeSize() {
10767 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10770 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10772 void Init(GLenum _primitivemode
) {
10774 primitivemode
= _primitivemode
;
10777 void* Set(void* cmd
, GLenum _primitivemode
) {
10778 static_cast<ValueType
*>(cmd
)->Init(_primitivemode
);
10779 return NextCmdAddress
<ValueType
>(cmd
);
10782 gpu::CommandHeader header
;
10783 uint32_t primitivemode
;
10786 static_assert(sizeof(BeginTransformFeedback
) == 8,
10787 "size of BeginTransformFeedback should be 8");
10788 static_assert(offsetof(BeginTransformFeedback
, header
) == 0,
10789 "offset of BeginTransformFeedback header should be 0");
10790 static_assert(offsetof(BeginTransformFeedback
, primitivemode
) == 4,
10791 "offset of BeginTransformFeedback primitivemode should be 4");
10793 struct EndQueryEXT
{
10794 typedef EndQueryEXT ValueType
;
10795 static const CommandId kCmdId
= kEndQueryEXT
;
10796 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10797 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10799 static uint32_t ComputeSize() {
10800 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10803 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10805 void Init(GLenum _target
, GLuint _submit_count
) {
10808 submit_count
= _submit_count
;
10811 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
10812 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
10813 return NextCmdAddress
<ValueType
>(cmd
);
10816 gpu::CommandHeader header
;
10818 uint32_t submit_count
;
10821 static_assert(sizeof(EndQueryEXT
) == 12, "size of EndQueryEXT should be 12");
10822 static_assert(offsetof(EndQueryEXT
, header
) == 0,
10823 "offset of EndQueryEXT header should be 0");
10824 static_assert(offsetof(EndQueryEXT
, target
) == 4,
10825 "offset of EndQueryEXT target should be 4");
10826 static_assert(offsetof(EndQueryEXT
, submit_count
) == 8,
10827 "offset of EndQueryEXT submit_count should be 8");
10829 struct EndTransformFeedback
{
10830 typedef EndTransformFeedback ValueType
;
10831 static const CommandId kCmdId
= kEndTransformFeedback
;
10832 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10833 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10835 static uint32_t ComputeSize() {
10836 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10839 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10841 void Init() { SetHeader(); }
10843 void* Set(void* cmd
) {
10844 static_cast<ValueType
*>(cmd
)->Init();
10845 return NextCmdAddress
<ValueType
>(cmd
);
10848 gpu::CommandHeader header
;
10851 static_assert(sizeof(EndTransformFeedback
) == 4,
10852 "size of EndTransformFeedback should be 4");
10853 static_assert(offsetof(EndTransformFeedback
, header
) == 0,
10854 "offset of EndTransformFeedback header should be 0");
10856 struct InsertEventMarkerEXT
{
10857 typedef InsertEventMarkerEXT ValueType
;
10858 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
10859 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10860 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10862 static uint32_t ComputeSize() {
10863 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10866 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10868 void Init(GLuint _bucket_id
) {
10870 bucket_id
= _bucket_id
;
10873 void* Set(void* cmd
, GLuint _bucket_id
) {
10874 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10875 return NextCmdAddress
<ValueType
>(cmd
);
10878 gpu::CommandHeader header
;
10879 uint32_t bucket_id
;
10882 static_assert(sizeof(InsertEventMarkerEXT
) == 8,
10883 "size of InsertEventMarkerEXT should be 8");
10884 static_assert(offsetof(InsertEventMarkerEXT
, header
) == 0,
10885 "offset of InsertEventMarkerEXT header should be 0");
10886 static_assert(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
10887 "offset of InsertEventMarkerEXT bucket_id should be 4");
10889 struct PushGroupMarkerEXT
{
10890 typedef PushGroupMarkerEXT ValueType
;
10891 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
10892 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10893 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10895 static uint32_t ComputeSize() {
10896 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10899 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10901 void Init(GLuint _bucket_id
) {
10903 bucket_id
= _bucket_id
;
10906 void* Set(void* cmd
, GLuint _bucket_id
) {
10907 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10908 return NextCmdAddress
<ValueType
>(cmd
);
10911 gpu::CommandHeader header
;
10912 uint32_t bucket_id
;
10915 static_assert(sizeof(PushGroupMarkerEXT
) == 8,
10916 "size of PushGroupMarkerEXT should be 8");
10917 static_assert(offsetof(PushGroupMarkerEXT
, header
) == 0,
10918 "offset of PushGroupMarkerEXT header should be 0");
10919 static_assert(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
10920 "offset of PushGroupMarkerEXT bucket_id should be 4");
10922 struct PopGroupMarkerEXT
{
10923 typedef PopGroupMarkerEXT ValueType
;
10924 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
10925 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10926 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10928 static uint32_t ComputeSize() {
10929 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10932 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10934 void Init() { SetHeader(); }
10936 void* Set(void* cmd
) {
10937 static_cast<ValueType
*>(cmd
)->Init();
10938 return NextCmdAddress
<ValueType
>(cmd
);
10941 gpu::CommandHeader header
;
10944 static_assert(sizeof(PopGroupMarkerEXT
) == 4,
10945 "size of PopGroupMarkerEXT should be 4");
10946 static_assert(offsetof(PopGroupMarkerEXT
, header
) == 0,
10947 "offset of PopGroupMarkerEXT header should be 0");
10949 struct GenVertexArraysOESImmediate
{
10950 typedef GenVertexArraysOESImmediate ValueType
;
10951 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
10952 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10953 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10955 static uint32_t ComputeDataSize(GLsizei n
) {
10956 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10959 static uint32_t ComputeSize(GLsizei n
) {
10960 return static_cast<uint32_t>(sizeof(ValueType
) +
10961 ComputeDataSize(n
)); // NOLINT
10964 void SetHeader(GLsizei n
) {
10965 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10968 void Init(GLsizei _n
, GLuint
* _arrays
) {
10971 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
10974 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
10975 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
10976 const uint32_t size
= ComputeSize(_n
);
10977 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10980 gpu::CommandHeader header
;
10984 static_assert(sizeof(GenVertexArraysOESImmediate
) == 8,
10985 "size of GenVertexArraysOESImmediate should be 8");
10986 static_assert(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
10987 "offset of GenVertexArraysOESImmediate header should be 0");
10988 static_assert(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
10989 "offset of GenVertexArraysOESImmediate n should be 4");
10991 struct DeleteVertexArraysOESImmediate
{
10992 typedef DeleteVertexArraysOESImmediate ValueType
;
10993 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
10994 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10995 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10997 static uint32_t ComputeDataSize(GLsizei n
) {
10998 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11001 static uint32_t ComputeSize(GLsizei n
) {
11002 return static_cast<uint32_t>(sizeof(ValueType
) +
11003 ComputeDataSize(n
)); // NOLINT
11006 void SetHeader(GLsizei n
) {
11007 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11010 void Init(GLsizei _n
, const GLuint
* _arrays
) {
11013 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
11016 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
11017 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
11018 const uint32_t size
= ComputeSize(_n
);
11019 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11022 gpu::CommandHeader header
;
11026 static_assert(sizeof(DeleteVertexArraysOESImmediate
) == 8,
11027 "size of DeleteVertexArraysOESImmediate should be 8");
11028 static_assert(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
11029 "offset of DeleteVertexArraysOESImmediate header should be 0");
11030 static_assert(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
11031 "offset of DeleteVertexArraysOESImmediate n should be 4");
11033 struct IsVertexArrayOES
{
11034 typedef IsVertexArrayOES ValueType
;
11035 static const CommandId kCmdId
= kIsVertexArrayOES
;
11036 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11037 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11039 typedef uint32_t Result
;
11041 static uint32_t ComputeSize() {
11042 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11045 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11047 void Init(GLuint _array
,
11048 uint32_t _result_shm_id
,
11049 uint32_t _result_shm_offset
) {
11052 result_shm_id
= _result_shm_id
;
11053 result_shm_offset
= _result_shm_offset
;
11056 void* Set(void* cmd
,
11058 uint32_t _result_shm_id
,
11059 uint32_t _result_shm_offset
) {
11060 static_cast<ValueType
*>(cmd
)
11061 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
11062 return NextCmdAddress
<ValueType
>(cmd
);
11065 gpu::CommandHeader header
;
11067 uint32_t result_shm_id
;
11068 uint32_t result_shm_offset
;
11071 static_assert(sizeof(IsVertexArrayOES
) == 16,
11072 "size of IsVertexArrayOES should be 16");
11073 static_assert(offsetof(IsVertexArrayOES
, header
) == 0,
11074 "offset of IsVertexArrayOES header should be 0");
11075 static_assert(offsetof(IsVertexArrayOES
, array
) == 4,
11076 "offset of IsVertexArrayOES array should be 4");
11077 static_assert(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
11078 "offset of IsVertexArrayOES result_shm_id should be 8");
11079 static_assert(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
11080 "offset of IsVertexArrayOES result_shm_offset should be 12");
11082 struct BindVertexArrayOES
{
11083 typedef BindVertexArrayOES ValueType
;
11084 static const CommandId kCmdId
= kBindVertexArrayOES
;
11085 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11086 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11088 static uint32_t ComputeSize() {
11089 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11092 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11094 void Init(GLuint _array
) {
11099 void* Set(void* cmd
, GLuint _array
) {
11100 static_cast<ValueType
*>(cmd
)->Init(_array
);
11101 return NextCmdAddress
<ValueType
>(cmd
);
11104 gpu::CommandHeader header
;
11108 static_assert(sizeof(BindVertexArrayOES
) == 8,
11109 "size of BindVertexArrayOES should be 8");
11110 static_assert(offsetof(BindVertexArrayOES
, header
) == 0,
11111 "offset of BindVertexArrayOES header should be 0");
11112 static_assert(offsetof(BindVertexArrayOES
, array
) == 4,
11113 "offset of BindVertexArrayOES array should be 4");
11115 struct SwapBuffers
{
11116 typedef SwapBuffers ValueType
;
11117 static const CommandId kCmdId
= kSwapBuffers
;
11118 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11119 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11121 static uint32_t ComputeSize() {
11122 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11125 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11127 void Init() { SetHeader(); }
11129 void* Set(void* cmd
) {
11130 static_cast<ValueType
*>(cmd
)->Init();
11131 return NextCmdAddress
<ValueType
>(cmd
);
11134 gpu::CommandHeader header
;
11137 static_assert(sizeof(SwapBuffers
) == 4, "size of SwapBuffers should be 4");
11138 static_assert(offsetof(SwapBuffers
, header
) == 0,
11139 "offset of SwapBuffers header should be 0");
11141 struct GetMaxValueInBufferCHROMIUM
{
11142 typedef GetMaxValueInBufferCHROMIUM ValueType
;
11143 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
11144 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11145 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11147 typedef GLuint Result
;
11149 static uint32_t ComputeSize() {
11150 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11153 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11155 void Init(GLuint _buffer_id
,
11159 uint32_t _result_shm_id
,
11160 uint32_t _result_shm_offset
) {
11162 buffer_id
= _buffer_id
;
11166 result_shm_id
= _result_shm_id
;
11167 result_shm_offset
= _result_shm_offset
;
11170 void* Set(void* cmd
,
11175 uint32_t _result_shm_id
,
11176 uint32_t _result_shm_offset
) {
11177 static_cast<ValueType
*>(cmd
)->Init(_buffer_id
, _count
, _type
, _offset
,
11178 _result_shm_id
, _result_shm_offset
);
11179 return NextCmdAddress
<ValueType
>(cmd
);
11182 gpu::CommandHeader header
;
11183 uint32_t buffer_id
;
11187 uint32_t result_shm_id
;
11188 uint32_t result_shm_offset
;
11191 static_assert(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
11192 "size of GetMaxValueInBufferCHROMIUM should be 28");
11193 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
11194 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
11195 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
11196 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
11197 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
11198 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
11199 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
11200 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
11201 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
11202 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
11204 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
11205 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
11207 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
11208 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
11210 struct EnableFeatureCHROMIUM
{
11211 typedef EnableFeatureCHROMIUM ValueType
;
11212 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
11213 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11214 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11216 typedef GLint Result
;
11218 static uint32_t ComputeSize() {
11219 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11222 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11224 void Init(GLuint _bucket_id
,
11225 uint32_t _result_shm_id
,
11226 uint32_t _result_shm_offset
) {
11228 bucket_id
= _bucket_id
;
11229 result_shm_id
= _result_shm_id
;
11230 result_shm_offset
= _result_shm_offset
;
11233 void* Set(void* cmd
,
11235 uint32_t _result_shm_id
,
11236 uint32_t _result_shm_offset
) {
11237 static_cast<ValueType
*>(cmd
)
11238 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
11239 return NextCmdAddress
<ValueType
>(cmd
);
11242 gpu::CommandHeader header
;
11243 uint32_t bucket_id
;
11244 uint32_t result_shm_id
;
11245 uint32_t result_shm_offset
;
11248 static_assert(sizeof(EnableFeatureCHROMIUM
) == 16,
11249 "size of EnableFeatureCHROMIUM should be 16");
11250 static_assert(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
11251 "offset of EnableFeatureCHROMIUM header should be 0");
11252 static_assert(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
11253 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
11254 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
11255 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
11256 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
11257 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
11259 struct MapBufferRange
{
11260 typedef MapBufferRange ValueType
;
11261 static const CommandId kCmdId
= kMapBufferRange
;
11262 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11263 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11265 typedef uint32_t Result
;
11267 static uint32_t ComputeSize() {
11268 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11271 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11273 void Init(GLenum _target
,
11276 GLbitfield _access
,
11277 uint32_t _data_shm_id
,
11278 uint32_t _data_shm_offset
,
11279 uint32_t _result_shm_id
,
11280 uint32_t _result_shm_offset
) {
11286 data_shm_id
= _data_shm_id
;
11287 data_shm_offset
= _data_shm_offset
;
11288 result_shm_id
= _result_shm_id
;
11289 result_shm_offset
= _result_shm_offset
;
11292 void* Set(void* cmd
,
11296 GLbitfield _access
,
11297 uint32_t _data_shm_id
,
11298 uint32_t _data_shm_offset
,
11299 uint32_t _result_shm_id
,
11300 uint32_t _result_shm_offset
) {
11301 static_cast<ValueType
*>(cmd
)->Init(_target
, _offset
, _size
, _access
,
11302 _data_shm_id
, _data_shm_offset
,
11303 _result_shm_id
, _result_shm_offset
);
11304 return NextCmdAddress
<ValueType
>(cmd
);
11307 gpu::CommandHeader header
;
11312 uint32_t data_shm_id
;
11313 uint32_t data_shm_offset
;
11314 uint32_t result_shm_id
;
11315 uint32_t result_shm_offset
;
11318 static_assert(sizeof(MapBufferRange
) == 36,
11319 "size of MapBufferRange should be 36");
11320 static_assert(offsetof(MapBufferRange
, header
) == 0,
11321 "offset of MapBufferRange header should be 0");
11322 static_assert(offsetof(MapBufferRange
, target
) == 4,
11323 "offset of MapBufferRange target should be 4");
11324 static_assert(offsetof(MapBufferRange
, offset
) == 8,
11325 "offset of MapBufferRange offset should be 8");
11326 static_assert(offsetof(MapBufferRange
, size
) == 12,
11327 "offset of MapBufferRange size should be 12");
11328 static_assert(offsetof(MapBufferRange
, access
) == 16,
11329 "offset of MapBufferRange access should be 16");
11330 static_assert(offsetof(MapBufferRange
, data_shm_id
) == 20,
11331 "offset of MapBufferRange data_shm_id should be 20");
11332 static_assert(offsetof(MapBufferRange
, data_shm_offset
) == 24,
11333 "offset of MapBufferRange data_shm_offset should be 24");
11334 static_assert(offsetof(MapBufferRange
, result_shm_id
) == 28,
11335 "offset of MapBufferRange result_shm_id should be 28");
11336 static_assert(offsetof(MapBufferRange
, result_shm_offset
) == 32,
11337 "offset of MapBufferRange result_shm_offset should be 32");
11339 struct UnmapBuffer
{
11340 typedef UnmapBuffer ValueType
;
11341 static const CommandId kCmdId
= kUnmapBuffer
;
11342 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11343 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11345 static uint32_t ComputeSize() {
11346 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11349 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11351 void Init(GLenum _target
) {
11356 void* Set(void* cmd
, GLenum _target
) {
11357 static_cast<ValueType
*>(cmd
)->Init(_target
);
11358 return NextCmdAddress
<ValueType
>(cmd
);
11361 gpu::CommandHeader header
;
11365 static_assert(sizeof(UnmapBuffer
) == 8, "size of UnmapBuffer should be 8");
11366 static_assert(offsetof(UnmapBuffer
, header
) == 0,
11367 "offset of UnmapBuffer header should be 0");
11368 static_assert(offsetof(UnmapBuffer
, target
) == 4,
11369 "offset of UnmapBuffer target should be 4");
11371 struct ResizeCHROMIUM
{
11372 typedef ResizeCHROMIUM ValueType
;
11373 static const CommandId kCmdId
= kResizeCHROMIUM
;
11374 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11377 static uint32_t ComputeSize() {
11378 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11381 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11383 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
11387 scale_factor
= _scale_factor
;
11390 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
11391 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
11392 return NextCmdAddress
<ValueType
>(cmd
);
11395 gpu::CommandHeader header
;
11398 float scale_factor
;
11401 static_assert(sizeof(ResizeCHROMIUM
) == 16,
11402 "size of ResizeCHROMIUM should be 16");
11403 static_assert(offsetof(ResizeCHROMIUM
, header
) == 0,
11404 "offset of ResizeCHROMIUM header should be 0");
11405 static_assert(offsetof(ResizeCHROMIUM
, width
) == 4,
11406 "offset of ResizeCHROMIUM width should be 4");
11407 static_assert(offsetof(ResizeCHROMIUM
, height
) == 8,
11408 "offset of ResizeCHROMIUM height should be 8");
11409 static_assert(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
11410 "offset of ResizeCHROMIUM scale_factor should be 12");
11412 struct GetRequestableExtensionsCHROMIUM
{
11413 typedef GetRequestableExtensionsCHROMIUM ValueType
;
11414 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
11415 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11416 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11418 static uint32_t ComputeSize() {
11419 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11422 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11424 void Init(uint32_t _bucket_id
) {
11426 bucket_id
= _bucket_id
;
11429 void* Set(void* cmd
, uint32_t _bucket_id
) {
11430 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11431 return NextCmdAddress
<ValueType
>(cmd
);
11434 gpu::CommandHeader header
;
11435 uint32_t bucket_id
;
11438 static_assert(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
11439 "size of GetRequestableExtensionsCHROMIUM should be 8");
11440 static_assert(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
11441 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
11443 offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
11444 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
11446 struct RequestExtensionCHROMIUM
{
11447 typedef RequestExtensionCHROMIUM ValueType
;
11448 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
11449 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11450 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11452 static uint32_t ComputeSize() {
11453 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11456 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11458 void Init(uint32_t _bucket_id
) {
11460 bucket_id
= _bucket_id
;
11463 void* Set(void* cmd
, uint32_t _bucket_id
) {
11464 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11465 return NextCmdAddress
<ValueType
>(cmd
);
11468 gpu::CommandHeader header
;
11469 uint32_t bucket_id
;
11472 static_assert(sizeof(RequestExtensionCHROMIUM
) == 8,
11473 "size of RequestExtensionCHROMIUM should be 8");
11474 static_assert(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
11475 "offset of RequestExtensionCHROMIUM header should be 0");
11476 static_assert(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
11477 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
11479 struct GetProgramInfoCHROMIUM
{
11480 typedef GetProgramInfoCHROMIUM ValueType
;
11481 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
11482 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11483 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11486 uint32_t link_status
;
11487 uint32_t num_attribs
;
11488 uint32_t num_uniforms
;
11491 static uint32_t ComputeSize() {
11492 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11495 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11497 void Init(GLuint _program
, uint32_t _bucket_id
) {
11499 program
= _program
;
11500 bucket_id
= _bucket_id
;
11503 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11504 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11505 return NextCmdAddress
<ValueType
>(cmd
);
11508 gpu::CommandHeader header
;
11510 uint32_t bucket_id
;
11513 static_assert(sizeof(GetProgramInfoCHROMIUM
) == 12,
11514 "size of GetProgramInfoCHROMIUM should be 12");
11515 static_assert(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
11516 "offset of GetProgramInfoCHROMIUM header should be 0");
11517 static_assert(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
11518 "offset of GetProgramInfoCHROMIUM program should be 4");
11519 static_assert(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
11520 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11521 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
11522 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11524 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
11525 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11527 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
11528 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11531 struct GetUniformBlocksCHROMIUM
{
11532 typedef GetUniformBlocksCHROMIUM ValueType
;
11533 static const CommandId kCmdId
= kGetUniformBlocksCHROMIUM
;
11534 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11535 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11537 typedef uint32_t Result
;
11539 static uint32_t ComputeSize() {
11540 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11543 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11545 void Init(GLuint _program
, uint32_t _bucket_id
) {
11547 program
= _program
;
11548 bucket_id
= _bucket_id
;
11551 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11552 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11553 return NextCmdAddress
<ValueType
>(cmd
);
11556 gpu::CommandHeader header
;
11558 uint32_t bucket_id
;
11561 static_assert(sizeof(GetUniformBlocksCHROMIUM
) == 12,
11562 "size of GetUniformBlocksCHROMIUM should be 12");
11563 static_assert(offsetof(GetUniformBlocksCHROMIUM
, header
) == 0,
11564 "offset of GetUniformBlocksCHROMIUM header should be 0");
11565 static_assert(offsetof(GetUniformBlocksCHROMIUM
, program
) == 4,
11566 "offset of GetUniformBlocksCHROMIUM program should be 4");
11567 static_assert(offsetof(GetUniformBlocksCHROMIUM
, bucket_id
) == 8,
11568 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11570 struct GetTransformFeedbackVaryingsCHROMIUM
{
11571 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType
;
11572 static const CommandId kCmdId
= kGetTransformFeedbackVaryingsCHROMIUM
;
11573 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11574 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11576 typedef uint32_t Result
;
11578 static uint32_t ComputeSize() {
11579 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11582 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11584 void Init(GLuint _program
, uint32_t _bucket_id
) {
11586 program
= _program
;
11587 bucket_id
= _bucket_id
;
11590 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11591 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11592 return NextCmdAddress
<ValueType
>(cmd
);
11595 gpu::CommandHeader header
;
11597 uint32_t bucket_id
;
11600 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM
) == 12,
11601 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11603 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, header
) == 0,
11604 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11606 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, program
) == 4,
11607 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11609 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, bucket_id
) == 8,
11610 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11612 struct GetUniformsES3CHROMIUM
{
11613 typedef GetUniformsES3CHROMIUM ValueType
;
11614 static const CommandId kCmdId
= kGetUniformsES3CHROMIUM
;
11615 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11616 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11618 typedef uint32_t Result
;
11620 static uint32_t ComputeSize() {
11621 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11624 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11626 void Init(GLuint _program
, uint32_t _bucket_id
) {
11628 program
= _program
;
11629 bucket_id
= _bucket_id
;
11632 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11633 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11634 return NextCmdAddress
<ValueType
>(cmd
);
11637 gpu::CommandHeader header
;
11639 uint32_t bucket_id
;
11642 static_assert(sizeof(GetUniformsES3CHROMIUM
) == 12,
11643 "size of GetUniformsES3CHROMIUM should be 12");
11644 static_assert(offsetof(GetUniformsES3CHROMIUM
, header
) == 0,
11645 "offset of GetUniformsES3CHROMIUM header should be 0");
11646 static_assert(offsetof(GetUniformsES3CHROMIUM
, program
) == 4,
11647 "offset of GetUniformsES3CHROMIUM program should be 4");
11648 static_assert(offsetof(GetUniformsES3CHROMIUM
, bucket_id
) == 8,
11649 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
11651 struct GetTranslatedShaderSourceANGLE
{
11652 typedef GetTranslatedShaderSourceANGLE ValueType
;
11653 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
11654 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11655 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11657 static uint32_t ComputeSize() {
11658 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11661 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11663 void Init(GLuint _shader
, uint32_t _bucket_id
) {
11666 bucket_id
= _bucket_id
;
11669 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
11670 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
11671 return NextCmdAddress
<ValueType
>(cmd
);
11674 gpu::CommandHeader header
;
11676 uint32_t bucket_id
;
11679 static_assert(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
11680 "size of GetTranslatedShaderSourceANGLE should be 12");
11681 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
11682 "offset of GetTranslatedShaderSourceANGLE header should be 0");
11683 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
11684 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
11685 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
11686 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
11688 struct PostSubBufferCHROMIUM
{
11689 typedef PostSubBufferCHROMIUM ValueType
;
11690 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
11691 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11692 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11694 static uint32_t ComputeSize() {
11695 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11698 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11700 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11708 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11709 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
11710 return NextCmdAddress
<ValueType
>(cmd
);
11713 gpu::CommandHeader header
;
11720 static_assert(sizeof(PostSubBufferCHROMIUM
) == 20,
11721 "size of PostSubBufferCHROMIUM should be 20");
11722 static_assert(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
11723 "offset of PostSubBufferCHROMIUM header should be 0");
11724 static_assert(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
11725 "offset of PostSubBufferCHROMIUM x should be 4");
11726 static_assert(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
11727 "offset of PostSubBufferCHROMIUM y should be 8");
11728 static_assert(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
11729 "offset of PostSubBufferCHROMIUM width should be 12");
11730 static_assert(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
11731 "offset of PostSubBufferCHROMIUM height should be 16");
11733 struct TexImageIOSurface2DCHROMIUM
{
11734 typedef TexImageIOSurface2DCHROMIUM ValueType
;
11735 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
11736 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11737 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11739 static uint32_t ComputeSize() {
11740 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11743 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11745 void Init(GLenum _target
,
11748 GLuint _ioSurfaceId
,
11754 ioSurfaceId
= _ioSurfaceId
;
11758 void* Set(void* cmd
,
11762 GLuint _ioSurfaceId
,
11764 static_cast<ValueType
*>(cmd
)
11765 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
11766 return NextCmdAddress
<ValueType
>(cmd
);
11769 gpu::CommandHeader header
;
11773 uint32_t ioSurfaceId
;
11777 static_assert(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
11778 "size of TexImageIOSurface2DCHROMIUM should be 24");
11779 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
11780 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
11781 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
11782 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
11783 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
11784 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
11785 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
11786 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
11787 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
11788 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
11789 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
11790 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
11792 struct CopyTextureCHROMIUM
{
11793 typedef CopyTextureCHROMIUM ValueType
;
11794 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
11795 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11796 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11798 static uint32_t ComputeSize() {
11799 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11802 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11804 void Init(GLenum _target
,
11807 GLint _internalformat
,
11808 GLenum _dest_type
) {
11811 source_id
= _source_id
;
11812 dest_id
= _dest_id
;
11813 internalformat
= _internalformat
;
11814 dest_type
= _dest_type
;
11817 void* Set(void* cmd
,
11821 GLint _internalformat
,
11822 GLenum _dest_type
) {
11823 static_cast<ValueType
*>(cmd
)
11824 ->Init(_target
, _source_id
, _dest_id
, _internalformat
, _dest_type
);
11825 return NextCmdAddress
<ValueType
>(cmd
);
11828 gpu::CommandHeader header
;
11830 uint32_t source_id
;
11832 int32_t internalformat
;
11833 uint32_t dest_type
;
11836 static_assert(sizeof(CopyTextureCHROMIUM
) == 24,
11837 "size of CopyTextureCHROMIUM should be 24");
11838 static_assert(offsetof(CopyTextureCHROMIUM
, header
) == 0,
11839 "offset of CopyTextureCHROMIUM header should be 0");
11840 static_assert(offsetof(CopyTextureCHROMIUM
, target
) == 4,
11841 "offset of CopyTextureCHROMIUM target should be 4");
11842 static_assert(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
11843 "offset of CopyTextureCHROMIUM source_id should be 8");
11844 static_assert(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
11845 "offset of CopyTextureCHROMIUM dest_id should be 12");
11846 static_assert(offsetof(CopyTextureCHROMIUM
, internalformat
) == 16,
11847 "offset of CopyTextureCHROMIUM internalformat should be 16");
11848 static_assert(offsetof(CopyTextureCHROMIUM
, dest_type
) == 20,
11849 "offset of CopyTextureCHROMIUM dest_type should be 20");
11851 struct CopySubTextureCHROMIUM
{
11852 typedef CopySubTextureCHROMIUM ValueType
;
11853 static const CommandId kCmdId
= kCopySubTextureCHROMIUM
;
11854 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11855 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11857 static uint32_t ComputeSize() {
11858 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11861 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11863 void Init(GLenum _target
,
11870 source_id
= _source_id
;
11871 dest_id
= _dest_id
;
11872 xoffset
= _xoffset
;
11873 yoffset
= _yoffset
;
11876 void* Set(void* cmd
,
11882 static_cast<ValueType
*>(cmd
)
11883 ->Init(_target
, _source_id
, _dest_id
, _xoffset
, _yoffset
);
11884 return NextCmdAddress
<ValueType
>(cmd
);
11887 gpu::CommandHeader header
;
11889 uint32_t source_id
;
11895 static_assert(sizeof(CopySubTextureCHROMIUM
) == 24,
11896 "size of CopySubTextureCHROMIUM should be 24");
11897 static_assert(offsetof(CopySubTextureCHROMIUM
, header
) == 0,
11898 "offset of CopySubTextureCHROMIUM header should be 0");
11899 static_assert(offsetof(CopySubTextureCHROMIUM
, target
) == 4,
11900 "offset of CopySubTextureCHROMIUM target should be 4");
11901 static_assert(offsetof(CopySubTextureCHROMIUM
, source_id
) == 8,
11902 "offset of CopySubTextureCHROMIUM source_id should be 8");
11903 static_assert(offsetof(CopySubTextureCHROMIUM
, dest_id
) == 12,
11904 "offset of CopySubTextureCHROMIUM dest_id should be 12");
11905 static_assert(offsetof(CopySubTextureCHROMIUM
, xoffset
) == 16,
11906 "offset of CopySubTextureCHROMIUM xoffset should be 16");
11907 static_assert(offsetof(CopySubTextureCHROMIUM
, yoffset
) == 20,
11908 "offset of CopySubTextureCHROMIUM yoffset should be 20");
11910 struct DrawArraysInstancedANGLE
{
11911 typedef DrawArraysInstancedANGLE ValueType
;
11912 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
11913 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11914 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11916 static uint32_t ComputeSize() {
11917 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11920 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11922 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
11927 primcount
= _primcount
;
11930 void* Set(void* cmd
,
11934 GLsizei _primcount
) {
11935 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
11936 return NextCmdAddress
<ValueType
>(cmd
);
11939 gpu::CommandHeader header
;
11946 static_assert(sizeof(DrawArraysInstancedANGLE
) == 20,
11947 "size of DrawArraysInstancedANGLE should be 20");
11948 static_assert(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
11949 "offset of DrawArraysInstancedANGLE header should be 0");
11950 static_assert(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
11951 "offset of DrawArraysInstancedANGLE mode should be 4");
11952 static_assert(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
11953 "offset of DrawArraysInstancedANGLE first should be 8");
11954 static_assert(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
11955 "offset of DrawArraysInstancedANGLE count should be 12");
11956 static_assert(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
11957 "offset of DrawArraysInstancedANGLE primcount should be 16");
11959 struct DrawElementsInstancedANGLE
{
11960 typedef DrawElementsInstancedANGLE ValueType
;
11961 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
11962 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11963 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11965 static uint32_t ComputeSize() {
11966 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11969 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11971 void Init(GLenum _mode
,
11974 GLuint _index_offset
,
11975 GLsizei _primcount
) {
11980 index_offset
= _index_offset
;
11981 primcount
= _primcount
;
11984 void* Set(void* cmd
,
11988 GLuint _index_offset
,
11989 GLsizei _primcount
) {
11990 static_cast<ValueType
*>(cmd
)
11991 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
11992 return NextCmdAddress
<ValueType
>(cmd
);
11995 gpu::CommandHeader header
;
11999 uint32_t index_offset
;
12003 static_assert(sizeof(DrawElementsInstancedANGLE
) == 24,
12004 "size of DrawElementsInstancedANGLE should be 24");
12005 static_assert(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
12006 "offset of DrawElementsInstancedANGLE header should be 0");
12007 static_assert(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
12008 "offset of DrawElementsInstancedANGLE mode should be 4");
12009 static_assert(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
12010 "offset of DrawElementsInstancedANGLE count should be 8");
12011 static_assert(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
12012 "offset of DrawElementsInstancedANGLE type should be 12");
12013 static_assert(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
12014 "offset of DrawElementsInstancedANGLE index_offset should be 16");
12015 static_assert(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
12016 "offset of DrawElementsInstancedANGLE primcount should be 20");
12018 struct VertexAttribDivisorANGLE
{
12019 typedef VertexAttribDivisorANGLE ValueType
;
12020 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
12021 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12022 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12024 static uint32_t ComputeSize() {
12025 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12028 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12030 void Init(GLuint _index
, GLuint _divisor
) {
12033 divisor
= _divisor
;
12036 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
12037 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
12038 return NextCmdAddress
<ValueType
>(cmd
);
12041 gpu::CommandHeader header
;
12046 static_assert(sizeof(VertexAttribDivisorANGLE
) == 12,
12047 "size of VertexAttribDivisorANGLE should be 12");
12048 static_assert(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
12049 "offset of VertexAttribDivisorANGLE header should be 0");
12050 static_assert(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
12051 "offset of VertexAttribDivisorANGLE index should be 4");
12052 static_assert(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
12053 "offset of VertexAttribDivisorANGLE divisor should be 8");
12055 struct ProduceTextureCHROMIUMImmediate
{
12056 typedef ProduceTextureCHROMIUMImmediate ValueType
;
12057 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
12058 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12059 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12061 static uint32_t ComputeDataSize() {
12062 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12065 static uint32_t ComputeSize() {
12066 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12069 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12071 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
12074 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12077 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
12078 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
12079 const uint32_t size
= ComputeSize();
12080 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12083 gpu::CommandHeader header
;
12087 static_assert(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
12088 "size of ProduceTextureCHROMIUMImmediate should be 8");
12089 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
12090 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
12091 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
12092 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
12094 struct ProduceTextureDirectCHROMIUMImmediate
{
12095 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
12096 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
12097 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12098 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12100 static uint32_t ComputeDataSize() {
12101 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12104 static uint32_t ComputeSize() {
12105 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12108 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12110 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
12112 texture
= _texture
;
12114 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12117 void* Set(void* cmd
,
12120 const GLbyte
* _mailbox
) {
12121 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
12122 const uint32_t size
= ComputeSize();
12123 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12126 gpu::CommandHeader header
;
12131 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
12132 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
12134 offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
12135 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
12137 offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
12138 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
12140 offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
12141 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
12143 struct ConsumeTextureCHROMIUMImmediate
{
12144 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
12145 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
12146 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12147 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12149 static uint32_t ComputeDataSize() {
12150 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12153 static uint32_t ComputeSize() {
12154 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12157 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12159 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
12162 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12165 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
12166 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
12167 const uint32_t size
= ComputeSize();
12168 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12171 gpu::CommandHeader header
;
12175 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
12176 "size of ConsumeTextureCHROMIUMImmediate should be 8");
12177 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
12178 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
12179 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
12180 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
12182 struct BindUniformLocationCHROMIUMBucket
{
12183 typedef BindUniformLocationCHROMIUMBucket ValueType
;
12184 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
12185 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12186 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12188 static uint32_t ComputeSize() {
12189 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12192 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12194 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
12196 program
= _program
;
12197 location
= _location
;
12198 name_bucket_id
= _name_bucket_id
;
12201 void* Set(void* cmd
,
12204 uint32_t _name_bucket_id
) {
12205 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
12206 return NextCmdAddress
<ValueType
>(cmd
);
12209 gpu::CommandHeader header
;
12212 uint32_t name_bucket_id
;
12215 static_assert(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
12216 "size of BindUniformLocationCHROMIUMBucket should be 16");
12217 static_assert(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
12218 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
12220 offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
12221 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
12223 offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
12224 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
12226 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
12227 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
12229 struct GenValuebuffersCHROMIUMImmediate
{
12230 typedef GenValuebuffersCHROMIUMImmediate ValueType
;
12231 static const CommandId kCmdId
= kGenValuebuffersCHROMIUMImmediate
;
12232 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12233 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12235 static uint32_t ComputeDataSize(GLsizei n
) {
12236 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
12239 static uint32_t ComputeSize(GLsizei n
) {
12240 return static_cast<uint32_t>(sizeof(ValueType
) +
12241 ComputeDataSize(n
)); // NOLINT
12244 void SetHeader(GLsizei n
) {
12245 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
12248 void Init(GLsizei _n
, GLuint
* _buffers
) {
12251 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
12254 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
12255 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
12256 const uint32_t size
= ComputeSize(_n
);
12257 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12260 gpu::CommandHeader header
;
12264 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate
) == 8,
12265 "size of GenValuebuffersCHROMIUMImmediate should be 8");
12266 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, header
) == 0,
12267 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
12268 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, n
) == 4,
12269 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
12271 struct DeleteValuebuffersCHROMIUMImmediate
{
12272 typedef DeleteValuebuffersCHROMIUMImmediate ValueType
;
12273 static const CommandId kCmdId
= kDeleteValuebuffersCHROMIUMImmediate
;
12274 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12275 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12277 static uint32_t ComputeDataSize(GLsizei n
) {
12278 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
12281 static uint32_t ComputeSize(GLsizei n
) {
12282 return static_cast<uint32_t>(sizeof(ValueType
) +
12283 ComputeDataSize(n
)); // NOLINT
12286 void SetHeader(GLsizei n
) {
12287 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
12290 void Init(GLsizei _n
, const GLuint
* _valuebuffers
) {
12293 memcpy(ImmediateDataAddress(this), _valuebuffers
, ComputeDataSize(_n
));
12296 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _valuebuffers
) {
12297 static_cast<ValueType
*>(cmd
)->Init(_n
, _valuebuffers
);
12298 const uint32_t size
= ComputeSize(_n
);
12299 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12302 gpu::CommandHeader header
;
12306 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate
) == 8,
12307 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
12309 offsetof(DeleteValuebuffersCHROMIUMImmediate
, header
) == 0,
12310 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
12311 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate
, n
) == 4,
12312 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
12314 struct IsValuebufferCHROMIUM
{
12315 typedef IsValuebufferCHROMIUM ValueType
;
12316 static const CommandId kCmdId
= kIsValuebufferCHROMIUM
;
12317 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12318 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12320 typedef uint32_t Result
;
12322 static uint32_t ComputeSize() {
12323 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12326 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12328 void Init(GLuint _valuebuffer
,
12329 uint32_t _result_shm_id
,
12330 uint32_t _result_shm_offset
) {
12332 valuebuffer
= _valuebuffer
;
12333 result_shm_id
= _result_shm_id
;
12334 result_shm_offset
= _result_shm_offset
;
12337 void* Set(void* cmd
,
12338 GLuint _valuebuffer
,
12339 uint32_t _result_shm_id
,
12340 uint32_t _result_shm_offset
) {
12341 static_cast<ValueType
*>(cmd
)
12342 ->Init(_valuebuffer
, _result_shm_id
, _result_shm_offset
);
12343 return NextCmdAddress
<ValueType
>(cmd
);
12346 gpu::CommandHeader header
;
12347 uint32_t valuebuffer
;
12348 uint32_t result_shm_id
;
12349 uint32_t result_shm_offset
;
12352 static_assert(sizeof(IsValuebufferCHROMIUM
) == 16,
12353 "size of IsValuebufferCHROMIUM should be 16");
12354 static_assert(offsetof(IsValuebufferCHROMIUM
, header
) == 0,
12355 "offset of IsValuebufferCHROMIUM header should be 0");
12356 static_assert(offsetof(IsValuebufferCHROMIUM
, valuebuffer
) == 4,
12357 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
12358 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_id
) == 8,
12359 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
12360 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_offset
) == 12,
12361 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
12363 struct BindValuebufferCHROMIUM
{
12364 typedef BindValuebufferCHROMIUM ValueType
;
12365 static const CommandId kCmdId
= kBindValuebufferCHROMIUM
;
12366 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12367 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12369 static uint32_t ComputeSize() {
12370 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12373 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12375 void Init(GLenum _target
, GLuint _valuebuffer
) {
12378 valuebuffer
= _valuebuffer
;
12381 void* Set(void* cmd
, GLenum _target
, GLuint _valuebuffer
) {
12382 static_cast<ValueType
*>(cmd
)->Init(_target
, _valuebuffer
);
12383 return NextCmdAddress
<ValueType
>(cmd
);
12386 gpu::CommandHeader header
;
12388 uint32_t valuebuffer
;
12391 static_assert(sizeof(BindValuebufferCHROMIUM
) == 12,
12392 "size of BindValuebufferCHROMIUM should be 12");
12393 static_assert(offsetof(BindValuebufferCHROMIUM
, header
) == 0,
12394 "offset of BindValuebufferCHROMIUM header should be 0");
12395 static_assert(offsetof(BindValuebufferCHROMIUM
, target
) == 4,
12396 "offset of BindValuebufferCHROMIUM target should be 4");
12397 static_assert(offsetof(BindValuebufferCHROMIUM
, valuebuffer
) == 8,
12398 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
12400 struct SubscribeValueCHROMIUM
{
12401 typedef SubscribeValueCHROMIUM ValueType
;
12402 static const CommandId kCmdId
= kSubscribeValueCHROMIUM
;
12403 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12404 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12406 static uint32_t ComputeSize() {
12407 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12410 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12412 void Init(GLenum _target
, GLenum _subscription
) {
12415 subscription
= _subscription
;
12418 void* Set(void* cmd
, GLenum _target
, GLenum _subscription
) {
12419 static_cast<ValueType
*>(cmd
)->Init(_target
, _subscription
);
12420 return NextCmdAddress
<ValueType
>(cmd
);
12423 gpu::CommandHeader header
;
12425 uint32_t subscription
;
12428 static_assert(sizeof(SubscribeValueCHROMIUM
) == 12,
12429 "size of SubscribeValueCHROMIUM should be 12");
12430 static_assert(offsetof(SubscribeValueCHROMIUM
, header
) == 0,
12431 "offset of SubscribeValueCHROMIUM header should be 0");
12432 static_assert(offsetof(SubscribeValueCHROMIUM
, target
) == 4,
12433 "offset of SubscribeValueCHROMIUM target should be 4");
12434 static_assert(offsetof(SubscribeValueCHROMIUM
, subscription
) == 8,
12435 "offset of SubscribeValueCHROMIUM subscription should be 8");
12437 struct PopulateSubscribedValuesCHROMIUM
{
12438 typedef PopulateSubscribedValuesCHROMIUM ValueType
;
12439 static const CommandId kCmdId
= kPopulateSubscribedValuesCHROMIUM
;
12440 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12441 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12443 static uint32_t ComputeSize() {
12444 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12447 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12449 void Init(GLenum _target
) {
12454 void* Set(void* cmd
, GLenum _target
) {
12455 static_cast<ValueType
*>(cmd
)->Init(_target
);
12456 return NextCmdAddress
<ValueType
>(cmd
);
12459 gpu::CommandHeader header
;
12463 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM
) == 8,
12464 "size of PopulateSubscribedValuesCHROMIUM should be 8");
12465 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, header
) == 0,
12466 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
12467 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, target
) == 4,
12468 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
12470 struct UniformValuebufferCHROMIUM
{
12471 typedef UniformValuebufferCHROMIUM ValueType
;
12472 static const CommandId kCmdId
= kUniformValuebufferCHROMIUM
;
12473 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12474 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12476 static uint32_t ComputeSize() {
12477 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12480 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12482 void Init(GLint _location
, GLenum _target
, GLenum _subscription
) {
12484 location
= _location
;
12486 subscription
= _subscription
;
12489 void* Set(void* cmd
, GLint _location
, GLenum _target
, GLenum _subscription
) {
12490 static_cast<ValueType
*>(cmd
)->Init(_location
, _target
, _subscription
);
12491 return NextCmdAddress
<ValueType
>(cmd
);
12494 gpu::CommandHeader header
;
12497 uint32_t subscription
;
12500 static_assert(sizeof(UniformValuebufferCHROMIUM
) == 16,
12501 "size of UniformValuebufferCHROMIUM should be 16");
12502 static_assert(offsetof(UniformValuebufferCHROMIUM
, header
) == 0,
12503 "offset of UniformValuebufferCHROMIUM header should be 0");
12504 static_assert(offsetof(UniformValuebufferCHROMIUM
, location
) == 4,
12505 "offset of UniformValuebufferCHROMIUM location should be 4");
12506 static_assert(offsetof(UniformValuebufferCHROMIUM
, target
) == 8,
12507 "offset of UniformValuebufferCHROMIUM target should be 8");
12508 static_assert(offsetof(UniformValuebufferCHROMIUM
, subscription
) == 12,
12509 "offset of UniformValuebufferCHROMIUM subscription should be 12");
12511 struct BindTexImage2DCHROMIUM
{
12512 typedef BindTexImage2DCHROMIUM ValueType
;
12513 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
12514 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12515 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12517 static uint32_t ComputeSize() {
12518 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12521 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12523 void Init(GLenum _target
, GLint _imageId
) {
12526 imageId
= _imageId
;
12529 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12530 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12531 return NextCmdAddress
<ValueType
>(cmd
);
12534 gpu::CommandHeader header
;
12539 static_assert(sizeof(BindTexImage2DCHROMIUM
) == 12,
12540 "size of BindTexImage2DCHROMIUM should be 12");
12541 static_assert(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
12542 "offset of BindTexImage2DCHROMIUM header should be 0");
12543 static_assert(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
12544 "offset of BindTexImage2DCHROMIUM target should be 4");
12545 static_assert(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
12546 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12548 struct ReleaseTexImage2DCHROMIUM
{
12549 typedef ReleaseTexImage2DCHROMIUM ValueType
;
12550 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
12551 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12552 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12554 static uint32_t ComputeSize() {
12555 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12558 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12560 void Init(GLenum _target
, GLint _imageId
) {
12563 imageId
= _imageId
;
12566 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12567 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12568 return NextCmdAddress
<ValueType
>(cmd
);
12571 gpu::CommandHeader header
;
12576 static_assert(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
12577 "size of ReleaseTexImage2DCHROMIUM should be 12");
12578 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
12579 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12580 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
12581 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12582 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
12583 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12585 struct TraceBeginCHROMIUM
{
12586 typedef TraceBeginCHROMIUM ValueType
;
12587 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
12588 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12589 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12591 static uint32_t ComputeSize() {
12592 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12595 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12597 void Init(GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12599 category_bucket_id
= _category_bucket_id
;
12600 name_bucket_id
= _name_bucket_id
;
12603 void* Set(void* cmd
, GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12604 static_cast<ValueType
*>(cmd
)->Init(_category_bucket_id
, _name_bucket_id
);
12605 return NextCmdAddress
<ValueType
>(cmd
);
12608 gpu::CommandHeader header
;
12609 uint32_t category_bucket_id
;
12610 uint32_t name_bucket_id
;
12613 static_assert(sizeof(TraceBeginCHROMIUM
) == 12,
12614 "size of TraceBeginCHROMIUM should be 12");
12615 static_assert(offsetof(TraceBeginCHROMIUM
, header
) == 0,
12616 "offset of TraceBeginCHROMIUM header should be 0");
12617 static_assert(offsetof(TraceBeginCHROMIUM
, category_bucket_id
) == 4,
12618 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
12619 static_assert(offsetof(TraceBeginCHROMIUM
, name_bucket_id
) == 8,
12620 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
12622 struct TraceEndCHROMIUM
{
12623 typedef TraceEndCHROMIUM ValueType
;
12624 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
12625 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12626 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12628 static uint32_t ComputeSize() {
12629 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12632 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12634 void Init() { SetHeader(); }
12636 void* Set(void* cmd
) {
12637 static_cast<ValueType
*>(cmd
)->Init();
12638 return NextCmdAddress
<ValueType
>(cmd
);
12641 gpu::CommandHeader header
;
12644 static_assert(sizeof(TraceEndCHROMIUM
) == 4,
12645 "size of TraceEndCHROMIUM should be 4");
12646 static_assert(offsetof(TraceEndCHROMIUM
, header
) == 0,
12647 "offset of TraceEndCHROMIUM header should be 0");
12649 struct AsyncTexSubImage2DCHROMIUM
{
12650 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
12651 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
12652 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12653 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12655 static uint32_t ComputeSize() {
12656 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12659 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12661 void Init(GLenum _target
,
12669 uint32_t _data_shm_id
,
12670 uint32_t _data_shm_offset
,
12671 uint32_t _async_upload_token
,
12672 uint32_t _sync_data_shm_id
,
12673 uint32_t _sync_data_shm_offset
) {
12677 xoffset
= _xoffset
;
12678 yoffset
= _yoffset
;
12683 data_shm_id
= _data_shm_id
;
12684 data_shm_offset
= _data_shm_offset
;
12685 async_upload_token
= _async_upload_token
;
12686 sync_data_shm_id
= _sync_data_shm_id
;
12687 sync_data_shm_offset
= _sync_data_shm_offset
;
12690 void* Set(void* cmd
,
12699 uint32_t _data_shm_id
,
12700 uint32_t _data_shm_offset
,
12701 uint32_t _async_upload_token
,
12702 uint32_t _sync_data_shm_id
,
12703 uint32_t _sync_data_shm_offset
) {
12704 static_cast<ValueType
*>(cmd
)
12705 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
12706 _type
, _data_shm_id
, _data_shm_offset
, _async_upload_token
,
12707 _sync_data_shm_id
, _sync_data_shm_offset
);
12708 return NextCmdAddress
<ValueType
>(cmd
);
12711 gpu::CommandHeader header
;
12720 uint32_t data_shm_id
;
12721 uint32_t data_shm_offset
;
12722 uint32_t async_upload_token
;
12723 uint32_t sync_data_shm_id
;
12724 uint32_t sync_data_shm_offset
;
12727 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
12728 "size of AsyncTexSubImage2DCHROMIUM should be 56");
12729 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
12730 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
12731 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
12732 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
12733 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
12734 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
12735 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
12736 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
12737 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
12738 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
12739 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
12740 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
12741 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
12742 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
12743 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
12744 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
12745 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
12746 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
12747 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
12748 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
12750 offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
12751 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
12753 offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
12754 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
12756 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
12757 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
12759 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
12760 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
12762 struct AsyncTexImage2DCHROMIUM
{
12763 typedef AsyncTexImage2DCHROMIUM ValueType
;
12764 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
12765 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12766 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12768 static uint32_t ComputeSize() {
12769 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12772 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12774 void Init(GLenum _target
,
12776 GLint _internalformat
,
12781 uint32_t _pixels_shm_id
,
12782 uint32_t _pixels_shm_offset
,
12783 uint32_t _async_upload_token
,
12784 uint32_t _sync_data_shm_id
,
12785 uint32_t _sync_data_shm_offset
) {
12789 internalformat
= _internalformat
;
12794 pixels_shm_id
= _pixels_shm_id
;
12795 pixels_shm_offset
= _pixels_shm_offset
;
12796 async_upload_token
= _async_upload_token
;
12797 sync_data_shm_id
= _sync_data_shm_id
;
12798 sync_data_shm_offset
= _sync_data_shm_offset
;
12801 void* Set(void* cmd
,
12804 GLint _internalformat
,
12809 uint32_t _pixels_shm_id
,
12810 uint32_t _pixels_shm_offset
,
12811 uint32_t _async_upload_token
,
12812 uint32_t _sync_data_shm_id
,
12813 uint32_t _sync_data_shm_offset
) {
12814 static_cast<ValueType
*>(cmd
)
12815 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _format
,
12816 _type
, _pixels_shm_id
, _pixels_shm_offset
, _async_upload_token
,
12817 _sync_data_shm_id
, _sync_data_shm_offset
);
12818 return NextCmdAddress
<ValueType
>(cmd
);
12821 gpu::CommandHeader header
;
12824 int32_t internalformat
;
12829 uint32_t pixels_shm_id
;
12830 uint32_t pixels_shm_offset
;
12831 uint32_t async_upload_token
;
12832 uint32_t sync_data_shm_id
;
12833 uint32_t sync_data_shm_offset
;
12834 static const int32_t border
= 0;
12837 static_assert(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
12838 "size of AsyncTexImage2DCHROMIUM should be 52");
12839 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
12840 "offset of AsyncTexImage2DCHROMIUM header should be 0");
12841 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
12842 "offset of AsyncTexImage2DCHROMIUM target should be 4");
12843 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
12844 "offset of AsyncTexImage2DCHROMIUM level should be 8");
12845 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
12846 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
12847 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
12848 "offset of AsyncTexImage2DCHROMIUM width should be 16");
12849 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
12850 "offset of AsyncTexImage2DCHROMIUM height should be 20");
12851 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
12852 "offset of AsyncTexImage2DCHROMIUM format should be 24");
12853 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
12854 "offset of AsyncTexImage2DCHROMIUM type should be 28");
12855 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
12856 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
12858 offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
12859 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
12861 offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
12862 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
12864 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
12865 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
12867 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
12868 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
12870 struct WaitAsyncTexImage2DCHROMIUM
{
12871 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
12872 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
12873 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12874 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12876 static uint32_t ComputeSize() {
12877 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12880 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12882 void Init(GLenum _target
) {
12887 void* Set(void* cmd
, GLenum _target
) {
12888 static_cast<ValueType
*>(cmd
)->Init(_target
);
12889 return NextCmdAddress
<ValueType
>(cmd
);
12892 gpu::CommandHeader header
;
12896 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
12897 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
12898 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
12899 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
12900 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
12901 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
12903 struct WaitAllAsyncTexImage2DCHROMIUM
{
12904 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
12905 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
12906 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12907 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12909 static uint32_t ComputeSize() {
12910 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12913 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12915 void Init() { SetHeader(); }
12917 void* Set(void* cmd
) {
12918 static_cast<ValueType
*>(cmd
)->Init();
12919 return NextCmdAddress
<ValueType
>(cmd
);
12922 gpu::CommandHeader header
;
12925 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
12926 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
12927 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
12928 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
12930 struct DiscardFramebufferEXTImmediate
{
12931 typedef DiscardFramebufferEXTImmediate ValueType
;
12932 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
12933 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12934 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12936 static uint32_t ComputeDataSize(GLsizei count
) {
12937 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
12940 static uint32_t ComputeSize(GLsizei count
) {
12941 return static_cast<uint32_t>(sizeof(ValueType
) +
12942 ComputeDataSize(count
)); // NOLINT
12945 void SetHeader(GLsizei count
) {
12946 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
12949 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
12953 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
12956 void* Set(void* cmd
,
12959 const GLenum
* _attachments
) {
12960 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
12961 const uint32_t size
= ComputeSize(_count
);
12962 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12965 gpu::CommandHeader header
;
12970 static_assert(sizeof(DiscardFramebufferEXTImmediate
) == 12,
12971 "size of DiscardFramebufferEXTImmediate should be 12");
12972 static_assert(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
12973 "offset of DiscardFramebufferEXTImmediate header should be 0");
12974 static_assert(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
12975 "offset of DiscardFramebufferEXTImmediate target should be 4");
12976 static_assert(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
12977 "offset of DiscardFramebufferEXTImmediate count should be 8");
12979 struct LoseContextCHROMIUM
{
12980 typedef LoseContextCHROMIUM ValueType
;
12981 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
12982 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12983 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12985 static uint32_t ComputeSize() {
12986 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12989 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12991 void Init(GLenum _current
, GLenum _other
) {
12993 current
= _current
;
12997 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
12998 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
12999 return NextCmdAddress
<ValueType
>(cmd
);
13002 gpu::CommandHeader header
;
13007 static_assert(sizeof(LoseContextCHROMIUM
) == 12,
13008 "size of LoseContextCHROMIUM should be 12");
13009 static_assert(offsetof(LoseContextCHROMIUM
, header
) == 0,
13010 "offset of LoseContextCHROMIUM header should be 0");
13011 static_assert(offsetof(LoseContextCHROMIUM
, current
) == 4,
13012 "offset of LoseContextCHROMIUM current should be 4");
13013 static_assert(offsetof(LoseContextCHROMIUM
, other
) == 8,
13014 "offset of LoseContextCHROMIUM other should be 8");
13016 struct WaitSyncPointCHROMIUM
{
13017 typedef WaitSyncPointCHROMIUM ValueType
;
13018 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
13019 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13020 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
13022 static uint32_t ComputeSize() {
13023 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13026 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13028 void Init(GLuint _sync_point
) {
13030 sync_point
= _sync_point
;
13033 void* Set(void* cmd
, GLuint _sync_point
) {
13034 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
13035 return NextCmdAddress
<ValueType
>(cmd
);
13038 gpu::CommandHeader header
;
13039 uint32_t sync_point
;
13042 static_assert(sizeof(WaitSyncPointCHROMIUM
) == 8,
13043 "size of WaitSyncPointCHROMIUM should be 8");
13044 static_assert(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
13045 "offset of WaitSyncPointCHROMIUM header should be 0");
13046 static_assert(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
13047 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
13049 struct DrawBuffersEXTImmediate
{
13050 typedef DrawBuffersEXTImmediate ValueType
;
13051 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
13052 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
13053 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13055 static uint32_t ComputeDataSize(GLsizei count
) {
13056 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
13059 static uint32_t ComputeSize(GLsizei count
) {
13060 return static_cast<uint32_t>(sizeof(ValueType
) +
13061 ComputeDataSize(count
)); // NOLINT
13064 void SetHeader(GLsizei count
) {
13065 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
13068 void Init(GLsizei _count
, const GLenum
* _bufs
) {
13071 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
13074 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
13075 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
13076 const uint32_t size
= ComputeSize(_count
);
13077 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
13080 gpu::CommandHeader header
;
13084 static_assert(sizeof(DrawBuffersEXTImmediate
) == 8,
13085 "size of DrawBuffersEXTImmediate should be 8");
13086 static_assert(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
13087 "offset of DrawBuffersEXTImmediate header should be 0");
13088 static_assert(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
13089 "offset of DrawBuffersEXTImmediate count should be 4");
13091 struct DiscardBackbufferCHROMIUM
{
13092 typedef DiscardBackbufferCHROMIUM ValueType
;
13093 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
13094 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13095 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13097 static uint32_t ComputeSize() {
13098 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13101 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13103 void Init() { SetHeader(); }
13105 void* Set(void* cmd
) {
13106 static_cast<ValueType
*>(cmd
)->Init();
13107 return NextCmdAddress
<ValueType
>(cmd
);
13110 gpu::CommandHeader header
;
13113 static_assert(sizeof(DiscardBackbufferCHROMIUM
) == 4,
13114 "size of DiscardBackbufferCHROMIUM should be 4");
13115 static_assert(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
13116 "offset of DiscardBackbufferCHROMIUM header should be 0");
13118 struct ScheduleOverlayPlaneCHROMIUM
{
13119 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
13120 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
13121 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13122 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13124 static uint32_t ComputeSize() {
13125 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13128 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13130 void Init(GLint _plane_z_order
,
13131 GLenum _plane_transform
,
13132 GLuint _overlay_texture_id
,
13135 GLint _bounds_width
,
13136 GLint _bounds_height
,
13140 GLfloat _uv_height
) {
13142 plane_z_order
= _plane_z_order
;
13143 plane_transform
= _plane_transform
;
13144 overlay_texture_id
= _overlay_texture_id
;
13145 bounds_x
= _bounds_x
;
13146 bounds_y
= _bounds_y
;
13147 bounds_width
= _bounds_width
;
13148 bounds_height
= _bounds_height
;
13151 uv_width
= _uv_width
;
13152 uv_height
= _uv_height
;
13155 void* Set(void* cmd
,
13156 GLint _plane_z_order
,
13157 GLenum _plane_transform
,
13158 GLuint _overlay_texture_id
,
13161 GLint _bounds_width
,
13162 GLint _bounds_height
,
13166 GLfloat _uv_height
) {
13167 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
, _plane_transform
,
13168 _overlay_texture_id
, _bounds_x
,
13169 _bounds_y
, _bounds_width
, _bounds_height
,
13170 _uv_x
, _uv_y
, _uv_width
, _uv_height
);
13171 return NextCmdAddress
<ValueType
>(cmd
);
13174 gpu::CommandHeader header
;
13175 int32_t plane_z_order
;
13176 uint32_t plane_transform
;
13177 uint32_t overlay_texture_id
;
13180 int32_t bounds_width
;
13181 int32_t bounds_height
;
13188 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
13189 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
13190 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
13191 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
13193 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
13194 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
13196 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
13197 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
13199 offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
13200 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
13201 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
13202 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
13203 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
13204 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
13206 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
13207 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
13209 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
13210 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
13211 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
13212 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
13213 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
13214 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
13215 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
13216 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
13217 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
13218 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
13220 struct SwapInterval
{
13221 typedef SwapInterval ValueType
;
13222 static const CommandId kCmdId
= kSwapInterval
;
13223 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13224 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
13226 static uint32_t ComputeSize() {
13227 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13230 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13232 void Init(GLint _interval
) {
13234 interval
= _interval
;
13237 void* Set(void* cmd
, GLint _interval
) {
13238 static_cast<ValueType
*>(cmd
)->Init(_interval
);
13239 return NextCmdAddress
<ValueType
>(cmd
);
13242 gpu::CommandHeader header
;
13246 static_assert(sizeof(SwapInterval
) == 8, "size of SwapInterval should be 8");
13247 static_assert(offsetof(SwapInterval
, header
) == 0,
13248 "offset of SwapInterval header should be 0");
13249 static_assert(offsetof(SwapInterval
, interval
) == 4,
13250 "offset of SwapInterval interval should be 4");
13252 struct MatrixLoadfCHROMIUMImmediate
{
13253 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
13254 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
13255 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
13256 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13258 static uint32_t ComputeDataSize() {
13259 return static_cast<uint32_t>(sizeof(GLfloat
) * 16);
13262 static uint32_t ComputeSize() {
13263 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
13266 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
13268 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
13270 matrixMode
= _matrixMode
;
13271 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
13274 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
13275 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
13276 const uint32_t size
= ComputeSize();
13277 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
13280 gpu::CommandHeader header
;
13281 uint32_t matrixMode
;
13284 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
13285 "size of MatrixLoadfCHROMIUMImmediate should be 8");
13286 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
13287 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
13288 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
13289 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
13291 struct MatrixLoadIdentityCHROMIUM
{
13292 typedef MatrixLoadIdentityCHROMIUM ValueType
;
13293 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
13294 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13295 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13297 static uint32_t ComputeSize() {
13298 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13301 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13303 void Init(GLenum _matrixMode
) {
13305 matrixMode
= _matrixMode
;
13308 void* Set(void* cmd
, GLenum _matrixMode
) {
13309 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
13310 return NextCmdAddress
<ValueType
>(cmd
);
13313 gpu::CommandHeader header
;
13314 uint32_t matrixMode
;
13317 static_assert(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
13318 "size of MatrixLoadIdentityCHROMIUM should be 8");
13319 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
13320 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
13321 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
13322 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
13324 struct BlendBarrierKHR
{
13325 typedef BlendBarrierKHR ValueType
;
13326 static const CommandId kCmdId
= kBlendBarrierKHR
;
13327 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13328 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13330 static uint32_t ComputeSize() {
13331 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13334 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13336 void Init() { SetHeader(); }
13338 void* Set(void* cmd
) {
13339 static_cast<ValueType
*>(cmd
)->Init();
13340 return NextCmdAddress
<ValueType
>(cmd
);
13343 gpu::CommandHeader header
;
13346 static_assert(sizeof(BlendBarrierKHR
) == 4,
13347 "size of BlendBarrierKHR should be 4");
13348 static_assert(offsetof(BlendBarrierKHR
, header
) == 0,
13349 "offset of BlendBarrierKHR header should be 0");
13351 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_