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");
4663 struct GetTexParameterfv
{
4664 typedef GetTexParameterfv ValueType
;
4665 static const CommandId kCmdId
= kGetTexParameterfv
;
4666 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4667 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4669 typedef SizedResult
<GLfloat
> Result
;
4671 static uint32_t ComputeSize() {
4672 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4675 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4677 void Init(GLenum _target
,
4679 uint32_t _params_shm_id
,
4680 uint32_t _params_shm_offset
) {
4684 params_shm_id
= _params_shm_id
;
4685 params_shm_offset
= _params_shm_offset
;
4688 void* Set(void* cmd
,
4691 uint32_t _params_shm_id
,
4692 uint32_t _params_shm_offset
) {
4693 static_cast<ValueType
*>(cmd
)
4694 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4695 return NextCmdAddress
<ValueType
>(cmd
);
4698 gpu::CommandHeader header
;
4701 uint32_t params_shm_id
;
4702 uint32_t params_shm_offset
;
4705 static_assert(sizeof(GetTexParameterfv
) == 20,
4706 "size of GetTexParameterfv should be 20");
4707 static_assert(offsetof(GetTexParameterfv
, header
) == 0,
4708 "offset of GetTexParameterfv header should be 0");
4709 static_assert(offsetof(GetTexParameterfv
, target
) == 4,
4710 "offset of GetTexParameterfv target should be 4");
4711 static_assert(offsetof(GetTexParameterfv
, pname
) == 8,
4712 "offset of GetTexParameterfv pname should be 8");
4713 static_assert(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
4714 "offset of GetTexParameterfv params_shm_id should be 12");
4715 static_assert(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
4716 "offset of GetTexParameterfv params_shm_offset should be 16");
4718 struct GetTexParameteriv
{
4719 typedef GetTexParameteriv ValueType
;
4720 static const CommandId kCmdId
= kGetTexParameteriv
;
4721 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4722 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4724 typedef SizedResult
<GLint
> Result
;
4726 static uint32_t ComputeSize() {
4727 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4730 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4732 void Init(GLenum _target
,
4734 uint32_t _params_shm_id
,
4735 uint32_t _params_shm_offset
) {
4739 params_shm_id
= _params_shm_id
;
4740 params_shm_offset
= _params_shm_offset
;
4743 void* Set(void* cmd
,
4746 uint32_t _params_shm_id
,
4747 uint32_t _params_shm_offset
) {
4748 static_cast<ValueType
*>(cmd
)
4749 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4750 return NextCmdAddress
<ValueType
>(cmd
);
4753 gpu::CommandHeader header
;
4756 uint32_t params_shm_id
;
4757 uint32_t params_shm_offset
;
4760 static_assert(sizeof(GetTexParameteriv
) == 20,
4761 "size of GetTexParameteriv should be 20");
4762 static_assert(offsetof(GetTexParameteriv
, header
) == 0,
4763 "offset of GetTexParameteriv header should be 0");
4764 static_assert(offsetof(GetTexParameteriv
, target
) == 4,
4765 "offset of GetTexParameteriv target should be 4");
4766 static_assert(offsetof(GetTexParameteriv
, pname
) == 8,
4767 "offset of GetTexParameteriv pname should be 8");
4768 static_assert(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
4769 "offset of GetTexParameteriv params_shm_id should be 12");
4770 static_assert(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
4771 "offset of GetTexParameteriv params_shm_offset should be 16");
4773 struct GetTransformFeedbackVarying
{
4774 typedef GetTransformFeedbackVarying ValueType
;
4775 static const CommandId kCmdId
= kGetTransformFeedbackVarying
;
4776 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4777 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4785 static uint32_t ComputeSize() {
4786 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4789 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4791 void Init(GLuint _program
,
4793 uint32_t _name_bucket_id
,
4794 uint32_t _result_shm_id
,
4795 uint32_t _result_shm_offset
) {
4799 name_bucket_id
= _name_bucket_id
;
4800 result_shm_id
= _result_shm_id
;
4801 result_shm_offset
= _result_shm_offset
;
4804 void* Set(void* cmd
,
4807 uint32_t _name_bucket_id
,
4808 uint32_t _result_shm_id
,
4809 uint32_t _result_shm_offset
) {
4810 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
4811 _result_shm_id
, _result_shm_offset
);
4812 return NextCmdAddress
<ValueType
>(cmd
);
4815 gpu::CommandHeader header
;
4818 uint32_t name_bucket_id
;
4819 uint32_t result_shm_id
;
4820 uint32_t result_shm_offset
;
4823 static_assert(sizeof(GetTransformFeedbackVarying
) == 24,
4824 "size of GetTransformFeedbackVarying should be 24");
4825 static_assert(offsetof(GetTransformFeedbackVarying
, header
) == 0,
4826 "offset of GetTransformFeedbackVarying header should be 0");
4827 static_assert(offsetof(GetTransformFeedbackVarying
, program
) == 4,
4828 "offset of GetTransformFeedbackVarying program should be 4");
4829 static_assert(offsetof(GetTransformFeedbackVarying
, index
) == 8,
4830 "offset of GetTransformFeedbackVarying index should be 8");
4832 offsetof(GetTransformFeedbackVarying
, name_bucket_id
) == 12,
4833 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
4835 offsetof(GetTransformFeedbackVarying
, result_shm_id
) == 16,
4836 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
4838 offsetof(GetTransformFeedbackVarying
, result_shm_offset
) == 20,
4839 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
4840 static_assert(offsetof(GetTransformFeedbackVarying::Result
, success
) == 0,
4841 "offset of GetTransformFeedbackVarying Result success should be "
4843 static_assert(offsetof(GetTransformFeedbackVarying::Result
, size
) == 4,
4844 "offset of GetTransformFeedbackVarying Result size should be "
4846 static_assert(offsetof(GetTransformFeedbackVarying::Result
, type
) == 8,
4847 "offset of GetTransformFeedbackVarying Result type should be "
4850 struct GetUniformBlockIndex
{
4851 typedef GetUniformBlockIndex ValueType
;
4852 static const CommandId kCmdId
= kGetUniformBlockIndex
;
4853 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4854 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4856 typedef GLuint Result
;
4858 static uint32_t ComputeSize() {
4859 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4862 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4864 void Init(GLuint _program
,
4865 uint32_t _name_bucket_id
,
4866 uint32_t _index_shm_id
,
4867 uint32_t _index_shm_offset
) {
4870 name_bucket_id
= _name_bucket_id
;
4871 index_shm_id
= _index_shm_id
;
4872 index_shm_offset
= _index_shm_offset
;
4875 void* Set(void* cmd
,
4877 uint32_t _name_bucket_id
,
4878 uint32_t _index_shm_id
,
4879 uint32_t _index_shm_offset
) {
4880 static_cast<ValueType
*>(cmd
)
4881 ->Init(_program
, _name_bucket_id
, _index_shm_id
, _index_shm_offset
);
4882 return NextCmdAddress
<ValueType
>(cmd
);
4885 gpu::CommandHeader header
;
4887 uint32_t name_bucket_id
;
4888 uint32_t index_shm_id
;
4889 uint32_t index_shm_offset
;
4892 static_assert(sizeof(GetUniformBlockIndex
) == 20,
4893 "size of GetUniformBlockIndex should be 20");
4894 static_assert(offsetof(GetUniformBlockIndex
, header
) == 0,
4895 "offset of GetUniformBlockIndex header should be 0");
4896 static_assert(offsetof(GetUniformBlockIndex
, program
) == 4,
4897 "offset of GetUniformBlockIndex program should be 4");
4898 static_assert(offsetof(GetUniformBlockIndex
, name_bucket_id
) == 8,
4899 "offset of GetUniformBlockIndex name_bucket_id should be 8");
4900 static_assert(offsetof(GetUniformBlockIndex
, index_shm_id
) == 12,
4901 "offset of GetUniformBlockIndex index_shm_id should be 12");
4902 static_assert(offsetof(GetUniformBlockIndex
, index_shm_offset
) == 16,
4903 "offset of GetUniformBlockIndex index_shm_offset should be 16");
4905 struct GetUniformfv
{
4906 typedef GetUniformfv ValueType
;
4907 static const CommandId kCmdId
= kGetUniformfv
;
4908 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4909 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4911 typedef SizedResult
<GLfloat
> Result
;
4913 static uint32_t ComputeSize() {
4914 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4917 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4919 void Init(GLuint _program
,
4921 uint32_t _params_shm_id
,
4922 uint32_t _params_shm_offset
) {
4925 location
= _location
;
4926 params_shm_id
= _params_shm_id
;
4927 params_shm_offset
= _params_shm_offset
;
4930 void* Set(void* cmd
,
4933 uint32_t _params_shm_id
,
4934 uint32_t _params_shm_offset
) {
4935 static_cast<ValueType
*>(cmd
)
4936 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
4937 return NextCmdAddress
<ValueType
>(cmd
);
4940 gpu::CommandHeader header
;
4943 uint32_t params_shm_id
;
4944 uint32_t params_shm_offset
;
4947 static_assert(sizeof(GetUniformfv
) == 20, "size of GetUniformfv should be 20");
4948 static_assert(offsetof(GetUniformfv
, header
) == 0,
4949 "offset of GetUniformfv header should be 0");
4950 static_assert(offsetof(GetUniformfv
, program
) == 4,
4951 "offset of GetUniformfv program should be 4");
4952 static_assert(offsetof(GetUniformfv
, location
) == 8,
4953 "offset of GetUniformfv location should be 8");
4954 static_assert(offsetof(GetUniformfv
, params_shm_id
) == 12,
4955 "offset of GetUniformfv params_shm_id should be 12");
4956 static_assert(offsetof(GetUniformfv
, params_shm_offset
) == 16,
4957 "offset of GetUniformfv params_shm_offset should be 16");
4959 struct GetUniformiv
{
4960 typedef GetUniformiv ValueType
;
4961 static const CommandId kCmdId
= kGetUniformiv
;
4962 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4963 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4965 typedef SizedResult
<GLint
> Result
;
4967 static uint32_t ComputeSize() {
4968 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4971 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4973 void Init(GLuint _program
,
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(GetUniformiv
) == 20, "size of GetUniformiv should be 20");
5002 static_assert(offsetof(GetUniformiv
, header
) == 0,
5003 "offset of GetUniformiv header should be 0");
5004 static_assert(offsetof(GetUniformiv
, program
) == 4,
5005 "offset of GetUniformiv program should be 4");
5006 static_assert(offsetof(GetUniformiv
, location
) == 8,
5007 "offset of GetUniformiv location should be 8");
5008 static_assert(offsetof(GetUniformiv
, params_shm_id
) == 12,
5009 "offset of GetUniformiv params_shm_id should be 12");
5010 static_assert(offsetof(GetUniformiv
, params_shm_offset
) == 16,
5011 "offset of GetUniformiv params_shm_offset should be 16");
5013 struct GetUniformIndices
{
5014 typedef GetUniformIndices ValueType
;
5015 static const CommandId kCmdId
= kGetUniformIndices
;
5016 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5017 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5019 typedef SizedResult
<GLuint
> Result
;
5021 static uint32_t ComputeSize() {
5022 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5025 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5027 void Init(GLuint _program
,
5028 uint32_t _names_bucket_id
,
5029 uint32_t _indices_shm_id
,
5030 uint32_t _indices_shm_offset
) {
5033 names_bucket_id
= _names_bucket_id
;
5034 indices_shm_id
= _indices_shm_id
;
5035 indices_shm_offset
= _indices_shm_offset
;
5038 void* Set(void* cmd
,
5040 uint32_t _names_bucket_id
,
5041 uint32_t _indices_shm_id
,
5042 uint32_t _indices_shm_offset
) {
5043 static_cast<ValueType
*>(cmd
)->Init(_program
, _names_bucket_id
,
5044 _indices_shm_id
, _indices_shm_offset
);
5045 return NextCmdAddress
<ValueType
>(cmd
);
5048 gpu::CommandHeader header
;
5050 uint32_t names_bucket_id
;
5051 uint32_t indices_shm_id
;
5052 uint32_t indices_shm_offset
;
5055 static_assert(sizeof(GetUniformIndices
) == 20,
5056 "size of GetUniformIndices should be 20");
5057 static_assert(offsetof(GetUniformIndices
, header
) == 0,
5058 "offset of GetUniformIndices header should be 0");
5059 static_assert(offsetof(GetUniformIndices
, program
) == 4,
5060 "offset of GetUniformIndices program should be 4");
5061 static_assert(offsetof(GetUniformIndices
, names_bucket_id
) == 8,
5062 "offset of GetUniformIndices names_bucket_id should be 8");
5063 static_assert(offsetof(GetUniformIndices
, indices_shm_id
) == 12,
5064 "offset of GetUniformIndices indices_shm_id should be 12");
5065 static_assert(offsetof(GetUniformIndices
, indices_shm_offset
) == 16,
5066 "offset of GetUniformIndices indices_shm_offset should be 16");
5068 struct GetUniformLocation
{
5069 typedef GetUniformLocation ValueType
;
5070 static const CommandId kCmdId
= kGetUniformLocation
;
5071 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5072 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5074 typedef GLint Result
;
5076 static uint32_t ComputeSize() {
5077 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5080 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5082 void Init(GLuint _program
,
5083 uint32_t _name_bucket_id
,
5084 uint32_t _location_shm_id
,
5085 uint32_t _location_shm_offset
) {
5088 name_bucket_id
= _name_bucket_id
;
5089 location_shm_id
= _location_shm_id
;
5090 location_shm_offset
= _location_shm_offset
;
5093 void* Set(void* cmd
,
5095 uint32_t _name_bucket_id
,
5096 uint32_t _location_shm_id
,
5097 uint32_t _location_shm_offset
) {
5098 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
5099 _location_shm_id
, _location_shm_offset
);
5100 return NextCmdAddress
<ValueType
>(cmd
);
5103 gpu::CommandHeader header
;
5105 uint32_t name_bucket_id
;
5106 uint32_t location_shm_id
;
5107 uint32_t location_shm_offset
;
5110 static_assert(sizeof(GetUniformLocation
) == 20,
5111 "size of GetUniformLocation should be 20");
5112 static_assert(offsetof(GetUniformLocation
, header
) == 0,
5113 "offset of GetUniformLocation header should be 0");
5114 static_assert(offsetof(GetUniformLocation
, program
) == 4,
5115 "offset of GetUniformLocation program should be 4");
5116 static_assert(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
5117 "offset of GetUniformLocation name_bucket_id should be 8");
5118 static_assert(offsetof(GetUniformLocation
, location_shm_id
) == 12,
5119 "offset of GetUniformLocation location_shm_id should be 12");
5120 static_assert(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
5121 "offset of GetUniformLocation location_shm_offset should be 16");
5123 struct GetVertexAttribfv
{
5124 typedef GetVertexAttribfv ValueType
;
5125 static const CommandId kCmdId
= kGetVertexAttribfv
;
5126 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5127 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5129 typedef SizedResult
<GLfloat
> Result
;
5131 static uint32_t ComputeSize() {
5132 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5135 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5137 void Init(GLuint _index
,
5139 uint32_t _params_shm_id
,
5140 uint32_t _params_shm_offset
) {
5144 params_shm_id
= _params_shm_id
;
5145 params_shm_offset
= _params_shm_offset
;
5148 void* Set(void* cmd
,
5151 uint32_t _params_shm_id
,
5152 uint32_t _params_shm_offset
) {
5153 static_cast<ValueType
*>(cmd
)
5154 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5155 return NextCmdAddress
<ValueType
>(cmd
);
5158 gpu::CommandHeader header
;
5161 uint32_t params_shm_id
;
5162 uint32_t params_shm_offset
;
5165 static_assert(sizeof(GetVertexAttribfv
) == 20,
5166 "size of GetVertexAttribfv should be 20");
5167 static_assert(offsetof(GetVertexAttribfv
, header
) == 0,
5168 "offset of GetVertexAttribfv header should be 0");
5169 static_assert(offsetof(GetVertexAttribfv
, index
) == 4,
5170 "offset of GetVertexAttribfv index should be 4");
5171 static_assert(offsetof(GetVertexAttribfv
, pname
) == 8,
5172 "offset of GetVertexAttribfv pname should be 8");
5173 static_assert(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
5174 "offset of GetVertexAttribfv params_shm_id should be 12");
5175 static_assert(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
5176 "offset of GetVertexAttribfv params_shm_offset should be 16");
5178 struct GetVertexAttribiv
{
5179 typedef GetVertexAttribiv ValueType
;
5180 static const CommandId kCmdId
= kGetVertexAttribiv
;
5181 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5182 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5184 typedef SizedResult
<GLint
> Result
;
5186 static uint32_t ComputeSize() {
5187 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5190 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5192 void Init(GLuint _index
,
5194 uint32_t _params_shm_id
,
5195 uint32_t _params_shm_offset
) {
5199 params_shm_id
= _params_shm_id
;
5200 params_shm_offset
= _params_shm_offset
;
5203 void* Set(void* cmd
,
5206 uint32_t _params_shm_id
,
5207 uint32_t _params_shm_offset
) {
5208 static_cast<ValueType
*>(cmd
)
5209 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5210 return NextCmdAddress
<ValueType
>(cmd
);
5213 gpu::CommandHeader header
;
5216 uint32_t params_shm_id
;
5217 uint32_t params_shm_offset
;
5220 static_assert(sizeof(GetVertexAttribiv
) == 20,
5221 "size of GetVertexAttribiv should be 20");
5222 static_assert(offsetof(GetVertexAttribiv
, header
) == 0,
5223 "offset of GetVertexAttribiv header should be 0");
5224 static_assert(offsetof(GetVertexAttribiv
, index
) == 4,
5225 "offset of GetVertexAttribiv index should be 4");
5226 static_assert(offsetof(GetVertexAttribiv
, pname
) == 8,
5227 "offset of GetVertexAttribiv pname should be 8");
5228 static_assert(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
5229 "offset of GetVertexAttribiv params_shm_id should be 12");
5230 static_assert(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
5231 "offset of GetVertexAttribiv params_shm_offset should be 16");
5233 struct GetVertexAttribPointerv
{
5234 typedef GetVertexAttribPointerv ValueType
;
5235 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
5236 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5237 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5239 typedef SizedResult
<GLuint
> Result
;
5241 static uint32_t ComputeSize() {
5242 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5245 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5247 void Init(GLuint _index
,
5249 uint32_t _pointer_shm_id
,
5250 uint32_t _pointer_shm_offset
) {
5254 pointer_shm_id
= _pointer_shm_id
;
5255 pointer_shm_offset
= _pointer_shm_offset
;
5258 void* Set(void* cmd
,
5261 uint32_t _pointer_shm_id
,
5262 uint32_t _pointer_shm_offset
) {
5263 static_cast<ValueType
*>(cmd
)
5264 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
5265 return NextCmdAddress
<ValueType
>(cmd
);
5268 gpu::CommandHeader header
;
5271 uint32_t pointer_shm_id
;
5272 uint32_t pointer_shm_offset
;
5275 static_assert(sizeof(GetVertexAttribPointerv
) == 20,
5276 "size of GetVertexAttribPointerv should be 20");
5277 static_assert(offsetof(GetVertexAttribPointerv
, header
) == 0,
5278 "offset of GetVertexAttribPointerv header should be 0");
5279 static_assert(offsetof(GetVertexAttribPointerv
, index
) == 4,
5280 "offset of GetVertexAttribPointerv index should be 4");
5281 static_assert(offsetof(GetVertexAttribPointerv
, pname
) == 8,
5282 "offset of GetVertexAttribPointerv pname should be 8");
5283 static_assert(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
5284 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
5286 offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
5287 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
5290 typedef Hint ValueType
;
5291 static const CommandId kCmdId
= kHint
;
5292 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5293 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5295 static uint32_t ComputeSize() {
5296 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5299 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5301 void Init(GLenum _target
, GLenum _mode
) {
5307 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
5308 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
5309 return NextCmdAddress
<ValueType
>(cmd
);
5312 gpu::CommandHeader header
;
5317 static_assert(sizeof(Hint
) == 12, "size of Hint should be 12");
5318 static_assert(offsetof(Hint
, header
) == 0, "offset of Hint header should be 0");
5319 static_assert(offsetof(Hint
, target
) == 4, "offset of Hint target should be 4");
5320 static_assert(offsetof(Hint
, mode
) == 8, "offset of Hint mode should be 8");
5322 struct InvalidateFramebufferImmediate
{
5323 typedef InvalidateFramebufferImmediate ValueType
;
5324 static const CommandId kCmdId
= kInvalidateFramebufferImmediate
;
5325 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5326 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5328 static uint32_t ComputeDataSize(GLsizei count
) {
5329 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5332 static uint32_t ComputeSize(GLsizei count
) {
5333 return static_cast<uint32_t>(sizeof(ValueType
) +
5334 ComputeDataSize(count
)); // NOLINT
5337 void SetHeader(GLsizei count
) {
5338 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5341 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
5345 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5348 void* Set(void* cmd
,
5351 const GLenum
* _attachments
) {
5352 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
5353 const uint32_t size
= ComputeSize(_count
);
5354 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5357 gpu::CommandHeader header
;
5362 static_assert(sizeof(InvalidateFramebufferImmediate
) == 12,
5363 "size of InvalidateFramebufferImmediate should be 12");
5364 static_assert(offsetof(InvalidateFramebufferImmediate
, header
) == 0,
5365 "offset of InvalidateFramebufferImmediate header should be 0");
5366 static_assert(offsetof(InvalidateFramebufferImmediate
, target
) == 4,
5367 "offset of InvalidateFramebufferImmediate target should be 4");
5368 static_assert(offsetof(InvalidateFramebufferImmediate
, count
) == 8,
5369 "offset of InvalidateFramebufferImmediate count should be 8");
5371 struct InvalidateSubFramebufferImmediate
{
5372 typedef InvalidateSubFramebufferImmediate ValueType
;
5373 static const CommandId kCmdId
= kInvalidateSubFramebufferImmediate
;
5374 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5375 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5377 static uint32_t ComputeDataSize(GLsizei count
) {
5378 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
5381 static uint32_t ComputeSize(GLsizei count
) {
5382 return static_cast<uint32_t>(sizeof(ValueType
) +
5383 ComputeDataSize(count
)); // NOLINT
5386 void SetHeader(GLsizei count
) {
5387 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5390 void Init(GLenum _target
,
5392 const GLenum
* _attachments
,
5404 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
5407 void* Set(void* cmd
,
5410 const GLenum
* _attachments
,
5415 static_cast<ValueType
*>(cmd
)
5416 ->Init(_target
, _count
, _attachments
, _x
, _y
, _width
, _height
);
5417 const uint32_t size
= ComputeSize(_count
);
5418 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5421 gpu::CommandHeader header
;
5430 static_assert(sizeof(InvalidateSubFramebufferImmediate
) == 28,
5431 "size of InvalidateSubFramebufferImmediate should be 28");
5432 static_assert(offsetof(InvalidateSubFramebufferImmediate
, header
) == 0,
5433 "offset of InvalidateSubFramebufferImmediate header should be 0");
5434 static_assert(offsetof(InvalidateSubFramebufferImmediate
, target
) == 4,
5435 "offset of InvalidateSubFramebufferImmediate target should be 4");
5436 static_assert(offsetof(InvalidateSubFramebufferImmediate
, count
) == 8,
5437 "offset of InvalidateSubFramebufferImmediate count should be 8");
5438 static_assert(offsetof(InvalidateSubFramebufferImmediate
, x
) == 12,
5439 "offset of InvalidateSubFramebufferImmediate x should be 12");
5440 static_assert(offsetof(InvalidateSubFramebufferImmediate
, y
) == 16,
5441 "offset of InvalidateSubFramebufferImmediate y should be 16");
5442 static_assert(offsetof(InvalidateSubFramebufferImmediate
, width
) == 20,
5443 "offset of InvalidateSubFramebufferImmediate width should be 20");
5445 offsetof(InvalidateSubFramebufferImmediate
, height
) == 24,
5446 "offset of InvalidateSubFramebufferImmediate height should be 24");
5449 typedef IsBuffer ValueType
;
5450 static const CommandId kCmdId
= kIsBuffer
;
5451 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5452 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5454 typedef uint32_t Result
;
5456 static uint32_t ComputeSize() {
5457 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5460 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5462 void Init(GLuint _buffer
,
5463 uint32_t _result_shm_id
,
5464 uint32_t _result_shm_offset
) {
5467 result_shm_id
= _result_shm_id
;
5468 result_shm_offset
= _result_shm_offset
;
5471 void* Set(void* cmd
,
5473 uint32_t _result_shm_id
,
5474 uint32_t _result_shm_offset
) {
5475 static_cast<ValueType
*>(cmd
)
5476 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
5477 return NextCmdAddress
<ValueType
>(cmd
);
5480 gpu::CommandHeader header
;
5482 uint32_t result_shm_id
;
5483 uint32_t result_shm_offset
;
5486 static_assert(sizeof(IsBuffer
) == 16, "size of IsBuffer should be 16");
5487 static_assert(offsetof(IsBuffer
, header
) == 0,
5488 "offset of IsBuffer header should be 0");
5489 static_assert(offsetof(IsBuffer
, buffer
) == 4,
5490 "offset of IsBuffer buffer should be 4");
5491 static_assert(offsetof(IsBuffer
, result_shm_id
) == 8,
5492 "offset of IsBuffer result_shm_id should be 8");
5493 static_assert(offsetof(IsBuffer
, result_shm_offset
) == 12,
5494 "offset of IsBuffer result_shm_offset should be 12");
5497 typedef IsEnabled ValueType
;
5498 static const CommandId kCmdId
= kIsEnabled
;
5499 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5500 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5502 typedef uint32_t Result
;
5504 static uint32_t ComputeSize() {
5505 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5508 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5510 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
5513 result_shm_id
= _result_shm_id
;
5514 result_shm_offset
= _result_shm_offset
;
5517 void* Set(void* cmd
,
5519 uint32_t _result_shm_id
,
5520 uint32_t _result_shm_offset
) {
5521 static_cast<ValueType
*>(cmd
)
5522 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
5523 return NextCmdAddress
<ValueType
>(cmd
);
5526 gpu::CommandHeader header
;
5528 uint32_t result_shm_id
;
5529 uint32_t result_shm_offset
;
5532 static_assert(sizeof(IsEnabled
) == 16, "size of IsEnabled should be 16");
5533 static_assert(offsetof(IsEnabled
, header
) == 0,
5534 "offset of IsEnabled header should be 0");
5535 static_assert(offsetof(IsEnabled
, cap
) == 4,
5536 "offset of IsEnabled cap should be 4");
5537 static_assert(offsetof(IsEnabled
, result_shm_id
) == 8,
5538 "offset of IsEnabled result_shm_id should be 8");
5539 static_assert(offsetof(IsEnabled
, result_shm_offset
) == 12,
5540 "offset of IsEnabled result_shm_offset should be 12");
5542 struct IsFramebuffer
{
5543 typedef IsFramebuffer ValueType
;
5544 static const CommandId kCmdId
= kIsFramebuffer
;
5545 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5546 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5548 typedef uint32_t Result
;
5550 static uint32_t ComputeSize() {
5551 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5554 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5556 void Init(GLuint _framebuffer
,
5557 uint32_t _result_shm_id
,
5558 uint32_t _result_shm_offset
) {
5560 framebuffer
= _framebuffer
;
5561 result_shm_id
= _result_shm_id
;
5562 result_shm_offset
= _result_shm_offset
;
5565 void* Set(void* cmd
,
5566 GLuint _framebuffer
,
5567 uint32_t _result_shm_id
,
5568 uint32_t _result_shm_offset
) {
5569 static_cast<ValueType
*>(cmd
)
5570 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
5571 return NextCmdAddress
<ValueType
>(cmd
);
5574 gpu::CommandHeader header
;
5575 uint32_t framebuffer
;
5576 uint32_t result_shm_id
;
5577 uint32_t result_shm_offset
;
5580 static_assert(sizeof(IsFramebuffer
) == 16,
5581 "size of IsFramebuffer should be 16");
5582 static_assert(offsetof(IsFramebuffer
, header
) == 0,
5583 "offset of IsFramebuffer header should be 0");
5584 static_assert(offsetof(IsFramebuffer
, framebuffer
) == 4,
5585 "offset of IsFramebuffer framebuffer should be 4");
5586 static_assert(offsetof(IsFramebuffer
, result_shm_id
) == 8,
5587 "offset of IsFramebuffer result_shm_id should be 8");
5588 static_assert(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
5589 "offset of IsFramebuffer result_shm_offset should be 12");
5592 typedef IsProgram ValueType
;
5593 static const CommandId kCmdId
= kIsProgram
;
5594 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5595 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5597 typedef uint32_t Result
;
5599 static uint32_t ComputeSize() {
5600 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5603 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5605 void Init(GLuint _program
,
5606 uint32_t _result_shm_id
,
5607 uint32_t _result_shm_offset
) {
5610 result_shm_id
= _result_shm_id
;
5611 result_shm_offset
= _result_shm_offset
;
5614 void* Set(void* cmd
,
5616 uint32_t _result_shm_id
,
5617 uint32_t _result_shm_offset
) {
5618 static_cast<ValueType
*>(cmd
)
5619 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
5620 return NextCmdAddress
<ValueType
>(cmd
);
5623 gpu::CommandHeader header
;
5625 uint32_t result_shm_id
;
5626 uint32_t result_shm_offset
;
5629 static_assert(sizeof(IsProgram
) == 16, "size of IsProgram should be 16");
5630 static_assert(offsetof(IsProgram
, header
) == 0,
5631 "offset of IsProgram header should be 0");
5632 static_assert(offsetof(IsProgram
, program
) == 4,
5633 "offset of IsProgram program should be 4");
5634 static_assert(offsetof(IsProgram
, result_shm_id
) == 8,
5635 "offset of IsProgram result_shm_id should be 8");
5636 static_assert(offsetof(IsProgram
, result_shm_offset
) == 12,
5637 "offset of IsProgram result_shm_offset should be 12");
5639 struct IsRenderbuffer
{
5640 typedef IsRenderbuffer ValueType
;
5641 static const CommandId kCmdId
= kIsRenderbuffer
;
5642 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5643 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5645 typedef uint32_t Result
;
5647 static uint32_t ComputeSize() {
5648 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5651 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5653 void Init(GLuint _renderbuffer
,
5654 uint32_t _result_shm_id
,
5655 uint32_t _result_shm_offset
) {
5657 renderbuffer
= _renderbuffer
;
5658 result_shm_id
= _result_shm_id
;
5659 result_shm_offset
= _result_shm_offset
;
5662 void* Set(void* cmd
,
5663 GLuint _renderbuffer
,
5664 uint32_t _result_shm_id
,
5665 uint32_t _result_shm_offset
) {
5666 static_cast<ValueType
*>(cmd
)
5667 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
5668 return NextCmdAddress
<ValueType
>(cmd
);
5671 gpu::CommandHeader header
;
5672 uint32_t renderbuffer
;
5673 uint32_t result_shm_id
;
5674 uint32_t result_shm_offset
;
5677 static_assert(sizeof(IsRenderbuffer
) == 16,
5678 "size of IsRenderbuffer should be 16");
5679 static_assert(offsetof(IsRenderbuffer
, header
) == 0,
5680 "offset of IsRenderbuffer header should be 0");
5681 static_assert(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
5682 "offset of IsRenderbuffer renderbuffer should be 4");
5683 static_assert(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
5684 "offset of IsRenderbuffer result_shm_id should be 8");
5685 static_assert(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
5686 "offset of IsRenderbuffer result_shm_offset should be 12");
5689 typedef IsSampler ValueType
;
5690 static const CommandId kCmdId
= kIsSampler
;
5691 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5692 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5694 typedef uint32_t Result
;
5696 static uint32_t ComputeSize() {
5697 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5700 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5702 void Init(GLuint _sampler
,
5703 uint32_t _result_shm_id
,
5704 uint32_t _result_shm_offset
) {
5707 result_shm_id
= _result_shm_id
;
5708 result_shm_offset
= _result_shm_offset
;
5711 void* Set(void* cmd
,
5713 uint32_t _result_shm_id
,
5714 uint32_t _result_shm_offset
) {
5715 static_cast<ValueType
*>(cmd
)
5716 ->Init(_sampler
, _result_shm_id
, _result_shm_offset
);
5717 return NextCmdAddress
<ValueType
>(cmd
);
5720 gpu::CommandHeader header
;
5722 uint32_t result_shm_id
;
5723 uint32_t result_shm_offset
;
5726 static_assert(sizeof(IsSampler
) == 16, "size of IsSampler should be 16");
5727 static_assert(offsetof(IsSampler
, header
) == 0,
5728 "offset of IsSampler header should be 0");
5729 static_assert(offsetof(IsSampler
, sampler
) == 4,
5730 "offset of IsSampler sampler should be 4");
5731 static_assert(offsetof(IsSampler
, result_shm_id
) == 8,
5732 "offset of IsSampler result_shm_id should be 8");
5733 static_assert(offsetof(IsSampler
, result_shm_offset
) == 12,
5734 "offset of IsSampler result_shm_offset should be 12");
5737 typedef IsShader ValueType
;
5738 static const CommandId kCmdId
= kIsShader
;
5739 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5740 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5742 typedef uint32_t Result
;
5744 static uint32_t ComputeSize() {
5745 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5748 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5750 void Init(GLuint _shader
,
5751 uint32_t _result_shm_id
,
5752 uint32_t _result_shm_offset
) {
5755 result_shm_id
= _result_shm_id
;
5756 result_shm_offset
= _result_shm_offset
;
5759 void* Set(void* cmd
,
5761 uint32_t _result_shm_id
,
5762 uint32_t _result_shm_offset
) {
5763 static_cast<ValueType
*>(cmd
)
5764 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
5765 return NextCmdAddress
<ValueType
>(cmd
);
5768 gpu::CommandHeader header
;
5770 uint32_t result_shm_id
;
5771 uint32_t result_shm_offset
;
5774 static_assert(sizeof(IsShader
) == 16, "size of IsShader should be 16");
5775 static_assert(offsetof(IsShader
, header
) == 0,
5776 "offset of IsShader header should be 0");
5777 static_assert(offsetof(IsShader
, shader
) == 4,
5778 "offset of IsShader shader should be 4");
5779 static_assert(offsetof(IsShader
, result_shm_id
) == 8,
5780 "offset of IsShader result_shm_id should be 8");
5781 static_assert(offsetof(IsShader
, result_shm_offset
) == 12,
5782 "offset of IsShader result_shm_offset should be 12");
5785 typedef IsSync ValueType
;
5786 static const CommandId kCmdId
= kIsSync
;
5787 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5788 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5790 typedef uint32_t Result
;
5792 static uint32_t ComputeSize() {
5793 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5796 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5798 void Init(GLuint _sync
,
5799 uint32_t _result_shm_id
,
5800 uint32_t _result_shm_offset
) {
5803 result_shm_id
= _result_shm_id
;
5804 result_shm_offset
= _result_shm_offset
;
5807 void* Set(void* cmd
,
5809 uint32_t _result_shm_id
,
5810 uint32_t _result_shm_offset
) {
5811 static_cast<ValueType
*>(cmd
)
5812 ->Init(_sync
, _result_shm_id
, _result_shm_offset
);
5813 return NextCmdAddress
<ValueType
>(cmd
);
5816 gpu::CommandHeader header
;
5818 uint32_t result_shm_id
;
5819 uint32_t result_shm_offset
;
5822 static_assert(sizeof(IsSync
) == 16, "size of IsSync should be 16");
5823 static_assert(offsetof(IsSync
, header
) == 0,
5824 "offset of IsSync header should be 0");
5825 static_assert(offsetof(IsSync
, sync
) == 4, "offset of IsSync sync should be 4");
5826 static_assert(offsetof(IsSync
, result_shm_id
) == 8,
5827 "offset of IsSync result_shm_id should be 8");
5828 static_assert(offsetof(IsSync
, result_shm_offset
) == 12,
5829 "offset of IsSync result_shm_offset should be 12");
5832 typedef IsTexture ValueType
;
5833 static const CommandId kCmdId
= kIsTexture
;
5834 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5835 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5837 typedef uint32_t Result
;
5839 static uint32_t ComputeSize() {
5840 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5843 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5845 void Init(GLuint _texture
,
5846 uint32_t _result_shm_id
,
5847 uint32_t _result_shm_offset
) {
5850 result_shm_id
= _result_shm_id
;
5851 result_shm_offset
= _result_shm_offset
;
5854 void* Set(void* cmd
,
5856 uint32_t _result_shm_id
,
5857 uint32_t _result_shm_offset
) {
5858 static_cast<ValueType
*>(cmd
)
5859 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
5860 return NextCmdAddress
<ValueType
>(cmd
);
5863 gpu::CommandHeader header
;
5865 uint32_t result_shm_id
;
5866 uint32_t result_shm_offset
;
5869 static_assert(sizeof(IsTexture
) == 16, "size of IsTexture should be 16");
5870 static_assert(offsetof(IsTexture
, header
) == 0,
5871 "offset of IsTexture header should be 0");
5872 static_assert(offsetof(IsTexture
, texture
) == 4,
5873 "offset of IsTexture texture should be 4");
5874 static_assert(offsetof(IsTexture
, result_shm_id
) == 8,
5875 "offset of IsTexture result_shm_id should be 8");
5876 static_assert(offsetof(IsTexture
, result_shm_offset
) == 12,
5877 "offset of IsTexture result_shm_offset should be 12");
5879 struct IsTransformFeedback
{
5880 typedef IsTransformFeedback ValueType
;
5881 static const CommandId kCmdId
= kIsTransformFeedback
;
5882 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5883 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5885 typedef uint32_t Result
;
5887 static uint32_t ComputeSize() {
5888 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5891 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5893 void Init(GLuint _transformfeedback
,
5894 uint32_t _result_shm_id
,
5895 uint32_t _result_shm_offset
) {
5897 transformfeedback
= _transformfeedback
;
5898 result_shm_id
= _result_shm_id
;
5899 result_shm_offset
= _result_shm_offset
;
5902 void* Set(void* cmd
,
5903 GLuint _transformfeedback
,
5904 uint32_t _result_shm_id
,
5905 uint32_t _result_shm_offset
) {
5906 static_cast<ValueType
*>(cmd
)
5907 ->Init(_transformfeedback
, _result_shm_id
, _result_shm_offset
);
5908 return NextCmdAddress
<ValueType
>(cmd
);
5911 gpu::CommandHeader header
;
5912 uint32_t transformfeedback
;
5913 uint32_t result_shm_id
;
5914 uint32_t result_shm_offset
;
5917 static_assert(sizeof(IsTransformFeedback
) == 16,
5918 "size of IsTransformFeedback should be 16");
5919 static_assert(offsetof(IsTransformFeedback
, header
) == 0,
5920 "offset of IsTransformFeedback header should be 0");
5921 static_assert(offsetof(IsTransformFeedback
, transformfeedback
) == 4,
5922 "offset of IsTransformFeedback transformfeedback should be 4");
5923 static_assert(offsetof(IsTransformFeedback
, result_shm_id
) == 8,
5924 "offset of IsTransformFeedback result_shm_id should be 8");
5925 static_assert(offsetof(IsTransformFeedback
, result_shm_offset
) == 12,
5926 "offset of IsTransformFeedback result_shm_offset should be 12");
5929 typedef LineWidth ValueType
;
5930 static const CommandId kCmdId
= kLineWidth
;
5931 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5932 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5934 static uint32_t ComputeSize() {
5935 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5938 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5940 void Init(GLfloat _width
) {
5945 void* Set(void* cmd
, GLfloat _width
) {
5946 static_cast<ValueType
*>(cmd
)->Init(_width
);
5947 return NextCmdAddress
<ValueType
>(cmd
);
5950 gpu::CommandHeader header
;
5954 static_assert(sizeof(LineWidth
) == 8, "size of LineWidth should be 8");
5955 static_assert(offsetof(LineWidth
, header
) == 0,
5956 "offset of LineWidth header should be 0");
5957 static_assert(offsetof(LineWidth
, width
) == 4,
5958 "offset of LineWidth width should be 4");
5960 struct LinkProgram
{
5961 typedef LinkProgram ValueType
;
5962 static const CommandId kCmdId
= kLinkProgram
;
5963 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5964 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5966 static uint32_t ComputeSize() {
5967 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5970 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5972 void Init(GLuint _program
) {
5977 void* Set(void* cmd
, GLuint _program
) {
5978 static_cast<ValueType
*>(cmd
)->Init(_program
);
5979 return NextCmdAddress
<ValueType
>(cmd
);
5982 gpu::CommandHeader header
;
5986 static_assert(sizeof(LinkProgram
) == 8, "size of LinkProgram should be 8");
5987 static_assert(offsetof(LinkProgram
, header
) == 0,
5988 "offset of LinkProgram header should be 0");
5989 static_assert(offsetof(LinkProgram
, program
) == 4,
5990 "offset of LinkProgram program should be 4");
5992 struct PauseTransformFeedback
{
5993 typedef PauseTransformFeedback ValueType
;
5994 static const CommandId kCmdId
= kPauseTransformFeedback
;
5995 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5996 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5998 static uint32_t ComputeSize() {
5999 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6002 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6004 void Init() { SetHeader(); }
6006 void* Set(void* cmd
) {
6007 static_cast<ValueType
*>(cmd
)->Init();
6008 return NextCmdAddress
<ValueType
>(cmd
);
6011 gpu::CommandHeader header
;
6014 static_assert(sizeof(PauseTransformFeedback
) == 4,
6015 "size of PauseTransformFeedback should be 4");
6016 static_assert(offsetof(PauseTransformFeedback
, header
) == 0,
6017 "offset of PauseTransformFeedback header should be 0");
6019 struct PixelStorei
{
6020 typedef PixelStorei ValueType
;
6021 static const CommandId kCmdId
= kPixelStorei
;
6022 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6023 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6025 static uint32_t ComputeSize() {
6026 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6029 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6031 void Init(GLenum _pname
, GLint _param
) {
6037 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
6038 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
6039 return NextCmdAddress
<ValueType
>(cmd
);
6042 gpu::CommandHeader header
;
6047 static_assert(sizeof(PixelStorei
) == 12, "size of PixelStorei should be 12");
6048 static_assert(offsetof(PixelStorei
, header
) == 0,
6049 "offset of PixelStorei header should be 0");
6050 static_assert(offsetof(PixelStorei
, pname
) == 4,
6051 "offset of PixelStorei pname should be 4");
6052 static_assert(offsetof(PixelStorei
, param
) == 8,
6053 "offset of PixelStorei param should be 8");
6055 struct PolygonOffset
{
6056 typedef PolygonOffset ValueType
;
6057 static const CommandId kCmdId
= kPolygonOffset
;
6058 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6059 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6061 static uint32_t ComputeSize() {
6062 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6065 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6067 void Init(GLfloat _factor
, GLfloat _units
) {
6073 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
6074 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
6075 return NextCmdAddress
<ValueType
>(cmd
);
6078 gpu::CommandHeader header
;
6083 static_assert(sizeof(PolygonOffset
) == 12,
6084 "size of PolygonOffset should be 12");
6085 static_assert(offsetof(PolygonOffset
, header
) == 0,
6086 "offset of PolygonOffset header should be 0");
6087 static_assert(offsetof(PolygonOffset
, factor
) == 4,
6088 "offset of PolygonOffset factor should be 4");
6089 static_assert(offsetof(PolygonOffset
, units
) == 8,
6090 "offset of PolygonOffset units should be 8");
6093 typedef ReadBuffer ValueType
;
6094 static const CommandId kCmdId
= kReadBuffer
;
6095 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6096 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6098 static uint32_t ComputeSize() {
6099 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6102 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6104 void Init(GLenum _src
) {
6109 void* Set(void* cmd
, GLenum _src
) {
6110 static_cast<ValueType
*>(cmd
)->Init(_src
);
6111 return NextCmdAddress
<ValueType
>(cmd
);
6114 gpu::CommandHeader header
;
6118 static_assert(sizeof(ReadBuffer
) == 8, "size of ReadBuffer should be 8");
6119 static_assert(offsetof(ReadBuffer
, header
) == 0,
6120 "offset of ReadBuffer header should be 0");
6121 static_assert(offsetof(ReadBuffer
, src
) == 4,
6122 "offset of ReadBuffer src should be 4");
6124 // ReadPixels has the result separated from the pixel buffer so that
6125 // it is easier to specify the result going to some specific place
6126 // that exactly fits the rectangle of pixels.
6128 typedef ReadPixels ValueType
;
6129 static const CommandId kCmdId
= kReadPixels
;
6130 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6131 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6133 typedef uint32_t Result
;
6135 static uint32_t ComputeSize() {
6136 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6139 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6147 uint32_t _pixels_shm_id
,
6148 uint32_t _pixels_shm_offset
,
6149 uint32_t _result_shm_id
,
6150 uint32_t _result_shm_offset
,
6159 pixels_shm_id
= _pixels_shm_id
;
6160 pixels_shm_offset
= _pixels_shm_offset
;
6161 result_shm_id
= _result_shm_id
;
6162 result_shm_offset
= _result_shm_offset
;
6166 void* Set(void* cmd
,
6173 uint32_t _pixels_shm_id
,
6174 uint32_t _pixels_shm_offset
,
6175 uint32_t _result_shm_id
,
6176 uint32_t _result_shm_offset
,
6178 static_cast<ValueType
*>(cmd
)
6179 ->Init(_x
, _y
, _width
, _height
, _format
, _type
, _pixels_shm_id
,
6180 _pixels_shm_offset
, _result_shm_id
, _result_shm_offset
, _async
);
6181 return NextCmdAddress
<ValueType
>(cmd
);
6184 gpu::CommandHeader header
;
6191 uint32_t pixels_shm_id
;
6192 uint32_t pixels_shm_offset
;
6193 uint32_t result_shm_id
;
6194 uint32_t result_shm_offset
;
6198 static_assert(sizeof(ReadPixels
) == 48, "size of ReadPixels should be 48");
6199 static_assert(offsetof(ReadPixels
, header
) == 0,
6200 "offset of ReadPixels header should be 0");
6201 static_assert(offsetof(ReadPixels
, x
) == 4,
6202 "offset of ReadPixels x should be 4");
6203 static_assert(offsetof(ReadPixels
, y
) == 8,
6204 "offset of ReadPixels y should be 8");
6205 static_assert(offsetof(ReadPixels
, width
) == 12,
6206 "offset of ReadPixels width should be 12");
6207 static_assert(offsetof(ReadPixels
, height
) == 16,
6208 "offset of ReadPixels height should be 16");
6209 static_assert(offsetof(ReadPixels
, format
) == 20,
6210 "offset of ReadPixels format should be 20");
6211 static_assert(offsetof(ReadPixels
, type
) == 24,
6212 "offset of ReadPixels type should be 24");
6213 static_assert(offsetof(ReadPixels
, pixels_shm_id
) == 28,
6214 "offset of ReadPixels pixels_shm_id should be 28");
6215 static_assert(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
6216 "offset of ReadPixels pixels_shm_offset should be 32");
6217 static_assert(offsetof(ReadPixels
, result_shm_id
) == 36,
6218 "offset of ReadPixels result_shm_id should be 36");
6219 static_assert(offsetof(ReadPixels
, result_shm_offset
) == 40,
6220 "offset of ReadPixels result_shm_offset should be 40");
6221 static_assert(offsetof(ReadPixels
, async
) == 44,
6222 "offset of ReadPixels async should be 44");
6224 struct ReleaseShaderCompiler
{
6225 typedef ReleaseShaderCompiler ValueType
;
6226 static const CommandId kCmdId
= kReleaseShaderCompiler
;
6227 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6228 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6230 static uint32_t ComputeSize() {
6231 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6234 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6236 void Init() { SetHeader(); }
6238 void* Set(void* cmd
) {
6239 static_cast<ValueType
*>(cmd
)->Init();
6240 return NextCmdAddress
<ValueType
>(cmd
);
6243 gpu::CommandHeader header
;
6246 static_assert(sizeof(ReleaseShaderCompiler
) == 4,
6247 "size of ReleaseShaderCompiler should be 4");
6248 static_assert(offsetof(ReleaseShaderCompiler
, header
) == 0,
6249 "offset of ReleaseShaderCompiler header should be 0");
6251 struct RenderbufferStorage
{
6252 typedef RenderbufferStorage ValueType
;
6253 static const CommandId kCmdId
= kRenderbufferStorage
;
6254 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6255 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6257 static uint32_t ComputeSize() {
6258 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6261 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6263 void Init(GLenum _target
,
6264 GLenum _internalformat
,
6269 internalformat
= _internalformat
;
6274 void* Set(void* cmd
,
6276 GLenum _internalformat
,
6279 static_cast<ValueType
*>(cmd
)
6280 ->Init(_target
, _internalformat
, _width
, _height
);
6281 return NextCmdAddress
<ValueType
>(cmd
);
6284 gpu::CommandHeader header
;
6286 uint32_t internalformat
;
6291 static_assert(sizeof(RenderbufferStorage
) == 20,
6292 "size of RenderbufferStorage should be 20");
6293 static_assert(offsetof(RenderbufferStorage
, header
) == 0,
6294 "offset of RenderbufferStorage header should be 0");
6295 static_assert(offsetof(RenderbufferStorage
, target
) == 4,
6296 "offset of RenderbufferStorage target should be 4");
6297 static_assert(offsetof(RenderbufferStorage
, internalformat
) == 8,
6298 "offset of RenderbufferStorage internalformat should be 8");
6299 static_assert(offsetof(RenderbufferStorage
, width
) == 12,
6300 "offset of RenderbufferStorage width should be 12");
6301 static_assert(offsetof(RenderbufferStorage
, height
) == 16,
6302 "offset of RenderbufferStorage height should be 16");
6304 struct ResumeTransformFeedback
{
6305 typedef ResumeTransformFeedback ValueType
;
6306 static const CommandId kCmdId
= kResumeTransformFeedback
;
6307 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6308 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6310 static uint32_t ComputeSize() {
6311 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6314 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6316 void Init() { SetHeader(); }
6318 void* Set(void* cmd
) {
6319 static_cast<ValueType
*>(cmd
)->Init();
6320 return NextCmdAddress
<ValueType
>(cmd
);
6323 gpu::CommandHeader header
;
6326 static_assert(sizeof(ResumeTransformFeedback
) == 4,
6327 "size of ResumeTransformFeedback should be 4");
6328 static_assert(offsetof(ResumeTransformFeedback
, header
) == 0,
6329 "offset of ResumeTransformFeedback header should be 0");
6331 struct SampleCoverage
{
6332 typedef SampleCoverage ValueType
;
6333 static const CommandId kCmdId
= kSampleCoverage
;
6334 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6335 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6337 static uint32_t ComputeSize() {
6338 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6341 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6343 void Init(GLclampf _value
, GLboolean _invert
) {
6349 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
6350 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
6351 return NextCmdAddress
<ValueType
>(cmd
);
6354 gpu::CommandHeader header
;
6359 static_assert(sizeof(SampleCoverage
) == 12,
6360 "size of SampleCoverage should be 12");
6361 static_assert(offsetof(SampleCoverage
, header
) == 0,
6362 "offset of SampleCoverage header should be 0");
6363 static_assert(offsetof(SampleCoverage
, value
) == 4,
6364 "offset of SampleCoverage value should be 4");
6365 static_assert(offsetof(SampleCoverage
, invert
) == 8,
6366 "offset of SampleCoverage invert should be 8");
6368 struct SamplerParameterf
{
6369 typedef SamplerParameterf ValueType
;
6370 static const CommandId kCmdId
= kSamplerParameterf
;
6371 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6372 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6374 static uint32_t ComputeSize() {
6375 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6378 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6380 void Init(GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6387 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
6388 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6389 return NextCmdAddress
<ValueType
>(cmd
);
6392 gpu::CommandHeader header
;
6398 static_assert(sizeof(SamplerParameterf
) == 16,
6399 "size of SamplerParameterf should be 16");
6400 static_assert(offsetof(SamplerParameterf
, header
) == 0,
6401 "offset of SamplerParameterf header should be 0");
6402 static_assert(offsetof(SamplerParameterf
, sampler
) == 4,
6403 "offset of SamplerParameterf sampler should be 4");
6404 static_assert(offsetof(SamplerParameterf
, pname
) == 8,
6405 "offset of SamplerParameterf pname should be 8");
6406 static_assert(offsetof(SamplerParameterf
, param
) == 12,
6407 "offset of SamplerParameterf param should be 12");
6409 struct SamplerParameterfvImmediate
{
6410 typedef SamplerParameterfvImmediate ValueType
;
6411 static const CommandId kCmdId
= kSamplerParameterfvImmediate
;
6412 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6413 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6415 static uint32_t ComputeDataSize() {
6416 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
6419 static uint32_t ComputeSize() {
6420 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6423 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6425 void Init(GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6429 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6432 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
6433 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6434 const uint32_t size
= ComputeSize();
6435 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6438 gpu::CommandHeader header
;
6443 static_assert(sizeof(SamplerParameterfvImmediate
) == 12,
6444 "size of SamplerParameterfvImmediate should be 12");
6445 static_assert(offsetof(SamplerParameterfvImmediate
, header
) == 0,
6446 "offset of SamplerParameterfvImmediate header should be 0");
6447 static_assert(offsetof(SamplerParameterfvImmediate
, sampler
) == 4,
6448 "offset of SamplerParameterfvImmediate sampler should be 4");
6449 static_assert(offsetof(SamplerParameterfvImmediate
, pname
) == 8,
6450 "offset of SamplerParameterfvImmediate pname should be 8");
6452 struct SamplerParameteri
{
6453 typedef SamplerParameteri ValueType
;
6454 static const CommandId kCmdId
= kSamplerParameteri
;
6455 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6456 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6458 static uint32_t ComputeSize() {
6459 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6462 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6464 void Init(GLuint _sampler
, GLenum _pname
, GLint _param
) {
6471 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLint _param
) {
6472 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
6473 return NextCmdAddress
<ValueType
>(cmd
);
6476 gpu::CommandHeader header
;
6482 static_assert(sizeof(SamplerParameteri
) == 16,
6483 "size of SamplerParameteri should be 16");
6484 static_assert(offsetof(SamplerParameteri
, header
) == 0,
6485 "offset of SamplerParameteri header should be 0");
6486 static_assert(offsetof(SamplerParameteri
, sampler
) == 4,
6487 "offset of SamplerParameteri sampler should be 4");
6488 static_assert(offsetof(SamplerParameteri
, pname
) == 8,
6489 "offset of SamplerParameteri pname should be 8");
6490 static_assert(offsetof(SamplerParameteri
, param
) == 12,
6491 "offset of SamplerParameteri param should be 12");
6493 struct SamplerParameterivImmediate
{
6494 typedef SamplerParameterivImmediate ValueType
;
6495 static const CommandId kCmdId
= kSamplerParameterivImmediate
;
6496 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6497 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6499 static uint32_t ComputeDataSize() {
6500 return static_cast<uint32_t>(sizeof(GLint
) * 1);
6503 static uint32_t ComputeSize() {
6504 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
6507 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6509 void Init(GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6513 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
6516 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
6517 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
6518 const uint32_t size
= ComputeSize();
6519 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6522 gpu::CommandHeader header
;
6527 static_assert(sizeof(SamplerParameterivImmediate
) == 12,
6528 "size of SamplerParameterivImmediate should be 12");
6529 static_assert(offsetof(SamplerParameterivImmediate
, header
) == 0,
6530 "offset of SamplerParameterivImmediate header should be 0");
6531 static_assert(offsetof(SamplerParameterivImmediate
, sampler
) == 4,
6532 "offset of SamplerParameterivImmediate sampler should be 4");
6533 static_assert(offsetof(SamplerParameterivImmediate
, pname
) == 8,
6534 "offset of SamplerParameterivImmediate pname should be 8");
6537 typedef Scissor ValueType
;
6538 static const CommandId kCmdId
= kScissor
;
6539 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6540 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6542 static uint32_t ComputeSize() {
6543 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6546 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6548 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6556 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6557 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
6558 return NextCmdAddress
<ValueType
>(cmd
);
6561 gpu::CommandHeader header
;
6568 static_assert(sizeof(Scissor
) == 20, "size of Scissor should be 20");
6569 static_assert(offsetof(Scissor
, header
) == 0,
6570 "offset of Scissor header should be 0");
6571 static_assert(offsetof(Scissor
, x
) == 4, "offset of Scissor x should be 4");
6572 static_assert(offsetof(Scissor
, y
) == 8, "offset of Scissor y should be 8");
6573 static_assert(offsetof(Scissor
, width
) == 12,
6574 "offset of Scissor width should be 12");
6575 static_assert(offsetof(Scissor
, height
) == 16,
6576 "offset of Scissor height should be 16");
6578 struct ShaderBinary
{
6579 typedef ShaderBinary ValueType
;
6580 static const CommandId kCmdId
= kShaderBinary
;
6581 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6582 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6584 static uint32_t ComputeSize() {
6585 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6588 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6590 void Init(GLsizei _n
,
6591 uint32_t _shaders_shm_id
,
6592 uint32_t _shaders_shm_offset
,
6593 GLenum _binaryformat
,
6594 uint32_t _binary_shm_id
,
6595 uint32_t _binary_shm_offset
,
6599 shaders_shm_id
= _shaders_shm_id
;
6600 shaders_shm_offset
= _shaders_shm_offset
;
6601 binaryformat
= _binaryformat
;
6602 binary_shm_id
= _binary_shm_id
;
6603 binary_shm_offset
= _binary_shm_offset
;
6607 void* Set(void* cmd
,
6609 uint32_t _shaders_shm_id
,
6610 uint32_t _shaders_shm_offset
,
6611 GLenum _binaryformat
,
6612 uint32_t _binary_shm_id
,
6613 uint32_t _binary_shm_offset
,
6615 static_cast<ValueType
*>(cmd
)->Init(_n
, _shaders_shm_id
, _shaders_shm_offset
,
6616 _binaryformat
, _binary_shm_id
,
6617 _binary_shm_offset
, _length
);
6618 return NextCmdAddress
<ValueType
>(cmd
);
6621 gpu::CommandHeader header
;
6623 uint32_t shaders_shm_id
;
6624 uint32_t shaders_shm_offset
;
6625 uint32_t binaryformat
;
6626 uint32_t binary_shm_id
;
6627 uint32_t binary_shm_offset
;
6631 static_assert(sizeof(ShaderBinary
) == 32, "size of ShaderBinary should be 32");
6632 static_assert(offsetof(ShaderBinary
, header
) == 0,
6633 "offset of ShaderBinary header should be 0");
6634 static_assert(offsetof(ShaderBinary
, n
) == 4,
6635 "offset of ShaderBinary n should be 4");
6636 static_assert(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
6637 "offset of ShaderBinary shaders_shm_id should be 8");
6638 static_assert(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
6639 "offset of ShaderBinary shaders_shm_offset should be 12");
6640 static_assert(offsetof(ShaderBinary
, binaryformat
) == 16,
6641 "offset of ShaderBinary binaryformat should be 16");
6642 static_assert(offsetof(ShaderBinary
, binary_shm_id
) == 20,
6643 "offset of ShaderBinary binary_shm_id should be 20");
6644 static_assert(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
6645 "offset of ShaderBinary binary_shm_offset should be 24");
6646 static_assert(offsetof(ShaderBinary
, length
) == 28,
6647 "offset of ShaderBinary length should be 28");
6649 struct ShaderSourceBucket
{
6650 typedef ShaderSourceBucket ValueType
;
6651 static const CommandId kCmdId
= kShaderSourceBucket
;
6652 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6653 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6655 static uint32_t ComputeSize() {
6656 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6659 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6661 void Init(GLuint _shader
, uint32_t _str_bucket_id
) {
6664 str_bucket_id
= _str_bucket_id
;
6667 void* Set(void* cmd
, GLuint _shader
, uint32_t _str_bucket_id
) {
6668 static_cast<ValueType
*>(cmd
)->Init(_shader
, _str_bucket_id
);
6669 return NextCmdAddress
<ValueType
>(cmd
);
6672 gpu::CommandHeader header
;
6674 uint32_t str_bucket_id
;
6677 static_assert(sizeof(ShaderSourceBucket
) == 12,
6678 "size of ShaderSourceBucket should be 12");
6679 static_assert(offsetof(ShaderSourceBucket
, header
) == 0,
6680 "offset of ShaderSourceBucket header should be 0");
6681 static_assert(offsetof(ShaderSourceBucket
, shader
) == 4,
6682 "offset of ShaderSourceBucket shader should be 4");
6683 static_assert(offsetof(ShaderSourceBucket
, str_bucket_id
) == 8,
6684 "offset of ShaderSourceBucket str_bucket_id should be 8");
6686 struct StencilFunc
{
6687 typedef StencilFunc ValueType
;
6688 static const CommandId kCmdId
= kStencilFunc
;
6689 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6690 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6692 static uint32_t ComputeSize() {
6693 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6696 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6698 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
6705 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6706 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
6707 return NextCmdAddress
<ValueType
>(cmd
);
6710 gpu::CommandHeader header
;
6716 static_assert(sizeof(StencilFunc
) == 16, "size of StencilFunc should be 16");
6717 static_assert(offsetof(StencilFunc
, header
) == 0,
6718 "offset of StencilFunc header should be 0");
6719 static_assert(offsetof(StencilFunc
, func
) == 4,
6720 "offset of StencilFunc func should be 4");
6721 static_assert(offsetof(StencilFunc
, ref
) == 8,
6722 "offset of StencilFunc ref should be 8");
6723 static_assert(offsetof(StencilFunc
, mask
) == 12,
6724 "offset of StencilFunc mask should be 12");
6726 struct StencilFuncSeparate
{
6727 typedef StencilFuncSeparate ValueType
;
6728 static const CommandId kCmdId
= kStencilFuncSeparate
;
6729 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6730 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6732 static uint32_t ComputeSize() {
6733 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6736 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6738 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6746 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
6747 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
6748 return NextCmdAddress
<ValueType
>(cmd
);
6751 gpu::CommandHeader header
;
6758 static_assert(sizeof(StencilFuncSeparate
) == 20,
6759 "size of StencilFuncSeparate should be 20");
6760 static_assert(offsetof(StencilFuncSeparate
, header
) == 0,
6761 "offset of StencilFuncSeparate header should be 0");
6762 static_assert(offsetof(StencilFuncSeparate
, face
) == 4,
6763 "offset of StencilFuncSeparate face should be 4");
6764 static_assert(offsetof(StencilFuncSeparate
, func
) == 8,
6765 "offset of StencilFuncSeparate func should be 8");
6766 static_assert(offsetof(StencilFuncSeparate
, ref
) == 12,
6767 "offset of StencilFuncSeparate ref should be 12");
6768 static_assert(offsetof(StencilFuncSeparate
, mask
) == 16,
6769 "offset of StencilFuncSeparate mask should be 16");
6771 struct StencilMask
{
6772 typedef StencilMask ValueType
;
6773 static const CommandId kCmdId
= kStencilMask
;
6774 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6775 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6777 static uint32_t ComputeSize() {
6778 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6781 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6783 void Init(GLuint _mask
) {
6788 void* Set(void* cmd
, GLuint _mask
) {
6789 static_cast<ValueType
*>(cmd
)->Init(_mask
);
6790 return NextCmdAddress
<ValueType
>(cmd
);
6793 gpu::CommandHeader header
;
6797 static_assert(sizeof(StencilMask
) == 8, "size of StencilMask should be 8");
6798 static_assert(offsetof(StencilMask
, header
) == 0,
6799 "offset of StencilMask header should be 0");
6800 static_assert(offsetof(StencilMask
, mask
) == 4,
6801 "offset of StencilMask mask should be 4");
6803 struct StencilMaskSeparate
{
6804 typedef StencilMaskSeparate ValueType
;
6805 static const CommandId kCmdId
= kStencilMaskSeparate
;
6806 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6807 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6809 static uint32_t ComputeSize() {
6810 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6813 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6815 void Init(GLenum _face
, GLuint _mask
) {
6821 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
6822 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
6823 return NextCmdAddress
<ValueType
>(cmd
);
6826 gpu::CommandHeader header
;
6831 static_assert(sizeof(StencilMaskSeparate
) == 12,
6832 "size of StencilMaskSeparate should be 12");
6833 static_assert(offsetof(StencilMaskSeparate
, header
) == 0,
6834 "offset of StencilMaskSeparate header should be 0");
6835 static_assert(offsetof(StencilMaskSeparate
, face
) == 4,
6836 "offset of StencilMaskSeparate face should be 4");
6837 static_assert(offsetof(StencilMaskSeparate
, mask
) == 8,
6838 "offset of StencilMaskSeparate mask should be 8");
6841 typedef StencilOp ValueType
;
6842 static const CommandId kCmdId
= kStencilOp
;
6843 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6844 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6846 static uint32_t ComputeSize() {
6847 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6850 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6852 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6859 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6860 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
6861 return NextCmdAddress
<ValueType
>(cmd
);
6864 gpu::CommandHeader header
;
6870 static_assert(sizeof(StencilOp
) == 16, "size of StencilOp should be 16");
6871 static_assert(offsetof(StencilOp
, header
) == 0,
6872 "offset of StencilOp header should be 0");
6873 static_assert(offsetof(StencilOp
, fail
) == 4,
6874 "offset of StencilOp fail should be 4");
6875 static_assert(offsetof(StencilOp
, zfail
) == 8,
6876 "offset of StencilOp zfail should be 8");
6877 static_assert(offsetof(StencilOp
, zpass
) == 12,
6878 "offset of StencilOp zpass should be 12");
6880 struct StencilOpSeparate
{
6881 typedef StencilOpSeparate ValueType
;
6882 static const CommandId kCmdId
= kStencilOpSeparate
;
6883 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6884 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6886 static uint32_t ComputeSize() {
6887 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6890 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6892 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
6900 void* Set(void* cmd
,
6905 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
6906 return NextCmdAddress
<ValueType
>(cmd
);
6909 gpu::CommandHeader header
;
6916 static_assert(sizeof(StencilOpSeparate
) == 20,
6917 "size of StencilOpSeparate should be 20");
6918 static_assert(offsetof(StencilOpSeparate
, header
) == 0,
6919 "offset of StencilOpSeparate header should be 0");
6920 static_assert(offsetof(StencilOpSeparate
, face
) == 4,
6921 "offset of StencilOpSeparate face should be 4");
6922 static_assert(offsetof(StencilOpSeparate
, fail
) == 8,
6923 "offset of StencilOpSeparate fail should be 8");
6924 static_assert(offsetof(StencilOpSeparate
, zfail
) == 12,
6925 "offset of StencilOpSeparate zfail should be 12");
6926 static_assert(offsetof(StencilOpSeparate
, zpass
) == 16,
6927 "offset of StencilOpSeparate zpass should be 16");
6930 typedef TexImage2D ValueType
;
6931 static const CommandId kCmdId
= kTexImage2D
;
6932 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6933 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6935 static uint32_t ComputeSize() {
6936 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6939 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6941 void Init(GLenum _target
,
6943 GLint _internalformat
,
6948 uint32_t _pixels_shm_id
,
6949 uint32_t _pixels_shm_offset
) {
6953 internalformat
= _internalformat
;
6958 pixels_shm_id
= _pixels_shm_id
;
6959 pixels_shm_offset
= _pixels_shm_offset
;
6962 void* Set(void* cmd
,
6965 GLint _internalformat
,
6970 uint32_t _pixels_shm_id
,
6971 uint32_t _pixels_shm_offset
) {
6972 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
6973 _height
, _format
, _type
, _pixels_shm_id
,
6974 _pixels_shm_offset
);
6975 return NextCmdAddress
<ValueType
>(cmd
);
6978 gpu::CommandHeader header
;
6981 int32_t internalformat
;
6986 uint32_t pixels_shm_id
;
6987 uint32_t pixels_shm_offset
;
6988 static const int32_t border
= 0;
6991 static_assert(sizeof(TexImage2D
) == 40, "size of TexImage2D should be 40");
6992 static_assert(offsetof(TexImage2D
, header
) == 0,
6993 "offset of TexImage2D header should be 0");
6994 static_assert(offsetof(TexImage2D
, target
) == 4,
6995 "offset of TexImage2D target should be 4");
6996 static_assert(offsetof(TexImage2D
, level
) == 8,
6997 "offset of TexImage2D level should be 8");
6998 static_assert(offsetof(TexImage2D
, internalformat
) == 12,
6999 "offset of TexImage2D internalformat should be 12");
7000 static_assert(offsetof(TexImage2D
, width
) == 16,
7001 "offset of TexImage2D width should be 16");
7002 static_assert(offsetof(TexImage2D
, height
) == 20,
7003 "offset of TexImage2D height should be 20");
7004 static_assert(offsetof(TexImage2D
, format
) == 24,
7005 "offset of TexImage2D format should be 24");
7006 static_assert(offsetof(TexImage2D
, type
) == 28,
7007 "offset of TexImage2D type should be 28");
7008 static_assert(offsetof(TexImage2D
, pixels_shm_id
) == 32,
7009 "offset of TexImage2D pixels_shm_id should be 32");
7010 static_assert(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
7011 "offset of TexImage2D pixels_shm_offset should be 36");
7014 typedef TexImage3D ValueType
;
7015 static const CommandId kCmdId
= kTexImage3D
;
7016 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7017 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7019 static uint32_t ComputeSize() {
7020 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7023 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7025 void Init(GLenum _target
,
7027 GLint _internalformat
,
7033 uint32_t _pixels_shm_id
,
7034 uint32_t _pixels_shm_offset
) {
7038 internalformat
= _internalformat
;
7044 pixels_shm_id
= _pixels_shm_id
;
7045 pixels_shm_offset
= _pixels_shm_offset
;
7048 void* Set(void* cmd
,
7051 GLint _internalformat
,
7057 uint32_t _pixels_shm_id
,
7058 uint32_t _pixels_shm_offset
) {
7059 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7060 _height
, _depth
, _format
, _type
,
7061 _pixels_shm_id
, _pixels_shm_offset
);
7062 return NextCmdAddress
<ValueType
>(cmd
);
7065 gpu::CommandHeader header
;
7068 int32_t internalformat
;
7074 uint32_t pixels_shm_id
;
7075 uint32_t pixels_shm_offset
;
7076 static const int32_t border
= 0;
7079 static_assert(sizeof(TexImage3D
) == 44, "size of TexImage3D should be 44");
7080 static_assert(offsetof(TexImage3D
, header
) == 0,
7081 "offset of TexImage3D header should be 0");
7082 static_assert(offsetof(TexImage3D
, target
) == 4,
7083 "offset of TexImage3D target should be 4");
7084 static_assert(offsetof(TexImage3D
, level
) == 8,
7085 "offset of TexImage3D level should be 8");
7086 static_assert(offsetof(TexImage3D
, internalformat
) == 12,
7087 "offset of TexImage3D internalformat should be 12");
7088 static_assert(offsetof(TexImage3D
, width
) == 16,
7089 "offset of TexImage3D width should be 16");
7090 static_assert(offsetof(TexImage3D
, height
) == 20,
7091 "offset of TexImage3D height should be 20");
7092 static_assert(offsetof(TexImage3D
, depth
) == 24,
7093 "offset of TexImage3D depth should be 24");
7094 static_assert(offsetof(TexImage3D
, format
) == 28,
7095 "offset of TexImage3D format should be 28");
7096 static_assert(offsetof(TexImage3D
, type
) == 32,
7097 "offset of TexImage3D type should be 32");
7098 static_assert(offsetof(TexImage3D
, pixels_shm_id
) == 36,
7099 "offset of TexImage3D pixels_shm_id should be 36");
7100 static_assert(offsetof(TexImage3D
, pixels_shm_offset
) == 40,
7101 "offset of TexImage3D pixels_shm_offset should be 40");
7103 struct TexParameterf
{
7104 typedef TexParameterf ValueType
;
7105 static const CommandId kCmdId
= kTexParameterf
;
7106 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7107 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7109 static uint32_t ComputeSize() {
7110 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7113 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7115 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
7122 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
7123 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7124 return NextCmdAddress
<ValueType
>(cmd
);
7127 gpu::CommandHeader header
;
7133 static_assert(sizeof(TexParameterf
) == 16,
7134 "size of TexParameterf should be 16");
7135 static_assert(offsetof(TexParameterf
, header
) == 0,
7136 "offset of TexParameterf header should be 0");
7137 static_assert(offsetof(TexParameterf
, target
) == 4,
7138 "offset of TexParameterf target should be 4");
7139 static_assert(offsetof(TexParameterf
, pname
) == 8,
7140 "offset of TexParameterf pname should be 8");
7141 static_assert(offsetof(TexParameterf
, param
) == 12,
7142 "offset of TexParameterf param should be 12");
7144 struct TexParameterfvImmediate
{
7145 typedef TexParameterfvImmediate ValueType
;
7146 static const CommandId kCmdId
= kTexParameterfvImmediate
;
7147 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7148 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7150 static uint32_t ComputeDataSize() {
7151 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
7154 static uint32_t ComputeSize() {
7155 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7158 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7160 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7164 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7167 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7168 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7169 const uint32_t size
= ComputeSize();
7170 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7173 gpu::CommandHeader header
;
7178 static_assert(sizeof(TexParameterfvImmediate
) == 12,
7179 "size of TexParameterfvImmediate should be 12");
7180 static_assert(offsetof(TexParameterfvImmediate
, header
) == 0,
7181 "offset of TexParameterfvImmediate header should be 0");
7182 static_assert(offsetof(TexParameterfvImmediate
, target
) == 4,
7183 "offset of TexParameterfvImmediate target should be 4");
7184 static_assert(offsetof(TexParameterfvImmediate
, pname
) == 8,
7185 "offset of TexParameterfvImmediate pname should be 8");
7187 struct TexParameteri
{
7188 typedef TexParameteri ValueType
;
7189 static const CommandId kCmdId
= kTexParameteri
;
7190 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7191 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7193 static uint32_t ComputeSize() {
7194 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7197 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7199 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
7206 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
7207 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7208 return NextCmdAddress
<ValueType
>(cmd
);
7211 gpu::CommandHeader header
;
7217 static_assert(sizeof(TexParameteri
) == 16,
7218 "size of TexParameteri should be 16");
7219 static_assert(offsetof(TexParameteri
, header
) == 0,
7220 "offset of TexParameteri header should be 0");
7221 static_assert(offsetof(TexParameteri
, target
) == 4,
7222 "offset of TexParameteri target should be 4");
7223 static_assert(offsetof(TexParameteri
, pname
) == 8,
7224 "offset of TexParameteri pname should be 8");
7225 static_assert(offsetof(TexParameteri
, param
) == 12,
7226 "offset of TexParameteri param should be 12");
7228 struct TexParameterivImmediate
{
7229 typedef TexParameterivImmediate ValueType
;
7230 static const CommandId kCmdId
= kTexParameterivImmediate
;
7231 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7232 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7234 static uint32_t ComputeDataSize() {
7235 return static_cast<uint32_t>(sizeof(GLint
) * 1);
7238 static uint32_t ComputeSize() {
7239 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7242 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7244 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7248 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7251 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7252 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7253 const uint32_t size
= ComputeSize();
7254 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7257 gpu::CommandHeader header
;
7262 static_assert(sizeof(TexParameterivImmediate
) == 12,
7263 "size of TexParameterivImmediate should be 12");
7264 static_assert(offsetof(TexParameterivImmediate
, header
) == 0,
7265 "offset of TexParameterivImmediate header should be 0");
7266 static_assert(offsetof(TexParameterivImmediate
, target
) == 4,
7267 "offset of TexParameterivImmediate target should be 4");
7268 static_assert(offsetof(TexParameterivImmediate
, pname
) == 8,
7269 "offset of TexParameterivImmediate pname should be 8");
7271 struct TexStorage3D
{
7272 typedef TexStorage3D ValueType
;
7273 static const CommandId kCmdId
= kTexStorage3D
;
7274 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7275 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7277 static uint32_t ComputeSize() {
7278 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7281 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7283 void Init(GLenum _target
,
7285 GLenum _internalFormat
,
7292 internalFormat
= _internalFormat
;
7298 void* Set(void* cmd
,
7301 GLenum _internalFormat
,
7305 static_cast<ValueType
*>(cmd
)
7306 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
, _depth
);
7307 return NextCmdAddress
<ValueType
>(cmd
);
7310 gpu::CommandHeader header
;
7313 uint32_t internalFormat
;
7319 static_assert(sizeof(TexStorage3D
) == 28, "size of TexStorage3D should be 28");
7320 static_assert(offsetof(TexStorage3D
, header
) == 0,
7321 "offset of TexStorage3D header should be 0");
7322 static_assert(offsetof(TexStorage3D
, target
) == 4,
7323 "offset of TexStorage3D target should be 4");
7324 static_assert(offsetof(TexStorage3D
, levels
) == 8,
7325 "offset of TexStorage3D levels should be 8");
7326 static_assert(offsetof(TexStorage3D
, internalFormat
) == 12,
7327 "offset of TexStorage3D internalFormat should be 12");
7328 static_assert(offsetof(TexStorage3D
, width
) == 16,
7329 "offset of TexStorage3D width should be 16");
7330 static_assert(offsetof(TexStorage3D
, height
) == 20,
7331 "offset of TexStorage3D height should be 20");
7332 static_assert(offsetof(TexStorage3D
, depth
) == 24,
7333 "offset of TexStorage3D depth should be 24");
7335 struct TexSubImage2D
{
7336 typedef TexSubImage2D ValueType
;
7337 static const CommandId kCmdId
= kTexSubImage2D
;
7338 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7339 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7341 static uint32_t ComputeSize() {
7342 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7345 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7347 void Init(GLenum _target
,
7355 uint32_t _pixels_shm_id
,
7356 uint32_t _pixels_shm_offset
,
7357 GLboolean _internal
) {
7367 pixels_shm_id
= _pixels_shm_id
;
7368 pixels_shm_offset
= _pixels_shm_offset
;
7369 internal
= _internal
;
7372 void* Set(void* cmd
,
7381 uint32_t _pixels_shm_id
,
7382 uint32_t _pixels_shm_offset
,
7383 GLboolean _internal
) {
7384 static_cast<ValueType
*>(cmd
)
7385 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
7386 _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7387 return NextCmdAddress
<ValueType
>(cmd
);
7390 gpu::CommandHeader header
;
7399 uint32_t pixels_shm_id
;
7400 uint32_t pixels_shm_offset
;
7404 static_assert(sizeof(TexSubImage2D
) == 48,
7405 "size of TexSubImage2D should be 48");
7406 static_assert(offsetof(TexSubImage2D
, header
) == 0,
7407 "offset of TexSubImage2D header should be 0");
7408 static_assert(offsetof(TexSubImage2D
, target
) == 4,
7409 "offset of TexSubImage2D target should be 4");
7410 static_assert(offsetof(TexSubImage2D
, level
) == 8,
7411 "offset of TexSubImage2D level should be 8");
7412 static_assert(offsetof(TexSubImage2D
, xoffset
) == 12,
7413 "offset of TexSubImage2D xoffset should be 12");
7414 static_assert(offsetof(TexSubImage2D
, yoffset
) == 16,
7415 "offset of TexSubImage2D yoffset should be 16");
7416 static_assert(offsetof(TexSubImage2D
, width
) == 20,
7417 "offset of TexSubImage2D width should be 20");
7418 static_assert(offsetof(TexSubImage2D
, height
) == 24,
7419 "offset of TexSubImage2D height should be 24");
7420 static_assert(offsetof(TexSubImage2D
, format
) == 28,
7421 "offset of TexSubImage2D format should be 28");
7422 static_assert(offsetof(TexSubImage2D
, type
) == 32,
7423 "offset of TexSubImage2D type should be 32");
7424 static_assert(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
7425 "offset of TexSubImage2D pixels_shm_id should be 36");
7426 static_assert(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
7427 "offset of TexSubImage2D pixels_shm_offset should be 40");
7428 static_assert(offsetof(TexSubImage2D
, internal
) == 44,
7429 "offset of TexSubImage2D internal should be 44");
7431 struct TexSubImage3D
{
7432 typedef TexSubImage3D ValueType
;
7433 static const CommandId kCmdId
= kTexSubImage3D
;
7434 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7435 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7437 static uint32_t ComputeSize() {
7438 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7441 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7443 void Init(GLenum _target
,
7453 uint32_t _pixels_shm_id
,
7454 uint32_t _pixels_shm_offset
,
7455 GLboolean _internal
) {
7467 pixels_shm_id
= _pixels_shm_id
;
7468 pixels_shm_offset
= _pixels_shm_offset
;
7469 internal
= _internal
;
7472 void* Set(void* cmd
,
7483 uint32_t _pixels_shm_id
,
7484 uint32_t _pixels_shm_offset
,
7485 GLboolean _internal
) {
7486 static_cast<ValueType
*>(cmd
)->Init(
7487 _target
, _level
, _xoffset
, _yoffset
, _zoffset
, _width
, _height
, _depth
,
7488 _format
, _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
7489 return NextCmdAddress
<ValueType
>(cmd
);
7492 gpu::CommandHeader header
;
7503 uint32_t pixels_shm_id
;
7504 uint32_t pixels_shm_offset
;
7508 static_assert(sizeof(TexSubImage3D
) == 56,
7509 "size of TexSubImage3D should be 56");
7510 static_assert(offsetof(TexSubImage3D
, header
) == 0,
7511 "offset of TexSubImage3D header should be 0");
7512 static_assert(offsetof(TexSubImage3D
, target
) == 4,
7513 "offset of TexSubImage3D target should be 4");
7514 static_assert(offsetof(TexSubImage3D
, level
) == 8,
7515 "offset of TexSubImage3D level should be 8");
7516 static_assert(offsetof(TexSubImage3D
, xoffset
) == 12,
7517 "offset of TexSubImage3D xoffset should be 12");
7518 static_assert(offsetof(TexSubImage3D
, yoffset
) == 16,
7519 "offset of TexSubImage3D yoffset should be 16");
7520 static_assert(offsetof(TexSubImage3D
, zoffset
) == 20,
7521 "offset of TexSubImage3D zoffset should be 20");
7522 static_assert(offsetof(TexSubImage3D
, width
) == 24,
7523 "offset of TexSubImage3D width should be 24");
7524 static_assert(offsetof(TexSubImage3D
, height
) == 28,
7525 "offset of TexSubImage3D height should be 28");
7526 static_assert(offsetof(TexSubImage3D
, depth
) == 32,
7527 "offset of TexSubImage3D depth should be 32");
7528 static_assert(offsetof(TexSubImage3D
, format
) == 36,
7529 "offset of TexSubImage3D format should be 36");
7530 static_assert(offsetof(TexSubImage3D
, type
) == 40,
7531 "offset of TexSubImage3D type should be 40");
7532 static_assert(offsetof(TexSubImage3D
, pixels_shm_id
) == 44,
7533 "offset of TexSubImage3D pixels_shm_id should be 44");
7534 static_assert(offsetof(TexSubImage3D
, pixels_shm_offset
) == 48,
7535 "offset of TexSubImage3D pixels_shm_offset should be 48");
7536 static_assert(offsetof(TexSubImage3D
, internal
) == 52,
7537 "offset of TexSubImage3D internal should be 52");
7539 struct TransformFeedbackVaryingsBucket
{
7540 typedef TransformFeedbackVaryingsBucket ValueType
;
7541 static const CommandId kCmdId
= kTransformFeedbackVaryingsBucket
;
7542 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7543 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7545 static uint32_t ComputeSize() {
7546 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7549 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7551 void Init(GLuint _program
, uint32_t _varyings_bucket_id
, GLenum _buffermode
) {
7554 varyings_bucket_id
= _varyings_bucket_id
;
7555 buffermode
= _buffermode
;
7558 void* Set(void* cmd
,
7560 uint32_t _varyings_bucket_id
,
7561 GLenum _buffermode
) {
7562 static_cast<ValueType
*>(cmd
)
7563 ->Init(_program
, _varyings_bucket_id
, _buffermode
);
7564 return NextCmdAddress
<ValueType
>(cmd
);
7567 gpu::CommandHeader header
;
7569 uint32_t varyings_bucket_id
;
7570 uint32_t buffermode
;
7573 static_assert(sizeof(TransformFeedbackVaryingsBucket
) == 16,
7574 "size of TransformFeedbackVaryingsBucket should be 16");
7575 static_assert(offsetof(TransformFeedbackVaryingsBucket
, header
) == 0,
7576 "offset of TransformFeedbackVaryingsBucket header should be 0");
7577 static_assert(offsetof(TransformFeedbackVaryingsBucket
, program
) == 4,
7578 "offset of TransformFeedbackVaryingsBucket program should be 4");
7580 offsetof(TransformFeedbackVaryingsBucket
, varyings_bucket_id
) == 8,
7581 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
7583 offsetof(TransformFeedbackVaryingsBucket
, buffermode
) == 12,
7584 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
7587 typedef Uniform1f ValueType
;
7588 static const CommandId kCmdId
= kUniform1f
;
7589 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7590 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7592 static uint32_t ComputeSize() {
7593 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7596 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7598 void Init(GLint _location
, GLfloat _x
) {
7600 location
= _location
;
7604 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
7605 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7606 return NextCmdAddress
<ValueType
>(cmd
);
7609 gpu::CommandHeader header
;
7614 static_assert(sizeof(Uniform1f
) == 12, "size of Uniform1f should be 12");
7615 static_assert(offsetof(Uniform1f
, header
) == 0,
7616 "offset of Uniform1f header should be 0");
7617 static_assert(offsetof(Uniform1f
, location
) == 4,
7618 "offset of Uniform1f location should be 4");
7619 static_assert(offsetof(Uniform1f
, x
) == 8, "offset of Uniform1f x should be 8");
7621 struct Uniform1fvImmediate
{
7622 typedef Uniform1fvImmediate ValueType
;
7623 static const CommandId kCmdId
= kUniform1fvImmediate
;
7624 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7625 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7627 static uint32_t ComputeDataSize(GLsizei count
) {
7628 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
7631 static uint32_t ComputeSize(GLsizei count
) {
7632 return static_cast<uint32_t>(sizeof(ValueType
) +
7633 ComputeDataSize(count
)); // NOLINT
7636 void SetHeader(GLsizei count
) {
7637 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7640 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7642 location
= _location
;
7644 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7647 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7648 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7649 const uint32_t size
= ComputeSize(_count
);
7650 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7653 gpu::CommandHeader header
;
7658 static_assert(sizeof(Uniform1fvImmediate
) == 12,
7659 "size of Uniform1fvImmediate should be 12");
7660 static_assert(offsetof(Uniform1fvImmediate
, header
) == 0,
7661 "offset of Uniform1fvImmediate header should be 0");
7662 static_assert(offsetof(Uniform1fvImmediate
, location
) == 4,
7663 "offset of Uniform1fvImmediate location should be 4");
7664 static_assert(offsetof(Uniform1fvImmediate
, count
) == 8,
7665 "offset of Uniform1fvImmediate count should be 8");
7668 typedef Uniform1i ValueType
;
7669 static const CommandId kCmdId
= kUniform1i
;
7670 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7671 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7673 static uint32_t ComputeSize() {
7674 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7677 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7679 void Init(GLint _location
, GLint _x
) {
7681 location
= _location
;
7685 void* Set(void* cmd
, GLint _location
, GLint _x
) {
7686 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7687 return NextCmdAddress
<ValueType
>(cmd
);
7690 gpu::CommandHeader header
;
7695 static_assert(sizeof(Uniform1i
) == 12, "size of Uniform1i should be 12");
7696 static_assert(offsetof(Uniform1i
, header
) == 0,
7697 "offset of Uniform1i header should be 0");
7698 static_assert(offsetof(Uniform1i
, location
) == 4,
7699 "offset of Uniform1i location should be 4");
7700 static_assert(offsetof(Uniform1i
, x
) == 8, "offset of Uniform1i x should be 8");
7702 struct Uniform1ivImmediate
{
7703 typedef Uniform1ivImmediate ValueType
;
7704 static const CommandId kCmdId
= kUniform1ivImmediate
;
7705 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7706 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7708 static uint32_t ComputeDataSize(GLsizei count
) {
7709 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
7712 static uint32_t ComputeSize(GLsizei count
) {
7713 return static_cast<uint32_t>(sizeof(ValueType
) +
7714 ComputeDataSize(count
)); // NOLINT
7717 void SetHeader(GLsizei count
) {
7718 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7721 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
7723 location
= _location
;
7725 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7728 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
7729 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7730 const uint32_t size
= ComputeSize(_count
);
7731 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7734 gpu::CommandHeader header
;
7739 static_assert(sizeof(Uniform1ivImmediate
) == 12,
7740 "size of Uniform1ivImmediate should be 12");
7741 static_assert(offsetof(Uniform1ivImmediate
, header
) == 0,
7742 "offset of Uniform1ivImmediate header should be 0");
7743 static_assert(offsetof(Uniform1ivImmediate
, location
) == 4,
7744 "offset of Uniform1ivImmediate location should be 4");
7745 static_assert(offsetof(Uniform1ivImmediate
, count
) == 8,
7746 "offset of Uniform1ivImmediate count should be 8");
7749 typedef Uniform1ui ValueType
;
7750 static const CommandId kCmdId
= kUniform1ui
;
7751 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7752 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7754 static uint32_t ComputeSize() {
7755 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7758 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7760 void Init(GLint _location
, GLuint _x
) {
7762 location
= _location
;
7766 void* Set(void* cmd
, GLint _location
, GLuint _x
) {
7767 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
7768 return NextCmdAddress
<ValueType
>(cmd
);
7771 gpu::CommandHeader header
;
7776 static_assert(sizeof(Uniform1ui
) == 12, "size of Uniform1ui should be 12");
7777 static_assert(offsetof(Uniform1ui
, header
) == 0,
7778 "offset of Uniform1ui header should be 0");
7779 static_assert(offsetof(Uniform1ui
, location
) == 4,
7780 "offset of Uniform1ui location should be 4");
7781 static_assert(offsetof(Uniform1ui
, x
) == 8,
7782 "offset of Uniform1ui x should be 8");
7784 struct Uniform1uivImmediate
{
7785 typedef Uniform1uivImmediate ValueType
;
7786 static const CommandId kCmdId
= kUniform1uivImmediate
;
7787 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7788 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7790 static uint32_t ComputeDataSize(GLsizei count
) {
7791 return static_cast<uint32_t>(sizeof(GLuint
) * 1 * count
); // NOLINT
7794 static uint32_t ComputeSize(GLsizei count
) {
7795 return static_cast<uint32_t>(sizeof(ValueType
) +
7796 ComputeDataSize(count
)); // NOLINT
7799 void SetHeader(GLsizei count
) {
7800 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7803 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
7805 location
= _location
;
7807 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7810 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
7811 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7812 const uint32_t size
= ComputeSize(_count
);
7813 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7816 gpu::CommandHeader header
;
7821 static_assert(sizeof(Uniform1uivImmediate
) == 12,
7822 "size of Uniform1uivImmediate should be 12");
7823 static_assert(offsetof(Uniform1uivImmediate
, header
) == 0,
7824 "offset of Uniform1uivImmediate header should be 0");
7825 static_assert(offsetof(Uniform1uivImmediate
, location
) == 4,
7826 "offset of Uniform1uivImmediate location should be 4");
7827 static_assert(offsetof(Uniform1uivImmediate
, count
) == 8,
7828 "offset of Uniform1uivImmediate count should be 8");
7831 typedef Uniform2f ValueType
;
7832 static const CommandId kCmdId
= kUniform2f
;
7833 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7834 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7836 static uint32_t ComputeSize() {
7837 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7840 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7842 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
7844 location
= _location
;
7849 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
7850 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
7851 return NextCmdAddress
<ValueType
>(cmd
);
7854 gpu::CommandHeader header
;
7860 static_assert(sizeof(Uniform2f
) == 16, "size of Uniform2f should be 16");
7861 static_assert(offsetof(Uniform2f
, header
) == 0,
7862 "offset of Uniform2f header should be 0");
7863 static_assert(offsetof(Uniform2f
, location
) == 4,
7864 "offset of Uniform2f location should be 4");
7865 static_assert(offsetof(Uniform2f
, x
) == 8, "offset of Uniform2f x should be 8");
7866 static_assert(offsetof(Uniform2f
, y
) == 12,
7867 "offset of Uniform2f y should be 12");
7869 struct Uniform2fvImmediate
{
7870 typedef Uniform2fvImmediate ValueType
;
7871 static const CommandId kCmdId
= kUniform2fvImmediate
;
7872 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7873 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7875 static uint32_t ComputeDataSize(GLsizei count
) {
7876 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
7879 static uint32_t ComputeSize(GLsizei count
) {
7880 return static_cast<uint32_t>(sizeof(ValueType
) +
7881 ComputeDataSize(count
)); // NOLINT
7884 void SetHeader(GLsizei count
) {
7885 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7888 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7890 location
= _location
;
7892 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7895 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
7896 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7897 const uint32_t size
= ComputeSize(_count
);
7898 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7901 gpu::CommandHeader header
;
7906 static_assert(sizeof(Uniform2fvImmediate
) == 12,
7907 "size of Uniform2fvImmediate should be 12");
7908 static_assert(offsetof(Uniform2fvImmediate
, header
) == 0,
7909 "offset of Uniform2fvImmediate header should be 0");
7910 static_assert(offsetof(Uniform2fvImmediate
, location
) == 4,
7911 "offset of Uniform2fvImmediate location should be 4");
7912 static_assert(offsetof(Uniform2fvImmediate
, count
) == 8,
7913 "offset of Uniform2fvImmediate count should be 8");
7916 typedef Uniform2i ValueType
;
7917 static const CommandId kCmdId
= kUniform2i
;
7918 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7919 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7921 static uint32_t ComputeSize() {
7922 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7925 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7927 void Init(GLint _location
, GLint _x
, GLint _y
) {
7929 location
= _location
;
7934 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
7935 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
7936 return NextCmdAddress
<ValueType
>(cmd
);
7939 gpu::CommandHeader header
;
7945 static_assert(sizeof(Uniform2i
) == 16, "size of Uniform2i should be 16");
7946 static_assert(offsetof(Uniform2i
, header
) == 0,
7947 "offset of Uniform2i header should be 0");
7948 static_assert(offsetof(Uniform2i
, location
) == 4,
7949 "offset of Uniform2i location should be 4");
7950 static_assert(offsetof(Uniform2i
, x
) == 8, "offset of Uniform2i x should be 8");
7951 static_assert(offsetof(Uniform2i
, y
) == 12,
7952 "offset of Uniform2i y should be 12");
7954 struct Uniform2ivImmediate
{
7955 typedef Uniform2ivImmediate ValueType
;
7956 static const CommandId kCmdId
= kUniform2ivImmediate
;
7957 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7958 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7960 static uint32_t ComputeDataSize(GLsizei count
) {
7961 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
7964 static uint32_t ComputeSize(GLsizei count
) {
7965 return static_cast<uint32_t>(sizeof(ValueType
) +
7966 ComputeDataSize(count
)); // NOLINT
7969 void SetHeader(GLsizei count
) {
7970 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
7973 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
7975 location
= _location
;
7977 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
7980 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
7981 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
7982 const uint32_t size
= ComputeSize(_count
);
7983 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7986 gpu::CommandHeader header
;
7991 static_assert(sizeof(Uniform2ivImmediate
) == 12,
7992 "size of Uniform2ivImmediate should be 12");
7993 static_assert(offsetof(Uniform2ivImmediate
, header
) == 0,
7994 "offset of Uniform2ivImmediate header should be 0");
7995 static_assert(offsetof(Uniform2ivImmediate
, location
) == 4,
7996 "offset of Uniform2ivImmediate location should be 4");
7997 static_assert(offsetof(Uniform2ivImmediate
, count
) == 8,
7998 "offset of Uniform2ivImmediate count should be 8");
8001 typedef Uniform2ui ValueType
;
8002 static const CommandId kCmdId
= kUniform2ui
;
8003 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8004 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8006 static uint32_t ComputeSize() {
8007 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8010 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8012 void Init(GLint _location
, GLuint _x
, GLuint _y
) {
8014 location
= _location
;
8019 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
) {
8020 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8021 return NextCmdAddress
<ValueType
>(cmd
);
8024 gpu::CommandHeader header
;
8030 static_assert(sizeof(Uniform2ui
) == 16, "size of Uniform2ui should be 16");
8031 static_assert(offsetof(Uniform2ui
, header
) == 0,
8032 "offset of Uniform2ui header should be 0");
8033 static_assert(offsetof(Uniform2ui
, location
) == 4,
8034 "offset of Uniform2ui location should be 4");
8035 static_assert(offsetof(Uniform2ui
, x
) == 8,
8036 "offset of Uniform2ui x should be 8");
8037 static_assert(offsetof(Uniform2ui
, y
) == 12,
8038 "offset of Uniform2ui y should be 12");
8040 struct Uniform2uivImmediate
{
8041 typedef Uniform2uivImmediate ValueType
;
8042 static const CommandId kCmdId
= kUniform2uivImmediate
;
8043 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8044 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8046 static uint32_t ComputeDataSize(GLsizei count
) {
8047 return static_cast<uint32_t>(sizeof(GLuint
) * 2 * count
); // NOLINT
8050 static uint32_t ComputeSize(GLsizei count
) {
8051 return static_cast<uint32_t>(sizeof(ValueType
) +
8052 ComputeDataSize(count
)); // NOLINT
8055 void SetHeader(GLsizei count
) {
8056 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8059 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8061 location
= _location
;
8063 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8066 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8067 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8068 const uint32_t size
= ComputeSize(_count
);
8069 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8072 gpu::CommandHeader header
;
8077 static_assert(sizeof(Uniform2uivImmediate
) == 12,
8078 "size of Uniform2uivImmediate should be 12");
8079 static_assert(offsetof(Uniform2uivImmediate
, header
) == 0,
8080 "offset of Uniform2uivImmediate header should be 0");
8081 static_assert(offsetof(Uniform2uivImmediate
, location
) == 4,
8082 "offset of Uniform2uivImmediate location should be 4");
8083 static_assert(offsetof(Uniform2uivImmediate
, count
) == 8,
8084 "offset of Uniform2uivImmediate count should be 8");
8087 typedef Uniform3f ValueType
;
8088 static const CommandId kCmdId
= kUniform3f
;
8089 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8090 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8092 static uint32_t ComputeSize() {
8093 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8096 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8098 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8100 location
= _location
;
8106 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8107 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8108 return NextCmdAddress
<ValueType
>(cmd
);
8111 gpu::CommandHeader header
;
8118 static_assert(sizeof(Uniform3f
) == 20, "size of Uniform3f should be 20");
8119 static_assert(offsetof(Uniform3f
, header
) == 0,
8120 "offset of Uniform3f header should be 0");
8121 static_assert(offsetof(Uniform3f
, location
) == 4,
8122 "offset of Uniform3f location should be 4");
8123 static_assert(offsetof(Uniform3f
, x
) == 8, "offset of Uniform3f x should be 8");
8124 static_assert(offsetof(Uniform3f
, y
) == 12,
8125 "offset of Uniform3f y should be 12");
8126 static_assert(offsetof(Uniform3f
, z
) == 16,
8127 "offset of Uniform3f z should be 16");
8129 struct Uniform3fvImmediate
{
8130 typedef Uniform3fvImmediate ValueType
;
8131 static const CommandId kCmdId
= kUniform3fvImmediate
;
8132 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8133 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8135 static uint32_t ComputeDataSize(GLsizei count
) {
8136 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
8139 static uint32_t ComputeSize(GLsizei count
) {
8140 return static_cast<uint32_t>(sizeof(ValueType
) +
8141 ComputeDataSize(count
)); // NOLINT
8144 void SetHeader(GLsizei count
) {
8145 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8148 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8150 location
= _location
;
8152 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8155 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8156 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8157 const uint32_t size
= ComputeSize(_count
);
8158 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8161 gpu::CommandHeader header
;
8166 static_assert(sizeof(Uniform3fvImmediate
) == 12,
8167 "size of Uniform3fvImmediate should be 12");
8168 static_assert(offsetof(Uniform3fvImmediate
, header
) == 0,
8169 "offset of Uniform3fvImmediate header should be 0");
8170 static_assert(offsetof(Uniform3fvImmediate
, location
) == 4,
8171 "offset of Uniform3fvImmediate location should be 4");
8172 static_assert(offsetof(Uniform3fvImmediate
, count
) == 8,
8173 "offset of Uniform3fvImmediate count should be 8");
8176 typedef Uniform3i ValueType
;
8177 static const CommandId kCmdId
= kUniform3i
;
8178 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8179 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8181 static uint32_t ComputeSize() {
8182 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8185 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8187 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8189 location
= _location
;
8195 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8196 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8197 return NextCmdAddress
<ValueType
>(cmd
);
8200 gpu::CommandHeader header
;
8207 static_assert(sizeof(Uniform3i
) == 20, "size of Uniform3i should be 20");
8208 static_assert(offsetof(Uniform3i
, header
) == 0,
8209 "offset of Uniform3i header should be 0");
8210 static_assert(offsetof(Uniform3i
, location
) == 4,
8211 "offset of Uniform3i location should be 4");
8212 static_assert(offsetof(Uniform3i
, x
) == 8, "offset of Uniform3i x should be 8");
8213 static_assert(offsetof(Uniform3i
, y
) == 12,
8214 "offset of Uniform3i y should be 12");
8215 static_assert(offsetof(Uniform3i
, z
) == 16,
8216 "offset of Uniform3i z should be 16");
8218 struct Uniform3ivImmediate
{
8219 typedef Uniform3ivImmediate ValueType
;
8220 static const CommandId kCmdId
= kUniform3ivImmediate
;
8221 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8222 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8224 static uint32_t ComputeDataSize(GLsizei count
) {
8225 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
8228 static uint32_t ComputeSize(GLsizei count
) {
8229 return static_cast<uint32_t>(sizeof(ValueType
) +
8230 ComputeDataSize(count
)); // NOLINT
8233 void SetHeader(GLsizei count
) {
8234 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8237 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8239 location
= _location
;
8241 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8244 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8245 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8246 const uint32_t size
= ComputeSize(_count
);
8247 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8250 gpu::CommandHeader header
;
8255 static_assert(sizeof(Uniform3ivImmediate
) == 12,
8256 "size of Uniform3ivImmediate should be 12");
8257 static_assert(offsetof(Uniform3ivImmediate
, header
) == 0,
8258 "offset of Uniform3ivImmediate header should be 0");
8259 static_assert(offsetof(Uniform3ivImmediate
, location
) == 4,
8260 "offset of Uniform3ivImmediate location should be 4");
8261 static_assert(offsetof(Uniform3ivImmediate
, count
) == 8,
8262 "offset of Uniform3ivImmediate count should be 8");
8265 typedef Uniform3ui ValueType
;
8266 static const CommandId kCmdId
= kUniform3ui
;
8267 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8268 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8270 static uint32_t ComputeSize() {
8271 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8274 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8276 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8278 location
= _location
;
8284 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
8285 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8286 return NextCmdAddress
<ValueType
>(cmd
);
8289 gpu::CommandHeader header
;
8296 static_assert(sizeof(Uniform3ui
) == 20, "size of Uniform3ui should be 20");
8297 static_assert(offsetof(Uniform3ui
, header
) == 0,
8298 "offset of Uniform3ui header should be 0");
8299 static_assert(offsetof(Uniform3ui
, location
) == 4,
8300 "offset of Uniform3ui location should be 4");
8301 static_assert(offsetof(Uniform3ui
, x
) == 8,
8302 "offset of Uniform3ui x should be 8");
8303 static_assert(offsetof(Uniform3ui
, y
) == 12,
8304 "offset of Uniform3ui y should be 12");
8305 static_assert(offsetof(Uniform3ui
, z
) == 16,
8306 "offset of Uniform3ui z should be 16");
8308 struct Uniform3uivImmediate
{
8309 typedef Uniform3uivImmediate ValueType
;
8310 static const CommandId kCmdId
= kUniform3uivImmediate
;
8311 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8312 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8314 static uint32_t ComputeDataSize(GLsizei count
) {
8315 return static_cast<uint32_t>(sizeof(GLuint
) * 3 * count
); // NOLINT
8318 static uint32_t ComputeSize(GLsizei count
) {
8319 return static_cast<uint32_t>(sizeof(ValueType
) +
8320 ComputeDataSize(count
)); // NOLINT
8323 void SetHeader(GLsizei count
) {
8324 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8327 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8329 location
= _location
;
8331 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8334 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8335 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8336 const uint32_t size
= ComputeSize(_count
);
8337 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8340 gpu::CommandHeader header
;
8345 static_assert(sizeof(Uniform3uivImmediate
) == 12,
8346 "size of Uniform3uivImmediate should be 12");
8347 static_assert(offsetof(Uniform3uivImmediate
, header
) == 0,
8348 "offset of Uniform3uivImmediate header should be 0");
8349 static_assert(offsetof(Uniform3uivImmediate
, location
) == 4,
8350 "offset of Uniform3uivImmediate location should be 4");
8351 static_assert(offsetof(Uniform3uivImmediate
, count
) == 8,
8352 "offset of Uniform3uivImmediate count should be 8");
8355 typedef Uniform4f ValueType
;
8356 static const CommandId kCmdId
= kUniform4f
;
8357 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8358 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8360 static uint32_t ComputeSize() {
8361 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8364 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8366 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
8368 location
= _location
;
8375 void* Set(void* cmd
,
8381 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8382 return NextCmdAddress
<ValueType
>(cmd
);
8385 gpu::CommandHeader header
;
8393 static_assert(sizeof(Uniform4f
) == 24, "size of Uniform4f should be 24");
8394 static_assert(offsetof(Uniform4f
, header
) == 0,
8395 "offset of Uniform4f header should be 0");
8396 static_assert(offsetof(Uniform4f
, location
) == 4,
8397 "offset of Uniform4f location should be 4");
8398 static_assert(offsetof(Uniform4f
, x
) == 8, "offset of Uniform4f x should be 8");
8399 static_assert(offsetof(Uniform4f
, y
) == 12,
8400 "offset of Uniform4f y should be 12");
8401 static_assert(offsetof(Uniform4f
, z
) == 16,
8402 "offset of Uniform4f z should be 16");
8403 static_assert(offsetof(Uniform4f
, w
) == 20,
8404 "offset of Uniform4f w should be 20");
8406 struct Uniform4fvImmediate
{
8407 typedef Uniform4fvImmediate ValueType
;
8408 static const CommandId kCmdId
= kUniform4fvImmediate
;
8409 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8410 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8412 static uint32_t ComputeDataSize(GLsizei count
) {
8413 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
8416 static uint32_t ComputeSize(GLsizei count
) {
8417 return static_cast<uint32_t>(sizeof(ValueType
) +
8418 ComputeDataSize(count
)); // NOLINT
8421 void SetHeader(GLsizei count
) {
8422 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8425 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8427 location
= _location
;
8429 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8432 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8433 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8434 const uint32_t size
= ComputeSize(_count
);
8435 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8438 gpu::CommandHeader header
;
8443 static_assert(sizeof(Uniform4fvImmediate
) == 12,
8444 "size of Uniform4fvImmediate should be 12");
8445 static_assert(offsetof(Uniform4fvImmediate
, header
) == 0,
8446 "offset of Uniform4fvImmediate header should be 0");
8447 static_assert(offsetof(Uniform4fvImmediate
, location
) == 4,
8448 "offset of Uniform4fvImmediate location should be 4");
8449 static_assert(offsetof(Uniform4fvImmediate
, count
) == 8,
8450 "offset of Uniform4fvImmediate count should be 8");
8453 typedef Uniform4i ValueType
;
8454 static const CommandId kCmdId
= kUniform4i
;
8455 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8456 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8458 static uint32_t ComputeSize() {
8459 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8462 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8464 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
8466 location
= _location
;
8473 void* Set(void* cmd
,
8479 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8480 return NextCmdAddress
<ValueType
>(cmd
);
8483 gpu::CommandHeader header
;
8491 static_assert(sizeof(Uniform4i
) == 24, "size of Uniform4i should be 24");
8492 static_assert(offsetof(Uniform4i
, header
) == 0,
8493 "offset of Uniform4i header should be 0");
8494 static_assert(offsetof(Uniform4i
, location
) == 4,
8495 "offset of Uniform4i location should be 4");
8496 static_assert(offsetof(Uniform4i
, x
) == 8, "offset of Uniform4i x should be 8");
8497 static_assert(offsetof(Uniform4i
, y
) == 12,
8498 "offset of Uniform4i y should be 12");
8499 static_assert(offsetof(Uniform4i
, z
) == 16,
8500 "offset of Uniform4i z should be 16");
8501 static_assert(offsetof(Uniform4i
, w
) == 20,
8502 "offset of Uniform4i w should be 20");
8504 struct Uniform4ivImmediate
{
8505 typedef Uniform4ivImmediate ValueType
;
8506 static const CommandId kCmdId
= kUniform4ivImmediate
;
8507 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8508 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8510 static uint32_t ComputeDataSize(GLsizei count
) {
8511 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
8514 static uint32_t ComputeSize(GLsizei count
) {
8515 return static_cast<uint32_t>(sizeof(ValueType
) +
8516 ComputeDataSize(count
)); // NOLINT
8519 void SetHeader(GLsizei count
) {
8520 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8523 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8525 location
= _location
;
8527 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8530 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8531 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8532 const uint32_t size
= ComputeSize(_count
);
8533 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8536 gpu::CommandHeader header
;
8541 static_assert(sizeof(Uniform4ivImmediate
) == 12,
8542 "size of Uniform4ivImmediate should be 12");
8543 static_assert(offsetof(Uniform4ivImmediate
, header
) == 0,
8544 "offset of Uniform4ivImmediate header should be 0");
8545 static_assert(offsetof(Uniform4ivImmediate
, location
) == 4,
8546 "offset of Uniform4ivImmediate location should be 4");
8547 static_assert(offsetof(Uniform4ivImmediate
, count
) == 8,
8548 "offset of Uniform4ivImmediate count should be 8");
8551 typedef Uniform4ui ValueType
;
8552 static const CommandId kCmdId
= kUniform4ui
;
8553 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8554 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8556 static uint32_t ComputeSize() {
8557 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8560 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8562 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
8564 location
= _location
;
8571 void* Set(void* cmd
,
8577 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
8578 return NextCmdAddress
<ValueType
>(cmd
);
8581 gpu::CommandHeader header
;
8589 static_assert(sizeof(Uniform4ui
) == 24, "size of Uniform4ui should be 24");
8590 static_assert(offsetof(Uniform4ui
, header
) == 0,
8591 "offset of Uniform4ui header should be 0");
8592 static_assert(offsetof(Uniform4ui
, location
) == 4,
8593 "offset of Uniform4ui location should be 4");
8594 static_assert(offsetof(Uniform4ui
, x
) == 8,
8595 "offset of Uniform4ui x should be 8");
8596 static_assert(offsetof(Uniform4ui
, y
) == 12,
8597 "offset of Uniform4ui y should be 12");
8598 static_assert(offsetof(Uniform4ui
, z
) == 16,
8599 "offset of Uniform4ui z should be 16");
8600 static_assert(offsetof(Uniform4ui
, w
) == 20,
8601 "offset of Uniform4ui w should be 20");
8603 struct Uniform4uivImmediate
{
8604 typedef Uniform4uivImmediate ValueType
;
8605 static const CommandId kCmdId
= kUniform4uivImmediate
;
8606 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8607 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8609 static uint32_t ComputeDataSize(GLsizei count
) {
8610 return static_cast<uint32_t>(sizeof(GLuint
) * 4 * count
); // NOLINT
8613 static uint32_t ComputeSize(GLsizei count
) {
8614 return static_cast<uint32_t>(sizeof(ValueType
) +
8615 ComputeDataSize(count
)); // NOLINT
8618 void SetHeader(GLsizei count
) {
8619 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8622 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8624 location
= _location
;
8626 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8629 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8630 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8631 const uint32_t size
= ComputeSize(_count
);
8632 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8635 gpu::CommandHeader header
;
8640 static_assert(sizeof(Uniform4uivImmediate
) == 12,
8641 "size of Uniform4uivImmediate should be 12");
8642 static_assert(offsetof(Uniform4uivImmediate
, header
) == 0,
8643 "offset of Uniform4uivImmediate header should be 0");
8644 static_assert(offsetof(Uniform4uivImmediate
, location
) == 4,
8645 "offset of Uniform4uivImmediate location should be 4");
8646 static_assert(offsetof(Uniform4uivImmediate
, count
) == 8,
8647 "offset of Uniform4uivImmediate count should be 8");
8649 struct UniformBlockBinding
{
8650 typedef UniformBlockBinding ValueType
;
8651 static const CommandId kCmdId
= kUniformBlockBinding
;
8652 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8653 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8655 static uint32_t ComputeSize() {
8656 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8659 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8661 void Init(GLuint _program
, GLuint _index
, GLuint _binding
) {
8668 void* Set(void* cmd
, GLuint _program
, GLuint _index
, GLuint _binding
) {
8669 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _binding
);
8670 return NextCmdAddress
<ValueType
>(cmd
);
8673 gpu::CommandHeader header
;
8679 static_assert(sizeof(UniformBlockBinding
) == 16,
8680 "size of UniformBlockBinding should be 16");
8681 static_assert(offsetof(UniformBlockBinding
, header
) == 0,
8682 "offset of UniformBlockBinding header should be 0");
8683 static_assert(offsetof(UniformBlockBinding
, program
) == 4,
8684 "offset of UniformBlockBinding program should be 4");
8685 static_assert(offsetof(UniformBlockBinding
, index
) == 8,
8686 "offset of UniformBlockBinding index should be 8");
8687 static_assert(offsetof(UniformBlockBinding
, binding
) == 12,
8688 "offset of UniformBlockBinding binding should be 12");
8690 struct UniformMatrix2fvImmediate
{
8691 typedef UniformMatrix2fvImmediate ValueType
;
8692 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
8693 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8694 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8696 static uint32_t ComputeDataSize(GLsizei count
) {
8697 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
8700 static uint32_t ComputeSize(GLsizei count
) {
8701 return static_cast<uint32_t>(sizeof(ValueType
) +
8702 ComputeDataSize(count
)); // NOLINT
8705 void SetHeader(GLsizei count
) {
8706 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8709 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8711 location
= _location
;
8713 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8716 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8717 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8718 const uint32_t size
= ComputeSize(_count
);
8719 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8722 gpu::CommandHeader header
;
8725 static const uint32_t transpose
= false;
8728 static_assert(sizeof(UniformMatrix2fvImmediate
) == 12,
8729 "size of UniformMatrix2fvImmediate should be 12");
8730 static_assert(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
8731 "offset of UniformMatrix2fvImmediate header should be 0");
8732 static_assert(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
8733 "offset of UniformMatrix2fvImmediate location should be 4");
8734 static_assert(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
8735 "offset of UniformMatrix2fvImmediate count should be 8");
8737 struct UniformMatrix2x3fvImmediate
{
8738 typedef UniformMatrix2x3fvImmediate ValueType
;
8739 static const CommandId kCmdId
= kUniformMatrix2x3fvImmediate
;
8740 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8741 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8743 static uint32_t ComputeDataSize(GLsizei count
) {
8744 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
8747 static uint32_t ComputeSize(GLsizei count
) {
8748 return static_cast<uint32_t>(sizeof(ValueType
) +
8749 ComputeDataSize(count
)); // NOLINT
8752 void SetHeader(GLsizei count
) {
8753 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8756 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8758 location
= _location
;
8760 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8763 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8764 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8765 const uint32_t size
= ComputeSize(_count
);
8766 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8769 gpu::CommandHeader header
;
8772 static const uint32_t transpose
= false;
8775 static_assert(sizeof(UniformMatrix2x3fvImmediate
) == 12,
8776 "size of UniformMatrix2x3fvImmediate should be 12");
8777 static_assert(offsetof(UniformMatrix2x3fvImmediate
, header
) == 0,
8778 "offset of UniformMatrix2x3fvImmediate header should be 0");
8779 static_assert(offsetof(UniformMatrix2x3fvImmediate
, location
) == 4,
8780 "offset of UniformMatrix2x3fvImmediate location should be 4");
8781 static_assert(offsetof(UniformMatrix2x3fvImmediate
, count
) == 8,
8782 "offset of UniformMatrix2x3fvImmediate count should be 8");
8784 struct UniformMatrix2x4fvImmediate
{
8785 typedef UniformMatrix2x4fvImmediate ValueType
;
8786 static const CommandId kCmdId
= kUniformMatrix2x4fvImmediate
;
8787 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8788 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8790 static uint32_t ComputeDataSize(GLsizei count
) {
8791 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
8794 static uint32_t ComputeSize(GLsizei count
) {
8795 return static_cast<uint32_t>(sizeof(ValueType
) +
8796 ComputeDataSize(count
)); // NOLINT
8799 void SetHeader(GLsizei count
) {
8800 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8803 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8805 location
= _location
;
8807 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8810 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8811 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8812 const uint32_t size
= ComputeSize(_count
);
8813 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8816 gpu::CommandHeader header
;
8819 static const uint32_t transpose
= false;
8822 static_assert(sizeof(UniformMatrix2x4fvImmediate
) == 12,
8823 "size of UniformMatrix2x4fvImmediate should be 12");
8824 static_assert(offsetof(UniformMatrix2x4fvImmediate
, header
) == 0,
8825 "offset of UniformMatrix2x4fvImmediate header should be 0");
8826 static_assert(offsetof(UniformMatrix2x4fvImmediate
, location
) == 4,
8827 "offset of UniformMatrix2x4fvImmediate location should be 4");
8828 static_assert(offsetof(UniformMatrix2x4fvImmediate
, count
) == 8,
8829 "offset of UniformMatrix2x4fvImmediate count should be 8");
8831 struct UniformMatrix3fvImmediate
{
8832 typedef UniformMatrix3fvImmediate ValueType
;
8833 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
8834 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8835 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8837 static uint32_t ComputeDataSize(GLsizei count
) {
8838 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
8841 static uint32_t ComputeSize(GLsizei count
) {
8842 return static_cast<uint32_t>(sizeof(ValueType
) +
8843 ComputeDataSize(count
)); // NOLINT
8846 void SetHeader(GLsizei count
) {
8847 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8850 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8852 location
= _location
;
8854 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8857 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8858 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8859 const uint32_t size
= ComputeSize(_count
);
8860 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8863 gpu::CommandHeader header
;
8866 static const uint32_t transpose
= false;
8869 static_assert(sizeof(UniformMatrix3fvImmediate
) == 12,
8870 "size of UniformMatrix3fvImmediate should be 12");
8871 static_assert(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
8872 "offset of UniformMatrix3fvImmediate header should be 0");
8873 static_assert(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
8874 "offset of UniformMatrix3fvImmediate location should be 4");
8875 static_assert(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
8876 "offset of UniformMatrix3fvImmediate count should be 8");
8878 struct UniformMatrix3x2fvImmediate
{
8879 typedef UniformMatrix3x2fvImmediate ValueType
;
8880 static const CommandId kCmdId
= kUniformMatrix3x2fvImmediate
;
8881 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8882 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8884 static uint32_t ComputeDataSize(GLsizei count
) {
8885 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
8888 static uint32_t ComputeSize(GLsizei count
) {
8889 return static_cast<uint32_t>(sizeof(ValueType
) +
8890 ComputeDataSize(count
)); // NOLINT
8893 void SetHeader(GLsizei count
) {
8894 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8897 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8899 location
= _location
;
8901 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8904 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8905 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8906 const uint32_t size
= ComputeSize(_count
);
8907 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8910 gpu::CommandHeader header
;
8913 static const uint32_t transpose
= false;
8916 static_assert(sizeof(UniformMatrix3x2fvImmediate
) == 12,
8917 "size of UniformMatrix3x2fvImmediate should be 12");
8918 static_assert(offsetof(UniformMatrix3x2fvImmediate
, header
) == 0,
8919 "offset of UniformMatrix3x2fvImmediate header should be 0");
8920 static_assert(offsetof(UniformMatrix3x2fvImmediate
, location
) == 4,
8921 "offset of UniformMatrix3x2fvImmediate location should be 4");
8922 static_assert(offsetof(UniformMatrix3x2fvImmediate
, count
) == 8,
8923 "offset of UniformMatrix3x2fvImmediate count should be 8");
8925 struct UniformMatrix3x4fvImmediate
{
8926 typedef UniformMatrix3x4fvImmediate ValueType
;
8927 static const CommandId kCmdId
= kUniformMatrix3x4fvImmediate
;
8928 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8929 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8931 static uint32_t ComputeDataSize(GLsizei count
) {
8932 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
8935 static uint32_t ComputeSize(GLsizei count
) {
8936 return static_cast<uint32_t>(sizeof(ValueType
) +
8937 ComputeDataSize(count
)); // NOLINT
8940 void SetHeader(GLsizei count
) {
8941 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8944 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8946 location
= _location
;
8948 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8951 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8952 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
8953 const uint32_t size
= ComputeSize(_count
);
8954 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8957 gpu::CommandHeader header
;
8960 static const uint32_t transpose
= false;
8963 static_assert(sizeof(UniformMatrix3x4fvImmediate
) == 12,
8964 "size of UniformMatrix3x4fvImmediate should be 12");
8965 static_assert(offsetof(UniformMatrix3x4fvImmediate
, header
) == 0,
8966 "offset of UniformMatrix3x4fvImmediate header should be 0");
8967 static_assert(offsetof(UniformMatrix3x4fvImmediate
, location
) == 4,
8968 "offset of UniformMatrix3x4fvImmediate location should be 4");
8969 static_assert(offsetof(UniformMatrix3x4fvImmediate
, count
) == 8,
8970 "offset of UniformMatrix3x4fvImmediate count should be 8");
8972 struct UniformMatrix4fvImmediate
{
8973 typedef UniformMatrix4fvImmediate ValueType
;
8974 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
8975 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8976 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8978 static uint32_t ComputeDataSize(GLsizei count
) {
8979 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
8982 static uint32_t ComputeSize(GLsizei count
) {
8983 return static_cast<uint32_t>(sizeof(ValueType
) +
8984 ComputeDataSize(count
)); // NOLINT
8987 void SetHeader(GLsizei count
) {
8988 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8991 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8993 location
= _location
;
8995 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
8998 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
8999 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9000 const uint32_t size
= ComputeSize(_count
);
9001 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9004 gpu::CommandHeader header
;
9007 static const uint32_t transpose
= false;
9010 static_assert(sizeof(UniformMatrix4fvImmediate
) == 12,
9011 "size of UniformMatrix4fvImmediate should be 12");
9012 static_assert(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
9013 "offset of UniformMatrix4fvImmediate header should be 0");
9014 static_assert(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
9015 "offset of UniformMatrix4fvImmediate location should be 4");
9016 static_assert(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
9017 "offset of UniformMatrix4fvImmediate count should be 8");
9019 struct UniformMatrix4x2fvImmediate
{
9020 typedef UniformMatrix4x2fvImmediate ValueType
;
9021 static const CommandId kCmdId
= kUniformMatrix4x2fvImmediate
;
9022 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9023 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9025 static uint32_t ComputeDataSize(GLsizei count
) {
9026 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9029 static uint32_t ComputeSize(GLsizei count
) {
9030 return static_cast<uint32_t>(sizeof(ValueType
) +
9031 ComputeDataSize(count
)); // NOLINT
9034 void SetHeader(GLsizei count
) {
9035 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9038 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9040 location
= _location
;
9042 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9045 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9046 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9047 const uint32_t size
= ComputeSize(_count
);
9048 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9051 gpu::CommandHeader header
;
9054 static const uint32_t transpose
= false;
9057 static_assert(sizeof(UniformMatrix4x2fvImmediate
) == 12,
9058 "size of UniformMatrix4x2fvImmediate should be 12");
9059 static_assert(offsetof(UniformMatrix4x2fvImmediate
, header
) == 0,
9060 "offset of UniformMatrix4x2fvImmediate header should be 0");
9061 static_assert(offsetof(UniformMatrix4x2fvImmediate
, location
) == 4,
9062 "offset of UniformMatrix4x2fvImmediate location should be 4");
9063 static_assert(offsetof(UniformMatrix4x2fvImmediate
, count
) == 8,
9064 "offset of UniformMatrix4x2fvImmediate count should be 8");
9066 struct UniformMatrix4x3fvImmediate
{
9067 typedef UniformMatrix4x3fvImmediate ValueType
;
9068 static const CommandId kCmdId
= kUniformMatrix4x3fvImmediate
;
9069 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9070 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9072 static uint32_t ComputeDataSize(GLsizei count
) {
9073 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9076 static uint32_t ComputeSize(GLsizei count
) {
9077 return static_cast<uint32_t>(sizeof(ValueType
) +
9078 ComputeDataSize(count
)); // NOLINT
9081 void SetHeader(GLsizei count
) {
9082 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9085 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9087 location
= _location
;
9089 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9092 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9093 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9094 const uint32_t size
= ComputeSize(_count
);
9095 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9098 gpu::CommandHeader header
;
9101 static const uint32_t transpose
= false;
9104 static_assert(sizeof(UniformMatrix4x3fvImmediate
) == 12,
9105 "size of UniformMatrix4x3fvImmediate should be 12");
9106 static_assert(offsetof(UniformMatrix4x3fvImmediate
, header
) == 0,
9107 "offset of UniformMatrix4x3fvImmediate header should be 0");
9108 static_assert(offsetof(UniformMatrix4x3fvImmediate
, location
) == 4,
9109 "offset of UniformMatrix4x3fvImmediate location should be 4");
9110 static_assert(offsetof(UniformMatrix4x3fvImmediate
, count
) == 8,
9111 "offset of UniformMatrix4x3fvImmediate count should be 8");
9114 typedef UseProgram ValueType
;
9115 static const CommandId kCmdId
= kUseProgram
;
9116 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9117 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9119 static uint32_t ComputeSize() {
9120 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9123 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9125 void Init(GLuint _program
) {
9130 void* Set(void* cmd
, GLuint _program
) {
9131 static_cast<ValueType
*>(cmd
)->Init(_program
);
9132 return NextCmdAddress
<ValueType
>(cmd
);
9135 gpu::CommandHeader header
;
9139 static_assert(sizeof(UseProgram
) == 8, "size of UseProgram should be 8");
9140 static_assert(offsetof(UseProgram
, header
) == 0,
9141 "offset of UseProgram header should be 0");
9142 static_assert(offsetof(UseProgram
, program
) == 4,
9143 "offset of UseProgram program should be 4");
9145 struct ValidateProgram
{
9146 typedef ValidateProgram ValueType
;
9147 static const CommandId kCmdId
= kValidateProgram
;
9148 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9149 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9151 static uint32_t ComputeSize() {
9152 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9155 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9157 void Init(GLuint _program
) {
9162 void* Set(void* cmd
, GLuint _program
) {
9163 static_cast<ValueType
*>(cmd
)->Init(_program
);
9164 return NextCmdAddress
<ValueType
>(cmd
);
9167 gpu::CommandHeader header
;
9171 static_assert(sizeof(ValidateProgram
) == 8,
9172 "size of ValidateProgram should be 8");
9173 static_assert(offsetof(ValidateProgram
, header
) == 0,
9174 "offset of ValidateProgram header should be 0");
9175 static_assert(offsetof(ValidateProgram
, program
) == 4,
9176 "offset of ValidateProgram program should be 4");
9178 struct VertexAttrib1f
{
9179 typedef VertexAttrib1f ValueType
;
9180 static const CommandId kCmdId
= kVertexAttrib1f
;
9181 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9182 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9184 static uint32_t ComputeSize() {
9185 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9188 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9190 void Init(GLuint _indx
, GLfloat _x
) {
9196 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
9197 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
9198 return NextCmdAddress
<ValueType
>(cmd
);
9201 gpu::CommandHeader header
;
9206 static_assert(sizeof(VertexAttrib1f
) == 12,
9207 "size of VertexAttrib1f should be 12");
9208 static_assert(offsetof(VertexAttrib1f
, header
) == 0,
9209 "offset of VertexAttrib1f header should be 0");
9210 static_assert(offsetof(VertexAttrib1f
, indx
) == 4,
9211 "offset of VertexAttrib1f indx should be 4");
9212 static_assert(offsetof(VertexAttrib1f
, x
) == 8,
9213 "offset of VertexAttrib1f x should be 8");
9215 struct VertexAttrib1fvImmediate
{
9216 typedef VertexAttrib1fvImmediate ValueType
;
9217 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
9218 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9219 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9221 static uint32_t ComputeDataSize() {
9222 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
9225 static uint32_t ComputeSize() {
9226 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9229 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9231 void Init(GLuint _indx
, const GLfloat
* _values
) {
9234 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9237 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9238 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9239 const uint32_t size
= ComputeSize();
9240 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9243 gpu::CommandHeader header
;
9247 static_assert(sizeof(VertexAttrib1fvImmediate
) == 8,
9248 "size of VertexAttrib1fvImmediate should be 8");
9249 static_assert(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
9250 "offset of VertexAttrib1fvImmediate header should be 0");
9251 static_assert(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
9252 "offset of VertexAttrib1fvImmediate indx should be 4");
9254 struct VertexAttrib2f
{
9255 typedef VertexAttrib2f ValueType
;
9256 static const CommandId kCmdId
= kVertexAttrib2f
;
9257 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9258 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9260 static uint32_t ComputeSize() {
9261 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9264 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9266 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9273 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
9274 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
9275 return NextCmdAddress
<ValueType
>(cmd
);
9278 gpu::CommandHeader header
;
9284 static_assert(sizeof(VertexAttrib2f
) == 16,
9285 "size of VertexAttrib2f should be 16");
9286 static_assert(offsetof(VertexAttrib2f
, header
) == 0,
9287 "offset of VertexAttrib2f header should be 0");
9288 static_assert(offsetof(VertexAttrib2f
, indx
) == 4,
9289 "offset of VertexAttrib2f indx should be 4");
9290 static_assert(offsetof(VertexAttrib2f
, x
) == 8,
9291 "offset of VertexAttrib2f x should be 8");
9292 static_assert(offsetof(VertexAttrib2f
, y
) == 12,
9293 "offset of VertexAttrib2f y should be 12");
9295 struct VertexAttrib2fvImmediate
{
9296 typedef VertexAttrib2fvImmediate ValueType
;
9297 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
9298 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9299 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9301 static uint32_t ComputeDataSize() {
9302 return static_cast<uint32_t>(sizeof(GLfloat
) * 2);
9305 static uint32_t ComputeSize() {
9306 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9309 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9311 void Init(GLuint _indx
, const GLfloat
* _values
) {
9314 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9317 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9318 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9319 const uint32_t size
= ComputeSize();
9320 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9323 gpu::CommandHeader header
;
9327 static_assert(sizeof(VertexAttrib2fvImmediate
) == 8,
9328 "size of VertexAttrib2fvImmediate should be 8");
9329 static_assert(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
9330 "offset of VertexAttrib2fvImmediate header should be 0");
9331 static_assert(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
9332 "offset of VertexAttrib2fvImmediate indx should be 4");
9334 struct VertexAttrib3f
{
9335 typedef VertexAttrib3f ValueType
;
9336 static const CommandId kCmdId
= kVertexAttrib3f
;
9337 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9338 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9340 static uint32_t ComputeSize() {
9341 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9344 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9346 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9354 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
9355 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
9356 return NextCmdAddress
<ValueType
>(cmd
);
9359 gpu::CommandHeader header
;
9366 static_assert(sizeof(VertexAttrib3f
) == 20,
9367 "size of VertexAttrib3f should be 20");
9368 static_assert(offsetof(VertexAttrib3f
, header
) == 0,
9369 "offset of VertexAttrib3f header should be 0");
9370 static_assert(offsetof(VertexAttrib3f
, indx
) == 4,
9371 "offset of VertexAttrib3f indx should be 4");
9372 static_assert(offsetof(VertexAttrib3f
, x
) == 8,
9373 "offset of VertexAttrib3f x should be 8");
9374 static_assert(offsetof(VertexAttrib3f
, y
) == 12,
9375 "offset of VertexAttrib3f y should be 12");
9376 static_assert(offsetof(VertexAttrib3f
, z
) == 16,
9377 "offset of VertexAttrib3f z should be 16");
9379 struct VertexAttrib3fvImmediate
{
9380 typedef VertexAttrib3fvImmediate ValueType
;
9381 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
9382 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9383 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9385 static uint32_t ComputeDataSize() {
9386 return static_cast<uint32_t>(sizeof(GLfloat
) * 3);
9389 static uint32_t ComputeSize() {
9390 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9393 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9395 void Init(GLuint _indx
, const GLfloat
* _values
) {
9398 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9401 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9402 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9403 const uint32_t size
= ComputeSize();
9404 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9407 gpu::CommandHeader header
;
9411 static_assert(sizeof(VertexAttrib3fvImmediate
) == 8,
9412 "size of VertexAttrib3fvImmediate should be 8");
9413 static_assert(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
9414 "offset of VertexAttrib3fvImmediate header should be 0");
9415 static_assert(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
9416 "offset of VertexAttrib3fvImmediate indx should be 4");
9418 struct VertexAttrib4f
{
9419 typedef VertexAttrib4f ValueType
;
9420 static const CommandId kCmdId
= kVertexAttrib4f
;
9421 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9422 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9424 static uint32_t ComputeSize() {
9425 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9428 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9430 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
9439 void* Set(void* cmd
,
9445 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9446 return NextCmdAddress
<ValueType
>(cmd
);
9449 gpu::CommandHeader header
;
9457 static_assert(sizeof(VertexAttrib4f
) == 24,
9458 "size of VertexAttrib4f should be 24");
9459 static_assert(offsetof(VertexAttrib4f
, header
) == 0,
9460 "offset of VertexAttrib4f header should be 0");
9461 static_assert(offsetof(VertexAttrib4f
, indx
) == 4,
9462 "offset of VertexAttrib4f indx should be 4");
9463 static_assert(offsetof(VertexAttrib4f
, x
) == 8,
9464 "offset of VertexAttrib4f x should be 8");
9465 static_assert(offsetof(VertexAttrib4f
, y
) == 12,
9466 "offset of VertexAttrib4f y should be 12");
9467 static_assert(offsetof(VertexAttrib4f
, z
) == 16,
9468 "offset of VertexAttrib4f z should be 16");
9469 static_assert(offsetof(VertexAttrib4f
, w
) == 20,
9470 "offset of VertexAttrib4f w should be 20");
9472 struct VertexAttrib4fvImmediate
{
9473 typedef VertexAttrib4fvImmediate ValueType
;
9474 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
9475 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9476 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9478 static uint32_t ComputeDataSize() {
9479 return static_cast<uint32_t>(sizeof(GLfloat
) * 4);
9482 static uint32_t ComputeSize() {
9483 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9486 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9488 void Init(GLuint _indx
, const GLfloat
* _values
) {
9491 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9494 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9495 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9496 const uint32_t size
= ComputeSize();
9497 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9500 gpu::CommandHeader header
;
9504 static_assert(sizeof(VertexAttrib4fvImmediate
) == 8,
9505 "size of VertexAttrib4fvImmediate should be 8");
9506 static_assert(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
9507 "offset of VertexAttrib4fvImmediate header should be 0");
9508 static_assert(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
9509 "offset of VertexAttrib4fvImmediate indx should be 4");
9511 struct VertexAttribI4i
{
9512 typedef VertexAttribI4i ValueType
;
9513 static const CommandId kCmdId
= kVertexAttribI4i
;
9514 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9515 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9517 static uint32_t ComputeSize() {
9518 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9521 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9523 void Init(GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9532 void* Set(void* cmd
, GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9533 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9534 return NextCmdAddress
<ValueType
>(cmd
);
9537 gpu::CommandHeader header
;
9545 static_assert(sizeof(VertexAttribI4i
) == 24,
9546 "size of VertexAttribI4i should be 24");
9547 static_assert(offsetof(VertexAttribI4i
, header
) == 0,
9548 "offset of VertexAttribI4i header should be 0");
9549 static_assert(offsetof(VertexAttribI4i
, indx
) == 4,
9550 "offset of VertexAttribI4i indx should be 4");
9551 static_assert(offsetof(VertexAttribI4i
, x
) == 8,
9552 "offset of VertexAttribI4i x should be 8");
9553 static_assert(offsetof(VertexAttribI4i
, y
) == 12,
9554 "offset of VertexAttribI4i y should be 12");
9555 static_assert(offsetof(VertexAttribI4i
, z
) == 16,
9556 "offset of VertexAttribI4i z should be 16");
9557 static_assert(offsetof(VertexAttribI4i
, w
) == 20,
9558 "offset of VertexAttribI4i w should be 20");
9560 struct VertexAttribI4ivImmediate
{
9561 typedef VertexAttribI4ivImmediate ValueType
;
9562 static const CommandId kCmdId
= kVertexAttribI4ivImmediate
;
9563 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9564 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9566 static uint32_t ComputeDataSize() {
9567 return static_cast<uint32_t>(sizeof(GLint
) * 4);
9570 static uint32_t ComputeSize() {
9571 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9574 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9576 void Init(GLuint _indx
, const GLint
* _values
) {
9579 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9582 void* Set(void* cmd
, GLuint _indx
, const GLint
* _values
) {
9583 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9584 const uint32_t size
= ComputeSize();
9585 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9588 gpu::CommandHeader header
;
9592 static_assert(sizeof(VertexAttribI4ivImmediate
) == 8,
9593 "size of VertexAttribI4ivImmediate should be 8");
9594 static_assert(offsetof(VertexAttribI4ivImmediate
, header
) == 0,
9595 "offset of VertexAttribI4ivImmediate header should be 0");
9596 static_assert(offsetof(VertexAttribI4ivImmediate
, indx
) == 4,
9597 "offset of VertexAttribI4ivImmediate indx should be 4");
9599 struct VertexAttribI4ui
{
9600 typedef VertexAttribI4ui ValueType
;
9601 static const CommandId kCmdId
= kVertexAttribI4ui
;
9602 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9603 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9605 static uint32_t ComputeSize() {
9606 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9609 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9611 void Init(GLuint _indx
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
9620 void* Set(void* cmd
,
9626 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
9627 return NextCmdAddress
<ValueType
>(cmd
);
9630 gpu::CommandHeader header
;
9638 static_assert(sizeof(VertexAttribI4ui
) == 24,
9639 "size of VertexAttribI4ui should be 24");
9640 static_assert(offsetof(VertexAttribI4ui
, header
) == 0,
9641 "offset of VertexAttribI4ui header should be 0");
9642 static_assert(offsetof(VertexAttribI4ui
, indx
) == 4,
9643 "offset of VertexAttribI4ui indx should be 4");
9644 static_assert(offsetof(VertexAttribI4ui
, x
) == 8,
9645 "offset of VertexAttribI4ui x should be 8");
9646 static_assert(offsetof(VertexAttribI4ui
, y
) == 12,
9647 "offset of VertexAttribI4ui y should be 12");
9648 static_assert(offsetof(VertexAttribI4ui
, z
) == 16,
9649 "offset of VertexAttribI4ui z should be 16");
9650 static_assert(offsetof(VertexAttribI4ui
, w
) == 20,
9651 "offset of VertexAttribI4ui w should be 20");
9653 struct VertexAttribI4uivImmediate
{
9654 typedef VertexAttribI4uivImmediate ValueType
;
9655 static const CommandId kCmdId
= kVertexAttribI4uivImmediate
;
9656 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9657 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9659 static uint32_t ComputeDataSize() {
9660 return static_cast<uint32_t>(sizeof(GLuint
) * 4);
9663 static uint32_t ComputeSize() {
9664 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9667 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9669 void Init(GLuint _indx
, const GLuint
* _values
) {
9672 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9675 void* Set(void* cmd
, GLuint _indx
, const GLuint
* _values
) {
9676 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9677 const uint32_t size
= ComputeSize();
9678 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9681 gpu::CommandHeader header
;
9685 static_assert(sizeof(VertexAttribI4uivImmediate
) == 8,
9686 "size of VertexAttribI4uivImmediate should be 8");
9687 static_assert(offsetof(VertexAttribI4uivImmediate
, header
) == 0,
9688 "offset of VertexAttribI4uivImmediate header should be 0");
9689 static_assert(offsetof(VertexAttribI4uivImmediate
, indx
) == 4,
9690 "offset of VertexAttribI4uivImmediate indx should be 4");
9692 struct VertexAttribIPointer
{
9693 typedef VertexAttribIPointer ValueType
;
9694 static const CommandId kCmdId
= kVertexAttribIPointer
;
9695 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9696 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9698 static uint32_t ComputeSize() {
9699 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9702 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9704 void Init(GLuint _indx
,
9717 void* Set(void* cmd
,
9723 static_cast<ValueType
*>(cmd
)->Init(_indx
, _size
, _type
, _stride
, _offset
);
9724 return NextCmdAddress
<ValueType
>(cmd
);
9727 gpu::CommandHeader header
;
9735 static_assert(sizeof(VertexAttribIPointer
) == 24,
9736 "size of VertexAttribIPointer should be 24");
9737 static_assert(offsetof(VertexAttribIPointer
, header
) == 0,
9738 "offset of VertexAttribIPointer header should be 0");
9739 static_assert(offsetof(VertexAttribIPointer
, indx
) == 4,
9740 "offset of VertexAttribIPointer indx should be 4");
9741 static_assert(offsetof(VertexAttribIPointer
, size
) == 8,
9742 "offset of VertexAttribIPointer size should be 8");
9743 static_assert(offsetof(VertexAttribIPointer
, type
) == 12,
9744 "offset of VertexAttribIPointer type should be 12");
9745 static_assert(offsetof(VertexAttribIPointer
, stride
) == 16,
9746 "offset of VertexAttribIPointer stride should be 16");
9747 static_assert(offsetof(VertexAttribIPointer
, offset
) == 20,
9748 "offset of VertexAttribIPointer offset should be 20");
9750 struct VertexAttribPointer
{
9751 typedef VertexAttribPointer ValueType
;
9752 static const CommandId kCmdId
= kVertexAttribPointer
;
9753 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9754 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9756 static uint32_t ComputeSize() {
9757 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9760 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9762 void Init(GLuint _indx
,
9765 GLboolean _normalized
,
9772 normalized
= _normalized
;
9777 void* Set(void* cmd
,
9781 GLboolean _normalized
,
9784 static_cast<ValueType
*>(cmd
)
9785 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
9786 return NextCmdAddress
<ValueType
>(cmd
);
9789 gpu::CommandHeader header
;
9793 uint32_t normalized
;
9798 static_assert(sizeof(VertexAttribPointer
) == 28,
9799 "size of VertexAttribPointer should be 28");
9800 static_assert(offsetof(VertexAttribPointer
, header
) == 0,
9801 "offset of VertexAttribPointer header should be 0");
9802 static_assert(offsetof(VertexAttribPointer
, indx
) == 4,
9803 "offset of VertexAttribPointer indx should be 4");
9804 static_assert(offsetof(VertexAttribPointer
, size
) == 8,
9805 "offset of VertexAttribPointer size should be 8");
9806 static_assert(offsetof(VertexAttribPointer
, type
) == 12,
9807 "offset of VertexAttribPointer type should be 12");
9808 static_assert(offsetof(VertexAttribPointer
, normalized
) == 16,
9809 "offset of VertexAttribPointer normalized should be 16");
9810 static_assert(offsetof(VertexAttribPointer
, stride
) == 20,
9811 "offset of VertexAttribPointer stride should be 20");
9812 static_assert(offsetof(VertexAttribPointer
, offset
) == 24,
9813 "offset of VertexAttribPointer offset should be 24");
9816 typedef Viewport ValueType
;
9817 static const CommandId kCmdId
= kViewport
;
9818 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9819 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9821 static uint32_t ComputeSize() {
9822 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9825 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9827 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
9835 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
9836 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
9837 return NextCmdAddress
<ValueType
>(cmd
);
9840 gpu::CommandHeader header
;
9847 static_assert(sizeof(Viewport
) == 20, "size of Viewport should be 20");
9848 static_assert(offsetof(Viewport
, header
) == 0,
9849 "offset of Viewport header should be 0");
9850 static_assert(offsetof(Viewport
, x
) == 4, "offset of Viewport x should be 4");
9851 static_assert(offsetof(Viewport
, y
) == 8, "offset of Viewport y should be 8");
9852 static_assert(offsetof(Viewport
, width
) == 12,
9853 "offset of Viewport width should be 12");
9854 static_assert(offsetof(Viewport
, height
) == 16,
9855 "offset of Viewport height should be 16");
9858 typedef WaitSync ValueType
;
9859 static const CommandId kCmdId
= kWaitSync
;
9860 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9861 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9863 static uint32_t ComputeSize() {
9864 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9867 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9869 void Init(GLuint _sync
,
9872 GLuint _timeout_1
) {
9876 timeout_0
= _timeout_0
;
9877 timeout_1
= _timeout_1
;
9880 void* Set(void* cmd
,
9884 GLuint _timeout_1
) {
9885 static_cast<ValueType
*>(cmd
)->Init(_sync
, _flags
, _timeout_0
, _timeout_1
);
9886 return NextCmdAddress
<ValueType
>(cmd
);
9889 gpu::CommandHeader header
;
9896 static_assert(sizeof(WaitSync
) == 20, "size of WaitSync should be 20");
9897 static_assert(offsetof(WaitSync
, header
) == 0,
9898 "offset of WaitSync header should be 0");
9899 static_assert(offsetof(WaitSync
, sync
) == 4,
9900 "offset of WaitSync sync should be 4");
9901 static_assert(offsetof(WaitSync
, flags
) == 8,
9902 "offset of WaitSync flags should be 8");
9903 static_assert(offsetof(WaitSync
, timeout_0
) == 12,
9904 "offset of WaitSync timeout_0 should be 12");
9905 static_assert(offsetof(WaitSync
, timeout_1
) == 16,
9906 "offset of WaitSync timeout_1 should be 16");
9908 struct BlitFramebufferCHROMIUM
{
9909 typedef BlitFramebufferCHROMIUM ValueType
;
9910 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
9911 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9912 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
9914 static uint32_t ComputeSize() {
9915 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9918 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9920 void Init(GLint _srcX0
,
9943 void* Set(void* cmd
,
9954 static_cast<ValueType
*>(cmd
)->Init(_srcX0
, _srcY0
, _srcX1
, _srcY1
, _dstX0
,
9955 _dstY0
, _dstX1
, _dstY1
, _mask
, _filter
);
9956 return NextCmdAddress
<ValueType
>(cmd
);
9959 gpu::CommandHeader header
;
9972 static_assert(sizeof(BlitFramebufferCHROMIUM
) == 44,
9973 "size of BlitFramebufferCHROMIUM should be 44");
9974 static_assert(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
9975 "offset of BlitFramebufferCHROMIUM header should be 0");
9976 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
9977 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
9978 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
9979 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
9980 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
9981 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
9982 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
9983 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
9984 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
9985 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
9986 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
9987 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
9988 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
9989 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
9990 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
9991 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
9992 static_assert(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
9993 "offset of BlitFramebufferCHROMIUM mask should be 36");
9994 static_assert(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
9995 "offset of BlitFramebufferCHROMIUM filter should be 40");
9997 // GL_CHROMIUM_framebuffer_multisample
9998 struct RenderbufferStorageMultisampleCHROMIUM
{
9999 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
10000 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
10001 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10002 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10004 static uint32_t ComputeSize() {
10005 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10008 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10010 void Init(GLenum _target
,
10012 GLenum _internalformat
,
10017 samples
= _samples
;
10018 internalformat
= _internalformat
;
10023 void* Set(void* cmd
,
10026 GLenum _internalformat
,
10029 static_cast<ValueType
*>(cmd
)
10030 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10031 return NextCmdAddress
<ValueType
>(cmd
);
10034 gpu::CommandHeader header
;
10037 uint32_t internalformat
;
10042 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
10043 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10045 offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
10046 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10048 offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
10049 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10051 offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
10052 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10053 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM
,
10054 internalformat
) == 12,
10055 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10058 offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
10059 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10061 offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
10062 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10064 // GL_EXT_multisampled_render_to_texture
10065 struct RenderbufferStorageMultisampleEXT
{
10066 typedef RenderbufferStorageMultisampleEXT ValueType
;
10067 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
10068 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10069 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10071 static uint32_t ComputeSize() {
10072 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10075 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10077 void Init(GLenum _target
,
10079 GLenum _internalformat
,
10084 samples
= _samples
;
10085 internalformat
= _internalformat
;
10090 void* Set(void* cmd
,
10093 GLenum _internalformat
,
10096 static_cast<ValueType
*>(cmd
)
10097 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10098 return NextCmdAddress
<ValueType
>(cmd
);
10101 gpu::CommandHeader header
;
10104 uint32_t internalformat
;
10109 static_assert(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
10110 "size of RenderbufferStorageMultisampleEXT should be 24");
10111 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
10112 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10113 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
10114 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10116 offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
10117 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10119 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
10120 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10121 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
10122 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10124 offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
10125 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10127 struct FramebufferTexture2DMultisampleEXT
{
10128 typedef FramebufferTexture2DMultisampleEXT ValueType
;
10129 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
10130 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10131 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10133 static uint32_t ComputeSize() {
10134 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10137 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10139 void Init(GLenum _target
,
10140 GLenum _attachment
,
10143 GLsizei _samples
) {
10146 attachment
= _attachment
;
10147 textarget
= _textarget
;
10148 texture
= _texture
;
10149 samples
= _samples
;
10152 void* Set(void* cmd
,
10154 GLenum _attachment
,
10157 GLsizei _samples
) {
10158 static_cast<ValueType
*>(cmd
)
10159 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
10160 return NextCmdAddress
<ValueType
>(cmd
);
10163 gpu::CommandHeader header
;
10165 uint32_t attachment
;
10166 uint32_t textarget
;
10169 static const int32_t level
= 0;
10172 static_assert(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
10173 "size of FramebufferTexture2DMultisampleEXT should be 24");
10175 offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
10176 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10178 offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
10179 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10181 offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
10182 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10184 offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
10185 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10187 offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
10188 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10190 offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
10191 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10193 struct TexStorage2DEXT
{
10194 typedef TexStorage2DEXT ValueType
;
10195 static const CommandId kCmdId
= kTexStorage2DEXT
;
10196 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10197 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10199 static uint32_t ComputeSize() {
10200 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10203 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10205 void Init(GLenum _target
,
10207 GLenum _internalFormat
,
10213 internalFormat
= _internalFormat
;
10218 void* Set(void* cmd
,
10221 GLenum _internalFormat
,
10224 static_cast<ValueType
*>(cmd
)
10225 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
10226 return NextCmdAddress
<ValueType
>(cmd
);
10229 gpu::CommandHeader header
;
10232 uint32_t internalFormat
;
10237 static_assert(sizeof(TexStorage2DEXT
) == 24,
10238 "size of TexStorage2DEXT should be 24");
10239 static_assert(offsetof(TexStorage2DEXT
, header
) == 0,
10240 "offset of TexStorage2DEXT header should be 0");
10241 static_assert(offsetof(TexStorage2DEXT
, target
) == 4,
10242 "offset of TexStorage2DEXT target should be 4");
10243 static_assert(offsetof(TexStorage2DEXT
, levels
) == 8,
10244 "offset of TexStorage2DEXT levels should be 8");
10245 static_assert(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
10246 "offset of TexStorage2DEXT internalFormat should be 12");
10247 static_assert(offsetof(TexStorage2DEXT
, width
) == 16,
10248 "offset of TexStorage2DEXT width should be 16");
10249 static_assert(offsetof(TexStorage2DEXT
, height
) == 20,
10250 "offset of TexStorage2DEXT height should be 20");
10252 struct GenQueriesEXTImmediate
{
10253 typedef GenQueriesEXTImmediate ValueType
;
10254 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
10255 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10256 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10258 static uint32_t ComputeDataSize(GLsizei n
) {
10259 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10262 static uint32_t ComputeSize(GLsizei n
) {
10263 return static_cast<uint32_t>(sizeof(ValueType
) +
10264 ComputeDataSize(n
)); // NOLINT
10267 void SetHeader(GLsizei n
) {
10268 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10271 void Init(GLsizei _n
, GLuint
* _queries
) {
10274 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10277 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
10278 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10279 const uint32_t size
= ComputeSize(_n
);
10280 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10283 gpu::CommandHeader header
;
10287 static_assert(sizeof(GenQueriesEXTImmediate
) == 8,
10288 "size of GenQueriesEXTImmediate should be 8");
10289 static_assert(offsetof(GenQueriesEXTImmediate
, header
) == 0,
10290 "offset of GenQueriesEXTImmediate header should be 0");
10291 static_assert(offsetof(GenQueriesEXTImmediate
, n
) == 4,
10292 "offset of GenQueriesEXTImmediate n should be 4");
10294 struct DeleteQueriesEXTImmediate
{
10295 typedef DeleteQueriesEXTImmediate ValueType
;
10296 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
10297 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10298 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10300 static uint32_t ComputeDataSize(GLsizei n
) {
10301 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10304 static uint32_t ComputeSize(GLsizei n
) {
10305 return static_cast<uint32_t>(sizeof(ValueType
) +
10306 ComputeDataSize(n
)); // NOLINT
10309 void SetHeader(GLsizei n
) {
10310 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10313 void Init(GLsizei _n
, const GLuint
* _queries
) {
10316 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
10319 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
10320 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
10321 const uint32_t size
= ComputeSize(_n
);
10322 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10325 gpu::CommandHeader header
;
10329 static_assert(sizeof(DeleteQueriesEXTImmediate
) == 8,
10330 "size of DeleteQueriesEXTImmediate should be 8");
10331 static_assert(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
10332 "offset of DeleteQueriesEXTImmediate header should be 0");
10333 static_assert(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
10334 "offset of DeleteQueriesEXTImmediate n should be 4");
10336 struct BeginQueryEXT
{
10337 typedef BeginQueryEXT ValueType
;
10338 static const CommandId kCmdId
= kBeginQueryEXT
;
10339 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10340 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10342 static uint32_t ComputeSize() {
10343 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10346 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10348 void Init(GLenum _target
,
10350 uint32_t _sync_data_shm_id
,
10351 uint32_t _sync_data_shm_offset
) {
10355 sync_data_shm_id
= _sync_data_shm_id
;
10356 sync_data_shm_offset
= _sync_data_shm_offset
;
10359 void* Set(void* cmd
,
10362 uint32_t _sync_data_shm_id
,
10363 uint32_t _sync_data_shm_offset
) {
10364 static_cast<ValueType
*>(cmd
)
10365 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
10366 return NextCmdAddress
<ValueType
>(cmd
);
10369 gpu::CommandHeader header
;
10372 uint32_t sync_data_shm_id
;
10373 uint32_t sync_data_shm_offset
;
10376 static_assert(sizeof(BeginQueryEXT
) == 20,
10377 "size of BeginQueryEXT should be 20");
10378 static_assert(offsetof(BeginQueryEXT
, header
) == 0,
10379 "offset of BeginQueryEXT header should be 0");
10380 static_assert(offsetof(BeginQueryEXT
, target
) == 4,
10381 "offset of BeginQueryEXT target should be 4");
10382 static_assert(offsetof(BeginQueryEXT
, id
) == 8,
10383 "offset of BeginQueryEXT id should be 8");
10384 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
10385 "offset of BeginQueryEXT sync_data_shm_id should be 12");
10386 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
10387 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
10389 struct BeginTransformFeedback
{
10390 typedef BeginTransformFeedback ValueType
;
10391 static const CommandId kCmdId
= kBeginTransformFeedback
;
10392 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10393 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10395 static uint32_t ComputeSize() {
10396 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10399 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10401 void Init(GLenum _primitivemode
) {
10403 primitivemode
= _primitivemode
;
10406 void* Set(void* cmd
, GLenum _primitivemode
) {
10407 static_cast<ValueType
*>(cmd
)->Init(_primitivemode
);
10408 return NextCmdAddress
<ValueType
>(cmd
);
10411 gpu::CommandHeader header
;
10412 uint32_t primitivemode
;
10415 static_assert(sizeof(BeginTransformFeedback
) == 8,
10416 "size of BeginTransformFeedback should be 8");
10417 static_assert(offsetof(BeginTransformFeedback
, header
) == 0,
10418 "offset of BeginTransformFeedback header should be 0");
10419 static_assert(offsetof(BeginTransformFeedback
, primitivemode
) == 4,
10420 "offset of BeginTransformFeedback primitivemode should be 4");
10422 struct EndQueryEXT
{
10423 typedef EndQueryEXT ValueType
;
10424 static const CommandId kCmdId
= kEndQueryEXT
;
10425 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10426 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10428 static uint32_t ComputeSize() {
10429 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10432 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10434 void Init(GLenum _target
, GLuint _submit_count
) {
10437 submit_count
= _submit_count
;
10440 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
10441 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
10442 return NextCmdAddress
<ValueType
>(cmd
);
10445 gpu::CommandHeader header
;
10447 uint32_t submit_count
;
10450 static_assert(sizeof(EndQueryEXT
) == 12, "size of EndQueryEXT should be 12");
10451 static_assert(offsetof(EndQueryEXT
, header
) == 0,
10452 "offset of EndQueryEXT header should be 0");
10453 static_assert(offsetof(EndQueryEXT
, target
) == 4,
10454 "offset of EndQueryEXT target should be 4");
10455 static_assert(offsetof(EndQueryEXT
, submit_count
) == 8,
10456 "offset of EndQueryEXT submit_count should be 8");
10458 struct EndTransformFeedback
{
10459 typedef EndTransformFeedback ValueType
;
10460 static const CommandId kCmdId
= kEndTransformFeedback
;
10461 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10462 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10464 static uint32_t ComputeSize() {
10465 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10468 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10470 void Init() { SetHeader(); }
10472 void* Set(void* cmd
) {
10473 static_cast<ValueType
*>(cmd
)->Init();
10474 return NextCmdAddress
<ValueType
>(cmd
);
10477 gpu::CommandHeader header
;
10480 static_assert(sizeof(EndTransformFeedback
) == 4,
10481 "size of EndTransformFeedback should be 4");
10482 static_assert(offsetof(EndTransformFeedback
, header
) == 0,
10483 "offset of EndTransformFeedback header should be 0");
10485 struct InsertEventMarkerEXT
{
10486 typedef InsertEventMarkerEXT ValueType
;
10487 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
10488 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10489 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10491 static uint32_t ComputeSize() {
10492 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10495 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10497 void Init(GLuint _bucket_id
) {
10499 bucket_id
= _bucket_id
;
10502 void* Set(void* cmd
, GLuint _bucket_id
) {
10503 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10504 return NextCmdAddress
<ValueType
>(cmd
);
10507 gpu::CommandHeader header
;
10508 uint32_t bucket_id
;
10511 static_assert(sizeof(InsertEventMarkerEXT
) == 8,
10512 "size of InsertEventMarkerEXT should be 8");
10513 static_assert(offsetof(InsertEventMarkerEXT
, header
) == 0,
10514 "offset of InsertEventMarkerEXT header should be 0");
10515 static_assert(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
10516 "offset of InsertEventMarkerEXT bucket_id should be 4");
10518 struct PushGroupMarkerEXT
{
10519 typedef PushGroupMarkerEXT ValueType
;
10520 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
10521 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10522 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10524 static uint32_t ComputeSize() {
10525 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10528 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10530 void Init(GLuint _bucket_id
) {
10532 bucket_id
= _bucket_id
;
10535 void* Set(void* cmd
, GLuint _bucket_id
) {
10536 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10537 return NextCmdAddress
<ValueType
>(cmd
);
10540 gpu::CommandHeader header
;
10541 uint32_t bucket_id
;
10544 static_assert(sizeof(PushGroupMarkerEXT
) == 8,
10545 "size of PushGroupMarkerEXT should be 8");
10546 static_assert(offsetof(PushGroupMarkerEXT
, header
) == 0,
10547 "offset of PushGroupMarkerEXT header should be 0");
10548 static_assert(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
10549 "offset of PushGroupMarkerEXT bucket_id should be 4");
10551 struct PopGroupMarkerEXT
{
10552 typedef PopGroupMarkerEXT ValueType
;
10553 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
10554 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10555 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10557 static uint32_t ComputeSize() {
10558 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10561 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10563 void Init() { SetHeader(); }
10565 void* Set(void* cmd
) {
10566 static_cast<ValueType
*>(cmd
)->Init();
10567 return NextCmdAddress
<ValueType
>(cmd
);
10570 gpu::CommandHeader header
;
10573 static_assert(sizeof(PopGroupMarkerEXT
) == 4,
10574 "size of PopGroupMarkerEXT should be 4");
10575 static_assert(offsetof(PopGroupMarkerEXT
, header
) == 0,
10576 "offset of PopGroupMarkerEXT header should be 0");
10578 struct GenVertexArraysOESImmediate
{
10579 typedef GenVertexArraysOESImmediate ValueType
;
10580 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
10581 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10582 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10584 static uint32_t ComputeDataSize(GLsizei n
) {
10585 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10588 static uint32_t ComputeSize(GLsizei n
) {
10589 return static_cast<uint32_t>(sizeof(ValueType
) +
10590 ComputeDataSize(n
)); // NOLINT
10593 void SetHeader(GLsizei n
) {
10594 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10597 void Init(GLsizei _n
, GLuint
* _arrays
) {
10600 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
10603 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
10604 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
10605 const uint32_t size
= ComputeSize(_n
);
10606 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10609 gpu::CommandHeader header
;
10613 static_assert(sizeof(GenVertexArraysOESImmediate
) == 8,
10614 "size of GenVertexArraysOESImmediate should be 8");
10615 static_assert(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
10616 "offset of GenVertexArraysOESImmediate header should be 0");
10617 static_assert(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
10618 "offset of GenVertexArraysOESImmediate n should be 4");
10620 struct DeleteVertexArraysOESImmediate
{
10621 typedef DeleteVertexArraysOESImmediate ValueType
;
10622 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
10623 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10624 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10626 static uint32_t ComputeDataSize(GLsizei n
) {
10627 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10630 static uint32_t ComputeSize(GLsizei n
) {
10631 return static_cast<uint32_t>(sizeof(ValueType
) +
10632 ComputeDataSize(n
)); // NOLINT
10635 void SetHeader(GLsizei n
) {
10636 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10639 void Init(GLsizei _n
, const GLuint
* _arrays
) {
10642 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
10645 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
10646 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
10647 const uint32_t size
= ComputeSize(_n
);
10648 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10651 gpu::CommandHeader header
;
10655 static_assert(sizeof(DeleteVertexArraysOESImmediate
) == 8,
10656 "size of DeleteVertexArraysOESImmediate should be 8");
10657 static_assert(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
10658 "offset of DeleteVertexArraysOESImmediate header should be 0");
10659 static_assert(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
10660 "offset of DeleteVertexArraysOESImmediate n should be 4");
10662 struct IsVertexArrayOES
{
10663 typedef IsVertexArrayOES ValueType
;
10664 static const CommandId kCmdId
= kIsVertexArrayOES
;
10665 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10666 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10668 typedef uint32_t Result
;
10670 static uint32_t ComputeSize() {
10671 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10674 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10676 void Init(GLuint _array
,
10677 uint32_t _result_shm_id
,
10678 uint32_t _result_shm_offset
) {
10681 result_shm_id
= _result_shm_id
;
10682 result_shm_offset
= _result_shm_offset
;
10685 void* Set(void* cmd
,
10687 uint32_t _result_shm_id
,
10688 uint32_t _result_shm_offset
) {
10689 static_cast<ValueType
*>(cmd
)
10690 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
10691 return NextCmdAddress
<ValueType
>(cmd
);
10694 gpu::CommandHeader header
;
10696 uint32_t result_shm_id
;
10697 uint32_t result_shm_offset
;
10700 static_assert(sizeof(IsVertexArrayOES
) == 16,
10701 "size of IsVertexArrayOES should be 16");
10702 static_assert(offsetof(IsVertexArrayOES
, header
) == 0,
10703 "offset of IsVertexArrayOES header should be 0");
10704 static_assert(offsetof(IsVertexArrayOES
, array
) == 4,
10705 "offset of IsVertexArrayOES array should be 4");
10706 static_assert(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
10707 "offset of IsVertexArrayOES result_shm_id should be 8");
10708 static_assert(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
10709 "offset of IsVertexArrayOES result_shm_offset should be 12");
10711 struct BindVertexArrayOES
{
10712 typedef BindVertexArrayOES ValueType
;
10713 static const CommandId kCmdId
= kBindVertexArrayOES
;
10714 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10715 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10717 static uint32_t ComputeSize() {
10718 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10721 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10723 void Init(GLuint _array
) {
10728 void* Set(void* cmd
, GLuint _array
) {
10729 static_cast<ValueType
*>(cmd
)->Init(_array
);
10730 return NextCmdAddress
<ValueType
>(cmd
);
10733 gpu::CommandHeader header
;
10737 static_assert(sizeof(BindVertexArrayOES
) == 8,
10738 "size of BindVertexArrayOES should be 8");
10739 static_assert(offsetof(BindVertexArrayOES
, header
) == 0,
10740 "offset of BindVertexArrayOES header should be 0");
10741 static_assert(offsetof(BindVertexArrayOES
, array
) == 4,
10742 "offset of BindVertexArrayOES array should be 4");
10744 struct SwapBuffers
{
10745 typedef SwapBuffers ValueType
;
10746 static const CommandId kCmdId
= kSwapBuffers
;
10747 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10748 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10750 static uint32_t ComputeSize() {
10751 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10754 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10756 void Init() { SetHeader(); }
10758 void* Set(void* cmd
) {
10759 static_cast<ValueType
*>(cmd
)->Init();
10760 return NextCmdAddress
<ValueType
>(cmd
);
10763 gpu::CommandHeader header
;
10766 static_assert(sizeof(SwapBuffers
) == 4, "size of SwapBuffers should be 4");
10767 static_assert(offsetof(SwapBuffers
, header
) == 0,
10768 "offset of SwapBuffers header should be 0");
10770 struct GetMaxValueInBufferCHROMIUM
{
10771 typedef GetMaxValueInBufferCHROMIUM ValueType
;
10772 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
10773 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10774 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10776 typedef GLuint Result
;
10778 static uint32_t ComputeSize() {
10779 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10782 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10784 void Init(GLuint _buffer_id
,
10788 uint32_t _result_shm_id
,
10789 uint32_t _result_shm_offset
) {
10791 buffer_id
= _buffer_id
;
10795 result_shm_id
= _result_shm_id
;
10796 result_shm_offset
= _result_shm_offset
;
10799 void* Set(void* cmd
,
10804 uint32_t _result_shm_id
,
10805 uint32_t _result_shm_offset
) {
10806 static_cast<ValueType
*>(cmd
)->Init(_buffer_id
, _count
, _type
, _offset
,
10807 _result_shm_id
, _result_shm_offset
);
10808 return NextCmdAddress
<ValueType
>(cmd
);
10811 gpu::CommandHeader header
;
10812 uint32_t buffer_id
;
10816 uint32_t result_shm_id
;
10817 uint32_t result_shm_offset
;
10820 static_assert(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
10821 "size of GetMaxValueInBufferCHROMIUM should be 28");
10822 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
10823 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
10824 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
10825 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
10826 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
10827 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
10828 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
10829 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
10830 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
10831 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
10833 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
10834 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
10836 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
10837 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
10839 struct EnableFeatureCHROMIUM
{
10840 typedef EnableFeatureCHROMIUM ValueType
;
10841 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
10842 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10843 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10845 typedef GLint Result
;
10847 static uint32_t ComputeSize() {
10848 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10851 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10853 void Init(GLuint _bucket_id
,
10854 uint32_t _result_shm_id
,
10855 uint32_t _result_shm_offset
) {
10857 bucket_id
= _bucket_id
;
10858 result_shm_id
= _result_shm_id
;
10859 result_shm_offset
= _result_shm_offset
;
10862 void* Set(void* cmd
,
10864 uint32_t _result_shm_id
,
10865 uint32_t _result_shm_offset
) {
10866 static_cast<ValueType
*>(cmd
)
10867 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
10868 return NextCmdAddress
<ValueType
>(cmd
);
10871 gpu::CommandHeader header
;
10872 uint32_t bucket_id
;
10873 uint32_t result_shm_id
;
10874 uint32_t result_shm_offset
;
10877 static_assert(sizeof(EnableFeatureCHROMIUM
) == 16,
10878 "size of EnableFeatureCHROMIUM should be 16");
10879 static_assert(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
10880 "offset of EnableFeatureCHROMIUM header should be 0");
10881 static_assert(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
10882 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
10883 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
10884 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
10885 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
10886 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
10888 struct ResizeCHROMIUM
{
10889 typedef ResizeCHROMIUM ValueType
;
10890 static const CommandId kCmdId
= kResizeCHROMIUM
;
10891 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10892 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10894 static uint32_t ComputeSize() {
10895 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10898 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10900 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
10904 scale_factor
= _scale_factor
;
10907 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
10908 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
10909 return NextCmdAddress
<ValueType
>(cmd
);
10912 gpu::CommandHeader header
;
10915 float scale_factor
;
10918 static_assert(sizeof(ResizeCHROMIUM
) == 16,
10919 "size of ResizeCHROMIUM should be 16");
10920 static_assert(offsetof(ResizeCHROMIUM
, header
) == 0,
10921 "offset of ResizeCHROMIUM header should be 0");
10922 static_assert(offsetof(ResizeCHROMIUM
, width
) == 4,
10923 "offset of ResizeCHROMIUM width should be 4");
10924 static_assert(offsetof(ResizeCHROMIUM
, height
) == 8,
10925 "offset of ResizeCHROMIUM height should be 8");
10926 static_assert(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
10927 "offset of ResizeCHROMIUM scale_factor should be 12");
10929 struct GetRequestableExtensionsCHROMIUM
{
10930 typedef GetRequestableExtensionsCHROMIUM ValueType
;
10931 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
10932 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10933 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10935 static uint32_t ComputeSize() {
10936 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10939 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10941 void Init(uint32_t _bucket_id
) {
10943 bucket_id
= _bucket_id
;
10946 void* Set(void* cmd
, uint32_t _bucket_id
) {
10947 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10948 return NextCmdAddress
<ValueType
>(cmd
);
10951 gpu::CommandHeader header
;
10952 uint32_t bucket_id
;
10955 static_assert(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
10956 "size of GetRequestableExtensionsCHROMIUM should be 8");
10957 static_assert(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
10958 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
10960 offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
10961 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
10963 struct RequestExtensionCHROMIUM
{
10964 typedef RequestExtensionCHROMIUM ValueType
;
10965 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
10966 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10967 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10969 static uint32_t ComputeSize() {
10970 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10973 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10975 void Init(uint32_t _bucket_id
) {
10977 bucket_id
= _bucket_id
;
10980 void* Set(void* cmd
, uint32_t _bucket_id
) {
10981 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
10982 return NextCmdAddress
<ValueType
>(cmd
);
10985 gpu::CommandHeader header
;
10986 uint32_t bucket_id
;
10989 static_assert(sizeof(RequestExtensionCHROMIUM
) == 8,
10990 "size of RequestExtensionCHROMIUM should be 8");
10991 static_assert(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
10992 "offset of RequestExtensionCHROMIUM header should be 0");
10993 static_assert(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
10994 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
10996 struct GetProgramInfoCHROMIUM
{
10997 typedef GetProgramInfoCHROMIUM ValueType
;
10998 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
10999 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11000 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11003 uint32_t link_status
;
11004 uint32_t num_attribs
;
11005 uint32_t num_uniforms
;
11008 static uint32_t ComputeSize() {
11009 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11012 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11014 void Init(GLuint _program
, uint32_t _bucket_id
) {
11016 program
= _program
;
11017 bucket_id
= _bucket_id
;
11020 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11021 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11022 return NextCmdAddress
<ValueType
>(cmd
);
11025 gpu::CommandHeader header
;
11027 uint32_t bucket_id
;
11030 static_assert(sizeof(GetProgramInfoCHROMIUM
) == 12,
11031 "size of GetProgramInfoCHROMIUM should be 12");
11032 static_assert(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
11033 "offset of GetProgramInfoCHROMIUM header should be 0");
11034 static_assert(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
11035 "offset of GetProgramInfoCHROMIUM program should be 4");
11036 static_assert(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
11037 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11038 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
11039 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11041 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
11042 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11044 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
11045 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11048 struct GetUniformBlocksCHROMIUM
{
11049 typedef GetUniformBlocksCHROMIUM ValueType
;
11050 static const CommandId kCmdId
= kGetUniformBlocksCHROMIUM
;
11051 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11052 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11054 typedef uint32_t Result
;
11056 static uint32_t ComputeSize() {
11057 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11060 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11062 void Init(GLuint _program
, uint32_t _bucket_id
) {
11064 program
= _program
;
11065 bucket_id
= _bucket_id
;
11068 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11069 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11070 return NextCmdAddress
<ValueType
>(cmd
);
11073 gpu::CommandHeader header
;
11075 uint32_t bucket_id
;
11078 static_assert(sizeof(GetUniformBlocksCHROMIUM
) == 12,
11079 "size of GetUniformBlocksCHROMIUM should be 12");
11080 static_assert(offsetof(GetUniformBlocksCHROMIUM
, header
) == 0,
11081 "offset of GetUniformBlocksCHROMIUM header should be 0");
11082 static_assert(offsetof(GetUniformBlocksCHROMIUM
, program
) == 4,
11083 "offset of GetUniformBlocksCHROMIUM program should be 4");
11084 static_assert(offsetof(GetUniformBlocksCHROMIUM
, bucket_id
) == 8,
11085 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11087 struct GetTransformFeedbackVaryingsCHROMIUM
{
11088 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType
;
11089 static const CommandId kCmdId
= kGetTransformFeedbackVaryingsCHROMIUM
;
11090 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11091 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11093 typedef uint32_t Result
;
11095 static uint32_t ComputeSize() {
11096 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11099 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11101 void Init(GLuint _program
, uint32_t _bucket_id
) {
11103 program
= _program
;
11104 bucket_id
= _bucket_id
;
11107 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11108 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11109 return NextCmdAddress
<ValueType
>(cmd
);
11112 gpu::CommandHeader header
;
11114 uint32_t bucket_id
;
11117 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM
) == 12,
11118 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11120 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, header
) == 0,
11121 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11123 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, program
) == 4,
11124 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11126 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, bucket_id
) == 8,
11127 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11129 struct GetUniformsES3CHROMIUM
{
11130 typedef GetUniformsES3CHROMIUM ValueType
;
11131 static const CommandId kCmdId
= kGetUniformsES3CHROMIUM
;
11132 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11133 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11135 typedef uint32_t Result
;
11137 static uint32_t ComputeSize() {
11138 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11141 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11143 void Init(GLuint _program
, uint32_t _bucket_id
) {
11145 program
= _program
;
11146 bucket_id
= _bucket_id
;
11149 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11150 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11151 return NextCmdAddress
<ValueType
>(cmd
);
11154 gpu::CommandHeader header
;
11156 uint32_t bucket_id
;
11159 static_assert(sizeof(GetUniformsES3CHROMIUM
) == 12,
11160 "size of GetUniformsES3CHROMIUM should be 12");
11161 static_assert(offsetof(GetUniformsES3CHROMIUM
, header
) == 0,
11162 "offset of GetUniformsES3CHROMIUM header should be 0");
11163 static_assert(offsetof(GetUniformsES3CHROMIUM
, program
) == 4,
11164 "offset of GetUniformsES3CHROMIUM program should be 4");
11165 static_assert(offsetof(GetUniformsES3CHROMIUM
, bucket_id
) == 8,
11166 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
11168 struct GetTranslatedShaderSourceANGLE
{
11169 typedef GetTranslatedShaderSourceANGLE ValueType
;
11170 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
11171 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11172 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11174 static uint32_t ComputeSize() {
11175 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11178 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11180 void Init(GLuint _shader
, uint32_t _bucket_id
) {
11183 bucket_id
= _bucket_id
;
11186 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
11187 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
11188 return NextCmdAddress
<ValueType
>(cmd
);
11191 gpu::CommandHeader header
;
11193 uint32_t bucket_id
;
11196 static_assert(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
11197 "size of GetTranslatedShaderSourceANGLE should be 12");
11198 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
11199 "offset of GetTranslatedShaderSourceANGLE header should be 0");
11200 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
11201 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
11202 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
11203 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
11205 struct PostSubBufferCHROMIUM
{
11206 typedef PostSubBufferCHROMIUM ValueType
;
11207 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
11208 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11209 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11211 static uint32_t ComputeSize() {
11212 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11215 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11217 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11225 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
11226 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
11227 return NextCmdAddress
<ValueType
>(cmd
);
11230 gpu::CommandHeader header
;
11237 static_assert(sizeof(PostSubBufferCHROMIUM
) == 20,
11238 "size of PostSubBufferCHROMIUM should be 20");
11239 static_assert(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
11240 "offset of PostSubBufferCHROMIUM header should be 0");
11241 static_assert(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
11242 "offset of PostSubBufferCHROMIUM x should be 4");
11243 static_assert(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
11244 "offset of PostSubBufferCHROMIUM y should be 8");
11245 static_assert(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
11246 "offset of PostSubBufferCHROMIUM width should be 12");
11247 static_assert(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
11248 "offset of PostSubBufferCHROMIUM height should be 16");
11250 struct TexImageIOSurface2DCHROMIUM
{
11251 typedef TexImageIOSurface2DCHROMIUM ValueType
;
11252 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
11253 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11254 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11256 static uint32_t ComputeSize() {
11257 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11260 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11262 void Init(GLenum _target
,
11265 GLuint _ioSurfaceId
,
11271 ioSurfaceId
= _ioSurfaceId
;
11275 void* Set(void* cmd
,
11279 GLuint _ioSurfaceId
,
11281 static_cast<ValueType
*>(cmd
)
11282 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
11283 return NextCmdAddress
<ValueType
>(cmd
);
11286 gpu::CommandHeader header
;
11290 uint32_t ioSurfaceId
;
11294 static_assert(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
11295 "size of TexImageIOSurface2DCHROMIUM should be 24");
11296 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
11297 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
11298 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
11299 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
11300 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
11301 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
11302 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
11303 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
11304 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
11305 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
11306 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
11307 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
11309 struct CopyTextureCHROMIUM
{
11310 typedef CopyTextureCHROMIUM ValueType
;
11311 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
11312 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11313 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11315 static uint32_t ComputeSize() {
11316 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11319 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11321 void Init(GLenum _target
,
11325 GLint _internalformat
,
11326 GLenum _dest_type
) {
11329 source_id
= _source_id
;
11330 dest_id
= _dest_id
;
11332 internalformat
= _internalformat
;
11333 dest_type
= _dest_type
;
11336 void* Set(void* cmd
,
11341 GLint _internalformat
,
11342 GLenum _dest_type
) {
11343 static_cast<ValueType
*>(cmd
)->Init(_target
, _source_id
, _dest_id
, _level
,
11344 _internalformat
, _dest_type
);
11345 return NextCmdAddress
<ValueType
>(cmd
);
11348 gpu::CommandHeader header
;
11350 uint32_t source_id
;
11353 int32_t internalformat
;
11354 uint32_t dest_type
;
11357 static_assert(sizeof(CopyTextureCHROMIUM
) == 28,
11358 "size of CopyTextureCHROMIUM should be 28");
11359 static_assert(offsetof(CopyTextureCHROMIUM
, header
) == 0,
11360 "offset of CopyTextureCHROMIUM header should be 0");
11361 static_assert(offsetof(CopyTextureCHROMIUM
, target
) == 4,
11362 "offset of CopyTextureCHROMIUM target should be 4");
11363 static_assert(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
11364 "offset of CopyTextureCHROMIUM source_id should be 8");
11365 static_assert(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
11366 "offset of CopyTextureCHROMIUM dest_id should be 12");
11367 static_assert(offsetof(CopyTextureCHROMIUM
, level
) == 16,
11368 "offset of CopyTextureCHROMIUM level should be 16");
11369 static_assert(offsetof(CopyTextureCHROMIUM
, internalformat
) == 20,
11370 "offset of CopyTextureCHROMIUM internalformat should be 20");
11371 static_assert(offsetof(CopyTextureCHROMIUM
, dest_type
) == 24,
11372 "offset of CopyTextureCHROMIUM dest_type should be 24");
11374 struct DrawArraysInstancedANGLE
{
11375 typedef DrawArraysInstancedANGLE ValueType
;
11376 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
11377 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11378 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11380 static uint32_t ComputeSize() {
11381 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11384 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11386 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
11391 primcount
= _primcount
;
11394 void* Set(void* cmd
,
11398 GLsizei _primcount
) {
11399 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
11400 return NextCmdAddress
<ValueType
>(cmd
);
11403 gpu::CommandHeader header
;
11410 static_assert(sizeof(DrawArraysInstancedANGLE
) == 20,
11411 "size of DrawArraysInstancedANGLE should be 20");
11412 static_assert(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
11413 "offset of DrawArraysInstancedANGLE header should be 0");
11414 static_assert(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
11415 "offset of DrawArraysInstancedANGLE mode should be 4");
11416 static_assert(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
11417 "offset of DrawArraysInstancedANGLE first should be 8");
11418 static_assert(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
11419 "offset of DrawArraysInstancedANGLE count should be 12");
11420 static_assert(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
11421 "offset of DrawArraysInstancedANGLE primcount should be 16");
11423 struct DrawElementsInstancedANGLE
{
11424 typedef DrawElementsInstancedANGLE ValueType
;
11425 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
11426 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11427 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11429 static uint32_t ComputeSize() {
11430 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11433 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11435 void Init(GLenum _mode
,
11438 GLuint _index_offset
,
11439 GLsizei _primcount
) {
11444 index_offset
= _index_offset
;
11445 primcount
= _primcount
;
11448 void* Set(void* cmd
,
11452 GLuint _index_offset
,
11453 GLsizei _primcount
) {
11454 static_cast<ValueType
*>(cmd
)
11455 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
11456 return NextCmdAddress
<ValueType
>(cmd
);
11459 gpu::CommandHeader header
;
11463 uint32_t index_offset
;
11467 static_assert(sizeof(DrawElementsInstancedANGLE
) == 24,
11468 "size of DrawElementsInstancedANGLE should be 24");
11469 static_assert(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
11470 "offset of DrawElementsInstancedANGLE header should be 0");
11471 static_assert(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
11472 "offset of DrawElementsInstancedANGLE mode should be 4");
11473 static_assert(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
11474 "offset of DrawElementsInstancedANGLE count should be 8");
11475 static_assert(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
11476 "offset of DrawElementsInstancedANGLE type should be 12");
11477 static_assert(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
11478 "offset of DrawElementsInstancedANGLE index_offset should be 16");
11479 static_assert(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
11480 "offset of DrawElementsInstancedANGLE primcount should be 20");
11482 struct VertexAttribDivisorANGLE
{
11483 typedef VertexAttribDivisorANGLE ValueType
;
11484 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
11485 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11486 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11488 static uint32_t ComputeSize() {
11489 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11492 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11494 void Init(GLuint _index
, GLuint _divisor
) {
11497 divisor
= _divisor
;
11500 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
11501 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
11502 return NextCmdAddress
<ValueType
>(cmd
);
11505 gpu::CommandHeader header
;
11510 static_assert(sizeof(VertexAttribDivisorANGLE
) == 12,
11511 "size of VertexAttribDivisorANGLE should be 12");
11512 static_assert(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
11513 "offset of VertexAttribDivisorANGLE header should be 0");
11514 static_assert(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
11515 "offset of VertexAttribDivisorANGLE index should be 4");
11516 static_assert(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
11517 "offset of VertexAttribDivisorANGLE divisor should be 8");
11519 struct ProduceTextureCHROMIUMImmediate
{
11520 typedef ProduceTextureCHROMIUMImmediate ValueType
;
11521 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
11522 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11523 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11525 static uint32_t ComputeDataSize() {
11526 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11529 static uint32_t ComputeSize() {
11530 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11533 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11535 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
11538 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11541 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
11542 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
11543 const uint32_t size
= ComputeSize();
11544 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11547 gpu::CommandHeader header
;
11551 static_assert(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
11552 "size of ProduceTextureCHROMIUMImmediate should be 8");
11553 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
11554 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
11555 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
11556 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
11558 struct ProduceTextureDirectCHROMIUMImmediate
{
11559 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
11560 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
11561 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11562 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11564 static uint32_t ComputeDataSize() {
11565 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11568 static uint32_t ComputeSize() {
11569 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11572 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11574 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
11576 texture
= _texture
;
11578 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11581 void* Set(void* cmd
,
11584 const GLbyte
* _mailbox
) {
11585 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
11586 const uint32_t size
= ComputeSize();
11587 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11590 gpu::CommandHeader header
;
11595 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
11596 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
11598 offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
11599 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
11601 offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
11602 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
11604 offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
11605 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
11607 struct ConsumeTextureCHROMIUMImmediate
{
11608 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
11609 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
11610 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11611 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11613 static uint32_t ComputeDataSize() {
11614 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
11617 static uint32_t ComputeSize() {
11618 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
11621 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
11623 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
11626 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
11629 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
11630 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
11631 const uint32_t size
= ComputeSize();
11632 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11635 gpu::CommandHeader header
;
11639 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
11640 "size of ConsumeTextureCHROMIUMImmediate should be 8");
11641 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
11642 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
11643 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
11644 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
11646 struct BindUniformLocationCHROMIUMBucket
{
11647 typedef BindUniformLocationCHROMIUMBucket ValueType
;
11648 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
11649 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11650 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11652 static uint32_t ComputeSize() {
11653 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11656 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11658 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
11660 program
= _program
;
11661 location
= _location
;
11662 name_bucket_id
= _name_bucket_id
;
11665 void* Set(void* cmd
,
11668 uint32_t _name_bucket_id
) {
11669 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
11670 return NextCmdAddress
<ValueType
>(cmd
);
11673 gpu::CommandHeader header
;
11676 uint32_t name_bucket_id
;
11679 static_assert(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
11680 "size of BindUniformLocationCHROMIUMBucket should be 16");
11681 static_assert(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
11682 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
11684 offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
11685 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
11687 offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
11688 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
11690 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
11691 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
11693 struct GenValuebuffersCHROMIUMImmediate
{
11694 typedef GenValuebuffersCHROMIUMImmediate ValueType
;
11695 static const CommandId kCmdId
= kGenValuebuffersCHROMIUMImmediate
;
11696 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11697 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11699 static uint32_t ComputeDataSize(GLsizei n
) {
11700 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11703 static uint32_t ComputeSize(GLsizei n
) {
11704 return static_cast<uint32_t>(sizeof(ValueType
) +
11705 ComputeDataSize(n
)); // NOLINT
11708 void SetHeader(GLsizei n
) {
11709 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11712 void Init(GLsizei _n
, GLuint
* _buffers
) {
11715 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
11718 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
11719 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
11720 const uint32_t size
= ComputeSize(_n
);
11721 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11724 gpu::CommandHeader header
;
11728 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate
) == 8,
11729 "size of GenValuebuffersCHROMIUMImmediate should be 8");
11730 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, header
) == 0,
11731 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
11732 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, n
) == 4,
11733 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
11735 struct DeleteValuebuffersCHROMIUMImmediate
{
11736 typedef DeleteValuebuffersCHROMIUMImmediate ValueType
;
11737 static const CommandId kCmdId
= kDeleteValuebuffersCHROMIUMImmediate
;
11738 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11739 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11741 static uint32_t ComputeDataSize(GLsizei n
) {
11742 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11745 static uint32_t ComputeSize(GLsizei n
) {
11746 return static_cast<uint32_t>(sizeof(ValueType
) +
11747 ComputeDataSize(n
)); // NOLINT
11750 void SetHeader(GLsizei n
) {
11751 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11754 void Init(GLsizei _n
, const GLuint
* _valuebuffers
) {
11757 memcpy(ImmediateDataAddress(this), _valuebuffers
, ComputeDataSize(_n
));
11760 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _valuebuffers
) {
11761 static_cast<ValueType
*>(cmd
)->Init(_n
, _valuebuffers
);
11762 const uint32_t size
= ComputeSize(_n
);
11763 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11766 gpu::CommandHeader header
;
11770 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate
) == 8,
11771 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
11773 offsetof(DeleteValuebuffersCHROMIUMImmediate
, header
) == 0,
11774 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
11775 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate
, n
) == 4,
11776 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
11778 struct IsValuebufferCHROMIUM
{
11779 typedef IsValuebufferCHROMIUM ValueType
;
11780 static const CommandId kCmdId
= kIsValuebufferCHROMIUM
;
11781 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11782 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11784 typedef uint32_t Result
;
11786 static uint32_t ComputeSize() {
11787 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11790 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11792 void Init(GLuint _valuebuffer
,
11793 uint32_t _result_shm_id
,
11794 uint32_t _result_shm_offset
) {
11796 valuebuffer
= _valuebuffer
;
11797 result_shm_id
= _result_shm_id
;
11798 result_shm_offset
= _result_shm_offset
;
11801 void* Set(void* cmd
,
11802 GLuint _valuebuffer
,
11803 uint32_t _result_shm_id
,
11804 uint32_t _result_shm_offset
) {
11805 static_cast<ValueType
*>(cmd
)
11806 ->Init(_valuebuffer
, _result_shm_id
, _result_shm_offset
);
11807 return NextCmdAddress
<ValueType
>(cmd
);
11810 gpu::CommandHeader header
;
11811 uint32_t valuebuffer
;
11812 uint32_t result_shm_id
;
11813 uint32_t result_shm_offset
;
11816 static_assert(sizeof(IsValuebufferCHROMIUM
) == 16,
11817 "size of IsValuebufferCHROMIUM should be 16");
11818 static_assert(offsetof(IsValuebufferCHROMIUM
, header
) == 0,
11819 "offset of IsValuebufferCHROMIUM header should be 0");
11820 static_assert(offsetof(IsValuebufferCHROMIUM
, valuebuffer
) == 4,
11821 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
11822 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_id
) == 8,
11823 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
11824 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_offset
) == 12,
11825 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
11827 struct BindValuebufferCHROMIUM
{
11828 typedef BindValuebufferCHROMIUM ValueType
;
11829 static const CommandId kCmdId
= kBindValuebufferCHROMIUM
;
11830 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11831 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11833 static uint32_t ComputeSize() {
11834 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11837 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11839 void Init(GLenum _target
, GLuint _valuebuffer
) {
11842 valuebuffer
= _valuebuffer
;
11845 void* Set(void* cmd
, GLenum _target
, GLuint _valuebuffer
) {
11846 static_cast<ValueType
*>(cmd
)->Init(_target
, _valuebuffer
);
11847 return NextCmdAddress
<ValueType
>(cmd
);
11850 gpu::CommandHeader header
;
11852 uint32_t valuebuffer
;
11855 static_assert(sizeof(BindValuebufferCHROMIUM
) == 12,
11856 "size of BindValuebufferCHROMIUM should be 12");
11857 static_assert(offsetof(BindValuebufferCHROMIUM
, header
) == 0,
11858 "offset of BindValuebufferCHROMIUM header should be 0");
11859 static_assert(offsetof(BindValuebufferCHROMIUM
, target
) == 4,
11860 "offset of BindValuebufferCHROMIUM target should be 4");
11861 static_assert(offsetof(BindValuebufferCHROMIUM
, valuebuffer
) == 8,
11862 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
11864 struct SubscribeValueCHROMIUM
{
11865 typedef SubscribeValueCHROMIUM ValueType
;
11866 static const CommandId kCmdId
= kSubscribeValueCHROMIUM
;
11867 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11868 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11870 static uint32_t ComputeSize() {
11871 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11874 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11876 void Init(GLenum _target
, GLenum _subscription
) {
11879 subscription
= _subscription
;
11882 void* Set(void* cmd
, GLenum _target
, GLenum _subscription
) {
11883 static_cast<ValueType
*>(cmd
)->Init(_target
, _subscription
);
11884 return NextCmdAddress
<ValueType
>(cmd
);
11887 gpu::CommandHeader header
;
11889 uint32_t subscription
;
11892 static_assert(sizeof(SubscribeValueCHROMIUM
) == 12,
11893 "size of SubscribeValueCHROMIUM should be 12");
11894 static_assert(offsetof(SubscribeValueCHROMIUM
, header
) == 0,
11895 "offset of SubscribeValueCHROMIUM header should be 0");
11896 static_assert(offsetof(SubscribeValueCHROMIUM
, target
) == 4,
11897 "offset of SubscribeValueCHROMIUM target should be 4");
11898 static_assert(offsetof(SubscribeValueCHROMIUM
, subscription
) == 8,
11899 "offset of SubscribeValueCHROMIUM subscription should be 8");
11901 struct PopulateSubscribedValuesCHROMIUM
{
11902 typedef PopulateSubscribedValuesCHROMIUM ValueType
;
11903 static const CommandId kCmdId
= kPopulateSubscribedValuesCHROMIUM
;
11904 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11905 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11907 static uint32_t ComputeSize() {
11908 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11911 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11913 void Init(GLenum _target
) {
11918 void* Set(void* cmd
, GLenum _target
) {
11919 static_cast<ValueType
*>(cmd
)->Init(_target
);
11920 return NextCmdAddress
<ValueType
>(cmd
);
11923 gpu::CommandHeader header
;
11927 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM
) == 8,
11928 "size of PopulateSubscribedValuesCHROMIUM should be 8");
11929 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, header
) == 0,
11930 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
11931 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, target
) == 4,
11932 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
11934 struct UniformValuebufferCHROMIUM
{
11935 typedef UniformValuebufferCHROMIUM ValueType
;
11936 static const CommandId kCmdId
= kUniformValuebufferCHROMIUM
;
11937 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11938 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11940 static uint32_t ComputeSize() {
11941 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11944 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11946 void Init(GLint _location
, GLenum _target
, GLenum _subscription
) {
11948 location
= _location
;
11950 subscription
= _subscription
;
11953 void* Set(void* cmd
, GLint _location
, GLenum _target
, GLenum _subscription
) {
11954 static_cast<ValueType
*>(cmd
)->Init(_location
, _target
, _subscription
);
11955 return NextCmdAddress
<ValueType
>(cmd
);
11958 gpu::CommandHeader header
;
11961 uint32_t subscription
;
11964 static_assert(sizeof(UniformValuebufferCHROMIUM
) == 16,
11965 "size of UniformValuebufferCHROMIUM should be 16");
11966 static_assert(offsetof(UniformValuebufferCHROMIUM
, header
) == 0,
11967 "offset of UniformValuebufferCHROMIUM header should be 0");
11968 static_assert(offsetof(UniformValuebufferCHROMIUM
, location
) == 4,
11969 "offset of UniformValuebufferCHROMIUM location should be 4");
11970 static_assert(offsetof(UniformValuebufferCHROMIUM
, target
) == 8,
11971 "offset of UniformValuebufferCHROMIUM target should be 8");
11972 static_assert(offsetof(UniformValuebufferCHROMIUM
, subscription
) == 12,
11973 "offset of UniformValuebufferCHROMIUM subscription should be 12");
11975 struct BindTexImage2DCHROMIUM
{
11976 typedef BindTexImage2DCHROMIUM ValueType
;
11977 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
11978 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11979 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11981 static uint32_t ComputeSize() {
11982 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11985 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11987 void Init(GLenum _target
, GLint _imageId
) {
11990 imageId
= _imageId
;
11993 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
11994 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
11995 return NextCmdAddress
<ValueType
>(cmd
);
11998 gpu::CommandHeader header
;
12003 static_assert(sizeof(BindTexImage2DCHROMIUM
) == 12,
12004 "size of BindTexImage2DCHROMIUM should be 12");
12005 static_assert(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
12006 "offset of BindTexImage2DCHROMIUM header should be 0");
12007 static_assert(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
12008 "offset of BindTexImage2DCHROMIUM target should be 4");
12009 static_assert(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
12010 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12012 struct ReleaseTexImage2DCHROMIUM
{
12013 typedef ReleaseTexImage2DCHROMIUM ValueType
;
12014 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
12015 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12016 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12018 static uint32_t ComputeSize() {
12019 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12022 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12024 void Init(GLenum _target
, GLint _imageId
) {
12027 imageId
= _imageId
;
12030 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12031 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12032 return NextCmdAddress
<ValueType
>(cmd
);
12035 gpu::CommandHeader header
;
12040 static_assert(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
12041 "size of ReleaseTexImage2DCHROMIUM should be 12");
12042 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
12043 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12044 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
12045 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12046 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
12047 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12049 struct TraceBeginCHROMIUM
{
12050 typedef TraceBeginCHROMIUM ValueType
;
12051 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
12052 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12053 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12055 static uint32_t ComputeSize() {
12056 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12059 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12061 void Init(GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12063 category_bucket_id
= _category_bucket_id
;
12064 name_bucket_id
= _name_bucket_id
;
12067 void* Set(void* cmd
, GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12068 static_cast<ValueType
*>(cmd
)->Init(_category_bucket_id
, _name_bucket_id
);
12069 return NextCmdAddress
<ValueType
>(cmd
);
12072 gpu::CommandHeader header
;
12073 uint32_t category_bucket_id
;
12074 uint32_t name_bucket_id
;
12077 static_assert(sizeof(TraceBeginCHROMIUM
) == 12,
12078 "size of TraceBeginCHROMIUM should be 12");
12079 static_assert(offsetof(TraceBeginCHROMIUM
, header
) == 0,
12080 "offset of TraceBeginCHROMIUM header should be 0");
12081 static_assert(offsetof(TraceBeginCHROMIUM
, category_bucket_id
) == 4,
12082 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
12083 static_assert(offsetof(TraceBeginCHROMIUM
, name_bucket_id
) == 8,
12084 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
12086 struct TraceEndCHROMIUM
{
12087 typedef TraceEndCHROMIUM ValueType
;
12088 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
12089 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12090 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12092 static uint32_t ComputeSize() {
12093 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12096 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12098 void Init() { SetHeader(); }
12100 void* Set(void* cmd
) {
12101 static_cast<ValueType
*>(cmd
)->Init();
12102 return NextCmdAddress
<ValueType
>(cmd
);
12105 gpu::CommandHeader header
;
12108 static_assert(sizeof(TraceEndCHROMIUM
) == 4,
12109 "size of TraceEndCHROMIUM should be 4");
12110 static_assert(offsetof(TraceEndCHROMIUM
, header
) == 0,
12111 "offset of TraceEndCHROMIUM header should be 0");
12113 struct AsyncTexSubImage2DCHROMIUM
{
12114 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
12115 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
12116 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12117 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12119 static uint32_t ComputeSize() {
12120 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12123 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12125 void Init(GLenum _target
,
12133 uint32_t _data_shm_id
,
12134 uint32_t _data_shm_offset
,
12135 uint32_t _async_upload_token
,
12136 uint32_t _sync_data_shm_id
,
12137 uint32_t _sync_data_shm_offset
) {
12141 xoffset
= _xoffset
;
12142 yoffset
= _yoffset
;
12147 data_shm_id
= _data_shm_id
;
12148 data_shm_offset
= _data_shm_offset
;
12149 async_upload_token
= _async_upload_token
;
12150 sync_data_shm_id
= _sync_data_shm_id
;
12151 sync_data_shm_offset
= _sync_data_shm_offset
;
12154 void* Set(void* cmd
,
12163 uint32_t _data_shm_id
,
12164 uint32_t _data_shm_offset
,
12165 uint32_t _async_upload_token
,
12166 uint32_t _sync_data_shm_id
,
12167 uint32_t _sync_data_shm_offset
) {
12168 static_cast<ValueType
*>(cmd
)
12169 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
12170 _type
, _data_shm_id
, _data_shm_offset
, _async_upload_token
,
12171 _sync_data_shm_id
, _sync_data_shm_offset
);
12172 return NextCmdAddress
<ValueType
>(cmd
);
12175 gpu::CommandHeader header
;
12184 uint32_t data_shm_id
;
12185 uint32_t data_shm_offset
;
12186 uint32_t async_upload_token
;
12187 uint32_t sync_data_shm_id
;
12188 uint32_t sync_data_shm_offset
;
12191 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
12192 "size of AsyncTexSubImage2DCHROMIUM should be 56");
12193 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
12194 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
12195 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
12196 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
12197 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
12198 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
12199 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
12200 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
12201 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
12202 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
12203 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
12204 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
12205 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
12206 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
12207 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
12208 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
12209 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
12210 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
12211 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
12212 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
12214 offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
12215 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
12217 offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
12218 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
12220 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
12221 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
12223 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
12224 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
12226 struct AsyncTexImage2DCHROMIUM
{
12227 typedef AsyncTexImage2DCHROMIUM ValueType
;
12228 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
12229 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12230 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12232 static uint32_t ComputeSize() {
12233 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12236 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12238 void Init(GLenum _target
,
12240 GLint _internalformat
,
12245 uint32_t _pixels_shm_id
,
12246 uint32_t _pixels_shm_offset
,
12247 uint32_t _async_upload_token
,
12248 uint32_t _sync_data_shm_id
,
12249 uint32_t _sync_data_shm_offset
) {
12253 internalformat
= _internalformat
;
12258 pixels_shm_id
= _pixels_shm_id
;
12259 pixels_shm_offset
= _pixels_shm_offset
;
12260 async_upload_token
= _async_upload_token
;
12261 sync_data_shm_id
= _sync_data_shm_id
;
12262 sync_data_shm_offset
= _sync_data_shm_offset
;
12265 void* Set(void* cmd
,
12268 GLint _internalformat
,
12273 uint32_t _pixels_shm_id
,
12274 uint32_t _pixels_shm_offset
,
12275 uint32_t _async_upload_token
,
12276 uint32_t _sync_data_shm_id
,
12277 uint32_t _sync_data_shm_offset
) {
12278 static_cast<ValueType
*>(cmd
)
12279 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _format
,
12280 _type
, _pixels_shm_id
, _pixels_shm_offset
, _async_upload_token
,
12281 _sync_data_shm_id
, _sync_data_shm_offset
);
12282 return NextCmdAddress
<ValueType
>(cmd
);
12285 gpu::CommandHeader header
;
12288 int32_t internalformat
;
12293 uint32_t pixels_shm_id
;
12294 uint32_t pixels_shm_offset
;
12295 uint32_t async_upload_token
;
12296 uint32_t sync_data_shm_id
;
12297 uint32_t sync_data_shm_offset
;
12298 static const int32_t border
= 0;
12301 static_assert(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
12302 "size of AsyncTexImage2DCHROMIUM should be 52");
12303 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
12304 "offset of AsyncTexImage2DCHROMIUM header should be 0");
12305 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
12306 "offset of AsyncTexImage2DCHROMIUM target should be 4");
12307 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
12308 "offset of AsyncTexImage2DCHROMIUM level should be 8");
12309 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
12310 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
12311 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
12312 "offset of AsyncTexImage2DCHROMIUM width should be 16");
12313 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
12314 "offset of AsyncTexImage2DCHROMIUM height should be 20");
12315 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
12316 "offset of AsyncTexImage2DCHROMIUM format should be 24");
12317 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
12318 "offset of AsyncTexImage2DCHROMIUM type should be 28");
12319 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
12320 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
12322 offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
12323 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
12325 offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
12326 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
12328 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
12329 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
12331 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
12332 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
12334 struct WaitAsyncTexImage2DCHROMIUM
{
12335 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
12336 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
12337 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12338 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12340 static uint32_t ComputeSize() {
12341 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12344 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12346 void Init(GLenum _target
) {
12351 void* Set(void* cmd
, GLenum _target
) {
12352 static_cast<ValueType
*>(cmd
)->Init(_target
);
12353 return NextCmdAddress
<ValueType
>(cmd
);
12356 gpu::CommandHeader header
;
12360 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
12361 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
12362 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
12363 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
12364 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
12365 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
12367 struct WaitAllAsyncTexImage2DCHROMIUM
{
12368 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
12369 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
12370 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12371 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12373 static uint32_t ComputeSize() {
12374 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12377 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12379 void Init() { SetHeader(); }
12381 void* Set(void* cmd
) {
12382 static_cast<ValueType
*>(cmd
)->Init();
12383 return NextCmdAddress
<ValueType
>(cmd
);
12386 gpu::CommandHeader header
;
12389 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
12390 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
12391 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
12392 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
12394 struct DiscardFramebufferEXTImmediate
{
12395 typedef DiscardFramebufferEXTImmediate ValueType
;
12396 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
12397 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12398 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12400 static uint32_t ComputeDataSize(GLsizei count
) {
12401 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
12404 static uint32_t ComputeSize(GLsizei count
) {
12405 return static_cast<uint32_t>(sizeof(ValueType
) +
12406 ComputeDataSize(count
)); // NOLINT
12409 void SetHeader(GLsizei count
) {
12410 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
12413 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
12417 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
12420 void* Set(void* cmd
,
12423 const GLenum
* _attachments
) {
12424 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
12425 const uint32_t size
= ComputeSize(_count
);
12426 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12429 gpu::CommandHeader header
;
12434 static_assert(sizeof(DiscardFramebufferEXTImmediate
) == 12,
12435 "size of DiscardFramebufferEXTImmediate should be 12");
12436 static_assert(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
12437 "offset of DiscardFramebufferEXTImmediate header should be 0");
12438 static_assert(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
12439 "offset of DiscardFramebufferEXTImmediate target should be 4");
12440 static_assert(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
12441 "offset of DiscardFramebufferEXTImmediate count should be 8");
12443 struct LoseContextCHROMIUM
{
12444 typedef LoseContextCHROMIUM ValueType
;
12445 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
12446 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12447 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12449 static uint32_t ComputeSize() {
12450 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12453 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12455 void Init(GLenum _current
, GLenum _other
) {
12457 current
= _current
;
12461 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
12462 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
12463 return NextCmdAddress
<ValueType
>(cmd
);
12466 gpu::CommandHeader header
;
12471 static_assert(sizeof(LoseContextCHROMIUM
) == 12,
12472 "size of LoseContextCHROMIUM should be 12");
12473 static_assert(offsetof(LoseContextCHROMIUM
, header
) == 0,
12474 "offset of LoseContextCHROMIUM header should be 0");
12475 static_assert(offsetof(LoseContextCHROMIUM
, current
) == 4,
12476 "offset of LoseContextCHROMIUM current should be 4");
12477 static_assert(offsetof(LoseContextCHROMIUM
, other
) == 8,
12478 "offset of LoseContextCHROMIUM other should be 8");
12480 struct WaitSyncPointCHROMIUM
{
12481 typedef WaitSyncPointCHROMIUM ValueType
;
12482 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
12483 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12484 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12486 static uint32_t ComputeSize() {
12487 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12490 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12492 void Init(GLuint _sync_point
) {
12494 sync_point
= _sync_point
;
12497 void* Set(void* cmd
, GLuint _sync_point
) {
12498 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
12499 return NextCmdAddress
<ValueType
>(cmd
);
12502 gpu::CommandHeader header
;
12503 uint32_t sync_point
;
12506 static_assert(sizeof(WaitSyncPointCHROMIUM
) == 8,
12507 "size of WaitSyncPointCHROMIUM should be 8");
12508 static_assert(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
12509 "offset of WaitSyncPointCHROMIUM header should be 0");
12510 static_assert(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
12511 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
12513 struct DrawBuffersEXTImmediate
{
12514 typedef DrawBuffersEXTImmediate ValueType
;
12515 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
12516 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12517 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12519 static uint32_t ComputeDataSize(GLsizei count
) {
12520 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
12523 static uint32_t ComputeSize(GLsizei count
) {
12524 return static_cast<uint32_t>(sizeof(ValueType
) +
12525 ComputeDataSize(count
)); // NOLINT
12528 void SetHeader(GLsizei count
) {
12529 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
12532 void Init(GLsizei _count
, const GLenum
* _bufs
) {
12535 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
12538 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
12539 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
12540 const uint32_t size
= ComputeSize(_count
);
12541 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12544 gpu::CommandHeader header
;
12548 static_assert(sizeof(DrawBuffersEXTImmediate
) == 8,
12549 "size of DrawBuffersEXTImmediate should be 8");
12550 static_assert(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
12551 "offset of DrawBuffersEXTImmediate header should be 0");
12552 static_assert(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
12553 "offset of DrawBuffersEXTImmediate count should be 4");
12555 struct DiscardBackbufferCHROMIUM
{
12556 typedef DiscardBackbufferCHROMIUM ValueType
;
12557 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
12558 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12559 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12561 static uint32_t ComputeSize() {
12562 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12565 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12567 void Init() { SetHeader(); }
12569 void* Set(void* cmd
) {
12570 static_cast<ValueType
*>(cmd
)->Init();
12571 return NextCmdAddress
<ValueType
>(cmd
);
12574 gpu::CommandHeader header
;
12577 static_assert(sizeof(DiscardBackbufferCHROMIUM
) == 4,
12578 "size of DiscardBackbufferCHROMIUM should be 4");
12579 static_assert(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
12580 "offset of DiscardBackbufferCHROMIUM header should be 0");
12582 struct ScheduleOverlayPlaneCHROMIUM
{
12583 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
12584 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
12585 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12586 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12588 static uint32_t ComputeSize() {
12589 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12592 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12594 void Init(GLint _plane_z_order
,
12595 GLenum _plane_transform
,
12596 GLuint _overlay_texture_id
,
12599 GLint _bounds_width
,
12600 GLint _bounds_height
,
12604 GLfloat _uv_height
) {
12606 plane_z_order
= _plane_z_order
;
12607 plane_transform
= _plane_transform
;
12608 overlay_texture_id
= _overlay_texture_id
;
12609 bounds_x
= _bounds_x
;
12610 bounds_y
= _bounds_y
;
12611 bounds_width
= _bounds_width
;
12612 bounds_height
= _bounds_height
;
12615 uv_width
= _uv_width
;
12616 uv_height
= _uv_height
;
12619 void* Set(void* cmd
,
12620 GLint _plane_z_order
,
12621 GLenum _plane_transform
,
12622 GLuint _overlay_texture_id
,
12625 GLint _bounds_width
,
12626 GLint _bounds_height
,
12630 GLfloat _uv_height
) {
12631 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
, _plane_transform
,
12632 _overlay_texture_id
, _bounds_x
,
12633 _bounds_y
, _bounds_width
, _bounds_height
,
12634 _uv_x
, _uv_y
, _uv_width
, _uv_height
);
12635 return NextCmdAddress
<ValueType
>(cmd
);
12638 gpu::CommandHeader header
;
12639 int32_t plane_z_order
;
12640 uint32_t plane_transform
;
12641 uint32_t overlay_texture_id
;
12644 int32_t bounds_width
;
12645 int32_t bounds_height
;
12652 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
12653 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
12654 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
12655 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
12657 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
12658 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
12660 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
12661 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
12663 offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
12664 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
12665 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
12666 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
12667 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
12668 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
12670 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
12671 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
12673 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
12674 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
12675 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
12676 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
12677 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
12678 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
12679 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
12680 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
12681 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
12682 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
12684 struct SwapInterval
{
12685 typedef SwapInterval ValueType
;
12686 static const CommandId kCmdId
= kSwapInterval
;
12687 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12688 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12690 static uint32_t ComputeSize() {
12691 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12694 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12696 void Init(GLint _interval
) {
12698 interval
= _interval
;
12701 void* Set(void* cmd
, GLint _interval
) {
12702 static_cast<ValueType
*>(cmd
)->Init(_interval
);
12703 return NextCmdAddress
<ValueType
>(cmd
);
12706 gpu::CommandHeader header
;
12710 static_assert(sizeof(SwapInterval
) == 8, "size of SwapInterval should be 8");
12711 static_assert(offsetof(SwapInterval
, header
) == 0,
12712 "offset of SwapInterval header should be 0");
12713 static_assert(offsetof(SwapInterval
, interval
) == 4,
12714 "offset of SwapInterval interval should be 4");
12716 struct MatrixLoadfCHROMIUMImmediate
{
12717 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
12718 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
12719 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12720 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12722 static uint32_t ComputeDataSize() {
12723 return static_cast<uint32_t>(sizeof(GLfloat
) * 16);
12726 static uint32_t ComputeSize() {
12727 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12730 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12732 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
12734 matrixMode
= _matrixMode
;
12735 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
12738 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
12739 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
12740 const uint32_t size
= ComputeSize();
12741 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12744 gpu::CommandHeader header
;
12745 uint32_t matrixMode
;
12748 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
12749 "size of MatrixLoadfCHROMIUMImmediate should be 8");
12750 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
12751 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
12752 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
12753 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
12755 struct MatrixLoadIdentityCHROMIUM
{
12756 typedef MatrixLoadIdentityCHROMIUM ValueType
;
12757 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
12758 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12759 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12761 static uint32_t ComputeSize() {
12762 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12765 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12767 void Init(GLenum _matrixMode
) {
12769 matrixMode
= _matrixMode
;
12772 void* Set(void* cmd
, GLenum _matrixMode
) {
12773 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
12774 return NextCmdAddress
<ValueType
>(cmd
);
12777 gpu::CommandHeader header
;
12778 uint32_t matrixMode
;
12781 static_assert(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
12782 "size of MatrixLoadIdentityCHROMIUM should be 8");
12783 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
12784 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
12785 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
12786 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
12788 struct BlendBarrierKHR
{
12789 typedef BlendBarrierKHR ValueType
;
12790 static const CommandId kCmdId
= kBlendBarrierKHR
;
12791 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12792 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12794 static uint32_t ComputeSize() {
12795 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12798 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12800 void Init() { SetHeader(); }
12802 void* Set(void* cmd
) {
12803 static_cast<ValueType
*>(cmd
)->Init();
12804 return NextCmdAddress
<ValueType
>(cmd
);
12807 gpu::CommandHeader header
;
12810 static_assert(sizeof(BlendBarrierKHR
) == 4,
12811 "size of BlendBarrierKHR should be 4");
12812 static_assert(offsetof(BlendBarrierKHR
, header
) == 0,
12813 "offset of BlendBarrierKHR header should be 0");
12815 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_