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 CopyBufferSubData
{
1637 typedef CopyBufferSubData ValueType
;
1638 static const CommandId kCmdId
= kCopyBufferSubData
;
1639 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1640 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1642 static uint32_t ComputeSize() {
1643 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1646 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1648 void Init(GLenum _readtarget
,
1649 GLenum _writetarget
,
1650 GLintptr _readoffset
,
1651 GLintptr _writeoffset
,
1654 readtarget
= _readtarget
;
1655 writetarget
= _writetarget
;
1656 readoffset
= _readoffset
;
1657 writeoffset
= _writeoffset
;
1661 void* Set(void* cmd
,
1663 GLenum _writetarget
,
1664 GLintptr _readoffset
,
1665 GLintptr _writeoffset
,
1667 static_cast<ValueType
*>(cmd
)
1668 ->Init(_readtarget
, _writetarget
, _readoffset
, _writeoffset
, _size
);
1669 return NextCmdAddress
<ValueType
>(cmd
);
1672 gpu::CommandHeader header
;
1673 uint32_t readtarget
;
1674 uint32_t writetarget
;
1676 int32_t writeoffset
;
1680 static_assert(sizeof(CopyBufferSubData
) == 24,
1681 "size of CopyBufferSubData should be 24");
1682 static_assert(offsetof(CopyBufferSubData
, header
) == 0,
1683 "offset of CopyBufferSubData header should be 0");
1684 static_assert(offsetof(CopyBufferSubData
, readtarget
) == 4,
1685 "offset of CopyBufferSubData readtarget should be 4");
1686 static_assert(offsetof(CopyBufferSubData
, writetarget
) == 8,
1687 "offset of CopyBufferSubData writetarget should be 8");
1688 static_assert(offsetof(CopyBufferSubData
, readoffset
) == 12,
1689 "offset of CopyBufferSubData readoffset should be 12");
1690 static_assert(offsetof(CopyBufferSubData
, writeoffset
) == 16,
1691 "offset of CopyBufferSubData writeoffset should be 16");
1692 static_assert(offsetof(CopyBufferSubData
, size
) == 20,
1693 "offset of CopyBufferSubData size should be 20");
1695 struct CopyTexImage2D
{
1696 typedef CopyTexImage2D ValueType
;
1697 static const CommandId kCmdId
= kCopyTexImage2D
;
1698 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1699 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1701 static uint32_t ComputeSize() {
1702 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1705 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1707 void Init(GLenum _target
,
1709 GLenum _internalformat
,
1717 internalformat
= _internalformat
;
1724 void* Set(void* cmd
,
1727 GLenum _internalformat
,
1732 static_cast<ValueType
*>(cmd
)
1733 ->Init(_target
, _level
, _internalformat
, _x
, _y
, _width
, _height
);
1734 return NextCmdAddress
<ValueType
>(cmd
);
1737 gpu::CommandHeader header
;
1740 uint32_t internalformat
;
1745 static const int32_t border
= 0;
1748 static_assert(sizeof(CopyTexImage2D
) == 32,
1749 "size of CopyTexImage2D should be 32");
1750 static_assert(offsetof(CopyTexImage2D
, header
) == 0,
1751 "offset of CopyTexImage2D header should be 0");
1752 static_assert(offsetof(CopyTexImage2D
, target
) == 4,
1753 "offset of CopyTexImage2D target should be 4");
1754 static_assert(offsetof(CopyTexImage2D
, level
) == 8,
1755 "offset of CopyTexImage2D level should be 8");
1756 static_assert(offsetof(CopyTexImage2D
, internalformat
) == 12,
1757 "offset of CopyTexImage2D internalformat should be 12");
1758 static_assert(offsetof(CopyTexImage2D
, x
) == 16,
1759 "offset of CopyTexImage2D x should be 16");
1760 static_assert(offsetof(CopyTexImage2D
, y
) == 20,
1761 "offset of CopyTexImage2D y should be 20");
1762 static_assert(offsetof(CopyTexImage2D
, width
) == 24,
1763 "offset of CopyTexImage2D width should be 24");
1764 static_assert(offsetof(CopyTexImage2D
, height
) == 28,
1765 "offset of CopyTexImage2D height should be 28");
1767 struct CopyTexSubImage2D
{
1768 typedef CopyTexSubImage2D ValueType
;
1769 static const CommandId kCmdId
= kCopyTexSubImage2D
;
1770 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1771 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1773 static uint32_t ComputeSize() {
1774 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1777 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1779 void Init(GLenum _target
,
1798 void* Set(void* cmd
,
1807 static_cast<ValueType
*>(cmd
)
1808 ->Init(_target
, _level
, _xoffset
, _yoffset
, _x
, _y
, _width
, _height
);
1809 return NextCmdAddress
<ValueType
>(cmd
);
1812 gpu::CommandHeader header
;
1823 static_assert(sizeof(CopyTexSubImage2D
) == 36,
1824 "size of CopyTexSubImage2D should be 36");
1825 static_assert(offsetof(CopyTexSubImage2D
, header
) == 0,
1826 "offset of CopyTexSubImage2D header should be 0");
1827 static_assert(offsetof(CopyTexSubImage2D
, target
) == 4,
1828 "offset of CopyTexSubImage2D target should be 4");
1829 static_assert(offsetof(CopyTexSubImage2D
, level
) == 8,
1830 "offset of CopyTexSubImage2D level should be 8");
1831 static_assert(offsetof(CopyTexSubImage2D
, xoffset
) == 12,
1832 "offset of CopyTexSubImage2D xoffset should be 12");
1833 static_assert(offsetof(CopyTexSubImage2D
, yoffset
) == 16,
1834 "offset of CopyTexSubImage2D yoffset should be 16");
1835 static_assert(offsetof(CopyTexSubImage2D
, x
) == 20,
1836 "offset of CopyTexSubImage2D x should be 20");
1837 static_assert(offsetof(CopyTexSubImage2D
, y
) == 24,
1838 "offset of CopyTexSubImage2D y should be 24");
1839 static_assert(offsetof(CopyTexSubImage2D
, width
) == 28,
1840 "offset of CopyTexSubImage2D width should be 28");
1841 static_assert(offsetof(CopyTexSubImage2D
, height
) == 32,
1842 "offset of CopyTexSubImage2D height should be 32");
1844 struct CopyTexSubImage3D
{
1845 typedef CopyTexSubImage3D ValueType
;
1846 static const CommandId kCmdId
= kCopyTexSubImage3D
;
1847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1850 static uint32_t ComputeSize() {
1851 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1854 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1856 void Init(GLenum _target
,
1877 void* Set(void* cmd
,
1887 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1888 _zoffset
, _x
, _y
, _width
, _height
);
1889 return NextCmdAddress
<ValueType
>(cmd
);
1892 gpu::CommandHeader header
;
1904 static_assert(sizeof(CopyTexSubImage3D
) == 40,
1905 "size of CopyTexSubImage3D should be 40");
1906 static_assert(offsetof(CopyTexSubImage3D
, header
) == 0,
1907 "offset of CopyTexSubImage3D header should be 0");
1908 static_assert(offsetof(CopyTexSubImage3D
, target
) == 4,
1909 "offset of CopyTexSubImage3D target should be 4");
1910 static_assert(offsetof(CopyTexSubImage3D
, level
) == 8,
1911 "offset of CopyTexSubImage3D level should be 8");
1912 static_assert(offsetof(CopyTexSubImage3D
, xoffset
) == 12,
1913 "offset of CopyTexSubImage3D xoffset should be 12");
1914 static_assert(offsetof(CopyTexSubImage3D
, yoffset
) == 16,
1915 "offset of CopyTexSubImage3D yoffset should be 16");
1916 static_assert(offsetof(CopyTexSubImage3D
, zoffset
) == 20,
1917 "offset of CopyTexSubImage3D zoffset should be 20");
1918 static_assert(offsetof(CopyTexSubImage3D
, x
) == 24,
1919 "offset of CopyTexSubImage3D x should be 24");
1920 static_assert(offsetof(CopyTexSubImage3D
, y
) == 28,
1921 "offset of CopyTexSubImage3D y should be 28");
1922 static_assert(offsetof(CopyTexSubImage3D
, width
) == 32,
1923 "offset of CopyTexSubImage3D width should be 32");
1924 static_assert(offsetof(CopyTexSubImage3D
, height
) == 36,
1925 "offset of CopyTexSubImage3D height should be 36");
1927 struct CreateProgram
{
1928 typedef CreateProgram ValueType
;
1929 static const CommandId kCmdId
= kCreateProgram
;
1930 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1931 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1933 static uint32_t ComputeSize() {
1934 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1937 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1939 void Init(uint32_t _client_id
) {
1941 client_id
= _client_id
;
1944 void* Set(void* cmd
, uint32_t _client_id
) {
1945 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
1946 return NextCmdAddress
<ValueType
>(cmd
);
1949 gpu::CommandHeader header
;
1953 static_assert(sizeof(CreateProgram
) == 8, "size of CreateProgram should be 8");
1954 static_assert(offsetof(CreateProgram
, header
) == 0,
1955 "offset of CreateProgram header should be 0");
1956 static_assert(offsetof(CreateProgram
, client_id
) == 4,
1957 "offset of CreateProgram client_id should be 4");
1959 struct CreateShader
{
1960 typedef CreateShader ValueType
;
1961 static const CommandId kCmdId
= kCreateShader
;
1962 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1963 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1965 static uint32_t ComputeSize() {
1966 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1969 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1971 void Init(GLenum _type
, uint32_t _client_id
) {
1974 client_id
= _client_id
;
1977 void* Set(void* cmd
, GLenum _type
, uint32_t _client_id
) {
1978 static_cast<ValueType
*>(cmd
)->Init(_type
, _client_id
);
1979 return NextCmdAddress
<ValueType
>(cmd
);
1982 gpu::CommandHeader header
;
1987 static_assert(sizeof(CreateShader
) == 12, "size of CreateShader should be 12");
1988 static_assert(offsetof(CreateShader
, header
) == 0,
1989 "offset of CreateShader header should be 0");
1990 static_assert(offsetof(CreateShader
, type
) == 4,
1991 "offset of CreateShader type should be 4");
1992 static_assert(offsetof(CreateShader
, client_id
) == 8,
1993 "offset of CreateShader client_id should be 8");
1996 typedef CullFace ValueType
;
1997 static const CommandId kCmdId
= kCullFace
;
1998 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1999 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2001 static uint32_t ComputeSize() {
2002 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2005 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2007 void Init(GLenum _mode
) {
2012 void* Set(void* cmd
, GLenum _mode
) {
2013 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2014 return NextCmdAddress
<ValueType
>(cmd
);
2017 gpu::CommandHeader header
;
2021 static_assert(sizeof(CullFace
) == 8, "size of CullFace should be 8");
2022 static_assert(offsetof(CullFace
, header
) == 0,
2023 "offset of CullFace header should be 0");
2024 static_assert(offsetof(CullFace
, mode
) == 4,
2025 "offset of CullFace mode should be 4");
2027 struct DeleteBuffersImmediate
{
2028 typedef DeleteBuffersImmediate ValueType
;
2029 static const CommandId kCmdId
= kDeleteBuffersImmediate
;
2030 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2031 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2033 static uint32_t ComputeDataSize(GLsizei n
) {
2034 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2037 static uint32_t ComputeSize(GLsizei n
) {
2038 return static_cast<uint32_t>(sizeof(ValueType
) +
2039 ComputeDataSize(n
)); // NOLINT
2042 void SetHeader(GLsizei n
) {
2043 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2046 void Init(GLsizei _n
, const GLuint
* _buffers
) {
2049 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
2052 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _buffers
) {
2053 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
2054 const uint32_t size
= ComputeSize(_n
);
2055 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2058 gpu::CommandHeader header
;
2062 static_assert(sizeof(DeleteBuffersImmediate
) == 8,
2063 "size of DeleteBuffersImmediate should be 8");
2064 static_assert(offsetof(DeleteBuffersImmediate
, header
) == 0,
2065 "offset of DeleteBuffersImmediate header should be 0");
2066 static_assert(offsetof(DeleteBuffersImmediate
, n
) == 4,
2067 "offset of DeleteBuffersImmediate n should be 4");
2069 struct DeleteFramebuffersImmediate
{
2070 typedef DeleteFramebuffersImmediate ValueType
;
2071 static const CommandId kCmdId
= kDeleteFramebuffersImmediate
;
2072 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2073 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2075 static uint32_t ComputeDataSize(GLsizei n
) {
2076 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2079 static uint32_t ComputeSize(GLsizei n
) {
2080 return static_cast<uint32_t>(sizeof(ValueType
) +
2081 ComputeDataSize(n
)); // NOLINT
2084 void SetHeader(GLsizei n
) {
2085 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2088 void Init(GLsizei _n
, const GLuint
* _framebuffers
) {
2091 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
2094 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _framebuffers
) {
2095 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
2096 const uint32_t size
= ComputeSize(_n
);
2097 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2100 gpu::CommandHeader header
;
2104 static_assert(sizeof(DeleteFramebuffersImmediate
) == 8,
2105 "size of DeleteFramebuffersImmediate should be 8");
2106 static_assert(offsetof(DeleteFramebuffersImmediate
, header
) == 0,
2107 "offset of DeleteFramebuffersImmediate header should be 0");
2108 static_assert(offsetof(DeleteFramebuffersImmediate
, n
) == 4,
2109 "offset of DeleteFramebuffersImmediate n should be 4");
2111 struct DeleteProgram
{
2112 typedef DeleteProgram ValueType
;
2113 static const CommandId kCmdId
= kDeleteProgram
;
2114 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2115 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2117 static uint32_t ComputeSize() {
2118 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2121 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2123 void Init(GLuint _program
) {
2128 void* Set(void* cmd
, GLuint _program
) {
2129 static_cast<ValueType
*>(cmd
)->Init(_program
);
2130 return NextCmdAddress
<ValueType
>(cmd
);
2133 gpu::CommandHeader header
;
2137 static_assert(sizeof(DeleteProgram
) == 8, "size of DeleteProgram should be 8");
2138 static_assert(offsetof(DeleteProgram
, header
) == 0,
2139 "offset of DeleteProgram header should be 0");
2140 static_assert(offsetof(DeleteProgram
, program
) == 4,
2141 "offset of DeleteProgram program should be 4");
2143 struct DeleteRenderbuffersImmediate
{
2144 typedef DeleteRenderbuffersImmediate ValueType
;
2145 static const CommandId kCmdId
= kDeleteRenderbuffersImmediate
;
2146 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2147 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2149 static uint32_t ComputeDataSize(GLsizei n
) {
2150 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2153 static uint32_t ComputeSize(GLsizei n
) {
2154 return static_cast<uint32_t>(sizeof(ValueType
) +
2155 ComputeDataSize(n
)); // NOLINT
2158 void SetHeader(GLsizei n
) {
2159 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2162 void Init(GLsizei _n
, const GLuint
* _renderbuffers
) {
2165 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
2168 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _renderbuffers
) {
2169 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
2170 const uint32_t size
= ComputeSize(_n
);
2171 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2174 gpu::CommandHeader header
;
2178 static_assert(sizeof(DeleteRenderbuffersImmediate
) == 8,
2179 "size of DeleteRenderbuffersImmediate should be 8");
2180 static_assert(offsetof(DeleteRenderbuffersImmediate
, header
) == 0,
2181 "offset of DeleteRenderbuffersImmediate header should be 0");
2182 static_assert(offsetof(DeleteRenderbuffersImmediate
, n
) == 4,
2183 "offset of DeleteRenderbuffersImmediate n should be 4");
2185 struct DeleteSamplersImmediate
{
2186 typedef DeleteSamplersImmediate ValueType
;
2187 static const CommandId kCmdId
= kDeleteSamplersImmediate
;
2188 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2189 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2191 static uint32_t ComputeDataSize(GLsizei n
) {
2192 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2195 static uint32_t ComputeSize(GLsizei n
) {
2196 return static_cast<uint32_t>(sizeof(ValueType
) +
2197 ComputeDataSize(n
)); // NOLINT
2200 void SetHeader(GLsizei n
) {
2201 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2204 void Init(GLsizei _n
, const GLuint
* _samplers
) {
2207 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
2210 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _samplers
) {
2211 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
2212 const uint32_t size
= ComputeSize(_n
);
2213 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2216 gpu::CommandHeader header
;
2220 static_assert(sizeof(DeleteSamplersImmediate
) == 8,
2221 "size of DeleteSamplersImmediate should be 8");
2222 static_assert(offsetof(DeleteSamplersImmediate
, header
) == 0,
2223 "offset of DeleteSamplersImmediate header should be 0");
2224 static_assert(offsetof(DeleteSamplersImmediate
, n
) == 4,
2225 "offset of DeleteSamplersImmediate n should be 4");
2228 typedef DeleteSync ValueType
;
2229 static const CommandId kCmdId
= kDeleteSync
;
2230 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2231 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2233 static uint32_t ComputeSize() {
2234 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2237 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2239 void Init(GLuint _sync
) {
2244 void* Set(void* cmd
, GLuint _sync
) {
2245 static_cast<ValueType
*>(cmd
)->Init(_sync
);
2246 return NextCmdAddress
<ValueType
>(cmd
);
2249 gpu::CommandHeader header
;
2253 static_assert(sizeof(DeleteSync
) == 8, "size of DeleteSync should be 8");
2254 static_assert(offsetof(DeleteSync
, header
) == 0,
2255 "offset of DeleteSync header should be 0");
2256 static_assert(offsetof(DeleteSync
, sync
) == 4,
2257 "offset of DeleteSync sync should be 4");
2259 struct DeleteShader
{
2260 typedef DeleteShader ValueType
;
2261 static const CommandId kCmdId
= kDeleteShader
;
2262 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2263 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2265 static uint32_t ComputeSize() {
2266 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2269 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2271 void Init(GLuint _shader
) {
2276 void* Set(void* cmd
, GLuint _shader
) {
2277 static_cast<ValueType
*>(cmd
)->Init(_shader
);
2278 return NextCmdAddress
<ValueType
>(cmd
);
2281 gpu::CommandHeader header
;
2285 static_assert(sizeof(DeleteShader
) == 8, "size of DeleteShader should be 8");
2286 static_assert(offsetof(DeleteShader
, header
) == 0,
2287 "offset of DeleteShader header should be 0");
2288 static_assert(offsetof(DeleteShader
, shader
) == 4,
2289 "offset of DeleteShader shader should be 4");
2291 struct DeleteTexturesImmediate
{
2292 typedef DeleteTexturesImmediate ValueType
;
2293 static const CommandId kCmdId
= kDeleteTexturesImmediate
;
2294 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2295 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2297 static uint32_t ComputeDataSize(GLsizei n
) {
2298 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2301 static uint32_t ComputeSize(GLsizei n
) {
2302 return static_cast<uint32_t>(sizeof(ValueType
) +
2303 ComputeDataSize(n
)); // NOLINT
2306 void SetHeader(GLsizei n
) {
2307 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2310 void Init(GLsizei _n
, const GLuint
* _textures
) {
2313 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
2316 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _textures
) {
2317 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
2318 const uint32_t size
= ComputeSize(_n
);
2319 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2322 gpu::CommandHeader header
;
2326 static_assert(sizeof(DeleteTexturesImmediate
) == 8,
2327 "size of DeleteTexturesImmediate should be 8");
2328 static_assert(offsetof(DeleteTexturesImmediate
, header
) == 0,
2329 "offset of DeleteTexturesImmediate header should be 0");
2330 static_assert(offsetof(DeleteTexturesImmediate
, n
) == 4,
2331 "offset of DeleteTexturesImmediate n should be 4");
2333 struct DeleteTransformFeedbacksImmediate
{
2334 typedef DeleteTransformFeedbacksImmediate ValueType
;
2335 static const CommandId kCmdId
= kDeleteTransformFeedbacksImmediate
;
2336 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2337 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2339 static uint32_t ComputeDataSize(GLsizei n
) {
2340 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2343 static uint32_t ComputeSize(GLsizei n
) {
2344 return static_cast<uint32_t>(sizeof(ValueType
) +
2345 ComputeDataSize(n
)); // NOLINT
2348 void SetHeader(GLsizei n
) {
2349 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2352 void Init(GLsizei _n
, const GLuint
* _ids
) {
2355 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
2358 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _ids
) {
2359 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
2360 const uint32_t size
= ComputeSize(_n
);
2361 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2364 gpu::CommandHeader header
;
2368 static_assert(sizeof(DeleteTransformFeedbacksImmediate
) == 8,
2369 "size of DeleteTransformFeedbacksImmediate should be 8");
2370 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, header
) == 0,
2371 "offset of DeleteTransformFeedbacksImmediate header should be 0");
2372 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, n
) == 4,
2373 "offset of DeleteTransformFeedbacksImmediate n should be 4");
2376 typedef DepthFunc ValueType
;
2377 static const CommandId kCmdId
= kDepthFunc
;
2378 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2379 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2381 static uint32_t ComputeSize() {
2382 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2385 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2387 void Init(GLenum _func
) {
2392 void* Set(void* cmd
, GLenum _func
) {
2393 static_cast<ValueType
*>(cmd
)->Init(_func
);
2394 return NextCmdAddress
<ValueType
>(cmd
);
2397 gpu::CommandHeader header
;
2401 static_assert(sizeof(DepthFunc
) == 8, "size of DepthFunc should be 8");
2402 static_assert(offsetof(DepthFunc
, header
) == 0,
2403 "offset of DepthFunc header should be 0");
2404 static_assert(offsetof(DepthFunc
, func
) == 4,
2405 "offset of DepthFunc func should be 4");
2408 typedef DepthMask ValueType
;
2409 static const CommandId kCmdId
= kDepthMask
;
2410 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2411 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2413 static uint32_t ComputeSize() {
2414 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2417 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2419 void Init(GLboolean _flag
) {
2424 void* Set(void* cmd
, GLboolean _flag
) {
2425 static_cast<ValueType
*>(cmd
)->Init(_flag
);
2426 return NextCmdAddress
<ValueType
>(cmd
);
2429 gpu::CommandHeader header
;
2433 static_assert(sizeof(DepthMask
) == 8, "size of DepthMask should be 8");
2434 static_assert(offsetof(DepthMask
, header
) == 0,
2435 "offset of DepthMask header should be 0");
2436 static_assert(offsetof(DepthMask
, flag
) == 4,
2437 "offset of DepthMask flag should be 4");
2439 struct DepthRangef
{
2440 typedef DepthRangef ValueType
;
2441 static const CommandId kCmdId
= kDepthRangef
;
2442 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2443 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2445 static uint32_t ComputeSize() {
2446 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2449 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2451 void Init(GLclampf _zNear
, GLclampf _zFar
) {
2457 void* Set(void* cmd
, GLclampf _zNear
, GLclampf _zFar
) {
2458 static_cast<ValueType
*>(cmd
)->Init(_zNear
, _zFar
);
2459 return NextCmdAddress
<ValueType
>(cmd
);
2462 gpu::CommandHeader header
;
2467 static_assert(sizeof(DepthRangef
) == 12, "size of DepthRangef should be 12");
2468 static_assert(offsetof(DepthRangef
, header
) == 0,
2469 "offset of DepthRangef header should be 0");
2470 static_assert(offsetof(DepthRangef
, zNear
) == 4,
2471 "offset of DepthRangef zNear should be 4");
2472 static_assert(offsetof(DepthRangef
, zFar
) == 8,
2473 "offset of DepthRangef zFar should be 8");
2475 struct DetachShader
{
2476 typedef DetachShader ValueType
;
2477 static const CommandId kCmdId
= kDetachShader
;
2478 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2479 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2481 static uint32_t ComputeSize() {
2482 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2485 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2487 void Init(GLuint _program
, GLuint _shader
) {
2493 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
2494 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
2495 return NextCmdAddress
<ValueType
>(cmd
);
2498 gpu::CommandHeader header
;
2503 static_assert(sizeof(DetachShader
) == 12, "size of DetachShader should be 12");
2504 static_assert(offsetof(DetachShader
, header
) == 0,
2505 "offset of DetachShader header should be 0");
2506 static_assert(offsetof(DetachShader
, program
) == 4,
2507 "offset of DetachShader program should be 4");
2508 static_assert(offsetof(DetachShader
, shader
) == 8,
2509 "offset of DetachShader shader should be 8");
2512 typedef Disable ValueType
;
2513 static const CommandId kCmdId
= kDisable
;
2514 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2515 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2517 static uint32_t ComputeSize() {
2518 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2521 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2523 void Init(GLenum _cap
) {
2528 void* Set(void* cmd
, GLenum _cap
) {
2529 static_cast<ValueType
*>(cmd
)->Init(_cap
);
2530 return NextCmdAddress
<ValueType
>(cmd
);
2533 gpu::CommandHeader header
;
2537 static_assert(sizeof(Disable
) == 8, "size of Disable should be 8");
2538 static_assert(offsetof(Disable
, header
) == 0,
2539 "offset of Disable header should be 0");
2540 static_assert(offsetof(Disable
, cap
) == 4, "offset of Disable cap should be 4");
2542 struct DisableVertexAttribArray
{
2543 typedef DisableVertexAttribArray ValueType
;
2544 static const CommandId kCmdId
= kDisableVertexAttribArray
;
2545 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2546 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2548 static uint32_t ComputeSize() {
2549 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2552 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2554 void Init(GLuint _index
) {
2559 void* Set(void* cmd
, GLuint _index
) {
2560 static_cast<ValueType
*>(cmd
)->Init(_index
);
2561 return NextCmdAddress
<ValueType
>(cmd
);
2564 gpu::CommandHeader header
;
2568 static_assert(sizeof(DisableVertexAttribArray
) == 8,
2569 "size of DisableVertexAttribArray should be 8");
2570 static_assert(offsetof(DisableVertexAttribArray
, header
) == 0,
2571 "offset of DisableVertexAttribArray header should be 0");
2572 static_assert(offsetof(DisableVertexAttribArray
, index
) == 4,
2573 "offset of DisableVertexAttribArray index should be 4");
2576 typedef DrawArrays ValueType
;
2577 static const CommandId kCmdId
= kDrawArrays
;
2578 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2579 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2581 static uint32_t ComputeSize() {
2582 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2585 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2587 void Init(GLenum _mode
, GLint _first
, GLsizei _count
) {
2594 void* Set(void* cmd
, GLenum _mode
, GLint _first
, GLsizei _count
) {
2595 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
);
2596 return NextCmdAddress
<ValueType
>(cmd
);
2599 gpu::CommandHeader header
;
2605 static_assert(sizeof(DrawArrays
) == 16, "size of DrawArrays should be 16");
2606 static_assert(offsetof(DrawArrays
, header
) == 0,
2607 "offset of DrawArrays header should be 0");
2608 static_assert(offsetof(DrawArrays
, mode
) == 4,
2609 "offset of DrawArrays mode should be 4");
2610 static_assert(offsetof(DrawArrays
, first
) == 8,
2611 "offset of DrawArrays first should be 8");
2612 static_assert(offsetof(DrawArrays
, count
) == 12,
2613 "offset of DrawArrays count should be 12");
2615 struct DrawElements
{
2616 typedef DrawElements ValueType
;
2617 static const CommandId kCmdId
= kDrawElements
;
2618 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2619 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2621 static uint32_t ComputeSize() {
2622 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2625 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2627 void Init(GLenum _mode
, GLsizei _count
, GLenum _type
, GLuint _index_offset
) {
2632 index_offset
= _index_offset
;
2635 void* Set(void* cmd
,
2639 GLuint _index_offset
) {
2640 static_cast<ValueType
*>(cmd
)->Init(_mode
, _count
, _type
, _index_offset
);
2641 return NextCmdAddress
<ValueType
>(cmd
);
2644 gpu::CommandHeader header
;
2648 uint32_t index_offset
;
2651 static_assert(sizeof(DrawElements
) == 20, "size of DrawElements should be 20");
2652 static_assert(offsetof(DrawElements
, header
) == 0,
2653 "offset of DrawElements header should be 0");
2654 static_assert(offsetof(DrawElements
, mode
) == 4,
2655 "offset of DrawElements mode should be 4");
2656 static_assert(offsetof(DrawElements
, count
) == 8,
2657 "offset of DrawElements count should be 8");
2658 static_assert(offsetof(DrawElements
, type
) == 12,
2659 "offset of DrawElements type should be 12");
2660 static_assert(offsetof(DrawElements
, index_offset
) == 16,
2661 "offset of DrawElements index_offset should be 16");
2664 typedef Enable ValueType
;
2665 static const CommandId kCmdId
= kEnable
;
2666 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2667 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2669 static uint32_t ComputeSize() {
2670 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2673 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2675 void Init(GLenum _cap
) {
2680 void* Set(void* cmd
, GLenum _cap
) {
2681 static_cast<ValueType
*>(cmd
)->Init(_cap
);
2682 return NextCmdAddress
<ValueType
>(cmd
);
2685 gpu::CommandHeader header
;
2689 static_assert(sizeof(Enable
) == 8, "size of Enable should be 8");
2690 static_assert(offsetof(Enable
, header
) == 0,
2691 "offset of Enable header should be 0");
2692 static_assert(offsetof(Enable
, cap
) == 4, "offset of Enable cap should be 4");
2694 struct EnableVertexAttribArray
{
2695 typedef EnableVertexAttribArray ValueType
;
2696 static const CommandId kCmdId
= kEnableVertexAttribArray
;
2697 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2698 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2700 static uint32_t ComputeSize() {
2701 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2704 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2706 void Init(GLuint _index
) {
2711 void* Set(void* cmd
, GLuint _index
) {
2712 static_cast<ValueType
*>(cmd
)->Init(_index
);
2713 return NextCmdAddress
<ValueType
>(cmd
);
2716 gpu::CommandHeader header
;
2720 static_assert(sizeof(EnableVertexAttribArray
) == 8,
2721 "size of EnableVertexAttribArray should be 8");
2722 static_assert(offsetof(EnableVertexAttribArray
, header
) == 0,
2723 "offset of EnableVertexAttribArray header should be 0");
2724 static_assert(offsetof(EnableVertexAttribArray
, index
) == 4,
2725 "offset of EnableVertexAttribArray index should be 4");
2728 typedef FenceSync ValueType
;
2729 static const CommandId kCmdId
= kFenceSync
;
2730 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2731 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2733 static uint32_t ComputeSize() {
2734 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2737 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2739 void Init(uint32_t _client_id
) {
2741 client_id
= _client_id
;
2744 void* Set(void* cmd
, uint32_t _client_id
) {
2745 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
2746 return NextCmdAddress
<ValueType
>(cmd
);
2749 gpu::CommandHeader header
;
2751 static const uint32_t condition
= GL_SYNC_GPU_COMMANDS_COMPLETE
;
2752 static const uint32_t flags
= 0;
2755 static_assert(sizeof(FenceSync
) == 8, "size of FenceSync should be 8");
2756 static_assert(offsetof(FenceSync
, header
) == 0,
2757 "offset of FenceSync header should be 0");
2758 static_assert(offsetof(FenceSync
, client_id
) == 4,
2759 "offset of FenceSync client_id should be 4");
2762 typedef Finish ValueType
;
2763 static const CommandId kCmdId
= kFinish
;
2764 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2765 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2767 static uint32_t ComputeSize() {
2768 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2771 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2773 void Init() { SetHeader(); }
2775 void* Set(void* cmd
) {
2776 static_cast<ValueType
*>(cmd
)->Init();
2777 return NextCmdAddress
<ValueType
>(cmd
);
2780 gpu::CommandHeader header
;
2783 static_assert(sizeof(Finish
) == 4, "size of Finish should be 4");
2784 static_assert(offsetof(Finish
, header
) == 0,
2785 "offset of Finish header should be 0");
2788 typedef Flush ValueType
;
2789 static const CommandId kCmdId
= kFlush
;
2790 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2791 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2793 static uint32_t ComputeSize() {
2794 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2797 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2799 void Init() { SetHeader(); }
2801 void* Set(void* cmd
) {
2802 static_cast<ValueType
*>(cmd
)->Init();
2803 return NextCmdAddress
<ValueType
>(cmd
);
2806 gpu::CommandHeader header
;
2809 static_assert(sizeof(Flush
) == 4, "size of Flush should be 4");
2810 static_assert(offsetof(Flush
, header
) == 0,
2811 "offset of Flush header should be 0");
2813 struct FramebufferRenderbuffer
{
2814 typedef FramebufferRenderbuffer ValueType
;
2815 static const CommandId kCmdId
= kFramebufferRenderbuffer
;
2816 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2817 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2819 static uint32_t ComputeSize() {
2820 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2823 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2825 void Init(GLenum _target
,
2827 GLenum _renderbuffertarget
,
2828 GLuint _renderbuffer
) {
2831 attachment
= _attachment
;
2832 renderbuffertarget
= _renderbuffertarget
;
2833 renderbuffer
= _renderbuffer
;
2836 void* Set(void* cmd
,
2839 GLenum _renderbuffertarget
,
2840 GLuint _renderbuffer
) {
2841 static_cast<ValueType
*>(cmd
)
2842 ->Init(_target
, _attachment
, _renderbuffertarget
, _renderbuffer
);
2843 return NextCmdAddress
<ValueType
>(cmd
);
2846 gpu::CommandHeader header
;
2848 uint32_t attachment
;
2849 uint32_t renderbuffertarget
;
2850 uint32_t renderbuffer
;
2853 static_assert(sizeof(FramebufferRenderbuffer
) == 20,
2854 "size of FramebufferRenderbuffer should be 20");
2855 static_assert(offsetof(FramebufferRenderbuffer
, header
) == 0,
2856 "offset of FramebufferRenderbuffer header should be 0");
2857 static_assert(offsetof(FramebufferRenderbuffer
, target
) == 4,
2858 "offset of FramebufferRenderbuffer target should be 4");
2859 static_assert(offsetof(FramebufferRenderbuffer
, attachment
) == 8,
2860 "offset of FramebufferRenderbuffer attachment should be 8");
2862 offsetof(FramebufferRenderbuffer
, renderbuffertarget
) == 12,
2863 "offset of FramebufferRenderbuffer renderbuffertarget should be 12");
2864 static_assert(offsetof(FramebufferRenderbuffer
, renderbuffer
) == 16,
2865 "offset of FramebufferRenderbuffer renderbuffer should be 16");
2867 struct FramebufferTexture2D
{
2868 typedef FramebufferTexture2D ValueType
;
2869 static const CommandId kCmdId
= kFramebufferTexture2D
;
2870 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2871 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
2873 static uint32_t ComputeSize() {
2874 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2877 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2879 void Init(GLenum _target
,
2885 attachment
= _attachment
;
2886 textarget
= _textarget
;
2890 void* Set(void* cmd
,
2895 static_cast<ValueType
*>(cmd
)
2896 ->Init(_target
, _attachment
, _textarget
, _texture
);
2897 return NextCmdAddress
<ValueType
>(cmd
);
2900 gpu::CommandHeader header
;
2902 uint32_t attachment
;
2905 static const int32_t level
= 0;
2908 static_assert(sizeof(FramebufferTexture2D
) == 20,
2909 "size of FramebufferTexture2D should be 20");
2910 static_assert(offsetof(FramebufferTexture2D
, header
) == 0,
2911 "offset of FramebufferTexture2D header should be 0");
2912 static_assert(offsetof(FramebufferTexture2D
, target
) == 4,
2913 "offset of FramebufferTexture2D target should be 4");
2914 static_assert(offsetof(FramebufferTexture2D
, attachment
) == 8,
2915 "offset of FramebufferTexture2D attachment should be 8");
2916 static_assert(offsetof(FramebufferTexture2D
, textarget
) == 12,
2917 "offset of FramebufferTexture2D textarget should be 12");
2918 static_assert(offsetof(FramebufferTexture2D
, texture
) == 16,
2919 "offset of FramebufferTexture2D texture should be 16");
2921 struct FramebufferTextureLayer
{
2922 typedef FramebufferTextureLayer ValueType
;
2923 static const CommandId kCmdId
= kFramebufferTextureLayer
;
2924 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2925 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2927 static uint32_t ComputeSize() {
2928 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2931 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2933 void Init(GLenum _target
,
2940 attachment
= _attachment
;
2946 void* Set(void* cmd
,
2952 static_cast<ValueType
*>(cmd
)
2953 ->Init(_target
, _attachment
, _texture
, _level
, _layer
);
2954 return NextCmdAddress
<ValueType
>(cmd
);
2957 gpu::CommandHeader header
;
2959 uint32_t attachment
;
2965 static_assert(sizeof(FramebufferTextureLayer
) == 24,
2966 "size of FramebufferTextureLayer should be 24");
2967 static_assert(offsetof(FramebufferTextureLayer
, header
) == 0,
2968 "offset of FramebufferTextureLayer header should be 0");
2969 static_assert(offsetof(FramebufferTextureLayer
, target
) == 4,
2970 "offset of FramebufferTextureLayer target should be 4");
2971 static_assert(offsetof(FramebufferTextureLayer
, attachment
) == 8,
2972 "offset of FramebufferTextureLayer attachment should be 8");
2973 static_assert(offsetof(FramebufferTextureLayer
, texture
) == 12,
2974 "offset of FramebufferTextureLayer texture should be 12");
2975 static_assert(offsetof(FramebufferTextureLayer
, level
) == 16,
2976 "offset of FramebufferTextureLayer level should be 16");
2977 static_assert(offsetof(FramebufferTextureLayer
, layer
) == 20,
2978 "offset of FramebufferTextureLayer layer should be 20");
2981 typedef FrontFace ValueType
;
2982 static const CommandId kCmdId
= kFrontFace
;
2983 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2984 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2986 static uint32_t ComputeSize() {
2987 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2990 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2992 void Init(GLenum _mode
) {
2997 void* Set(void* cmd
, GLenum _mode
) {
2998 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2999 return NextCmdAddress
<ValueType
>(cmd
);
3002 gpu::CommandHeader header
;
3006 static_assert(sizeof(FrontFace
) == 8, "size of FrontFace should be 8");
3007 static_assert(offsetof(FrontFace
, header
) == 0,
3008 "offset of FrontFace header should be 0");
3009 static_assert(offsetof(FrontFace
, mode
) == 4,
3010 "offset of FrontFace mode should be 4");
3012 struct GenBuffersImmediate
{
3013 typedef GenBuffersImmediate ValueType
;
3014 static const CommandId kCmdId
= kGenBuffersImmediate
;
3015 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3016 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3018 static uint32_t ComputeDataSize(GLsizei n
) {
3019 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3022 static uint32_t ComputeSize(GLsizei n
) {
3023 return static_cast<uint32_t>(sizeof(ValueType
) +
3024 ComputeDataSize(n
)); // NOLINT
3027 void SetHeader(GLsizei n
) {
3028 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3031 void Init(GLsizei _n
, GLuint
* _buffers
) {
3034 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
3037 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
3038 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
3039 const uint32_t size
= ComputeSize(_n
);
3040 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3043 gpu::CommandHeader header
;
3047 static_assert(sizeof(GenBuffersImmediate
) == 8,
3048 "size of GenBuffersImmediate should be 8");
3049 static_assert(offsetof(GenBuffersImmediate
, header
) == 0,
3050 "offset of GenBuffersImmediate header should be 0");
3051 static_assert(offsetof(GenBuffersImmediate
, n
) == 4,
3052 "offset of GenBuffersImmediate n should be 4");
3054 struct GenerateMipmap
{
3055 typedef GenerateMipmap ValueType
;
3056 static const CommandId kCmdId
= kGenerateMipmap
;
3057 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3058 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3060 static uint32_t ComputeSize() {
3061 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3064 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3066 void Init(GLenum _target
) {
3071 void* Set(void* cmd
, GLenum _target
) {
3072 static_cast<ValueType
*>(cmd
)->Init(_target
);
3073 return NextCmdAddress
<ValueType
>(cmd
);
3076 gpu::CommandHeader header
;
3080 static_assert(sizeof(GenerateMipmap
) == 8,
3081 "size of GenerateMipmap should be 8");
3082 static_assert(offsetof(GenerateMipmap
, header
) == 0,
3083 "offset of GenerateMipmap header should be 0");
3084 static_assert(offsetof(GenerateMipmap
, target
) == 4,
3085 "offset of GenerateMipmap target should be 4");
3087 struct GenFramebuffersImmediate
{
3088 typedef GenFramebuffersImmediate ValueType
;
3089 static const CommandId kCmdId
= kGenFramebuffersImmediate
;
3090 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3091 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3093 static uint32_t ComputeDataSize(GLsizei n
) {
3094 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3097 static uint32_t ComputeSize(GLsizei n
) {
3098 return static_cast<uint32_t>(sizeof(ValueType
) +
3099 ComputeDataSize(n
)); // NOLINT
3102 void SetHeader(GLsizei n
) {
3103 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3106 void Init(GLsizei _n
, GLuint
* _framebuffers
) {
3109 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
3112 void* Set(void* cmd
, GLsizei _n
, GLuint
* _framebuffers
) {
3113 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
3114 const uint32_t size
= ComputeSize(_n
);
3115 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3118 gpu::CommandHeader header
;
3122 static_assert(sizeof(GenFramebuffersImmediate
) == 8,
3123 "size of GenFramebuffersImmediate should be 8");
3124 static_assert(offsetof(GenFramebuffersImmediate
, header
) == 0,
3125 "offset of GenFramebuffersImmediate header should be 0");
3126 static_assert(offsetof(GenFramebuffersImmediate
, n
) == 4,
3127 "offset of GenFramebuffersImmediate n should be 4");
3129 struct GenRenderbuffersImmediate
{
3130 typedef GenRenderbuffersImmediate ValueType
;
3131 static const CommandId kCmdId
= kGenRenderbuffersImmediate
;
3132 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3133 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3135 static uint32_t ComputeDataSize(GLsizei n
) {
3136 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3139 static uint32_t ComputeSize(GLsizei n
) {
3140 return static_cast<uint32_t>(sizeof(ValueType
) +
3141 ComputeDataSize(n
)); // NOLINT
3144 void SetHeader(GLsizei n
) {
3145 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3148 void Init(GLsizei _n
, GLuint
* _renderbuffers
) {
3151 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
3154 void* Set(void* cmd
, GLsizei _n
, GLuint
* _renderbuffers
) {
3155 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
3156 const uint32_t size
= ComputeSize(_n
);
3157 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3160 gpu::CommandHeader header
;
3164 static_assert(sizeof(GenRenderbuffersImmediate
) == 8,
3165 "size of GenRenderbuffersImmediate should be 8");
3166 static_assert(offsetof(GenRenderbuffersImmediate
, header
) == 0,
3167 "offset of GenRenderbuffersImmediate header should be 0");
3168 static_assert(offsetof(GenRenderbuffersImmediate
, n
) == 4,
3169 "offset of GenRenderbuffersImmediate n should be 4");
3171 struct GenSamplersImmediate
{
3172 typedef GenSamplersImmediate ValueType
;
3173 static const CommandId kCmdId
= kGenSamplersImmediate
;
3174 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3175 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3177 static uint32_t ComputeDataSize(GLsizei n
) {
3178 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3181 static uint32_t ComputeSize(GLsizei n
) {
3182 return static_cast<uint32_t>(sizeof(ValueType
) +
3183 ComputeDataSize(n
)); // NOLINT
3186 void SetHeader(GLsizei n
) {
3187 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3190 void Init(GLsizei _n
, GLuint
* _samplers
) {
3193 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
3196 void* Set(void* cmd
, GLsizei _n
, GLuint
* _samplers
) {
3197 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
3198 const uint32_t size
= ComputeSize(_n
);
3199 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3202 gpu::CommandHeader header
;
3206 static_assert(sizeof(GenSamplersImmediate
) == 8,
3207 "size of GenSamplersImmediate should be 8");
3208 static_assert(offsetof(GenSamplersImmediate
, header
) == 0,
3209 "offset of GenSamplersImmediate header should be 0");
3210 static_assert(offsetof(GenSamplersImmediate
, n
) == 4,
3211 "offset of GenSamplersImmediate n should be 4");
3213 struct GenTexturesImmediate
{
3214 typedef GenTexturesImmediate ValueType
;
3215 static const CommandId kCmdId
= kGenTexturesImmediate
;
3216 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3217 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3219 static uint32_t ComputeDataSize(GLsizei n
) {
3220 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3223 static uint32_t ComputeSize(GLsizei n
) {
3224 return static_cast<uint32_t>(sizeof(ValueType
) +
3225 ComputeDataSize(n
)); // NOLINT
3228 void SetHeader(GLsizei n
) {
3229 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3232 void Init(GLsizei _n
, GLuint
* _textures
) {
3235 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
3238 void* Set(void* cmd
, GLsizei _n
, GLuint
* _textures
) {
3239 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
3240 const uint32_t size
= ComputeSize(_n
);
3241 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3244 gpu::CommandHeader header
;
3248 static_assert(sizeof(GenTexturesImmediate
) == 8,
3249 "size of GenTexturesImmediate should be 8");
3250 static_assert(offsetof(GenTexturesImmediate
, header
) == 0,
3251 "offset of GenTexturesImmediate header should be 0");
3252 static_assert(offsetof(GenTexturesImmediate
, n
) == 4,
3253 "offset of GenTexturesImmediate n should be 4");
3255 struct GenTransformFeedbacksImmediate
{
3256 typedef GenTransformFeedbacksImmediate ValueType
;
3257 static const CommandId kCmdId
= kGenTransformFeedbacksImmediate
;
3258 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3259 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3261 static uint32_t ComputeDataSize(GLsizei n
) {
3262 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3265 static uint32_t ComputeSize(GLsizei n
) {
3266 return static_cast<uint32_t>(sizeof(ValueType
) +
3267 ComputeDataSize(n
)); // NOLINT
3270 void SetHeader(GLsizei n
) {
3271 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3274 void Init(GLsizei _n
, GLuint
* _ids
) {
3277 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
3280 void* Set(void* cmd
, GLsizei _n
, GLuint
* _ids
) {
3281 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
3282 const uint32_t size
= ComputeSize(_n
);
3283 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3286 gpu::CommandHeader header
;
3290 static_assert(sizeof(GenTransformFeedbacksImmediate
) == 8,
3291 "size of GenTransformFeedbacksImmediate should be 8");
3292 static_assert(offsetof(GenTransformFeedbacksImmediate
, header
) == 0,
3293 "offset of GenTransformFeedbacksImmediate header should be 0");
3294 static_assert(offsetof(GenTransformFeedbacksImmediate
, n
) == 4,
3295 "offset of GenTransformFeedbacksImmediate n should be 4");
3297 struct GetActiveAttrib
{
3298 typedef GetActiveAttrib ValueType
;
3299 static const CommandId kCmdId
= kGetActiveAttrib
;
3300 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3301 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3309 static uint32_t ComputeSize() {
3310 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3313 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3315 void Init(GLuint _program
,
3317 uint32_t _name_bucket_id
,
3318 uint32_t _result_shm_id
,
3319 uint32_t _result_shm_offset
) {
3323 name_bucket_id
= _name_bucket_id
;
3324 result_shm_id
= _result_shm_id
;
3325 result_shm_offset
= _result_shm_offset
;
3328 void* Set(void* cmd
,
3331 uint32_t _name_bucket_id
,
3332 uint32_t _result_shm_id
,
3333 uint32_t _result_shm_offset
) {
3334 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3335 _result_shm_id
, _result_shm_offset
);
3336 return NextCmdAddress
<ValueType
>(cmd
);
3339 gpu::CommandHeader header
;
3342 uint32_t name_bucket_id
;
3343 uint32_t result_shm_id
;
3344 uint32_t result_shm_offset
;
3347 static_assert(sizeof(GetActiveAttrib
) == 24,
3348 "size of GetActiveAttrib should be 24");
3349 static_assert(offsetof(GetActiveAttrib
, header
) == 0,
3350 "offset of GetActiveAttrib header should be 0");
3351 static_assert(offsetof(GetActiveAttrib
, program
) == 4,
3352 "offset of GetActiveAttrib program should be 4");
3353 static_assert(offsetof(GetActiveAttrib
, index
) == 8,
3354 "offset of GetActiveAttrib index should be 8");
3355 static_assert(offsetof(GetActiveAttrib
, name_bucket_id
) == 12,
3356 "offset of GetActiveAttrib name_bucket_id should be 12");
3357 static_assert(offsetof(GetActiveAttrib
, result_shm_id
) == 16,
3358 "offset of GetActiveAttrib result_shm_id should be 16");
3359 static_assert(offsetof(GetActiveAttrib
, result_shm_offset
) == 20,
3360 "offset of GetActiveAttrib result_shm_offset should be 20");
3361 static_assert(offsetof(GetActiveAttrib::Result
, success
) == 0,
3362 "offset of GetActiveAttrib Result success should be "
3364 static_assert(offsetof(GetActiveAttrib::Result
, size
) == 4,
3365 "offset of GetActiveAttrib Result size should be "
3367 static_assert(offsetof(GetActiveAttrib::Result
, type
) == 8,
3368 "offset of GetActiveAttrib Result type should be "
3371 struct GetActiveUniform
{
3372 typedef GetActiveUniform ValueType
;
3373 static const CommandId kCmdId
= kGetActiveUniform
;
3374 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3383 static uint32_t ComputeSize() {
3384 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3387 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3389 void Init(GLuint _program
,
3391 uint32_t _name_bucket_id
,
3392 uint32_t _result_shm_id
,
3393 uint32_t _result_shm_offset
) {
3397 name_bucket_id
= _name_bucket_id
;
3398 result_shm_id
= _result_shm_id
;
3399 result_shm_offset
= _result_shm_offset
;
3402 void* Set(void* cmd
,
3405 uint32_t _name_bucket_id
,
3406 uint32_t _result_shm_id
,
3407 uint32_t _result_shm_offset
) {
3408 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3409 _result_shm_id
, _result_shm_offset
);
3410 return NextCmdAddress
<ValueType
>(cmd
);
3413 gpu::CommandHeader header
;
3416 uint32_t name_bucket_id
;
3417 uint32_t result_shm_id
;
3418 uint32_t result_shm_offset
;
3421 static_assert(sizeof(GetActiveUniform
) == 24,
3422 "size of GetActiveUniform should be 24");
3423 static_assert(offsetof(GetActiveUniform
, header
) == 0,
3424 "offset of GetActiveUniform header should be 0");
3425 static_assert(offsetof(GetActiveUniform
, program
) == 4,
3426 "offset of GetActiveUniform program should be 4");
3427 static_assert(offsetof(GetActiveUniform
, index
) == 8,
3428 "offset of GetActiveUniform index should be 8");
3429 static_assert(offsetof(GetActiveUniform
, name_bucket_id
) == 12,
3430 "offset of GetActiveUniform name_bucket_id should be 12");
3431 static_assert(offsetof(GetActiveUniform
, result_shm_id
) == 16,
3432 "offset of GetActiveUniform result_shm_id should be 16");
3433 static_assert(offsetof(GetActiveUniform
, result_shm_offset
) == 20,
3434 "offset of GetActiveUniform result_shm_offset should be 20");
3435 static_assert(offsetof(GetActiveUniform::Result
, success
) == 0,
3436 "offset of GetActiveUniform Result success should be "
3438 static_assert(offsetof(GetActiveUniform::Result
, size
) == 4,
3439 "offset of GetActiveUniform Result size should be "
3441 static_assert(offsetof(GetActiveUniform::Result
, type
) == 8,
3442 "offset of GetActiveUniform Result type should be "
3445 struct GetActiveUniformBlockiv
{
3446 typedef GetActiveUniformBlockiv ValueType
;
3447 static const CommandId kCmdId
= kGetActiveUniformBlockiv
;
3448 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3449 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3451 typedef SizedResult
<GLint
> Result
;
3453 static uint32_t ComputeSize() {
3454 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3457 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3459 void Init(GLuint _program
,
3462 uint32_t _params_shm_id
,
3463 uint32_t _params_shm_offset
) {
3468 params_shm_id
= _params_shm_id
;
3469 params_shm_offset
= _params_shm_offset
;
3472 void* Set(void* cmd
,
3476 uint32_t _params_shm_id
,
3477 uint32_t _params_shm_offset
) {
3478 static_cast<ValueType
*>(cmd
)
3479 ->Init(_program
, _index
, _pname
, _params_shm_id
, _params_shm_offset
);
3480 return NextCmdAddress
<ValueType
>(cmd
);
3483 gpu::CommandHeader header
;
3487 uint32_t params_shm_id
;
3488 uint32_t params_shm_offset
;
3491 static_assert(sizeof(GetActiveUniformBlockiv
) == 24,
3492 "size of GetActiveUniformBlockiv should be 24");
3493 static_assert(offsetof(GetActiveUniformBlockiv
, header
) == 0,
3494 "offset of GetActiveUniformBlockiv header should be 0");
3495 static_assert(offsetof(GetActiveUniformBlockiv
, program
) == 4,
3496 "offset of GetActiveUniformBlockiv program should be 4");
3497 static_assert(offsetof(GetActiveUniformBlockiv
, index
) == 8,
3498 "offset of GetActiveUniformBlockiv index should be 8");
3499 static_assert(offsetof(GetActiveUniformBlockiv
, pname
) == 12,
3500 "offset of GetActiveUniformBlockiv pname should be 12");
3501 static_assert(offsetof(GetActiveUniformBlockiv
, params_shm_id
) == 16,
3502 "offset of GetActiveUniformBlockiv params_shm_id should be 16");
3504 offsetof(GetActiveUniformBlockiv
, params_shm_offset
) == 20,
3505 "offset of GetActiveUniformBlockiv params_shm_offset should be 20");
3507 struct GetActiveUniformBlockName
{
3508 typedef GetActiveUniformBlockName ValueType
;
3509 static const CommandId kCmdId
= kGetActiveUniformBlockName
;
3510 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3511 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3513 typedef int32_t Result
;
3515 static uint32_t ComputeSize() {
3516 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3519 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3521 void Init(GLuint _program
,
3523 uint32_t _name_bucket_id
,
3524 uint32_t _result_shm_id
,
3525 uint32_t _result_shm_offset
) {
3529 name_bucket_id
= _name_bucket_id
;
3530 result_shm_id
= _result_shm_id
;
3531 result_shm_offset
= _result_shm_offset
;
3534 void* Set(void* cmd
,
3537 uint32_t _name_bucket_id
,
3538 uint32_t _result_shm_id
,
3539 uint32_t _result_shm_offset
) {
3540 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3541 _result_shm_id
, _result_shm_offset
);
3542 return NextCmdAddress
<ValueType
>(cmd
);
3545 gpu::CommandHeader header
;
3548 uint32_t name_bucket_id
;
3549 uint32_t result_shm_id
;
3550 uint32_t result_shm_offset
;
3553 static_assert(sizeof(GetActiveUniformBlockName
) == 24,
3554 "size of GetActiveUniformBlockName should be 24");
3555 static_assert(offsetof(GetActiveUniformBlockName
, header
) == 0,
3556 "offset of GetActiveUniformBlockName header should be 0");
3557 static_assert(offsetof(GetActiveUniformBlockName
, program
) == 4,
3558 "offset of GetActiveUniformBlockName program should be 4");
3559 static_assert(offsetof(GetActiveUniformBlockName
, index
) == 8,
3560 "offset of GetActiveUniformBlockName index should be 8");
3562 offsetof(GetActiveUniformBlockName
, name_bucket_id
) == 12,
3563 "offset of GetActiveUniformBlockName name_bucket_id should be 12");
3564 static_assert(offsetof(GetActiveUniformBlockName
, result_shm_id
) == 16,
3565 "offset of GetActiveUniformBlockName result_shm_id should be 16");
3567 offsetof(GetActiveUniformBlockName
, result_shm_offset
) == 20,
3568 "offset of GetActiveUniformBlockName result_shm_offset should be 20");
3570 struct GetActiveUniformsiv
{
3571 typedef GetActiveUniformsiv ValueType
;
3572 static const CommandId kCmdId
= kGetActiveUniformsiv
;
3573 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3574 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3576 typedef SizedResult
<GLint
> Result
;
3578 static uint32_t ComputeSize() {
3579 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3582 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3584 void Init(GLuint _program
,
3585 uint32_t _indices_bucket_id
,
3587 uint32_t _params_shm_id
,
3588 uint32_t _params_shm_offset
) {
3591 indices_bucket_id
= _indices_bucket_id
;
3593 params_shm_id
= _params_shm_id
;
3594 params_shm_offset
= _params_shm_offset
;
3597 void* Set(void* cmd
,
3599 uint32_t _indices_bucket_id
,
3601 uint32_t _params_shm_id
,
3602 uint32_t _params_shm_offset
) {
3603 static_cast<ValueType
*>(cmd
)->Init(_program
, _indices_bucket_id
, _pname
,
3604 _params_shm_id
, _params_shm_offset
);
3605 return NextCmdAddress
<ValueType
>(cmd
);
3608 gpu::CommandHeader header
;
3610 uint32_t indices_bucket_id
;
3612 uint32_t params_shm_id
;
3613 uint32_t params_shm_offset
;
3616 static_assert(sizeof(GetActiveUniformsiv
) == 24,
3617 "size of GetActiveUniformsiv should be 24");
3618 static_assert(offsetof(GetActiveUniformsiv
, header
) == 0,
3619 "offset of GetActiveUniformsiv header should be 0");
3620 static_assert(offsetof(GetActiveUniformsiv
, program
) == 4,
3621 "offset of GetActiveUniformsiv program should be 4");
3622 static_assert(offsetof(GetActiveUniformsiv
, indices_bucket_id
) == 8,
3623 "offset of GetActiveUniformsiv indices_bucket_id should be 8");
3624 static_assert(offsetof(GetActiveUniformsiv
, pname
) == 12,
3625 "offset of GetActiveUniformsiv pname should be 12");
3626 static_assert(offsetof(GetActiveUniformsiv
, params_shm_id
) == 16,
3627 "offset of GetActiveUniformsiv params_shm_id should be 16");
3628 static_assert(offsetof(GetActiveUniformsiv
, params_shm_offset
) == 20,
3629 "offset of GetActiveUniformsiv params_shm_offset should be 20");
3631 struct GetAttachedShaders
{
3632 typedef GetAttachedShaders ValueType
;
3633 static const CommandId kCmdId
= kGetAttachedShaders
;
3634 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3635 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3637 typedef SizedResult
<GLuint
> Result
;
3639 static uint32_t ComputeSize() {
3640 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3643 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3645 void Init(GLuint _program
,
3646 uint32_t _result_shm_id
,
3647 uint32_t _result_shm_offset
,
3648 uint32_t _result_size
) {
3651 result_shm_id
= _result_shm_id
;
3652 result_shm_offset
= _result_shm_offset
;
3653 result_size
= _result_size
;
3656 void* Set(void* cmd
,
3658 uint32_t _result_shm_id
,
3659 uint32_t _result_shm_offset
,
3660 uint32_t _result_size
) {
3661 static_cast<ValueType
*>(cmd
)
3662 ->Init(_program
, _result_shm_id
, _result_shm_offset
, _result_size
);
3663 return NextCmdAddress
<ValueType
>(cmd
);
3666 gpu::CommandHeader header
;
3668 uint32_t result_shm_id
;
3669 uint32_t result_shm_offset
;
3670 uint32_t result_size
;
3673 static_assert(sizeof(GetAttachedShaders
) == 20,
3674 "size of GetAttachedShaders should be 20");
3675 static_assert(offsetof(GetAttachedShaders
, header
) == 0,
3676 "offset of GetAttachedShaders header should be 0");
3677 static_assert(offsetof(GetAttachedShaders
, program
) == 4,
3678 "offset of GetAttachedShaders program should be 4");
3679 static_assert(offsetof(GetAttachedShaders
, result_shm_id
) == 8,
3680 "offset of GetAttachedShaders result_shm_id should be 8");
3681 static_assert(offsetof(GetAttachedShaders
, result_shm_offset
) == 12,
3682 "offset of GetAttachedShaders result_shm_offset should be 12");
3683 static_assert(offsetof(GetAttachedShaders
, result_size
) == 16,
3684 "offset of GetAttachedShaders result_size should be 16");
3686 struct GetAttribLocation
{
3687 typedef GetAttribLocation ValueType
;
3688 static const CommandId kCmdId
= kGetAttribLocation
;
3689 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3690 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3692 typedef GLint Result
;
3694 static uint32_t ComputeSize() {
3695 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3698 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3700 void Init(GLuint _program
,
3701 uint32_t _name_bucket_id
,
3702 uint32_t _location_shm_id
,
3703 uint32_t _location_shm_offset
) {
3706 name_bucket_id
= _name_bucket_id
;
3707 location_shm_id
= _location_shm_id
;
3708 location_shm_offset
= _location_shm_offset
;
3711 void* Set(void* cmd
,
3713 uint32_t _name_bucket_id
,
3714 uint32_t _location_shm_id
,
3715 uint32_t _location_shm_offset
) {
3716 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
3717 _location_shm_id
, _location_shm_offset
);
3718 return NextCmdAddress
<ValueType
>(cmd
);
3721 gpu::CommandHeader header
;
3723 uint32_t name_bucket_id
;
3724 uint32_t location_shm_id
;
3725 uint32_t location_shm_offset
;
3728 static_assert(sizeof(GetAttribLocation
) == 20,
3729 "size of GetAttribLocation should be 20");
3730 static_assert(offsetof(GetAttribLocation
, header
) == 0,
3731 "offset of GetAttribLocation header should be 0");
3732 static_assert(offsetof(GetAttribLocation
, program
) == 4,
3733 "offset of GetAttribLocation program should be 4");
3734 static_assert(offsetof(GetAttribLocation
, name_bucket_id
) == 8,
3735 "offset of GetAttribLocation name_bucket_id should be 8");
3736 static_assert(offsetof(GetAttribLocation
, location_shm_id
) == 12,
3737 "offset of GetAttribLocation location_shm_id should be 12");
3738 static_assert(offsetof(GetAttribLocation
, location_shm_offset
) == 16,
3739 "offset of GetAttribLocation location_shm_offset should be 16");
3741 struct GetBooleanv
{
3742 typedef GetBooleanv ValueType
;
3743 static const CommandId kCmdId
= kGetBooleanv
;
3744 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3745 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3747 typedef SizedResult
<GLboolean
> Result
;
3749 static uint32_t ComputeSize() {
3750 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3753 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3755 void Init(GLenum _pname
,
3756 uint32_t _params_shm_id
,
3757 uint32_t _params_shm_offset
) {
3760 params_shm_id
= _params_shm_id
;
3761 params_shm_offset
= _params_shm_offset
;
3764 void* Set(void* cmd
,
3766 uint32_t _params_shm_id
,
3767 uint32_t _params_shm_offset
) {
3768 static_cast<ValueType
*>(cmd
)
3769 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
3770 return NextCmdAddress
<ValueType
>(cmd
);
3773 gpu::CommandHeader header
;
3775 uint32_t params_shm_id
;
3776 uint32_t params_shm_offset
;
3779 static_assert(sizeof(GetBooleanv
) == 16, "size of GetBooleanv should be 16");
3780 static_assert(offsetof(GetBooleanv
, header
) == 0,
3781 "offset of GetBooleanv header should be 0");
3782 static_assert(offsetof(GetBooleanv
, pname
) == 4,
3783 "offset of GetBooleanv pname should be 4");
3784 static_assert(offsetof(GetBooleanv
, params_shm_id
) == 8,
3785 "offset of GetBooleanv params_shm_id should be 8");
3786 static_assert(offsetof(GetBooleanv
, params_shm_offset
) == 12,
3787 "offset of GetBooleanv params_shm_offset should be 12");
3789 struct GetBufferParameteriv
{
3790 typedef GetBufferParameteriv ValueType
;
3791 static const CommandId kCmdId
= kGetBufferParameteriv
;
3792 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3793 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3795 typedef SizedResult
<GLint
> Result
;
3797 static uint32_t ComputeSize() {
3798 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3801 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3803 void Init(GLenum _target
,
3805 uint32_t _params_shm_id
,
3806 uint32_t _params_shm_offset
) {
3810 params_shm_id
= _params_shm_id
;
3811 params_shm_offset
= _params_shm_offset
;
3814 void* Set(void* cmd
,
3817 uint32_t _params_shm_id
,
3818 uint32_t _params_shm_offset
) {
3819 static_cast<ValueType
*>(cmd
)
3820 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3821 return NextCmdAddress
<ValueType
>(cmd
);
3824 gpu::CommandHeader header
;
3827 uint32_t params_shm_id
;
3828 uint32_t params_shm_offset
;
3831 static_assert(sizeof(GetBufferParameteriv
) == 20,
3832 "size of GetBufferParameteriv should be 20");
3833 static_assert(offsetof(GetBufferParameteriv
, header
) == 0,
3834 "offset of GetBufferParameteriv header should be 0");
3835 static_assert(offsetof(GetBufferParameteriv
, target
) == 4,
3836 "offset of GetBufferParameteriv target should be 4");
3837 static_assert(offsetof(GetBufferParameteriv
, pname
) == 8,
3838 "offset of GetBufferParameteriv pname should be 8");
3839 static_assert(offsetof(GetBufferParameteriv
, params_shm_id
) == 12,
3840 "offset of GetBufferParameteriv params_shm_id should be 12");
3841 static_assert(offsetof(GetBufferParameteriv
, params_shm_offset
) == 16,
3842 "offset of GetBufferParameteriv params_shm_offset should be 16");
3845 typedef GetError ValueType
;
3846 static const CommandId kCmdId
= kGetError
;
3847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3850 typedef GLenum Result
;
3852 static uint32_t ComputeSize() {
3853 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3856 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3858 void Init(uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
3860 result_shm_id
= _result_shm_id
;
3861 result_shm_offset
= _result_shm_offset
;
3864 void* Set(void* cmd
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
3865 static_cast<ValueType
*>(cmd
)->Init(_result_shm_id
, _result_shm_offset
);
3866 return NextCmdAddress
<ValueType
>(cmd
);
3869 gpu::CommandHeader header
;
3870 uint32_t result_shm_id
;
3871 uint32_t result_shm_offset
;
3874 static_assert(sizeof(GetError
) == 12, "size of GetError should be 12");
3875 static_assert(offsetof(GetError
, header
) == 0,
3876 "offset of GetError header should be 0");
3877 static_assert(offsetof(GetError
, result_shm_id
) == 4,
3878 "offset of GetError result_shm_id should be 4");
3879 static_assert(offsetof(GetError
, result_shm_offset
) == 8,
3880 "offset of GetError result_shm_offset should be 8");
3883 typedef GetFloatv ValueType
;
3884 static const CommandId kCmdId
= kGetFloatv
;
3885 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3886 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3888 typedef SizedResult
<GLfloat
> Result
;
3890 static uint32_t ComputeSize() {
3891 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3894 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3896 void Init(GLenum _pname
,
3897 uint32_t _params_shm_id
,
3898 uint32_t _params_shm_offset
) {
3901 params_shm_id
= _params_shm_id
;
3902 params_shm_offset
= _params_shm_offset
;
3905 void* Set(void* cmd
,
3907 uint32_t _params_shm_id
,
3908 uint32_t _params_shm_offset
) {
3909 static_cast<ValueType
*>(cmd
)
3910 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
3911 return NextCmdAddress
<ValueType
>(cmd
);
3914 gpu::CommandHeader header
;
3916 uint32_t params_shm_id
;
3917 uint32_t params_shm_offset
;
3920 static_assert(sizeof(GetFloatv
) == 16, "size of GetFloatv should be 16");
3921 static_assert(offsetof(GetFloatv
, header
) == 0,
3922 "offset of GetFloatv header should be 0");
3923 static_assert(offsetof(GetFloatv
, pname
) == 4,
3924 "offset of GetFloatv pname should be 4");
3925 static_assert(offsetof(GetFloatv
, params_shm_id
) == 8,
3926 "offset of GetFloatv params_shm_id should be 8");
3927 static_assert(offsetof(GetFloatv
, params_shm_offset
) == 12,
3928 "offset of GetFloatv params_shm_offset should be 12");
3930 struct GetFragDataLocation
{
3931 typedef GetFragDataLocation ValueType
;
3932 static const CommandId kCmdId
= kGetFragDataLocation
;
3933 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3934 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3936 typedef GLint Result
;
3938 static uint32_t ComputeSize() {
3939 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3942 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3944 void Init(GLuint _program
,
3945 uint32_t _name_bucket_id
,
3946 uint32_t _location_shm_id
,
3947 uint32_t _location_shm_offset
) {
3950 name_bucket_id
= _name_bucket_id
;
3951 location_shm_id
= _location_shm_id
;
3952 location_shm_offset
= _location_shm_offset
;
3955 void* Set(void* cmd
,
3957 uint32_t _name_bucket_id
,
3958 uint32_t _location_shm_id
,
3959 uint32_t _location_shm_offset
) {
3960 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
3961 _location_shm_id
, _location_shm_offset
);
3962 return NextCmdAddress
<ValueType
>(cmd
);
3965 gpu::CommandHeader header
;
3967 uint32_t name_bucket_id
;
3968 uint32_t location_shm_id
;
3969 uint32_t location_shm_offset
;
3972 static_assert(sizeof(GetFragDataLocation
) == 20,
3973 "size of GetFragDataLocation should be 20");
3974 static_assert(offsetof(GetFragDataLocation
, header
) == 0,
3975 "offset of GetFragDataLocation header should be 0");
3976 static_assert(offsetof(GetFragDataLocation
, program
) == 4,
3977 "offset of GetFragDataLocation program should be 4");
3978 static_assert(offsetof(GetFragDataLocation
, name_bucket_id
) == 8,
3979 "offset of GetFragDataLocation name_bucket_id should be 8");
3980 static_assert(offsetof(GetFragDataLocation
, location_shm_id
) == 12,
3981 "offset of GetFragDataLocation location_shm_id should be 12");
3982 static_assert(offsetof(GetFragDataLocation
, location_shm_offset
) == 16,
3983 "offset of GetFragDataLocation location_shm_offset should be 16");
3985 struct GetFramebufferAttachmentParameteriv
{
3986 typedef GetFramebufferAttachmentParameteriv ValueType
;
3987 static const CommandId kCmdId
= kGetFramebufferAttachmentParameteriv
;
3988 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3989 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3991 typedef SizedResult
<GLint
> Result
;
3993 static uint32_t ComputeSize() {
3994 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3997 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3999 void Init(GLenum _target
,
4002 uint32_t _params_shm_id
,
4003 uint32_t _params_shm_offset
) {
4006 attachment
= _attachment
;
4008 params_shm_id
= _params_shm_id
;
4009 params_shm_offset
= _params_shm_offset
;
4012 void* Set(void* cmd
,
4016 uint32_t _params_shm_id
,
4017 uint32_t _params_shm_offset
) {
4018 static_cast<ValueType
*>(cmd
)->Init(_target
, _attachment
, _pname
,
4019 _params_shm_id
, _params_shm_offset
);
4020 return NextCmdAddress
<ValueType
>(cmd
);
4023 gpu::CommandHeader header
;
4025 uint32_t attachment
;
4027 uint32_t params_shm_id
;
4028 uint32_t params_shm_offset
;
4031 static_assert(sizeof(GetFramebufferAttachmentParameteriv
) == 24,
4032 "size of GetFramebufferAttachmentParameteriv should be 24");
4034 offsetof(GetFramebufferAttachmentParameteriv
, header
) == 0,
4035 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4037 offsetof(GetFramebufferAttachmentParameteriv
, target
) == 4,
4038 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4040 offsetof(GetFramebufferAttachmentParameteriv
, attachment
) == 8,
4041 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4043 offsetof(GetFramebufferAttachmentParameteriv
, pname
) == 12,
4044 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4046 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_id
) == 16,
4047 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4048 static_assert(offsetof(GetFramebufferAttachmentParameteriv
,
4049 params_shm_offset
) == 20,
4050 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4053 struct GetIntegerv
{
4054 typedef GetIntegerv ValueType
;
4055 static const CommandId kCmdId
= kGetIntegerv
;
4056 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4057 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4059 typedef SizedResult
<GLint
> Result
;
4061 static uint32_t ComputeSize() {
4062 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4065 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4067 void Init(GLenum _pname
,
4068 uint32_t _params_shm_id
,
4069 uint32_t _params_shm_offset
) {
4072 params_shm_id
= _params_shm_id
;
4073 params_shm_offset
= _params_shm_offset
;
4076 void* Set(void* cmd
,
4078 uint32_t _params_shm_id
,
4079 uint32_t _params_shm_offset
) {
4080 static_cast<ValueType
*>(cmd
)
4081 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4082 return NextCmdAddress
<ValueType
>(cmd
);
4085 gpu::CommandHeader header
;
4087 uint32_t params_shm_id
;
4088 uint32_t params_shm_offset
;
4091 static_assert(sizeof(GetIntegerv
) == 16, "size of GetIntegerv should be 16");
4092 static_assert(offsetof(GetIntegerv
, header
) == 0,
4093 "offset of GetIntegerv header should be 0");
4094 static_assert(offsetof(GetIntegerv
, pname
) == 4,
4095 "offset of GetIntegerv pname should be 4");
4096 static_assert(offsetof(GetIntegerv
, params_shm_id
) == 8,
4097 "offset of GetIntegerv params_shm_id should be 8");
4098 static_assert(offsetof(GetIntegerv
, params_shm_offset
) == 12,
4099 "offset of GetIntegerv params_shm_offset should be 12");
4101 struct GetInternalformativ
{
4102 typedef GetInternalformativ ValueType
;
4103 static const CommandId kCmdId
= kGetInternalformativ
;
4104 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4105 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4107 typedef SizedResult
<GLint
> Result
;
4109 static uint32_t ComputeSize() {
4110 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4113 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4115 void Init(GLenum _target
,
4119 uint32_t _params_shm_id
,
4120 uint32_t _params_shm_offset
) {
4126 params_shm_id
= _params_shm_id
;
4127 params_shm_offset
= _params_shm_offset
;
4130 void* Set(void* cmd
,
4135 uint32_t _params_shm_id
,
4136 uint32_t _params_shm_offset
) {
4137 static_cast<ValueType
*>(cmd
)->Init(_target
, _format
, _pname
, _bufSize
,
4138 _params_shm_id
, _params_shm_offset
);
4139 return NextCmdAddress
<ValueType
>(cmd
);
4142 gpu::CommandHeader header
;
4147 uint32_t params_shm_id
;
4148 uint32_t params_shm_offset
;
4151 static_assert(sizeof(GetInternalformativ
) == 28,
4152 "size of GetInternalformativ should be 28");
4153 static_assert(offsetof(GetInternalformativ
, header
) == 0,
4154 "offset of GetInternalformativ header should be 0");
4155 static_assert(offsetof(GetInternalformativ
, target
) == 4,
4156 "offset of GetInternalformativ target should be 4");
4157 static_assert(offsetof(GetInternalformativ
, format
) == 8,
4158 "offset of GetInternalformativ format should be 8");
4159 static_assert(offsetof(GetInternalformativ
, pname
) == 12,
4160 "offset of GetInternalformativ pname should be 12");
4161 static_assert(offsetof(GetInternalformativ
, bufSize
) == 16,
4162 "offset of GetInternalformativ bufSize should be 16");
4163 static_assert(offsetof(GetInternalformativ
, params_shm_id
) == 20,
4164 "offset of GetInternalformativ params_shm_id should be 20");
4165 static_assert(offsetof(GetInternalformativ
, params_shm_offset
) == 24,
4166 "offset of GetInternalformativ params_shm_offset should be 24");
4168 struct GetProgramiv
{
4169 typedef GetProgramiv ValueType
;
4170 static const CommandId kCmdId
= kGetProgramiv
;
4171 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4172 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4174 typedef SizedResult
<GLint
> Result
;
4176 static uint32_t ComputeSize() {
4177 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4180 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4182 void Init(GLuint _program
,
4184 uint32_t _params_shm_id
,
4185 uint32_t _params_shm_offset
) {
4189 params_shm_id
= _params_shm_id
;
4190 params_shm_offset
= _params_shm_offset
;
4193 void* Set(void* cmd
,
4196 uint32_t _params_shm_id
,
4197 uint32_t _params_shm_offset
) {
4198 static_cast<ValueType
*>(cmd
)
4199 ->Init(_program
, _pname
, _params_shm_id
, _params_shm_offset
);
4200 return NextCmdAddress
<ValueType
>(cmd
);
4203 gpu::CommandHeader header
;
4206 uint32_t params_shm_id
;
4207 uint32_t params_shm_offset
;
4210 static_assert(sizeof(GetProgramiv
) == 20, "size of GetProgramiv should be 20");
4211 static_assert(offsetof(GetProgramiv
, header
) == 0,
4212 "offset of GetProgramiv header should be 0");
4213 static_assert(offsetof(GetProgramiv
, program
) == 4,
4214 "offset of GetProgramiv program should be 4");
4215 static_assert(offsetof(GetProgramiv
, pname
) == 8,
4216 "offset of GetProgramiv pname should be 8");
4217 static_assert(offsetof(GetProgramiv
, params_shm_id
) == 12,
4218 "offset of GetProgramiv params_shm_id should be 12");
4219 static_assert(offsetof(GetProgramiv
, params_shm_offset
) == 16,
4220 "offset of GetProgramiv params_shm_offset should be 16");
4222 struct GetProgramInfoLog
{
4223 typedef GetProgramInfoLog ValueType
;
4224 static const CommandId kCmdId
= kGetProgramInfoLog
;
4225 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4226 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4228 static uint32_t ComputeSize() {
4229 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4232 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4234 void Init(GLuint _program
, uint32_t _bucket_id
) {
4237 bucket_id
= _bucket_id
;
4240 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
4241 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
4242 return NextCmdAddress
<ValueType
>(cmd
);
4245 gpu::CommandHeader header
;
4250 static_assert(sizeof(GetProgramInfoLog
) == 12,
4251 "size of GetProgramInfoLog should be 12");
4252 static_assert(offsetof(GetProgramInfoLog
, header
) == 0,
4253 "offset of GetProgramInfoLog header should be 0");
4254 static_assert(offsetof(GetProgramInfoLog
, program
) == 4,
4255 "offset of GetProgramInfoLog program should be 4");
4256 static_assert(offsetof(GetProgramInfoLog
, bucket_id
) == 8,
4257 "offset of GetProgramInfoLog bucket_id should be 8");
4259 struct GetRenderbufferParameteriv
{
4260 typedef GetRenderbufferParameteriv ValueType
;
4261 static const CommandId kCmdId
= kGetRenderbufferParameteriv
;
4262 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4263 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4265 typedef SizedResult
<GLint
> Result
;
4267 static uint32_t ComputeSize() {
4268 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4271 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4273 void Init(GLenum _target
,
4275 uint32_t _params_shm_id
,
4276 uint32_t _params_shm_offset
) {
4280 params_shm_id
= _params_shm_id
;
4281 params_shm_offset
= _params_shm_offset
;
4284 void* Set(void* cmd
,
4287 uint32_t _params_shm_id
,
4288 uint32_t _params_shm_offset
) {
4289 static_cast<ValueType
*>(cmd
)
4290 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4291 return NextCmdAddress
<ValueType
>(cmd
);
4294 gpu::CommandHeader header
;
4297 uint32_t params_shm_id
;
4298 uint32_t params_shm_offset
;
4301 static_assert(sizeof(GetRenderbufferParameteriv
) == 20,
4302 "size of GetRenderbufferParameteriv should be 20");
4303 static_assert(offsetof(GetRenderbufferParameteriv
, header
) == 0,
4304 "offset of GetRenderbufferParameteriv header should be 0");
4305 static_assert(offsetof(GetRenderbufferParameteriv
, target
) == 4,
4306 "offset of GetRenderbufferParameteriv target should be 4");
4307 static_assert(offsetof(GetRenderbufferParameteriv
, pname
) == 8,
4308 "offset of GetRenderbufferParameteriv pname should be 8");
4310 offsetof(GetRenderbufferParameteriv
, params_shm_id
) == 12,
4311 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4313 offsetof(GetRenderbufferParameteriv
, params_shm_offset
) == 16,
4314 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4316 struct GetSamplerParameterfv
{
4317 typedef GetSamplerParameterfv ValueType
;
4318 static const CommandId kCmdId
= kGetSamplerParameterfv
;
4319 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4320 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4322 typedef SizedResult
<GLfloat
> Result
;
4324 static uint32_t ComputeSize() {
4325 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4328 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4330 void Init(GLuint _sampler
,
4332 uint32_t _params_shm_id
,
4333 uint32_t _params_shm_offset
) {
4337 params_shm_id
= _params_shm_id
;
4338 params_shm_offset
= _params_shm_offset
;
4341 void* Set(void* cmd
,
4344 uint32_t _params_shm_id
,
4345 uint32_t _params_shm_offset
) {
4346 static_cast<ValueType
*>(cmd
)
4347 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4348 return NextCmdAddress
<ValueType
>(cmd
);
4351 gpu::CommandHeader header
;
4354 uint32_t params_shm_id
;
4355 uint32_t params_shm_offset
;
4358 static_assert(sizeof(GetSamplerParameterfv
) == 20,
4359 "size of GetSamplerParameterfv should be 20");
4360 static_assert(offsetof(GetSamplerParameterfv
, header
) == 0,
4361 "offset of GetSamplerParameterfv header should be 0");
4362 static_assert(offsetof(GetSamplerParameterfv
, sampler
) == 4,
4363 "offset of GetSamplerParameterfv sampler should be 4");
4364 static_assert(offsetof(GetSamplerParameterfv
, pname
) == 8,
4365 "offset of GetSamplerParameterfv pname should be 8");
4366 static_assert(offsetof(GetSamplerParameterfv
, params_shm_id
) == 12,
4367 "offset of GetSamplerParameterfv params_shm_id should be 12");
4368 static_assert(offsetof(GetSamplerParameterfv
, params_shm_offset
) == 16,
4369 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4371 struct GetSamplerParameteriv
{
4372 typedef GetSamplerParameteriv ValueType
;
4373 static const CommandId kCmdId
= kGetSamplerParameteriv
;
4374 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4377 typedef SizedResult
<GLint
> Result
;
4379 static uint32_t ComputeSize() {
4380 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4383 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4385 void Init(GLuint _sampler
,
4387 uint32_t _params_shm_id
,
4388 uint32_t _params_shm_offset
) {
4392 params_shm_id
= _params_shm_id
;
4393 params_shm_offset
= _params_shm_offset
;
4396 void* Set(void* cmd
,
4399 uint32_t _params_shm_id
,
4400 uint32_t _params_shm_offset
) {
4401 static_cast<ValueType
*>(cmd
)
4402 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4403 return NextCmdAddress
<ValueType
>(cmd
);
4406 gpu::CommandHeader header
;
4409 uint32_t params_shm_id
;
4410 uint32_t params_shm_offset
;
4413 static_assert(sizeof(GetSamplerParameteriv
) == 20,
4414 "size of GetSamplerParameteriv should be 20");
4415 static_assert(offsetof(GetSamplerParameteriv
, header
) == 0,
4416 "offset of GetSamplerParameteriv header should be 0");
4417 static_assert(offsetof(GetSamplerParameteriv
, sampler
) == 4,
4418 "offset of GetSamplerParameteriv sampler should be 4");
4419 static_assert(offsetof(GetSamplerParameteriv
, pname
) == 8,
4420 "offset of GetSamplerParameteriv pname should be 8");
4421 static_assert(offsetof(GetSamplerParameteriv
, params_shm_id
) == 12,
4422 "offset of GetSamplerParameteriv params_shm_id should be 12");
4423 static_assert(offsetof(GetSamplerParameteriv
, params_shm_offset
) == 16,
4424 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4426 struct GetShaderiv
{
4427 typedef GetShaderiv ValueType
;
4428 static const CommandId kCmdId
= kGetShaderiv
;
4429 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4430 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4432 typedef SizedResult
<GLint
> Result
;
4434 static uint32_t ComputeSize() {
4435 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4438 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4440 void Init(GLuint _shader
,
4442 uint32_t _params_shm_id
,
4443 uint32_t _params_shm_offset
) {
4447 params_shm_id
= _params_shm_id
;
4448 params_shm_offset
= _params_shm_offset
;
4451 void* Set(void* cmd
,
4454 uint32_t _params_shm_id
,
4455 uint32_t _params_shm_offset
) {
4456 static_cast<ValueType
*>(cmd
)
4457 ->Init(_shader
, _pname
, _params_shm_id
, _params_shm_offset
);
4458 return NextCmdAddress
<ValueType
>(cmd
);
4461 gpu::CommandHeader header
;
4464 uint32_t params_shm_id
;
4465 uint32_t params_shm_offset
;
4468 static_assert(sizeof(GetShaderiv
) == 20, "size of GetShaderiv should be 20");
4469 static_assert(offsetof(GetShaderiv
, header
) == 0,
4470 "offset of GetShaderiv header should be 0");
4471 static_assert(offsetof(GetShaderiv
, shader
) == 4,
4472 "offset of GetShaderiv shader should be 4");
4473 static_assert(offsetof(GetShaderiv
, pname
) == 8,
4474 "offset of GetShaderiv pname should be 8");
4475 static_assert(offsetof(GetShaderiv
, params_shm_id
) == 12,
4476 "offset of GetShaderiv params_shm_id should be 12");
4477 static_assert(offsetof(GetShaderiv
, params_shm_offset
) == 16,
4478 "offset of GetShaderiv params_shm_offset should be 16");
4480 struct GetShaderInfoLog
{
4481 typedef GetShaderInfoLog ValueType
;
4482 static const CommandId kCmdId
= kGetShaderInfoLog
;
4483 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4484 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4486 static uint32_t ComputeSize() {
4487 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4490 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4492 void Init(GLuint _shader
, uint32_t _bucket_id
) {
4495 bucket_id
= _bucket_id
;
4498 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
4499 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
4500 return NextCmdAddress
<ValueType
>(cmd
);
4503 gpu::CommandHeader header
;
4508 static_assert(sizeof(GetShaderInfoLog
) == 12,
4509 "size of GetShaderInfoLog should be 12");
4510 static_assert(offsetof(GetShaderInfoLog
, header
) == 0,
4511 "offset of GetShaderInfoLog header should be 0");
4512 static_assert(offsetof(GetShaderInfoLog
, shader
) == 4,
4513 "offset of GetShaderInfoLog shader should be 4");
4514 static_assert(offsetof(GetShaderInfoLog
, bucket_id
) == 8,
4515 "offset of GetShaderInfoLog bucket_id should be 8");
4517 struct GetShaderPrecisionFormat
{
4518 typedef GetShaderPrecisionFormat ValueType
;
4519 static const CommandId kCmdId
= kGetShaderPrecisionFormat
;
4520 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4521 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4530 static uint32_t ComputeSize() {
4531 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4534 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4536 void Init(GLenum _shadertype
,
4537 GLenum _precisiontype
,
4538 uint32_t _result_shm_id
,
4539 uint32_t _result_shm_offset
) {
4541 shadertype
= _shadertype
;
4542 precisiontype
= _precisiontype
;
4543 result_shm_id
= _result_shm_id
;
4544 result_shm_offset
= _result_shm_offset
;
4547 void* Set(void* cmd
,
4549 GLenum _precisiontype
,
4550 uint32_t _result_shm_id
,
4551 uint32_t _result_shm_offset
) {
4552 static_cast<ValueType
*>(cmd
)
4553 ->Init(_shadertype
, _precisiontype
, _result_shm_id
, _result_shm_offset
);
4554 return NextCmdAddress
<ValueType
>(cmd
);
4557 gpu::CommandHeader header
;
4558 uint32_t shadertype
;
4559 uint32_t precisiontype
;
4560 uint32_t result_shm_id
;
4561 uint32_t result_shm_offset
;
4564 static_assert(sizeof(GetShaderPrecisionFormat
) == 20,
4565 "size of GetShaderPrecisionFormat should be 20");
4566 static_assert(offsetof(GetShaderPrecisionFormat
, header
) == 0,
4567 "offset of GetShaderPrecisionFormat header should be 0");
4568 static_assert(offsetof(GetShaderPrecisionFormat
, shadertype
) == 4,
4569 "offset of GetShaderPrecisionFormat shadertype should be 4");
4570 static_assert(offsetof(GetShaderPrecisionFormat
, precisiontype
) == 8,
4571 "offset of GetShaderPrecisionFormat precisiontype should be 8");
4572 static_assert(offsetof(GetShaderPrecisionFormat
, result_shm_id
) == 12,
4573 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
4575 offsetof(GetShaderPrecisionFormat
, result_shm_offset
) == 16,
4576 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
4577 static_assert(offsetof(GetShaderPrecisionFormat::Result
, success
) == 0,
4578 "offset of GetShaderPrecisionFormat Result success should be "
4580 static_assert(offsetof(GetShaderPrecisionFormat::Result
, min_range
) == 4,
4581 "offset of GetShaderPrecisionFormat Result min_range should be "
4583 static_assert(offsetof(GetShaderPrecisionFormat::Result
, max_range
) == 8,
4584 "offset of GetShaderPrecisionFormat Result max_range should be "
4586 static_assert(offsetof(GetShaderPrecisionFormat::Result
, precision
) == 12,
4587 "offset of GetShaderPrecisionFormat Result precision should be "
4590 struct GetShaderSource
{
4591 typedef GetShaderSource ValueType
;
4592 static const CommandId kCmdId
= kGetShaderSource
;
4593 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4594 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4596 static uint32_t ComputeSize() {
4597 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4600 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4602 void Init(GLuint _shader
, uint32_t _bucket_id
) {
4605 bucket_id
= _bucket_id
;
4608 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
4609 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
4610 return NextCmdAddress
<ValueType
>(cmd
);
4613 gpu::CommandHeader header
;
4618 static_assert(sizeof(GetShaderSource
) == 12,
4619 "size of GetShaderSource should be 12");
4620 static_assert(offsetof(GetShaderSource
, header
) == 0,
4621 "offset of GetShaderSource header should be 0");
4622 static_assert(offsetof(GetShaderSource
, shader
) == 4,
4623 "offset of GetShaderSource shader should be 4");
4624 static_assert(offsetof(GetShaderSource
, bucket_id
) == 8,
4625 "offset of GetShaderSource bucket_id should be 8");
4628 typedef GetString ValueType
;
4629 static const CommandId kCmdId
= kGetString
;
4630 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4631 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4633 static uint32_t ComputeSize() {
4634 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4637 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4639 void Init(GLenum _name
, uint32_t _bucket_id
) {
4642 bucket_id
= _bucket_id
;
4645 void* Set(void* cmd
, GLenum _name
, uint32_t _bucket_id
) {
4646 static_cast<ValueType
*>(cmd
)->Init(_name
, _bucket_id
);
4647 return NextCmdAddress
<ValueType
>(cmd
);
4650 gpu::CommandHeader header
;
4655 static_assert(sizeof(GetString
) == 12, "size of GetString should be 12");
4656 static_assert(offsetof(GetString
, header
) == 0,
4657 "offset of GetString header should be 0");
4658 static_assert(offsetof(GetString
, name
) == 4,
4659 "offset of GetString name should be 4");
4660 static_assert(offsetof(GetString
, bucket_id
) == 8,
4661 "offset of GetString bucket_id should be 8");
4664 typedef GetSynciv ValueType
;
4665 static const CommandId kCmdId
= kGetSynciv
;
4666 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4667 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4669 typedef SizedResult
<GLint
> Result
;
4671 static uint32_t ComputeSize() {
4672 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4675 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4677 void Init(GLuint _sync
,
4679 uint32_t _values_shm_id
,
4680 uint32_t _values_shm_offset
) {
4684 values_shm_id
= _values_shm_id
;
4685 values_shm_offset
= _values_shm_offset
;
4688 void* Set(void* cmd
,
4691 uint32_t _values_shm_id
,
4692 uint32_t _values_shm_offset
) {
4693 static_cast<ValueType
*>(cmd
)
4694 ->Init(_sync
, _pname
, _values_shm_id
, _values_shm_offset
);
4695 return NextCmdAddress
<ValueType
>(cmd
);
4698 gpu::CommandHeader header
;
4701 uint32_t values_shm_id
;
4702 uint32_t values_shm_offset
;
4705 static_assert(sizeof(GetSynciv
) == 20, "size of GetSynciv should be 20");
4706 static_assert(offsetof(GetSynciv
, header
) == 0,
4707 "offset of GetSynciv header should be 0");
4708 static_assert(offsetof(GetSynciv
, sync
) == 4,
4709 "offset of GetSynciv sync should be 4");
4710 static_assert(offsetof(GetSynciv
, pname
) == 8,
4711 "offset of GetSynciv pname should be 8");
4712 static_assert(offsetof(GetSynciv
, values_shm_id
) == 12,
4713 "offset of GetSynciv values_shm_id should be 12");
4714 static_assert(offsetof(GetSynciv
, values_shm_offset
) == 16,
4715 "offset of GetSynciv values_shm_offset should be 16");
4717 struct GetTexParameterfv
{
4718 typedef GetTexParameterfv ValueType
;
4719 static const CommandId kCmdId
= kGetTexParameterfv
;
4720 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4721 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4723 typedef SizedResult
<GLfloat
> Result
;
4725 static uint32_t ComputeSize() {
4726 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4729 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4731 void Init(GLenum _target
,
4733 uint32_t _params_shm_id
,
4734 uint32_t _params_shm_offset
) {
4738 params_shm_id
= _params_shm_id
;
4739 params_shm_offset
= _params_shm_offset
;
4742 void* Set(void* cmd
,
4745 uint32_t _params_shm_id
,
4746 uint32_t _params_shm_offset
) {
4747 static_cast<ValueType
*>(cmd
)
4748 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4749 return NextCmdAddress
<ValueType
>(cmd
);
4752 gpu::CommandHeader header
;
4755 uint32_t params_shm_id
;
4756 uint32_t params_shm_offset
;
4759 static_assert(sizeof(GetTexParameterfv
) == 20,
4760 "size of GetTexParameterfv should be 20");
4761 static_assert(offsetof(GetTexParameterfv
, header
) == 0,
4762 "offset of GetTexParameterfv header should be 0");
4763 static_assert(offsetof(GetTexParameterfv
, target
) == 4,
4764 "offset of GetTexParameterfv target should be 4");
4765 static_assert(offsetof(GetTexParameterfv
, pname
) == 8,
4766 "offset of GetTexParameterfv pname should be 8");
4767 static_assert(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
4768 "offset of GetTexParameterfv params_shm_id should be 12");
4769 static_assert(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
4770 "offset of GetTexParameterfv params_shm_offset should be 16");
4772 struct GetTexParameteriv
{
4773 typedef GetTexParameteriv ValueType
;
4774 static const CommandId kCmdId
= kGetTexParameteriv
;
4775 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4776 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4778 typedef SizedResult
<GLint
> Result
;
4780 static uint32_t ComputeSize() {
4781 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4784 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4786 void Init(GLenum _target
,
4788 uint32_t _params_shm_id
,
4789 uint32_t _params_shm_offset
) {
4793 params_shm_id
= _params_shm_id
;
4794 params_shm_offset
= _params_shm_offset
;
4797 void* Set(void* cmd
,
4800 uint32_t _params_shm_id
,
4801 uint32_t _params_shm_offset
) {
4802 static_cast<ValueType
*>(cmd
)
4803 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4804 return NextCmdAddress
<ValueType
>(cmd
);
4807 gpu::CommandHeader header
;
4810 uint32_t params_shm_id
;
4811 uint32_t params_shm_offset
;
4814 static_assert(sizeof(GetTexParameteriv
) == 20,
4815 "size of GetTexParameteriv should be 20");
4816 static_assert(offsetof(GetTexParameteriv
, header
) == 0,
4817 "offset of GetTexParameteriv header should be 0");
4818 static_assert(offsetof(GetTexParameteriv
, target
) == 4,
4819 "offset of GetTexParameteriv target should be 4");
4820 static_assert(offsetof(GetTexParameteriv
, pname
) == 8,
4821 "offset of GetTexParameteriv pname should be 8");
4822 static_assert(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
4823 "offset of GetTexParameteriv params_shm_id should be 12");
4824 static_assert(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
4825 "offset of GetTexParameteriv params_shm_offset should be 16");
4827 struct GetTransformFeedbackVarying
{
4828 typedef GetTransformFeedbackVarying ValueType
;
4829 static const CommandId kCmdId
= kGetTransformFeedbackVarying
;
4830 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4831 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4839 static uint32_t ComputeSize() {
4840 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4843 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4845 void Init(GLuint _program
,
4847 uint32_t _name_bucket_id
,
4848 uint32_t _result_shm_id
,
4849 uint32_t _result_shm_offset
) {
4853 name_bucket_id
= _name_bucket_id
;
4854 result_shm_id
= _result_shm_id
;
4855 result_shm_offset
= _result_shm_offset
;
4858 void* Set(void* cmd
,
4861 uint32_t _name_bucket_id
,
4862 uint32_t _result_shm_id
,
4863 uint32_t _result_shm_offset
) {
4864 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
4865 _result_shm_id
, _result_shm_offset
);
4866 return NextCmdAddress
<ValueType
>(cmd
);
4869 gpu::CommandHeader header
;
4872 uint32_t name_bucket_id
;
4873 uint32_t result_shm_id
;
4874 uint32_t result_shm_offset
;
4877 static_assert(sizeof(GetTransformFeedbackVarying
) == 24,
4878 "size of GetTransformFeedbackVarying should be 24");
4879 static_assert(offsetof(GetTransformFeedbackVarying
, header
) == 0,
4880 "offset of GetTransformFeedbackVarying header should be 0");
4881 static_assert(offsetof(GetTransformFeedbackVarying
, program
) == 4,
4882 "offset of GetTransformFeedbackVarying program should be 4");
4883 static_assert(offsetof(GetTransformFeedbackVarying
, index
) == 8,
4884 "offset of GetTransformFeedbackVarying index should be 8");
4886 offsetof(GetTransformFeedbackVarying
, name_bucket_id
) == 12,
4887 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
4889 offsetof(GetTransformFeedbackVarying
, result_shm_id
) == 16,
4890 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
4892 offsetof(GetTransformFeedbackVarying
, result_shm_offset
) == 20,
4893 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
4894 static_assert(offsetof(GetTransformFeedbackVarying::Result
, success
) == 0,
4895 "offset of GetTransformFeedbackVarying Result success should be "
4897 static_assert(offsetof(GetTransformFeedbackVarying::Result
, size
) == 4,
4898 "offset of GetTransformFeedbackVarying Result size should be "
4900 static_assert(offsetof(GetTransformFeedbackVarying::Result
, type
) == 8,
4901 "offset of GetTransformFeedbackVarying Result type should be "
4904 struct GetUniformBlockIndex
{
4905 typedef GetUniformBlockIndex ValueType
;
4906 static const CommandId kCmdId
= kGetUniformBlockIndex
;
4907 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4908 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4910 typedef GLuint Result
;
4912 static uint32_t ComputeSize() {
4913 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4916 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4918 void Init(GLuint _program
,
4919 uint32_t _name_bucket_id
,
4920 uint32_t _index_shm_id
,
4921 uint32_t _index_shm_offset
) {
4924 name_bucket_id
= _name_bucket_id
;
4925 index_shm_id
= _index_shm_id
;
4926 index_shm_offset
= _index_shm_offset
;
4929 void* Set(void* cmd
,
4931 uint32_t _name_bucket_id
,
4932 uint32_t _index_shm_id
,
4933 uint32_t _index_shm_offset
) {
4934 static_cast<ValueType
*>(cmd
)
4935 ->Init(_program
, _name_bucket_id
, _index_shm_id
, _index_shm_offset
);
4936 return NextCmdAddress
<ValueType
>(cmd
);
4939 gpu::CommandHeader header
;
4941 uint32_t name_bucket_id
;
4942 uint32_t index_shm_id
;
4943 uint32_t index_shm_offset
;
4946 static_assert(sizeof(GetUniformBlockIndex
) == 20,
4947 "size of GetUniformBlockIndex should be 20");
4948 static_assert(offsetof(GetUniformBlockIndex
, header
) == 0,
4949 "offset of GetUniformBlockIndex header should be 0");
4950 static_assert(offsetof(GetUniformBlockIndex
, program
) == 4,
4951 "offset of GetUniformBlockIndex program should be 4");
4952 static_assert(offsetof(GetUniformBlockIndex
, name_bucket_id
) == 8,
4953 "offset of GetUniformBlockIndex name_bucket_id should be 8");
4954 static_assert(offsetof(GetUniformBlockIndex
, index_shm_id
) == 12,
4955 "offset of GetUniformBlockIndex index_shm_id should be 12");
4956 static_assert(offsetof(GetUniformBlockIndex
, index_shm_offset
) == 16,
4957 "offset of GetUniformBlockIndex index_shm_offset should be 16");
4959 struct GetUniformfv
{
4960 typedef GetUniformfv ValueType
;
4961 static const CommandId kCmdId
= kGetUniformfv
;
4962 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4963 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4965 typedef SizedResult
<GLfloat
> Result
;
4967 static uint32_t ComputeSize() {
4968 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4971 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4973 void Init(GLuint _program
,
4975 uint32_t _params_shm_id
,
4976 uint32_t _params_shm_offset
) {
4979 location
= _location
;
4980 params_shm_id
= _params_shm_id
;
4981 params_shm_offset
= _params_shm_offset
;
4984 void* Set(void* cmd
,
4987 uint32_t _params_shm_id
,
4988 uint32_t _params_shm_offset
) {
4989 static_cast<ValueType
*>(cmd
)
4990 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
4991 return NextCmdAddress
<ValueType
>(cmd
);
4994 gpu::CommandHeader header
;
4997 uint32_t params_shm_id
;
4998 uint32_t params_shm_offset
;
5001 static_assert(sizeof(GetUniformfv
) == 20, "size of GetUniformfv should be 20");
5002 static_assert(offsetof(GetUniformfv
, header
) == 0,
5003 "offset of GetUniformfv header should be 0");
5004 static_assert(offsetof(GetUniformfv
, program
) == 4,
5005 "offset of GetUniformfv program should be 4");
5006 static_assert(offsetof(GetUniformfv
, location
) == 8,
5007 "offset of GetUniformfv location should be 8");
5008 static_assert(offsetof(GetUniformfv
, params_shm_id
) == 12,
5009 "offset of GetUniformfv params_shm_id should be 12");
5010 static_assert(offsetof(GetUniformfv
, params_shm_offset
) == 16,
5011 "offset of GetUniformfv params_shm_offset should be 16");
5013 struct GetUniformiv
{
5014 typedef GetUniformiv ValueType
;
5015 static const CommandId kCmdId
= kGetUniformiv
;
5016 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5017 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5019 typedef SizedResult
<GLint
> Result
;
5021 static uint32_t ComputeSize() {
5022 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5025 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5027 void Init(GLuint _program
,
5029 uint32_t _params_shm_id
,
5030 uint32_t _params_shm_offset
) {
5033 location
= _location
;
5034 params_shm_id
= _params_shm_id
;
5035 params_shm_offset
= _params_shm_offset
;
5038 void* Set(void* cmd
,
5041 uint32_t _params_shm_id
,
5042 uint32_t _params_shm_offset
) {
5043 static_cast<ValueType
*>(cmd
)
5044 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5045 return NextCmdAddress
<ValueType
>(cmd
);
5048 gpu::CommandHeader header
;
5051 uint32_t params_shm_id
;
5052 uint32_t params_shm_offset
;
5055 static_assert(sizeof(GetUniformiv
) == 20, "size of GetUniformiv should be 20");
5056 static_assert(offsetof(GetUniformiv
, header
) == 0,
5057 "offset of GetUniformiv header should be 0");
5058 static_assert(offsetof(GetUniformiv
, program
) == 4,
5059 "offset of GetUniformiv program should be 4");
5060 static_assert(offsetof(GetUniformiv
, location
) == 8,
5061 "offset of GetUniformiv location should be 8");
5062 static_assert(offsetof(GetUniformiv
, params_shm_id
) == 12,
5063 "offset of GetUniformiv params_shm_id should be 12");
5064 static_assert(offsetof(GetUniformiv
, params_shm_offset
) == 16,
5065 "offset of GetUniformiv params_shm_offset should be 16");
5067 struct GetUniformIndices
{
5068 typedef GetUniformIndices ValueType
;
5069 static const CommandId kCmdId
= kGetUniformIndices
;
5070 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5071 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5073 typedef SizedResult
<GLuint
> Result
;
5075 static uint32_t ComputeSize() {
5076 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5079 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5081 void Init(GLuint _program
,
5082 uint32_t _names_bucket_id
,
5083 uint32_t _indices_shm_id
,
5084 uint32_t _indices_shm_offset
) {
5087 names_bucket_id
= _names_bucket_id
;
5088 indices_shm_id
= _indices_shm_id
;
5089 indices_shm_offset
= _indices_shm_offset
;
5092 void* Set(void* cmd
,
5094 uint32_t _names_bucket_id
,
5095 uint32_t _indices_shm_id
,
5096 uint32_t _indices_shm_offset
) {
5097 static_cast<ValueType
*>(cmd
)->Init(_program
, _names_bucket_id
,
5098 _indices_shm_id
, _indices_shm_offset
);
5099 return NextCmdAddress
<ValueType
>(cmd
);
5102 gpu::CommandHeader header
;
5104 uint32_t names_bucket_id
;
5105 uint32_t indices_shm_id
;
5106 uint32_t indices_shm_offset
;
5109 static_assert(sizeof(GetUniformIndices
) == 20,
5110 "size of GetUniformIndices should be 20");
5111 static_assert(offsetof(GetUniformIndices
, header
) == 0,
5112 "offset of GetUniformIndices header should be 0");
5113 static_assert(offsetof(GetUniformIndices
, program
) == 4,
5114 "offset of GetUniformIndices program should be 4");
5115 static_assert(offsetof(GetUniformIndices
, names_bucket_id
) == 8,
5116 "offset of GetUniformIndices names_bucket_id should be 8");
5117 static_assert(offsetof(GetUniformIndices
, indices_shm_id
) == 12,
5118 "offset of GetUniformIndices indices_shm_id should be 12");
5119 static_assert(offsetof(GetUniformIndices
, indices_shm_offset
) == 16,
5120 "offset of GetUniformIndices indices_shm_offset should be 16");
5122 struct GetUniformLocation
{
5123 typedef GetUniformLocation ValueType
;
5124 static const CommandId kCmdId
= kGetUniformLocation
;
5125 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5126 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5128 typedef GLint Result
;
5130 static uint32_t ComputeSize() {
5131 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5134 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5136 void Init(GLuint _program
,
5137 uint32_t _name_bucket_id
,
5138 uint32_t _location_shm_id
,
5139 uint32_t _location_shm_offset
) {
5142 name_bucket_id
= _name_bucket_id
;
5143 location_shm_id
= _location_shm_id
;
5144 location_shm_offset
= _location_shm_offset
;
5147 void* Set(void* cmd
,
5149 uint32_t _name_bucket_id
,
5150 uint32_t _location_shm_id
,
5151 uint32_t _location_shm_offset
) {
5152 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
5153 _location_shm_id
, _location_shm_offset
);
5154 return NextCmdAddress
<ValueType
>(cmd
);
5157 gpu::CommandHeader header
;
5159 uint32_t name_bucket_id
;
5160 uint32_t location_shm_id
;
5161 uint32_t location_shm_offset
;
5164 static_assert(sizeof(GetUniformLocation
) == 20,
5165 "size of GetUniformLocation should be 20");
5166 static_assert(offsetof(GetUniformLocation
, header
) == 0,
5167 "offset of GetUniformLocation header should be 0");
5168 static_assert(offsetof(GetUniformLocation
, program
) == 4,
5169 "offset of GetUniformLocation program should be 4");
5170 static_assert(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
5171 "offset of GetUniformLocation name_bucket_id should be 8");
5172 static_assert(offsetof(GetUniformLocation
, location_shm_id
) == 12,
5173 "offset of GetUniformLocation location_shm_id should be 12");
5174 static_assert(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
5175 "offset of GetUniformLocation location_shm_offset should be 16");
5177 struct GetVertexAttribfv
{
5178 typedef GetVertexAttribfv ValueType
;
5179 static const CommandId kCmdId
= kGetVertexAttribfv
;
5180 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5181 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5183 typedef SizedResult
<GLfloat
> Result
;
5185 static uint32_t ComputeSize() {
5186 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5189 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5191 void Init(GLuint _index
,
5193 uint32_t _params_shm_id
,
5194 uint32_t _params_shm_offset
) {
5198 params_shm_id
= _params_shm_id
;
5199 params_shm_offset
= _params_shm_offset
;
5202 void* Set(void* cmd
,
5205 uint32_t _params_shm_id
,
5206 uint32_t _params_shm_offset
) {
5207 static_cast<ValueType
*>(cmd
)
5208 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5209 return NextCmdAddress
<ValueType
>(cmd
);
5212 gpu::CommandHeader header
;
5215 uint32_t params_shm_id
;
5216 uint32_t params_shm_offset
;
5219 static_assert(sizeof(GetVertexAttribfv
) == 20,
5220 "size of GetVertexAttribfv should be 20");
5221 static_assert(offsetof(GetVertexAttribfv
, header
) == 0,
5222 "offset of GetVertexAttribfv header should be 0");
5223 static_assert(offsetof(GetVertexAttribfv
, index
) == 4,
5224 "offset of GetVertexAttribfv index should be 4");
5225 static_assert(offsetof(GetVertexAttribfv
, pname
) == 8,
5226 "offset of GetVertexAttribfv pname should be 8");
5227 static_assert(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
5228 "offset of GetVertexAttribfv params_shm_id should be 12");
5229 static_assert(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
5230 "offset of GetVertexAttribfv params_shm_offset should be 16");
5232 struct GetVertexAttribiv
{
5233 typedef GetVertexAttribiv ValueType
;
5234 static const CommandId kCmdId
= kGetVertexAttribiv
;
5235 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5236 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5238 typedef SizedResult
<GLint
> Result
;
5240 static uint32_t ComputeSize() {
5241 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5244 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5246 void Init(GLuint _index
,
5248 uint32_t _params_shm_id
,
5249 uint32_t _params_shm_offset
) {
5253 params_shm_id
= _params_shm_id
;
5254 params_shm_offset
= _params_shm_offset
;
5257 void* Set(void* cmd
,
5260 uint32_t _params_shm_id
,
5261 uint32_t _params_shm_offset
) {
5262 static_cast<ValueType
*>(cmd
)
5263 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5264 return NextCmdAddress
<ValueType
>(cmd
);
5267 gpu::CommandHeader header
;
5270 uint32_t params_shm_id
;
5271 uint32_t params_shm_offset
;
5274 static_assert(sizeof(GetVertexAttribiv
) == 20,
5275 "size of GetVertexAttribiv should be 20");
5276 static_assert(offsetof(GetVertexAttribiv
, header
) == 0,
5277 "offset of GetVertexAttribiv header should be 0");
5278 static_assert(offsetof(GetVertexAttribiv
, index
) == 4,
5279 "offset of GetVertexAttribiv index should be 4");
5280 static_assert(offsetof(GetVertexAttribiv
, pname
) == 8,
5281 "offset of GetVertexAttribiv pname should be 8");
5282 static_assert(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
5283 "offset of GetVertexAttribiv params_shm_id should be 12");
5284 static_assert(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
5285 "offset of GetVertexAttribiv params_shm_offset should be 16");
5287 struct GetVertexAttribPointerv
{
5288 typedef GetVertexAttribPointerv ValueType
;
5289 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
5290 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5291 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5293 typedef SizedResult
<GLuint
> Result
;
5295 static uint32_t ComputeSize() {
5296 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5299 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5301 void Init(GLuint _index
,
5303 uint32_t _pointer_shm_id
,
5304 uint32_t _pointer_shm_offset
) {
5308 pointer_shm_id
= _pointer_shm_id
;
5309 pointer_shm_offset
= _pointer_shm_offset
;
5312 void* Set(void* cmd
,
5315 uint32_t _pointer_shm_id
,
5316 uint32_t _pointer_shm_offset
) {
5317 static_cast<ValueType
*>(cmd
)
5318 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
5319 return NextCmdAddress
<ValueType
>(cmd
);
5322 gpu::CommandHeader header
;
5325 uint32_t pointer_shm_id
;
5326 uint32_t pointer_shm_offset
;
5329 static_assert(sizeof(GetVertexAttribPointerv
) == 20,
5330 "size of GetVertexAttribPointerv should be 20");
5331 static_assert(offsetof(GetVertexAttribPointerv
, header
) == 0,
5332 "offset of GetVertexAttribPointerv header should be 0");
5333 static_assert(offsetof(GetVertexAttribPointerv
, index
) == 4,
5334 "offset of GetVertexAttribPointerv index should be 4");
5335 static_assert(offsetof(GetVertexAttribPointerv
, pname
) == 8,
5336 "offset of GetVertexAttribPointerv pname should be 8");
5337 static_assert(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
5338 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
5340 offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
5341 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
5344 typedef Hint ValueType
;
5345 static const CommandId kCmdId
= kHint
;
5346 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5347 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5349 static uint32_t ComputeSize() {
5350 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5353 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5355 void Init(GLenum _target
, GLenum _mode
) {
5361 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
5362 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
5363 return NextCmdAddress
<ValueType
>(cmd
);
5366 gpu::CommandHeader header
;
5371 static_assert(sizeof(Hint
) == 12, "size of Hint should be 12");
5372 static_assert(offsetof(Hint
, header
) == 0, "offset of Hint header should be 0");
5373 static_assert(offsetof(Hint
, target
) == 4, "offset of Hint target should be 4");
5374 static_assert(offsetof(Hint
, mode
) == 8, "offset of Hint mode should be 8");
5376 struct InvalidateFramebufferImmediate
{
5377 typedef InvalidateFramebufferImmediate ValueType
;
5378 static const CommandId kCmdId
= kInvalidateFramebufferImmediate
;
5379 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5380 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5382 static uint32_t ComputeDataSize(GLsizei count
) {
5383 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5386 static uint32_t ComputeSize(GLsizei count
) {
5387 return static_cast<uint32_t>(sizeof(ValueType
) +
5388 ComputeDataSize(count
)); // NOLINT
5391 void SetHeader(GLsizei count
) {
5392 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5395 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
5399 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5402 void* Set(void* cmd
,
5405 const GLenum
* _attachments
) {
5406 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
5407 const uint32_t size
= ComputeSize(_count
);
5408 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5411 gpu::CommandHeader header
;
5416 static_assert(sizeof(InvalidateFramebufferImmediate
) == 12,
5417 "size of InvalidateFramebufferImmediate should be 12");
5418 static_assert(offsetof(InvalidateFramebufferImmediate
, header
) == 0,
5419 "offset of InvalidateFramebufferImmediate header should be 0");
5420 static_assert(offsetof(InvalidateFramebufferImmediate
, target
) == 4,
5421 "offset of InvalidateFramebufferImmediate target should be 4");
5422 static_assert(offsetof(InvalidateFramebufferImmediate
, count
) == 8,
5423 "offset of InvalidateFramebufferImmediate count should be 8");
5425 struct InvalidateSubFramebufferImmediate
{
5426 typedef InvalidateSubFramebufferImmediate ValueType
;
5427 static const CommandId kCmdId
= kInvalidateSubFramebufferImmediate
;
5428 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5429 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5431 static uint32_t ComputeDataSize(GLsizei count
) {
5432 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5435 static uint32_t ComputeSize(GLsizei count
) {
5436 return static_cast<uint32_t>(sizeof(ValueType
) +
5437 ComputeDataSize(count
)); // NOLINT
5440 void SetHeader(GLsizei count
) {
5441 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5444 void Init(GLenum _target
,
5446 const GLenum
* _attachments
,
5458 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5461 void* Set(void* cmd
,
5464 const GLenum
* _attachments
,
5469 static_cast<ValueType
*>(cmd
)
5470 ->Init(_target
, _count
, _attachments
, _x
, _y
, _width
, _height
);
5471 const uint32_t size
= ComputeSize(_count
);
5472 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5475 gpu::CommandHeader header
;
5484 static_assert(sizeof(InvalidateSubFramebufferImmediate
) == 28,
5485 "size of InvalidateSubFramebufferImmediate should be 28");
5486 static_assert(offsetof(InvalidateSubFramebufferImmediate
, header
) == 0,
5487 "offset of InvalidateSubFramebufferImmediate header should be 0");
5488 static_assert(offsetof(InvalidateSubFramebufferImmediate
, target
) == 4,
5489 "offset of InvalidateSubFramebufferImmediate target should be 4");
5490 static_assert(offsetof(InvalidateSubFramebufferImmediate
, count
) == 8,
5491 "offset of InvalidateSubFramebufferImmediate count should be 8");
5492 static_assert(offsetof(InvalidateSubFramebufferImmediate
, x
) == 12,
5493 "offset of InvalidateSubFramebufferImmediate x should be 12");
5494 static_assert(offsetof(InvalidateSubFramebufferImmediate
, y
) == 16,
5495 "offset of InvalidateSubFramebufferImmediate y should be 16");
5496 static_assert(offsetof(InvalidateSubFramebufferImmediate
, width
) == 20,
5497 "offset of InvalidateSubFramebufferImmediate width should be 20");
5499 offsetof(InvalidateSubFramebufferImmediate
, height
) == 24,
5500 "offset of InvalidateSubFramebufferImmediate height should be 24");
5503 typedef IsBuffer ValueType
;
5504 static const CommandId kCmdId
= kIsBuffer
;
5505 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5506 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5508 typedef uint32_t Result
;
5510 static uint32_t ComputeSize() {
5511 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5514 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5516 void Init(GLuint _buffer
,
5517 uint32_t _result_shm_id
,
5518 uint32_t _result_shm_offset
) {
5521 result_shm_id
= _result_shm_id
;
5522 result_shm_offset
= _result_shm_offset
;
5525 void* Set(void* cmd
,
5527 uint32_t _result_shm_id
,
5528 uint32_t _result_shm_offset
) {
5529 static_cast<ValueType
*>(cmd
)
5530 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
5531 return NextCmdAddress
<ValueType
>(cmd
);
5534 gpu::CommandHeader header
;
5536 uint32_t result_shm_id
;
5537 uint32_t result_shm_offset
;
5540 static_assert(sizeof(IsBuffer
) == 16, "size of IsBuffer should be 16");
5541 static_assert(offsetof(IsBuffer
, header
) == 0,
5542 "offset of IsBuffer header should be 0");
5543 static_assert(offsetof(IsBuffer
, buffer
) == 4,
5544 "offset of IsBuffer buffer should be 4");
5545 static_assert(offsetof(IsBuffer
, result_shm_id
) == 8,
5546 "offset of IsBuffer result_shm_id should be 8");
5547 static_assert(offsetof(IsBuffer
, result_shm_offset
) == 12,
5548 "offset of IsBuffer result_shm_offset should be 12");
5551 typedef IsEnabled ValueType
;
5552 static const CommandId kCmdId
= kIsEnabled
;
5553 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5554 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5556 typedef uint32_t Result
;
5558 static uint32_t ComputeSize() {
5559 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5562 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5564 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
5567 result_shm_id
= _result_shm_id
;
5568 result_shm_offset
= _result_shm_offset
;
5571 void* Set(void* cmd
,
5573 uint32_t _result_shm_id
,
5574 uint32_t _result_shm_offset
) {
5575 static_cast<ValueType
*>(cmd
)
5576 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
5577 return NextCmdAddress
<ValueType
>(cmd
);
5580 gpu::CommandHeader header
;
5582 uint32_t result_shm_id
;
5583 uint32_t result_shm_offset
;
5586 static_assert(sizeof(IsEnabled
) == 16, "size of IsEnabled should be 16");
5587 static_assert(offsetof(IsEnabled
, header
) == 0,
5588 "offset of IsEnabled header should be 0");
5589 static_assert(offsetof(IsEnabled
, cap
) == 4,
5590 "offset of IsEnabled cap should be 4");
5591 static_assert(offsetof(IsEnabled
, result_shm_id
) == 8,
5592 "offset of IsEnabled result_shm_id should be 8");
5593 static_assert(offsetof(IsEnabled
, result_shm_offset
) == 12,
5594 "offset of IsEnabled result_shm_offset should be 12");
5596 struct IsFramebuffer
{
5597 typedef IsFramebuffer ValueType
;
5598 static const CommandId kCmdId
= kIsFramebuffer
;
5599 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5600 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5602 typedef uint32_t Result
;
5604 static uint32_t ComputeSize() {
5605 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5608 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5610 void Init(GLuint _framebuffer
,
5611 uint32_t _result_shm_id
,
5612 uint32_t _result_shm_offset
) {
5614 framebuffer
= _framebuffer
;
5615 result_shm_id
= _result_shm_id
;
5616 result_shm_offset
= _result_shm_offset
;
5619 void* Set(void* cmd
,
5620 GLuint _framebuffer
,
5621 uint32_t _result_shm_id
,
5622 uint32_t _result_shm_offset
) {
5623 static_cast<ValueType
*>(cmd
)
5624 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
5625 return NextCmdAddress
<ValueType
>(cmd
);
5628 gpu::CommandHeader header
;
5629 uint32_t framebuffer
;
5630 uint32_t result_shm_id
;
5631 uint32_t result_shm_offset
;
5634 static_assert(sizeof(IsFramebuffer
) == 16,
5635 "size of IsFramebuffer should be 16");
5636 static_assert(offsetof(IsFramebuffer
, header
) == 0,
5637 "offset of IsFramebuffer header should be 0");
5638 static_assert(offsetof(IsFramebuffer
, framebuffer
) == 4,
5639 "offset of IsFramebuffer framebuffer should be 4");
5640 static_assert(offsetof(IsFramebuffer
, result_shm_id
) == 8,
5641 "offset of IsFramebuffer result_shm_id should be 8");
5642 static_assert(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
5643 "offset of IsFramebuffer result_shm_offset should be 12");
5646 typedef IsProgram ValueType
;
5647 static const CommandId kCmdId
= kIsProgram
;
5648 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5649 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5651 typedef uint32_t Result
;
5653 static uint32_t ComputeSize() {
5654 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5657 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5659 void Init(GLuint _program
,
5660 uint32_t _result_shm_id
,
5661 uint32_t _result_shm_offset
) {
5664 result_shm_id
= _result_shm_id
;
5665 result_shm_offset
= _result_shm_offset
;
5668 void* Set(void* cmd
,
5670 uint32_t _result_shm_id
,
5671 uint32_t _result_shm_offset
) {
5672 static_cast<ValueType
*>(cmd
)
5673 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
5674 return NextCmdAddress
<ValueType
>(cmd
);
5677 gpu::CommandHeader header
;
5679 uint32_t result_shm_id
;
5680 uint32_t result_shm_offset
;
5683 static_assert(sizeof(IsProgram
) == 16, "size of IsProgram should be 16");
5684 static_assert(offsetof(IsProgram
, header
) == 0,
5685 "offset of IsProgram header should be 0");
5686 static_assert(offsetof(IsProgram
, program
) == 4,
5687 "offset of IsProgram program should be 4");
5688 static_assert(offsetof(IsProgram
, result_shm_id
) == 8,
5689 "offset of IsProgram result_shm_id should be 8");
5690 static_assert(offsetof(IsProgram
, result_shm_offset
) == 12,
5691 "offset of IsProgram result_shm_offset should be 12");
5693 struct IsRenderbuffer
{
5694 typedef IsRenderbuffer ValueType
;
5695 static const CommandId kCmdId
= kIsRenderbuffer
;
5696 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5697 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5699 typedef uint32_t Result
;
5701 static uint32_t ComputeSize() {
5702 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5705 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5707 void Init(GLuint _renderbuffer
,
5708 uint32_t _result_shm_id
,
5709 uint32_t _result_shm_offset
) {
5711 renderbuffer
= _renderbuffer
;
5712 result_shm_id
= _result_shm_id
;
5713 result_shm_offset
= _result_shm_offset
;
5716 void* Set(void* cmd
,
5717 GLuint _renderbuffer
,
5718 uint32_t _result_shm_id
,
5719 uint32_t _result_shm_offset
) {
5720 static_cast<ValueType
*>(cmd
)
5721 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
5722 return NextCmdAddress
<ValueType
>(cmd
);
5725 gpu::CommandHeader header
;
5726 uint32_t renderbuffer
;
5727 uint32_t result_shm_id
;
5728 uint32_t result_shm_offset
;
5731 static_assert(sizeof(IsRenderbuffer
) == 16,
5732 "size of IsRenderbuffer should be 16");
5733 static_assert(offsetof(IsRenderbuffer
, header
) == 0,
5734 "offset of IsRenderbuffer header should be 0");
5735 static_assert(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
5736 "offset of IsRenderbuffer renderbuffer should be 4");
5737 static_assert(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
5738 "offset of IsRenderbuffer result_shm_id should be 8");
5739 static_assert(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
5740 "offset of IsRenderbuffer result_shm_offset should be 12");
5743 typedef IsSampler ValueType
;
5744 static const CommandId kCmdId
= kIsSampler
;
5745 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5746 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5748 typedef uint32_t Result
;
5750 static uint32_t ComputeSize() {
5751 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5754 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5756 void Init(GLuint _sampler
,
5757 uint32_t _result_shm_id
,
5758 uint32_t _result_shm_offset
) {
5761 result_shm_id
= _result_shm_id
;
5762 result_shm_offset
= _result_shm_offset
;
5765 void* Set(void* cmd
,
5767 uint32_t _result_shm_id
,
5768 uint32_t _result_shm_offset
) {
5769 static_cast<ValueType
*>(cmd
)
5770 ->Init(_sampler
, _result_shm_id
, _result_shm_offset
);
5771 return NextCmdAddress
<ValueType
>(cmd
);
5774 gpu::CommandHeader header
;
5776 uint32_t result_shm_id
;
5777 uint32_t result_shm_offset
;
5780 static_assert(sizeof(IsSampler
) == 16, "size of IsSampler should be 16");
5781 static_assert(offsetof(IsSampler
, header
) == 0,
5782 "offset of IsSampler header should be 0");
5783 static_assert(offsetof(IsSampler
, sampler
) == 4,
5784 "offset of IsSampler sampler should be 4");
5785 static_assert(offsetof(IsSampler
, result_shm_id
) == 8,
5786 "offset of IsSampler result_shm_id should be 8");
5787 static_assert(offsetof(IsSampler
, result_shm_offset
) == 12,
5788 "offset of IsSampler result_shm_offset should be 12");
5791 typedef IsShader ValueType
;
5792 static const CommandId kCmdId
= kIsShader
;
5793 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5794 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5796 typedef uint32_t Result
;
5798 static uint32_t ComputeSize() {
5799 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5802 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5804 void Init(GLuint _shader
,
5805 uint32_t _result_shm_id
,
5806 uint32_t _result_shm_offset
) {
5809 result_shm_id
= _result_shm_id
;
5810 result_shm_offset
= _result_shm_offset
;
5813 void* Set(void* cmd
,
5815 uint32_t _result_shm_id
,
5816 uint32_t _result_shm_offset
) {
5817 static_cast<ValueType
*>(cmd
)
5818 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
5819 return NextCmdAddress
<ValueType
>(cmd
);
5822 gpu::CommandHeader header
;
5824 uint32_t result_shm_id
;
5825 uint32_t result_shm_offset
;
5828 static_assert(sizeof(IsShader
) == 16, "size of IsShader should be 16");
5829 static_assert(offsetof(IsShader
, header
) == 0,
5830 "offset of IsShader header should be 0");
5831 static_assert(offsetof(IsShader
, shader
) == 4,
5832 "offset of IsShader shader should be 4");
5833 static_assert(offsetof(IsShader
, result_shm_id
) == 8,
5834 "offset of IsShader result_shm_id should be 8");
5835 static_assert(offsetof(IsShader
, result_shm_offset
) == 12,
5836 "offset of IsShader result_shm_offset should be 12");
5839 typedef IsSync ValueType
;
5840 static const CommandId kCmdId
= kIsSync
;
5841 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5842 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5844 typedef uint32_t Result
;
5846 static uint32_t ComputeSize() {
5847 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5850 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5852 void Init(GLuint _sync
,
5853 uint32_t _result_shm_id
,
5854 uint32_t _result_shm_offset
) {
5857 result_shm_id
= _result_shm_id
;
5858 result_shm_offset
= _result_shm_offset
;
5861 void* Set(void* cmd
,
5863 uint32_t _result_shm_id
,
5864 uint32_t _result_shm_offset
) {
5865 static_cast<ValueType
*>(cmd
)
5866 ->Init(_sync
, _result_shm_id
, _result_shm_offset
);
5867 return NextCmdAddress
<ValueType
>(cmd
);
5870 gpu::CommandHeader header
;
5872 uint32_t result_shm_id
;
5873 uint32_t result_shm_offset
;
5876 static_assert(sizeof(IsSync
) == 16, "size of IsSync should be 16");
5877 static_assert(offsetof(IsSync
, header
) == 0,
5878 "offset of IsSync header should be 0");
5879 static_assert(offsetof(IsSync
, sync
) == 4, "offset of IsSync sync should be 4");
5880 static_assert(offsetof(IsSync
, result_shm_id
) == 8,
5881 "offset of IsSync result_shm_id should be 8");
5882 static_assert(offsetof(IsSync
, result_shm_offset
) == 12,
5883 "offset of IsSync result_shm_offset should be 12");
5886 typedef IsTexture ValueType
;
5887 static const CommandId kCmdId
= kIsTexture
;
5888 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5891 typedef uint32_t Result
;
5893 static uint32_t ComputeSize() {
5894 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5897 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5899 void Init(GLuint _texture
,
5900 uint32_t _result_shm_id
,
5901 uint32_t _result_shm_offset
) {
5904 result_shm_id
= _result_shm_id
;
5905 result_shm_offset
= _result_shm_offset
;
5908 void* Set(void* cmd
,
5910 uint32_t _result_shm_id
,
5911 uint32_t _result_shm_offset
) {
5912 static_cast<ValueType
*>(cmd
)
5913 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
5914 return NextCmdAddress
<ValueType
>(cmd
);
5917 gpu::CommandHeader header
;
5919 uint32_t result_shm_id
;
5920 uint32_t result_shm_offset
;
5923 static_assert(sizeof(IsTexture
) == 16, "size of IsTexture should be 16");
5924 static_assert(offsetof(IsTexture
, header
) == 0,
5925 "offset of IsTexture header should be 0");
5926 static_assert(offsetof(IsTexture
, texture
) == 4,
5927 "offset of IsTexture texture should be 4");
5928 static_assert(offsetof(IsTexture
, result_shm_id
) == 8,
5929 "offset of IsTexture result_shm_id should be 8");
5930 static_assert(offsetof(IsTexture
, result_shm_offset
) == 12,
5931 "offset of IsTexture result_shm_offset should be 12");
5933 struct IsTransformFeedback
{
5934 typedef IsTransformFeedback ValueType
;
5935 static const CommandId kCmdId
= kIsTransformFeedback
;
5936 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5937 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5939 typedef uint32_t Result
;
5941 static uint32_t ComputeSize() {
5942 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5945 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5947 void Init(GLuint _transformfeedback
,
5948 uint32_t _result_shm_id
,
5949 uint32_t _result_shm_offset
) {
5951 transformfeedback
= _transformfeedback
;
5952 result_shm_id
= _result_shm_id
;
5953 result_shm_offset
= _result_shm_offset
;
5956 void* Set(void* cmd
,
5957 GLuint _transformfeedback
,
5958 uint32_t _result_shm_id
,
5959 uint32_t _result_shm_offset
) {
5960 static_cast<ValueType
*>(cmd
)
5961 ->Init(_transformfeedback
, _result_shm_id
, _result_shm_offset
);
5962 return NextCmdAddress
<ValueType
>(cmd
);
5965 gpu::CommandHeader header
;
5966 uint32_t transformfeedback
;
5967 uint32_t result_shm_id
;
5968 uint32_t result_shm_offset
;
5971 static_assert(sizeof(IsTransformFeedback
) == 16,
5972 "size of IsTransformFeedback should be 16");
5973 static_assert(offsetof(IsTransformFeedback
, header
) == 0,
5974 "offset of IsTransformFeedback header should be 0");
5975 static_assert(offsetof(IsTransformFeedback
, transformfeedback
) == 4,
5976 "offset of IsTransformFeedback transformfeedback should be 4");
5977 static_assert(offsetof(IsTransformFeedback
, result_shm_id
) == 8,
5978 "offset of IsTransformFeedback result_shm_id should be 8");
5979 static_assert(offsetof(IsTransformFeedback
, result_shm_offset
) == 12,
5980 "offset of IsTransformFeedback result_shm_offset should be 12");
5983 typedef LineWidth ValueType
;
5984 static const CommandId kCmdId
= kLineWidth
;
5985 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5986 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5988 static uint32_t ComputeSize() {
5989 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5992 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5994 void Init(GLfloat _width
) {
5999 void* Set(void* cmd
, GLfloat _width
) {
6000 static_cast<ValueType
*>(cmd
)->Init(_width
);
6001 return NextCmdAddress
<ValueType
>(cmd
);
6004 gpu::CommandHeader header
;
6008 static_assert(sizeof(LineWidth
) == 8, "size of LineWidth should be 8");
6009 static_assert(offsetof(LineWidth
, header
) == 0,
6010 "offset of LineWidth header should be 0");
6011 static_assert(offsetof(LineWidth
, width
) == 4,
6012 "offset of LineWidth width should be 4");
6014 struct LinkProgram
{
6015 typedef LinkProgram ValueType
;
6016 static const CommandId kCmdId
= kLinkProgram
;
6017 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6018 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6020 static uint32_t ComputeSize() {
6021 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6024 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6026 void Init(GLuint _program
) {
6031 void* Set(void* cmd
, GLuint _program
) {
6032 static_cast<ValueType
*>(cmd
)->Init(_program
);
6033 return NextCmdAddress
<ValueType
>(cmd
);
6036 gpu::CommandHeader header
;
6040 static_assert(sizeof(LinkProgram
) == 8, "size of LinkProgram should be 8");
6041 static_assert(offsetof(LinkProgram
, header
) == 0,
6042 "offset of LinkProgram header should be 0");
6043 static_assert(offsetof(LinkProgram
, program
) == 4,
6044 "offset of LinkProgram program should be 4");
6046 struct PauseTransformFeedback
{
6047 typedef PauseTransformFeedback ValueType
;
6048 static const CommandId kCmdId
= kPauseTransformFeedback
;
6049 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6050 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6052 static uint32_t ComputeSize() {
6053 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6056 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6058 void Init() { SetHeader(); }
6060 void* Set(void* cmd
) {
6061 static_cast<ValueType
*>(cmd
)->Init();
6062 return NextCmdAddress
<ValueType
>(cmd
);
6065 gpu::CommandHeader header
;
6068 static_assert(sizeof(PauseTransformFeedback
) == 4,
6069 "size of PauseTransformFeedback should be 4");
6070 static_assert(offsetof(PauseTransformFeedback
, header
) == 0,
6071 "offset of PauseTransformFeedback header should be 0");
6073 struct PixelStorei
{
6074 typedef PixelStorei ValueType
;
6075 static const CommandId kCmdId
= kPixelStorei
;
6076 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6077 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6079 static uint32_t ComputeSize() {
6080 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6083 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6085 void Init(GLenum _pname
, GLint _param
) {
6091 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
6092 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
6093 return NextCmdAddress
<ValueType
>(cmd
);
6096 gpu::CommandHeader header
;
6101 static_assert(sizeof(PixelStorei
) == 12, "size of PixelStorei should be 12");
6102 static_assert(offsetof(PixelStorei
, header
) == 0,
6103 "offset of PixelStorei header should be 0");
6104 static_assert(offsetof(PixelStorei
, pname
) == 4,
6105 "offset of PixelStorei pname should be 4");
6106 static_assert(offsetof(PixelStorei
, param
) == 8,
6107 "offset of PixelStorei param should be 8");
6109 struct PolygonOffset
{
6110 typedef PolygonOffset ValueType
;
6111 static const CommandId kCmdId
= kPolygonOffset
;
6112 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6113 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6115 static uint32_t ComputeSize() {
6116 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6119 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6121 void Init(GLfloat _factor
, GLfloat _units
) {
6127 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
6128 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
6129 return NextCmdAddress
<ValueType
>(cmd
);
6132 gpu::CommandHeader header
;
6137 static_assert(sizeof(PolygonOffset
) == 12,
6138 "size of PolygonOffset should be 12");
6139 static_assert(offsetof(PolygonOffset
, header
) == 0,
6140 "offset of PolygonOffset header should be 0");
6141 static_assert(offsetof(PolygonOffset
, factor
) == 4,
6142 "offset of PolygonOffset factor should be 4");
6143 static_assert(offsetof(PolygonOffset
, units
) == 8,
6144 "offset of PolygonOffset units should be 8");
6147 typedef ReadBuffer ValueType
;
6148 static const CommandId kCmdId
= kReadBuffer
;
6149 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6150 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6152 static uint32_t ComputeSize() {
6153 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6156 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6158 void Init(GLenum _src
) {
6163 void* Set(void* cmd
, GLenum _src
) {
6164 static_cast<ValueType
*>(cmd
)->Init(_src
);
6165 return NextCmdAddress
<ValueType
>(cmd
);
6168 gpu::CommandHeader header
;
6172 static_assert(sizeof(ReadBuffer
) == 8, "size of ReadBuffer should be 8");
6173 static_assert(offsetof(ReadBuffer
, header
) == 0,
6174 "offset of ReadBuffer header should be 0");
6175 static_assert(offsetof(ReadBuffer
, src
) == 4,
6176 "offset of ReadBuffer src should be 4");
6178 // ReadPixels has the result separated from the pixel buffer so that
6179 // it is easier to specify the result going to some specific place
6180 // that exactly fits the rectangle of pixels.
6182 typedef ReadPixels ValueType
;
6183 static const CommandId kCmdId
= kReadPixels
;
6184 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6185 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6187 typedef uint32_t Result
;
6189 static uint32_t ComputeSize() {
6190 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6193 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6201 uint32_t _pixels_shm_id
,
6202 uint32_t _pixels_shm_offset
,
6203 uint32_t _result_shm_id
,
6204 uint32_t _result_shm_offset
,
6213 pixels_shm_id
= _pixels_shm_id
;
6214 pixels_shm_offset
= _pixels_shm_offset
;
6215 result_shm_id
= _result_shm_id
;
6216 result_shm_offset
= _result_shm_offset
;
6220 void* Set(void* cmd
,
6227 uint32_t _pixels_shm_id
,
6228 uint32_t _pixels_shm_offset
,
6229 uint32_t _result_shm_id
,
6230 uint32_t _result_shm_offset
,
6232 static_cast<ValueType
*>(cmd
)
6233 ->Init(_x
, _y
, _width
, _height
, _format
, _type
, _pixels_shm_id
,
6234 _pixels_shm_offset
, _result_shm_id
, _result_shm_offset
, _async
);
6235 return NextCmdAddress
<ValueType
>(cmd
);
6238 gpu::CommandHeader header
;
6245 uint32_t pixels_shm_id
;
6246 uint32_t pixels_shm_offset
;
6247 uint32_t result_shm_id
;
6248 uint32_t result_shm_offset
;
6252 static_assert(sizeof(ReadPixels
) == 48, "size of ReadPixels should be 48");
6253 static_assert(offsetof(ReadPixels
, header
) == 0,
6254 "offset of ReadPixels header should be 0");
6255 static_assert(offsetof(ReadPixels
, x
) == 4,
6256 "offset of ReadPixels x should be 4");
6257 static_assert(offsetof(ReadPixels
, y
) == 8,
6258 "offset of ReadPixels y should be 8");
6259 static_assert(offsetof(ReadPixels
, width
) == 12,
6260 "offset of ReadPixels width should be 12");
6261 static_assert(offsetof(ReadPixels
, height
) == 16,
6262 "offset of ReadPixels height should be 16");
6263 static_assert(offsetof(ReadPixels
, format
) == 20,
6264 "offset of ReadPixels format should be 20");
6265 static_assert(offsetof(ReadPixels
, type
) == 24,
6266 "offset of ReadPixels type should be 24");
6267 static_assert(offsetof(ReadPixels
, pixels_shm_id
) == 28,
6268 "offset of ReadPixels pixels_shm_id should be 28");
6269 static_assert(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
6270 "offset of ReadPixels pixels_shm_offset should be 32");
6271 static_assert(offsetof(ReadPixels
, result_shm_id
) == 36,
6272 "offset of ReadPixels result_shm_id should be 36");
6273 static_assert(offsetof(ReadPixels
, result_shm_offset
) == 40,
6274 "offset of ReadPixels result_shm_offset should be 40");
6275 static_assert(offsetof(ReadPixels
, async
) == 44,
6276 "offset of ReadPixels async should be 44");
6278 struct ReleaseShaderCompiler
{
6279 typedef ReleaseShaderCompiler ValueType
;
6280 static const CommandId kCmdId
= kReleaseShaderCompiler
;
6281 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6282 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6284 static uint32_t ComputeSize() {
6285 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6288 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6290 void Init() { SetHeader(); }
6292 void* Set(void* cmd
) {
6293 static_cast<ValueType
*>(cmd
)->Init();
6294 return NextCmdAddress
<ValueType
>(cmd
);
6297 gpu::CommandHeader header
;
6300 static_assert(sizeof(ReleaseShaderCompiler
) == 4,
6301 "size of ReleaseShaderCompiler should be 4");
6302 static_assert(offsetof(ReleaseShaderCompiler
, header
) == 0,
6303 "offset of ReleaseShaderCompiler header should be 0");
6305 struct RenderbufferStorage
{
6306 typedef RenderbufferStorage ValueType
;
6307 static const CommandId kCmdId
= kRenderbufferStorage
;
6308 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6309 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6311 static uint32_t ComputeSize() {
6312 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6315 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6317 void Init(GLenum _target
,
6318 GLenum _internalformat
,
6323 internalformat
= _internalformat
;
6328 void* Set(void* cmd
,
6330 GLenum _internalformat
,
6333 static_cast<ValueType
*>(cmd
)
6334 ->Init(_target
, _internalformat
, _width
, _height
);
6335 return NextCmdAddress
<ValueType
>(cmd
);
6338 gpu::CommandHeader header
;
6340 uint32_t internalformat
;
6345 static_assert(sizeof(RenderbufferStorage
) == 20,
6346 "size of RenderbufferStorage should be 20");
6347 static_assert(offsetof(RenderbufferStorage
, header
) == 0,
6348 "offset of RenderbufferStorage header should be 0");
6349 static_assert(offsetof(RenderbufferStorage
, target
) == 4,
6350 "offset of RenderbufferStorage target should be 4");
6351 static_assert(offsetof(RenderbufferStorage
, internalformat
) == 8,
6352 "offset of RenderbufferStorage internalformat should be 8");
6353 static_assert(offsetof(RenderbufferStorage
, width
) == 12,
6354 "offset of RenderbufferStorage width should be 12");
6355 static_assert(offsetof(RenderbufferStorage
, height
) == 16,
6356 "offset of RenderbufferStorage height should be 16");
6358 struct ResumeTransformFeedback
{
6359 typedef ResumeTransformFeedback ValueType
;
6360 static const CommandId kCmdId
= kResumeTransformFeedback
;
6361 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6362 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6364 static uint32_t ComputeSize() {
6365 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6368 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6370 void Init() { SetHeader(); }
6372 void* Set(void* cmd
) {
6373 static_cast<ValueType
*>(cmd
)->Init();
6374 return NextCmdAddress
<ValueType
>(cmd
);
6377 gpu::CommandHeader header
;
6380 static_assert(sizeof(ResumeTransformFeedback
) == 4,
6381 "size of ResumeTransformFeedback should be 4");
6382 static_assert(offsetof(ResumeTransformFeedback
, header
) == 0,
6383 "offset of ResumeTransformFeedback header should be 0");
6385 struct SampleCoverage
{
6386 typedef SampleCoverage ValueType
;
6387 static const CommandId kCmdId
= kSampleCoverage
;
6388 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6389 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6391 static uint32_t ComputeSize() {
6392 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6395 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6397 void Init(GLclampf _value
, GLboolean _invert
) {
6403 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
6404 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
6405 return NextCmdAddress
<ValueType
>(cmd
);
6408 gpu::CommandHeader header
;
6413 static_assert(sizeof(SampleCoverage
) == 12,
6414 "size of SampleCoverage should be 12");
6415 static_assert(offsetof(SampleCoverage
, header
) == 0,
6416 "offset of SampleCoverage header should be 0");
6417 static_assert(offsetof(SampleCoverage
, value
) == 4,
6418 "offset of SampleCoverage value should be 4");
6419 static_assert(offsetof(SampleCoverage
, invert
) == 8,
6420 "offset of SampleCoverage invert should be 8");
6422 struct SamplerParameterf
{
6423 typedef SamplerParameterf ValueType
;
6424 static const CommandId kCmdId
= kSamplerParameterf
;
6425 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6426 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6428 static uint32_t ComputeSize() {
6429 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6432 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6434 void Init(GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6441 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6442 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6443 return NextCmdAddress
<ValueType
>(cmd
);
6446 gpu::CommandHeader header
;
6452 static_assert(sizeof(SamplerParameterf
) == 16,
6453 "size of SamplerParameterf should be 16");
6454 static_assert(offsetof(SamplerParameterf
, header
) == 0,
6455 "offset of SamplerParameterf header should be 0");
6456 static_assert(offsetof(SamplerParameterf
, sampler
) == 4,
6457 "offset of SamplerParameterf sampler should be 4");
6458 static_assert(offsetof(SamplerParameterf
, pname
) == 8,
6459 "offset of SamplerParameterf pname should be 8");
6460 static_assert(offsetof(SamplerParameterf
, param
) == 12,
6461 "offset of SamplerParameterf param should be 12");
6463 struct SamplerParameterfvImmediate
{
6464 typedef SamplerParameterfvImmediate ValueType
;
6465 static const CommandId kCmdId
= kSamplerParameterfvImmediate
;
6466 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6467 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6469 static uint32_t ComputeDataSize() {
6470 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
6473 static uint32_t ComputeSize() {
6474 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6477 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6479 void Init(GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6483 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6486 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6487 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6488 const uint32_t size
= ComputeSize();
6489 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6492 gpu::CommandHeader header
;
6497 static_assert(sizeof(SamplerParameterfvImmediate
) == 12,
6498 "size of SamplerParameterfvImmediate should be 12");
6499 static_assert(offsetof(SamplerParameterfvImmediate
, header
) == 0,
6500 "offset of SamplerParameterfvImmediate header should be 0");
6501 static_assert(offsetof(SamplerParameterfvImmediate
, sampler
) == 4,
6502 "offset of SamplerParameterfvImmediate sampler should be 4");
6503 static_assert(offsetof(SamplerParameterfvImmediate
, pname
) == 8,
6504 "offset of SamplerParameterfvImmediate pname should be 8");
6506 struct SamplerParameteri
{
6507 typedef SamplerParameteri ValueType
;
6508 static const CommandId kCmdId
= kSamplerParameteri
;
6509 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6510 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6512 static uint32_t ComputeSize() {
6513 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6516 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6518 void Init(GLuint _sampler
, GLenum _pname
, GLint _param
) {
6525 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLint _param
) {
6526 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6527 return NextCmdAddress
<ValueType
>(cmd
);
6530 gpu::CommandHeader header
;
6536 static_assert(sizeof(SamplerParameteri
) == 16,
6537 "size of SamplerParameteri should be 16");
6538 static_assert(offsetof(SamplerParameteri
, header
) == 0,
6539 "offset of SamplerParameteri header should be 0");
6540 static_assert(offsetof(SamplerParameteri
, sampler
) == 4,
6541 "offset of SamplerParameteri sampler should be 4");
6542 static_assert(offsetof(SamplerParameteri
, pname
) == 8,
6543 "offset of SamplerParameteri pname should be 8");
6544 static_assert(offsetof(SamplerParameteri
, param
) == 12,
6545 "offset of SamplerParameteri param should be 12");
6547 struct SamplerParameterivImmediate
{
6548 typedef SamplerParameterivImmediate ValueType
;
6549 static const CommandId kCmdId
= kSamplerParameterivImmediate
;
6550 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6551 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6553 static uint32_t ComputeDataSize() {
6554 return static_cast<uint32_t>(sizeof(GLint
) * 1);
6557 static uint32_t ComputeSize() {
6558 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6561 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6563 void Init(GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6567 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6570 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6571 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6572 const uint32_t size
= ComputeSize();
6573 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6576 gpu::CommandHeader header
;
6581 static_assert(sizeof(SamplerParameterivImmediate
) == 12,
6582 "size of SamplerParameterivImmediate should be 12");
6583 static_assert(offsetof(SamplerParameterivImmediate
, header
) == 0,
6584 "offset of SamplerParameterivImmediate header should be 0");
6585 static_assert(offsetof(SamplerParameterivImmediate
, sampler
) == 4,
6586 "offset of SamplerParameterivImmediate sampler should be 4");
6587 static_assert(offsetof(SamplerParameterivImmediate
, pname
) == 8,
6588 "offset of SamplerParameterivImmediate pname should be 8");
6591 typedef Scissor ValueType
;
6592 static const CommandId kCmdId
= kScissor
;
6593 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6594 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6596 static uint32_t ComputeSize() {
6597 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6600 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6602 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6610 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6611 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
6612 return NextCmdAddress
<ValueType
>(cmd
);
6615 gpu::CommandHeader header
;
6622 static_assert(sizeof(Scissor
) == 20, "size of Scissor should be 20");
6623 static_assert(offsetof(Scissor
, header
) == 0,
6624 "offset of Scissor header should be 0");
6625 static_assert(offsetof(Scissor
, x
) == 4, "offset of Scissor x should be 4");
6626 static_assert(offsetof(Scissor
, y
) == 8, "offset of Scissor y should be 8");
6627 static_assert(offsetof(Scissor
, width
) == 12,
6628 "offset of Scissor width should be 12");
6629 static_assert(offsetof(Scissor
, height
) == 16,
6630 "offset of Scissor height should be 16");
6632 struct ShaderBinary
{
6633 typedef ShaderBinary ValueType
;
6634 static const CommandId kCmdId
= kShaderBinary
;
6635 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6636 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6638 static uint32_t ComputeSize() {
6639 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6642 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6644 void Init(GLsizei _n
,
6645 uint32_t _shaders_shm_id
,
6646 uint32_t _shaders_shm_offset
,
6647 GLenum _binaryformat
,
6648 uint32_t _binary_shm_id
,
6649 uint32_t _binary_shm_offset
,
6653 shaders_shm_id
= _shaders_shm_id
;
6654 shaders_shm_offset
= _shaders_shm_offset
;
6655 binaryformat
= _binaryformat
;
6656 binary_shm_id
= _binary_shm_id
;
6657 binary_shm_offset
= _binary_shm_offset
;
6661 void* Set(void* cmd
,
6663 uint32_t _shaders_shm_id
,
6664 uint32_t _shaders_shm_offset
,
6665 GLenum _binaryformat
,
6666 uint32_t _binary_shm_id
,
6667 uint32_t _binary_shm_offset
,
6669 static_cast<ValueType
*>(cmd
)->Init(_n
, _shaders_shm_id
, _shaders_shm_offset
,
6670 _binaryformat
, _binary_shm_id
,
6671 _binary_shm_offset
, _length
);
6672 return NextCmdAddress
<ValueType
>(cmd
);
6675 gpu::CommandHeader header
;
6677 uint32_t shaders_shm_id
;
6678 uint32_t shaders_shm_offset
;
6679 uint32_t binaryformat
;
6680 uint32_t binary_shm_id
;
6681 uint32_t binary_shm_offset
;
6685 static_assert(sizeof(ShaderBinary
) == 32, "size of ShaderBinary should be 32");
6686 static_assert(offsetof(ShaderBinary
, header
) == 0,
6687 "offset of ShaderBinary header should be 0");
6688 static_assert(offsetof(ShaderBinary
, n
) == 4,
6689 "offset of ShaderBinary n should be 4");
6690 static_assert(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
6691 "offset of ShaderBinary shaders_shm_id should be 8");
6692 static_assert(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
6693 "offset of ShaderBinary shaders_shm_offset should be 12");
6694 static_assert(offsetof(ShaderBinary
, binaryformat
) == 16,
6695 "offset of ShaderBinary binaryformat should be 16");
6696 static_assert(offsetof(ShaderBinary
, binary_shm_id
) == 20,
6697 "offset of ShaderBinary binary_shm_id should be 20");
6698 static_assert(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
6699 "offset of ShaderBinary binary_shm_offset should be 24");
6700 static_assert(offsetof(ShaderBinary
, length
) == 28,
6701 "offset of ShaderBinary length should be 28");
6703 struct ShaderSourceBucket
{
6704 typedef ShaderSourceBucket ValueType
;
6705 static const CommandId kCmdId
= kShaderSourceBucket
;
6706 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6707 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6709 static uint32_t ComputeSize() {
6710 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6713 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6715 void Init(GLuint _shader
, uint32_t _str_bucket_id
) {
6718 str_bucket_id
= _str_bucket_id
;
6721 void* Set(void* cmd
, GLuint _shader
, uint32_t _str_bucket_id
) {
6722 static_cast<ValueType
*>(cmd
)->Init(_shader
, _str_bucket_id
);
6723 return NextCmdAddress
<ValueType
>(cmd
);
6726 gpu::CommandHeader header
;
6728 uint32_t str_bucket_id
;
6731 static_assert(sizeof(ShaderSourceBucket
) == 12,
6732 "size of ShaderSourceBucket should be 12");
6733 static_assert(offsetof(ShaderSourceBucket
, header
) == 0,
6734 "offset of ShaderSourceBucket header should be 0");
6735 static_assert(offsetof(ShaderSourceBucket
, shader
) == 4,
6736 "offset of ShaderSourceBucket shader should be 4");
6737 static_assert(offsetof(ShaderSourceBucket
, str_bucket_id
) == 8,
6738 "offset of ShaderSourceBucket str_bucket_id should be 8");
6740 struct StencilFunc
{
6741 typedef StencilFunc ValueType
;
6742 static const CommandId kCmdId
= kStencilFunc
;
6743 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6744 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6746 static uint32_t ComputeSize() {
6747 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6750 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6752 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
6759 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6760 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
6761 return NextCmdAddress
<ValueType
>(cmd
);
6764 gpu::CommandHeader header
;
6770 static_assert(sizeof(StencilFunc
) == 16, "size of StencilFunc should be 16");
6771 static_assert(offsetof(StencilFunc
, header
) == 0,
6772 "offset of StencilFunc header should be 0");
6773 static_assert(offsetof(StencilFunc
, func
) == 4,
6774 "offset of StencilFunc func should be 4");
6775 static_assert(offsetof(StencilFunc
, ref
) == 8,
6776 "offset of StencilFunc ref should be 8");
6777 static_assert(offsetof(StencilFunc
, mask
) == 12,
6778 "offset of StencilFunc mask should be 12");
6780 struct StencilFuncSeparate
{
6781 typedef StencilFuncSeparate ValueType
;
6782 static const CommandId kCmdId
= kStencilFuncSeparate
;
6783 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6784 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6786 static uint32_t ComputeSize() {
6787 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6790 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6792 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6800 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6801 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
6802 return NextCmdAddress
<ValueType
>(cmd
);
6805 gpu::CommandHeader header
;
6812 static_assert(sizeof(StencilFuncSeparate
) == 20,
6813 "size of StencilFuncSeparate should be 20");
6814 static_assert(offsetof(StencilFuncSeparate
, header
) == 0,
6815 "offset of StencilFuncSeparate header should be 0");
6816 static_assert(offsetof(StencilFuncSeparate
, face
) == 4,
6817 "offset of StencilFuncSeparate face should be 4");
6818 static_assert(offsetof(StencilFuncSeparate
, func
) == 8,
6819 "offset of StencilFuncSeparate func should be 8");
6820 static_assert(offsetof(StencilFuncSeparate
, ref
) == 12,
6821 "offset of StencilFuncSeparate ref should be 12");
6822 static_assert(offsetof(StencilFuncSeparate
, mask
) == 16,
6823 "offset of StencilFuncSeparate mask should be 16");
6825 struct StencilMask
{
6826 typedef StencilMask ValueType
;
6827 static const CommandId kCmdId
= kStencilMask
;
6828 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6829 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6831 static uint32_t ComputeSize() {
6832 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6835 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6837 void Init(GLuint _mask
) {
6842 void* Set(void* cmd
, GLuint _mask
) {
6843 static_cast<ValueType
*>(cmd
)->Init(_mask
);
6844 return NextCmdAddress
<ValueType
>(cmd
);
6847 gpu::CommandHeader header
;
6851 static_assert(sizeof(StencilMask
) == 8, "size of StencilMask should be 8");
6852 static_assert(offsetof(StencilMask
, header
) == 0,
6853 "offset of StencilMask header should be 0");
6854 static_assert(offsetof(StencilMask
, mask
) == 4,
6855 "offset of StencilMask mask should be 4");
6857 struct StencilMaskSeparate
{
6858 typedef StencilMaskSeparate ValueType
;
6859 static const CommandId kCmdId
= kStencilMaskSeparate
;
6860 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6861 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6863 static uint32_t ComputeSize() {
6864 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6867 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6869 void Init(GLenum _face
, GLuint _mask
) {
6875 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
6876 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
6877 return NextCmdAddress
<ValueType
>(cmd
);
6880 gpu::CommandHeader header
;
6885 static_assert(sizeof(StencilMaskSeparate
) == 12,
6886 "size of StencilMaskSeparate should be 12");
6887 static_assert(offsetof(StencilMaskSeparate
, header
) == 0,
6888 "offset of StencilMaskSeparate header should be 0");
6889 static_assert(offsetof(StencilMaskSeparate
, face
) == 4,
6890 "offset of StencilMaskSeparate face should be 4");
6891 static_assert(offsetof(StencilMaskSeparate
, mask
) == 8,
6892 "offset of StencilMaskSeparate mask should be 8");
6895 typedef StencilOp ValueType
;
6896 static const CommandId kCmdId
= kStencilOp
;
6897 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6898 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6900 static uint32_t ComputeSize() {
6901 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6904 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6906 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6913 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6914 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
6915 return NextCmdAddress
<ValueType
>(cmd
);
6918 gpu::CommandHeader header
;
6924 static_assert(sizeof(StencilOp
) == 16, "size of StencilOp should be 16");
6925 static_assert(offsetof(StencilOp
, header
) == 0,
6926 "offset of StencilOp header should be 0");
6927 static_assert(offsetof(StencilOp
, fail
) == 4,
6928 "offset of StencilOp fail should be 4");
6929 static_assert(offsetof(StencilOp
, zfail
) == 8,
6930 "offset of StencilOp zfail should be 8");
6931 static_assert(offsetof(StencilOp
, zpass
) == 12,
6932 "offset of StencilOp zpass should be 12");
6934 struct StencilOpSeparate
{
6935 typedef StencilOpSeparate ValueType
;
6936 static const CommandId kCmdId
= kStencilOpSeparate
;
6937 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6938 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6940 static uint32_t ComputeSize() {
6941 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6944 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6946 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6954 void* Set(void* cmd
,
6959 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
6960 return NextCmdAddress
<ValueType
>(cmd
);
6963 gpu::CommandHeader header
;
6970 static_assert(sizeof(StencilOpSeparate
) == 20,
6971 "size of StencilOpSeparate should be 20");
6972 static_assert(offsetof(StencilOpSeparate
, header
) == 0,
6973 "offset of StencilOpSeparate header should be 0");
6974 static_assert(offsetof(StencilOpSeparate
, face
) == 4,
6975 "offset of StencilOpSeparate face should be 4");
6976 static_assert(offsetof(StencilOpSeparate
, fail
) == 8,
6977 "offset of StencilOpSeparate fail should be 8");
6978 static_assert(offsetof(StencilOpSeparate
, zfail
) == 12,
6979 "offset of StencilOpSeparate zfail should be 12");
6980 static_assert(offsetof(StencilOpSeparate
, zpass
) == 16,
6981 "offset of StencilOpSeparate zpass should be 16");
6984 typedef TexImage2D ValueType
;
6985 static const CommandId kCmdId
= kTexImage2D
;
6986 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6987 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6989 static uint32_t ComputeSize() {
6990 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6993 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6995 void Init(GLenum _target
,
6997 GLint _internalformat
,
7002 uint32_t _pixels_shm_id
,
7003 uint32_t _pixels_shm_offset
) {
7007 internalformat
= _internalformat
;
7012 pixels_shm_id
= _pixels_shm_id
;
7013 pixels_shm_offset
= _pixels_shm_offset
;
7016 void* Set(void* cmd
,
7019 GLint _internalformat
,
7024 uint32_t _pixels_shm_id
,
7025 uint32_t _pixels_shm_offset
) {
7026 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7027 _height
, _format
, _type
, _pixels_shm_id
,
7028 _pixels_shm_offset
);
7029 return NextCmdAddress
<ValueType
>(cmd
);
7032 gpu::CommandHeader header
;
7035 int32_t internalformat
;
7040 uint32_t pixels_shm_id
;
7041 uint32_t pixels_shm_offset
;
7042 static const int32_t border
= 0;
7045 static_assert(sizeof(TexImage2D
) == 40, "size of TexImage2D should be 40");
7046 static_assert(offsetof(TexImage2D
, header
) == 0,
7047 "offset of TexImage2D header should be 0");
7048 static_assert(offsetof(TexImage2D
, target
) == 4,
7049 "offset of TexImage2D target should be 4");
7050 static_assert(offsetof(TexImage2D
, level
) == 8,
7051 "offset of TexImage2D level should be 8");
7052 static_assert(offsetof(TexImage2D
, internalformat
) == 12,
7053 "offset of TexImage2D internalformat should be 12");
7054 static_assert(offsetof(TexImage2D
, width
) == 16,
7055 "offset of TexImage2D width should be 16");
7056 static_assert(offsetof(TexImage2D
, height
) == 20,
7057 "offset of TexImage2D height should be 20");
7058 static_assert(offsetof(TexImage2D
, format
) == 24,
7059 "offset of TexImage2D format should be 24");
7060 static_assert(offsetof(TexImage2D
, type
) == 28,
7061 "offset of TexImage2D type should be 28");
7062 static_assert(offsetof(TexImage2D
, pixels_shm_id
) == 32,
7063 "offset of TexImage2D pixels_shm_id should be 32");
7064 static_assert(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
7065 "offset of TexImage2D pixels_shm_offset should be 36");
7068 typedef TexImage3D ValueType
;
7069 static const CommandId kCmdId
= kTexImage3D
;
7070 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7071 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7073 static uint32_t ComputeSize() {
7074 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7077 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7079 void Init(GLenum _target
,
7081 GLint _internalformat
,
7087 uint32_t _pixels_shm_id
,
7088 uint32_t _pixels_shm_offset
) {
7092 internalformat
= _internalformat
;
7098 pixels_shm_id
= _pixels_shm_id
;
7099 pixels_shm_offset
= _pixels_shm_offset
;
7102 void* Set(void* cmd
,
7105 GLint _internalformat
,
7111 uint32_t _pixels_shm_id
,
7112 uint32_t _pixels_shm_offset
) {
7113 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7114 _height
, _depth
, _format
, _type
,
7115 _pixels_shm_id
, _pixels_shm_offset
);
7116 return NextCmdAddress
<ValueType
>(cmd
);
7119 gpu::CommandHeader header
;
7122 int32_t internalformat
;
7128 uint32_t pixels_shm_id
;
7129 uint32_t pixels_shm_offset
;
7130 static const int32_t border
= 0;
7133 static_assert(sizeof(TexImage3D
) == 44, "size of TexImage3D should be 44");
7134 static_assert(offsetof(TexImage3D
, header
) == 0,
7135 "offset of TexImage3D header should be 0");
7136 static_assert(offsetof(TexImage3D
, target
) == 4,
7137 "offset of TexImage3D target should be 4");
7138 static_assert(offsetof(TexImage3D
, level
) == 8,
7139 "offset of TexImage3D level should be 8");
7140 static_assert(offsetof(TexImage3D
, internalformat
) == 12,
7141 "offset of TexImage3D internalformat should be 12");
7142 static_assert(offsetof(TexImage3D
, width
) == 16,
7143 "offset of TexImage3D width should be 16");
7144 static_assert(offsetof(TexImage3D
, height
) == 20,
7145 "offset of TexImage3D height should be 20");
7146 static_assert(offsetof(TexImage3D
, depth
) == 24,
7147 "offset of TexImage3D depth should be 24");
7148 static_assert(offsetof(TexImage3D
, format
) == 28,
7149 "offset of TexImage3D format should be 28");
7150 static_assert(offsetof(TexImage3D
, type
) == 32,
7151 "offset of TexImage3D type should be 32");
7152 static_assert(offsetof(TexImage3D
, pixels_shm_id
) == 36,
7153 "offset of TexImage3D pixels_shm_id should be 36");
7154 static_assert(offsetof(TexImage3D
, pixels_shm_offset
) == 40,
7155 "offset of TexImage3D pixels_shm_offset should be 40");
7157 struct TexParameterf
{
7158 typedef TexParameterf ValueType
;
7159 static const CommandId kCmdId
= kTexParameterf
;
7160 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7161 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7163 static uint32_t ComputeSize() {
7164 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7167 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7169 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
7176 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
7177 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7178 return NextCmdAddress
<ValueType
>(cmd
);
7181 gpu::CommandHeader header
;
7187 static_assert(sizeof(TexParameterf
) == 16,
7188 "size of TexParameterf should be 16");
7189 static_assert(offsetof(TexParameterf
, header
) == 0,
7190 "offset of TexParameterf header should be 0");
7191 static_assert(offsetof(TexParameterf
, target
) == 4,
7192 "offset of TexParameterf target should be 4");
7193 static_assert(offsetof(TexParameterf
, pname
) == 8,
7194 "offset of TexParameterf pname should be 8");
7195 static_assert(offsetof(TexParameterf
, param
) == 12,
7196 "offset of TexParameterf param should be 12");
7198 struct TexParameterfvImmediate
{
7199 typedef TexParameterfvImmediate ValueType
;
7200 static const CommandId kCmdId
= kTexParameterfvImmediate
;
7201 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7202 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7204 static uint32_t ComputeDataSize() {
7205 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
7208 static uint32_t ComputeSize() {
7209 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7212 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7214 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7218 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7221 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7222 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7223 const uint32_t size
= ComputeSize();
7224 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7227 gpu::CommandHeader header
;
7232 static_assert(sizeof(TexParameterfvImmediate
) == 12,
7233 "size of TexParameterfvImmediate should be 12");
7234 static_assert(offsetof(TexParameterfvImmediate
, header
) == 0,
7235 "offset of TexParameterfvImmediate header should be 0");
7236 static_assert(offsetof(TexParameterfvImmediate
, target
) == 4,
7237 "offset of TexParameterfvImmediate target should be 4");
7238 static_assert(offsetof(TexParameterfvImmediate
, pname
) == 8,
7239 "offset of TexParameterfvImmediate pname should be 8");
7241 struct TexParameteri
{
7242 typedef TexParameteri ValueType
;
7243 static const CommandId kCmdId
= kTexParameteri
;
7244 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7245 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7247 static uint32_t ComputeSize() {
7248 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7251 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7253 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
7260 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
7261 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7262 return NextCmdAddress
<ValueType
>(cmd
);
7265 gpu::CommandHeader header
;
7271 static_assert(sizeof(TexParameteri
) == 16,
7272 "size of TexParameteri should be 16");
7273 static_assert(offsetof(TexParameteri
, header
) == 0,
7274 "offset of TexParameteri header should be 0");
7275 static_assert(offsetof(TexParameteri
, target
) == 4,
7276 "offset of TexParameteri target should be 4");
7277 static_assert(offsetof(TexParameteri
, pname
) == 8,
7278 "offset of TexParameteri pname should be 8");
7279 static_assert(offsetof(TexParameteri
, param
) == 12,
7280 "offset of TexParameteri param should be 12");
7282 struct TexParameterivImmediate
{
7283 typedef TexParameterivImmediate ValueType
;
7284 static const CommandId kCmdId
= kTexParameterivImmediate
;
7285 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7286 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7288 static uint32_t ComputeDataSize() {
7289 return static_cast<uint32_t>(sizeof(GLint
) * 1);
7292 static uint32_t ComputeSize() {
7293 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7296 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7298 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7302 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7305 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7306 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7307 const uint32_t size
= ComputeSize();
7308 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7311 gpu::CommandHeader header
;
7316 static_assert(sizeof(TexParameterivImmediate
) == 12,
7317 "size of TexParameterivImmediate should be 12");
7318 static_assert(offsetof(TexParameterivImmediate
, header
) == 0,
7319 "offset of TexParameterivImmediate header should be 0");
7320 static_assert(offsetof(TexParameterivImmediate
, target
) == 4,
7321 "offset of TexParameterivImmediate target should be 4");
7322 static_assert(offsetof(TexParameterivImmediate
, pname
) == 8,
7323 "offset of TexParameterivImmediate pname should be 8");
7325 struct TexStorage3D
{
7326 typedef TexStorage3D ValueType
;
7327 static const CommandId kCmdId
= kTexStorage3D
;
7328 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7329 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7331 static uint32_t ComputeSize() {
7332 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7335 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7337 void Init(GLenum _target
,
7339 GLenum _internalFormat
,
7346 internalFormat
= _internalFormat
;
7352 void* Set(void* cmd
,
7355 GLenum _internalFormat
,
7359 static_cast<ValueType
*>(cmd
)
7360 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
, _depth
);
7361 return NextCmdAddress
<ValueType
>(cmd
);
7364 gpu::CommandHeader header
;
7367 uint32_t internalFormat
;
7373 static_assert(sizeof(TexStorage3D
) == 28, "size of TexStorage3D should be 28");
7374 static_assert(offsetof(TexStorage3D
, header
) == 0,
7375 "offset of TexStorage3D header should be 0");
7376 static_assert(offsetof(TexStorage3D
, target
) == 4,
7377 "offset of TexStorage3D target should be 4");
7378 static_assert(offsetof(TexStorage3D
, levels
) == 8,
7379 "offset of TexStorage3D levels should be 8");
7380 static_assert(offsetof(TexStorage3D
, internalFormat
) == 12,
7381 "offset of TexStorage3D internalFormat should be 12");
7382 static_assert(offsetof(TexStorage3D
, width
) == 16,
7383 "offset of TexStorage3D width should be 16");
7384 static_assert(offsetof(TexStorage3D
, height
) == 20,
7385 "offset of TexStorage3D height should be 20");
7386 static_assert(offsetof(TexStorage3D
, depth
) == 24,
7387 "offset of TexStorage3D depth should be 24");
7389 struct TexSubImage2D
{
7390 typedef TexSubImage2D ValueType
;
7391 static const CommandId kCmdId
= kTexSubImage2D
;
7392 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7393 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7395 static uint32_t ComputeSize() {
7396 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7399 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7401 void Init(GLenum _target
,
7409 uint32_t _pixels_shm_id
,
7410 uint32_t _pixels_shm_offset
,
7411 GLboolean _internal
) {
7421 pixels_shm_id
= _pixels_shm_id
;
7422 pixels_shm_offset
= _pixels_shm_offset
;
7423 internal
= _internal
;
7426 void* Set(void* cmd
,
7435 uint32_t _pixels_shm_id
,
7436 uint32_t _pixels_shm_offset
,
7437 GLboolean _internal
) {
7438 static_cast<ValueType
*>(cmd
)
7439 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
7440 _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7441 return NextCmdAddress
<ValueType
>(cmd
);
7444 gpu::CommandHeader header
;
7453 uint32_t pixels_shm_id
;
7454 uint32_t pixels_shm_offset
;
7458 static_assert(sizeof(TexSubImage2D
) == 48,
7459 "size of TexSubImage2D should be 48");
7460 static_assert(offsetof(TexSubImage2D
, header
) == 0,
7461 "offset of TexSubImage2D header should be 0");
7462 static_assert(offsetof(TexSubImage2D
, target
) == 4,
7463 "offset of TexSubImage2D target should be 4");
7464 static_assert(offsetof(TexSubImage2D
, level
) == 8,
7465 "offset of TexSubImage2D level should be 8");
7466 static_assert(offsetof(TexSubImage2D
, xoffset
) == 12,
7467 "offset of TexSubImage2D xoffset should be 12");
7468 static_assert(offsetof(TexSubImage2D
, yoffset
) == 16,
7469 "offset of TexSubImage2D yoffset should be 16");
7470 static_assert(offsetof(TexSubImage2D
, width
) == 20,
7471 "offset of TexSubImage2D width should be 20");
7472 static_assert(offsetof(TexSubImage2D
, height
) == 24,
7473 "offset of TexSubImage2D height should be 24");
7474 static_assert(offsetof(TexSubImage2D
, format
) == 28,
7475 "offset of TexSubImage2D format should be 28");
7476 static_assert(offsetof(TexSubImage2D
, type
) == 32,
7477 "offset of TexSubImage2D type should be 32");
7478 static_assert(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
7479 "offset of TexSubImage2D pixels_shm_id should be 36");
7480 static_assert(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
7481 "offset of TexSubImage2D pixels_shm_offset should be 40");
7482 static_assert(offsetof(TexSubImage2D
, internal
) == 44,
7483 "offset of TexSubImage2D internal should be 44");
7485 struct TexSubImage3D
{
7486 typedef TexSubImage3D ValueType
;
7487 static const CommandId kCmdId
= kTexSubImage3D
;
7488 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7489 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7491 static uint32_t ComputeSize() {
7492 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7495 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7497 void Init(GLenum _target
,
7507 uint32_t _pixels_shm_id
,
7508 uint32_t _pixels_shm_offset
,
7509 GLboolean _internal
) {
7521 pixels_shm_id
= _pixels_shm_id
;
7522 pixels_shm_offset
= _pixels_shm_offset
;
7523 internal
= _internal
;
7526 void* Set(void* cmd
,
7537 uint32_t _pixels_shm_id
,
7538 uint32_t _pixels_shm_offset
,
7539 GLboolean _internal
) {
7540 static_cast<ValueType
*>(cmd
)->Init(
7541 _target
, _level
, _xoffset
, _yoffset
, _zoffset
, _width
, _height
, _depth
,
7542 _format
, _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7543 return NextCmdAddress
<ValueType
>(cmd
);
7546 gpu::CommandHeader header
;
7557 uint32_t pixels_shm_id
;
7558 uint32_t pixels_shm_offset
;
7562 static_assert(sizeof(TexSubImage3D
) == 56,
7563 "size of TexSubImage3D should be 56");
7564 static_assert(offsetof(TexSubImage3D
, header
) == 0,
7565 "offset of TexSubImage3D header should be 0");
7566 static_assert(offsetof(TexSubImage3D
, target
) == 4,
7567 "offset of TexSubImage3D target should be 4");
7568 static_assert(offsetof(TexSubImage3D
, level
) == 8,
7569 "offset of TexSubImage3D level should be 8");
7570 static_assert(offsetof(TexSubImage3D
, xoffset
) == 12,
7571 "offset of TexSubImage3D xoffset should be 12");
7572 static_assert(offsetof(TexSubImage3D
, yoffset
) == 16,
7573 "offset of TexSubImage3D yoffset should be 16");
7574 static_assert(offsetof(TexSubImage3D
, zoffset
) == 20,
7575 "offset of TexSubImage3D zoffset should be 20");
7576 static_assert(offsetof(TexSubImage3D
, width
) == 24,
7577 "offset of TexSubImage3D width should be 24");
7578 static_assert(offsetof(TexSubImage3D
, height
) == 28,
7579 "offset of TexSubImage3D height should be 28");
7580 static_assert(offsetof(TexSubImage3D
, depth
) == 32,
7581 "offset of TexSubImage3D depth should be 32");
7582 static_assert(offsetof(TexSubImage3D
, format
) == 36,
7583 "offset of TexSubImage3D format should be 36");
7584 static_assert(offsetof(TexSubImage3D
, type
) == 40,
7585 "offset of TexSubImage3D type should be 40");
7586 static_assert(offsetof(TexSubImage3D
, pixels_shm_id
) == 44,
7587 "offset of TexSubImage3D pixels_shm_id should be 44");
7588 static_assert(offsetof(TexSubImage3D
, pixels_shm_offset
) == 48,
7589 "offset of TexSubImage3D pixels_shm_offset should be 48");
7590 static_assert(offsetof(TexSubImage3D
, internal
) == 52,
7591 "offset of TexSubImage3D internal should be 52");
7593 struct TransformFeedbackVaryingsBucket
{
7594 typedef TransformFeedbackVaryingsBucket ValueType
;
7595 static const CommandId kCmdId
= kTransformFeedbackVaryingsBucket
;
7596 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7597 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7599 static uint32_t ComputeSize() {
7600 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7603 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7605 void Init(GLuint _program
, uint32_t _varyings_bucket_id
, GLenum _buffermode
) {
7608 varyings_bucket_id
= _varyings_bucket_id
;
7609 buffermode
= _buffermode
;
7612 void* Set(void* cmd
,
7614 uint32_t _varyings_bucket_id
,
7615 GLenum _buffermode
) {
7616 static_cast<ValueType
*>(cmd
)
7617 ->Init(_program
, _varyings_bucket_id
, _buffermode
);
7618 return NextCmdAddress
<ValueType
>(cmd
);
7621 gpu::CommandHeader header
;
7623 uint32_t varyings_bucket_id
;
7624 uint32_t buffermode
;
7627 static_assert(sizeof(TransformFeedbackVaryingsBucket
) == 16,
7628 "size of TransformFeedbackVaryingsBucket should be 16");
7629 static_assert(offsetof(TransformFeedbackVaryingsBucket
, header
) == 0,
7630 "offset of TransformFeedbackVaryingsBucket header should be 0");
7631 static_assert(offsetof(TransformFeedbackVaryingsBucket
, program
) == 4,
7632 "offset of TransformFeedbackVaryingsBucket program should be 4");
7634 offsetof(TransformFeedbackVaryingsBucket
, varyings_bucket_id
) == 8,
7635 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
7637 offsetof(TransformFeedbackVaryingsBucket
, buffermode
) == 12,
7638 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
7641 typedef Uniform1f ValueType
;
7642 static const CommandId kCmdId
= kUniform1f
;
7643 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7644 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7646 static uint32_t ComputeSize() {
7647 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7650 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7652 void Init(GLint _location
, GLfloat _x
) {
7654 location
= _location
;
7658 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
7659 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7660 return NextCmdAddress
<ValueType
>(cmd
);
7663 gpu::CommandHeader header
;
7668 static_assert(sizeof(Uniform1f
) == 12, "size of Uniform1f should be 12");
7669 static_assert(offsetof(Uniform1f
, header
) == 0,
7670 "offset of Uniform1f header should be 0");
7671 static_assert(offsetof(Uniform1f
, location
) == 4,
7672 "offset of Uniform1f location should be 4");
7673 static_assert(offsetof(Uniform1f
, x
) == 8, "offset of Uniform1f x should be 8");
7675 struct Uniform1fvImmediate
{
7676 typedef Uniform1fvImmediate ValueType
;
7677 static const CommandId kCmdId
= kUniform1fvImmediate
;
7678 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7679 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7681 static uint32_t ComputeDataSize(GLsizei count
) {
7682 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
7685 static uint32_t ComputeSize(GLsizei count
) {
7686 return static_cast<uint32_t>(sizeof(ValueType
) +
7687 ComputeDataSize(count
)); // NOLINT
7690 void SetHeader(GLsizei count
) {
7691 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7694 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7696 location
= _location
;
7698 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7701 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7702 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7703 const uint32_t size
= ComputeSize(_count
);
7704 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7707 gpu::CommandHeader header
;
7712 static_assert(sizeof(Uniform1fvImmediate
) == 12,
7713 "size of Uniform1fvImmediate should be 12");
7714 static_assert(offsetof(Uniform1fvImmediate
, header
) == 0,
7715 "offset of Uniform1fvImmediate header should be 0");
7716 static_assert(offsetof(Uniform1fvImmediate
, location
) == 4,
7717 "offset of Uniform1fvImmediate location should be 4");
7718 static_assert(offsetof(Uniform1fvImmediate
, count
) == 8,
7719 "offset of Uniform1fvImmediate count should be 8");
7722 typedef Uniform1i ValueType
;
7723 static const CommandId kCmdId
= kUniform1i
;
7724 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7725 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7727 static uint32_t ComputeSize() {
7728 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7731 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7733 void Init(GLint _location
, GLint _x
) {
7735 location
= _location
;
7739 void* Set(void* cmd
, GLint _location
, GLint _x
) {
7740 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7741 return NextCmdAddress
<ValueType
>(cmd
);
7744 gpu::CommandHeader header
;
7749 static_assert(sizeof(Uniform1i
) == 12, "size of Uniform1i should be 12");
7750 static_assert(offsetof(Uniform1i
, header
) == 0,
7751 "offset of Uniform1i header should be 0");
7752 static_assert(offsetof(Uniform1i
, location
) == 4,
7753 "offset of Uniform1i location should be 4");
7754 static_assert(offsetof(Uniform1i
, x
) == 8, "offset of Uniform1i x should be 8");
7756 struct Uniform1ivImmediate
{
7757 typedef Uniform1ivImmediate ValueType
;
7758 static const CommandId kCmdId
= kUniform1ivImmediate
;
7759 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7760 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7762 static uint32_t ComputeDataSize(GLsizei count
) {
7763 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
7766 static uint32_t ComputeSize(GLsizei count
) {
7767 return static_cast<uint32_t>(sizeof(ValueType
) +
7768 ComputeDataSize(count
)); // NOLINT
7771 void SetHeader(GLsizei count
) {
7772 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7775 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
7777 location
= _location
;
7779 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7782 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
7783 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7784 const uint32_t size
= ComputeSize(_count
);
7785 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7788 gpu::CommandHeader header
;
7793 static_assert(sizeof(Uniform1ivImmediate
) == 12,
7794 "size of Uniform1ivImmediate should be 12");
7795 static_assert(offsetof(Uniform1ivImmediate
, header
) == 0,
7796 "offset of Uniform1ivImmediate header should be 0");
7797 static_assert(offsetof(Uniform1ivImmediate
, location
) == 4,
7798 "offset of Uniform1ivImmediate location should be 4");
7799 static_assert(offsetof(Uniform1ivImmediate
, count
) == 8,
7800 "offset of Uniform1ivImmediate count should be 8");
7803 typedef Uniform1ui ValueType
;
7804 static const CommandId kCmdId
= kUniform1ui
;
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(GLint _location
, GLuint _x
) {
7816 location
= _location
;
7820 void* Set(void* cmd
, GLint _location
, GLuint _x
) {
7821 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7822 return NextCmdAddress
<ValueType
>(cmd
);
7825 gpu::CommandHeader header
;
7830 static_assert(sizeof(Uniform1ui
) == 12, "size of Uniform1ui should be 12");
7831 static_assert(offsetof(Uniform1ui
, header
) == 0,
7832 "offset of Uniform1ui header should be 0");
7833 static_assert(offsetof(Uniform1ui
, location
) == 4,
7834 "offset of Uniform1ui location should be 4");
7835 static_assert(offsetof(Uniform1ui
, x
) == 8,
7836 "offset of Uniform1ui x should be 8");
7838 struct Uniform1uivImmediate
{
7839 typedef Uniform1uivImmediate ValueType
;
7840 static const CommandId kCmdId
= kUniform1uivImmediate
;
7841 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7842 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7844 static uint32_t ComputeDataSize(GLsizei count
) {
7845 return static_cast<uint32_t>(sizeof(GLuint
) * 1 * count
); // NOLINT
7848 static uint32_t ComputeSize(GLsizei count
) {
7849 return static_cast<uint32_t>(sizeof(ValueType
) +
7850 ComputeDataSize(count
)); // NOLINT
7853 void SetHeader(GLsizei count
) {
7854 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7857 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
7859 location
= _location
;
7861 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7864 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
7865 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7866 const uint32_t size
= ComputeSize(_count
);
7867 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7870 gpu::CommandHeader header
;
7875 static_assert(sizeof(Uniform1uivImmediate
) == 12,
7876 "size of Uniform1uivImmediate should be 12");
7877 static_assert(offsetof(Uniform1uivImmediate
, header
) == 0,
7878 "offset of Uniform1uivImmediate header should be 0");
7879 static_assert(offsetof(Uniform1uivImmediate
, location
) == 4,
7880 "offset of Uniform1uivImmediate location should be 4");
7881 static_assert(offsetof(Uniform1uivImmediate
, count
) == 8,
7882 "offset of Uniform1uivImmediate count should be 8");
7885 typedef Uniform2f ValueType
;
7886 static const CommandId kCmdId
= kUniform2f
;
7887 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7888 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7890 static uint32_t ComputeSize() {
7891 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7894 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7896 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
7898 location
= _location
;
7903 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
7904 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
7905 return NextCmdAddress
<ValueType
>(cmd
);
7908 gpu::CommandHeader header
;
7914 static_assert(sizeof(Uniform2f
) == 16, "size of Uniform2f should be 16");
7915 static_assert(offsetof(Uniform2f
, header
) == 0,
7916 "offset of Uniform2f header should be 0");
7917 static_assert(offsetof(Uniform2f
, location
) == 4,
7918 "offset of Uniform2f location should be 4");
7919 static_assert(offsetof(Uniform2f
, x
) == 8, "offset of Uniform2f x should be 8");
7920 static_assert(offsetof(Uniform2f
, y
) == 12,
7921 "offset of Uniform2f y should be 12");
7923 struct Uniform2fvImmediate
{
7924 typedef Uniform2fvImmediate ValueType
;
7925 static const CommandId kCmdId
= kUniform2fvImmediate
;
7926 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7927 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7929 static uint32_t ComputeDataSize(GLsizei count
) {
7930 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
7933 static uint32_t ComputeSize(GLsizei count
) {
7934 return static_cast<uint32_t>(sizeof(ValueType
) +
7935 ComputeDataSize(count
)); // NOLINT
7938 void SetHeader(GLsizei count
) {
7939 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7942 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7944 location
= _location
;
7946 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7949 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7950 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7951 const uint32_t size
= ComputeSize(_count
);
7952 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7955 gpu::CommandHeader header
;
7960 static_assert(sizeof(Uniform2fvImmediate
) == 12,
7961 "size of Uniform2fvImmediate should be 12");
7962 static_assert(offsetof(Uniform2fvImmediate
, header
) == 0,
7963 "offset of Uniform2fvImmediate header should be 0");
7964 static_assert(offsetof(Uniform2fvImmediate
, location
) == 4,
7965 "offset of Uniform2fvImmediate location should be 4");
7966 static_assert(offsetof(Uniform2fvImmediate
, count
) == 8,
7967 "offset of Uniform2fvImmediate count should be 8");
7970 typedef Uniform2i ValueType
;
7971 static const CommandId kCmdId
= kUniform2i
;
7972 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7973 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7975 static uint32_t ComputeSize() {
7976 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7979 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7981 void Init(GLint _location
, GLint _x
, GLint _y
) {
7983 location
= _location
;
7988 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
7989 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
7990 return NextCmdAddress
<ValueType
>(cmd
);
7993 gpu::CommandHeader header
;
7999 static_assert(sizeof(Uniform2i
) == 16, "size of Uniform2i should be 16");
8000 static_assert(offsetof(Uniform2i
, header
) == 0,
8001 "offset of Uniform2i header should be 0");
8002 static_assert(offsetof(Uniform2i
, location
) == 4,
8003 "offset of Uniform2i location should be 4");
8004 static_assert(offsetof(Uniform2i
, x
) == 8, "offset of Uniform2i x should be 8");
8005 static_assert(offsetof(Uniform2i
, y
) == 12,
8006 "offset of Uniform2i y should be 12");
8008 struct Uniform2ivImmediate
{
8009 typedef Uniform2ivImmediate ValueType
;
8010 static const CommandId kCmdId
= kUniform2ivImmediate
;
8011 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8012 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8014 static uint32_t ComputeDataSize(GLsizei count
) {
8015 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
8018 static uint32_t ComputeSize(GLsizei count
) {
8019 return static_cast<uint32_t>(sizeof(ValueType
) +
8020 ComputeDataSize(count
)); // NOLINT
8023 void SetHeader(GLsizei count
) {
8024 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8027 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8029 location
= _location
;
8031 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8034 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8035 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8036 const uint32_t size
= ComputeSize(_count
);
8037 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8040 gpu::CommandHeader header
;
8045 static_assert(sizeof(Uniform2ivImmediate
) == 12,
8046 "size of Uniform2ivImmediate should be 12");
8047 static_assert(offsetof(Uniform2ivImmediate
, header
) == 0,
8048 "offset of Uniform2ivImmediate header should be 0");
8049 static_assert(offsetof(Uniform2ivImmediate
, location
) == 4,
8050 "offset of Uniform2ivImmediate location should be 4");
8051 static_assert(offsetof(Uniform2ivImmediate
, count
) == 8,
8052 "offset of Uniform2ivImmediate count should be 8");
8055 typedef Uniform2ui ValueType
;
8056 static const CommandId kCmdId
= kUniform2ui
;
8057 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8058 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8060 static uint32_t ComputeSize() {
8061 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8064 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8066 void Init(GLint _location
, GLuint _x
, GLuint _y
) {
8068 location
= _location
;
8073 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
) {
8074 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8075 return NextCmdAddress
<ValueType
>(cmd
);
8078 gpu::CommandHeader header
;
8084 static_assert(sizeof(Uniform2ui
) == 16, "size of Uniform2ui should be 16");
8085 static_assert(offsetof(Uniform2ui
, header
) == 0,
8086 "offset of Uniform2ui header should be 0");
8087 static_assert(offsetof(Uniform2ui
, location
) == 4,
8088 "offset of Uniform2ui location should be 4");
8089 static_assert(offsetof(Uniform2ui
, x
) == 8,
8090 "offset of Uniform2ui x should be 8");
8091 static_assert(offsetof(Uniform2ui
, y
) == 12,
8092 "offset of Uniform2ui y should be 12");
8094 struct Uniform2uivImmediate
{
8095 typedef Uniform2uivImmediate ValueType
;
8096 static const CommandId kCmdId
= kUniform2uivImmediate
;
8097 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8098 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8100 static uint32_t ComputeDataSize(GLsizei count
) {
8101 return static_cast<uint32_t>(sizeof(GLuint
) * 2 * count
); // NOLINT
8104 static uint32_t ComputeSize(GLsizei count
) {
8105 return static_cast<uint32_t>(sizeof(ValueType
) +
8106 ComputeDataSize(count
)); // NOLINT
8109 void SetHeader(GLsizei count
) {
8110 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8113 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8115 location
= _location
;
8117 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8120 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8121 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8122 const uint32_t size
= ComputeSize(_count
);
8123 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8126 gpu::CommandHeader header
;
8131 static_assert(sizeof(Uniform2uivImmediate
) == 12,
8132 "size of Uniform2uivImmediate should be 12");
8133 static_assert(offsetof(Uniform2uivImmediate
, header
) == 0,
8134 "offset of Uniform2uivImmediate header should be 0");
8135 static_assert(offsetof(Uniform2uivImmediate
, location
) == 4,
8136 "offset of Uniform2uivImmediate location should be 4");
8137 static_assert(offsetof(Uniform2uivImmediate
, count
) == 8,
8138 "offset of Uniform2uivImmediate count should be 8");
8141 typedef Uniform3f ValueType
;
8142 static const CommandId kCmdId
= kUniform3f
;
8143 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8144 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8146 static uint32_t ComputeSize() {
8147 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8150 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8152 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8154 location
= _location
;
8160 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8161 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8162 return NextCmdAddress
<ValueType
>(cmd
);
8165 gpu::CommandHeader header
;
8172 static_assert(sizeof(Uniform3f
) == 20, "size of Uniform3f should be 20");
8173 static_assert(offsetof(Uniform3f
, header
) == 0,
8174 "offset of Uniform3f header should be 0");
8175 static_assert(offsetof(Uniform3f
, location
) == 4,
8176 "offset of Uniform3f location should be 4");
8177 static_assert(offsetof(Uniform3f
, x
) == 8, "offset of Uniform3f x should be 8");
8178 static_assert(offsetof(Uniform3f
, y
) == 12,
8179 "offset of Uniform3f y should be 12");
8180 static_assert(offsetof(Uniform3f
, z
) == 16,
8181 "offset of Uniform3f z should be 16");
8183 struct Uniform3fvImmediate
{
8184 typedef Uniform3fvImmediate ValueType
;
8185 static const CommandId kCmdId
= kUniform3fvImmediate
;
8186 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8187 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8189 static uint32_t ComputeDataSize(GLsizei count
) {
8190 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
8193 static uint32_t ComputeSize(GLsizei count
) {
8194 return static_cast<uint32_t>(sizeof(ValueType
) +
8195 ComputeDataSize(count
)); // NOLINT
8198 void SetHeader(GLsizei count
) {
8199 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8202 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8204 location
= _location
;
8206 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8209 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8210 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8211 const uint32_t size
= ComputeSize(_count
);
8212 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8215 gpu::CommandHeader header
;
8220 static_assert(sizeof(Uniform3fvImmediate
) == 12,
8221 "size of Uniform3fvImmediate should be 12");
8222 static_assert(offsetof(Uniform3fvImmediate
, header
) == 0,
8223 "offset of Uniform3fvImmediate header should be 0");
8224 static_assert(offsetof(Uniform3fvImmediate
, location
) == 4,
8225 "offset of Uniform3fvImmediate location should be 4");
8226 static_assert(offsetof(Uniform3fvImmediate
, count
) == 8,
8227 "offset of Uniform3fvImmediate count should be 8");
8230 typedef Uniform3i ValueType
;
8231 static const CommandId kCmdId
= kUniform3i
;
8232 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8233 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8235 static uint32_t ComputeSize() {
8236 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8239 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8241 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8243 location
= _location
;
8249 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8250 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8251 return NextCmdAddress
<ValueType
>(cmd
);
8254 gpu::CommandHeader header
;
8261 static_assert(sizeof(Uniform3i
) == 20, "size of Uniform3i should be 20");
8262 static_assert(offsetof(Uniform3i
, header
) == 0,
8263 "offset of Uniform3i header should be 0");
8264 static_assert(offsetof(Uniform3i
, location
) == 4,
8265 "offset of Uniform3i location should be 4");
8266 static_assert(offsetof(Uniform3i
, x
) == 8, "offset of Uniform3i x should be 8");
8267 static_assert(offsetof(Uniform3i
, y
) == 12,
8268 "offset of Uniform3i y should be 12");
8269 static_assert(offsetof(Uniform3i
, z
) == 16,
8270 "offset of Uniform3i z should be 16");
8272 struct Uniform3ivImmediate
{
8273 typedef Uniform3ivImmediate ValueType
;
8274 static const CommandId kCmdId
= kUniform3ivImmediate
;
8275 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8276 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8278 static uint32_t ComputeDataSize(GLsizei count
) {
8279 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
8282 static uint32_t ComputeSize(GLsizei count
) {
8283 return static_cast<uint32_t>(sizeof(ValueType
) +
8284 ComputeDataSize(count
)); // NOLINT
8287 void SetHeader(GLsizei count
) {
8288 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8291 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8293 location
= _location
;
8295 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8298 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8299 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8300 const uint32_t size
= ComputeSize(_count
);
8301 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8304 gpu::CommandHeader header
;
8309 static_assert(sizeof(Uniform3ivImmediate
) == 12,
8310 "size of Uniform3ivImmediate should be 12");
8311 static_assert(offsetof(Uniform3ivImmediate
, header
) == 0,
8312 "offset of Uniform3ivImmediate header should be 0");
8313 static_assert(offsetof(Uniform3ivImmediate
, location
) == 4,
8314 "offset of Uniform3ivImmediate location should be 4");
8315 static_assert(offsetof(Uniform3ivImmediate
, count
) == 8,
8316 "offset of Uniform3ivImmediate count should be 8");
8319 typedef Uniform3ui ValueType
;
8320 static const CommandId kCmdId
= kUniform3ui
;
8321 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8322 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8324 static uint32_t ComputeSize() {
8325 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8328 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8330 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8332 location
= _location
;
8338 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8339 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8340 return NextCmdAddress
<ValueType
>(cmd
);
8343 gpu::CommandHeader header
;
8350 static_assert(sizeof(Uniform3ui
) == 20, "size of Uniform3ui should be 20");
8351 static_assert(offsetof(Uniform3ui
, header
) == 0,
8352 "offset of Uniform3ui header should be 0");
8353 static_assert(offsetof(Uniform3ui
, location
) == 4,
8354 "offset of Uniform3ui location should be 4");
8355 static_assert(offsetof(Uniform3ui
, x
) == 8,
8356 "offset of Uniform3ui x should be 8");
8357 static_assert(offsetof(Uniform3ui
, y
) == 12,
8358 "offset of Uniform3ui y should be 12");
8359 static_assert(offsetof(Uniform3ui
, z
) == 16,
8360 "offset of Uniform3ui z should be 16");
8362 struct Uniform3uivImmediate
{
8363 typedef Uniform3uivImmediate ValueType
;
8364 static const CommandId kCmdId
= kUniform3uivImmediate
;
8365 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8366 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8368 static uint32_t ComputeDataSize(GLsizei count
) {
8369 return static_cast<uint32_t>(sizeof(GLuint
) * 3 * count
); // NOLINT
8372 static uint32_t ComputeSize(GLsizei count
) {
8373 return static_cast<uint32_t>(sizeof(ValueType
) +
8374 ComputeDataSize(count
)); // NOLINT
8377 void SetHeader(GLsizei count
) {
8378 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8381 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8383 location
= _location
;
8385 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8388 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8389 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8390 const uint32_t size
= ComputeSize(_count
);
8391 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8394 gpu::CommandHeader header
;
8399 static_assert(sizeof(Uniform3uivImmediate
) == 12,
8400 "size of Uniform3uivImmediate should be 12");
8401 static_assert(offsetof(Uniform3uivImmediate
, header
) == 0,
8402 "offset of Uniform3uivImmediate header should be 0");
8403 static_assert(offsetof(Uniform3uivImmediate
, location
) == 4,
8404 "offset of Uniform3uivImmediate location should be 4");
8405 static_assert(offsetof(Uniform3uivImmediate
, count
) == 8,
8406 "offset of Uniform3uivImmediate count should be 8");
8409 typedef Uniform4f ValueType
;
8410 static const CommandId kCmdId
= kUniform4f
;
8411 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8412 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8414 static uint32_t ComputeSize() {
8415 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8418 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8420 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
8422 location
= _location
;
8429 void* Set(void* cmd
,
8435 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8436 return NextCmdAddress
<ValueType
>(cmd
);
8439 gpu::CommandHeader header
;
8447 static_assert(sizeof(Uniform4f
) == 24, "size of Uniform4f should be 24");
8448 static_assert(offsetof(Uniform4f
, header
) == 0,
8449 "offset of Uniform4f header should be 0");
8450 static_assert(offsetof(Uniform4f
, location
) == 4,
8451 "offset of Uniform4f location should be 4");
8452 static_assert(offsetof(Uniform4f
, x
) == 8, "offset of Uniform4f x should be 8");
8453 static_assert(offsetof(Uniform4f
, y
) == 12,
8454 "offset of Uniform4f y should be 12");
8455 static_assert(offsetof(Uniform4f
, z
) == 16,
8456 "offset of Uniform4f z should be 16");
8457 static_assert(offsetof(Uniform4f
, w
) == 20,
8458 "offset of Uniform4f w should be 20");
8460 struct Uniform4fvImmediate
{
8461 typedef Uniform4fvImmediate ValueType
;
8462 static const CommandId kCmdId
= kUniform4fvImmediate
;
8463 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8464 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8466 static uint32_t ComputeDataSize(GLsizei count
) {
8467 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
8470 static uint32_t ComputeSize(GLsizei count
) {
8471 return static_cast<uint32_t>(sizeof(ValueType
) +
8472 ComputeDataSize(count
)); // NOLINT
8475 void SetHeader(GLsizei count
) {
8476 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8479 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8481 location
= _location
;
8483 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8486 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8487 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8488 const uint32_t size
= ComputeSize(_count
);
8489 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8492 gpu::CommandHeader header
;
8497 static_assert(sizeof(Uniform4fvImmediate
) == 12,
8498 "size of Uniform4fvImmediate should be 12");
8499 static_assert(offsetof(Uniform4fvImmediate
, header
) == 0,
8500 "offset of Uniform4fvImmediate header should be 0");
8501 static_assert(offsetof(Uniform4fvImmediate
, location
) == 4,
8502 "offset of Uniform4fvImmediate location should be 4");
8503 static_assert(offsetof(Uniform4fvImmediate
, count
) == 8,
8504 "offset of Uniform4fvImmediate count should be 8");
8507 typedef Uniform4i ValueType
;
8508 static const CommandId kCmdId
= kUniform4i
;
8509 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8510 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8512 static uint32_t ComputeSize() {
8513 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8516 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8518 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
8520 location
= _location
;
8527 void* Set(void* cmd
,
8533 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8534 return NextCmdAddress
<ValueType
>(cmd
);
8537 gpu::CommandHeader header
;
8545 static_assert(sizeof(Uniform4i
) == 24, "size of Uniform4i should be 24");
8546 static_assert(offsetof(Uniform4i
, header
) == 0,
8547 "offset of Uniform4i header should be 0");
8548 static_assert(offsetof(Uniform4i
, location
) == 4,
8549 "offset of Uniform4i location should be 4");
8550 static_assert(offsetof(Uniform4i
, x
) == 8, "offset of Uniform4i x should be 8");
8551 static_assert(offsetof(Uniform4i
, y
) == 12,
8552 "offset of Uniform4i y should be 12");
8553 static_assert(offsetof(Uniform4i
, z
) == 16,
8554 "offset of Uniform4i z should be 16");
8555 static_assert(offsetof(Uniform4i
, w
) == 20,
8556 "offset of Uniform4i w should be 20");
8558 struct Uniform4ivImmediate
{
8559 typedef Uniform4ivImmediate ValueType
;
8560 static const CommandId kCmdId
= kUniform4ivImmediate
;
8561 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8562 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8564 static uint32_t ComputeDataSize(GLsizei count
) {
8565 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
8568 static uint32_t ComputeSize(GLsizei count
) {
8569 return static_cast<uint32_t>(sizeof(ValueType
) +
8570 ComputeDataSize(count
)); // NOLINT
8573 void SetHeader(GLsizei count
) {
8574 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8577 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8579 location
= _location
;
8581 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8584 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8585 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8586 const uint32_t size
= ComputeSize(_count
);
8587 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8590 gpu::CommandHeader header
;
8595 static_assert(sizeof(Uniform4ivImmediate
) == 12,
8596 "size of Uniform4ivImmediate should be 12");
8597 static_assert(offsetof(Uniform4ivImmediate
, header
) == 0,
8598 "offset of Uniform4ivImmediate header should be 0");
8599 static_assert(offsetof(Uniform4ivImmediate
, location
) == 4,
8600 "offset of Uniform4ivImmediate location should be 4");
8601 static_assert(offsetof(Uniform4ivImmediate
, count
) == 8,
8602 "offset of Uniform4ivImmediate count should be 8");
8605 typedef Uniform4ui ValueType
;
8606 static const CommandId kCmdId
= kUniform4ui
;
8607 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8608 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8610 static uint32_t ComputeSize() {
8611 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8614 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8616 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
8618 location
= _location
;
8625 void* Set(void* cmd
,
8631 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8632 return NextCmdAddress
<ValueType
>(cmd
);
8635 gpu::CommandHeader header
;
8643 static_assert(sizeof(Uniform4ui
) == 24, "size of Uniform4ui should be 24");
8644 static_assert(offsetof(Uniform4ui
, header
) == 0,
8645 "offset of Uniform4ui header should be 0");
8646 static_assert(offsetof(Uniform4ui
, location
) == 4,
8647 "offset of Uniform4ui location should be 4");
8648 static_assert(offsetof(Uniform4ui
, x
) == 8,
8649 "offset of Uniform4ui x should be 8");
8650 static_assert(offsetof(Uniform4ui
, y
) == 12,
8651 "offset of Uniform4ui y should be 12");
8652 static_assert(offsetof(Uniform4ui
, z
) == 16,
8653 "offset of Uniform4ui z should be 16");
8654 static_assert(offsetof(Uniform4ui
, w
) == 20,
8655 "offset of Uniform4ui w should be 20");
8657 struct Uniform4uivImmediate
{
8658 typedef Uniform4uivImmediate ValueType
;
8659 static const CommandId kCmdId
= kUniform4uivImmediate
;
8660 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8661 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8663 static uint32_t ComputeDataSize(GLsizei count
) {
8664 return static_cast<uint32_t>(sizeof(GLuint
) * 4 * count
); // NOLINT
8667 static uint32_t ComputeSize(GLsizei count
) {
8668 return static_cast<uint32_t>(sizeof(ValueType
) +
8669 ComputeDataSize(count
)); // NOLINT
8672 void SetHeader(GLsizei count
) {
8673 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8676 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8678 location
= _location
;
8680 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8683 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8684 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8685 const uint32_t size
= ComputeSize(_count
);
8686 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8689 gpu::CommandHeader header
;
8694 static_assert(sizeof(Uniform4uivImmediate
) == 12,
8695 "size of Uniform4uivImmediate should be 12");
8696 static_assert(offsetof(Uniform4uivImmediate
, header
) == 0,
8697 "offset of Uniform4uivImmediate header should be 0");
8698 static_assert(offsetof(Uniform4uivImmediate
, location
) == 4,
8699 "offset of Uniform4uivImmediate location should be 4");
8700 static_assert(offsetof(Uniform4uivImmediate
, count
) == 8,
8701 "offset of Uniform4uivImmediate count should be 8");
8703 struct UniformBlockBinding
{
8704 typedef UniformBlockBinding ValueType
;
8705 static const CommandId kCmdId
= kUniformBlockBinding
;
8706 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8707 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8709 static uint32_t ComputeSize() {
8710 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8713 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8715 void Init(GLuint _program
, GLuint _index
, GLuint _binding
) {
8722 void* Set(void* cmd
, GLuint _program
, GLuint _index
, GLuint _binding
) {
8723 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _binding
);
8724 return NextCmdAddress
<ValueType
>(cmd
);
8727 gpu::CommandHeader header
;
8733 static_assert(sizeof(UniformBlockBinding
) == 16,
8734 "size of UniformBlockBinding should be 16");
8735 static_assert(offsetof(UniformBlockBinding
, header
) == 0,
8736 "offset of UniformBlockBinding header should be 0");
8737 static_assert(offsetof(UniformBlockBinding
, program
) == 4,
8738 "offset of UniformBlockBinding program should be 4");
8739 static_assert(offsetof(UniformBlockBinding
, index
) == 8,
8740 "offset of UniformBlockBinding index should be 8");
8741 static_assert(offsetof(UniformBlockBinding
, binding
) == 12,
8742 "offset of UniformBlockBinding binding should be 12");
8744 struct UniformMatrix2fvImmediate
{
8745 typedef UniformMatrix2fvImmediate ValueType
;
8746 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
8747 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8748 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8750 static uint32_t ComputeDataSize(GLsizei count
) {
8751 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
8754 static uint32_t ComputeSize(GLsizei count
) {
8755 return static_cast<uint32_t>(sizeof(ValueType
) +
8756 ComputeDataSize(count
)); // NOLINT
8759 void SetHeader(GLsizei count
) {
8760 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8763 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8765 location
= _location
;
8767 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8770 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8771 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8772 const uint32_t size
= ComputeSize(_count
);
8773 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8776 gpu::CommandHeader header
;
8779 static const uint32_t transpose
= false;
8782 static_assert(sizeof(UniformMatrix2fvImmediate
) == 12,
8783 "size of UniformMatrix2fvImmediate should be 12");
8784 static_assert(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
8785 "offset of UniformMatrix2fvImmediate header should be 0");
8786 static_assert(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
8787 "offset of UniformMatrix2fvImmediate location should be 4");
8788 static_assert(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
8789 "offset of UniformMatrix2fvImmediate count should be 8");
8791 struct UniformMatrix2x3fvImmediate
{
8792 typedef UniformMatrix2x3fvImmediate ValueType
;
8793 static const CommandId kCmdId
= kUniformMatrix2x3fvImmediate
;
8794 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8795 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8797 static uint32_t ComputeDataSize(GLsizei count
) {
8798 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
8801 static uint32_t ComputeSize(GLsizei count
) {
8802 return static_cast<uint32_t>(sizeof(ValueType
) +
8803 ComputeDataSize(count
)); // NOLINT
8806 void SetHeader(GLsizei count
) {
8807 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8810 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8812 location
= _location
;
8814 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8817 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8818 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8819 const uint32_t size
= ComputeSize(_count
);
8820 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8823 gpu::CommandHeader header
;
8826 static const uint32_t transpose
= false;
8829 static_assert(sizeof(UniformMatrix2x3fvImmediate
) == 12,
8830 "size of UniformMatrix2x3fvImmediate should be 12");
8831 static_assert(offsetof(UniformMatrix2x3fvImmediate
, header
) == 0,
8832 "offset of UniformMatrix2x3fvImmediate header should be 0");
8833 static_assert(offsetof(UniformMatrix2x3fvImmediate
, location
) == 4,
8834 "offset of UniformMatrix2x3fvImmediate location should be 4");
8835 static_assert(offsetof(UniformMatrix2x3fvImmediate
, count
) == 8,
8836 "offset of UniformMatrix2x3fvImmediate count should be 8");
8838 struct UniformMatrix2x4fvImmediate
{
8839 typedef UniformMatrix2x4fvImmediate ValueType
;
8840 static const CommandId kCmdId
= kUniformMatrix2x4fvImmediate
;
8841 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8842 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8844 static uint32_t ComputeDataSize(GLsizei count
) {
8845 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
8848 static uint32_t ComputeSize(GLsizei count
) {
8849 return static_cast<uint32_t>(sizeof(ValueType
) +
8850 ComputeDataSize(count
)); // NOLINT
8853 void SetHeader(GLsizei count
) {
8854 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8857 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8859 location
= _location
;
8861 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8864 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8865 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8866 const uint32_t size
= ComputeSize(_count
);
8867 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8870 gpu::CommandHeader header
;
8873 static const uint32_t transpose
= false;
8876 static_assert(sizeof(UniformMatrix2x4fvImmediate
) == 12,
8877 "size of UniformMatrix2x4fvImmediate should be 12");
8878 static_assert(offsetof(UniformMatrix2x4fvImmediate
, header
) == 0,
8879 "offset of UniformMatrix2x4fvImmediate header should be 0");
8880 static_assert(offsetof(UniformMatrix2x4fvImmediate
, location
) == 4,
8881 "offset of UniformMatrix2x4fvImmediate location should be 4");
8882 static_assert(offsetof(UniformMatrix2x4fvImmediate
, count
) == 8,
8883 "offset of UniformMatrix2x4fvImmediate count should be 8");
8885 struct UniformMatrix3fvImmediate
{
8886 typedef UniformMatrix3fvImmediate ValueType
;
8887 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
8888 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8891 static uint32_t ComputeDataSize(GLsizei count
) {
8892 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
8895 static uint32_t ComputeSize(GLsizei count
) {
8896 return static_cast<uint32_t>(sizeof(ValueType
) +
8897 ComputeDataSize(count
)); // NOLINT
8900 void SetHeader(GLsizei count
) {
8901 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8904 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8906 location
= _location
;
8908 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8911 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8912 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8913 const uint32_t size
= ComputeSize(_count
);
8914 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8917 gpu::CommandHeader header
;
8920 static const uint32_t transpose
= false;
8923 static_assert(sizeof(UniformMatrix3fvImmediate
) == 12,
8924 "size of UniformMatrix3fvImmediate should be 12");
8925 static_assert(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
8926 "offset of UniformMatrix3fvImmediate header should be 0");
8927 static_assert(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
8928 "offset of UniformMatrix3fvImmediate location should be 4");
8929 static_assert(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
8930 "offset of UniformMatrix3fvImmediate count should be 8");
8932 struct UniformMatrix3x2fvImmediate
{
8933 typedef UniformMatrix3x2fvImmediate ValueType
;
8934 static const CommandId kCmdId
= kUniformMatrix3x2fvImmediate
;
8935 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8936 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8938 static uint32_t ComputeDataSize(GLsizei count
) {
8939 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
8942 static uint32_t ComputeSize(GLsizei count
) {
8943 return static_cast<uint32_t>(sizeof(ValueType
) +
8944 ComputeDataSize(count
)); // NOLINT
8947 void SetHeader(GLsizei count
) {
8948 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8951 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8953 location
= _location
;
8955 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8958 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8959 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8960 const uint32_t size
= ComputeSize(_count
);
8961 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8964 gpu::CommandHeader header
;
8967 static const uint32_t transpose
= false;
8970 static_assert(sizeof(UniformMatrix3x2fvImmediate
) == 12,
8971 "size of UniformMatrix3x2fvImmediate should be 12");
8972 static_assert(offsetof(UniformMatrix3x2fvImmediate
, header
) == 0,
8973 "offset of UniformMatrix3x2fvImmediate header should be 0");
8974 static_assert(offsetof(UniformMatrix3x2fvImmediate
, location
) == 4,
8975 "offset of UniformMatrix3x2fvImmediate location should be 4");
8976 static_assert(offsetof(UniformMatrix3x2fvImmediate
, count
) == 8,
8977 "offset of UniformMatrix3x2fvImmediate count should be 8");
8979 struct UniformMatrix3x4fvImmediate
{
8980 typedef UniformMatrix3x4fvImmediate ValueType
;
8981 static const CommandId kCmdId
= kUniformMatrix3x4fvImmediate
;
8982 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8983 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8985 static uint32_t ComputeDataSize(GLsizei count
) {
8986 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
8989 static uint32_t ComputeSize(GLsizei count
) {
8990 return static_cast<uint32_t>(sizeof(ValueType
) +
8991 ComputeDataSize(count
)); // NOLINT
8994 void SetHeader(GLsizei count
) {
8995 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8998 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9000 location
= _location
;
9002 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9005 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9006 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9007 const uint32_t size
= ComputeSize(_count
);
9008 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9011 gpu::CommandHeader header
;
9014 static const uint32_t transpose
= false;
9017 static_assert(sizeof(UniformMatrix3x4fvImmediate
) == 12,
9018 "size of UniformMatrix3x4fvImmediate should be 12");
9019 static_assert(offsetof(UniformMatrix3x4fvImmediate
, header
) == 0,
9020 "offset of UniformMatrix3x4fvImmediate header should be 0");
9021 static_assert(offsetof(UniformMatrix3x4fvImmediate
, location
) == 4,
9022 "offset of UniformMatrix3x4fvImmediate location should be 4");
9023 static_assert(offsetof(UniformMatrix3x4fvImmediate
, count
) == 8,
9024 "offset of UniformMatrix3x4fvImmediate count should be 8");
9026 struct UniformMatrix4fvImmediate
{
9027 typedef UniformMatrix4fvImmediate ValueType
;
9028 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
9029 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9030 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9032 static uint32_t ComputeDataSize(GLsizei count
) {
9033 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
9036 static uint32_t ComputeSize(GLsizei count
) {
9037 return static_cast<uint32_t>(sizeof(ValueType
) +
9038 ComputeDataSize(count
)); // NOLINT
9041 void SetHeader(GLsizei count
) {
9042 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9045 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9047 location
= _location
;
9049 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9052 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9053 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9054 const uint32_t size
= ComputeSize(_count
);
9055 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9058 gpu::CommandHeader header
;
9061 static const uint32_t transpose
= false;
9064 static_assert(sizeof(UniformMatrix4fvImmediate
) == 12,
9065 "size of UniformMatrix4fvImmediate should be 12");
9066 static_assert(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
9067 "offset of UniformMatrix4fvImmediate header should be 0");
9068 static_assert(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
9069 "offset of UniformMatrix4fvImmediate location should be 4");
9070 static_assert(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
9071 "offset of UniformMatrix4fvImmediate count should be 8");
9073 struct UniformMatrix4x2fvImmediate
{
9074 typedef UniformMatrix4x2fvImmediate ValueType
;
9075 static const CommandId kCmdId
= kUniformMatrix4x2fvImmediate
;
9076 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9077 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9079 static uint32_t ComputeDataSize(GLsizei count
) {
9080 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9083 static uint32_t ComputeSize(GLsizei count
) {
9084 return static_cast<uint32_t>(sizeof(ValueType
) +
9085 ComputeDataSize(count
)); // NOLINT
9088 void SetHeader(GLsizei count
) {
9089 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9092 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9094 location
= _location
;
9096 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9099 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9100 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9101 const uint32_t size
= ComputeSize(_count
);
9102 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9105 gpu::CommandHeader header
;
9108 static const uint32_t transpose
= false;
9111 static_assert(sizeof(UniformMatrix4x2fvImmediate
) == 12,
9112 "size of UniformMatrix4x2fvImmediate should be 12");
9113 static_assert(offsetof(UniformMatrix4x2fvImmediate
, header
) == 0,
9114 "offset of UniformMatrix4x2fvImmediate header should be 0");
9115 static_assert(offsetof(UniformMatrix4x2fvImmediate
, location
) == 4,
9116 "offset of UniformMatrix4x2fvImmediate location should be 4");
9117 static_assert(offsetof(UniformMatrix4x2fvImmediate
, count
) == 8,
9118 "offset of UniformMatrix4x2fvImmediate count should be 8");
9120 struct UniformMatrix4x3fvImmediate
{
9121 typedef UniformMatrix4x3fvImmediate ValueType
;
9122 static const CommandId kCmdId
= kUniformMatrix4x3fvImmediate
;
9123 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9124 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9126 static uint32_t ComputeDataSize(GLsizei count
) {
9127 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9130 static uint32_t ComputeSize(GLsizei count
) {
9131 return static_cast<uint32_t>(sizeof(ValueType
) +
9132 ComputeDataSize(count
)); // NOLINT
9135 void SetHeader(GLsizei count
) {
9136 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9139 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9141 location
= _location
;
9143 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9146 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9147 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9148 const uint32_t size
= ComputeSize(_count
);
9149 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9152 gpu::CommandHeader header
;
9155 static const uint32_t transpose
= false;
9158 static_assert(sizeof(UniformMatrix4x3fvImmediate
) == 12,
9159 "size of UniformMatrix4x3fvImmediate should be 12");
9160 static_assert(offsetof(UniformMatrix4x3fvImmediate
, header
) == 0,
9161 "offset of UniformMatrix4x3fvImmediate header should be 0");
9162 static_assert(offsetof(UniformMatrix4x3fvImmediate
, location
) == 4,
9163 "offset of UniformMatrix4x3fvImmediate location should be 4");
9164 static_assert(offsetof(UniformMatrix4x3fvImmediate
, count
) == 8,
9165 "offset of UniformMatrix4x3fvImmediate count should be 8");
9168 typedef UseProgram ValueType
;
9169 static const CommandId kCmdId
= kUseProgram
;
9170 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9171 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9173 static uint32_t ComputeSize() {
9174 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9177 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9179 void Init(GLuint _program
) {
9184 void* Set(void* cmd
, GLuint _program
) {
9185 static_cast<ValueType
*>(cmd
)->Init(_program
);
9186 return NextCmdAddress
<ValueType
>(cmd
);
9189 gpu::CommandHeader header
;
9193 static_assert(sizeof(UseProgram
) == 8, "size of UseProgram should be 8");
9194 static_assert(offsetof(UseProgram
, header
) == 0,
9195 "offset of UseProgram header should be 0");
9196 static_assert(offsetof(UseProgram
, program
) == 4,
9197 "offset of UseProgram program should be 4");
9199 struct ValidateProgram
{
9200 typedef ValidateProgram ValueType
;
9201 static const CommandId kCmdId
= kValidateProgram
;
9202 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9203 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9205 static uint32_t ComputeSize() {
9206 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9209 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9211 void Init(GLuint _program
) {
9216 void* Set(void* cmd
, GLuint _program
) {
9217 static_cast<ValueType
*>(cmd
)->Init(_program
);
9218 return NextCmdAddress
<ValueType
>(cmd
);
9221 gpu::CommandHeader header
;
9225 static_assert(sizeof(ValidateProgram
) == 8,
9226 "size of ValidateProgram should be 8");
9227 static_assert(offsetof(ValidateProgram
, header
) == 0,
9228 "offset of ValidateProgram header should be 0");
9229 static_assert(offsetof(ValidateProgram
, program
) == 4,
9230 "offset of ValidateProgram program should be 4");
9232 struct VertexAttrib1f
{
9233 typedef VertexAttrib1f ValueType
;
9234 static const CommandId kCmdId
= kVertexAttrib1f
;
9235 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9236 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9238 static uint32_t ComputeSize() {
9239 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9242 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9244 void Init(GLuint _indx
, GLfloat _x
) {
9250 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
9251 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
9252 return NextCmdAddress
<ValueType
>(cmd
);
9255 gpu::CommandHeader header
;
9260 static_assert(sizeof(VertexAttrib1f
) == 12,
9261 "size of VertexAttrib1f should be 12");
9262 static_assert(offsetof(VertexAttrib1f
, header
) == 0,
9263 "offset of VertexAttrib1f header should be 0");
9264 static_assert(offsetof(VertexAttrib1f
, indx
) == 4,
9265 "offset of VertexAttrib1f indx should be 4");
9266 static_assert(offsetof(VertexAttrib1f
, x
) == 8,
9267 "offset of VertexAttrib1f x should be 8");
9269 struct VertexAttrib1fvImmediate
{
9270 typedef VertexAttrib1fvImmediate ValueType
;
9271 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
9272 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9273 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9275 static uint32_t ComputeDataSize() {
9276 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
9279 static uint32_t ComputeSize() {
9280 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9283 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9285 void Init(GLuint _indx
, const GLfloat
* _values
) {
9288 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9291 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9292 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9293 const uint32_t size
= ComputeSize();
9294 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9297 gpu::CommandHeader header
;
9301 static_assert(sizeof(VertexAttrib1fvImmediate
) == 8,
9302 "size of VertexAttrib1fvImmediate should be 8");
9303 static_assert(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
9304 "offset of VertexAttrib1fvImmediate header should be 0");
9305 static_assert(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
9306 "offset of VertexAttrib1fvImmediate indx should be 4");
9308 struct VertexAttrib2f
{
9309 typedef VertexAttrib2f ValueType
;
9310 static const CommandId kCmdId
= kVertexAttrib2f
;
9311 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9312 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9314 static uint32_t ComputeSize() {
9315 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9318 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9320 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9327 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9328 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
9329 return NextCmdAddress
<ValueType
>(cmd
);
9332 gpu::CommandHeader header
;
9338 static_assert(sizeof(VertexAttrib2f
) == 16,
9339 "size of VertexAttrib2f should be 16");
9340 static_assert(offsetof(VertexAttrib2f
, header
) == 0,
9341 "offset of VertexAttrib2f header should be 0");
9342 static_assert(offsetof(VertexAttrib2f
, indx
) == 4,
9343 "offset of VertexAttrib2f indx should be 4");
9344 static_assert(offsetof(VertexAttrib2f
, x
) == 8,
9345 "offset of VertexAttrib2f x should be 8");
9346 static_assert(offsetof(VertexAttrib2f
, y
) == 12,
9347 "offset of VertexAttrib2f y should be 12");
9349 struct VertexAttrib2fvImmediate
{
9350 typedef VertexAttrib2fvImmediate ValueType
;
9351 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
9352 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9353 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9355 static uint32_t ComputeDataSize() {
9356 return static_cast<uint32_t>(sizeof(GLfloat
) * 2);
9359 static uint32_t ComputeSize() {
9360 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9363 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9365 void Init(GLuint _indx
, const GLfloat
* _values
) {
9368 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9371 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9372 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9373 const uint32_t size
= ComputeSize();
9374 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9377 gpu::CommandHeader header
;
9381 static_assert(sizeof(VertexAttrib2fvImmediate
) == 8,
9382 "size of VertexAttrib2fvImmediate should be 8");
9383 static_assert(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
9384 "offset of VertexAttrib2fvImmediate header should be 0");
9385 static_assert(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
9386 "offset of VertexAttrib2fvImmediate indx should be 4");
9388 struct VertexAttrib3f
{
9389 typedef VertexAttrib3f ValueType
;
9390 static const CommandId kCmdId
= kVertexAttrib3f
;
9391 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9392 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9394 static uint32_t ComputeSize() {
9395 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9398 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9400 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9408 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9409 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
9410 return NextCmdAddress
<ValueType
>(cmd
);
9413 gpu::CommandHeader header
;
9420 static_assert(sizeof(VertexAttrib3f
) == 20,
9421 "size of VertexAttrib3f should be 20");
9422 static_assert(offsetof(VertexAttrib3f
, header
) == 0,
9423 "offset of VertexAttrib3f header should be 0");
9424 static_assert(offsetof(VertexAttrib3f
, indx
) == 4,
9425 "offset of VertexAttrib3f indx should be 4");
9426 static_assert(offsetof(VertexAttrib3f
, x
) == 8,
9427 "offset of VertexAttrib3f x should be 8");
9428 static_assert(offsetof(VertexAttrib3f
, y
) == 12,
9429 "offset of VertexAttrib3f y should be 12");
9430 static_assert(offsetof(VertexAttrib3f
, z
) == 16,
9431 "offset of VertexAttrib3f z should be 16");
9433 struct VertexAttrib3fvImmediate
{
9434 typedef VertexAttrib3fvImmediate ValueType
;
9435 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
9436 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9437 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9439 static uint32_t ComputeDataSize() {
9440 return static_cast<uint32_t>(sizeof(GLfloat
) * 3);
9443 static uint32_t ComputeSize() {
9444 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9447 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9449 void Init(GLuint _indx
, const GLfloat
* _values
) {
9452 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9455 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9456 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9457 const uint32_t size
= ComputeSize();
9458 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9461 gpu::CommandHeader header
;
9465 static_assert(sizeof(VertexAttrib3fvImmediate
) == 8,
9466 "size of VertexAttrib3fvImmediate should be 8");
9467 static_assert(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
9468 "offset of VertexAttrib3fvImmediate header should be 0");
9469 static_assert(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
9470 "offset of VertexAttrib3fvImmediate indx should be 4");
9472 struct VertexAttrib4f
{
9473 typedef VertexAttrib4f ValueType
;
9474 static const CommandId kCmdId
= kVertexAttrib4f
;
9475 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9476 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9478 static uint32_t ComputeSize() {
9479 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9482 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9484 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
9493 void* Set(void* cmd
,
9499 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9500 return NextCmdAddress
<ValueType
>(cmd
);
9503 gpu::CommandHeader header
;
9511 static_assert(sizeof(VertexAttrib4f
) == 24,
9512 "size of VertexAttrib4f should be 24");
9513 static_assert(offsetof(VertexAttrib4f
, header
) == 0,
9514 "offset of VertexAttrib4f header should be 0");
9515 static_assert(offsetof(VertexAttrib4f
, indx
) == 4,
9516 "offset of VertexAttrib4f indx should be 4");
9517 static_assert(offsetof(VertexAttrib4f
, x
) == 8,
9518 "offset of VertexAttrib4f x should be 8");
9519 static_assert(offsetof(VertexAttrib4f
, y
) == 12,
9520 "offset of VertexAttrib4f y should be 12");
9521 static_assert(offsetof(VertexAttrib4f
, z
) == 16,
9522 "offset of VertexAttrib4f z should be 16");
9523 static_assert(offsetof(VertexAttrib4f
, w
) == 20,
9524 "offset of VertexAttrib4f w should be 20");
9526 struct VertexAttrib4fvImmediate
{
9527 typedef VertexAttrib4fvImmediate ValueType
;
9528 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
9529 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9530 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9532 static uint32_t ComputeDataSize() {
9533 return static_cast<uint32_t>(sizeof(GLfloat
) * 4);
9536 static uint32_t ComputeSize() {
9537 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9540 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9542 void Init(GLuint _indx
, const GLfloat
* _values
) {
9545 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9548 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9549 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9550 const uint32_t size
= ComputeSize();
9551 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9554 gpu::CommandHeader header
;
9558 static_assert(sizeof(VertexAttrib4fvImmediate
) == 8,
9559 "size of VertexAttrib4fvImmediate should be 8");
9560 static_assert(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
9561 "offset of VertexAttrib4fvImmediate header should be 0");
9562 static_assert(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
9563 "offset of VertexAttrib4fvImmediate indx should be 4");
9565 struct VertexAttribI4i
{
9566 typedef VertexAttribI4i ValueType
;
9567 static const CommandId kCmdId
= kVertexAttribI4i
;
9568 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9569 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9571 static uint32_t ComputeSize() {
9572 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9575 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9577 void Init(GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9586 void* Set(void* cmd
, GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9587 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9588 return NextCmdAddress
<ValueType
>(cmd
);
9591 gpu::CommandHeader header
;
9599 static_assert(sizeof(VertexAttribI4i
) == 24,
9600 "size of VertexAttribI4i should be 24");
9601 static_assert(offsetof(VertexAttribI4i
, header
) == 0,
9602 "offset of VertexAttribI4i header should be 0");
9603 static_assert(offsetof(VertexAttribI4i
, indx
) == 4,
9604 "offset of VertexAttribI4i indx should be 4");
9605 static_assert(offsetof(VertexAttribI4i
, x
) == 8,
9606 "offset of VertexAttribI4i x should be 8");
9607 static_assert(offsetof(VertexAttribI4i
, y
) == 12,
9608 "offset of VertexAttribI4i y should be 12");
9609 static_assert(offsetof(VertexAttribI4i
, z
) == 16,
9610 "offset of VertexAttribI4i z should be 16");
9611 static_assert(offsetof(VertexAttribI4i
, w
) == 20,
9612 "offset of VertexAttribI4i w should be 20");
9614 struct VertexAttribI4ivImmediate
{
9615 typedef VertexAttribI4ivImmediate ValueType
;
9616 static const CommandId kCmdId
= kVertexAttribI4ivImmediate
;
9617 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9618 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9620 static uint32_t ComputeDataSize() {
9621 return static_cast<uint32_t>(sizeof(GLint
) * 4);
9624 static uint32_t ComputeSize() {
9625 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9628 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9630 void Init(GLuint _indx
, const GLint
* _values
) {
9633 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9636 void* Set(void* cmd
, GLuint _indx
, const GLint
* _values
) {
9637 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9638 const uint32_t size
= ComputeSize();
9639 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9642 gpu::CommandHeader header
;
9646 static_assert(sizeof(VertexAttribI4ivImmediate
) == 8,
9647 "size of VertexAttribI4ivImmediate should be 8");
9648 static_assert(offsetof(VertexAttribI4ivImmediate
, header
) == 0,
9649 "offset of VertexAttribI4ivImmediate header should be 0");
9650 static_assert(offsetof(VertexAttribI4ivImmediate
, indx
) == 4,
9651 "offset of VertexAttribI4ivImmediate indx should be 4");
9653 struct VertexAttribI4ui
{
9654 typedef VertexAttribI4ui ValueType
;
9655 static const CommandId kCmdId
= kVertexAttribI4ui
;
9656 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9657 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9659 static uint32_t ComputeSize() {
9660 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9663 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9665 void Init(GLuint _indx
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
9674 void* Set(void* cmd
,
9680 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9681 return NextCmdAddress
<ValueType
>(cmd
);
9684 gpu::CommandHeader header
;
9692 static_assert(sizeof(VertexAttribI4ui
) == 24,
9693 "size of VertexAttribI4ui should be 24");
9694 static_assert(offsetof(VertexAttribI4ui
, header
) == 0,
9695 "offset of VertexAttribI4ui header should be 0");
9696 static_assert(offsetof(VertexAttribI4ui
, indx
) == 4,
9697 "offset of VertexAttribI4ui indx should be 4");
9698 static_assert(offsetof(VertexAttribI4ui
, x
) == 8,
9699 "offset of VertexAttribI4ui x should be 8");
9700 static_assert(offsetof(VertexAttribI4ui
, y
) == 12,
9701 "offset of VertexAttribI4ui y should be 12");
9702 static_assert(offsetof(VertexAttribI4ui
, z
) == 16,
9703 "offset of VertexAttribI4ui z should be 16");
9704 static_assert(offsetof(VertexAttribI4ui
, w
) == 20,
9705 "offset of VertexAttribI4ui w should be 20");
9707 struct VertexAttribI4uivImmediate
{
9708 typedef VertexAttribI4uivImmediate ValueType
;
9709 static const CommandId kCmdId
= kVertexAttribI4uivImmediate
;
9710 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9711 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9713 static uint32_t ComputeDataSize() {
9714 return static_cast<uint32_t>(sizeof(GLuint
) * 4);
9717 static uint32_t ComputeSize() {
9718 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9721 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9723 void Init(GLuint _indx
, const GLuint
* _values
) {
9726 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9729 void* Set(void* cmd
, GLuint _indx
, const GLuint
* _values
) {
9730 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9731 const uint32_t size
= ComputeSize();
9732 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9735 gpu::CommandHeader header
;
9739 static_assert(sizeof(VertexAttribI4uivImmediate
) == 8,
9740 "size of VertexAttribI4uivImmediate should be 8");
9741 static_assert(offsetof(VertexAttribI4uivImmediate
, header
) == 0,
9742 "offset of VertexAttribI4uivImmediate header should be 0");
9743 static_assert(offsetof(VertexAttribI4uivImmediate
, indx
) == 4,
9744 "offset of VertexAttribI4uivImmediate indx should be 4");
9746 struct VertexAttribIPointer
{
9747 typedef VertexAttribIPointer ValueType
;
9748 static const CommandId kCmdId
= kVertexAttribIPointer
;
9749 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9750 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9752 static uint32_t ComputeSize() {
9753 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9756 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9758 void Init(GLuint _indx
,
9771 void* Set(void* cmd
,
9777 static_cast<ValueType
*>(cmd
)->Init(_indx
, _size
, _type
, _stride
, _offset
);
9778 return NextCmdAddress
<ValueType
>(cmd
);
9781 gpu::CommandHeader header
;
9789 static_assert(sizeof(VertexAttribIPointer
) == 24,
9790 "size of VertexAttribIPointer should be 24");
9791 static_assert(offsetof(VertexAttribIPointer
, header
) == 0,
9792 "offset of VertexAttribIPointer header should be 0");
9793 static_assert(offsetof(VertexAttribIPointer
, indx
) == 4,
9794 "offset of VertexAttribIPointer indx should be 4");
9795 static_assert(offsetof(VertexAttribIPointer
, size
) == 8,
9796 "offset of VertexAttribIPointer size should be 8");
9797 static_assert(offsetof(VertexAttribIPointer
, type
) == 12,
9798 "offset of VertexAttribIPointer type should be 12");
9799 static_assert(offsetof(VertexAttribIPointer
, stride
) == 16,
9800 "offset of VertexAttribIPointer stride should be 16");
9801 static_assert(offsetof(VertexAttribIPointer
, offset
) == 20,
9802 "offset of VertexAttribIPointer offset should be 20");
9804 struct VertexAttribPointer
{
9805 typedef VertexAttribPointer ValueType
;
9806 static const CommandId kCmdId
= kVertexAttribPointer
;
9807 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9808 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9810 static uint32_t ComputeSize() {
9811 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9814 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9816 void Init(GLuint _indx
,
9819 GLboolean _normalized
,
9826 normalized
= _normalized
;
9831 void* Set(void* cmd
,
9835 GLboolean _normalized
,
9838 static_cast<ValueType
*>(cmd
)
9839 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
9840 return NextCmdAddress
<ValueType
>(cmd
);
9843 gpu::CommandHeader header
;
9847 uint32_t normalized
;
9852 static_assert(sizeof(VertexAttribPointer
) == 28,
9853 "size of VertexAttribPointer should be 28");
9854 static_assert(offsetof(VertexAttribPointer
, header
) == 0,
9855 "offset of VertexAttribPointer header should be 0");
9856 static_assert(offsetof(VertexAttribPointer
, indx
) == 4,
9857 "offset of VertexAttribPointer indx should be 4");
9858 static_assert(offsetof(VertexAttribPointer
, size
) == 8,
9859 "offset of VertexAttribPointer size should be 8");
9860 static_assert(offsetof(VertexAttribPointer
, type
) == 12,
9861 "offset of VertexAttribPointer type should be 12");
9862 static_assert(offsetof(VertexAttribPointer
, normalized
) == 16,
9863 "offset of VertexAttribPointer normalized should be 16");
9864 static_assert(offsetof(VertexAttribPointer
, stride
) == 20,
9865 "offset of VertexAttribPointer stride should be 20");
9866 static_assert(offsetof(VertexAttribPointer
, offset
) == 24,
9867 "offset of VertexAttribPointer offset should be 24");
9870 typedef Viewport ValueType
;
9871 static const CommandId kCmdId
= kViewport
;
9872 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9873 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9875 static uint32_t ComputeSize() {
9876 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9879 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9881 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
9889 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
9890 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
9891 return NextCmdAddress
<ValueType
>(cmd
);
9894 gpu::CommandHeader header
;
9901 static_assert(sizeof(Viewport
) == 20, "size of Viewport should be 20");
9902 static_assert(offsetof(Viewport
, header
) == 0,
9903 "offset of Viewport header should be 0");
9904 static_assert(offsetof(Viewport
, x
) == 4, "offset of Viewport x should be 4");
9905 static_assert(offsetof(Viewport
, y
) == 8, "offset of Viewport y should be 8");
9906 static_assert(offsetof(Viewport
, width
) == 12,
9907 "offset of Viewport width should be 12");
9908 static_assert(offsetof(Viewport
, height
) == 16,
9909 "offset of Viewport height should be 16");
9912 typedef WaitSync ValueType
;
9913 static const CommandId kCmdId
= kWaitSync
;
9914 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9915 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9917 static uint32_t ComputeSize() {
9918 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9921 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9923 void Init(GLuint _sync
,
9926 GLuint _timeout_1
) {
9930 timeout_0
= _timeout_0
;
9931 timeout_1
= _timeout_1
;
9934 void* Set(void* cmd
,
9938 GLuint _timeout_1
) {
9939 static_cast<ValueType
*>(cmd
)->Init(_sync
, _flags
, _timeout_0
, _timeout_1
);
9940 return NextCmdAddress
<ValueType
>(cmd
);
9943 gpu::CommandHeader header
;
9950 static_assert(sizeof(WaitSync
) == 20, "size of WaitSync should be 20");
9951 static_assert(offsetof(WaitSync
, header
) == 0,
9952 "offset of WaitSync header should be 0");
9953 static_assert(offsetof(WaitSync
, sync
) == 4,
9954 "offset of WaitSync sync should be 4");
9955 static_assert(offsetof(WaitSync
, flags
) == 8,
9956 "offset of WaitSync flags should be 8");
9957 static_assert(offsetof(WaitSync
, timeout_0
) == 12,
9958 "offset of WaitSync timeout_0 should be 12");
9959 static_assert(offsetof(WaitSync
, timeout_1
) == 16,
9960 "offset of WaitSync timeout_1 should be 16");
9962 struct BlitFramebufferCHROMIUM
{
9963 typedef BlitFramebufferCHROMIUM ValueType
;
9964 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
9965 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9966 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
9968 static uint32_t ComputeSize() {
9969 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9972 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9974 void Init(GLint _srcX0
,
9997 void* Set(void* cmd
,
10008 static_cast<ValueType
*>(cmd
)->Init(_srcX0
, _srcY0
, _srcX1
, _srcY1
, _dstX0
,
10009 _dstY0
, _dstX1
, _dstY1
, _mask
, _filter
);
10010 return NextCmdAddress
<ValueType
>(cmd
);
10013 gpu::CommandHeader header
;
10026 static_assert(sizeof(BlitFramebufferCHROMIUM
) == 44,
10027 "size of BlitFramebufferCHROMIUM should be 44");
10028 static_assert(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
10029 "offset of BlitFramebufferCHROMIUM header should be 0");
10030 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
10031 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
10032 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
10033 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
10034 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
10035 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
10036 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
10037 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
10038 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
10039 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
10040 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
10041 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
10042 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
10043 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
10044 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
10045 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
10046 static_assert(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
10047 "offset of BlitFramebufferCHROMIUM mask should be 36");
10048 static_assert(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
10049 "offset of BlitFramebufferCHROMIUM filter should be 40");
10051 // GL_CHROMIUM_framebuffer_multisample
10052 struct RenderbufferStorageMultisampleCHROMIUM
{
10053 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
10054 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
10055 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10056 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10058 static uint32_t ComputeSize() {
10059 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10062 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10064 void Init(GLenum _target
,
10066 GLenum _internalformat
,
10071 samples
= _samples
;
10072 internalformat
= _internalformat
;
10077 void* Set(void* cmd
,
10080 GLenum _internalformat
,
10083 static_cast<ValueType
*>(cmd
)
10084 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10085 return NextCmdAddress
<ValueType
>(cmd
);
10088 gpu::CommandHeader header
;
10091 uint32_t internalformat
;
10096 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
10097 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10099 offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
10100 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10102 offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
10103 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10105 offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
10106 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10107 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM
,
10108 internalformat
) == 12,
10109 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10112 offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
10113 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10115 offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
10116 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10118 // GL_EXT_multisampled_render_to_texture
10119 struct RenderbufferStorageMultisampleEXT
{
10120 typedef RenderbufferStorageMultisampleEXT ValueType
;
10121 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
10122 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10123 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10125 static uint32_t ComputeSize() {
10126 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10129 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10131 void Init(GLenum _target
,
10133 GLenum _internalformat
,
10138 samples
= _samples
;
10139 internalformat
= _internalformat
;
10144 void* Set(void* cmd
,
10147 GLenum _internalformat
,
10150 static_cast<ValueType
*>(cmd
)
10151 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10152 return NextCmdAddress
<ValueType
>(cmd
);
10155 gpu::CommandHeader header
;
10158 uint32_t internalformat
;
10163 static_assert(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
10164 "size of RenderbufferStorageMultisampleEXT should be 24");
10165 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
10166 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10167 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
10168 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10170 offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
10171 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10173 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
10174 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10175 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
10176 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10178 offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
10179 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10181 struct FramebufferTexture2DMultisampleEXT
{
10182 typedef FramebufferTexture2DMultisampleEXT ValueType
;
10183 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
10184 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10185 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10187 static uint32_t ComputeSize() {
10188 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10191 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10193 void Init(GLenum _target
,
10194 GLenum _attachment
,
10197 GLsizei _samples
) {
10200 attachment
= _attachment
;
10201 textarget
= _textarget
;
10202 texture
= _texture
;
10203 samples
= _samples
;
10206 void* Set(void* cmd
,
10208 GLenum _attachment
,
10211 GLsizei _samples
) {
10212 static_cast<ValueType
*>(cmd
)
10213 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
10214 return NextCmdAddress
<ValueType
>(cmd
);
10217 gpu::CommandHeader header
;
10219 uint32_t attachment
;
10220 uint32_t textarget
;
10223 static const int32_t level
= 0;
10226 static_assert(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
10227 "size of FramebufferTexture2DMultisampleEXT should be 24");
10229 offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
10230 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10232 offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
10233 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10235 offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
10236 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10238 offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
10239 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10241 offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
10242 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10244 offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
10245 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10247 struct TexStorage2DEXT
{
10248 typedef TexStorage2DEXT ValueType
;
10249 static const CommandId kCmdId
= kTexStorage2DEXT
;
10250 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10251 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10253 static uint32_t ComputeSize() {
10254 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10257 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10259 void Init(GLenum _target
,
10261 GLenum _internalFormat
,
10267 internalFormat
= _internalFormat
;
10272 void* Set(void* cmd
,
10275 GLenum _internalFormat
,
10278 static_cast<ValueType
*>(cmd
)
10279 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
10280 return NextCmdAddress
<ValueType
>(cmd
);
10283 gpu::CommandHeader header
;
10286 uint32_t internalFormat
;
10291 static_assert(sizeof(TexStorage2DEXT
) == 24,
10292 "size of TexStorage2DEXT should be 24");
10293 static_assert(offsetof(TexStorage2DEXT
, header
) == 0,
10294 "offset of TexStorage2DEXT header should be 0");
10295 static_assert(offsetof(TexStorage2DEXT
, target
) == 4,
10296 "offset of TexStorage2DEXT target should be 4");
10297 static_assert(offsetof(TexStorage2DEXT
, levels
) == 8,
10298 "offset of TexStorage2DEXT levels should be 8");
10299 static_assert(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
10300 "offset of TexStorage2DEXT internalFormat should be 12");
10301 static_assert(offsetof(TexStorage2DEXT
, width
) == 16,
10302 "offset of TexStorage2DEXT width should be 16");
10303 static_assert(offsetof(TexStorage2DEXT
, height
) == 20,
10304 "offset of TexStorage2DEXT height should be 20");
10306 struct GenQueriesEXTImmediate
{
10307 typedef GenQueriesEXTImmediate ValueType
;
10308 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
10309 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10310 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10312 static uint32_t ComputeDataSize(GLsizei n
) {
10313 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10316 static uint32_t ComputeSize(GLsizei n
) {
10317 return static_cast<uint32_t>(sizeof(ValueType
) +
10318 ComputeDataSize(n
)); // NOLINT
10321 void SetHeader(GLsizei n
) {
10322 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10325 void Init(GLsizei _n
, GLuint
* _queries
) {
10328 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10331 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
10332 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10333 const uint32_t size
= ComputeSize(_n
);
10334 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10337 gpu::CommandHeader header
;
10341 static_assert(sizeof(GenQueriesEXTImmediate
) == 8,
10342 "size of GenQueriesEXTImmediate should be 8");
10343 static_assert(offsetof(GenQueriesEXTImmediate
, header
) == 0,
10344 "offset of GenQueriesEXTImmediate header should be 0");
10345 static_assert(offsetof(GenQueriesEXTImmediate
, n
) == 4,
10346 "offset of GenQueriesEXTImmediate n should be 4");
10348 struct DeleteQueriesEXTImmediate
{
10349 typedef DeleteQueriesEXTImmediate ValueType
;
10350 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
10351 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10352 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10354 static uint32_t ComputeDataSize(GLsizei n
) {
10355 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10358 static uint32_t ComputeSize(GLsizei n
) {
10359 return static_cast<uint32_t>(sizeof(ValueType
) +
10360 ComputeDataSize(n
)); // NOLINT
10363 void SetHeader(GLsizei n
) {
10364 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10367 void Init(GLsizei _n
, const GLuint
* _queries
) {
10370 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10373 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
10374 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10375 const uint32_t size
= ComputeSize(_n
);
10376 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10379 gpu::CommandHeader header
;
10383 static_assert(sizeof(DeleteQueriesEXTImmediate
) == 8,
10384 "size of DeleteQueriesEXTImmediate should be 8");
10385 static_assert(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
10386 "offset of DeleteQueriesEXTImmediate header should be 0");
10387 static_assert(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
10388 "offset of DeleteQueriesEXTImmediate n should be 4");
10390 struct BeginQueryEXT
{
10391 typedef BeginQueryEXT ValueType
;
10392 static const CommandId kCmdId
= kBeginQueryEXT
;
10393 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10394 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10396 static uint32_t ComputeSize() {
10397 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10400 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10402 void Init(GLenum _target
,
10404 uint32_t _sync_data_shm_id
,
10405 uint32_t _sync_data_shm_offset
) {
10409 sync_data_shm_id
= _sync_data_shm_id
;
10410 sync_data_shm_offset
= _sync_data_shm_offset
;
10413 void* Set(void* cmd
,
10416 uint32_t _sync_data_shm_id
,
10417 uint32_t _sync_data_shm_offset
) {
10418 static_cast<ValueType
*>(cmd
)
10419 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
10420 return NextCmdAddress
<ValueType
>(cmd
);
10423 gpu::CommandHeader header
;
10426 uint32_t sync_data_shm_id
;
10427 uint32_t sync_data_shm_offset
;
10430 static_assert(sizeof(BeginQueryEXT
) == 20,
10431 "size of BeginQueryEXT should be 20");
10432 static_assert(offsetof(BeginQueryEXT
, header
) == 0,
10433 "offset of BeginQueryEXT header should be 0");
10434 static_assert(offsetof(BeginQueryEXT
, target
) == 4,
10435 "offset of BeginQueryEXT target should be 4");
10436 static_assert(offsetof(BeginQueryEXT
, id
) == 8,
10437 "offset of BeginQueryEXT id should be 8");
10438 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
10439 "offset of BeginQueryEXT sync_data_shm_id should be 12");
10440 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
10441 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
10443 struct BeginTransformFeedback
{
10444 typedef BeginTransformFeedback ValueType
;
10445 static const CommandId kCmdId
= kBeginTransformFeedback
;
10446 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10447 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10449 static uint32_t ComputeSize() {
10450 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10453 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10455 void Init(GLenum _primitivemode
) {
10457 primitivemode
= _primitivemode
;
10460 void* Set(void* cmd
, GLenum _primitivemode
) {
10461 static_cast<ValueType
*>(cmd
)->Init(_primitivemode
);
10462 return NextCmdAddress
<ValueType
>(cmd
);
10465 gpu::CommandHeader header
;
10466 uint32_t primitivemode
;
10469 static_assert(sizeof(BeginTransformFeedback
) == 8,
10470 "size of BeginTransformFeedback should be 8");
10471 static_assert(offsetof(BeginTransformFeedback
, header
) == 0,
10472 "offset of BeginTransformFeedback header should be 0");
10473 static_assert(offsetof(BeginTransformFeedback
, primitivemode
) == 4,
10474 "offset of BeginTransformFeedback primitivemode should be 4");
10476 struct EndQueryEXT
{
10477 typedef EndQueryEXT ValueType
;
10478 static const CommandId kCmdId
= kEndQueryEXT
;
10479 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10480 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10482 static uint32_t ComputeSize() {
10483 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10486 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10488 void Init(GLenum _target
, GLuint _submit_count
) {
10491 submit_count
= _submit_count
;
10494 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
10495 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
10496 return NextCmdAddress
<ValueType
>(cmd
);
10499 gpu::CommandHeader header
;
10501 uint32_t submit_count
;
10504 static_assert(sizeof(EndQueryEXT
) == 12, "size of EndQueryEXT should be 12");
10505 static_assert(offsetof(EndQueryEXT
, header
) == 0,
10506 "offset of EndQueryEXT header should be 0");
10507 static_assert(offsetof(EndQueryEXT
, target
) == 4,
10508 "offset of EndQueryEXT target should be 4");
10509 static_assert(offsetof(EndQueryEXT
, submit_count
) == 8,
10510 "offset of EndQueryEXT submit_count should be 8");
10512 struct EndTransformFeedback
{
10513 typedef EndTransformFeedback ValueType
;
10514 static const CommandId kCmdId
= kEndTransformFeedback
;
10515 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10516 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10518 static uint32_t ComputeSize() {
10519 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10522 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10524 void Init() { SetHeader(); }
10526 void* Set(void* cmd
) {
10527 static_cast<ValueType
*>(cmd
)->Init();
10528 return NextCmdAddress
<ValueType
>(cmd
);
10531 gpu::CommandHeader header
;
10534 static_assert(sizeof(EndTransformFeedback
) == 4,
10535 "size of EndTransformFeedback should be 4");
10536 static_assert(offsetof(EndTransformFeedback
, header
) == 0,
10537 "offset of EndTransformFeedback header should be 0");
10539 struct InsertEventMarkerEXT
{
10540 typedef InsertEventMarkerEXT ValueType
;
10541 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
10542 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10543 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10545 static uint32_t ComputeSize() {
10546 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10549 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10551 void Init(GLuint _bucket_id
) {
10553 bucket_id
= _bucket_id
;
10556 void* Set(void* cmd
, GLuint _bucket_id
) {
10557 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10558 return NextCmdAddress
<ValueType
>(cmd
);
10561 gpu::CommandHeader header
;
10562 uint32_t bucket_id
;
10565 static_assert(sizeof(InsertEventMarkerEXT
) == 8,
10566 "size of InsertEventMarkerEXT should be 8");
10567 static_assert(offsetof(InsertEventMarkerEXT
, header
) == 0,
10568 "offset of InsertEventMarkerEXT header should be 0");
10569 static_assert(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
10570 "offset of InsertEventMarkerEXT bucket_id should be 4");
10572 struct PushGroupMarkerEXT
{
10573 typedef PushGroupMarkerEXT ValueType
;
10574 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
10575 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10576 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10578 static uint32_t ComputeSize() {
10579 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10582 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10584 void Init(GLuint _bucket_id
) {
10586 bucket_id
= _bucket_id
;
10589 void* Set(void* cmd
, GLuint _bucket_id
) {
10590 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10591 return NextCmdAddress
<ValueType
>(cmd
);
10594 gpu::CommandHeader header
;
10595 uint32_t bucket_id
;
10598 static_assert(sizeof(PushGroupMarkerEXT
) == 8,
10599 "size of PushGroupMarkerEXT should be 8");
10600 static_assert(offsetof(PushGroupMarkerEXT
, header
) == 0,
10601 "offset of PushGroupMarkerEXT header should be 0");
10602 static_assert(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
10603 "offset of PushGroupMarkerEXT bucket_id should be 4");
10605 struct PopGroupMarkerEXT
{
10606 typedef PopGroupMarkerEXT ValueType
;
10607 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
10608 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10609 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10611 static uint32_t ComputeSize() {
10612 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10615 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10617 void Init() { SetHeader(); }
10619 void* Set(void* cmd
) {
10620 static_cast<ValueType
*>(cmd
)->Init();
10621 return NextCmdAddress
<ValueType
>(cmd
);
10624 gpu::CommandHeader header
;
10627 static_assert(sizeof(PopGroupMarkerEXT
) == 4,
10628 "size of PopGroupMarkerEXT should be 4");
10629 static_assert(offsetof(PopGroupMarkerEXT
, header
) == 0,
10630 "offset of PopGroupMarkerEXT header should be 0");
10632 struct GenVertexArraysOESImmediate
{
10633 typedef GenVertexArraysOESImmediate ValueType
;
10634 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
10635 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10636 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10638 static uint32_t ComputeDataSize(GLsizei n
) {
10639 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10642 static uint32_t ComputeSize(GLsizei n
) {
10643 return static_cast<uint32_t>(sizeof(ValueType
) +
10644 ComputeDataSize(n
)); // NOLINT
10647 void SetHeader(GLsizei n
) {
10648 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10651 void Init(GLsizei _n
, GLuint
* _arrays
) {
10654 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
10657 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
10658 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
10659 const uint32_t size
= ComputeSize(_n
);
10660 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10663 gpu::CommandHeader header
;
10667 static_assert(sizeof(GenVertexArraysOESImmediate
) == 8,
10668 "size of GenVertexArraysOESImmediate should be 8");
10669 static_assert(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
10670 "offset of GenVertexArraysOESImmediate header should be 0");
10671 static_assert(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
10672 "offset of GenVertexArraysOESImmediate n should be 4");
10674 struct DeleteVertexArraysOESImmediate
{
10675 typedef DeleteVertexArraysOESImmediate ValueType
;
10676 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
10677 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10678 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10680 static uint32_t ComputeDataSize(GLsizei n
) {
10681 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10684 static uint32_t ComputeSize(GLsizei n
) {
10685 return static_cast<uint32_t>(sizeof(ValueType
) +
10686 ComputeDataSize(n
)); // NOLINT
10689 void SetHeader(GLsizei n
) {
10690 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10693 void Init(GLsizei _n
, const GLuint
* _arrays
) {
10696 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
10699 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
10700 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
10701 const uint32_t size
= ComputeSize(_n
);
10702 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10705 gpu::CommandHeader header
;
10709 static_assert(sizeof(DeleteVertexArraysOESImmediate
) == 8,
10710 "size of DeleteVertexArraysOESImmediate should be 8");
10711 static_assert(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
10712 "offset of DeleteVertexArraysOESImmediate header should be 0");
10713 static_assert(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
10714 "offset of DeleteVertexArraysOESImmediate n should be 4");
10716 struct IsVertexArrayOES
{
10717 typedef IsVertexArrayOES ValueType
;
10718 static const CommandId kCmdId
= kIsVertexArrayOES
;
10719 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10720 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10722 typedef uint32_t Result
;
10724 static uint32_t ComputeSize() {
10725 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10728 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10730 void Init(GLuint _array
,
10731 uint32_t _result_shm_id
,
10732 uint32_t _result_shm_offset
) {
10735 result_shm_id
= _result_shm_id
;
10736 result_shm_offset
= _result_shm_offset
;
10739 void* Set(void* cmd
,
10741 uint32_t _result_shm_id
,
10742 uint32_t _result_shm_offset
) {
10743 static_cast<ValueType
*>(cmd
)
10744 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
10745 return NextCmdAddress
<ValueType
>(cmd
);
10748 gpu::CommandHeader header
;
10750 uint32_t result_shm_id
;
10751 uint32_t result_shm_offset
;
10754 static_assert(sizeof(IsVertexArrayOES
) == 16,
10755 "size of IsVertexArrayOES should be 16");
10756 static_assert(offsetof(IsVertexArrayOES
, header
) == 0,
10757 "offset of IsVertexArrayOES header should be 0");
10758 static_assert(offsetof(IsVertexArrayOES
, array
) == 4,
10759 "offset of IsVertexArrayOES array should be 4");
10760 static_assert(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
10761 "offset of IsVertexArrayOES result_shm_id should be 8");
10762 static_assert(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
10763 "offset of IsVertexArrayOES result_shm_offset should be 12");
10765 struct BindVertexArrayOES
{
10766 typedef BindVertexArrayOES ValueType
;
10767 static const CommandId kCmdId
= kBindVertexArrayOES
;
10768 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10769 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10771 static uint32_t ComputeSize() {
10772 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10775 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10777 void Init(GLuint _array
) {
10782 void* Set(void* cmd
, GLuint _array
) {
10783 static_cast<ValueType
*>(cmd
)->Init(_array
);
10784 return NextCmdAddress
<ValueType
>(cmd
);
10787 gpu::CommandHeader header
;
10791 static_assert(sizeof(BindVertexArrayOES
) == 8,
10792 "size of BindVertexArrayOES should be 8");
10793 static_assert(offsetof(BindVertexArrayOES
, header
) == 0,
10794 "offset of BindVertexArrayOES header should be 0");
10795 static_assert(offsetof(BindVertexArrayOES
, array
) == 4,
10796 "offset of BindVertexArrayOES array should be 4");
10798 struct SwapBuffers
{
10799 typedef SwapBuffers ValueType
;
10800 static const CommandId kCmdId
= kSwapBuffers
;
10801 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10802 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10804 static uint32_t ComputeSize() {
10805 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10808 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10810 void Init() { SetHeader(); }
10812 void* Set(void* cmd
) {
10813 static_cast<ValueType
*>(cmd
)->Init();
10814 return NextCmdAddress
<ValueType
>(cmd
);
10817 gpu::CommandHeader header
;
10820 static_assert(sizeof(SwapBuffers
) == 4, "size of SwapBuffers should be 4");
10821 static_assert(offsetof(SwapBuffers
, header
) == 0,
10822 "offset of SwapBuffers header should be 0");
10824 struct GetMaxValueInBufferCHROMIUM
{
10825 typedef GetMaxValueInBufferCHROMIUM ValueType
;
10826 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
10827 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10828 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10830 typedef GLuint Result
;
10832 static uint32_t ComputeSize() {
10833 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10836 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10838 void Init(GLuint _buffer_id
,
10842 uint32_t _result_shm_id
,
10843 uint32_t _result_shm_offset
) {
10845 buffer_id
= _buffer_id
;
10849 result_shm_id
= _result_shm_id
;
10850 result_shm_offset
= _result_shm_offset
;
10853 void* Set(void* cmd
,
10858 uint32_t _result_shm_id
,
10859 uint32_t _result_shm_offset
) {
10860 static_cast<ValueType
*>(cmd
)->Init(_buffer_id
, _count
, _type
, _offset
,
10861 _result_shm_id
, _result_shm_offset
);
10862 return NextCmdAddress
<ValueType
>(cmd
);
10865 gpu::CommandHeader header
;
10866 uint32_t buffer_id
;
10870 uint32_t result_shm_id
;
10871 uint32_t result_shm_offset
;
10874 static_assert(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
10875 "size of GetMaxValueInBufferCHROMIUM should be 28");
10876 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
10877 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
10878 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
10879 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
10880 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
10881 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
10882 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
10883 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
10884 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
10885 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
10887 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
10888 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
10890 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
10891 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
10893 struct EnableFeatureCHROMIUM
{
10894 typedef EnableFeatureCHROMIUM ValueType
;
10895 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
10896 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10897 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10899 typedef GLint Result
;
10901 static uint32_t ComputeSize() {
10902 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10905 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10907 void Init(GLuint _bucket_id
,
10908 uint32_t _result_shm_id
,
10909 uint32_t _result_shm_offset
) {
10911 bucket_id
= _bucket_id
;
10912 result_shm_id
= _result_shm_id
;
10913 result_shm_offset
= _result_shm_offset
;
10916 void* Set(void* cmd
,
10918 uint32_t _result_shm_id
,
10919 uint32_t _result_shm_offset
) {
10920 static_cast<ValueType
*>(cmd
)
10921 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
10922 return NextCmdAddress
<ValueType
>(cmd
);
10925 gpu::CommandHeader header
;
10926 uint32_t bucket_id
;
10927 uint32_t result_shm_id
;
10928 uint32_t result_shm_offset
;
10931 static_assert(sizeof(EnableFeatureCHROMIUM
) == 16,
10932 "size of EnableFeatureCHROMIUM should be 16");
10933 static_assert(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
10934 "offset of EnableFeatureCHROMIUM header should be 0");
10935 static_assert(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
10936 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
10937 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
10938 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
10939 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
10940 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
10942 struct ResizeCHROMIUM
{
10943 typedef ResizeCHROMIUM ValueType
;
10944 static const CommandId kCmdId
= kResizeCHROMIUM
;
10945 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10946 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10948 static uint32_t ComputeSize() {
10949 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10952 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10954 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
10958 scale_factor
= _scale_factor
;
10961 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
10962 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
10963 return NextCmdAddress
<ValueType
>(cmd
);
10966 gpu::CommandHeader header
;
10969 float scale_factor
;
10972 static_assert(sizeof(ResizeCHROMIUM
) == 16,
10973 "size of ResizeCHROMIUM should be 16");
10974 static_assert(offsetof(ResizeCHROMIUM
, header
) == 0,
10975 "offset of ResizeCHROMIUM header should be 0");
10976 static_assert(offsetof(ResizeCHROMIUM
, width
) == 4,
10977 "offset of ResizeCHROMIUM width should be 4");
10978 static_assert(offsetof(ResizeCHROMIUM
, height
) == 8,
10979 "offset of ResizeCHROMIUM height should be 8");
10980 static_assert(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
10981 "offset of ResizeCHROMIUM scale_factor should be 12");
10983 struct GetRequestableExtensionsCHROMIUM
{
10984 typedef GetRequestableExtensionsCHROMIUM ValueType
;
10985 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
10986 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10987 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10989 static uint32_t ComputeSize() {
10990 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10993 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10995 void Init(uint32_t _bucket_id
) {
10997 bucket_id
= _bucket_id
;
11000 void* Set(void* cmd
, uint32_t _bucket_id
) {
11001 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11002 return NextCmdAddress
<ValueType
>(cmd
);
11005 gpu::CommandHeader header
;
11006 uint32_t bucket_id
;
11009 static_assert(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
11010 "size of GetRequestableExtensionsCHROMIUM should be 8");
11011 static_assert(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
11012 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
11014 offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
11015 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
11017 struct RequestExtensionCHROMIUM
{
11018 typedef RequestExtensionCHROMIUM ValueType
;
11019 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
11020 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11021 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11023 static uint32_t ComputeSize() {
11024 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11027 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11029 void Init(uint32_t _bucket_id
) {
11031 bucket_id
= _bucket_id
;
11034 void* Set(void* cmd
, uint32_t _bucket_id
) {
11035 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11036 return NextCmdAddress
<ValueType
>(cmd
);
11039 gpu::CommandHeader header
;
11040 uint32_t bucket_id
;
11043 static_assert(sizeof(RequestExtensionCHROMIUM
) == 8,
11044 "size of RequestExtensionCHROMIUM should be 8");
11045 static_assert(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
11046 "offset of RequestExtensionCHROMIUM header should be 0");
11047 static_assert(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
11048 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
11050 struct GetProgramInfoCHROMIUM
{
11051 typedef GetProgramInfoCHROMIUM ValueType
;
11052 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
11053 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11054 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11057 uint32_t link_status
;
11058 uint32_t num_attribs
;
11059 uint32_t num_uniforms
;
11062 static uint32_t ComputeSize() {
11063 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11066 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11068 void Init(GLuint _program
, uint32_t _bucket_id
) {
11070 program
= _program
;
11071 bucket_id
= _bucket_id
;
11074 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11075 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11076 return NextCmdAddress
<ValueType
>(cmd
);
11079 gpu::CommandHeader header
;
11081 uint32_t bucket_id
;
11084 static_assert(sizeof(GetProgramInfoCHROMIUM
) == 12,
11085 "size of GetProgramInfoCHROMIUM should be 12");
11086 static_assert(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
11087 "offset of GetProgramInfoCHROMIUM header should be 0");
11088 static_assert(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
11089 "offset of GetProgramInfoCHROMIUM program should be 4");
11090 static_assert(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
11091 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11092 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
11093 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11095 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
11096 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11098 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
11099 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11102 struct GetUniformBlocksCHROMIUM
{
11103 typedef GetUniformBlocksCHROMIUM ValueType
;
11104 static const CommandId kCmdId
= kGetUniformBlocksCHROMIUM
;
11105 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11106 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11108 typedef uint32_t Result
;
11110 static uint32_t ComputeSize() {
11111 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11114 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11116 void Init(GLuint _program
, uint32_t _bucket_id
) {
11118 program
= _program
;
11119 bucket_id
= _bucket_id
;
11122 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11123 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11124 return NextCmdAddress
<ValueType
>(cmd
);
11127 gpu::CommandHeader header
;
11129 uint32_t bucket_id
;
11132 static_assert(sizeof(GetUniformBlocksCHROMIUM
) == 12,
11133 "size of GetUniformBlocksCHROMIUM should be 12");
11134 static_assert(offsetof(GetUniformBlocksCHROMIUM
, header
) == 0,
11135 "offset of GetUniformBlocksCHROMIUM header should be 0");
11136 static_assert(offsetof(GetUniformBlocksCHROMIUM
, program
) == 4,
11137 "offset of GetUniformBlocksCHROMIUM program should be 4");
11138 static_assert(offsetof(GetUniformBlocksCHROMIUM
, bucket_id
) == 8,
11139 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11141 struct GetTransformFeedbackVaryingsCHROMIUM
{
11142 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType
;
11143 static const CommandId kCmdId
= kGetTransformFeedbackVaryingsCHROMIUM
;
11144 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11145 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11147 typedef uint32_t 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 _program
, uint32_t _bucket_id
) {
11157 program
= _program
;
11158 bucket_id
= _bucket_id
;
11161 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11162 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11163 return NextCmdAddress
<ValueType
>(cmd
);
11166 gpu::CommandHeader header
;
11168 uint32_t bucket_id
;
11171 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM
) == 12,
11172 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11174 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, header
) == 0,
11175 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11177 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, program
) == 4,
11178 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11180 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, bucket_id
) == 8,
11181 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11183 struct GetUniformsES3CHROMIUM
{
11184 typedef GetUniformsES3CHROMIUM ValueType
;
11185 static const CommandId kCmdId
= kGetUniformsES3CHROMIUM
;
11186 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11187 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11189 typedef uint32_t Result
;
11191 static uint32_t ComputeSize() {
11192 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11195 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11197 void Init(GLuint _program
, uint32_t _bucket_id
) {
11199 program
= _program
;
11200 bucket_id
= _bucket_id
;
11203 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11204 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11205 return NextCmdAddress
<ValueType
>(cmd
);
11208 gpu::CommandHeader header
;
11210 uint32_t bucket_id
;
11213 static_assert(sizeof(GetUniformsES3CHROMIUM
) == 12,
11214 "size of GetUniformsES3CHROMIUM should be 12");
11215 static_assert(offsetof(GetUniformsES3CHROMIUM
, header
) == 0,
11216 "offset of GetUniformsES3CHROMIUM header should be 0");
11217 static_assert(offsetof(GetUniformsES3CHROMIUM
, program
) == 4,
11218 "offset of GetUniformsES3CHROMIUM program should be 4");
11219 static_assert(offsetof(GetUniformsES3CHROMIUM
, bucket_id
) == 8,
11220 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
11222 struct GetTranslatedShaderSourceANGLE
{
11223 typedef GetTranslatedShaderSourceANGLE ValueType
;
11224 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
11225 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11226 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11228 static uint32_t ComputeSize() {
11229 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11232 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11234 void Init(GLuint _shader
, uint32_t _bucket_id
) {
11237 bucket_id
= _bucket_id
;
11240 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
11241 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
11242 return NextCmdAddress
<ValueType
>(cmd
);
11245 gpu::CommandHeader header
;
11247 uint32_t bucket_id
;
11250 static_assert(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
11251 "size of GetTranslatedShaderSourceANGLE should be 12");
11252 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
11253 "offset of GetTranslatedShaderSourceANGLE header should be 0");
11254 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
11255 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
11256 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
11257 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
11259 struct PostSubBufferCHROMIUM
{
11260 typedef PostSubBufferCHROMIUM ValueType
;
11261 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
11262 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11263 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11265 static uint32_t ComputeSize() {
11266 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11269 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11271 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11279 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11280 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
11281 return NextCmdAddress
<ValueType
>(cmd
);
11284 gpu::CommandHeader header
;
11291 static_assert(sizeof(PostSubBufferCHROMIUM
) == 20,
11292 "size of PostSubBufferCHROMIUM should be 20");
11293 static_assert(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
11294 "offset of PostSubBufferCHROMIUM header should be 0");
11295 static_assert(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
11296 "offset of PostSubBufferCHROMIUM x should be 4");
11297 static_assert(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
11298 "offset of PostSubBufferCHROMIUM y should be 8");
11299 static_assert(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
11300 "offset of PostSubBufferCHROMIUM width should be 12");
11301 static_assert(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
11302 "offset of PostSubBufferCHROMIUM height should be 16");
11304 struct TexImageIOSurface2DCHROMIUM
{
11305 typedef TexImageIOSurface2DCHROMIUM ValueType
;
11306 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
11307 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11308 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11310 static uint32_t ComputeSize() {
11311 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11314 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11316 void Init(GLenum _target
,
11319 GLuint _ioSurfaceId
,
11325 ioSurfaceId
= _ioSurfaceId
;
11329 void* Set(void* cmd
,
11333 GLuint _ioSurfaceId
,
11335 static_cast<ValueType
*>(cmd
)
11336 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
11337 return NextCmdAddress
<ValueType
>(cmd
);
11340 gpu::CommandHeader header
;
11344 uint32_t ioSurfaceId
;
11348 static_assert(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
11349 "size of TexImageIOSurface2DCHROMIUM should be 24");
11350 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
11351 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
11352 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
11353 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
11354 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
11355 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
11356 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
11357 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
11358 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
11359 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
11360 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
11361 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
11363 struct CopyTextureCHROMIUM
{
11364 typedef CopyTextureCHROMIUM ValueType
;
11365 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
11366 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11367 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11369 static uint32_t ComputeSize() {
11370 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11373 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11375 void Init(GLenum _target
,
11379 GLint _internalformat
,
11380 GLenum _dest_type
) {
11383 source_id
= _source_id
;
11384 dest_id
= _dest_id
;
11386 internalformat
= _internalformat
;
11387 dest_type
= _dest_type
;
11390 void* Set(void* cmd
,
11395 GLint _internalformat
,
11396 GLenum _dest_type
) {
11397 static_cast<ValueType
*>(cmd
)->Init(_target
, _source_id
, _dest_id
, _level
,
11398 _internalformat
, _dest_type
);
11399 return NextCmdAddress
<ValueType
>(cmd
);
11402 gpu::CommandHeader header
;
11404 uint32_t source_id
;
11407 int32_t internalformat
;
11408 uint32_t dest_type
;
11411 static_assert(sizeof(CopyTextureCHROMIUM
) == 28,
11412 "size of CopyTextureCHROMIUM should be 28");
11413 static_assert(offsetof(CopyTextureCHROMIUM
, header
) == 0,
11414 "offset of CopyTextureCHROMIUM header should be 0");
11415 static_assert(offsetof(CopyTextureCHROMIUM
, target
) == 4,
11416 "offset of CopyTextureCHROMIUM target should be 4");
11417 static_assert(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
11418 "offset of CopyTextureCHROMIUM source_id should be 8");
11419 static_assert(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
11420 "offset of CopyTextureCHROMIUM dest_id should be 12");
11421 static_assert(offsetof(CopyTextureCHROMIUM
, level
) == 16,
11422 "offset of CopyTextureCHROMIUM level should be 16");
11423 static_assert(offsetof(CopyTextureCHROMIUM
, internalformat
) == 20,
11424 "offset of CopyTextureCHROMIUM internalformat should be 20");
11425 static_assert(offsetof(CopyTextureCHROMIUM
, dest_type
) == 24,
11426 "offset of CopyTextureCHROMIUM dest_type should be 24");
11428 struct DrawArraysInstancedANGLE
{
11429 typedef DrawArraysInstancedANGLE ValueType
;
11430 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
11431 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11432 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11434 static uint32_t ComputeSize() {
11435 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11438 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11440 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
11445 primcount
= _primcount
;
11448 void* Set(void* cmd
,
11452 GLsizei _primcount
) {
11453 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
11454 return NextCmdAddress
<ValueType
>(cmd
);
11457 gpu::CommandHeader header
;
11464 static_assert(sizeof(DrawArraysInstancedANGLE
) == 20,
11465 "size of DrawArraysInstancedANGLE should be 20");
11466 static_assert(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
11467 "offset of DrawArraysInstancedANGLE header should be 0");
11468 static_assert(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
11469 "offset of DrawArraysInstancedANGLE mode should be 4");
11470 static_assert(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
11471 "offset of DrawArraysInstancedANGLE first should be 8");
11472 static_assert(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
11473 "offset of DrawArraysInstancedANGLE count should be 12");
11474 static_assert(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
11475 "offset of DrawArraysInstancedANGLE primcount should be 16");
11477 struct DrawElementsInstancedANGLE
{
11478 typedef DrawElementsInstancedANGLE ValueType
;
11479 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
11480 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11481 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11483 static uint32_t ComputeSize() {
11484 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11487 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11489 void Init(GLenum _mode
,
11492 GLuint _index_offset
,
11493 GLsizei _primcount
) {
11498 index_offset
= _index_offset
;
11499 primcount
= _primcount
;
11502 void* Set(void* cmd
,
11506 GLuint _index_offset
,
11507 GLsizei _primcount
) {
11508 static_cast<ValueType
*>(cmd
)
11509 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
11510 return NextCmdAddress
<ValueType
>(cmd
);
11513 gpu::CommandHeader header
;
11517 uint32_t index_offset
;
11521 static_assert(sizeof(DrawElementsInstancedANGLE
) == 24,
11522 "size of DrawElementsInstancedANGLE should be 24");
11523 static_assert(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
11524 "offset of DrawElementsInstancedANGLE header should be 0");
11525 static_assert(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
11526 "offset of DrawElementsInstancedANGLE mode should be 4");
11527 static_assert(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
11528 "offset of DrawElementsInstancedANGLE count should be 8");
11529 static_assert(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
11530 "offset of DrawElementsInstancedANGLE type should be 12");
11531 static_assert(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
11532 "offset of DrawElementsInstancedANGLE index_offset should be 16");
11533 static_assert(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
11534 "offset of DrawElementsInstancedANGLE primcount should be 20");
11536 struct VertexAttribDivisorANGLE
{
11537 typedef VertexAttribDivisorANGLE ValueType
;
11538 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
11539 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11540 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11542 static uint32_t ComputeSize() {
11543 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11546 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11548 void Init(GLuint _index
, GLuint _divisor
) {
11551 divisor
= _divisor
;
11554 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
11555 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
11556 return NextCmdAddress
<ValueType
>(cmd
);
11559 gpu::CommandHeader header
;
11564 static_assert(sizeof(VertexAttribDivisorANGLE
) == 12,
11565 "size of VertexAttribDivisorANGLE should be 12");
11566 static_assert(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
11567 "offset of VertexAttribDivisorANGLE header should be 0");
11568 static_assert(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
11569 "offset of VertexAttribDivisorANGLE index should be 4");
11570 static_assert(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
11571 "offset of VertexAttribDivisorANGLE divisor should be 8");
11573 struct ProduceTextureCHROMIUMImmediate
{
11574 typedef ProduceTextureCHROMIUMImmediate ValueType
;
11575 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
11576 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11577 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11579 static uint32_t ComputeDataSize() {
11580 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11583 static uint32_t ComputeSize() {
11584 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11587 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11589 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
11592 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11595 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
11596 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
11597 const uint32_t size
= ComputeSize();
11598 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11601 gpu::CommandHeader header
;
11605 static_assert(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
11606 "size of ProduceTextureCHROMIUMImmediate should be 8");
11607 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
11608 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
11609 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
11610 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
11612 struct ProduceTextureDirectCHROMIUMImmediate
{
11613 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
11614 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
11615 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11616 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11618 static uint32_t ComputeDataSize() {
11619 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11622 static uint32_t ComputeSize() {
11623 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11626 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11628 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
11630 texture
= _texture
;
11632 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11635 void* Set(void* cmd
,
11638 const GLbyte
* _mailbox
) {
11639 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
11640 const uint32_t size
= ComputeSize();
11641 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11644 gpu::CommandHeader header
;
11649 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
11650 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
11652 offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
11653 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
11655 offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
11656 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
11658 offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
11659 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
11661 struct ConsumeTextureCHROMIUMImmediate
{
11662 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
11663 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
11664 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11665 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11667 static uint32_t ComputeDataSize() {
11668 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11671 static uint32_t ComputeSize() {
11672 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11675 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11677 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
11680 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11683 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
11684 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
11685 const uint32_t size
= ComputeSize();
11686 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11689 gpu::CommandHeader header
;
11693 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
11694 "size of ConsumeTextureCHROMIUMImmediate should be 8");
11695 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
11696 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
11697 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
11698 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
11700 struct BindUniformLocationCHROMIUMBucket
{
11701 typedef BindUniformLocationCHROMIUMBucket ValueType
;
11702 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
11703 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11704 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11706 static uint32_t ComputeSize() {
11707 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11710 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11712 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
11714 program
= _program
;
11715 location
= _location
;
11716 name_bucket_id
= _name_bucket_id
;
11719 void* Set(void* cmd
,
11722 uint32_t _name_bucket_id
) {
11723 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
11724 return NextCmdAddress
<ValueType
>(cmd
);
11727 gpu::CommandHeader header
;
11730 uint32_t name_bucket_id
;
11733 static_assert(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
11734 "size of BindUniformLocationCHROMIUMBucket should be 16");
11735 static_assert(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
11736 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
11738 offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
11739 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
11741 offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
11742 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
11744 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
11745 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
11747 struct GenValuebuffersCHROMIUMImmediate
{
11748 typedef GenValuebuffersCHROMIUMImmediate ValueType
;
11749 static const CommandId kCmdId
= kGenValuebuffersCHROMIUMImmediate
;
11750 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11751 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11753 static uint32_t ComputeDataSize(GLsizei n
) {
11754 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11757 static uint32_t ComputeSize(GLsizei n
) {
11758 return static_cast<uint32_t>(sizeof(ValueType
) +
11759 ComputeDataSize(n
)); // NOLINT
11762 void SetHeader(GLsizei n
) {
11763 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11766 void Init(GLsizei _n
, GLuint
* _buffers
) {
11769 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
11772 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
11773 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
11774 const uint32_t size
= ComputeSize(_n
);
11775 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11778 gpu::CommandHeader header
;
11782 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate
) == 8,
11783 "size of GenValuebuffersCHROMIUMImmediate should be 8");
11784 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, header
) == 0,
11785 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
11786 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, n
) == 4,
11787 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
11789 struct DeleteValuebuffersCHROMIUMImmediate
{
11790 typedef DeleteValuebuffersCHROMIUMImmediate ValueType
;
11791 static const CommandId kCmdId
= kDeleteValuebuffersCHROMIUMImmediate
;
11792 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11793 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11795 static uint32_t ComputeDataSize(GLsizei n
) {
11796 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11799 static uint32_t ComputeSize(GLsizei n
) {
11800 return static_cast<uint32_t>(sizeof(ValueType
) +
11801 ComputeDataSize(n
)); // NOLINT
11804 void SetHeader(GLsizei n
) {
11805 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11808 void Init(GLsizei _n
, const GLuint
* _valuebuffers
) {
11811 memcpy(ImmediateDataAddress(this), _valuebuffers
, ComputeDataSize(_n
));
11814 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _valuebuffers
) {
11815 static_cast<ValueType
*>(cmd
)->Init(_n
, _valuebuffers
);
11816 const uint32_t size
= ComputeSize(_n
);
11817 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11820 gpu::CommandHeader header
;
11824 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate
) == 8,
11825 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
11827 offsetof(DeleteValuebuffersCHROMIUMImmediate
, header
) == 0,
11828 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
11829 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate
, n
) == 4,
11830 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
11832 struct IsValuebufferCHROMIUM
{
11833 typedef IsValuebufferCHROMIUM ValueType
;
11834 static const CommandId kCmdId
= kIsValuebufferCHROMIUM
;
11835 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11836 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11838 typedef uint32_t Result
;
11840 static uint32_t ComputeSize() {
11841 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11844 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11846 void Init(GLuint _valuebuffer
,
11847 uint32_t _result_shm_id
,
11848 uint32_t _result_shm_offset
) {
11850 valuebuffer
= _valuebuffer
;
11851 result_shm_id
= _result_shm_id
;
11852 result_shm_offset
= _result_shm_offset
;
11855 void* Set(void* cmd
,
11856 GLuint _valuebuffer
,
11857 uint32_t _result_shm_id
,
11858 uint32_t _result_shm_offset
) {
11859 static_cast<ValueType
*>(cmd
)
11860 ->Init(_valuebuffer
, _result_shm_id
, _result_shm_offset
);
11861 return NextCmdAddress
<ValueType
>(cmd
);
11864 gpu::CommandHeader header
;
11865 uint32_t valuebuffer
;
11866 uint32_t result_shm_id
;
11867 uint32_t result_shm_offset
;
11870 static_assert(sizeof(IsValuebufferCHROMIUM
) == 16,
11871 "size of IsValuebufferCHROMIUM should be 16");
11872 static_assert(offsetof(IsValuebufferCHROMIUM
, header
) == 0,
11873 "offset of IsValuebufferCHROMIUM header should be 0");
11874 static_assert(offsetof(IsValuebufferCHROMIUM
, valuebuffer
) == 4,
11875 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
11876 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_id
) == 8,
11877 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
11878 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_offset
) == 12,
11879 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
11881 struct BindValuebufferCHROMIUM
{
11882 typedef BindValuebufferCHROMIUM ValueType
;
11883 static const CommandId kCmdId
= kBindValuebufferCHROMIUM
;
11884 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11885 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11887 static uint32_t ComputeSize() {
11888 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11891 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11893 void Init(GLenum _target
, GLuint _valuebuffer
) {
11896 valuebuffer
= _valuebuffer
;
11899 void* Set(void* cmd
, GLenum _target
, GLuint _valuebuffer
) {
11900 static_cast<ValueType
*>(cmd
)->Init(_target
, _valuebuffer
);
11901 return NextCmdAddress
<ValueType
>(cmd
);
11904 gpu::CommandHeader header
;
11906 uint32_t valuebuffer
;
11909 static_assert(sizeof(BindValuebufferCHROMIUM
) == 12,
11910 "size of BindValuebufferCHROMIUM should be 12");
11911 static_assert(offsetof(BindValuebufferCHROMIUM
, header
) == 0,
11912 "offset of BindValuebufferCHROMIUM header should be 0");
11913 static_assert(offsetof(BindValuebufferCHROMIUM
, target
) == 4,
11914 "offset of BindValuebufferCHROMIUM target should be 4");
11915 static_assert(offsetof(BindValuebufferCHROMIUM
, valuebuffer
) == 8,
11916 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
11918 struct SubscribeValueCHROMIUM
{
11919 typedef SubscribeValueCHROMIUM ValueType
;
11920 static const CommandId kCmdId
= kSubscribeValueCHROMIUM
;
11921 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11922 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11924 static uint32_t ComputeSize() {
11925 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11928 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11930 void Init(GLenum _target
, GLenum _subscription
) {
11933 subscription
= _subscription
;
11936 void* Set(void* cmd
, GLenum _target
, GLenum _subscription
) {
11937 static_cast<ValueType
*>(cmd
)->Init(_target
, _subscription
);
11938 return NextCmdAddress
<ValueType
>(cmd
);
11941 gpu::CommandHeader header
;
11943 uint32_t subscription
;
11946 static_assert(sizeof(SubscribeValueCHROMIUM
) == 12,
11947 "size of SubscribeValueCHROMIUM should be 12");
11948 static_assert(offsetof(SubscribeValueCHROMIUM
, header
) == 0,
11949 "offset of SubscribeValueCHROMIUM header should be 0");
11950 static_assert(offsetof(SubscribeValueCHROMIUM
, target
) == 4,
11951 "offset of SubscribeValueCHROMIUM target should be 4");
11952 static_assert(offsetof(SubscribeValueCHROMIUM
, subscription
) == 8,
11953 "offset of SubscribeValueCHROMIUM subscription should be 8");
11955 struct PopulateSubscribedValuesCHROMIUM
{
11956 typedef PopulateSubscribedValuesCHROMIUM ValueType
;
11957 static const CommandId kCmdId
= kPopulateSubscribedValuesCHROMIUM
;
11958 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11959 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11961 static uint32_t ComputeSize() {
11962 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11965 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11967 void Init(GLenum _target
) {
11972 void* Set(void* cmd
, GLenum _target
) {
11973 static_cast<ValueType
*>(cmd
)->Init(_target
);
11974 return NextCmdAddress
<ValueType
>(cmd
);
11977 gpu::CommandHeader header
;
11981 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM
) == 8,
11982 "size of PopulateSubscribedValuesCHROMIUM should be 8");
11983 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, header
) == 0,
11984 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
11985 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, target
) == 4,
11986 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
11988 struct UniformValuebufferCHROMIUM
{
11989 typedef UniformValuebufferCHROMIUM ValueType
;
11990 static const CommandId kCmdId
= kUniformValuebufferCHROMIUM
;
11991 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11992 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11994 static uint32_t ComputeSize() {
11995 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11998 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12000 void Init(GLint _location
, GLenum _target
, GLenum _subscription
) {
12002 location
= _location
;
12004 subscription
= _subscription
;
12007 void* Set(void* cmd
, GLint _location
, GLenum _target
, GLenum _subscription
) {
12008 static_cast<ValueType
*>(cmd
)->Init(_location
, _target
, _subscription
);
12009 return NextCmdAddress
<ValueType
>(cmd
);
12012 gpu::CommandHeader header
;
12015 uint32_t subscription
;
12018 static_assert(sizeof(UniformValuebufferCHROMIUM
) == 16,
12019 "size of UniformValuebufferCHROMIUM should be 16");
12020 static_assert(offsetof(UniformValuebufferCHROMIUM
, header
) == 0,
12021 "offset of UniformValuebufferCHROMIUM header should be 0");
12022 static_assert(offsetof(UniformValuebufferCHROMIUM
, location
) == 4,
12023 "offset of UniformValuebufferCHROMIUM location should be 4");
12024 static_assert(offsetof(UniformValuebufferCHROMIUM
, target
) == 8,
12025 "offset of UniformValuebufferCHROMIUM target should be 8");
12026 static_assert(offsetof(UniformValuebufferCHROMIUM
, subscription
) == 12,
12027 "offset of UniformValuebufferCHROMIUM subscription should be 12");
12029 struct BindTexImage2DCHROMIUM
{
12030 typedef BindTexImage2DCHROMIUM ValueType
;
12031 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
12032 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12033 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12035 static uint32_t ComputeSize() {
12036 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12039 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12041 void Init(GLenum _target
, GLint _imageId
) {
12044 imageId
= _imageId
;
12047 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12048 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12049 return NextCmdAddress
<ValueType
>(cmd
);
12052 gpu::CommandHeader header
;
12057 static_assert(sizeof(BindTexImage2DCHROMIUM
) == 12,
12058 "size of BindTexImage2DCHROMIUM should be 12");
12059 static_assert(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
12060 "offset of BindTexImage2DCHROMIUM header should be 0");
12061 static_assert(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
12062 "offset of BindTexImage2DCHROMIUM target should be 4");
12063 static_assert(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
12064 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12066 struct ReleaseTexImage2DCHROMIUM
{
12067 typedef ReleaseTexImage2DCHROMIUM ValueType
;
12068 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
12069 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12070 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12072 static uint32_t ComputeSize() {
12073 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12076 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12078 void Init(GLenum _target
, GLint _imageId
) {
12081 imageId
= _imageId
;
12084 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12085 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12086 return NextCmdAddress
<ValueType
>(cmd
);
12089 gpu::CommandHeader header
;
12094 static_assert(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
12095 "size of ReleaseTexImage2DCHROMIUM should be 12");
12096 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
12097 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12098 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
12099 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12100 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
12101 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12103 struct TraceBeginCHROMIUM
{
12104 typedef TraceBeginCHROMIUM ValueType
;
12105 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
12106 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12107 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12109 static uint32_t ComputeSize() {
12110 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12113 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12115 void Init(GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12117 category_bucket_id
= _category_bucket_id
;
12118 name_bucket_id
= _name_bucket_id
;
12121 void* Set(void* cmd
, GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12122 static_cast<ValueType
*>(cmd
)->Init(_category_bucket_id
, _name_bucket_id
);
12123 return NextCmdAddress
<ValueType
>(cmd
);
12126 gpu::CommandHeader header
;
12127 uint32_t category_bucket_id
;
12128 uint32_t name_bucket_id
;
12131 static_assert(sizeof(TraceBeginCHROMIUM
) == 12,
12132 "size of TraceBeginCHROMIUM should be 12");
12133 static_assert(offsetof(TraceBeginCHROMIUM
, header
) == 0,
12134 "offset of TraceBeginCHROMIUM header should be 0");
12135 static_assert(offsetof(TraceBeginCHROMIUM
, category_bucket_id
) == 4,
12136 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
12137 static_assert(offsetof(TraceBeginCHROMIUM
, name_bucket_id
) == 8,
12138 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
12140 struct TraceEndCHROMIUM
{
12141 typedef TraceEndCHROMIUM ValueType
;
12142 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
12143 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12144 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12146 static uint32_t ComputeSize() {
12147 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12150 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12152 void Init() { SetHeader(); }
12154 void* Set(void* cmd
) {
12155 static_cast<ValueType
*>(cmd
)->Init();
12156 return NextCmdAddress
<ValueType
>(cmd
);
12159 gpu::CommandHeader header
;
12162 static_assert(sizeof(TraceEndCHROMIUM
) == 4,
12163 "size of TraceEndCHROMIUM should be 4");
12164 static_assert(offsetof(TraceEndCHROMIUM
, header
) == 0,
12165 "offset of TraceEndCHROMIUM header should be 0");
12167 struct AsyncTexSubImage2DCHROMIUM
{
12168 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
12169 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
12170 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12171 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12173 static uint32_t ComputeSize() {
12174 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12177 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12179 void Init(GLenum _target
,
12187 uint32_t _data_shm_id
,
12188 uint32_t _data_shm_offset
,
12189 uint32_t _async_upload_token
,
12190 uint32_t _sync_data_shm_id
,
12191 uint32_t _sync_data_shm_offset
) {
12195 xoffset
= _xoffset
;
12196 yoffset
= _yoffset
;
12201 data_shm_id
= _data_shm_id
;
12202 data_shm_offset
= _data_shm_offset
;
12203 async_upload_token
= _async_upload_token
;
12204 sync_data_shm_id
= _sync_data_shm_id
;
12205 sync_data_shm_offset
= _sync_data_shm_offset
;
12208 void* Set(void* cmd
,
12217 uint32_t _data_shm_id
,
12218 uint32_t _data_shm_offset
,
12219 uint32_t _async_upload_token
,
12220 uint32_t _sync_data_shm_id
,
12221 uint32_t _sync_data_shm_offset
) {
12222 static_cast<ValueType
*>(cmd
)
12223 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
12224 _type
, _data_shm_id
, _data_shm_offset
, _async_upload_token
,
12225 _sync_data_shm_id
, _sync_data_shm_offset
);
12226 return NextCmdAddress
<ValueType
>(cmd
);
12229 gpu::CommandHeader header
;
12238 uint32_t data_shm_id
;
12239 uint32_t data_shm_offset
;
12240 uint32_t async_upload_token
;
12241 uint32_t sync_data_shm_id
;
12242 uint32_t sync_data_shm_offset
;
12245 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
12246 "size of AsyncTexSubImage2DCHROMIUM should be 56");
12247 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
12248 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
12249 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
12250 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
12251 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
12252 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
12253 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
12254 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
12255 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
12256 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
12257 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
12258 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
12259 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
12260 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
12261 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
12262 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
12263 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
12264 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
12265 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
12266 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
12268 offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
12269 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
12271 offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
12272 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
12274 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
12275 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
12277 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
12278 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
12280 struct AsyncTexImage2DCHROMIUM
{
12281 typedef AsyncTexImage2DCHROMIUM ValueType
;
12282 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
12283 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12284 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12286 static uint32_t ComputeSize() {
12287 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12290 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12292 void Init(GLenum _target
,
12294 GLint _internalformat
,
12299 uint32_t _pixels_shm_id
,
12300 uint32_t _pixels_shm_offset
,
12301 uint32_t _async_upload_token
,
12302 uint32_t _sync_data_shm_id
,
12303 uint32_t _sync_data_shm_offset
) {
12307 internalformat
= _internalformat
;
12312 pixels_shm_id
= _pixels_shm_id
;
12313 pixels_shm_offset
= _pixels_shm_offset
;
12314 async_upload_token
= _async_upload_token
;
12315 sync_data_shm_id
= _sync_data_shm_id
;
12316 sync_data_shm_offset
= _sync_data_shm_offset
;
12319 void* Set(void* cmd
,
12322 GLint _internalformat
,
12327 uint32_t _pixels_shm_id
,
12328 uint32_t _pixels_shm_offset
,
12329 uint32_t _async_upload_token
,
12330 uint32_t _sync_data_shm_id
,
12331 uint32_t _sync_data_shm_offset
) {
12332 static_cast<ValueType
*>(cmd
)
12333 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _format
,
12334 _type
, _pixels_shm_id
, _pixels_shm_offset
, _async_upload_token
,
12335 _sync_data_shm_id
, _sync_data_shm_offset
);
12336 return NextCmdAddress
<ValueType
>(cmd
);
12339 gpu::CommandHeader header
;
12342 int32_t internalformat
;
12347 uint32_t pixels_shm_id
;
12348 uint32_t pixels_shm_offset
;
12349 uint32_t async_upload_token
;
12350 uint32_t sync_data_shm_id
;
12351 uint32_t sync_data_shm_offset
;
12352 static const int32_t border
= 0;
12355 static_assert(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
12356 "size of AsyncTexImage2DCHROMIUM should be 52");
12357 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
12358 "offset of AsyncTexImage2DCHROMIUM header should be 0");
12359 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
12360 "offset of AsyncTexImage2DCHROMIUM target should be 4");
12361 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
12362 "offset of AsyncTexImage2DCHROMIUM level should be 8");
12363 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
12364 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
12365 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
12366 "offset of AsyncTexImage2DCHROMIUM width should be 16");
12367 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
12368 "offset of AsyncTexImage2DCHROMIUM height should be 20");
12369 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
12370 "offset of AsyncTexImage2DCHROMIUM format should be 24");
12371 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
12372 "offset of AsyncTexImage2DCHROMIUM type should be 28");
12373 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
12374 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
12376 offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
12377 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
12379 offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
12380 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
12382 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
12383 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
12385 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
12386 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
12388 struct WaitAsyncTexImage2DCHROMIUM
{
12389 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
12390 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
12391 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12392 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12394 static uint32_t ComputeSize() {
12395 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12398 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12400 void Init(GLenum _target
) {
12405 void* Set(void* cmd
, GLenum _target
) {
12406 static_cast<ValueType
*>(cmd
)->Init(_target
);
12407 return NextCmdAddress
<ValueType
>(cmd
);
12410 gpu::CommandHeader header
;
12414 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
12415 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
12416 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
12417 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
12418 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
12419 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
12421 struct WaitAllAsyncTexImage2DCHROMIUM
{
12422 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
12423 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
12424 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12425 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12427 static uint32_t ComputeSize() {
12428 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12431 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12433 void Init() { SetHeader(); }
12435 void* Set(void* cmd
) {
12436 static_cast<ValueType
*>(cmd
)->Init();
12437 return NextCmdAddress
<ValueType
>(cmd
);
12440 gpu::CommandHeader header
;
12443 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
12444 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
12445 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
12446 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
12448 struct DiscardFramebufferEXTImmediate
{
12449 typedef DiscardFramebufferEXTImmediate ValueType
;
12450 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
12451 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12452 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12454 static uint32_t ComputeDataSize(GLsizei count
) {
12455 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
12458 static uint32_t ComputeSize(GLsizei count
) {
12459 return static_cast<uint32_t>(sizeof(ValueType
) +
12460 ComputeDataSize(count
)); // NOLINT
12463 void SetHeader(GLsizei count
) {
12464 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
12467 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
12471 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
12474 void* Set(void* cmd
,
12477 const GLenum
* _attachments
) {
12478 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
12479 const uint32_t size
= ComputeSize(_count
);
12480 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12483 gpu::CommandHeader header
;
12488 static_assert(sizeof(DiscardFramebufferEXTImmediate
) == 12,
12489 "size of DiscardFramebufferEXTImmediate should be 12");
12490 static_assert(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
12491 "offset of DiscardFramebufferEXTImmediate header should be 0");
12492 static_assert(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
12493 "offset of DiscardFramebufferEXTImmediate target should be 4");
12494 static_assert(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
12495 "offset of DiscardFramebufferEXTImmediate count should be 8");
12497 struct LoseContextCHROMIUM
{
12498 typedef LoseContextCHROMIUM ValueType
;
12499 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
12500 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12501 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12503 static uint32_t ComputeSize() {
12504 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12507 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12509 void Init(GLenum _current
, GLenum _other
) {
12511 current
= _current
;
12515 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
12516 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
12517 return NextCmdAddress
<ValueType
>(cmd
);
12520 gpu::CommandHeader header
;
12525 static_assert(sizeof(LoseContextCHROMIUM
) == 12,
12526 "size of LoseContextCHROMIUM should be 12");
12527 static_assert(offsetof(LoseContextCHROMIUM
, header
) == 0,
12528 "offset of LoseContextCHROMIUM header should be 0");
12529 static_assert(offsetof(LoseContextCHROMIUM
, current
) == 4,
12530 "offset of LoseContextCHROMIUM current should be 4");
12531 static_assert(offsetof(LoseContextCHROMIUM
, other
) == 8,
12532 "offset of LoseContextCHROMIUM other should be 8");
12534 struct WaitSyncPointCHROMIUM
{
12535 typedef WaitSyncPointCHROMIUM ValueType
;
12536 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
12537 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12538 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12540 static uint32_t ComputeSize() {
12541 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12544 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12546 void Init(GLuint _sync_point
) {
12548 sync_point
= _sync_point
;
12551 void* Set(void* cmd
, GLuint _sync_point
) {
12552 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
12553 return NextCmdAddress
<ValueType
>(cmd
);
12556 gpu::CommandHeader header
;
12557 uint32_t sync_point
;
12560 static_assert(sizeof(WaitSyncPointCHROMIUM
) == 8,
12561 "size of WaitSyncPointCHROMIUM should be 8");
12562 static_assert(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
12563 "offset of WaitSyncPointCHROMIUM header should be 0");
12564 static_assert(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
12565 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
12567 struct DrawBuffersEXTImmediate
{
12568 typedef DrawBuffersEXTImmediate ValueType
;
12569 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
12570 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12571 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12573 static uint32_t ComputeDataSize(GLsizei count
) {
12574 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
12577 static uint32_t ComputeSize(GLsizei count
) {
12578 return static_cast<uint32_t>(sizeof(ValueType
) +
12579 ComputeDataSize(count
)); // NOLINT
12582 void SetHeader(GLsizei count
) {
12583 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
12586 void Init(GLsizei _count
, const GLenum
* _bufs
) {
12589 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
12592 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
12593 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
12594 const uint32_t size
= ComputeSize(_count
);
12595 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12598 gpu::CommandHeader header
;
12602 static_assert(sizeof(DrawBuffersEXTImmediate
) == 8,
12603 "size of DrawBuffersEXTImmediate should be 8");
12604 static_assert(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
12605 "offset of DrawBuffersEXTImmediate header should be 0");
12606 static_assert(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
12607 "offset of DrawBuffersEXTImmediate count should be 4");
12609 struct DiscardBackbufferCHROMIUM
{
12610 typedef DiscardBackbufferCHROMIUM ValueType
;
12611 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
12612 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12613 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12615 static uint32_t ComputeSize() {
12616 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12619 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12621 void Init() { SetHeader(); }
12623 void* Set(void* cmd
) {
12624 static_cast<ValueType
*>(cmd
)->Init();
12625 return NextCmdAddress
<ValueType
>(cmd
);
12628 gpu::CommandHeader header
;
12631 static_assert(sizeof(DiscardBackbufferCHROMIUM
) == 4,
12632 "size of DiscardBackbufferCHROMIUM should be 4");
12633 static_assert(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
12634 "offset of DiscardBackbufferCHROMIUM header should be 0");
12636 struct ScheduleOverlayPlaneCHROMIUM
{
12637 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
12638 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
12639 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12640 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12642 static uint32_t ComputeSize() {
12643 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12646 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12648 void Init(GLint _plane_z_order
,
12649 GLenum _plane_transform
,
12650 GLuint _overlay_texture_id
,
12653 GLint _bounds_width
,
12654 GLint _bounds_height
,
12658 GLfloat _uv_height
) {
12660 plane_z_order
= _plane_z_order
;
12661 plane_transform
= _plane_transform
;
12662 overlay_texture_id
= _overlay_texture_id
;
12663 bounds_x
= _bounds_x
;
12664 bounds_y
= _bounds_y
;
12665 bounds_width
= _bounds_width
;
12666 bounds_height
= _bounds_height
;
12669 uv_width
= _uv_width
;
12670 uv_height
= _uv_height
;
12673 void* Set(void* cmd
,
12674 GLint _plane_z_order
,
12675 GLenum _plane_transform
,
12676 GLuint _overlay_texture_id
,
12679 GLint _bounds_width
,
12680 GLint _bounds_height
,
12684 GLfloat _uv_height
) {
12685 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
, _plane_transform
,
12686 _overlay_texture_id
, _bounds_x
,
12687 _bounds_y
, _bounds_width
, _bounds_height
,
12688 _uv_x
, _uv_y
, _uv_width
, _uv_height
);
12689 return NextCmdAddress
<ValueType
>(cmd
);
12692 gpu::CommandHeader header
;
12693 int32_t plane_z_order
;
12694 uint32_t plane_transform
;
12695 uint32_t overlay_texture_id
;
12698 int32_t bounds_width
;
12699 int32_t bounds_height
;
12706 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
12707 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
12708 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
12709 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
12711 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
12712 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
12714 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
12715 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
12717 offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
12718 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
12719 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
12720 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
12721 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
12722 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
12724 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
12725 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
12727 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
12728 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
12729 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
12730 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
12731 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
12732 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
12733 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
12734 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
12735 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
12736 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
12738 struct SwapInterval
{
12739 typedef SwapInterval ValueType
;
12740 static const CommandId kCmdId
= kSwapInterval
;
12741 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12742 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12744 static uint32_t ComputeSize() {
12745 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12748 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12750 void Init(GLint _interval
) {
12752 interval
= _interval
;
12755 void* Set(void* cmd
, GLint _interval
) {
12756 static_cast<ValueType
*>(cmd
)->Init(_interval
);
12757 return NextCmdAddress
<ValueType
>(cmd
);
12760 gpu::CommandHeader header
;
12764 static_assert(sizeof(SwapInterval
) == 8, "size of SwapInterval should be 8");
12765 static_assert(offsetof(SwapInterval
, header
) == 0,
12766 "offset of SwapInterval header should be 0");
12767 static_assert(offsetof(SwapInterval
, interval
) == 4,
12768 "offset of SwapInterval interval should be 4");
12770 struct MatrixLoadfCHROMIUMImmediate
{
12771 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
12772 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
12773 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12774 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12776 static uint32_t ComputeDataSize() {
12777 return static_cast<uint32_t>(sizeof(GLfloat
) * 16);
12780 static uint32_t ComputeSize() {
12781 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12784 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12786 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
12788 matrixMode
= _matrixMode
;
12789 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
12792 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
12793 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
12794 const uint32_t size
= ComputeSize();
12795 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12798 gpu::CommandHeader header
;
12799 uint32_t matrixMode
;
12802 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
12803 "size of MatrixLoadfCHROMIUMImmediate should be 8");
12804 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
12805 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
12806 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
12807 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
12809 struct MatrixLoadIdentityCHROMIUM
{
12810 typedef MatrixLoadIdentityCHROMIUM ValueType
;
12811 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
12812 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12813 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12815 static uint32_t ComputeSize() {
12816 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12819 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12821 void Init(GLenum _matrixMode
) {
12823 matrixMode
= _matrixMode
;
12826 void* Set(void* cmd
, GLenum _matrixMode
) {
12827 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
12828 return NextCmdAddress
<ValueType
>(cmd
);
12831 gpu::CommandHeader header
;
12832 uint32_t matrixMode
;
12835 static_assert(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
12836 "size of MatrixLoadIdentityCHROMIUM should be 8");
12837 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
12838 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
12839 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
12840 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
12842 struct BlendBarrierKHR
{
12843 typedef BlendBarrierKHR ValueType
;
12844 static const CommandId kCmdId
= kBlendBarrierKHR
;
12845 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12846 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12848 static uint32_t ComputeSize() {
12849 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12852 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12854 void Init() { SetHeader(); }
12856 void* Set(void* cmd
) {
12857 static_cast<ValueType
*>(cmd
)->Init();
12858 return NextCmdAddress
<ValueType
>(cmd
);
12861 gpu::CommandHeader header
;
12864 static_assert(sizeof(BlendBarrierKHR
) == 4,
12865 "size of BlendBarrierKHR should be 4");
12866 static_assert(offsetof(BlendBarrierKHR
, header
) == 0,
12867 "offset of BlendBarrierKHR header should be 0");
12869 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_