1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
14 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
15 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
17 struct ActiveTexture
{
18 typedef ActiveTexture ValueType
;
19 static const CommandId kCmdId
= kActiveTexture
;
20 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
21 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
23 static uint32_t ComputeSize() {
24 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
27 void SetHeader() { header
.SetCmd
<ValueType
>(); }
29 void Init(GLenum _texture
) {
34 void* Set(void* cmd
, GLenum _texture
) {
35 static_cast<ValueType
*>(cmd
)->Init(_texture
);
36 return NextCmdAddress
<ValueType
>(cmd
);
39 gpu::CommandHeader header
;
43 static_assert(sizeof(ActiveTexture
) == 8, "size of ActiveTexture should be 8");
44 static_assert(offsetof(ActiveTexture
, header
) == 0,
45 "offset of ActiveTexture header should be 0");
46 static_assert(offsetof(ActiveTexture
, texture
) == 4,
47 "offset of ActiveTexture texture should be 4");
50 typedef AttachShader ValueType
;
51 static const CommandId kCmdId
= kAttachShader
;
52 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
53 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
55 static uint32_t ComputeSize() {
56 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
59 void SetHeader() { header
.SetCmd
<ValueType
>(); }
61 void Init(GLuint _program
, GLuint _shader
) {
67 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
68 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
69 return NextCmdAddress
<ValueType
>(cmd
);
72 gpu::CommandHeader header
;
77 static_assert(sizeof(AttachShader
) == 12, "size of AttachShader should be 12");
78 static_assert(offsetof(AttachShader
, header
) == 0,
79 "offset of AttachShader header should be 0");
80 static_assert(offsetof(AttachShader
, program
) == 4,
81 "offset of AttachShader program should be 4");
82 static_assert(offsetof(AttachShader
, shader
) == 8,
83 "offset of AttachShader shader should be 8");
85 struct BindAttribLocationBucket
{
86 typedef BindAttribLocationBucket ValueType
;
87 static const CommandId kCmdId
= kBindAttribLocationBucket
;
88 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
89 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
91 static uint32_t ComputeSize() {
92 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
95 void SetHeader() { header
.SetCmd
<ValueType
>(); }
97 void Init(GLuint _program
, GLuint _index
, uint32_t _name_bucket_id
) {
101 name_bucket_id
= _name_bucket_id
;
107 uint32_t _name_bucket_id
) {
108 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
);
109 return NextCmdAddress
<ValueType
>(cmd
);
112 gpu::CommandHeader header
;
115 uint32_t name_bucket_id
;
118 static_assert(sizeof(BindAttribLocationBucket
) == 16,
119 "size of BindAttribLocationBucket should be 16");
120 static_assert(offsetof(BindAttribLocationBucket
, header
) == 0,
121 "offset of BindAttribLocationBucket header should be 0");
122 static_assert(offsetof(BindAttribLocationBucket
, program
) == 4,
123 "offset of BindAttribLocationBucket program should be 4");
124 static_assert(offsetof(BindAttribLocationBucket
, index
) == 8,
125 "offset of BindAttribLocationBucket index should be 8");
126 static_assert(offsetof(BindAttribLocationBucket
, name_bucket_id
) == 12,
127 "offset of BindAttribLocationBucket name_bucket_id should be 12");
130 typedef BindBuffer ValueType
;
131 static const CommandId kCmdId
= kBindBuffer
;
132 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
133 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
135 static uint32_t ComputeSize() {
136 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
139 void SetHeader() { header
.SetCmd
<ValueType
>(); }
141 void Init(GLenum _target
, GLuint _buffer
) {
147 void* Set(void* cmd
, GLenum _target
, GLuint _buffer
) {
148 static_cast<ValueType
*>(cmd
)->Init(_target
, _buffer
);
149 return NextCmdAddress
<ValueType
>(cmd
);
152 gpu::CommandHeader header
;
157 static_assert(sizeof(BindBuffer
) == 12, "size of BindBuffer should be 12");
158 static_assert(offsetof(BindBuffer
, header
) == 0,
159 "offset of BindBuffer header should be 0");
160 static_assert(offsetof(BindBuffer
, target
) == 4,
161 "offset of BindBuffer target should be 4");
162 static_assert(offsetof(BindBuffer
, buffer
) == 8,
163 "offset of BindBuffer buffer should be 8");
165 struct BindBufferBase
{
166 typedef BindBufferBase ValueType
;
167 static const CommandId kCmdId
= kBindBufferBase
;
168 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
169 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
171 static uint32_t ComputeSize() {
172 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
175 void SetHeader() { header
.SetCmd
<ValueType
>(); }
177 void Init(GLenum _target
, GLuint _index
, GLuint _buffer
) {
184 void* Set(void* cmd
, GLenum _target
, GLuint _index
, GLuint _buffer
) {
185 static_cast<ValueType
*>(cmd
)->Init(_target
, _index
, _buffer
);
186 return NextCmdAddress
<ValueType
>(cmd
);
189 gpu::CommandHeader header
;
195 static_assert(sizeof(BindBufferBase
) == 16,
196 "size of BindBufferBase should be 16");
197 static_assert(offsetof(BindBufferBase
, header
) == 0,
198 "offset of BindBufferBase header should be 0");
199 static_assert(offsetof(BindBufferBase
, target
) == 4,
200 "offset of BindBufferBase target should be 4");
201 static_assert(offsetof(BindBufferBase
, index
) == 8,
202 "offset of BindBufferBase index should be 8");
203 static_assert(offsetof(BindBufferBase
, buffer
) == 12,
204 "offset of BindBufferBase buffer should be 12");
206 struct BindBufferRange
{
207 typedef BindBufferRange ValueType
;
208 static const CommandId kCmdId
= kBindBufferRange
;
209 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
210 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
212 static uint32_t ComputeSize() {
213 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
216 void SetHeader() { header
.SetCmd
<ValueType
>(); }
218 void Init(GLenum _target
,
237 static_cast<ValueType
*>(cmd
)
238 ->Init(_target
, _index
, _buffer
, _offset
, _size
);
239 return NextCmdAddress
<ValueType
>(cmd
);
242 gpu::CommandHeader header
;
250 static_assert(sizeof(BindBufferRange
) == 24,
251 "size of BindBufferRange should be 24");
252 static_assert(offsetof(BindBufferRange
, header
) == 0,
253 "offset of BindBufferRange header should be 0");
254 static_assert(offsetof(BindBufferRange
, target
) == 4,
255 "offset of BindBufferRange target should be 4");
256 static_assert(offsetof(BindBufferRange
, index
) == 8,
257 "offset of BindBufferRange index should be 8");
258 static_assert(offsetof(BindBufferRange
, buffer
) == 12,
259 "offset of BindBufferRange buffer should be 12");
260 static_assert(offsetof(BindBufferRange
, offset
) == 16,
261 "offset of BindBufferRange offset should be 16");
262 static_assert(offsetof(BindBufferRange
, size
) == 20,
263 "offset of BindBufferRange size should be 20");
265 struct BindFramebuffer
{
266 typedef BindFramebuffer ValueType
;
267 static const CommandId kCmdId
= kBindFramebuffer
;
268 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
269 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
271 static uint32_t ComputeSize() {
272 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
275 void SetHeader() { header
.SetCmd
<ValueType
>(); }
277 void Init(GLenum _target
, GLuint _framebuffer
) {
280 framebuffer
= _framebuffer
;
283 void* Set(void* cmd
, GLenum _target
, GLuint _framebuffer
) {
284 static_cast<ValueType
*>(cmd
)->Init(_target
, _framebuffer
);
285 return NextCmdAddress
<ValueType
>(cmd
);
288 gpu::CommandHeader header
;
290 uint32_t framebuffer
;
293 static_assert(sizeof(BindFramebuffer
) == 12,
294 "size of BindFramebuffer should be 12");
295 static_assert(offsetof(BindFramebuffer
, header
) == 0,
296 "offset of BindFramebuffer header should be 0");
297 static_assert(offsetof(BindFramebuffer
, target
) == 4,
298 "offset of BindFramebuffer target should be 4");
299 static_assert(offsetof(BindFramebuffer
, framebuffer
) == 8,
300 "offset of BindFramebuffer framebuffer should be 8");
302 struct BindRenderbuffer
{
303 typedef BindRenderbuffer ValueType
;
304 static const CommandId kCmdId
= kBindRenderbuffer
;
305 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
306 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
308 static uint32_t ComputeSize() {
309 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
312 void SetHeader() { header
.SetCmd
<ValueType
>(); }
314 void Init(GLenum _target
, GLuint _renderbuffer
) {
317 renderbuffer
= _renderbuffer
;
320 void* Set(void* cmd
, GLenum _target
, GLuint _renderbuffer
) {
321 static_cast<ValueType
*>(cmd
)->Init(_target
, _renderbuffer
);
322 return NextCmdAddress
<ValueType
>(cmd
);
325 gpu::CommandHeader header
;
327 uint32_t renderbuffer
;
330 static_assert(sizeof(BindRenderbuffer
) == 12,
331 "size of BindRenderbuffer should be 12");
332 static_assert(offsetof(BindRenderbuffer
, header
) == 0,
333 "offset of BindRenderbuffer header should be 0");
334 static_assert(offsetof(BindRenderbuffer
, target
) == 4,
335 "offset of BindRenderbuffer target should be 4");
336 static_assert(offsetof(BindRenderbuffer
, renderbuffer
) == 8,
337 "offset of BindRenderbuffer renderbuffer should be 8");
340 typedef BindSampler ValueType
;
341 static const CommandId kCmdId
= kBindSampler
;
342 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
343 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
345 static uint32_t ComputeSize() {
346 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
349 void SetHeader() { header
.SetCmd
<ValueType
>(); }
351 void Init(GLuint _unit
, GLuint _sampler
) {
357 void* Set(void* cmd
, GLuint _unit
, GLuint _sampler
) {
358 static_cast<ValueType
*>(cmd
)->Init(_unit
, _sampler
);
359 return NextCmdAddress
<ValueType
>(cmd
);
362 gpu::CommandHeader header
;
367 static_assert(sizeof(BindSampler
) == 12, "size of BindSampler should be 12");
368 static_assert(offsetof(BindSampler
, header
) == 0,
369 "offset of BindSampler header should be 0");
370 static_assert(offsetof(BindSampler
, unit
) == 4,
371 "offset of BindSampler unit should be 4");
372 static_assert(offsetof(BindSampler
, sampler
) == 8,
373 "offset of BindSampler sampler should be 8");
376 typedef BindTexture ValueType
;
377 static const CommandId kCmdId
= kBindTexture
;
378 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
379 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
381 static uint32_t ComputeSize() {
382 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
385 void SetHeader() { header
.SetCmd
<ValueType
>(); }
387 void Init(GLenum _target
, GLuint _texture
) {
393 void* Set(void* cmd
, GLenum _target
, GLuint _texture
) {
394 static_cast<ValueType
*>(cmd
)->Init(_target
, _texture
);
395 return NextCmdAddress
<ValueType
>(cmd
);
398 gpu::CommandHeader header
;
403 static_assert(sizeof(BindTexture
) == 12, "size of BindTexture should be 12");
404 static_assert(offsetof(BindTexture
, header
) == 0,
405 "offset of BindTexture header should be 0");
406 static_assert(offsetof(BindTexture
, target
) == 4,
407 "offset of BindTexture target should be 4");
408 static_assert(offsetof(BindTexture
, texture
) == 8,
409 "offset of BindTexture texture should be 8");
411 struct BindTransformFeedback
{
412 typedef BindTransformFeedback ValueType
;
413 static const CommandId kCmdId
= kBindTransformFeedback
;
414 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
415 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
417 static uint32_t ComputeSize() {
418 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
421 void SetHeader() { header
.SetCmd
<ValueType
>(); }
423 void Init(GLenum _target
, GLuint _transformfeedback
) {
426 transformfeedback
= _transformfeedback
;
429 void* Set(void* cmd
, GLenum _target
, GLuint _transformfeedback
) {
430 static_cast<ValueType
*>(cmd
)->Init(_target
, _transformfeedback
);
431 return NextCmdAddress
<ValueType
>(cmd
);
434 gpu::CommandHeader header
;
436 uint32_t transformfeedback
;
439 static_assert(sizeof(BindTransformFeedback
) == 12,
440 "size of BindTransformFeedback should be 12");
441 static_assert(offsetof(BindTransformFeedback
, header
) == 0,
442 "offset of BindTransformFeedback header should be 0");
443 static_assert(offsetof(BindTransformFeedback
, target
) == 4,
444 "offset of BindTransformFeedback target should be 4");
445 static_assert(offsetof(BindTransformFeedback
, transformfeedback
) == 8,
446 "offset of BindTransformFeedback transformfeedback should be 8");
449 typedef BlendColor ValueType
;
450 static const CommandId kCmdId
= kBlendColor
;
451 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
452 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
454 static uint32_t ComputeSize() {
455 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
458 void SetHeader() { header
.SetCmd
<ValueType
>(); }
460 void Init(GLclampf _red
, GLclampf _green
, GLclampf _blue
, GLclampf _alpha
) {
473 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
474 return NextCmdAddress
<ValueType
>(cmd
);
477 gpu::CommandHeader header
;
484 static_assert(sizeof(BlendColor
) == 20, "size of BlendColor should be 20");
485 static_assert(offsetof(BlendColor
, header
) == 0,
486 "offset of BlendColor header should be 0");
487 static_assert(offsetof(BlendColor
, red
) == 4,
488 "offset of BlendColor red should be 4");
489 static_assert(offsetof(BlendColor
, green
) == 8,
490 "offset of BlendColor green should be 8");
491 static_assert(offsetof(BlendColor
, blue
) == 12,
492 "offset of BlendColor blue should be 12");
493 static_assert(offsetof(BlendColor
, alpha
) == 16,
494 "offset of BlendColor alpha should be 16");
496 struct BlendEquation
{
497 typedef BlendEquation ValueType
;
498 static const CommandId kCmdId
= kBlendEquation
;
499 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
500 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
502 static uint32_t ComputeSize() {
503 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
506 void SetHeader() { header
.SetCmd
<ValueType
>(); }
508 void Init(GLenum _mode
) {
513 void* Set(void* cmd
, GLenum _mode
) {
514 static_cast<ValueType
*>(cmd
)->Init(_mode
);
515 return NextCmdAddress
<ValueType
>(cmd
);
518 gpu::CommandHeader header
;
522 static_assert(sizeof(BlendEquation
) == 8, "size of BlendEquation should be 8");
523 static_assert(offsetof(BlendEquation
, header
) == 0,
524 "offset of BlendEquation header should be 0");
525 static_assert(offsetof(BlendEquation
, mode
) == 4,
526 "offset of BlendEquation mode should be 4");
528 struct BlendEquationSeparate
{
529 typedef BlendEquationSeparate ValueType
;
530 static const CommandId kCmdId
= kBlendEquationSeparate
;
531 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
532 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
534 static uint32_t ComputeSize() {
535 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
538 void SetHeader() { header
.SetCmd
<ValueType
>(); }
540 void Init(GLenum _modeRGB
, GLenum _modeAlpha
) {
543 modeAlpha
= _modeAlpha
;
546 void* Set(void* cmd
, GLenum _modeRGB
, GLenum _modeAlpha
) {
547 static_cast<ValueType
*>(cmd
)->Init(_modeRGB
, _modeAlpha
);
548 return NextCmdAddress
<ValueType
>(cmd
);
551 gpu::CommandHeader header
;
556 static_assert(sizeof(BlendEquationSeparate
) == 12,
557 "size of BlendEquationSeparate should be 12");
558 static_assert(offsetof(BlendEquationSeparate
, header
) == 0,
559 "offset of BlendEquationSeparate header should be 0");
560 static_assert(offsetof(BlendEquationSeparate
, modeRGB
) == 4,
561 "offset of BlendEquationSeparate modeRGB should be 4");
562 static_assert(offsetof(BlendEquationSeparate
, modeAlpha
) == 8,
563 "offset of BlendEquationSeparate modeAlpha should be 8");
566 typedef BlendFunc ValueType
;
567 static const CommandId kCmdId
= kBlendFunc
;
568 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
569 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
571 static uint32_t ComputeSize() {
572 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
575 void SetHeader() { header
.SetCmd
<ValueType
>(); }
577 void Init(GLenum _sfactor
, GLenum _dfactor
) {
583 void* Set(void* cmd
, GLenum _sfactor
, GLenum _dfactor
) {
584 static_cast<ValueType
*>(cmd
)->Init(_sfactor
, _dfactor
);
585 return NextCmdAddress
<ValueType
>(cmd
);
588 gpu::CommandHeader header
;
593 static_assert(sizeof(BlendFunc
) == 12, "size of BlendFunc should be 12");
594 static_assert(offsetof(BlendFunc
, header
) == 0,
595 "offset of BlendFunc header should be 0");
596 static_assert(offsetof(BlendFunc
, sfactor
) == 4,
597 "offset of BlendFunc sfactor should be 4");
598 static_assert(offsetof(BlendFunc
, dfactor
) == 8,
599 "offset of BlendFunc dfactor should be 8");
601 struct BlendFuncSeparate
{
602 typedef BlendFuncSeparate ValueType
;
603 static const CommandId kCmdId
= kBlendFuncSeparate
;
604 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
605 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
607 static uint32_t ComputeSize() {
608 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
611 void SetHeader() { header
.SetCmd
<ValueType
>(); }
613 void Init(GLenum _srcRGB
,
620 srcAlpha
= _srcAlpha
;
621 dstAlpha
= _dstAlpha
;
629 static_cast<ValueType
*>(cmd
)->Init(_srcRGB
, _dstRGB
, _srcAlpha
, _dstAlpha
);
630 return NextCmdAddress
<ValueType
>(cmd
);
633 gpu::CommandHeader header
;
640 static_assert(sizeof(BlendFuncSeparate
) == 20,
641 "size of BlendFuncSeparate should be 20");
642 static_assert(offsetof(BlendFuncSeparate
, header
) == 0,
643 "offset of BlendFuncSeparate header should be 0");
644 static_assert(offsetof(BlendFuncSeparate
, srcRGB
) == 4,
645 "offset of BlendFuncSeparate srcRGB should be 4");
646 static_assert(offsetof(BlendFuncSeparate
, dstRGB
) == 8,
647 "offset of BlendFuncSeparate dstRGB should be 8");
648 static_assert(offsetof(BlendFuncSeparate
, srcAlpha
) == 12,
649 "offset of BlendFuncSeparate srcAlpha should be 12");
650 static_assert(offsetof(BlendFuncSeparate
, dstAlpha
) == 16,
651 "offset of BlendFuncSeparate dstAlpha should be 16");
654 typedef BufferData ValueType
;
655 static const CommandId kCmdId
= kBufferData
;
656 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
657 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
659 static uint32_t ComputeSize() {
660 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
663 void SetHeader() { header
.SetCmd
<ValueType
>(); }
665 void Init(GLenum _target
,
667 uint32_t _data_shm_id
,
668 uint32_t _data_shm_offset
,
673 data_shm_id
= _data_shm_id
;
674 data_shm_offset
= _data_shm_offset
;
681 uint32_t _data_shm_id
,
682 uint32_t _data_shm_offset
,
684 static_cast<ValueType
*>(cmd
)
685 ->Init(_target
, _size
, _data_shm_id
, _data_shm_offset
, _usage
);
686 return NextCmdAddress
<ValueType
>(cmd
);
689 gpu::CommandHeader header
;
692 uint32_t data_shm_id
;
693 uint32_t data_shm_offset
;
697 static_assert(sizeof(BufferData
) == 24, "size of BufferData should be 24");
698 static_assert(offsetof(BufferData
, header
) == 0,
699 "offset of BufferData header should be 0");
700 static_assert(offsetof(BufferData
, target
) == 4,
701 "offset of BufferData target should be 4");
702 static_assert(offsetof(BufferData
, size
) == 8,
703 "offset of BufferData size should be 8");
704 static_assert(offsetof(BufferData
, data_shm_id
) == 12,
705 "offset of BufferData data_shm_id should be 12");
706 static_assert(offsetof(BufferData
, data_shm_offset
) == 16,
707 "offset of BufferData data_shm_offset should be 16");
708 static_assert(offsetof(BufferData
, usage
) == 20,
709 "offset of BufferData usage should be 20");
711 struct BufferSubData
{
712 typedef BufferSubData ValueType
;
713 static const CommandId kCmdId
= kBufferSubData
;
714 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
715 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
717 static uint32_t ComputeSize() {
718 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
721 void SetHeader() { header
.SetCmd
<ValueType
>(); }
723 void Init(GLenum _target
,
726 uint32_t _data_shm_id
,
727 uint32_t _data_shm_offset
) {
732 data_shm_id
= _data_shm_id
;
733 data_shm_offset
= _data_shm_offset
;
740 uint32_t _data_shm_id
,
741 uint32_t _data_shm_offset
) {
742 static_cast<ValueType
*>(cmd
)
743 ->Init(_target
, _offset
, _size
, _data_shm_id
, _data_shm_offset
);
744 return NextCmdAddress
<ValueType
>(cmd
);
747 gpu::CommandHeader header
;
751 uint32_t data_shm_id
;
752 uint32_t data_shm_offset
;
755 static_assert(sizeof(BufferSubData
) == 24,
756 "size of BufferSubData should be 24");
757 static_assert(offsetof(BufferSubData
, header
) == 0,
758 "offset of BufferSubData header should be 0");
759 static_assert(offsetof(BufferSubData
, target
) == 4,
760 "offset of BufferSubData target should be 4");
761 static_assert(offsetof(BufferSubData
, offset
) == 8,
762 "offset of BufferSubData offset should be 8");
763 static_assert(offsetof(BufferSubData
, size
) == 12,
764 "offset of BufferSubData size should be 12");
765 static_assert(offsetof(BufferSubData
, data_shm_id
) == 16,
766 "offset of BufferSubData data_shm_id should be 16");
767 static_assert(offsetof(BufferSubData
, data_shm_offset
) == 20,
768 "offset of BufferSubData data_shm_offset should be 20");
770 struct CheckFramebufferStatus
{
771 typedef CheckFramebufferStatus ValueType
;
772 static const CommandId kCmdId
= kCheckFramebufferStatus
;
773 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
774 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
776 typedef GLenum Result
;
778 static uint32_t ComputeSize() {
779 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
782 void SetHeader() { header
.SetCmd
<ValueType
>(); }
784 void Init(GLenum _target
,
785 uint32_t _result_shm_id
,
786 uint32_t _result_shm_offset
) {
789 result_shm_id
= _result_shm_id
;
790 result_shm_offset
= _result_shm_offset
;
795 uint32_t _result_shm_id
,
796 uint32_t _result_shm_offset
) {
797 static_cast<ValueType
*>(cmd
)
798 ->Init(_target
, _result_shm_id
, _result_shm_offset
);
799 return NextCmdAddress
<ValueType
>(cmd
);
802 gpu::CommandHeader header
;
804 uint32_t result_shm_id
;
805 uint32_t result_shm_offset
;
808 static_assert(sizeof(CheckFramebufferStatus
) == 16,
809 "size of CheckFramebufferStatus should be 16");
810 static_assert(offsetof(CheckFramebufferStatus
, header
) == 0,
811 "offset of CheckFramebufferStatus header should be 0");
812 static_assert(offsetof(CheckFramebufferStatus
, target
) == 4,
813 "offset of CheckFramebufferStatus target should be 4");
814 static_assert(offsetof(CheckFramebufferStatus
, result_shm_id
) == 8,
815 "offset of CheckFramebufferStatus result_shm_id should be 8");
817 offsetof(CheckFramebufferStatus
, result_shm_offset
) == 12,
818 "offset of CheckFramebufferStatus result_shm_offset should be 12");
821 typedef Clear ValueType
;
822 static const CommandId kCmdId
= kClear
;
823 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
824 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
826 static uint32_t ComputeSize() {
827 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
830 void SetHeader() { header
.SetCmd
<ValueType
>(); }
832 void Init(GLbitfield _mask
) {
837 void* Set(void* cmd
, GLbitfield _mask
) {
838 static_cast<ValueType
*>(cmd
)->Init(_mask
);
839 return NextCmdAddress
<ValueType
>(cmd
);
842 gpu::CommandHeader header
;
846 static_assert(sizeof(Clear
) == 8, "size of Clear should be 8");
847 static_assert(offsetof(Clear
, header
) == 0,
848 "offset of Clear header should be 0");
849 static_assert(offsetof(Clear
, mask
) == 4, "offset of Clear mask should be 4");
851 struct ClearBufferfi
{
852 typedef ClearBufferfi ValueType
;
853 static const CommandId kCmdId
= kClearBufferfi
;
854 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
855 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
857 static uint32_t ComputeSize() {
858 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
861 void SetHeader() { header
.SetCmd
<ValueType
>(); }
863 void Init(GLenum _buffer
,
869 drawbuffers
= _drawbuffers
;
879 static_cast<ValueType
*>(cmd
)->Init(_buffer
, _drawbuffers
, _depth
, _stencil
);
880 return NextCmdAddress
<ValueType
>(cmd
);
883 gpu::CommandHeader header
;
890 static_assert(sizeof(ClearBufferfi
) == 20,
891 "size of ClearBufferfi should be 20");
892 static_assert(offsetof(ClearBufferfi
, header
) == 0,
893 "offset of ClearBufferfi header should be 0");
894 static_assert(offsetof(ClearBufferfi
, buffer
) == 4,
895 "offset of ClearBufferfi buffer should be 4");
896 static_assert(offsetof(ClearBufferfi
, drawbuffers
) == 8,
897 "offset of ClearBufferfi drawbuffers should be 8");
898 static_assert(offsetof(ClearBufferfi
, depth
) == 12,
899 "offset of ClearBufferfi depth should be 12");
900 static_assert(offsetof(ClearBufferfi
, stencil
) == 16,
901 "offset of ClearBufferfi stencil should be 16");
903 struct ClearBufferfvImmediate
{
904 typedef ClearBufferfvImmediate ValueType
;
905 static const CommandId kCmdId
= kClearBufferfvImmediate
;
906 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
907 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
909 static uint32_t ComputeDataSize() {
910 return static_cast<uint32_t>(sizeof(GLfloat
) * 4);
913 static uint32_t ComputeEffectiveDataSize(GLenum buffer
) {
914 return static_cast<uint32_t>(sizeof(GLfloat
) *
915 GLES2Util::CalcClearBufferfvDataCount(buffer
));
918 static uint32_t ComputeSize() {
919 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
922 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
924 void Init(GLenum _buffer
, GLint _drawbuffers
, const GLfloat
* _value
) {
927 drawbuffers
= _drawbuffers
;
928 memcpy(ImmediateDataAddress(this), _value
,
929 ComputeEffectiveDataSize(buffer
));
930 DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer
));
931 char* pointer
= reinterpret_cast<char*>(ImmediateDataAddress(this)) +
932 ComputeEffectiveDataSize(buffer
);
933 memset(pointer
, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer
));
939 const GLfloat
* _value
) {
940 static_cast<ValueType
*>(cmd
)->Init(_buffer
, _drawbuffers
, _value
);
941 const uint32_t size
= ComputeSize();
942 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
945 gpu::CommandHeader header
;
950 static_assert(sizeof(ClearBufferfvImmediate
) == 12,
951 "size of ClearBufferfvImmediate should be 12");
952 static_assert(offsetof(ClearBufferfvImmediate
, header
) == 0,
953 "offset of ClearBufferfvImmediate header should be 0");
954 static_assert(offsetof(ClearBufferfvImmediate
, buffer
) == 4,
955 "offset of ClearBufferfvImmediate buffer should be 4");
956 static_assert(offsetof(ClearBufferfvImmediate
, drawbuffers
) == 8,
957 "offset of ClearBufferfvImmediate drawbuffers should be 8");
959 struct ClearBufferivImmediate
{
960 typedef ClearBufferivImmediate ValueType
;
961 static const CommandId kCmdId
= kClearBufferivImmediate
;
962 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
963 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
965 static uint32_t ComputeDataSize() {
966 return static_cast<uint32_t>(sizeof(GLint
) * 4);
969 static uint32_t ComputeEffectiveDataSize(GLenum buffer
) {
970 return static_cast<uint32_t>(sizeof(GLint
) *
971 GLES2Util::CalcClearBufferivDataCount(buffer
));
974 static uint32_t ComputeSize() {
975 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
978 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
980 void Init(GLenum _buffer
, GLint _drawbuffers
, const GLint
* _value
) {
983 drawbuffers
= _drawbuffers
;
984 memcpy(ImmediateDataAddress(this), _value
,
985 ComputeEffectiveDataSize(buffer
));
986 DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer
));
987 char* pointer
= reinterpret_cast<char*>(ImmediateDataAddress(this)) +
988 ComputeEffectiveDataSize(buffer
);
989 memset(pointer
, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer
));
995 const GLint
* _value
) {
996 static_cast<ValueType
*>(cmd
)->Init(_buffer
, _drawbuffers
, _value
);
997 const uint32_t size
= ComputeSize();
998 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1001 gpu::CommandHeader header
;
1003 int32_t drawbuffers
;
1006 static_assert(sizeof(ClearBufferivImmediate
) == 12,
1007 "size of ClearBufferivImmediate should be 12");
1008 static_assert(offsetof(ClearBufferivImmediate
, header
) == 0,
1009 "offset of ClearBufferivImmediate header should be 0");
1010 static_assert(offsetof(ClearBufferivImmediate
, buffer
) == 4,
1011 "offset of ClearBufferivImmediate buffer should be 4");
1012 static_assert(offsetof(ClearBufferivImmediate
, drawbuffers
) == 8,
1013 "offset of ClearBufferivImmediate drawbuffers should be 8");
1015 struct ClearBufferuivImmediate
{
1016 typedef ClearBufferuivImmediate ValueType
;
1017 static const CommandId kCmdId
= kClearBufferuivImmediate
;
1018 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1019 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1021 static uint32_t ComputeDataSize() {
1022 return static_cast<uint32_t>(sizeof(GLuint
) * 4);
1025 static uint32_t ComputeSize() {
1026 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
1029 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
1031 void Init(GLenum _buffer
, GLint _drawbuffers
, const GLuint
* _value
) {
1034 drawbuffers
= _drawbuffers
;
1035 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize());
1038 void* Set(void* cmd
,
1041 const GLuint
* _value
) {
1042 static_cast<ValueType
*>(cmd
)->Init(_buffer
, _drawbuffers
, _value
);
1043 const uint32_t size
= ComputeSize();
1044 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1047 gpu::CommandHeader header
;
1049 int32_t drawbuffers
;
1052 static_assert(sizeof(ClearBufferuivImmediate
) == 12,
1053 "size of ClearBufferuivImmediate should be 12");
1054 static_assert(offsetof(ClearBufferuivImmediate
, header
) == 0,
1055 "offset of ClearBufferuivImmediate header should be 0");
1056 static_assert(offsetof(ClearBufferuivImmediate
, buffer
) == 4,
1057 "offset of ClearBufferuivImmediate buffer should be 4");
1058 static_assert(offsetof(ClearBufferuivImmediate
, drawbuffers
) == 8,
1059 "offset of ClearBufferuivImmediate drawbuffers should be 8");
1062 typedef ClearColor ValueType
;
1063 static const CommandId kCmdId
= kClearColor
;
1064 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1065 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1067 static uint32_t ComputeSize() {
1068 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1071 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1073 void Init(GLclampf _red
, GLclampf _green
, GLclampf _blue
, GLclampf _alpha
) {
1081 void* Set(void* cmd
,
1086 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
1087 return NextCmdAddress
<ValueType
>(cmd
);
1090 gpu::CommandHeader header
;
1097 static_assert(sizeof(ClearColor
) == 20, "size of ClearColor should be 20");
1098 static_assert(offsetof(ClearColor
, header
) == 0,
1099 "offset of ClearColor header should be 0");
1100 static_assert(offsetof(ClearColor
, red
) == 4,
1101 "offset of ClearColor red should be 4");
1102 static_assert(offsetof(ClearColor
, green
) == 8,
1103 "offset of ClearColor green should be 8");
1104 static_assert(offsetof(ClearColor
, blue
) == 12,
1105 "offset of ClearColor blue should be 12");
1106 static_assert(offsetof(ClearColor
, alpha
) == 16,
1107 "offset of ClearColor alpha should be 16");
1109 struct ClearDepthf
{
1110 typedef ClearDepthf ValueType
;
1111 static const CommandId kCmdId
= kClearDepthf
;
1112 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1113 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1115 static uint32_t ComputeSize() {
1116 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1119 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1121 void Init(GLclampf _depth
) {
1126 void* Set(void* cmd
, GLclampf _depth
) {
1127 static_cast<ValueType
*>(cmd
)->Init(_depth
);
1128 return NextCmdAddress
<ValueType
>(cmd
);
1131 gpu::CommandHeader header
;
1135 static_assert(sizeof(ClearDepthf
) == 8, "size of ClearDepthf should be 8");
1136 static_assert(offsetof(ClearDepthf
, header
) == 0,
1137 "offset of ClearDepthf header should be 0");
1138 static_assert(offsetof(ClearDepthf
, depth
) == 4,
1139 "offset of ClearDepthf depth should be 4");
1141 struct ClearStencil
{
1142 typedef ClearStencil ValueType
;
1143 static const CommandId kCmdId
= kClearStencil
;
1144 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1145 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1147 static uint32_t ComputeSize() {
1148 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1151 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1153 void Init(GLint _s
) {
1158 void* Set(void* cmd
, GLint _s
) {
1159 static_cast<ValueType
*>(cmd
)->Init(_s
);
1160 return NextCmdAddress
<ValueType
>(cmd
);
1163 gpu::CommandHeader header
;
1167 static_assert(sizeof(ClearStencil
) == 8, "size of ClearStencil should be 8");
1168 static_assert(offsetof(ClearStencil
, header
) == 0,
1169 "offset of ClearStencil header should be 0");
1170 static_assert(offsetof(ClearStencil
, s
) == 4,
1171 "offset of ClearStencil s should be 4");
1173 struct ClientWaitSync
{
1174 typedef ClientWaitSync ValueType
;
1175 static const CommandId kCmdId
= kClientWaitSync
;
1176 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1177 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1179 typedef GLenum Result
;
1181 static uint32_t ComputeSize() {
1182 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1185 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1187 void Init(GLuint _sync
,
1191 uint32_t _result_shm_id
,
1192 uint32_t _result_shm_offset
) {
1196 timeout_0
= _timeout_0
;
1197 timeout_1
= _timeout_1
;
1198 result_shm_id
= _result_shm_id
;
1199 result_shm_offset
= _result_shm_offset
;
1202 void* Set(void* cmd
,
1207 uint32_t _result_shm_id
,
1208 uint32_t _result_shm_offset
) {
1209 static_cast<ValueType
*>(cmd
)->Init(_sync
, _flags
, _timeout_0
, _timeout_1
,
1210 _result_shm_id
, _result_shm_offset
);
1211 return NextCmdAddress
<ValueType
>(cmd
);
1214 gpu::CommandHeader header
;
1219 uint32_t result_shm_id
;
1220 uint32_t result_shm_offset
;
1223 static_assert(sizeof(ClientWaitSync
) == 28,
1224 "size of ClientWaitSync should be 28");
1225 static_assert(offsetof(ClientWaitSync
, header
) == 0,
1226 "offset of ClientWaitSync header should be 0");
1227 static_assert(offsetof(ClientWaitSync
, sync
) == 4,
1228 "offset of ClientWaitSync sync should be 4");
1229 static_assert(offsetof(ClientWaitSync
, flags
) == 8,
1230 "offset of ClientWaitSync flags should be 8");
1231 static_assert(offsetof(ClientWaitSync
, timeout_0
) == 12,
1232 "offset of ClientWaitSync timeout_0 should be 12");
1233 static_assert(offsetof(ClientWaitSync
, timeout_1
) == 16,
1234 "offset of ClientWaitSync timeout_1 should be 16");
1235 static_assert(offsetof(ClientWaitSync
, result_shm_id
) == 20,
1236 "offset of ClientWaitSync result_shm_id should be 20");
1237 static_assert(offsetof(ClientWaitSync
, result_shm_offset
) == 24,
1238 "offset of ClientWaitSync result_shm_offset should be 24");
1241 typedef ColorMask ValueType
;
1242 static const CommandId kCmdId
= kColorMask
;
1243 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1244 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1246 static uint32_t ComputeSize() {
1247 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1250 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1252 void Init(GLboolean _red
,
1263 void* Set(void* cmd
,
1268 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
1269 return NextCmdAddress
<ValueType
>(cmd
);
1272 gpu::CommandHeader header
;
1279 static_assert(sizeof(ColorMask
) == 20, "size of ColorMask should be 20");
1280 static_assert(offsetof(ColorMask
, header
) == 0,
1281 "offset of ColorMask header should be 0");
1282 static_assert(offsetof(ColorMask
, red
) == 4,
1283 "offset of ColorMask red should be 4");
1284 static_assert(offsetof(ColorMask
, green
) == 8,
1285 "offset of ColorMask green should be 8");
1286 static_assert(offsetof(ColorMask
, blue
) == 12,
1287 "offset of ColorMask blue should be 12");
1288 static_assert(offsetof(ColorMask
, alpha
) == 16,
1289 "offset of ColorMask alpha should be 16");
1291 struct CompileShader
{
1292 typedef CompileShader ValueType
;
1293 static const CommandId kCmdId
= kCompileShader
;
1294 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1295 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1297 static uint32_t ComputeSize() {
1298 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1301 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1303 void Init(GLuint _shader
) {
1308 void* Set(void* cmd
, GLuint _shader
) {
1309 static_cast<ValueType
*>(cmd
)->Init(_shader
);
1310 return NextCmdAddress
<ValueType
>(cmd
);
1313 gpu::CommandHeader header
;
1317 static_assert(sizeof(CompileShader
) == 8, "size of CompileShader should be 8");
1318 static_assert(offsetof(CompileShader
, header
) == 0,
1319 "offset of CompileShader header should be 0");
1320 static_assert(offsetof(CompileShader
, shader
) == 4,
1321 "offset of CompileShader shader should be 4");
1323 struct CompressedTexImage2DBucket
{
1324 typedef CompressedTexImage2DBucket ValueType
;
1325 static const CommandId kCmdId
= kCompressedTexImage2DBucket
;
1326 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1327 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1329 static uint32_t ComputeSize() {
1330 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1333 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1335 void Init(GLenum _target
,
1337 GLenum _internalformat
,
1340 GLuint _bucket_id
) {
1344 internalformat
= _internalformat
;
1347 bucket_id
= _bucket_id
;
1350 void* Set(void* cmd
,
1353 GLenum _internalformat
,
1356 GLuint _bucket_id
) {
1357 static_cast<ValueType
*>(cmd
)
1358 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _bucket_id
);
1359 return NextCmdAddress
<ValueType
>(cmd
);
1362 gpu::CommandHeader header
;
1365 uint32_t internalformat
;
1369 static const int32_t border
= 0;
1372 static_assert(sizeof(CompressedTexImage2DBucket
) == 28,
1373 "size of CompressedTexImage2DBucket should be 28");
1374 static_assert(offsetof(CompressedTexImage2DBucket
, header
) == 0,
1375 "offset of CompressedTexImage2DBucket header should be 0");
1376 static_assert(offsetof(CompressedTexImage2DBucket
, target
) == 4,
1377 "offset of CompressedTexImage2DBucket target should be 4");
1378 static_assert(offsetof(CompressedTexImage2DBucket
, level
) == 8,
1379 "offset of CompressedTexImage2DBucket level should be 8");
1381 offsetof(CompressedTexImage2DBucket
, internalformat
) == 12,
1382 "offset of CompressedTexImage2DBucket internalformat should be 12");
1383 static_assert(offsetof(CompressedTexImage2DBucket
, width
) == 16,
1384 "offset of CompressedTexImage2DBucket width should be 16");
1385 static_assert(offsetof(CompressedTexImage2DBucket
, height
) == 20,
1386 "offset of CompressedTexImage2DBucket height should be 20");
1387 static_assert(offsetof(CompressedTexImage2DBucket
, bucket_id
) == 24,
1388 "offset of CompressedTexImage2DBucket bucket_id should be 24");
1390 struct CompressedTexImage2D
{
1391 typedef CompressedTexImage2D ValueType
;
1392 static const CommandId kCmdId
= kCompressedTexImage2D
;
1393 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1394 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1396 static uint32_t ComputeSize() {
1397 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1400 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1402 void Init(GLenum _target
,
1404 GLenum _internalformat
,
1408 uint32_t _data_shm_id
,
1409 uint32_t _data_shm_offset
) {
1413 internalformat
= _internalformat
;
1416 imageSize
= _imageSize
;
1417 data_shm_id
= _data_shm_id
;
1418 data_shm_offset
= _data_shm_offset
;
1421 void* Set(void* cmd
,
1424 GLenum _internalformat
,
1428 uint32_t _data_shm_id
,
1429 uint32_t _data_shm_offset
) {
1430 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
1431 _height
, _imageSize
, _data_shm_id
,
1433 return NextCmdAddress
<ValueType
>(cmd
);
1436 gpu::CommandHeader header
;
1439 uint32_t internalformat
;
1443 uint32_t data_shm_id
;
1444 uint32_t data_shm_offset
;
1445 static const int32_t border
= 0;
1448 static_assert(sizeof(CompressedTexImage2D
) == 36,
1449 "size of CompressedTexImage2D should be 36");
1450 static_assert(offsetof(CompressedTexImage2D
, header
) == 0,
1451 "offset of CompressedTexImage2D header should be 0");
1452 static_assert(offsetof(CompressedTexImage2D
, target
) == 4,
1453 "offset of CompressedTexImage2D target should be 4");
1454 static_assert(offsetof(CompressedTexImage2D
, level
) == 8,
1455 "offset of CompressedTexImage2D level should be 8");
1456 static_assert(offsetof(CompressedTexImage2D
, internalformat
) == 12,
1457 "offset of CompressedTexImage2D internalformat should be 12");
1458 static_assert(offsetof(CompressedTexImage2D
, width
) == 16,
1459 "offset of CompressedTexImage2D width should be 16");
1460 static_assert(offsetof(CompressedTexImage2D
, height
) == 20,
1461 "offset of CompressedTexImage2D height should be 20");
1462 static_assert(offsetof(CompressedTexImage2D
, imageSize
) == 24,
1463 "offset of CompressedTexImage2D imageSize should be 24");
1464 static_assert(offsetof(CompressedTexImage2D
, data_shm_id
) == 28,
1465 "offset of CompressedTexImage2D data_shm_id should be 28");
1466 static_assert(offsetof(CompressedTexImage2D
, data_shm_offset
) == 32,
1467 "offset of CompressedTexImage2D data_shm_offset should be 32");
1469 struct CompressedTexSubImage2DBucket
{
1470 typedef CompressedTexSubImage2DBucket ValueType
;
1471 static const CommandId kCmdId
= kCompressedTexSubImage2DBucket
;
1472 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1473 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1475 static uint32_t ComputeSize() {
1476 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1479 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1481 void Init(GLenum _target
,
1488 GLuint _bucket_id
) {
1497 bucket_id
= _bucket_id
;
1500 void* Set(void* cmd
,
1508 GLuint _bucket_id
) {
1509 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1510 _width
, _height
, _format
, _bucket_id
);
1511 return NextCmdAddress
<ValueType
>(cmd
);
1514 gpu::CommandHeader header
;
1525 static_assert(sizeof(CompressedTexSubImage2DBucket
) == 36,
1526 "size of CompressedTexSubImage2DBucket should be 36");
1527 static_assert(offsetof(CompressedTexSubImage2DBucket
, header
) == 0,
1528 "offset of CompressedTexSubImage2DBucket header should be 0");
1529 static_assert(offsetof(CompressedTexSubImage2DBucket
, target
) == 4,
1530 "offset of CompressedTexSubImage2DBucket target should be 4");
1531 static_assert(offsetof(CompressedTexSubImage2DBucket
, level
) == 8,
1532 "offset of CompressedTexSubImage2DBucket level should be 8");
1533 static_assert(offsetof(CompressedTexSubImage2DBucket
, xoffset
) == 12,
1534 "offset of CompressedTexSubImage2DBucket xoffset should be 12");
1535 static_assert(offsetof(CompressedTexSubImage2DBucket
, yoffset
) == 16,
1536 "offset of CompressedTexSubImage2DBucket yoffset should be 16");
1537 static_assert(offsetof(CompressedTexSubImage2DBucket
, width
) == 20,
1538 "offset of CompressedTexSubImage2DBucket width should be 20");
1539 static_assert(offsetof(CompressedTexSubImage2DBucket
, height
) == 24,
1540 "offset of CompressedTexSubImage2DBucket height should be 24");
1541 static_assert(offsetof(CompressedTexSubImage2DBucket
, format
) == 28,
1542 "offset of CompressedTexSubImage2DBucket format should be 28");
1543 static_assert(offsetof(CompressedTexSubImage2DBucket
, bucket_id
) == 32,
1544 "offset of CompressedTexSubImage2DBucket bucket_id should be 32");
1546 struct CompressedTexSubImage2D
{
1547 typedef CompressedTexSubImage2D ValueType
;
1548 static const CommandId kCmdId
= kCompressedTexSubImage2D
;
1549 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1550 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1552 static uint32_t ComputeSize() {
1553 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1556 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1558 void Init(GLenum _target
,
1566 uint32_t _data_shm_id
,
1567 uint32_t _data_shm_offset
) {
1576 imageSize
= _imageSize
;
1577 data_shm_id
= _data_shm_id
;
1578 data_shm_offset
= _data_shm_offset
;
1581 void* Set(void* cmd
,
1590 uint32_t _data_shm_id
,
1591 uint32_t _data_shm_offset
) {
1592 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1593 _width
, _height
, _format
, _imageSize
,
1594 _data_shm_id
, _data_shm_offset
);
1595 return NextCmdAddress
<ValueType
>(cmd
);
1598 gpu::CommandHeader header
;
1607 uint32_t data_shm_id
;
1608 uint32_t data_shm_offset
;
1611 static_assert(sizeof(CompressedTexSubImage2D
) == 44,
1612 "size of CompressedTexSubImage2D should be 44");
1613 static_assert(offsetof(CompressedTexSubImage2D
, header
) == 0,
1614 "offset of CompressedTexSubImage2D header should be 0");
1615 static_assert(offsetof(CompressedTexSubImage2D
, target
) == 4,
1616 "offset of CompressedTexSubImage2D target should be 4");
1617 static_assert(offsetof(CompressedTexSubImage2D
, level
) == 8,
1618 "offset of CompressedTexSubImage2D level should be 8");
1619 static_assert(offsetof(CompressedTexSubImage2D
, xoffset
) == 12,
1620 "offset of CompressedTexSubImage2D xoffset should be 12");
1621 static_assert(offsetof(CompressedTexSubImage2D
, yoffset
) == 16,
1622 "offset of CompressedTexSubImage2D yoffset should be 16");
1623 static_assert(offsetof(CompressedTexSubImage2D
, width
) == 20,
1624 "offset of CompressedTexSubImage2D width should be 20");
1625 static_assert(offsetof(CompressedTexSubImage2D
, height
) == 24,
1626 "offset of CompressedTexSubImage2D height should be 24");
1627 static_assert(offsetof(CompressedTexSubImage2D
, format
) == 28,
1628 "offset of CompressedTexSubImage2D format should be 28");
1629 static_assert(offsetof(CompressedTexSubImage2D
, imageSize
) == 32,
1630 "offset of CompressedTexSubImage2D imageSize should be 32");
1631 static_assert(offsetof(CompressedTexSubImage2D
, data_shm_id
) == 36,
1632 "offset of CompressedTexSubImage2D data_shm_id should be 36");
1633 static_assert(offsetof(CompressedTexSubImage2D
, data_shm_offset
) == 40,
1634 "offset of CompressedTexSubImage2D data_shm_offset should be 40");
1636 struct CompressedTexImage3DBucket
{
1637 typedef CompressedTexImage3DBucket ValueType
;
1638 static const CommandId kCmdId
= kCompressedTexImage3DBucket
;
1639 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1640 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1642 static uint32_t ComputeSize() {
1643 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1646 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1648 void Init(GLenum _target
,
1650 GLenum _internalformat
,
1654 GLuint _bucket_id
) {
1658 internalformat
= _internalformat
;
1662 bucket_id
= _bucket_id
;
1665 void* Set(void* cmd
,
1668 GLenum _internalformat
,
1672 GLuint _bucket_id
) {
1673 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
1674 _height
, _depth
, _bucket_id
);
1675 return NextCmdAddress
<ValueType
>(cmd
);
1678 gpu::CommandHeader header
;
1681 uint32_t internalformat
;
1686 static const int32_t border
= 0;
1689 static_assert(sizeof(CompressedTexImage3DBucket
) == 32,
1690 "size of CompressedTexImage3DBucket should be 32");
1691 static_assert(offsetof(CompressedTexImage3DBucket
, header
) == 0,
1692 "offset of CompressedTexImage3DBucket header should be 0");
1693 static_assert(offsetof(CompressedTexImage3DBucket
, target
) == 4,
1694 "offset of CompressedTexImage3DBucket target should be 4");
1695 static_assert(offsetof(CompressedTexImage3DBucket
, level
) == 8,
1696 "offset of CompressedTexImage3DBucket level should be 8");
1698 offsetof(CompressedTexImage3DBucket
, internalformat
) == 12,
1699 "offset of CompressedTexImage3DBucket internalformat should be 12");
1700 static_assert(offsetof(CompressedTexImage3DBucket
, width
) == 16,
1701 "offset of CompressedTexImage3DBucket width should be 16");
1702 static_assert(offsetof(CompressedTexImage3DBucket
, height
) == 20,
1703 "offset of CompressedTexImage3DBucket height should be 20");
1704 static_assert(offsetof(CompressedTexImage3DBucket
, depth
) == 24,
1705 "offset of CompressedTexImage3DBucket depth should be 24");
1706 static_assert(offsetof(CompressedTexImage3DBucket
, bucket_id
) == 28,
1707 "offset of CompressedTexImage3DBucket bucket_id should be 28");
1709 struct CompressedTexImage3D
{
1710 typedef CompressedTexImage3D ValueType
;
1711 static const CommandId kCmdId
= kCompressedTexImage3D
;
1712 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1713 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1715 static uint32_t ComputeSize() {
1716 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1719 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1721 void Init(GLenum _target
,
1723 GLenum _internalformat
,
1728 uint32_t _data_shm_id
,
1729 uint32_t _data_shm_offset
) {
1733 internalformat
= _internalformat
;
1737 imageSize
= _imageSize
;
1738 data_shm_id
= _data_shm_id
;
1739 data_shm_offset
= _data_shm_offset
;
1742 void* Set(void* cmd
,
1745 GLenum _internalformat
,
1750 uint32_t _data_shm_id
,
1751 uint32_t _data_shm_offset
) {
1752 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
1753 _height
, _depth
, _imageSize
,
1754 _data_shm_id
, _data_shm_offset
);
1755 return NextCmdAddress
<ValueType
>(cmd
);
1758 gpu::CommandHeader header
;
1761 uint32_t internalformat
;
1766 uint32_t data_shm_id
;
1767 uint32_t data_shm_offset
;
1768 static const int32_t border
= 0;
1771 static_assert(sizeof(CompressedTexImage3D
) == 40,
1772 "size of CompressedTexImage3D should be 40");
1773 static_assert(offsetof(CompressedTexImage3D
, header
) == 0,
1774 "offset of CompressedTexImage3D header should be 0");
1775 static_assert(offsetof(CompressedTexImage3D
, target
) == 4,
1776 "offset of CompressedTexImage3D target should be 4");
1777 static_assert(offsetof(CompressedTexImage3D
, level
) == 8,
1778 "offset of CompressedTexImage3D level should be 8");
1779 static_assert(offsetof(CompressedTexImage3D
, internalformat
) == 12,
1780 "offset of CompressedTexImage3D internalformat should be 12");
1781 static_assert(offsetof(CompressedTexImage3D
, width
) == 16,
1782 "offset of CompressedTexImage3D width should be 16");
1783 static_assert(offsetof(CompressedTexImage3D
, height
) == 20,
1784 "offset of CompressedTexImage3D height should be 20");
1785 static_assert(offsetof(CompressedTexImage3D
, depth
) == 24,
1786 "offset of CompressedTexImage3D depth should be 24");
1787 static_assert(offsetof(CompressedTexImage3D
, imageSize
) == 28,
1788 "offset of CompressedTexImage3D imageSize should be 28");
1789 static_assert(offsetof(CompressedTexImage3D
, data_shm_id
) == 32,
1790 "offset of CompressedTexImage3D data_shm_id should be 32");
1791 static_assert(offsetof(CompressedTexImage3D
, data_shm_offset
) == 36,
1792 "offset of CompressedTexImage3D data_shm_offset should be 36");
1794 struct CompressedTexSubImage3DBucket
{
1795 typedef CompressedTexSubImage3DBucket ValueType
;
1796 static const CommandId kCmdId
= kCompressedTexSubImage3DBucket
;
1797 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1798 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1800 static uint32_t ComputeSize() {
1801 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1804 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1806 void Init(GLenum _target
,
1815 GLuint _bucket_id
) {
1826 bucket_id
= _bucket_id
;
1829 void* Set(void* cmd
,
1839 GLuint _bucket_id
) {
1840 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1841 _zoffset
, _width
, _height
, _depth
,
1842 _format
, _bucket_id
);
1843 return NextCmdAddress
<ValueType
>(cmd
);
1846 gpu::CommandHeader header
;
1859 static_assert(sizeof(CompressedTexSubImage3DBucket
) == 44,
1860 "size of CompressedTexSubImage3DBucket should be 44");
1861 static_assert(offsetof(CompressedTexSubImage3DBucket
, header
) == 0,
1862 "offset of CompressedTexSubImage3DBucket header should be 0");
1863 static_assert(offsetof(CompressedTexSubImage3DBucket
, target
) == 4,
1864 "offset of CompressedTexSubImage3DBucket target should be 4");
1865 static_assert(offsetof(CompressedTexSubImage3DBucket
, level
) == 8,
1866 "offset of CompressedTexSubImage3DBucket level should be 8");
1867 static_assert(offsetof(CompressedTexSubImage3DBucket
, xoffset
) == 12,
1868 "offset of CompressedTexSubImage3DBucket xoffset should be 12");
1869 static_assert(offsetof(CompressedTexSubImage3DBucket
, yoffset
) == 16,
1870 "offset of CompressedTexSubImage3DBucket yoffset should be 16");
1871 static_assert(offsetof(CompressedTexSubImage3DBucket
, zoffset
) == 20,
1872 "offset of CompressedTexSubImage3DBucket zoffset should be 20");
1873 static_assert(offsetof(CompressedTexSubImage3DBucket
, width
) == 24,
1874 "offset of CompressedTexSubImage3DBucket width should be 24");
1875 static_assert(offsetof(CompressedTexSubImage3DBucket
, height
) == 28,
1876 "offset of CompressedTexSubImage3DBucket height should be 28");
1877 static_assert(offsetof(CompressedTexSubImage3DBucket
, depth
) == 32,
1878 "offset of CompressedTexSubImage3DBucket depth should be 32");
1879 static_assert(offsetof(CompressedTexSubImage3DBucket
, format
) == 36,
1880 "offset of CompressedTexSubImage3DBucket format should be 36");
1881 static_assert(offsetof(CompressedTexSubImage3DBucket
, bucket_id
) == 40,
1882 "offset of CompressedTexSubImage3DBucket bucket_id should be 40");
1884 struct CompressedTexSubImage3D
{
1885 typedef CompressedTexSubImage3D ValueType
;
1886 static const CommandId kCmdId
= kCompressedTexSubImage3D
;
1887 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1888 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1890 static uint32_t ComputeSize() {
1891 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1894 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1896 void Init(GLenum _target
,
1906 uint32_t _data_shm_id
,
1907 uint32_t _data_shm_offset
) {
1918 imageSize
= _imageSize
;
1919 data_shm_id
= _data_shm_id
;
1920 data_shm_offset
= _data_shm_offset
;
1923 void* Set(void* cmd
,
1934 uint32_t _data_shm_id
,
1935 uint32_t _data_shm_offset
) {
1936 static_cast<ValueType
*>(cmd
)
1937 ->Init(_target
, _level
, _xoffset
, _yoffset
, _zoffset
, _width
, _height
,
1938 _depth
, _format
, _imageSize
, _data_shm_id
, _data_shm_offset
);
1939 return NextCmdAddress
<ValueType
>(cmd
);
1942 gpu::CommandHeader header
;
1953 uint32_t data_shm_id
;
1954 uint32_t data_shm_offset
;
1957 static_assert(sizeof(CompressedTexSubImage3D
) == 52,
1958 "size of CompressedTexSubImage3D should be 52");
1959 static_assert(offsetof(CompressedTexSubImage3D
, header
) == 0,
1960 "offset of CompressedTexSubImage3D header should be 0");
1961 static_assert(offsetof(CompressedTexSubImage3D
, target
) == 4,
1962 "offset of CompressedTexSubImage3D target should be 4");
1963 static_assert(offsetof(CompressedTexSubImage3D
, level
) == 8,
1964 "offset of CompressedTexSubImage3D level should be 8");
1965 static_assert(offsetof(CompressedTexSubImage3D
, xoffset
) == 12,
1966 "offset of CompressedTexSubImage3D xoffset should be 12");
1967 static_assert(offsetof(CompressedTexSubImage3D
, yoffset
) == 16,
1968 "offset of CompressedTexSubImage3D yoffset should be 16");
1969 static_assert(offsetof(CompressedTexSubImage3D
, zoffset
) == 20,
1970 "offset of CompressedTexSubImage3D zoffset should be 20");
1971 static_assert(offsetof(CompressedTexSubImage3D
, width
) == 24,
1972 "offset of CompressedTexSubImage3D width should be 24");
1973 static_assert(offsetof(CompressedTexSubImage3D
, height
) == 28,
1974 "offset of CompressedTexSubImage3D height should be 28");
1975 static_assert(offsetof(CompressedTexSubImage3D
, depth
) == 32,
1976 "offset of CompressedTexSubImage3D depth should be 32");
1977 static_assert(offsetof(CompressedTexSubImage3D
, format
) == 36,
1978 "offset of CompressedTexSubImage3D format should be 36");
1979 static_assert(offsetof(CompressedTexSubImage3D
, imageSize
) == 40,
1980 "offset of CompressedTexSubImage3D imageSize should be 40");
1981 static_assert(offsetof(CompressedTexSubImage3D
, data_shm_id
) == 44,
1982 "offset of CompressedTexSubImage3D data_shm_id should be 44");
1983 static_assert(offsetof(CompressedTexSubImage3D
, data_shm_offset
) == 48,
1984 "offset of CompressedTexSubImage3D data_shm_offset should be 48");
1986 struct CopyBufferSubData
{
1987 typedef CopyBufferSubData ValueType
;
1988 static const CommandId kCmdId
= kCopyBufferSubData
;
1989 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1990 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1992 static uint32_t ComputeSize() {
1993 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1996 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1998 void Init(GLenum _readtarget
,
1999 GLenum _writetarget
,
2000 GLintptr _readoffset
,
2001 GLintptr _writeoffset
,
2004 readtarget
= _readtarget
;
2005 writetarget
= _writetarget
;
2006 readoffset
= _readoffset
;
2007 writeoffset
= _writeoffset
;
2011 void* Set(void* cmd
,
2013 GLenum _writetarget
,
2014 GLintptr _readoffset
,
2015 GLintptr _writeoffset
,
2017 static_cast<ValueType
*>(cmd
)
2018 ->Init(_readtarget
, _writetarget
, _readoffset
, _writeoffset
, _size
);
2019 return NextCmdAddress
<ValueType
>(cmd
);
2022 gpu::CommandHeader header
;
2023 uint32_t readtarget
;
2024 uint32_t writetarget
;
2026 int32_t writeoffset
;
2030 static_assert(sizeof(CopyBufferSubData
) == 24,
2031 "size of CopyBufferSubData should be 24");
2032 static_assert(offsetof(CopyBufferSubData
, header
) == 0,
2033 "offset of CopyBufferSubData header should be 0");
2034 static_assert(offsetof(CopyBufferSubData
, readtarget
) == 4,
2035 "offset of CopyBufferSubData readtarget should be 4");
2036 static_assert(offsetof(CopyBufferSubData
, writetarget
) == 8,
2037 "offset of CopyBufferSubData writetarget should be 8");
2038 static_assert(offsetof(CopyBufferSubData
, readoffset
) == 12,
2039 "offset of CopyBufferSubData readoffset should be 12");
2040 static_assert(offsetof(CopyBufferSubData
, writeoffset
) == 16,
2041 "offset of CopyBufferSubData writeoffset should be 16");
2042 static_assert(offsetof(CopyBufferSubData
, size
) == 20,
2043 "offset of CopyBufferSubData size should be 20");
2045 struct CopyTexImage2D
{
2046 typedef CopyTexImage2D ValueType
;
2047 static const CommandId kCmdId
= kCopyTexImage2D
;
2048 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2049 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2051 static uint32_t ComputeSize() {
2052 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2055 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2057 void Init(GLenum _target
,
2059 GLenum _internalformat
,
2067 internalformat
= _internalformat
;
2074 void* Set(void* cmd
,
2077 GLenum _internalformat
,
2082 static_cast<ValueType
*>(cmd
)
2083 ->Init(_target
, _level
, _internalformat
, _x
, _y
, _width
, _height
);
2084 return NextCmdAddress
<ValueType
>(cmd
);
2087 gpu::CommandHeader header
;
2090 uint32_t internalformat
;
2095 static const int32_t border
= 0;
2098 static_assert(sizeof(CopyTexImage2D
) == 32,
2099 "size of CopyTexImage2D should be 32");
2100 static_assert(offsetof(CopyTexImage2D
, header
) == 0,
2101 "offset of CopyTexImage2D header should be 0");
2102 static_assert(offsetof(CopyTexImage2D
, target
) == 4,
2103 "offset of CopyTexImage2D target should be 4");
2104 static_assert(offsetof(CopyTexImage2D
, level
) == 8,
2105 "offset of CopyTexImage2D level should be 8");
2106 static_assert(offsetof(CopyTexImage2D
, internalformat
) == 12,
2107 "offset of CopyTexImage2D internalformat should be 12");
2108 static_assert(offsetof(CopyTexImage2D
, x
) == 16,
2109 "offset of CopyTexImage2D x should be 16");
2110 static_assert(offsetof(CopyTexImage2D
, y
) == 20,
2111 "offset of CopyTexImage2D y should be 20");
2112 static_assert(offsetof(CopyTexImage2D
, width
) == 24,
2113 "offset of CopyTexImage2D width should be 24");
2114 static_assert(offsetof(CopyTexImage2D
, height
) == 28,
2115 "offset of CopyTexImage2D height should be 28");
2117 struct CopyTexSubImage2D
{
2118 typedef CopyTexSubImage2D ValueType
;
2119 static const CommandId kCmdId
= kCopyTexSubImage2D
;
2120 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2121 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2123 static uint32_t ComputeSize() {
2124 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2127 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2129 void Init(GLenum _target
,
2148 void* Set(void* cmd
,
2157 static_cast<ValueType
*>(cmd
)
2158 ->Init(_target
, _level
, _xoffset
, _yoffset
, _x
, _y
, _width
, _height
);
2159 return NextCmdAddress
<ValueType
>(cmd
);
2162 gpu::CommandHeader header
;
2173 static_assert(sizeof(CopyTexSubImage2D
) == 36,
2174 "size of CopyTexSubImage2D should be 36");
2175 static_assert(offsetof(CopyTexSubImage2D
, header
) == 0,
2176 "offset of CopyTexSubImage2D header should be 0");
2177 static_assert(offsetof(CopyTexSubImage2D
, target
) == 4,
2178 "offset of CopyTexSubImage2D target should be 4");
2179 static_assert(offsetof(CopyTexSubImage2D
, level
) == 8,
2180 "offset of CopyTexSubImage2D level should be 8");
2181 static_assert(offsetof(CopyTexSubImage2D
, xoffset
) == 12,
2182 "offset of CopyTexSubImage2D xoffset should be 12");
2183 static_assert(offsetof(CopyTexSubImage2D
, yoffset
) == 16,
2184 "offset of CopyTexSubImage2D yoffset should be 16");
2185 static_assert(offsetof(CopyTexSubImage2D
, x
) == 20,
2186 "offset of CopyTexSubImage2D x should be 20");
2187 static_assert(offsetof(CopyTexSubImage2D
, y
) == 24,
2188 "offset of CopyTexSubImage2D y should be 24");
2189 static_assert(offsetof(CopyTexSubImage2D
, width
) == 28,
2190 "offset of CopyTexSubImage2D width should be 28");
2191 static_assert(offsetof(CopyTexSubImage2D
, height
) == 32,
2192 "offset of CopyTexSubImage2D height should be 32");
2194 struct CopyTexSubImage3D
{
2195 typedef CopyTexSubImage3D ValueType
;
2196 static const CommandId kCmdId
= kCopyTexSubImage3D
;
2197 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2198 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2200 static uint32_t ComputeSize() {
2201 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2204 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2206 void Init(GLenum _target
,
2227 void* Set(void* cmd
,
2237 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
2238 _zoffset
, _x
, _y
, _width
, _height
);
2239 return NextCmdAddress
<ValueType
>(cmd
);
2242 gpu::CommandHeader header
;
2254 static_assert(sizeof(CopyTexSubImage3D
) == 40,
2255 "size of CopyTexSubImage3D should be 40");
2256 static_assert(offsetof(CopyTexSubImage3D
, header
) == 0,
2257 "offset of CopyTexSubImage3D header should be 0");
2258 static_assert(offsetof(CopyTexSubImage3D
, target
) == 4,
2259 "offset of CopyTexSubImage3D target should be 4");
2260 static_assert(offsetof(CopyTexSubImage3D
, level
) == 8,
2261 "offset of CopyTexSubImage3D level should be 8");
2262 static_assert(offsetof(CopyTexSubImage3D
, xoffset
) == 12,
2263 "offset of CopyTexSubImage3D xoffset should be 12");
2264 static_assert(offsetof(CopyTexSubImage3D
, yoffset
) == 16,
2265 "offset of CopyTexSubImage3D yoffset should be 16");
2266 static_assert(offsetof(CopyTexSubImage3D
, zoffset
) == 20,
2267 "offset of CopyTexSubImage3D zoffset should be 20");
2268 static_assert(offsetof(CopyTexSubImage3D
, x
) == 24,
2269 "offset of CopyTexSubImage3D x should be 24");
2270 static_assert(offsetof(CopyTexSubImage3D
, y
) == 28,
2271 "offset of CopyTexSubImage3D y should be 28");
2272 static_assert(offsetof(CopyTexSubImage3D
, width
) == 32,
2273 "offset of CopyTexSubImage3D width should be 32");
2274 static_assert(offsetof(CopyTexSubImage3D
, height
) == 36,
2275 "offset of CopyTexSubImage3D height should be 36");
2277 struct CreateProgram
{
2278 typedef CreateProgram ValueType
;
2279 static const CommandId kCmdId
= kCreateProgram
;
2280 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2281 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2283 static uint32_t ComputeSize() {
2284 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2287 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2289 void Init(uint32_t _client_id
) {
2291 client_id
= _client_id
;
2294 void* Set(void* cmd
, uint32_t _client_id
) {
2295 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
2296 return NextCmdAddress
<ValueType
>(cmd
);
2299 gpu::CommandHeader header
;
2303 static_assert(sizeof(CreateProgram
) == 8, "size of CreateProgram should be 8");
2304 static_assert(offsetof(CreateProgram
, header
) == 0,
2305 "offset of CreateProgram header should be 0");
2306 static_assert(offsetof(CreateProgram
, client_id
) == 4,
2307 "offset of CreateProgram client_id should be 4");
2309 struct CreateShader
{
2310 typedef CreateShader ValueType
;
2311 static const CommandId kCmdId
= kCreateShader
;
2312 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2313 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2315 static uint32_t ComputeSize() {
2316 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2319 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2321 void Init(GLenum _type
, uint32_t _client_id
) {
2324 client_id
= _client_id
;
2327 void* Set(void* cmd
, GLenum _type
, uint32_t _client_id
) {
2328 static_cast<ValueType
*>(cmd
)->Init(_type
, _client_id
);
2329 return NextCmdAddress
<ValueType
>(cmd
);
2332 gpu::CommandHeader header
;
2337 static_assert(sizeof(CreateShader
) == 12, "size of CreateShader should be 12");
2338 static_assert(offsetof(CreateShader
, header
) == 0,
2339 "offset of CreateShader header should be 0");
2340 static_assert(offsetof(CreateShader
, type
) == 4,
2341 "offset of CreateShader type should be 4");
2342 static_assert(offsetof(CreateShader
, client_id
) == 8,
2343 "offset of CreateShader client_id should be 8");
2346 typedef CullFace ValueType
;
2347 static const CommandId kCmdId
= kCullFace
;
2348 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2349 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2351 static uint32_t ComputeSize() {
2352 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2355 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2357 void Init(GLenum _mode
) {
2362 void* Set(void* cmd
, GLenum _mode
) {
2363 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2364 return NextCmdAddress
<ValueType
>(cmd
);
2367 gpu::CommandHeader header
;
2371 static_assert(sizeof(CullFace
) == 8, "size of CullFace should be 8");
2372 static_assert(offsetof(CullFace
, header
) == 0,
2373 "offset of CullFace header should be 0");
2374 static_assert(offsetof(CullFace
, mode
) == 4,
2375 "offset of CullFace mode should be 4");
2377 struct DeleteBuffersImmediate
{
2378 typedef DeleteBuffersImmediate ValueType
;
2379 static const CommandId kCmdId
= kDeleteBuffersImmediate
;
2380 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2381 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2383 static uint32_t ComputeDataSize(GLsizei n
) {
2384 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2387 static uint32_t ComputeSize(GLsizei n
) {
2388 return static_cast<uint32_t>(sizeof(ValueType
) +
2389 ComputeDataSize(n
)); // NOLINT
2392 void SetHeader(GLsizei n
) {
2393 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2396 void Init(GLsizei _n
, const GLuint
* _buffers
) {
2399 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
2402 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _buffers
) {
2403 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
2404 const uint32_t size
= ComputeSize(_n
);
2405 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2408 gpu::CommandHeader header
;
2412 static_assert(sizeof(DeleteBuffersImmediate
) == 8,
2413 "size of DeleteBuffersImmediate should be 8");
2414 static_assert(offsetof(DeleteBuffersImmediate
, header
) == 0,
2415 "offset of DeleteBuffersImmediate header should be 0");
2416 static_assert(offsetof(DeleteBuffersImmediate
, n
) == 4,
2417 "offset of DeleteBuffersImmediate n should be 4");
2419 struct DeleteFramebuffersImmediate
{
2420 typedef DeleteFramebuffersImmediate ValueType
;
2421 static const CommandId kCmdId
= kDeleteFramebuffersImmediate
;
2422 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2423 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2425 static uint32_t ComputeDataSize(GLsizei n
) {
2426 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2429 static uint32_t ComputeSize(GLsizei n
) {
2430 return static_cast<uint32_t>(sizeof(ValueType
) +
2431 ComputeDataSize(n
)); // NOLINT
2434 void SetHeader(GLsizei n
) {
2435 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2438 void Init(GLsizei _n
, const GLuint
* _framebuffers
) {
2441 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
2444 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _framebuffers
) {
2445 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
2446 const uint32_t size
= ComputeSize(_n
);
2447 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2450 gpu::CommandHeader header
;
2454 static_assert(sizeof(DeleteFramebuffersImmediate
) == 8,
2455 "size of DeleteFramebuffersImmediate should be 8");
2456 static_assert(offsetof(DeleteFramebuffersImmediate
, header
) == 0,
2457 "offset of DeleteFramebuffersImmediate header should be 0");
2458 static_assert(offsetof(DeleteFramebuffersImmediate
, n
) == 4,
2459 "offset of DeleteFramebuffersImmediate n should be 4");
2461 struct DeleteProgram
{
2462 typedef DeleteProgram ValueType
;
2463 static const CommandId kCmdId
= kDeleteProgram
;
2464 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2465 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2467 static uint32_t ComputeSize() {
2468 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2471 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2473 void Init(GLuint _program
) {
2478 void* Set(void* cmd
, GLuint _program
) {
2479 static_cast<ValueType
*>(cmd
)->Init(_program
);
2480 return NextCmdAddress
<ValueType
>(cmd
);
2483 gpu::CommandHeader header
;
2487 static_assert(sizeof(DeleteProgram
) == 8, "size of DeleteProgram should be 8");
2488 static_assert(offsetof(DeleteProgram
, header
) == 0,
2489 "offset of DeleteProgram header should be 0");
2490 static_assert(offsetof(DeleteProgram
, program
) == 4,
2491 "offset of DeleteProgram program should be 4");
2493 struct DeleteRenderbuffersImmediate
{
2494 typedef DeleteRenderbuffersImmediate ValueType
;
2495 static const CommandId kCmdId
= kDeleteRenderbuffersImmediate
;
2496 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2497 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2499 static uint32_t ComputeDataSize(GLsizei n
) {
2500 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2503 static uint32_t ComputeSize(GLsizei n
) {
2504 return static_cast<uint32_t>(sizeof(ValueType
) +
2505 ComputeDataSize(n
)); // NOLINT
2508 void SetHeader(GLsizei n
) {
2509 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2512 void Init(GLsizei _n
, const GLuint
* _renderbuffers
) {
2515 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
2518 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _renderbuffers
) {
2519 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
2520 const uint32_t size
= ComputeSize(_n
);
2521 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2524 gpu::CommandHeader header
;
2528 static_assert(sizeof(DeleteRenderbuffersImmediate
) == 8,
2529 "size of DeleteRenderbuffersImmediate should be 8");
2530 static_assert(offsetof(DeleteRenderbuffersImmediate
, header
) == 0,
2531 "offset of DeleteRenderbuffersImmediate header should be 0");
2532 static_assert(offsetof(DeleteRenderbuffersImmediate
, n
) == 4,
2533 "offset of DeleteRenderbuffersImmediate n should be 4");
2535 struct DeleteSamplersImmediate
{
2536 typedef DeleteSamplersImmediate ValueType
;
2537 static const CommandId kCmdId
= kDeleteSamplersImmediate
;
2538 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2539 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2541 static uint32_t ComputeDataSize(GLsizei n
) {
2542 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2545 static uint32_t ComputeSize(GLsizei n
) {
2546 return static_cast<uint32_t>(sizeof(ValueType
) +
2547 ComputeDataSize(n
)); // NOLINT
2550 void SetHeader(GLsizei n
) {
2551 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2554 void Init(GLsizei _n
, const GLuint
* _samplers
) {
2557 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
2560 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _samplers
) {
2561 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
2562 const uint32_t size
= ComputeSize(_n
);
2563 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2566 gpu::CommandHeader header
;
2570 static_assert(sizeof(DeleteSamplersImmediate
) == 8,
2571 "size of DeleteSamplersImmediate should be 8");
2572 static_assert(offsetof(DeleteSamplersImmediate
, header
) == 0,
2573 "offset of DeleteSamplersImmediate header should be 0");
2574 static_assert(offsetof(DeleteSamplersImmediate
, n
) == 4,
2575 "offset of DeleteSamplersImmediate n should be 4");
2578 typedef DeleteSync ValueType
;
2579 static const CommandId kCmdId
= kDeleteSync
;
2580 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2581 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2583 static uint32_t ComputeSize() {
2584 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2587 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2589 void Init(GLuint _sync
) {
2594 void* Set(void* cmd
, GLuint _sync
) {
2595 static_cast<ValueType
*>(cmd
)->Init(_sync
);
2596 return NextCmdAddress
<ValueType
>(cmd
);
2599 gpu::CommandHeader header
;
2603 static_assert(sizeof(DeleteSync
) == 8, "size of DeleteSync should be 8");
2604 static_assert(offsetof(DeleteSync
, header
) == 0,
2605 "offset of DeleteSync header should be 0");
2606 static_assert(offsetof(DeleteSync
, sync
) == 4,
2607 "offset of DeleteSync sync should be 4");
2609 struct DeleteShader
{
2610 typedef DeleteShader ValueType
;
2611 static const CommandId kCmdId
= kDeleteShader
;
2612 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2613 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2615 static uint32_t ComputeSize() {
2616 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2619 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2621 void Init(GLuint _shader
) {
2626 void* Set(void* cmd
, GLuint _shader
) {
2627 static_cast<ValueType
*>(cmd
)->Init(_shader
);
2628 return NextCmdAddress
<ValueType
>(cmd
);
2631 gpu::CommandHeader header
;
2635 static_assert(sizeof(DeleteShader
) == 8, "size of DeleteShader should be 8");
2636 static_assert(offsetof(DeleteShader
, header
) == 0,
2637 "offset of DeleteShader header should be 0");
2638 static_assert(offsetof(DeleteShader
, shader
) == 4,
2639 "offset of DeleteShader shader should be 4");
2641 struct DeleteTexturesImmediate
{
2642 typedef DeleteTexturesImmediate ValueType
;
2643 static const CommandId kCmdId
= kDeleteTexturesImmediate
;
2644 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2645 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2647 static uint32_t ComputeDataSize(GLsizei n
) {
2648 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2651 static uint32_t ComputeSize(GLsizei n
) {
2652 return static_cast<uint32_t>(sizeof(ValueType
) +
2653 ComputeDataSize(n
)); // NOLINT
2656 void SetHeader(GLsizei n
) {
2657 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2660 void Init(GLsizei _n
, const GLuint
* _textures
) {
2663 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
2666 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _textures
) {
2667 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
2668 const uint32_t size
= ComputeSize(_n
);
2669 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2672 gpu::CommandHeader header
;
2676 static_assert(sizeof(DeleteTexturesImmediate
) == 8,
2677 "size of DeleteTexturesImmediate should be 8");
2678 static_assert(offsetof(DeleteTexturesImmediate
, header
) == 0,
2679 "offset of DeleteTexturesImmediate header should be 0");
2680 static_assert(offsetof(DeleteTexturesImmediate
, n
) == 4,
2681 "offset of DeleteTexturesImmediate n should be 4");
2683 struct DeleteTransformFeedbacksImmediate
{
2684 typedef DeleteTransformFeedbacksImmediate ValueType
;
2685 static const CommandId kCmdId
= kDeleteTransformFeedbacksImmediate
;
2686 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2687 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2689 static uint32_t ComputeDataSize(GLsizei n
) {
2690 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2693 static uint32_t ComputeSize(GLsizei n
) {
2694 return static_cast<uint32_t>(sizeof(ValueType
) +
2695 ComputeDataSize(n
)); // NOLINT
2698 void SetHeader(GLsizei n
) {
2699 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2702 void Init(GLsizei _n
, const GLuint
* _ids
) {
2705 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
2708 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _ids
) {
2709 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
2710 const uint32_t size
= ComputeSize(_n
);
2711 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2714 gpu::CommandHeader header
;
2718 static_assert(sizeof(DeleteTransformFeedbacksImmediate
) == 8,
2719 "size of DeleteTransformFeedbacksImmediate should be 8");
2720 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, header
) == 0,
2721 "offset of DeleteTransformFeedbacksImmediate header should be 0");
2722 static_assert(offsetof(DeleteTransformFeedbacksImmediate
, n
) == 4,
2723 "offset of DeleteTransformFeedbacksImmediate n should be 4");
2726 typedef DepthFunc ValueType
;
2727 static const CommandId kCmdId
= kDepthFunc
;
2728 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2729 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2731 static uint32_t ComputeSize() {
2732 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2735 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2737 void Init(GLenum _func
) {
2742 void* Set(void* cmd
, GLenum _func
) {
2743 static_cast<ValueType
*>(cmd
)->Init(_func
);
2744 return NextCmdAddress
<ValueType
>(cmd
);
2747 gpu::CommandHeader header
;
2751 static_assert(sizeof(DepthFunc
) == 8, "size of DepthFunc should be 8");
2752 static_assert(offsetof(DepthFunc
, header
) == 0,
2753 "offset of DepthFunc header should be 0");
2754 static_assert(offsetof(DepthFunc
, func
) == 4,
2755 "offset of DepthFunc func should be 4");
2758 typedef DepthMask ValueType
;
2759 static const CommandId kCmdId
= kDepthMask
;
2760 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2761 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2763 static uint32_t ComputeSize() {
2764 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2767 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2769 void Init(GLboolean _flag
) {
2774 void* Set(void* cmd
, GLboolean _flag
) {
2775 static_cast<ValueType
*>(cmd
)->Init(_flag
);
2776 return NextCmdAddress
<ValueType
>(cmd
);
2779 gpu::CommandHeader header
;
2783 static_assert(sizeof(DepthMask
) == 8, "size of DepthMask should be 8");
2784 static_assert(offsetof(DepthMask
, header
) == 0,
2785 "offset of DepthMask header should be 0");
2786 static_assert(offsetof(DepthMask
, flag
) == 4,
2787 "offset of DepthMask flag should be 4");
2789 struct DepthRangef
{
2790 typedef DepthRangef ValueType
;
2791 static const CommandId kCmdId
= kDepthRangef
;
2792 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2793 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2795 static uint32_t ComputeSize() {
2796 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2799 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2801 void Init(GLclampf _zNear
, GLclampf _zFar
) {
2807 void* Set(void* cmd
, GLclampf _zNear
, GLclampf _zFar
) {
2808 static_cast<ValueType
*>(cmd
)->Init(_zNear
, _zFar
);
2809 return NextCmdAddress
<ValueType
>(cmd
);
2812 gpu::CommandHeader header
;
2817 static_assert(sizeof(DepthRangef
) == 12, "size of DepthRangef should be 12");
2818 static_assert(offsetof(DepthRangef
, header
) == 0,
2819 "offset of DepthRangef header should be 0");
2820 static_assert(offsetof(DepthRangef
, zNear
) == 4,
2821 "offset of DepthRangef zNear should be 4");
2822 static_assert(offsetof(DepthRangef
, zFar
) == 8,
2823 "offset of DepthRangef zFar should be 8");
2825 struct DetachShader
{
2826 typedef DetachShader ValueType
;
2827 static const CommandId kCmdId
= kDetachShader
;
2828 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2829 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2831 static uint32_t ComputeSize() {
2832 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2835 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2837 void Init(GLuint _program
, GLuint _shader
) {
2843 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
2844 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
2845 return NextCmdAddress
<ValueType
>(cmd
);
2848 gpu::CommandHeader header
;
2853 static_assert(sizeof(DetachShader
) == 12, "size of DetachShader should be 12");
2854 static_assert(offsetof(DetachShader
, header
) == 0,
2855 "offset of DetachShader header should be 0");
2856 static_assert(offsetof(DetachShader
, program
) == 4,
2857 "offset of DetachShader program should be 4");
2858 static_assert(offsetof(DetachShader
, shader
) == 8,
2859 "offset of DetachShader shader should be 8");
2862 typedef Disable ValueType
;
2863 static const CommandId kCmdId
= kDisable
;
2864 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2865 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2867 static uint32_t ComputeSize() {
2868 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2871 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2873 void Init(GLenum _cap
) {
2878 void* Set(void* cmd
, GLenum _cap
) {
2879 static_cast<ValueType
*>(cmd
)->Init(_cap
);
2880 return NextCmdAddress
<ValueType
>(cmd
);
2883 gpu::CommandHeader header
;
2887 static_assert(sizeof(Disable
) == 8, "size of Disable should be 8");
2888 static_assert(offsetof(Disable
, header
) == 0,
2889 "offset of Disable header should be 0");
2890 static_assert(offsetof(Disable
, cap
) == 4, "offset of Disable cap should be 4");
2892 struct DisableVertexAttribArray
{
2893 typedef DisableVertexAttribArray ValueType
;
2894 static const CommandId kCmdId
= kDisableVertexAttribArray
;
2895 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2896 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2898 static uint32_t ComputeSize() {
2899 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2902 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2904 void Init(GLuint _index
) {
2909 void* Set(void* cmd
, GLuint _index
) {
2910 static_cast<ValueType
*>(cmd
)->Init(_index
);
2911 return NextCmdAddress
<ValueType
>(cmd
);
2914 gpu::CommandHeader header
;
2918 static_assert(sizeof(DisableVertexAttribArray
) == 8,
2919 "size of DisableVertexAttribArray should be 8");
2920 static_assert(offsetof(DisableVertexAttribArray
, header
) == 0,
2921 "offset of DisableVertexAttribArray header should be 0");
2922 static_assert(offsetof(DisableVertexAttribArray
, index
) == 4,
2923 "offset of DisableVertexAttribArray index should be 4");
2926 typedef DrawArrays ValueType
;
2927 static const CommandId kCmdId
= kDrawArrays
;
2928 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2929 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2931 static uint32_t ComputeSize() {
2932 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2935 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2937 void Init(GLenum _mode
, GLint _first
, GLsizei _count
) {
2944 void* Set(void* cmd
, GLenum _mode
, GLint _first
, GLsizei _count
) {
2945 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
);
2946 return NextCmdAddress
<ValueType
>(cmd
);
2949 gpu::CommandHeader header
;
2955 static_assert(sizeof(DrawArrays
) == 16, "size of DrawArrays should be 16");
2956 static_assert(offsetof(DrawArrays
, header
) == 0,
2957 "offset of DrawArrays header should be 0");
2958 static_assert(offsetof(DrawArrays
, mode
) == 4,
2959 "offset of DrawArrays mode should be 4");
2960 static_assert(offsetof(DrawArrays
, first
) == 8,
2961 "offset of DrawArrays first should be 8");
2962 static_assert(offsetof(DrawArrays
, count
) == 12,
2963 "offset of DrawArrays count should be 12");
2965 struct DrawElements
{
2966 typedef DrawElements ValueType
;
2967 static const CommandId kCmdId
= kDrawElements
;
2968 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2969 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
2971 static uint32_t ComputeSize() {
2972 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2975 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2977 void Init(GLenum _mode
, GLsizei _count
, GLenum _type
, GLuint _index_offset
) {
2982 index_offset
= _index_offset
;
2985 void* Set(void* cmd
,
2989 GLuint _index_offset
) {
2990 static_cast<ValueType
*>(cmd
)->Init(_mode
, _count
, _type
, _index_offset
);
2991 return NextCmdAddress
<ValueType
>(cmd
);
2994 gpu::CommandHeader header
;
2998 uint32_t index_offset
;
3001 static_assert(sizeof(DrawElements
) == 20, "size of DrawElements should be 20");
3002 static_assert(offsetof(DrawElements
, header
) == 0,
3003 "offset of DrawElements header should be 0");
3004 static_assert(offsetof(DrawElements
, mode
) == 4,
3005 "offset of DrawElements mode should be 4");
3006 static_assert(offsetof(DrawElements
, count
) == 8,
3007 "offset of DrawElements count should be 8");
3008 static_assert(offsetof(DrawElements
, type
) == 12,
3009 "offset of DrawElements type should be 12");
3010 static_assert(offsetof(DrawElements
, index_offset
) == 16,
3011 "offset of DrawElements index_offset should be 16");
3014 typedef Enable ValueType
;
3015 static const CommandId kCmdId
= kEnable
;
3016 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3017 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3019 static uint32_t ComputeSize() {
3020 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3023 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3025 void Init(GLenum _cap
) {
3030 void* Set(void* cmd
, GLenum _cap
) {
3031 static_cast<ValueType
*>(cmd
)->Init(_cap
);
3032 return NextCmdAddress
<ValueType
>(cmd
);
3035 gpu::CommandHeader header
;
3039 static_assert(sizeof(Enable
) == 8, "size of Enable should be 8");
3040 static_assert(offsetof(Enable
, header
) == 0,
3041 "offset of Enable header should be 0");
3042 static_assert(offsetof(Enable
, cap
) == 4, "offset of Enable cap should be 4");
3044 struct EnableVertexAttribArray
{
3045 typedef EnableVertexAttribArray ValueType
;
3046 static const CommandId kCmdId
= kEnableVertexAttribArray
;
3047 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3048 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3050 static uint32_t ComputeSize() {
3051 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3054 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3056 void Init(GLuint _index
) {
3061 void* Set(void* cmd
, GLuint _index
) {
3062 static_cast<ValueType
*>(cmd
)->Init(_index
);
3063 return NextCmdAddress
<ValueType
>(cmd
);
3066 gpu::CommandHeader header
;
3070 static_assert(sizeof(EnableVertexAttribArray
) == 8,
3071 "size of EnableVertexAttribArray should be 8");
3072 static_assert(offsetof(EnableVertexAttribArray
, header
) == 0,
3073 "offset of EnableVertexAttribArray header should be 0");
3074 static_assert(offsetof(EnableVertexAttribArray
, index
) == 4,
3075 "offset of EnableVertexAttribArray index should be 4");
3078 typedef FenceSync ValueType
;
3079 static const CommandId kCmdId
= kFenceSync
;
3080 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3081 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3083 static uint32_t ComputeSize() {
3084 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3087 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3089 void Init(uint32_t _client_id
) {
3091 client_id
= _client_id
;
3094 void* Set(void* cmd
, uint32_t _client_id
) {
3095 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
3096 return NextCmdAddress
<ValueType
>(cmd
);
3099 gpu::CommandHeader header
;
3101 static const uint32_t condition
= GL_SYNC_GPU_COMMANDS_COMPLETE
;
3102 static const uint32_t flags
= 0;
3105 static_assert(sizeof(FenceSync
) == 8, "size of FenceSync should be 8");
3106 static_assert(offsetof(FenceSync
, header
) == 0,
3107 "offset of FenceSync header should be 0");
3108 static_assert(offsetof(FenceSync
, client_id
) == 4,
3109 "offset of FenceSync client_id should be 4");
3112 typedef Finish ValueType
;
3113 static const CommandId kCmdId
= kFinish
;
3114 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3115 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3117 static uint32_t ComputeSize() {
3118 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3121 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3123 void Init() { SetHeader(); }
3125 void* Set(void* cmd
) {
3126 static_cast<ValueType
*>(cmd
)->Init();
3127 return NextCmdAddress
<ValueType
>(cmd
);
3130 gpu::CommandHeader header
;
3133 static_assert(sizeof(Finish
) == 4, "size of Finish should be 4");
3134 static_assert(offsetof(Finish
, header
) == 0,
3135 "offset of Finish header should be 0");
3138 typedef Flush ValueType
;
3139 static const CommandId kCmdId
= kFlush
;
3140 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3141 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3143 static uint32_t ComputeSize() {
3144 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3147 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3149 void Init() { SetHeader(); }
3151 void* Set(void* cmd
) {
3152 static_cast<ValueType
*>(cmd
)->Init();
3153 return NextCmdAddress
<ValueType
>(cmd
);
3156 gpu::CommandHeader header
;
3159 static_assert(sizeof(Flush
) == 4, "size of Flush should be 4");
3160 static_assert(offsetof(Flush
, header
) == 0,
3161 "offset of Flush header should be 0");
3163 struct FramebufferRenderbuffer
{
3164 typedef FramebufferRenderbuffer ValueType
;
3165 static const CommandId kCmdId
= kFramebufferRenderbuffer
;
3166 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3167 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3169 static uint32_t ComputeSize() {
3170 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3173 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3175 void Init(GLenum _target
,
3177 GLenum _renderbuffertarget
,
3178 GLuint _renderbuffer
) {
3181 attachment
= _attachment
;
3182 renderbuffertarget
= _renderbuffertarget
;
3183 renderbuffer
= _renderbuffer
;
3186 void* Set(void* cmd
,
3189 GLenum _renderbuffertarget
,
3190 GLuint _renderbuffer
) {
3191 static_cast<ValueType
*>(cmd
)
3192 ->Init(_target
, _attachment
, _renderbuffertarget
, _renderbuffer
);
3193 return NextCmdAddress
<ValueType
>(cmd
);
3196 gpu::CommandHeader header
;
3198 uint32_t attachment
;
3199 uint32_t renderbuffertarget
;
3200 uint32_t renderbuffer
;
3203 static_assert(sizeof(FramebufferRenderbuffer
) == 20,
3204 "size of FramebufferRenderbuffer should be 20");
3205 static_assert(offsetof(FramebufferRenderbuffer
, header
) == 0,
3206 "offset of FramebufferRenderbuffer header should be 0");
3207 static_assert(offsetof(FramebufferRenderbuffer
, target
) == 4,
3208 "offset of FramebufferRenderbuffer target should be 4");
3209 static_assert(offsetof(FramebufferRenderbuffer
, attachment
) == 8,
3210 "offset of FramebufferRenderbuffer attachment should be 8");
3212 offsetof(FramebufferRenderbuffer
, renderbuffertarget
) == 12,
3213 "offset of FramebufferRenderbuffer renderbuffertarget should be 12");
3214 static_assert(offsetof(FramebufferRenderbuffer
, renderbuffer
) == 16,
3215 "offset of FramebufferRenderbuffer renderbuffer should be 16");
3217 struct FramebufferTexture2D
{
3218 typedef FramebufferTexture2D ValueType
;
3219 static const CommandId kCmdId
= kFramebufferTexture2D
;
3220 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3221 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
3223 static uint32_t ComputeSize() {
3224 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3227 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3229 void Init(GLenum _target
,
3235 attachment
= _attachment
;
3236 textarget
= _textarget
;
3240 void* Set(void* cmd
,
3245 static_cast<ValueType
*>(cmd
)
3246 ->Init(_target
, _attachment
, _textarget
, _texture
);
3247 return NextCmdAddress
<ValueType
>(cmd
);
3250 gpu::CommandHeader header
;
3252 uint32_t attachment
;
3255 static const int32_t level
= 0;
3258 static_assert(sizeof(FramebufferTexture2D
) == 20,
3259 "size of FramebufferTexture2D should be 20");
3260 static_assert(offsetof(FramebufferTexture2D
, header
) == 0,
3261 "offset of FramebufferTexture2D header should be 0");
3262 static_assert(offsetof(FramebufferTexture2D
, target
) == 4,
3263 "offset of FramebufferTexture2D target should be 4");
3264 static_assert(offsetof(FramebufferTexture2D
, attachment
) == 8,
3265 "offset of FramebufferTexture2D attachment should be 8");
3266 static_assert(offsetof(FramebufferTexture2D
, textarget
) == 12,
3267 "offset of FramebufferTexture2D textarget should be 12");
3268 static_assert(offsetof(FramebufferTexture2D
, texture
) == 16,
3269 "offset of FramebufferTexture2D texture should be 16");
3271 struct FramebufferTextureLayer
{
3272 typedef FramebufferTextureLayer ValueType
;
3273 static const CommandId kCmdId
= kFramebufferTextureLayer
;
3274 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3275 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3277 static uint32_t ComputeSize() {
3278 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3281 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3283 void Init(GLenum _target
,
3290 attachment
= _attachment
;
3296 void* Set(void* cmd
,
3302 static_cast<ValueType
*>(cmd
)
3303 ->Init(_target
, _attachment
, _texture
, _level
, _layer
);
3304 return NextCmdAddress
<ValueType
>(cmd
);
3307 gpu::CommandHeader header
;
3309 uint32_t attachment
;
3315 static_assert(sizeof(FramebufferTextureLayer
) == 24,
3316 "size of FramebufferTextureLayer should be 24");
3317 static_assert(offsetof(FramebufferTextureLayer
, header
) == 0,
3318 "offset of FramebufferTextureLayer header should be 0");
3319 static_assert(offsetof(FramebufferTextureLayer
, target
) == 4,
3320 "offset of FramebufferTextureLayer target should be 4");
3321 static_assert(offsetof(FramebufferTextureLayer
, attachment
) == 8,
3322 "offset of FramebufferTextureLayer attachment should be 8");
3323 static_assert(offsetof(FramebufferTextureLayer
, texture
) == 12,
3324 "offset of FramebufferTextureLayer texture should be 12");
3325 static_assert(offsetof(FramebufferTextureLayer
, level
) == 16,
3326 "offset of FramebufferTextureLayer level should be 16");
3327 static_assert(offsetof(FramebufferTextureLayer
, layer
) == 20,
3328 "offset of FramebufferTextureLayer layer should be 20");
3331 typedef FrontFace ValueType
;
3332 static const CommandId kCmdId
= kFrontFace
;
3333 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3334 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3336 static uint32_t ComputeSize() {
3337 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3340 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3342 void Init(GLenum _mode
) {
3347 void* Set(void* cmd
, GLenum _mode
) {
3348 static_cast<ValueType
*>(cmd
)->Init(_mode
);
3349 return NextCmdAddress
<ValueType
>(cmd
);
3352 gpu::CommandHeader header
;
3356 static_assert(sizeof(FrontFace
) == 8, "size of FrontFace should be 8");
3357 static_assert(offsetof(FrontFace
, header
) == 0,
3358 "offset of FrontFace header should be 0");
3359 static_assert(offsetof(FrontFace
, mode
) == 4,
3360 "offset of FrontFace mode should be 4");
3362 struct GenBuffersImmediate
{
3363 typedef GenBuffersImmediate ValueType
;
3364 static const CommandId kCmdId
= kGenBuffersImmediate
;
3365 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3366 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3368 static uint32_t ComputeDataSize(GLsizei n
) {
3369 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3372 static uint32_t ComputeSize(GLsizei n
) {
3373 return static_cast<uint32_t>(sizeof(ValueType
) +
3374 ComputeDataSize(n
)); // NOLINT
3377 void SetHeader(GLsizei n
) {
3378 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3381 void Init(GLsizei _n
, GLuint
* _buffers
) {
3384 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
3387 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
3388 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
3389 const uint32_t size
= ComputeSize(_n
);
3390 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3393 gpu::CommandHeader header
;
3397 static_assert(sizeof(GenBuffersImmediate
) == 8,
3398 "size of GenBuffersImmediate should be 8");
3399 static_assert(offsetof(GenBuffersImmediate
, header
) == 0,
3400 "offset of GenBuffersImmediate header should be 0");
3401 static_assert(offsetof(GenBuffersImmediate
, n
) == 4,
3402 "offset of GenBuffersImmediate n should be 4");
3404 struct GenerateMipmap
{
3405 typedef GenerateMipmap ValueType
;
3406 static const CommandId kCmdId
= kGenerateMipmap
;
3407 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3408 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3410 static uint32_t ComputeSize() {
3411 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3414 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3416 void Init(GLenum _target
) {
3421 void* Set(void* cmd
, GLenum _target
) {
3422 static_cast<ValueType
*>(cmd
)->Init(_target
);
3423 return NextCmdAddress
<ValueType
>(cmd
);
3426 gpu::CommandHeader header
;
3430 static_assert(sizeof(GenerateMipmap
) == 8,
3431 "size of GenerateMipmap should be 8");
3432 static_assert(offsetof(GenerateMipmap
, header
) == 0,
3433 "offset of GenerateMipmap header should be 0");
3434 static_assert(offsetof(GenerateMipmap
, target
) == 4,
3435 "offset of GenerateMipmap target should be 4");
3437 struct GenFramebuffersImmediate
{
3438 typedef GenFramebuffersImmediate ValueType
;
3439 static const CommandId kCmdId
= kGenFramebuffersImmediate
;
3440 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3441 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3443 static uint32_t ComputeDataSize(GLsizei n
) {
3444 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3447 static uint32_t ComputeSize(GLsizei n
) {
3448 return static_cast<uint32_t>(sizeof(ValueType
) +
3449 ComputeDataSize(n
)); // NOLINT
3452 void SetHeader(GLsizei n
) {
3453 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3456 void Init(GLsizei _n
, GLuint
* _framebuffers
) {
3459 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
3462 void* Set(void* cmd
, GLsizei _n
, GLuint
* _framebuffers
) {
3463 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
3464 const uint32_t size
= ComputeSize(_n
);
3465 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3468 gpu::CommandHeader header
;
3472 static_assert(sizeof(GenFramebuffersImmediate
) == 8,
3473 "size of GenFramebuffersImmediate should be 8");
3474 static_assert(offsetof(GenFramebuffersImmediate
, header
) == 0,
3475 "offset of GenFramebuffersImmediate header should be 0");
3476 static_assert(offsetof(GenFramebuffersImmediate
, n
) == 4,
3477 "offset of GenFramebuffersImmediate n should be 4");
3479 struct GenRenderbuffersImmediate
{
3480 typedef GenRenderbuffersImmediate ValueType
;
3481 static const CommandId kCmdId
= kGenRenderbuffersImmediate
;
3482 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3483 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3485 static uint32_t ComputeDataSize(GLsizei n
) {
3486 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3489 static uint32_t ComputeSize(GLsizei n
) {
3490 return static_cast<uint32_t>(sizeof(ValueType
) +
3491 ComputeDataSize(n
)); // NOLINT
3494 void SetHeader(GLsizei n
) {
3495 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3498 void Init(GLsizei _n
, GLuint
* _renderbuffers
) {
3501 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
3504 void* Set(void* cmd
, GLsizei _n
, GLuint
* _renderbuffers
) {
3505 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
3506 const uint32_t size
= ComputeSize(_n
);
3507 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3510 gpu::CommandHeader header
;
3514 static_assert(sizeof(GenRenderbuffersImmediate
) == 8,
3515 "size of GenRenderbuffersImmediate should be 8");
3516 static_assert(offsetof(GenRenderbuffersImmediate
, header
) == 0,
3517 "offset of GenRenderbuffersImmediate header should be 0");
3518 static_assert(offsetof(GenRenderbuffersImmediate
, n
) == 4,
3519 "offset of GenRenderbuffersImmediate n should be 4");
3521 struct GenSamplersImmediate
{
3522 typedef GenSamplersImmediate ValueType
;
3523 static const CommandId kCmdId
= kGenSamplersImmediate
;
3524 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3525 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3527 static uint32_t ComputeDataSize(GLsizei n
) {
3528 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3531 static uint32_t ComputeSize(GLsizei n
) {
3532 return static_cast<uint32_t>(sizeof(ValueType
) +
3533 ComputeDataSize(n
)); // NOLINT
3536 void SetHeader(GLsizei n
) {
3537 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3540 void Init(GLsizei _n
, GLuint
* _samplers
) {
3543 memcpy(ImmediateDataAddress(this), _samplers
, ComputeDataSize(_n
));
3546 void* Set(void* cmd
, GLsizei _n
, GLuint
* _samplers
) {
3547 static_cast<ValueType
*>(cmd
)->Init(_n
, _samplers
);
3548 const uint32_t size
= ComputeSize(_n
);
3549 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3552 gpu::CommandHeader header
;
3556 static_assert(sizeof(GenSamplersImmediate
) == 8,
3557 "size of GenSamplersImmediate should be 8");
3558 static_assert(offsetof(GenSamplersImmediate
, header
) == 0,
3559 "offset of GenSamplersImmediate header should be 0");
3560 static_assert(offsetof(GenSamplersImmediate
, n
) == 4,
3561 "offset of GenSamplersImmediate n should be 4");
3563 struct GenTexturesImmediate
{
3564 typedef GenTexturesImmediate ValueType
;
3565 static const CommandId kCmdId
= kGenTexturesImmediate
;
3566 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3567 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3569 static uint32_t ComputeDataSize(GLsizei n
) {
3570 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3573 static uint32_t ComputeSize(GLsizei n
) {
3574 return static_cast<uint32_t>(sizeof(ValueType
) +
3575 ComputeDataSize(n
)); // NOLINT
3578 void SetHeader(GLsizei n
) {
3579 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3582 void Init(GLsizei _n
, GLuint
* _textures
) {
3585 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
3588 void* Set(void* cmd
, GLsizei _n
, GLuint
* _textures
) {
3589 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
3590 const uint32_t size
= ComputeSize(_n
);
3591 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3594 gpu::CommandHeader header
;
3598 static_assert(sizeof(GenTexturesImmediate
) == 8,
3599 "size of GenTexturesImmediate should be 8");
3600 static_assert(offsetof(GenTexturesImmediate
, header
) == 0,
3601 "offset of GenTexturesImmediate header should be 0");
3602 static_assert(offsetof(GenTexturesImmediate
, n
) == 4,
3603 "offset of GenTexturesImmediate n should be 4");
3605 struct GenTransformFeedbacksImmediate
{
3606 typedef GenTransformFeedbacksImmediate ValueType
;
3607 static const CommandId kCmdId
= kGenTransformFeedbacksImmediate
;
3608 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
3609 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3611 static uint32_t ComputeDataSize(GLsizei n
) {
3612 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
3615 static uint32_t ComputeSize(GLsizei n
) {
3616 return static_cast<uint32_t>(sizeof(ValueType
) +
3617 ComputeDataSize(n
)); // NOLINT
3620 void SetHeader(GLsizei n
) {
3621 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
3624 void Init(GLsizei _n
, GLuint
* _ids
) {
3627 memcpy(ImmediateDataAddress(this), _ids
, ComputeDataSize(_n
));
3630 void* Set(void* cmd
, GLsizei _n
, GLuint
* _ids
) {
3631 static_cast<ValueType
*>(cmd
)->Init(_n
, _ids
);
3632 const uint32_t size
= ComputeSize(_n
);
3633 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
3636 gpu::CommandHeader header
;
3640 static_assert(sizeof(GenTransformFeedbacksImmediate
) == 8,
3641 "size of GenTransformFeedbacksImmediate should be 8");
3642 static_assert(offsetof(GenTransformFeedbacksImmediate
, header
) == 0,
3643 "offset of GenTransformFeedbacksImmediate header should be 0");
3644 static_assert(offsetof(GenTransformFeedbacksImmediate
, n
) == 4,
3645 "offset of GenTransformFeedbacksImmediate n should be 4");
3647 struct GetActiveAttrib
{
3648 typedef GetActiveAttrib ValueType
;
3649 static const CommandId kCmdId
= kGetActiveAttrib
;
3650 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3651 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3659 static uint32_t ComputeSize() {
3660 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3663 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3665 void Init(GLuint _program
,
3667 uint32_t _name_bucket_id
,
3668 uint32_t _result_shm_id
,
3669 uint32_t _result_shm_offset
) {
3673 name_bucket_id
= _name_bucket_id
;
3674 result_shm_id
= _result_shm_id
;
3675 result_shm_offset
= _result_shm_offset
;
3678 void* Set(void* cmd
,
3681 uint32_t _name_bucket_id
,
3682 uint32_t _result_shm_id
,
3683 uint32_t _result_shm_offset
) {
3684 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3685 _result_shm_id
, _result_shm_offset
);
3686 return NextCmdAddress
<ValueType
>(cmd
);
3689 gpu::CommandHeader header
;
3692 uint32_t name_bucket_id
;
3693 uint32_t result_shm_id
;
3694 uint32_t result_shm_offset
;
3697 static_assert(sizeof(GetActiveAttrib
) == 24,
3698 "size of GetActiveAttrib should be 24");
3699 static_assert(offsetof(GetActiveAttrib
, header
) == 0,
3700 "offset of GetActiveAttrib header should be 0");
3701 static_assert(offsetof(GetActiveAttrib
, program
) == 4,
3702 "offset of GetActiveAttrib program should be 4");
3703 static_assert(offsetof(GetActiveAttrib
, index
) == 8,
3704 "offset of GetActiveAttrib index should be 8");
3705 static_assert(offsetof(GetActiveAttrib
, name_bucket_id
) == 12,
3706 "offset of GetActiveAttrib name_bucket_id should be 12");
3707 static_assert(offsetof(GetActiveAttrib
, result_shm_id
) == 16,
3708 "offset of GetActiveAttrib result_shm_id should be 16");
3709 static_assert(offsetof(GetActiveAttrib
, result_shm_offset
) == 20,
3710 "offset of GetActiveAttrib result_shm_offset should be 20");
3711 static_assert(offsetof(GetActiveAttrib::Result
, success
) == 0,
3712 "offset of GetActiveAttrib Result success should be "
3714 static_assert(offsetof(GetActiveAttrib::Result
, size
) == 4,
3715 "offset of GetActiveAttrib Result size should be "
3717 static_assert(offsetof(GetActiveAttrib::Result
, type
) == 8,
3718 "offset of GetActiveAttrib Result type should be "
3721 struct GetActiveUniform
{
3722 typedef GetActiveUniform ValueType
;
3723 static const CommandId kCmdId
= kGetActiveUniform
;
3724 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3725 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3733 static uint32_t ComputeSize() {
3734 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3737 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3739 void Init(GLuint _program
,
3741 uint32_t _name_bucket_id
,
3742 uint32_t _result_shm_id
,
3743 uint32_t _result_shm_offset
) {
3747 name_bucket_id
= _name_bucket_id
;
3748 result_shm_id
= _result_shm_id
;
3749 result_shm_offset
= _result_shm_offset
;
3752 void* Set(void* cmd
,
3755 uint32_t _name_bucket_id
,
3756 uint32_t _result_shm_id
,
3757 uint32_t _result_shm_offset
) {
3758 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3759 _result_shm_id
, _result_shm_offset
);
3760 return NextCmdAddress
<ValueType
>(cmd
);
3763 gpu::CommandHeader header
;
3766 uint32_t name_bucket_id
;
3767 uint32_t result_shm_id
;
3768 uint32_t result_shm_offset
;
3771 static_assert(sizeof(GetActiveUniform
) == 24,
3772 "size of GetActiveUniform should be 24");
3773 static_assert(offsetof(GetActiveUniform
, header
) == 0,
3774 "offset of GetActiveUniform header should be 0");
3775 static_assert(offsetof(GetActiveUniform
, program
) == 4,
3776 "offset of GetActiveUniform program should be 4");
3777 static_assert(offsetof(GetActiveUniform
, index
) == 8,
3778 "offset of GetActiveUniform index should be 8");
3779 static_assert(offsetof(GetActiveUniform
, name_bucket_id
) == 12,
3780 "offset of GetActiveUniform name_bucket_id should be 12");
3781 static_assert(offsetof(GetActiveUniform
, result_shm_id
) == 16,
3782 "offset of GetActiveUniform result_shm_id should be 16");
3783 static_assert(offsetof(GetActiveUniform
, result_shm_offset
) == 20,
3784 "offset of GetActiveUniform result_shm_offset should be 20");
3785 static_assert(offsetof(GetActiveUniform::Result
, success
) == 0,
3786 "offset of GetActiveUniform Result success should be "
3788 static_assert(offsetof(GetActiveUniform::Result
, size
) == 4,
3789 "offset of GetActiveUniform Result size should be "
3791 static_assert(offsetof(GetActiveUniform::Result
, type
) == 8,
3792 "offset of GetActiveUniform Result type should be "
3795 struct GetActiveUniformBlockiv
{
3796 typedef GetActiveUniformBlockiv ValueType
;
3797 static const CommandId kCmdId
= kGetActiveUniformBlockiv
;
3798 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3799 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3801 typedef SizedResult
<GLint
> Result
;
3803 static uint32_t ComputeSize() {
3804 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3807 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3809 void Init(GLuint _program
,
3812 uint32_t _params_shm_id
,
3813 uint32_t _params_shm_offset
) {
3818 params_shm_id
= _params_shm_id
;
3819 params_shm_offset
= _params_shm_offset
;
3822 void* Set(void* cmd
,
3826 uint32_t _params_shm_id
,
3827 uint32_t _params_shm_offset
) {
3828 static_cast<ValueType
*>(cmd
)
3829 ->Init(_program
, _index
, _pname
, _params_shm_id
, _params_shm_offset
);
3830 return NextCmdAddress
<ValueType
>(cmd
);
3833 gpu::CommandHeader header
;
3837 uint32_t params_shm_id
;
3838 uint32_t params_shm_offset
;
3841 static_assert(sizeof(GetActiveUniformBlockiv
) == 24,
3842 "size of GetActiveUniformBlockiv should be 24");
3843 static_assert(offsetof(GetActiveUniformBlockiv
, header
) == 0,
3844 "offset of GetActiveUniformBlockiv header should be 0");
3845 static_assert(offsetof(GetActiveUniformBlockiv
, program
) == 4,
3846 "offset of GetActiveUniformBlockiv program should be 4");
3847 static_assert(offsetof(GetActiveUniformBlockiv
, index
) == 8,
3848 "offset of GetActiveUniformBlockiv index should be 8");
3849 static_assert(offsetof(GetActiveUniformBlockiv
, pname
) == 12,
3850 "offset of GetActiveUniformBlockiv pname should be 12");
3851 static_assert(offsetof(GetActiveUniformBlockiv
, params_shm_id
) == 16,
3852 "offset of GetActiveUniformBlockiv params_shm_id should be 16");
3854 offsetof(GetActiveUniformBlockiv
, params_shm_offset
) == 20,
3855 "offset of GetActiveUniformBlockiv params_shm_offset should be 20");
3857 struct GetActiveUniformBlockName
{
3858 typedef GetActiveUniformBlockName ValueType
;
3859 static const CommandId kCmdId
= kGetActiveUniformBlockName
;
3860 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3861 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3863 typedef int32_t Result
;
3865 static uint32_t ComputeSize() {
3866 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3869 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3871 void Init(GLuint _program
,
3873 uint32_t _name_bucket_id
,
3874 uint32_t _result_shm_id
,
3875 uint32_t _result_shm_offset
) {
3879 name_bucket_id
= _name_bucket_id
;
3880 result_shm_id
= _result_shm_id
;
3881 result_shm_offset
= _result_shm_offset
;
3884 void* Set(void* cmd
,
3887 uint32_t _name_bucket_id
,
3888 uint32_t _result_shm_id
,
3889 uint32_t _result_shm_offset
) {
3890 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
3891 _result_shm_id
, _result_shm_offset
);
3892 return NextCmdAddress
<ValueType
>(cmd
);
3895 gpu::CommandHeader header
;
3898 uint32_t name_bucket_id
;
3899 uint32_t result_shm_id
;
3900 uint32_t result_shm_offset
;
3903 static_assert(sizeof(GetActiveUniformBlockName
) == 24,
3904 "size of GetActiveUniformBlockName should be 24");
3905 static_assert(offsetof(GetActiveUniformBlockName
, header
) == 0,
3906 "offset of GetActiveUniformBlockName header should be 0");
3907 static_assert(offsetof(GetActiveUniformBlockName
, program
) == 4,
3908 "offset of GetActiveUniformBlockName program should be 4");
3909 static_assert(offsetof(GetActiveUniformBlockName
, index
) == 8,
3910 "offset of GetActiveUniformBlockName index should be 8");
3912 offsetof(GetActiveUniformBlockName
, name_bucket_id
) == 12,
3913 "offset of GetActiveUniformBlockName name_bucket_id should be 12");
3914 static_assert(offsetof(GetActiveUniformBlockName
, result_shm_id
) == 16,
3915 "offset of GetActiveUniformBlockName result_shm_id should be 16");
3917 offsetof(GetActiveUniformBlockName
, result_shm_offset
) == 20,
3918 "offset of GetActiveUniformBlockName result_shm_offset should be 20");
3920 struct GetActiveUniformsiv
{
3921 typedef GetActiveUniformsiv ValueType
;
3922 static const CommandId kCmdId
= kGetActiveUniformsiv
;
3923 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3924 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3926 typedef SizedResult
<GLint
> Result
;
3928 static uint32_t ComputeSize() {
3929 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3932 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3934 void Init(GLuint _program
,
3935 uint32_t _indices_bucket_id
,
3937 uint32_t _params_shm_id
,
3938 uint32_t _params_shm_offset
) {
3941 indices_bucket_id
= _indices_bucket_id
;
3943 params_shm_id
= _params_shm_id
;
3944 params_shm_offset
= _params_shm_offset
;
3947 void* Set(void* cmd
,
3949 uint32_t _indices_bucket_id
,
3951 uint32_t _params_shm_id
,
3952 uint32_t _params_shm_offset
) {
3953 static_cast<ValueType
*>(cmd
)->Init(_program
, _indices_bucket_id
, _pname
,
3954 _params_shm_id
, _params_shm_offset
);
3955 return NextCmdAddress
<ValueType
>(cmd
);
3958 gpu::CommandHeader header
;
3960 uint32_t indices_bucket_id
;
3962 uint32_t params_shm_id
;
3963 uint32_t params_shm_offset
;
3966 static_assert(sizeof(GetActiveUniformsiv
) == 24,
3967 "size of GetActiveUniformsiv should be 24");
3968 static_assert(offsetof(GetActiveUniformsiv
, header
) == 0,
3969 "offset of GetActiveUniformsiv header should be 0");
3970 static_assert(offsetof(GetActiveUniformsiv
, program
) == 4,
3971 "offset of GetActiveUniformsiv program should be 4");
3972 static_assert(offsetof(GetActiveUniformsiv
, indices_bucket_id
) == 8,
3973 "offset of GetActiveUniformsiv indices_bucket_id should be 8");
3974 static_assert(offsetof(GetActiveUniformsiv
, pname
) == 12,
3975 "offset of GetActiveUniformsiv pname should be 12");
3976 static_assert(offsetof(GetActiveUniformsiv
, params_shm_id
) == 16,
3977 "offset of GetActiveUniformsiv params_shm_id should be 16");
3978 static_assert(offsetof(GetActiveUniformsiv
, params_shm_offset
) == 20,
3979 "offset of GetActiveUniformsiv params_shm_offset should be 20");
3981 struct GetAttachedShaders
{
3982 typedef GetAttachedShaders ValueType
;
3983 static const CommandId kCmdId
= kGetAttachedShaders
;
3984 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3985 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3987 typedef SizedResult
<GLuint
> Result
;
3989 static uint32_t ComputeSize() {
3990 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3993 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3995 void Init(GLuint _program
,
3996 uint32_t _result_shm_id
,
3997 uint32_t _result_shm_offset
,
3998 uint32_t _result_size
) {
4001 result_shm_id
= _result_shm_id
;
4002 result_shm_offset
= _result_shm_offset
;
4003 result_size
= _result_size
;
4006 void* Set(void* cmd
,
4008 uint32_t _result_shm_id
,
4009 uint32_t _result_shm_offset
,
4010 uint32_t _result_size
) {
4011 static_cast<ValueType
*>(cmd
)
4012 ->Init(_program
, _result_shm_id
, _result_shm_offset
, _result_size
);
4013 return NextCmdAddress
<ValueType
>(cmd
);
4016 gpu::CommandHeader header
;
4018 uint32_t result_shm_id
;
4019 uint32_t result_shm_offset
;
4020 uint32_t result_size
;
4023 static_assert(sizeof(GetAttachedShaders
) == 20,
4024 "size of GetAttachedShaders should be 20");
4025 static_assert(offsetof(GetAttachedShaders
, header
) == 0,
4026 "offset of GetAttachedShaders header should be 0");
4027 static_assert(offsetof(GetAttachedShaders
, program
) == 4,
4028 "offset of GetAttachedShaders program should be 4");
4029 static_assert(offsetof(GetAttachedShaders
, result_shm_id
) == 8,
4030 "offset of GetAttachedShaders result_shm_id should be 8");
4031 static_assert(offsetof(GetAttachedShaders
, result_shm_offset
) == 12,
4032 "offset of GetAttachedShaders result_shm_offset should be 12");
4033 static_assert(offsetof(GetAttachedShaders
, result_size
) == 16,
4034 "offset of GetAttachedShaders result_size should be 16");
4036 struct GetAttribLocation
{
4037 typedef GetAttribLocation ValueType
;
4038 static const CommandId kCmdId
= kGetAttribLocation
;
4039 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4040 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4042 typedef GLint Result
;
4044 static uint32_t ComputeSize() {
4045 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4048 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4050 void Init(GLuint _program
,
4051 uint32_t _name_bucket_id
,
4052 uint32_t _location_shm_id
,
4053 uint32_t _location_shm_offset
) {
4056 name_bucket_id
= _name_bucket_id
;
4057 location_shm_id
= _location_shm_id
;
4058 location_shm_offset
= _location_shm_offset
;
4061 void* Set(void* cmd
,
4063 uint32_t _name_bucket_id
,
4064 uint32_t _location_shm_id
,
4065 uint32_t _location_shm_offset
) {
4066 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
4067 _location_shm_id
, _location_shm_offset
);
4068 return NextCmdAddress
<ValueType
>(cmd
);
4071 gpu::CommandHeader header
;
4073 uint32_t name_bucket_id
;
4074 uint32_t location_shm_id
;
4075 uint32_t location_shm_offset
;
4078 static_assert(sizeof(GetAttribLocation
) == 20,
4079 "size of GetAttribLocation should be 20");
4080 static_assert(offsetof(GetAttribLocation
, header
) == 0,
4081 "offset of GetAttribLocation header should be 0");
4082 static_assert(offsetof(GetAttribLocation
, program
) == 4,
4083 "offset of GetAttribLocation program should be 4");
4084 static_assert(offsetof(GetAttribLocation
, name_bucket_id
) == 8,
4085 "offset of GetAttribLocation name_bucket_id should be 8");
4086 static_assert(offsetof(GetAttribLocation
, location_shm_id
) == 12,
4087 "offset of GetAttribLocation location_shm_id should be 12");
4088 static_assert(offsetof(GetAttribLocation
, location_shm_offset
) == 16,
4089 "offset of GetAttribLocation location_shm_offset should be 16");
4091 struct GetBooleanv
{
4092 typedef GetBooleanv ValueType
;
4093 static const CommandId kCmdId
= kGetBooleanv
;
4094 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4095 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4097 typedef SizedResult
<GLboolean
> Result
;
4099 static uint32_t ComputeSize() {
4100 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4103 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4105 void Init(GLenum _pname
,
4106 uint32_t _params_shm_id
,
4107 uint32_t _params_shm_offset
) {
4110 params_shm_id
= _params_shm_id
;
4111 params_shm_offset
= _params_shm_offset
;
4114 void* Set(void* cmd
,
4116 uint32_t _params_shm_id
,
4117 uint32_t _params_shm_offset
) {
4118 static_cast<ValueType
*>(cmd
)
4119 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4120 return NextCmdAddress
<ValueType
>(cmd
);
4123 gpu::CommandHeader header
;
4125 uint32_t params_shm_id
;
4126 uint32_t params_shm_offset
;
4129 static_assert(sizeof(GetBooleanv
) == 16, "size of GetBooleanv should be 16");
4130 static_assert(offsetof(GetBooleanv
, header
) == 0,
4131 "offset of GetBooleanv header should be 0");
4132 static_assert(offsetof(GetBooleanv
, pname
) == 4,
4133 "offset of GetBooleanv pname should be 4");
4134 static_assert(offsetof(GetBooleanv
, params_shm_id
) == 8,
4135 "offset of GetBooleanv params_shm_id should be 8");
4136 static_assert(offsetof(GetBooleanv
, params_shm_offset
) == 12,
4137 "offset of GetBooleanv params_shm_offset should be 12");
4139 struct GetBufferParameteriv
{
4140 typedef GetBufferParameteriv ValueType
;
4141 static const CommandId kCmdId
= kGetBufferParameteriv
;
4142 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4143 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4145 typedef SizedResult
<GLint
> Result
;
4147 static uint32_t ComputeSize() {
4148 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4151 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4153 void Init(GLenum _target
,
4155 uint32_t _params_shm_id
,
4156 uint32_t _params_shm_offset
) {
4160 params_shm_id
= _params_shm_id
;
4161 params_shm_offset
= _params_shm_offset
;
4164 void* Set(void* cmd
,
4167 uint32_t _params_shm_id
,
4168 uint32_t _params_shm_offset
) {
4169 static_cast<ValueType
*>(cmd
)
4170 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4171 return NextCmdAddress
<ValueType
>(cmd
);
4174 gpu::CommandHeader header
;
4177 uint32_t params_shm_id
;
4178 uint32_t params_shm_offset
;
4181 static_assert(sizeof(GetBufferParameteriv
) == 20,
4182 "size of GetBufferParameteriv should be 20");
4183 static_assert(offsetof(GetBufferParameteriv
, header
) == 0,
4184 "offset of GetBufferParameteriv header should be 0");
4185 static_assert(offsetof(GetBufferParameteriv
, target
) == 4,
4186 "offset of GetBufferParameteriv target should be 4");
4187 static_assert(offsetof(GetBufferParameteriv
, pname
) == 8,
4188 "offset of GetBufferParameteriv pname should be 8");
4189 static_assert(offsetof(GetBufferParameteriv
, params_shm_id
) == 12,
4190 "offset of GetBufferParameteriv params_shm_id should be 12");
4191 static_assert(offsetof(GetBufferParameteriv
, params_shm_offset
) == 16,
4192 "offset of GetBufferParameteriv params_shm_offset should be 16");
4195 typedef GetError ValueType
;
4196 static const CommandId kCmdId
= kGetError
;
4197 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4198 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4200 typedef GLenum Result
;
4202 static uint32_t ComputeSize() {
4203 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4206 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4208 void Init(uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
4210 result_shm_id
= _result_shm_id
;
4211 result_shm_offset
= _result_shm_offset
;
4214 void* Set(void* cmd
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
4215 static_cast<ValueType
*>(cmd
)->Init(_result_shm_id
, _result_shm_offset
);
4216 return NextCmdAddress
<ValueType
>(cmd
);
4219 gpu::CommandHeader header
;
4220 uint32_t result_shm_id
;
4221 uint32_t result_shm_offset
;
4224 static_assert(sizeof(GetError
) == 12, "size of GetError should be 12");
4225 static_assert(offsetof(GetError
, header
) == 0,
4226 "offset of GetError header should be 0");
4227 static_assert(offsetof(GetError
, result_shm_id
) == 4,
4228 "offset of GetError result_shm_id should be 4");
4229 static_assert(offsetof(GetError
, result_shm_offset
) == 8,
4230 "offset of GetError result_shm_offset should be 8");
4233 typedef GetFloatv ValueType
;
4234 static const CommandId kCmdId
= kGetFloatv
;
4235 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4236 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4238 typedef SizedResult
<GLfloat
> Result
;
4240 static uint32_t ComputeSize() {
4241 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4244 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4246 void Init(GLenum _pname
,
4247 uint32_t _params_shm_id
,
4248 uint32_t _params_shm_offset
) {
4251 params_shm_id
= _params_shm_id
;
4252 params_shm_offset
= _params_shm_offset
;
4255 void* Set(void* cmd
,
4257 uint32_t _params_shm_id
,
4258 uint32_t _params_shm_offset
) {
4259 static_cast<ValueType
*>(cmd
)
4260 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4261 return NextCmdAddress
<ValueType
>(cmd
);
4264 gpu::CommandHeader header
;
4266 uint32_t params_shm_id
;
4267 uint32_t params_shm_offset
;
4270 static_assert(sizeof(GetFloatv
) == 16, "size of GetFloatv should be 16");
4271 static_assert(offsetof(GetFloatv
, header
) == 0,
4272 "offset of GetFloatv header should be 0");
4273 static_assert(offsetof(GetFloatv
, pname
) == 4,
4274 "offset of GetFloatv pname should be 4");
4275 static_assert(offsetof(GetFloatv
, params_shm_id
) == 8,
4276 "offset of GetFloatv params_shm_id should be 8");
4277 static_assert(offsetof(GetFloatv
, params_shm_offset
) == 12,
4278 "offset of GetFloatv params_shm_offset should be 12");
4280 struct GetFragDataLocation
{
4281 typedef GetFragDataLocation ValueType
;
4282 static const CommandId kCmdId
= kGetFragDataLocation
;
4283 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4284 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4286 typedef GLint Result
;
4288 static uint32_t ComputeSize() {
4289 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4292 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4294 void Init(GLuint _program
,
4295 uint32_t _name_bucket_id
,
4296 uint32_t _location_shm_id
,
4297 uint32_t _location_shm_offset
) {
4300 name_bucket_id
= _name_bucket_id
;
4301 location_shm_id
= _location_shm_id
;
4302 location_shm_offset
= _location_shm_offset
;
4305 void* Set(void* cmd
,
4307 uint32_t _name_bucket_id
,
4308 uint32_t _location_shm_id
,
4309 uint32_t _location_shm_offset
) {
4310 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
4311 _location_shm_id
, _location_shm_offset
);
4312 return NextCmdAddress
<ValueType
>(cmd
);
4315 gpu::CommandHeader header
;
4317 uint32_t name_bucket_id
;
4318 uint32_t location_shm_id
;
4319 uint32_t location_shm_offset
;
4322 static_assert(sizeof(GetFragDataLocation
) == 20,
4323 "size of GetFragDataLocation should be 20");
4324 static_assert(offsetof(GetFragDataLocation
, header
) == 0,
4325 "offset of GetFragDataLocation header should be 0");
4326 static_assert(offsetof(GetFragDataLocation
, program
) == 4,
4327 "offset of GetFragDataLocation program should be 4");
4328 static_assert(offsetof(GetFragDataLocation
, name_bucket_id
) == 8,
4329 "offset of GetFragDataLocation name_bucket_id should be 8");
4330 static_assert(offsetof(GetFragDataLocation
, location_shm_id
) == 12,
4331 "offset of GetFragDataLocation location_shm_id should be 12");
4332 static_assert(offsetof(GetFragDataLocation
, location_shm_offset
) == 16,
4333 "offset of GetFragDataLocation location_shm_offset should be 16");
4335 struct GetFramebufferAttachmentParameteriv
{
4336 typedef GetFramebufferAttachmentParameteriv ValueType
;
4337 static const CommandId kCmdId
= kGetFramebufferAttachmentParameteriv
;
4338 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4339 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4341 typedef SizedResult
<GLint
> Result
;
4343 static uint32_t ComputeSize() {
4344 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4347 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4349 void Init(GLenum _target
,
4352 uint32_t _params_shm_id
,
4353 uint32_t _params_shm_offset
) {
4356 attachment
= _attachment
;
4358 params_shm_id
= _params_shm_id
;
4359 params_shm_offset
= _params_shm_offset
;
4362 void* Set(void* cmd
,
4366 uint32_t _params_shm_id
,
4367 uint32_t _params_shm_offset
) {
4368 static_cast<ValueType
*>(cmd
)->Init(_target
, _attachment
, _pname
,
4369 _params_shm_id
, _params_shm_offset
);
4370 return NextCmdAddress
<ValueType
>(cmd
);
4373 gpu::CommandHeader header
;
4375 uint32_t attachment
;
4377 uint32_t params_shm_id
;
4378 uint32_t params_shm_offset
;
4381 static_assert(sizeof(GetFramebufferAttachmentParameteriv
) == 24,
4382 "size of GetFramebufferAttachmentParameteriv should be 24");
4384 offsetof(GetFramebufferAttachmentParameteriv
, header
) == 0,
4385 "offset of GetFramebufferAttachmentParameteriv header should be 0");
4387 offsetof(GetFramebufferAttachmentParameteriv
, target
) == 4,
4388 "offset of GetFramebufferAttachmentParameteriv target should be 4");
4390 offsetof(GetFramebufferAttachmentParameteriv
, attachment
) == 8,
4391 "offset of GetFramebufferAttachmentParameteriv attachment should be 8");
4393 offsetof(GetFramebufferAttachmentParameteriv
, pname
) == 12,
4394 "offset of GetFramebufferAttachmentParameteriv pname should be 12");
4396 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_id
) == 16,
4397 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16");
4398 static_assert(offsetof(GetFramebufferAttachmentParameteriv
,
4399 params_shm_offset
) == 20,
4400 "offset of GetFramebufferAttachmentParameteriv params_shm_offset "
4403 struct GetInteger64v
{
4404 typedef GetInteger64v ValueType
;
4405 static const CommandId kCmdId
= kGetInteger64v
;
4406 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4407 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4409 typedef SizedResult
<GLint64
> Result
;
4411 static uint32_t ComputeSize() {
4412 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4415 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4417 void Init(GLenum _pname
,
4418 uint32_t _params_shm_id
,
4419 uint32_t _params_shm_offset
) {
4422 params_shm_id
= _params_shm_id
;
4423 params_shm_offset
= _params_shm_offset
;
4426 void* Set(void* cmd
,
4428 uint32_t _params_shm_id
,
4429 uint32_t _params_shm_offset
) {
4430 static_cast<ValueType
*>(cmd
)
4431 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4432 return NextCmdAddress
<ValueType
>(cmd
);
4435 gpu::CommandHeader header
;
4437 uint32_t params_shm_id
;
4438 uint32_t params_shm_offset
;
4441 static_assert(sizeof(GetInteger64v
) == 16,
4442 "size of GetInteger64v should be 16");
4443 static_assert(offsetof(GetInteger64v
, header
) == 0,
4444 "offset of GetInteger64v header should be 0");
4445 static_assert(offsetof(GetInteger64v
, pname
) == 4,
4446 "offset of GetInteger64v pname should be 4");
4447 static_assert(offsetof(GetInteger64v
, params_shm_id
) == 8,
4448 "offset of GetInteger64v params_shm_id should be 8");
4449 static_assert(offsetof(GetInteger64v
, params_shm_offset
) == 12,
4450 "offset of GetInteger64v params_shm_offset should be 12");
4452 struct GetIntegeri_v
{
4453 typedef GetIntegeri_v ValueType
;
4454 static const CommandId kCmdId
= kGetIntegeri_v
;
4455 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4456 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4458 typedef SizedResult
<GLint
> Result
;
4460 static uint32_t ComputeSize() {
4461 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4464 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4466 void Init(GLenum _pname
,
4468 uint32_t _data_shm_id
,
4469 uint32_t _data_shm_offset
) {
4473 data_shm_id
= _data_shm_id
;
4474 data_shm_offset
= _data_shm_offset
;
4477 void* Set(void* cmd
,
4480 uint32_t _data_shm_id
,
4481 uint32_t _data_shm_offset
) {
4482 static_cast<ValueType
*>(cmd
)
4483 ->Init(_pname
, _index
, _data_shm_id
, _data_shm_offset
);
4484 return NextCmdAddress
<ValueType
>(cmd
);
4487 gpu::CommandHeader header
;
4490 uint32_t data_shm_id
;
4491 uint32_t data_shm_offset
;
4494 static_assert(sizeof(GetIntegeri_v
) == 20,
4495 "size of GetIntegeri_v should be 20");
4496 static_assert(offsetof(GetIntegeri_v
, header
) == 0,
4497 "offset of GetIntegeri_v header should be 0");
4498 static_assert(offsetof(GetIntegeri_v
, pname
) == 4,
4499 "offset of GetIntegeri_v pname should be 4");
4500 static_assert(offsetof(GetIntegeri_v
, index
) == 8,
4501 "offset of GetIntegeri_v index should be 8");
4502 static_assert(offsetof(GetIntegeri_v
, data_shm_id
) == 12,
4503 "offset of GetIntegeri_v data_shm_id should be 12");
4504 static_assert(offsetof(GetIntegeri_v
, data_shm_offset
) == 16,
4505 "offset of GetIntegeri_v data_shm_offset should be 16");
4507 struct GetInteger64i_v
{
4508 typedef GetInteger64i_v ValueType
;
4509 static const CommandId kCmdId
= kGetInteger64i_v
;
4510 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4511 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4513 typedef SizedResult
<GLint64
> Result
;
4515 static uint32_t ComputeSize() {
4516 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4519 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4521 void Init(GLenum _pname
,
4523 uint32_t _data_shm_id
,
4524 uint32_t _data_shm_offset
) {
4528 data_shm_id
= _data_shm_id
;
4529 data_shm_offset
= _data_shm_offset
;
4532 void* Set(void* cmd
,
4535 uint32_t _data_shm_id
,
4536 uint32_t _data_shm_offset
) {
4537 static_cast<ValueType
*>(cmd
)
4538 ->Init(_pname
, _index
, _data_shm_id
, _data_shm_offset
);
4539 return NextCmdAddress
<ValueType
>(cmd
);
4542 gpu::CommandHeader header
;
4545 uint32_t data_shm_id
;
4546 uint32_t data_shm_offset
;
4549 static_assert(sizeof(GetInteger64i_v
) == 20,
4550 "size of GetInteger64i_v should be 20");
4551 static_assert(offsetof(GetInteger64i_v
, header
) == 0,
4552 "offset of GetInteger64i_v header should be 0");
4553 static_assert(offsetof(GetInteger64i_v
, pname
) == 4,
4554 "offset of GetInteger64i_v pname should be 4");
4555 static_assert(offsetof(GetInteger64i_v
, index
) == 8,
4556 "offset of GetInteger64i_v index should be 8");
4557 static_assert(offsetof(GetInteger64i_v
, data_shm_id
) == 12,
4558 "offset of GetInteger64i_v data_shm_id should be 12");
4559 static_assert(offsetof(GetInteger64i_v
, data_shm_offset
) == 16,
4560 "offset of GetInteger64i_v data_shm_offset should be 16");
4562 struct GetIntegerv
{
4563 typedef GetIntegerv ValueType
;
4564 static const CommandId kCmdId
= kGetIntegerv
;
4565 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4566 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4568 typedef SizedResult
<GLint
> Result
;
4570 static uint32_t ComputeSize() {
4571 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4574 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4576 void Init(GLenum _pname
,
4577 uint32_t _params_shm_id
,
4578 uint32_t _params_shm_offset
) {
4581 params_shm_id
= _params_shm_id
;
4582 params_shm_offset
= _params_shm_offset
;
4585 void* Set(void* cmd
,
4587 uint32_t _params_shm_id
,
4588 uint32_t _params_shm_offset
) {
4589 static_cast<ValueType
*>(cmd
)
4590 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
4591 return NextCmdAddress
<ValueType
>(cmd
);
4594 gpu::CommandHeader header
;
4596 uint32_t params_shm_id
;
4597 uint32_t params_shm_offset
;
4600 static_assert(sizeof(GetIntegerv
) == 16, "size of GetIntegerv should be 16");
4601 static_assert(offsetof(GetIntegerv
, header
) == 0,
4602 "offset of GetIntegerv header should be 0");
4603 static_assert(offsetof(GetIntegerv
, pname
) == 4,
4604 "offset of GetIntegerv pname should be 4");
4605 static_assert(offsetof(GetIntegerv
, params_shm_id
) == 8,
4606 "offset of GetIntegerv params_shm_id should be 8");
4607 static_assert(offsetof(GetIntegerv
, params_shm_offset
) == 12,
4608 "offset of GetIntegerv params_shm_offset should be 12");
4610 struct GetInternalformativ
{
4611 typedef GetInternalformativ ValueType
;
4612 static const CommandId kCmdId
= kGetInternalformativ
;
4613 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4614 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4616 typedef SizedResult
<GLint
> Result
;
4618 static uint32_t ComputeSize() {
4619 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4622 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4624 void Init(GLenum _target
,
4628 uint32_t _params_shm_id
,
4629 uint32_t _params_shm_offset
) {
4635 params_shm_id
= _params_shm_id
;
4636 params_shm_offset
= _params_shm_offset
;
4639 void* Set(void* cmd
,
4644 uint32_t _params_shm_id
,
4645 uint32_t _params_shm_offset
) {
4646 static_cast<ValueType
*>(cmd
)->Init(_target
, _format
, _pname
, _bufSize
,
4647 _params_shm_id
, _params_shm_offset
);
4648 return NextCmdAddress
<ValueType
>(cmd
);
4651 gpu::CommandHeader header
;
4656 uint32_t params_shm_id
;
4657 uint32_t params_shm_offset
;
4660 static_assert(sizeof(GetInternalformativ
) == 28,
4661 "size of GetInternalformativ should be 28");
4662 static_assert(offsetof(GetInternalformativ
, header
) == 0,
4663 "offset of GetInternalformativ header should be 0");
4664 static_assert(offsetof(GetInternalformativ
, target
) == 4,
4665 "offset of GetInternalformativ target should be 4");
4666 static_assert(offsetof(GetInternalformativ
, format
) == 8,
4667 "offset of GetInternalformativ format should be 8");
4668 static_assert(offsetof(GetInternalformativ
, pname
) == 12,
4669 "offset of GetInternalformativ pname should be 12");
4670 static_assert(offsetof(GetInternalformativ
, bufSize
) == 16,
4671 "offset of GetInternalformativ bufSize should be 16");
4672 static_assert(offsetof(GetInternalformativ
, params_shm_id
) == 20,
4673 "offset of GetInternalformativ params_shm_id should be 20");
4674 static_assert(offsetof(GetInternalformativ
, params_shm_offset
) == 24,
4675 "offset of GetInternalformativ params_shm_offset should be 24");
4677 struct GetProgramiv
{
4678 typedef GetProgramiv ValueType
;
4679 static const CommandId kCmdId
= kGetProgramiv
;
4680 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4681 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4683 typedef SizedResult
<GLint
> Result
;
4685 static uint32_t ComputeSize() {
4686 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4689 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4691 void Init(GLuint _program
,
4693 uint32_t _params_shm_id
,
4694 uint32_t _params_shm_offset
) {
4698 params_shm_id
= _params_shm_id
;
4699 params_shm_offset
= _params_shm_offset
;
4702 void* Set(void* cmd
,
4705 uint32_t _params_shm_id
,
4706 uint32_t _params_shm_offset
) {
4707 static_cast<ValueType
*>(cmd
)
4708 ->Init(_program
, _pname
, _params_shm_id
, _params_shm_offset
);
4709 return NextCmdAddress
<ValueType
>(cmd
);
4712 gpu::CommandHeader header
;
4715 uint32_t params_shm_id
;
4716 uint32_t params_shm_offset
;
4719 static_assert(sizeof(GetProgramiv
) == 20, "size of GetProgramiv should be 20");
4720 static_assert(offsetof(GetProgramiv
, header
) == 0,
4721 "offset of GetProgramiv header should be 0");
4722 static_assert(offsetof(GetProgramiv
, program
) == 4,
4723 "offset of GetProgramiv program should be 4");
4724 static_assert(offsetof(GetProgramiv
, pname
) == 8,
4725 "offset of GetProgramiv pname should be 8");
4726 static_assert(offsetof(GetProgramiv
, params_shm_id
) == 12,
4727 "offset of GetProgramiv params_shm_id should be 12");
4728 static_assert(offsetof(GetProgramiv
, params_shm_offset
) == 16,
4729 "offset of GetProgramiv params_shm_offset should be 16");
4731 struct GetProgramInfoLog
{
4732 typedef GetProgramInfoLog ValueType
;
4733 static const CommandId kCmdId
= kGetProgramInfoLog
;
4734 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4735 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4737 static uint32_t ComputeSize() {
4738 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4741 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4743 void Init(GLuint _program
, uint32_t _bucket_id
) {
4746 bucket_id
= _bucket_id
;
4749 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
4750 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
4751 return NextCmdAddress
<ValueType
>(cmd
);
4754 gpu::CommandHeader header
;
4759 static_assert(sizeof(GetProgramInfoLog
) == 12,
4760 "size of GetProgramInfoLog should be 12");
4761 static_assert(offsetof(GetProgramInfoLog
, header
) == 0,
4762 "offset of GetProgramInfoLog header should be 0");
4763 static_assert(offsetof(GetProgramInfoLog
, program
) == 4,
4764 "offset of GetProgramInfoLog program should be 4");
4765 static_assert(offsetof(GetProgramInfoLog
, bucket_id
) == 8,
4766 "offset of GetProgramInfoLog bucket_id should be 8");
4768 struct GetRenderbufferParameteriv
{
4769 typedef GetRenderbufferParameteriv ValueType
;
4770 static const CommandId kCmdId
= kGetRenderbufferParameteriv
;
4771 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4772 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4774 typedef SizedResult
<GLint
> Result
;
4776 static uint32_t ComputeSize() {
4777 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4780 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4782 void Init(GLenum _target
,
4784 uint32_t _params_shm_id
,
4785 uint32_t _params_shm_offset
) {
4789 params_shm_id
= _params_shm_id
;
4790 params_shm_offset
= _params_shm_offset
;
4793 void* Set(void* cmd
,
4796 uint32_t _params_shm_id
,
4797 uint32_t _params_shm_offset
) {
4798 static_cast<ValueType
*>(cmd
)
4799 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
4800 return NextCmdAddress
<ValueType
>(cmd
);
4803 gpu::CommandHeader header
;
4806 uint32_t params_shm_id
;
4807 uint32_t params_shm_offset
;
4810 static_assert(sizeof(GetRenderbufferParameteriv
) == 20,
4811 "size of GetRenderbufferParameteriv should be 20");
4812 static_assert(offsetof(GetRenderbufferParameteriv
, header
) == 0,
4813 "offset of GetRenderbufferParameteriv header should be 0");
4814 static_assert(offsetof(GetRenderbufferParameteriv
, target
) == 4,
4815 "offset of GetRenderbufferParameteriv target should be 4");
4816 static_assert(offsetof(GetRenderbufferParameteriv
, pname
) == 8,
4817 "offset of GetRenderbufferParameteriv pname should be 8");
4819 offsetof(GetRenderbufferParameteriv
, params_shm_id
) == 12,
4820 "offset of GetRenderbufferParameteriv params_shm_id should be 12");
4822 offsetof(GetRenderbufferParameteriv
, params_shm_offset
) == 16,
4823 "offset of GetRenderbufferParameteriv params_shm_offset should be 16");
4825 struct GetSamplerParameterfv
{
4826 typedef GetSamplerParameterfv ValueType
;
4827 static const CommandId kCmdId
= kGetSamplerParameterfv
;
4828 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4829 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4831 typedef SizedResult
<GLfloat
> Result
;
4833 static uint32_t ComputeSize() {
4834 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4837 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4839 void Init(GLuint _sampler
,
4841 uint32_t _params_shm_id
,
4842 uint32_t _params_shm_offset
) {
4846 params_shm_id
= _params_shm_id
;
4847 params_shm_offset
= _params_shm_offset
;
4850 void* Set(void* cmd
,
4853 uint32_t _params_shm_id
,
4854 uint32_t _params_shm_offset
) {
4855 static_cast<ValueType
*>(cmd
)
4856 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4857 return NextCmdAddress
<ValueType
>(cmd
);
4860 gpu::CommandHeader header
;
4863 uint32_t params_shm_id
;
4864 uint32_t params_shm_offset
;
4867 static_assert(sizeof(GetSamplerParameterfv
) == 20,
4868 "size of GetSamplerParameterfv should be 20");
4869 static_assert(offsetof(GetSamplerParameterfv
, header
) == 0,
4870 "offset of GetSamplerParameterfv header should be 0");
4871 static_assert(offsetof(GetSamplerParameterfv
, sampler
) == 4,
4872 "offset of GetSamplerParameterfv sampler should be 4");
4873 static_assert(offsetof(GetSamplerParameterfv
, pname
) == 8,
4874 "offset of GetSamplerParameterfv pname should be 8");
4875 static_assert(offsetof(GetSamplerParameterfv
, params_shm_id
) == 12,
4876 "offset of GetSamplerParameterfv params_shm_id should be 12");
4877 static_assert(offsetof(GetSamplerParameterfv
, params_shm_offset
) == 16,
4878 "offset of GetSamplerParameterfv params_shm_offset should be 16");
4880 struct GetSamplerParameteriv
{
4881 typedef GetSamplerParameteriv ValueType
;
4882 static const CommandId kCmdId
= kGetSamplerParameteriv
;
4883 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4884 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4886 typedef SizedResult
<GLint
> Result
;
4888 static uint32_t ComputeSize() {
4889 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4892 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4894 void Init(GLuint _sampler
,
4896 uint32_t _params_shm_id
,
4897 uint32_t _params_shm_offset
) {
4901 params_shm_id
= _params_shm_id
;
4902 params_shm_offset
= _params_shm_offset
;
4905 void* Set(void* cmd
,
4908 uint32_t _params_shm_id
,
4909 uint32_t _params_shm_offset
) {
4910 static_cast<ValueType
*>(cmd
)
4911 ->Init(_sampler
, _pname
, _params_shm_id
, _params_shm_offset
);
4912 return NextCmdAddress
<ValueType
>(cmd
);
4915 gpu::CommandHeader header
;
4918 uint32_t params_shm_id
;
4919 uint32_t params_shm_offset
;
4922 static_assert(sizeof(GetSamplerParameteriv
) == 20,
4923 "size of GetSamplerParameteriv should be 20");
4924 static_assert(offsetof(GetSamplerParameteriv
, header
) == 0,
4925 "offset of GetSamplerParameteriv header should be 0");
4926 static_assert(offsetof(GetSamplerParameteriv
, sampler
) == 4,
4927 "offset of GetSamplerParameteriv sampler should be 4");
4928 static_assert(offsetof(GetSamplerParameteriv
, pname
) == 8,
4929 "offset of GetSamplerParameteriv pname should be 8");
4930 static_assert(offsetof(GetSamplerParameteriv
, params_shm_id
) == 12,
4931 "offset of GetSamplerParameteriv params_shm_id should be 12");
4932 static_assert(offsetof(GetSamplerParameteriv
, params_shm_offset
) == 16,
4933 "offset of GetSamplerParameteriv params_shm_offset should be 16");
4935 struct GetShaderiv
{
4936 typedef GetShaderiv ValueType
;
4937 static const CommandId kCmdId
= kGetShaderiv
;
4938 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4939 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4941 typedef SizedResult
<GLint
> Result
;
4943 static uint32_t ComputeSize() {
4944 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4947 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4949 void Init(GLuint _shader
,
4951 uint32_t _params_shm_id
,
4952 uint32_t _params_shm_offset
) {
4956 params_shm_id
= _params_shm_id
;
4957 params_shm_offset
= _params_shm_offset
;
4960 void* Set(void* cmd
,
4963 uint32_t _params_shm_id
,
4964 uint32_t _params_shm_offset
) {
4965 static_cast<ValueType
*>(cmd
)
4966 ->Init(_shader
, _pname
, _params_shm_id
, _params_shm_offset
);
4967 return NextCmdAddress
<ValueType
>(cmd
);
4970 gpu::CommandHeader header
;
4973 uint32_t params_shm_id
;
4974 uint32_t params_shm_offset
;
4977 static_assert(sizeof(GetShaderiv
) == 20, "size of GetShaderiv should be 20");
4978 static_assert(offsetof(GetShaderiv
, header
) == 0,
4979 "offset of GetShaderiv header should be 0");
4980 static_assert(offsetof(GetShaderiv
, shader
) == 4,
4981 "offset of GetShaderiv shader should be 4");
4982 static_assert(offsetof(GetShaderiv
, pname
) == 8,
4983 "offset of GetShaderiv pname should be 8");
4984 static_assert(offsetof(GetShaderiv
, params_shm_id
) == 12,
4985 "offset of GetShaderiv params_shm_id should be 12");
4986 static_assert(offsetof(GetShaderiv
, params_shm_offset
) == 16,
4987 "offset of GetShaderiv params_shm_offset should be 16");
4989 struct GetShaderInfoLog
{
4990 typedef GetShaderInfoLog ValueType
;
4991 static const CommandId kCmdId
= kGetShaderInfoLog
;
4992 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4993 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4995 static uint32_t ComputeSize() {
4996 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4999 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5001 void Init(GLuint _shader
, uint32_t _bucket_id
) {
5004 bucket_id
= _bucket_id
;
5007 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
5008 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
5009 return NextCmdAddress
<ValueType
>(cmd
);
5012 gpu::CommandHeader header
;
5017 static_assert(sizeof(GetShaderInfoLog
) == 12,
5018 "size of GetShaderInfoLog should be 12");
5019 static_assert(offsetof(GetShaderInfoLog
, header
) == 0,
5020 "offset of GetShaderInfoLog header should be 0");
5021 static_assert(offsetof(GetShaderInfoLog
, shader
) == 4,
5022 "offset of GetShaderInfoLog shader should be 4");
5023 static_assert(offsetof(GetShaderInfoLog
, bucket_id
) == 8,
5024 "offset of GetShaderInfoLog bucket_id should be 8");
5026 struct GetShaderPrecisionFormat
{
5027 typedef GetShaderPrecisionFormat ValueType
;
5028 static const CommandId kCmdId
= kGetShaderPrecisionFormat
;
5029 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5030 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5039 static uint32_t ComputeSize() {
5040 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5043 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5045 void Init(GLenum _shadertype
,
5046 GLenum _precisiontype
,
5047 uint32_t _result_shm_id
,
5048 uint32_t _result_shm_offset
) {
5050 shadertype
= _shadertype
;
5051 precisiontype
= _precisiontype
;
5052 result_shm_id
= _result_shm_id
;
5053 result_shm_offset
= _result_shm_offset
;
5056 void* Set(void* cmd
,
5058 GLenum _precisiontype
,
5059 uint32_t _result_shm_id
,
5060 uint32_t _result_shm_offset
) {
5061 static_cast<ValueType
*>(cmd
)
5062 ->Init(_shadertype
, _precisiontype
, _result_shm_id
, _result_shm_offset
);
5063 return NextCmdAddress
<ValueType
>(cmd
);
5066 gpu::CommandHeader header
;
5067 uint32_t shadertype
;
5068 uint32_t precisiontype
;
5069 uint32_t result_shm_id
;
5070 uint32_t result_shm_offset
;
5073 static_assert(sizeof(GetShaderPrecisionFormat
) == 20,
5074 "size of GetShaderPrecisionFormat should be 20");
5075 static_assert(offsetof(GetShaderPrecisionFormat
, header
) == 0,
5076 "offset of GetShaderPrecisionFormat header should be 0");
5077 static_assert(offsetof(GetShaderPrecisionFormat
, shadertype
) == 4,
5078 "offset of GetShaderPrecisionFormat shadertype should be 4");
5079 static_assert(offsetof(GetShaderPrecisionFormat
, precisiontype
) == 8,
5080 "offset of GetShaderPrecisionFormat precisiontype should be 8");
5081 static_assert(offsetof(GetShaderPrecisionFormat
, result_shm_id
) == 12,
5082 "offset of GetShaderPrecisionFormat result_shm_id should be 12");
5084 offsetof(GetShaderPrecisionFormat
, result_shm_offset
) == 16,
5085 "offset of GetShaderPrecisionFormat result_shm_offset should be 16");
5086 static_assert(offsetof(GetShaderPrecisionFormat::Result
, success
) == 0,
5087 "offset of GetShaderPrecisionFormat Result success should be "
5089 static_assert(offsetof(GetShaderPrecisionFormat::Result
, min_range
) == 4,
5090 "offset of GetShaderPrecisionFormat Result min_range should be "
5092 static_assert(offsetof(GetShaderPrecisionFormat::Result
, max_range
) == 8,
5093 "offset of GetShaderPrecisionFormat Result max_range should be "
5095 static_assert(offsetof(GetShaderPrecisionFormat::Result
, precision
) == 12,
5096 "offset of GetShaderPrecisionFormat Result precision should be "
5099 struct GetShaderSource
{
5100 typedef GetShaderSource ValueType
;
5101 static const CommandId kCmdId
= kGetShaderSource
;
5102 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5103 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5105 static uint32_t ComputeSize() {
5106 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5109 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5111 void Init(GLuint _shader
, uint32_t _bucket_id
) {
5114 bucket_id
= _bucket_id
;
5117 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
5118 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
5119 return NextCmdAddress
<ValueType
>(cmd
);
5122 gpu::CommandHeader header
;
5127 static_assert(sizeof(GetShaderSource
) == 12,
5128 "size of GetShaderSource should be 12");
5129 static_assert(offsetof(GetShaderSource
, header
) == 0,
5130 "offset of GetShaderSource header should be 0");
5131 static_assert(offsetof(GetShaderSource
, shader
) == 4,
5132 "offset of GetShaderSource shader should be 4");
5133 static_assert(offsetof(GetShaderSource
, bucket_id
) == 8,
5134 "offset of GetShaderSource bucket_id should be 8");
5137 typedef GetString ValueType
;
5138 static const CommandId kCmdId
= kGetString
;
5139 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5140 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5142 static uint32_t ComputeSize() {
5143 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5146 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5148 void Init(GLenum _name
, uint32_t _bucket_id
) {
5151 bucket_id
= _bucket_id
;
5154 void* Set(void* cmd
, GLenum _name
, uint32_t _bucket_id
) {
5155 static_cast<ValueType
*>(cmd
)->Init(_name
, _bucket_id
);
5156 return NextCmdAddress
<ValueType
>(cmd
);
5159 gpu::CommandHeader header
;
5164 static_assert(sizeof(GetString
) == 12, "size of GetString should be 12");
5165 static_assert(offsetof(GetString
, header
) == 0,
5166 "offset of GetString header should be 0");
5167 static_assert(offsetof(GetString
, name
) == 4,
5168 "offset of GetString name should be 4");
5169 static_assert(offsetof(GetString
, bucket_id
) == 8,
5170 "offset of GetString bucket_id should be 8");
5173 typedef GetSynciv ValueType
;
5174 static const CommandId kCmdId
= kGetSynciv
;
5175 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5176 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5178 typedef SizedResult
<GLint
> Result
;
5180 static uint32_t ComputeSize() {
5181 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5184 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5186 void Init(GLuint _sync
,
5188 uint32_t _values_shm_id
,
5189 uint32_t _values_shm_offset
) {
5193 values_shm_id
= _values_shm_id
;
5194 values_shm_offset
= _values_shm_offset
;
5197 void* Set(void* cmd
,
5200 uint32_t _values_shm_id
,
5201 uint32_t _values_shm_offset
) {
5202 static_cast<ValueType
*>(cmd
)
5203 ->Init(_sync
, _pname
, _values_shm_id
, _values_shm_offset
);
5204 return NextCmdAddress
<ValueType
>(cmd
);
5207 gpu::CommandHeader header
;
5210 uint32_t values_shm_id
;
5211 uint32_t values_shm_offset
;
5214 static_assert(sizeof(GetSynciv
) == 20, "size of GetSynciv should be 20");
5215 static_assert(offsetof(GetSynciv
, header
) == 0,
5216 "offset of GetSynciv header should be 0");
5217 static_assert(offsetof(GetSynciv
, sync
) == 4,
5218 "offset of GetSynciv sync should be 4");
5219 static_assert(offsetof(GetSynciv
, pname
) == 8,
5220 "offset of GetSynciv pname should be 8");
5221 static_assert(offsetof(GetSynciv
, values_shm_id
) == 12,
5222 "offset of GetSynciv values_shm_id should be 12");
5223 static_assert(offsetof(GetSynciv
, values_shm_offset
) == 16,
5224 "offset of GetSynciv values_shm_offset should be 16");
5226 struct GetTexParameterfv
{
5227 typedef GetTexParameterfv ValueType
;
5228 static const CommandId kCmdId
= kGetTexParameterfv
;
5229 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5230 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5232 typedef SizedResult
<GLfloat
> Result
;
5234 static uint32_t ComputeSize() {
5235 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5238 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5240 void Init(GLenum _target
,
5242 uint32_t _params_shm_id
,
5243 uint32_t _params_shm_offset
) {
5247 params_shm_id
= _params_shm_id
;
5248 params_shm_offset
= _params_shm_offset
;
5251 void* Set(void* cmd
,
5254 uint32_t _params_shm_id
,
5255 uint32_t _params_shm_offset
) {
5256 static_cast<ValueType
*>(cmd
)
5257 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
5258 return NextCmdAddress
<ValueType
>(cmd
);
5261 gpu::CommandHeader header
;
5264 uint32_t params_shm_id
;
5265 uint32_t params_shm_offset
;
5268 static_assert(sizeof(GetTexParameterfv
) == 20,
5269 "size of GetTexParameterfv should be 20");
5270 static_assert(offsetof(GetTexParameterfv
, header
) == 0,
5271 "offset of GetTexParameterfv header should be 0");
5272 static_assert(offsetof(GetTexParameterfv
, target
) == 4,
5273 "offset of GetTexParameterfv target should be 4");
5274 static_assert(offsetof(GetTexParameterfv
, pname
) == 8,
5275 "offset of GetTexParameterfv pname should be 8");
5276 static_assert(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
5277 "offset of GetTexParameterfv params_shm_id should be 12");
5278 static_assert(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
5279 "offset of GetTexParameterfv params_shm_offset should be 16");
5281 struct GetTexParameteriv
{
5282 typedef GetTexParameteriv ValueType
;
5283 static const CommandId kCmdId
= kGetTexParameteriv
;
5284 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5285 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5287 typedef SizedResult
<GLint
> Result
;
5289 static uint32_t ComputeSize() {
5290 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5293 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5295 void Init(GLenum _target
,
5297 uint32_t _params_shm_id
,
5298 uint32_t _params_shm_offset
) {
5302 params_shm_id
= _params_shm_id
;
5303 params_shm_offset
= _params_shm_offset
;
5306 void* Set(void* cmd
,
5309 uint32_t _params_shm_id
,
5310 uint32_t _params_shm_offset
) {
5311 static_cast<ValueType
*>(cmd
)
5312 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
5313 return NextCmdAddress
<ValueType
>(cmd
);
5316 gpu::CommandHeader header
;
5319 uint32_t params_shm_id
;
5320 uint32_t params_shm_offset
;
5323 static_assert(sizeof(GetTexParameteriv
) == 20,
5324 "size of GetTexParameteriv should be 20");
5325 static_assert(offsetof(GetTexParameteriv
, header
) == 0,
5326 "offset of GetTexParameteriv header should be 0");
5327 static_assert(offsetof(GetTexParameteriv
, target
) == 4,
5328 "offset of GetTexParameteriv target should be 4");
5329 static_assert(offsetof(GetTexParameteriv
, pname
) == 8,
5330 "offset of GetTexParameteriv pname should be 8");
5331 static_assert(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
5332 "offset of GetTexParameteriv params_shm_id should be 12");
5333 static_assert(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
5334 "offset of GetTexParameteriv params_shm_offset should be 16");
5336 struct GetTransformFeedbackVarying
{
5337 typedef GetTransformFeedbackVarying ValueType
;
5338 static const CommandId kCmdId
= kGetTransformFeedbackVarying
;
5339 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5340 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5348 static uint32_t ComputeSize() {
5349 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5352 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5354 void Init(GLuint _program
,
5356 uint32_t _name_bucket_id
,
5357 uint32_t _result_shm_id
,
5358 uint32_t _result_shm_offset
) {
5362 name_bucket_id
= _name_bucket_id
;
5363 result_shm_id
= _result_shm_id
;
5364 result_shm_offset
= _result_shm_offset
;
5367 void* Set(void* cmd
,
5370 uint32_t _name_bucket_id
,
5371 uint32_t _result_shm_id
,
5372 uint32_t _result_shm_offset
) {
5373 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
5374 _result_shm_id
, _result_shm_offset
);
5375 return NextCmdAddress
<ValueType
>(cmd
);
5378 gpu::CommandHeader header
;
5381 uint32_t name_bucket_id
;
5382 uint32_t result_shm_id
;
5383 uint32_t result_shm_offset
;
5386 static_assert(sizeof(GetTransformFeedbackVarying
) == 24,
5387 "size of GetTransformFeedbackVarying should be 24");
5388 static_assert(offsetof(GetTransformFeedbackVarying
, header
) == 0,
5389 "offset of GetTransformFeedbackVarying header should be 0");
5390 static_assert(offsetof(GetTransformFeedbackVarying
, program
) == 4,
5391 "offset of GetTransformFeedbackVarying program should be 4");
5392 static_assert(offsetof(GetTransformFeedbackVarying
, index
) == 8,
5393 "offset of GetTransformFeedbackVarying index should be 8");
5395 offsetof(GetTransformFeedbackVarying
, name_bucket_id
) == 12,
5396 "offset of GetTransformFeedbackVarying name_bucket_id should be 12");
5398 offsetof(GetTransformFeedbackVarying
, result_shm_id
) == 16,
5399 "offset of GetTransformFeedbackVarying result_shm_id should be 16");
5401 offsetof(GetTransformFeedbackVarying
, result_shm_offset
) == 20,
5402 "offset of GetTransformFeedbackVarying result_shm_offset should be 20");
5403 static_assert(offsetof(GetTransformFeedbackVarying::Result
, success
) == 0,
5404 "offset of GetTransformFeedbackVarying Result success should be "
5406 static_assert(offsetof(GetTransformFeedbackVarying::Result
, size
) == 4,
5407 "offset of GetTransformFeedbackVarying Result size should be "
5409 static_assert(offsetof(GetTransformFeedbackVarying::Result
, type
) == 8,
5410 "offset of GetTransformFeedbackVarying Result type should be "
5413 struct GetUniformBlockIndex
{
5414 typedef GetUniformBlockIndex ValueType
;
5415 static const CommandId kCmdId
= kGetUniformBlockIndex
;
5416 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5417 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5419 typedef GLuint Result
;
5421 static uint32_t ComputeSize() {
5422 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5425 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5427 void Init(GLuint _program
,
5428 uint32_t _name_bucket_id
,
5429 uint32_t _index_shm_id
,
5430 uint32_t _index_shm_offset
) {
5433 name_bucket_id
= _name_bucket_id
;
5434 index_shm_id
= _index_shm_id
;
5435 index_shm_offset
= _index_shm_offset
;
5438 void* Set(void* cmd
,
5440 uint32_t _name_bucket_id
,
5441 uint32_t _index_shm_id
,
5442 uint32_t _index_shm_offset
) {
5443 static_cast<ValueType
*>(cmd
)
5444 ->Init(_program
, _name_bucket_id
, _index_shm_id
, _index_shm_offset
);
5445 return NextCmdAddress
<ValueType
>(cmd
);
5448 gpu::CommandHeader header
;
5450 uint32_t name_bucket_id
;
5451 uint32_t index_shm_id
;
5452 uint32_t index_shm_offset
;
5455 static_assert(sizeof(GetUniformBlockIndex
) == 20,
5456 "size of GetUniformBlockIndex should be 20");
5457 static_assert(offsetof(GetUniformBlockIndex
, header
) == 0,
5458 "offset of GetUniformBlockIndex header should be 0");
5459 static_assert(offsetof(GetUniformBlockIndex
, program
) == 4,
5460 "offset of GetUniformBlockIndex program should be 4");
5461 static_assert(offsetof(GetUniformBlockIndex
, name_bucket_id
) == 8,
5462 "offset of GetUniformBlockIndex name_bucket_id should be 8");
5463 static_assert(offsetof(GetUniformBlockIndex
, index_shm_id
) == 12,
5464 "offset of GetUniformBlockIndex index_shm_id should be 12");
5465 static_assert(offsetof(GetUniformBlockIndex
, index_shm_offset
) == 16,
5466 "offset of GetUniformBlockIndex index_shm_offset should be 16");
5468 struct GetUniformfv
{
5469 typedef GetUniformfv ValueType
;
5470 static const CommandId kCmdId
= kGetUniformfv
;
5471 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5472 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5474 typedef SizedResult
<GLfloat
> Result
;
5476 static uint32_t ComputeSize() {
5477 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5480 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5482 void Init(GLuint _program
,
5484 uint32_t _params_shm_id
,
5485 uint32_t _params_shm_offset
) {
5488 location
= _location
;
5489 params_shm_id
= _params_shm_id
;
5490 params_shm_offset
= _params_shm_offset
;
5493 void* Set(void* cmd
,
5496 uint32_t _params_shm_id
,
5497 uint32_t _params_shm_offset
) {
5498 static_cast<ValueType
*>(cmd
)
5499 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5500 return NextCmdAddress
<ValueType
>(cmd
);
5503 gpu::CommandHeader header
;
5506 uint32_t params_shm_id
;
5507 uint32_t params_shm_offset
;
5510 static_assert(sizeof(GetUniformfv
) == 20, "size of GetUniformfv should be 20");
5511 static_assert(offsetof(GetUniformfv
, header
) == 0,
5512 "offset of GetUniformfv header should be 0");
5513 static_assert(offsetof(GetUniformfv
, program
) == 4,
5514 "offset of GetUniformfv program should be 4");
5515 static_assert(offsetof(GetUniformfv
, location
) == 8,
5516 "offset of GetUniformfv location should be 8");
5517 static_assert(offsetof(GetUniformfv
, params_shm_id
) == 12,
5518 "offset of GetUniformfv params_shm_id should be 12");
5519 static_assert(offsetof(GetUniformfv
, params_shm_offset
) == 16,
5520 "offset of GetUniformfv params_shm_offset should be 16");
5522 struct GetUniformiv
{
5523 typedef GetUniformiv ValueType
;
5524 static const CommandId kCmdId
= kGetUniformiv
;
5525 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5526 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5528 typedef SizedResult
<GLint
> Result
;
5530 static uint32_t ComputeSize() {
5531 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5534 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5536 void Init(GLuint _program
,
5538 uint32_t _params_shm_id
,
5539 uint32_t _params_shm_offset
) {
5542 location
= _location
;
5543 params_shm_id
= _params_shm_id
;
5544 params_shm_offset
= _params_shm_offset
;
5547 void* Set(void* cmd
,
5550 uint32_t _params_shm_id
,
5551 uint32_t _params_shm_offset
) {
5552 static_cast<ValueType
*>(cmd
)
5553 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5554 return NextCmdAddress
<ValueType
>(cmd
);
5557 gpu::CommandHeader header
;
5560 uint32_t params_shm_id
;
5561 uint32_t params_shm_offset
;
5564 static_assert(sizeof(GetUniformiv
) == 20, "size of GetUniformiv should be 20");
5565 static_assert(offsetof(GetUniformiv
, header
) == 0,
5566 "offset of GetUniformiv header should be 0");
5567 static_assert(offsetof(GetUniformiv
, program
) == 4,
5568 "offset of GetUniformiv program should be 4");
5569 static_assert(offsetof(GetUniformiv
, location
) == 8,
5570 "offset of GetUniformiv location should be 8");
5571 static_assert(offsetof(GetUniformiv
, params_shm_id
) == 12,
5572 "offset of GetUniformiv params_shm_id should be 12");
5573 static_assert(offsetof(GetUniformiv
, params_shm_offset
) == 16,
5574 "offset of GetUniformiv params_shm_offset should be 16");
5576 struct GetUniformuiv
{
5577 typedef GetUniformuiv ValueType
;
5578 static const CommandId kCmdId
= kGetUniformuiv
;
5579 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5580 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5582 typedef SizedResult
<GLuint
> Result
;
5584 static uint32_t ComputeSize() {
5585 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5588 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5590 void Init(GLuint _program
,
5592 uint32_t _params_shm_id
,
5593 uint32_t _params_shm_offset
) {
5596 location
= _location
;
5597 params_shm_id
= _params_shm_id
;
5598 params_shm_offset
= _params_shm_offset
;
5601 void* Set(void* cmd
,
5604 uint32_t _params_shm_id
,
5605 uint32_t _params_shm_offset
) {
5606 static_cast<ValueType
*>(cmd
)
5607 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
5608 return NextCmdAddress
<ValueType
>(cmd
);
5611 gpu::CommandHeader header
;
5614 uint32_t params_shm_id
;
5615 uint32_t params_shm_offset
;
5618 static_assert(sizeof(GetUniformuiv
) == 20,
5619 "size of GetUniformuiv should be 20");
5620 static_assert(offsetof(GetUniformuiv
, header
) == 0,
5621 "offset of GetUniformuiv header should be 0");
5622 static_assert(offsetof(GetUniformuiv
, program
) == 4,
5623 "offset of GetUniformuiv program should be 4");
5624 static_assert(offsetof(GetUniformuiv
, location
) == 8,
5625 "offset of GetUniformuiv location should be 8");
5626 static_assert(offsetof(GetUniformuiv
, params_shm_id
) == 12,
5627 "offset of GetUniformuiv params_shm_id should be 12");
5628 static_assert(offsetof(GetUniformuiv
, params_shm_offset
) == 16,
5629 "offset of GetUniformuiv params_shm_offset should be 16");
5631 struct GetUniformIndices
{
5632 typedef GetUniformIndices ValueType
;
5633 static const CommandId kCmdId
= kGetUniformIndices
;
5634 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5635 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5637 typedef SizedResult
<GLuint
> Result
;
5639 static uint32_t ComputeSize() {
5640 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5643 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5645 void Init(GLuint _program
,
5646 uint32_t _names_bucket_id
,
5647 uint32_t _indices_shm_id
,
5648 uint32_t _indices_shm_offset
) {
5651 names_bucket_id
= _names_bucket_id
;
5652 indices_shm_id
= _indices_shm_id
;
5653 indices_shm_offset
= _indices_shm_offset
;
5656 void* Set(void* cmd
,
5658 uint32_t _names_bucket_id
,
5659 uint32_t _indices_shm_id
,
5660 uint32_t _indices_shm_offset
) {
5661 static_cast<ValueType
*>(cmd
)->Init(_program
, _names_bucket_id
,
5662 _indices_shm_id
, _indices_shm_offset
);
5663 return NextCmdAddress
<ValueType
>(cmd
);
5666 gpu::CommandHeader header
;
5668 uint32_t names_bucket_id
;
5669 uint32_t indices_shm_id
;
5670 uint32_t indices_shm_offset
;
5673 static_assert(sizeof(GetUniformIndices
) == 20,
5674 "size of GetUniformIndices should be 20");
5675 static_assert(offsetof(GetUniformIndices
, header
) == 0,
5676 "offset of GetUniformIndices header should be 0");
5677 static_assert(offsetof(GetUniformIndices
, program
) == 4,
5678 "offset of GetUniformIndices program should be 4");
5679 static_assert(offsetof(GetUniformIndices
, names_bucket_id
) == 8,
5680 "offset of GetUniformIndices names_bucket_id should be 8");
5681 static_assert(offsetof(GetUniformIndices
, indices_shm_id
) == 12,
5682 "offset of GetUniformIndices indices_shm_id should be 12");
5683 static_assert(offsetof(GetUniformIndices
, indices_shm_offset
) == 16,
5684 "offset of GetUniformIndices indices_shm_offset should be 16");
5686 struct GetUniformLocation
{
5687 typedef GetUniformLocation ValueType
;
5688 static const CommandId kCmdId
= kGetUniformLocation
;
5689 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5690 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5692 typedef GLint Result
;
5694 static uint32_t ComputeSize() {
5695 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5698 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5700 void Init(GLuint _program
,
5701 uint32_t _name_bucket_id
,
5702 uint32_t _location_shm_id
,
5703 uint32_t _location_shm_offset
) {
5706 name_bucket_id
= _name_bucket_id
;
5707 location_shm_id
= _location_shm_id
;
5708 location_shm_offset
= _location_shm_offset
;
5711 void* Set(void* cmd
,
5713 uint32_t _name_bucket_id
,
5714 uint32_t _location_shm_id
,
5715 uint32_t _location_shm_offset
) {
5716 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
5717 _location_shm_id
, _location_shm_offset
);
5718 return NextCmdAddress
<ValueType
>(cmd
);
5721 gpu::CommandHeader header
;
5723 uint32_t name_bucket_id
;
5724 uint32_t location_shm_id
;
5725 uint32_t location_shm_offset
;
5728 static_assert(sizeof(GetUniformLocation
) == 20,
5729 "size of GetUniformLocation should be 20");
5730 static_assert(offsetof(GetUniformLocation
, header
) == 0,
5731 "offset of GetUniformLocation header should be 0");
5732 static_assert(offsetof(GetUniformLocation
, program
) == 4,
5733 "offset of GetUniformLocation program should be 4");
5734 static_assert(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
5735 "offset of GetUniformLocation name_bucket_id should be 8");
5736 static_assert(offsetof(GetUniformLocation
, location_shm_id
) == 12,
5737 "offset of GetUniformLocation location_shm_id should be 12");
5738 static_assert(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
5739 "offset of GetUniformLocation location_shm_offset should be 16");
5741 struct GetVertexAttribfv
{
5742 typedef GetVertexAttribfv ValueType
;
5743 static const CommandId kCmdId
= kGetVertexAttribfv
;
5744 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5745 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5747 typedef SizedResult
<GLfloat
> Result
;
5749 static uint32_t ComputeSize() {
5750 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5753 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5755 void Init(GLuint _index
,
5757 uint32_t _params_shm_id
,
5758 uint32_t _params_shm_offset
) {
5762 params_shm_id
= _params_shm_id
;
5763 params_shm_offset
= _params_shm_offset
;
5766 void* Set(void* cmd
,
5769 uint32_t _params_shm_id
,
5770 uint32_t _params_shm_offset
) {
5771 static_cast<ValueType
*>(cmd
)
5772 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5773 return NextCmdAddress
<ValueType
>(cmd
);
5776 gpu::CommandHeader header
;
5779 uint32_t params_shm_id
;
5780 uint32_t params_shm_offset
;
5783 static_assert(sizeof(GetVertexAttribfv
) == 20,
5784 "size of GetVertexAttribfv should be 20");
5785 static_assert(offsetof(GetVertexAttribfv
, header
) == 0,
5786 "offset of GetVertexAttribfv header should be 0");
5787 static_assert(offsetof(GetVertexAttribfv
, index
) == 4,
5788 "offset of GetVertexAttribfv index should be 4");
5789 static_assert(offsetof(GetVertexAttribfv
, pname
) == 8,
5790 "offset of GetVertexAttribfv pname should be 8");
5791 static_assert(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
5792 "offset of GetVertexAttribfv params_shm_id should be 12");
5793 static_assert(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
5794 "offset of GetVertexAttribfv params_shm_offset should be 16");
5796 struct GetVertexAttribiv
{
5797 typedef GetVertexAttribiv ValueType
;
5798 static const CommandId kCmdId
= kGetVertexAttribiv
;
5799 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5800 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5802 typedef SizedResult
<GLint
> Result
;
5804 static uint32_t ComputeSize() {
5805 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5808 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5810 void Init(GLuint _index
,
5812 uint32_t _params_shm_id
,
5813 uint32_t _params_shm_offset
) {
5817 params_shm_id
= _params_shm_id
;
5818 params_shm_offset
= _params_shm_offset
;
5821 void* Set(void* cmd
,
5824 uint32_t _params_shm_id
,
5825 uint32_t _params_shm_offset
) {
5826 static_cast<ValueType
*>(cmd
)
5827 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5828 return NextCmdAddress
<ValueType
>(cmd
);
5831 gpu::CommandHeader header
;
5834 uint32_t params_shm_id
;
5835 uint32_t params_shm_offset
;
5838 static_assert(sizeof(GetVertexAttribiv
) == 20,
5839 "size of GetVertexAttribiv should be 20");
5840 static_assert(offsetof(GetVertexAttribiv
, header
) == 0,
5841 "offset of GetVertexAttribiv header should be 0");
5842 static_assert(offsetof(GetVertexAttribiv
, index
) == 4,
5843 "offset of GetVertexAttribiv index should be 4");
5844 static_assert(offsetof(GetVertexAttribiv
, pname
) == 8,
5845 "offset of GetVertexAttribiv pname should be 8");
5846 static_assert(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
5847 "offset of GetVertexAttribiv params_shm_id should be 12");
5848 static_assert(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
5849 "offset of GetVertexAttribiv params_shm_offset should be 16");
5851 struct GetVertexAttribIiv
{
5852 typedef GetVertexAttribIiv ValueType
;
5853 static const CommandId kCmdId
= kGetVertexAttribIiv
;
5854 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5855 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5857 typedef SizedResult
<GLint
> Result
;
5859 static uint32_t ComputeSize() {
5860 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5863 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5865 void Init(GLuint _index
,
5867 uint32_t _params_shm_id
,
5868 uint32_t _params_shm_offset
) {
5872 params_shm_id
= _params_shm_id
;
5873 params_shm_offset
= _params_shm_offset
;
5876 void* Set(void* cmd
,
5879 uint32_t _params_shm_id
,
5880 uint32_t _params_shm_offset
) {
5881 static_cast<ValueType
*>(cmd
)
5882 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5883 return NextCmdAddress
<ValueType
>(cmd
);
5886 gpu::CommandHeader header
;
5889 uint32_t params_shm_id
;
5890 uint32_t params_shm_offset
;
5893 static_assert(sizeof(GetVertexAttribIiv
) == 20,
5894 "size of GetVertexAttribIiv should be 20");
5895 static_assert(offsetof(GetVertexAttribIiv
, header
) == 0,
5896 "offset of GetVertexAttribIiv header should be 0");
5897 static_assert(offsetof(GetVertexAttribIiv
, index
) == 4,
5898 "offset of GetVertexAttribIiv index should be 4");
5899 static_assert(offsetof(GetVertexAttribIiv
, pname
) == 8,
5900 "offset of GetVertexAttribIiv pname should be 8");
5901 static_assert(offsetof(GetVertexAttribIiv
, params_shm_id
) == 12,
5902 "offset of GetVertexAttribIiv params_shm_id should be 12");
5903 static_assert(offsetof(GetVertexAttribIiv
, params_shm_offset
) == 16,
5904 "offset of GetVertexAttribIiv params_shm_offset should be 16");
5906 struct GetVertexAttribIuiv
{
5907 typedef GetVertexAttribIuiv ValueType
;
5908 static const CommandId kCmdId
= kGetVertexAttribIuiv
;
5909 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5910 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5912 typedef SizedResult
<GLuint
> Result
;
5914 static uint32_t ComputeSize() {
5915 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5918 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5920 void Init(GLuint _index
,
5922 uint32_t _params_shm_id
,
5923 uint32_t _params_shm_offset
) {
5927 params_shm_id
= _params_shm_id
;
5928 params_shm_offset
= _params_shm_offset
;
5931 void* Set(void* cmd
,
5934 uint32_t _params_shm_id
,
5935 uint32_t _params_shm_offset
) {
5936 static_cast<ValueType
*>(cmd
)
5937 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
5938 return NextCmdAddress
<ValueType
>(cmd
);
5941 gpu::CommandHeader header
;
5944 uint32_t params_shm_id
;
5945 uint32_t params_shm_offset
;
5948 static_assert(sizeof(GetVertexAttribIuiv
) == 20,
5949 "size of GetVertexAttribIuiv should be 20");
5950 static_assert(offsetof(GetVertexAttribIuiv
, header
) == 0,
5951 "offset of GetVertexAttribIuiv header should be 0");
5952 static_assert(offsetof(GetVertexAttribIuiv
, index
) == 4,
5953 "offset of GetVertexAttribIuiv index should be 4");
5954 static_assert(offsetof(GetVertexAttribIuiv
, pname
) == 8,
5955 "offset of GetVertexAttribIuiv pname should be 8");
5956 static_assert(offsetof(GetVertexAttribIuiv
, params_shm_id
) == 12,
5957 "offset of GetVertexAttribIuiv params_shm_id should be 12");
5958 static_assert(offsetof(GetVertexAttribIuiv
, params_shm_offset
) == 16,
5959 "offset of GetVertexAttribIuiv params_shm_offset should be 16");
5961 struct GetVertexAttribPointerv
{
5962 typedef GetVertexAttribPointerv ValueType
;
5963 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
5964 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5965 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5967 typedef SizedResult
<GLuint
> Result
;
5969 static uint32_t ComputeSize() {
5970 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5973 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5975 void Init(GLuint _index
,
5977 uint32_t _pointer_shm_id
,
5978 uint32_t _pointer_shm_offset
) {
5982 pointer_shm_id
= _pointer_shm_id
;
5983 pointer_shm_offset
= _pointer_shm_offset
;
5986 void* Set(void* cmd
,
5989 uint32_t _pointer_shm_id
,
5990 uint32_t _pointer_shm_offset
) {
5991 static_cast<ValueType
*>(cmd
)
5992 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
5993 return NextCmdAddress
<ValueType
>(cmd
);
5996 gpu::CommandHeader header
;
5999 uint32_t pointer_shm_id
;
6000 uint32_t pointer_shm_offset
;
6003 static_assert(sizeof(GetVertexAttribPointerv
) == 20,
6004 "size of GetVertexAttribPointerv should be 20");
6005 static_assert(offsetof(GetVertexAttribPointerv
, header
) == 0,
6006 "offset of GetVertexAttribPointerv header should be 0");
6007 static_assert(offsetof(GetVertexAttribPointerv
, index
) == 4,
6008 "offset of GetVertexAttribPointerv index should be 4");
6009 static_assert(offsetof(GetVertexAttribPointerv
, pname
) == 8,
6010 "offset of GetVertexAttribPointerv pname should be 8");
6011 static_assert(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
6012 "offset of GetVertexAttribPointerv pointer_shm_id should be 12");
6014 offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
6015 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16");
6018 typedef Hint ValueType
;
6019 static const CommandId kCmdId
= kHint
;
6020 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6021 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6023 static uint32_t ComputeSize() {
6024 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6027 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6029 void Init(GLenum _target
, GLenum _mode
) {
6035 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
6036 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
6037 return NextCmdAddress
<ValueType
>(cmd
);
6040 gpu::CommandHeader header
;
6045 static_assert(sizeof(Hint
) == 12, "size of Hint should be 12");
6046 static_assert(offsetof(Hint
, header
) == 0, "offset of Hint header should be 0");
6047 static_assert(offsetof(Hint
, target
) == 4, "offset of Hint target should be 4");
6048 static_assert(offsetof(Hint
, mode
) == 8, "offset of Hint mode should be 8");
6050 struct InvalidateFramebufferImmediate
{
6051 typedef InvalidateFramebufferImmediate ValueType
;
6052 static const CommandId kCmdId
= kInvalidateFramebufferImmediate
;
6053 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6054 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6056 static uint32_t ComputeDataSize(GLsizei count
) {
6057 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
6060 static uint32_t ComputeSize(GLsizei count
) {
6061 return static_cast<uint32_t>(sizeof(ValueType
) +
6062 ComputeDataSize(count
)); // NOLINT
6065 void SetHeader(GLsizei count
) {
6066 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
6069 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
6073 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
6076 void* Set(void* cmd
,
6079 const GLenum
* _attachments
) {
6080 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
6081 const uint32_t size
= ComputeSize(_count
);
6082 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6085 gpu::CommandHeader header
;
6090 static_assert(sizeof(InvalidateFramebufferImmediate
) == 12,
6091 "size of InvalidateFramebufferImmediate should be 12");
6092 static_assert(offsetof(InvalidateFramebufferImmediate
, header
) == 0,
6093 "offset of InvalidateFramebufferImmediate header should be 0");
6094 static_assert(offsetof(InvalidateFramebufferImmediate
, target
) == 4,
6095 "offset of InvalidateFramebufferImmediate target should be 4");
6096 static_assert(offsetof(InvalidateFramebufferImmediate
, count
) == 8,
6097 "offset of InvalidateFramebufferImmediate count should be 8");
6099 struct InvalidateSubFramebufferImmediate
{
6100 typedef InvalidateSubFramebufferImmediate ValueType
;
6101 static const CommandId kCmdId
= kInvalidateSubFramebufferImmediate
;
6102 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6103 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6105 static uint32_t ComputeDataSize(GLsizei count
) {
6106 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
6109 static uint32_t ComputeSize(GLsizei count
) {
6110 return static_cast<uint32_t>(sizeof(ValueType
) +
6111 ComputeDataSize(count
)); // NOLINT
6114 void SetHeader(GLsizei count
) {
6115 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
6118 void Init(GLenum _target
,
6120 const GLenum
* _attachments
,
6132 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
6135 void* Set(void* cmd
,
6138 const GLenum
* _attachments
,
6143 static_cast<ValueType
*>(cmd
)
6144 ->Init(_target
, _count
, _attachments
, _x
, _y
, _width
, _height
);
6145 const uint32_t size
= ComputeSize(_count
);
6146 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6149 gpu::CommandHeader header
;
6158 static_assert(sizeof(InvalidateSubFramebufferImmediate
) == 28,
6159 "size of InvalidateSubFramebufferImmediate should be 28");
6160 static_assert(offsetof(InvalidateSubFramebufferImmediate
, header
) == 0,
6161 "offset of InvalidateSubFramebufferImmediate header should be 0");
6162 static_assert(offsetof(InvalidateSubFramebufferImmediate
, target
) == 4,
6163 "offset of InvalidateSubFramebufferImmediate target should be 4");
6164 static_assert(offsetof(InvalidateSubFramebufferImmediate
, count
) == 8,
6165 "offset of InvalidateSubFramebufferImmediate count should be 8");
6166 static_assert(offsetof(InvalidateSubFramebufferImmediate
, x
) == 12,
6167 "offset of InvalidateSubFramebufferImmediate x should be 12");
6168 static_assert(offsetof(InvalidateSubFramebufferImmediate
, y
) == 16,
6169 "offset of InvalidateSubFramebufferImmediate y should be 16");
6170 static_assert(offsetof(InvalidateSubFramebufferImmediate
, width
) == 20,
6171 "offset of InvalidateSubFramebufferImmediate width should be 20");
6173 offsetof(InvalidateSubFramebufferImmediate
, height
) == 24,
6174 "offset of InvalidateSubFramebufferImmediate height should be 24");
6177 typedef IsBuffer ValueType
;
6178 static const CommandId kCmdId
= kIsBuffer
;
6179 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6180 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6182 typedef uint32_t Result
;
6184 static uint32_t ComputeSize() {
6185 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6188 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6190 void Init(GLuint _buffer
,
6191 uint32_t _result_shm_id
,
6192 uint32_t _result_shm_offset
) {
6195 result_shm_id
= _result_shm_id
;
6196 result_shm_offset
= _result_shm_offset
;
6199 void* Set(void* cmd
,
6201 uint32_t _result_shm_id
,
6202 uint32_t _result_shm_offset
) {
6203 static_cast<ValueType
*>(cmd
)
6204 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
6205 return NextCmdAddress
<ValueType
>(cmd
);
6208 gpu::CommandHeader header
;
6210 uint32_t result_shm_id
;
6211 uint32_t result_shm_offset
;
6214 static_assert(sizeof(IsBuffer
) == 16, "size of IsBuffer should be 16");
6215 static_assert(offsetof(IsBuffer
, header
) == 0,
6216 "offset of IsBuffer header should be 0");
6217 static_assert(offsetof(IsBuffer
, buffer
) == 4,
6218 "offset of IsBuffer buffer should be 4");
6219 static_assert(offsetof(IsBuffer
, result_shm_id
) == 8,
6220 "offset of IsBuffer result_shm_id should be 8");
6221 static_assert(offsetof(IsBuffer
, result_shm_offset
) == 12,
6222 "offset of IsBuffer result_shm_offset should be 12");
6225 typedef IsEnabled ValueType
;
6226 static const CommandId kCmdId
= kIsEnabled
;
6227 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6228 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6230 typedef uint32_t Result
;
6232 static uint32_t ComputeSize() {
6233 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6236 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6238 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
6241 result_shm_id
= _result_shm_id
;
6242 result_shm_offset
= _result_shm_offset
;
6245 void* Set(void* cmd
,
6247 uint32_t _result_shm_id
,
6248 uint32_t _result_shm_offset
) {
6249 static_cast<ValueType
*>(cmd
)
6250 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
6251 return NextCmdAddress
<ValueType
>(cmd
);
6254 gpu::CommandHeader header
;
6256 uint32_t result_shm_id
;
6257 uint32_t result_shm_offset
;
6260 static_assert(sizeof(IsEnabled
) == 16, "size of IsEnabled should be 16");
6261 static_assert(offsetof(IsEnabled
, header
) == 0,
6262 "offset of IsEnabled header should be 0");
6263 static_assert(offsetof(IsEnabled
, cap
) == 4,
6264 "offset of IsEnabled cap should be 4");
6265 static_assert(offsetof(IsEnabled
, result_shm_id
) == 8,
6266 "offset of IsEnabled result_shm_id should be 8");
6267 static_assert(offsetof(IsEnabled
, result_shm_offset
) == 12,
6268 "offset of IsEnabled result_shm_offset should be 12");
6270 struct IsFramebuffer
{
6271 typedef IsFramebuffer ValueType
;
6272 static const CommandId kCmdId
= kIsFramebuffer
;
6273 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6274 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6276 typedef uint32_t Result
;
6278 static uint32_t ComputeSize() {
6279 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6282 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6284 void Init(GLuint _framebuffer
,
6285 uint32_t _result_shm_id
,
6286 uint32_t _result_shm_offset
) {
6288 framebuffer
= _framebuffer
;
6289 result_shm_id
= _result_shm_id
;
6290 result_shm_offset
= _result_shm_offset
;
6293 void* Set(void* cmd
,
6294 GLuint _framebuffer
,
6295 uint32_t _result_shm_id
,
6296 uint32_t _result_shm_offset
) {
6297 static_cast<ValueType
*>(cmd
)
6298 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
6299 return NextCmdAddress
<ValueType
>(cmd
);
6302 gpu::CommandHeader header
;
6303 uint32_t framebuffer
;
6304 uint32_t result_shm_id
;
6305 uint32_t result_shm_offset
;
6308 static_assert(sizeof(IsFramebuffer
) == 16,
6309 "size of IsFramebuffer should be 16");
6310 static_assert(offsetof(IsFramebuffer
, header
) == 0,
6311 "offset of IsFramebuffer header should be 0");
6312 static_assert(offsetof(IsFramebuffer
, framebuffer
) == 4,
6313 "offset of IsFramebuffer framebuffer should be 4");
6314 static_assert(offsetof(IsFramebuffer
, result_shm_id
) == 8,
6315 "offset of IsFramebuffer result_shm_id should be 8");
6316 static_assert(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
6317 "offset of IsFramebuffer result_shm_offset should be 12");
6320 typedef IsProgram ValueType
;
6321 static const CommandId kCmdId
= kIsProgram
;
6322 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6323 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6325 typedef uint32_t Result
;
6327 static uint32_t ComputeSize() {
6328 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6331 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6333 void Init(GLuint _program
,
6334 uint32_t _result_shm_id
,
6335 uint32_t _result_shm_offset
) {
6338 result_shm_id
= _result_shm_id
;
6339 result_shm_offset
= _result_shm_offset
;
6342 void* Set(void* cmd
,
6344 uint32_t _result_shm_id
,
6345 uint32_t _result_shm_offset
) {
6346 static_cast<ValueType
*>(cmd
)
6347 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
6348 return NextCmdAddress
<ValueType
>(cmd
);
6351 gpu::CommandHeader header
;
6353 uint32_t result_shm_id
;
6354 uint32_t result_shm_offset
;
6357 static_assert(sizeof(IsProgram
) == 16, "size of IsProgram should be 16");
6358 static_assert(offsetof(IsProgram
, header
) == 0,
6359 "offset of IsProgram header should be 0");
6360 static_assert(offsetof(IsProgram
, program
) == 4,
6361 "offset of IsProgram program should be 4");
6362 static_assert(offsetof(IsProgram
, result_shm_id
) == 8,
6363 "offset of IsProgram result_shm_id should be 8");
6364 static_assert(offsetof(IsProgram
, result_shm_offset
) == 12,
6365 "offset of IsProgram result_shm_offset should be 12");
6367 struct IsRenderbuffer
{
6368 typedef IsRenderbuffer ValueType
;
6369 static const CommandId kCmdId
= kIsRenderbuffer
;
6370 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6371 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6373 typedef uint32_t Result
;
6375 static uint32_t ComputeSize() {
6376 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6379 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6381 void Init(GLuint _renderbuffer
,
6382 uint32_t _result_shm_id
,
6383 uint32_t _result_shm_offset
) {
6385 renderbuffer
= _renderbuffer
;
6386 result_shm_id
= _result_shm_id
;
6387 result_shm_offset
= _result_shm_offset
;
6390 void* Set(void* cmd
,
6391 GLuint _renderbuffer
,
6392 uint32_t _result_shm_id
,
6393 uint32_t _result_shm_offset
) {
6394 static_cast<ValueType
*>(cmd
)
6395 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
6396 return NextCmdAddress
<ValueType
>(cmd
);
6399 gpu::CommandHeader header
;
6400 uint32_t renderbuffer
;
6401 uint32_t result_shm_id
;
6402 uint32_t result_shm_offset
;
6405 static_assert(sizeof(IsRenderbuffer
) == 16,
6406 "size of IsRenderbuffer should be 16");
6407 static_assert(offsetof(IsRenderbuffer
, header
) == 0,
6408 "offset of IsRenderbuffer header should be 0");
6409 static_assert(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
6410 "offset of IsRenderbuffer renderbuffer should be 4");
6411 static_assert(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
6412 "offset of IsRenderbuffer result_shm_id should be 8");
6413 static_assert(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
6414 "offset of IsRenderbuffer result_shm_offset should be 12");
6417 typedef IsSampler ValueType
;
6418 static const CommandId kCmdId
= kIsSampler
;
6419 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6420 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6422 typedef uint32_t Result
;
6424 static uint32_t ComputeSize() {
6425 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6428 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6430 void Init(GLuint _sampler
,
6431 uint32_t _result_shm_id
,
6432 uint32_t _result_shm_offset
) {
6435 result_shm_id
= _result_shm_id
;
6436 result_shm_offset
= _result_shm_offset
;
6439 void* Set(void* cmd
,
6441 uint32_t _result_shm_id
,
6442 uint32_t _result_shm_offset
) {
6443 static_cast<ValueType
*>(cmd
)
6444 ->Init(_sampler
, _result_shm_id
, _result_shm_offset
);
6445 return NextCmdAddress
<ValueType
>(cmd
);
6448 gpu::CommandHeader header
;
6450 uint32_t result_shm_id
;
6451 uint32_t result_shm_offset
;
6454 static_assert(sizeof(IsSampler
) == 16, "size of IsSampler should be 16");
6455 static_assert(offsetof(IsSampler
, header
) == 0,
6456 "offset of IsSampler header should be 0");
6457 static_assert(offsetof(IsSampler
, sampler
) == 4,
6458 "offset of IsSampler sampler should be 4");
6459 static_assert(offsetof(IsSampler
, result_shm_id
) == 8,
6460 "offset of IsSampler result_shm_id should be 8");
6461 static_assert(offsetof(IsSampler
, result_shm_offset
) == 12,
6462 "offset of IsSampler result_shm_offset should be 12");
6465 typedef IsShader ValueType
;
6466 static const CommandId kCmdId
= kIsShader
;
6467 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6468 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6470 typedef uint32_t Result
;
6472 static uint32_t ComputeSize() {
6473 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6476 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6478 void Init(GLuint _shader
,
6479 uint32_t _result_shm_id
,
6480 uint32_t _result_shm_offset
) {
6483 result_shm_id
= _result_shm_id
;
6484 result_shm_offset
= _result_shm_offset
;
6487 void* Set(void* cmd
,
6489 uint32_t _result_shm_id
,
6490 uint32_t _result_shm_offset
) {
6491 static_cast<ValueType
*>(cmd
)
6492 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
6493 return NextCmdAddress
<ValueType
>(cmd
);
6496 gpu::CommandHeader header
;
6498 uint32_t result_shm_id
;
6499 uint32_t result_shm_offset
;
6502 static_assert(sizeof(IsShader
) == 16, "size of IsShader should be 16");
6503 static_assert(offsetof(IsShader
, header
) == 0,
6504 "offset of IsShader header should be 0");
6505 static_assert(offsetof(IsShader
, shader
) == 4,
6506 "offset of IsShader shader should be 4");
6507 static_assert(offsetof(IsShader
, result_shm_id
) == 8,
6508 "offset of IsShader result_shm_id should be 8");
6509 static_assert(offsetof(IsShader
, result_shm_offset
) == 12,
6510 "offset of IsShader result_shm_offset should be 12");
6513 typedef IsSync ValueType
;
6514 static const CommandId kCmdId
= kIsSync
;
6515 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6516 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6518 typedef uint32_t Result
;
6520 static uint32_t ComputeSize() {
6521 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6524 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6526 void Init(GLuint _sync
,
6527 uint32_t _result_shm_id
,
6528 uint32_t _result_shm_offset
) {
6531 result_shm_id
= _result_shm_id
;
6532 result_shm_offset
= _result_shm_offset
;
6535 void* Set(void* cmd
,
6537 uint32_t _result_shm_id
,
6538 uint32_t _result_shm_offset
) {
6539 static_cast<ValueType
*>(cmd
)
6540 ->Init(_sync
, _result_shm_id
, _result_shm_offset
);
6541 return NextCmdAddress
<ValueType
>(cmd
);
6544 gpu::CommandHeader header
;
6546 uint32_t result_shm_id
;
6547 uint32_t result_shm_offset
;
6550 static_assert(sizeof(IsSync
) == 16, "size of IsSync should be 16");
6551 static_assert(offsetof(IsSync
, header
) == 0,
6552 "offset of IsSync header should be 0");
6553 static_assert(offsetof(IsSync
, sync
) == 4, "offset of IsSync sync should be 4");
6554 static_assert(offsetof(IsSync
, result_shm_id
) == 8,
6555 "offset of IsSync result_shm_id should be 8");
6556 static_assert(offsetof(IsSync
, result_shm_offset
) == 12,
6557 "offset of IsSync result_shm_offset should be 12");
6560 typedef IsTexture ValueType
;
6561 static const CommandId kCmdId
= kIsTexture
;
6562 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6563 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6565 typedef uint32_t Result
;
6567 static uint32_t ComputeSize() {
6568 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6571 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6573 void Init(GLuint _texture
,
6574 uint32_t _result_shm_id
,
6575 uint32_t _result_shm_offset
) {
6578 result_shm_id
= _result_shm_id
;
6579 result_shm_offset
= _result_shm_offset
;
6582 void* Set(void* cmd
,
6584 uint32_t _result_shm_id
,
6585 uint32_t _result_shm_offset
) {
6586 static_cast<ValueType
*>(cmd
)
6587 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
6588 return NextCmdAddress
<ValueType
>(cmd
);
6591 gpu::CommandHeader header
;
6593 uint32_t result_shm_id
;
6594 uint32_t result_shm_offset
;
6597 static_assert(sizeof(IsTexture
) == 16, "size of IsTexture should be 16");
6598 static_assert(offsetof(IsTexture
, header
) == 0,
6599 "offset of IsTexture header should be 0");
6600 static_assert(offsetof(IsTexture
, texture
) == 4,
6601 "offset of IsTexture texture should be 4");
6602 static_assert(offsetof(IsTexture
, result_shm_id
) == 8,
6603 "offset of IsTexture result_shm_id should be 8");
6604 static_assert(offsetof(IsTexture
, result_shm_offset
) == 12,
6605 "offset of IsTexture result_shm_offset should be 12");
6607 struct IsTransformFeedback
{
6608 typedef IsTransformFeedback ValueType
;
6609 static const CommandId kCmdId
= kIsTransformFeedback
;
6610 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6611 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6613 typedef uint32_t Result
;
6615 static uint32_t ComputeSize() {
6616 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6619 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6621 void Init(GLuint _transformfeedback
,
6622 uint32_t _result_shm_id
,
6623 uint32_t _result_shm_offset
) {
6625 transformfeedback
= _transformfeedback
;
6626 result_shm_id
= _result_shm_id
;
6627 result_shm_offset
= _result_shm_offset
;
6630 void* Set(void* cmd
,
6631 GLuint _transformfeedback
,
6632 uint32_t _result_shm_id
,
6633 uint32_t _result_shm_offset
) {
6634 static_cast<ValueType
*>(cmd
)
6635 ->Init(_transformfeedback
, _result_shm_id
, _result_shm_offset
);
6636 return NextCmdAddress
<ValueType
>(cmd
);
6639 gpu::CommandHeader header
;
6640 uint32_t transformfeedback
;
6641 uint32_t result_shm_id
;
6642 uint32_t result_shm_offset
;
6645 static_assert(sizeof(IsTransformFeedback
) == 16,
6646 "size of IsTransformFeedback should be 16");
6647 static_assert(offsetof(IsTransformFeedback
, header
) == 0,
6648 "offset of IsTransformFeedback header should be 0");
6649 static_assert(offsetof(IsTransformFeedback
, transformfeedback
) == 4,
6650 "offset of IsTransformFeedback transformfeedback should be 4");
6651 static_assert(offsetof(IsTransformFeedback
, result_shm_id
) == 8,
6652 "offset of IsTransformFeedback result_shm_id should be 8");
6653 static_assert(offsetof(IsTransformFeedback
, result_shm_offset
) == 12,
6654 "offset of IsTransformFeedback result_shm_offset should be 12");
6657 typedef LineWidth ValueType
;
6658 static const CommandId kCmdId
= kLineWidth
;
6659 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6660 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6662 static uint32_t ComputeSize() {
6663 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6666 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6668 void Init(GLfloat _width
) {
6673 void* Set(void* cmd
, GLfloat _width
) {
6674 static_cast<ValueType
*>(cmd
)->Init(_width
);
6675 return NextCmdAddress
<ValueType
>(cmd
);
6678 gpu::CommandHeader header
;
6682 static_assert(sizeof(LineWidth
) == 8, "size of LineWidth should be 8");
6683 static_assert(offsetof(LineWidth
, header
) == 0,
6684 "offset of LineWidth header should be 0");
6685 static_assert(offsetof(LineWidth
, width
) == 4,
6686 "offset of LineWidth width should be 4");
6688 struct LinkProgram
{
6689 typedef LinkProgram ValueType
;
6690 static const CommandId kCmdId
= kLinkProgram
;
6691 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6692 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6694 static uint32_t ComputeSize() {
6695 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6698 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6700 void Init(GLuint _program
) {
6705 void* Set(void* cmd
, GLuint _program
) {
6706 static_cast<ValueType
*>(cmd
)->Init(_program
);
6707 return NextCmdAddress
<ValueType
>(cmd
);
6710 gpu::CommandHeader header
;
6714 static_assert(sizeof(LinkProgram
) == 8, "size of LinkProgram should be 8");
6715 static_assert(offsetof(LinkProgram
, header
) == 0,
6716 "offset of LinkProgram header should be 0");
6717 static_assert(offsetof(LinkProgram
, program
) == 4,
6718 "offset of LinkProgram program should be 4");
6720 struct PauseTransformFeedback
{
6721 typedef PauseTransformFeedback ValueType
;
6722 static const CommandId kCmdId
= kPauseTransformFeedback
;
6723 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6724 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6726 static uint32_t ComputeSize() {
6727 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6730 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6732 void Init() { SetHeader(); }
6734 void* Set(void* cmd
) {
6735 static_cast<ValueType
*>(cmd
)->Init();
6736 return NextCmdAddress
<ValueType
>(cmd
);
6739 gpu::CommandHeader header
;
6742 static_assert(sizeof(PauseTransformFeedback
) == 4,
6743 "size of PauseTransformFeedback should be 4");
6744 static_assert(offsetof(PauseTransformFeedback
, header
) == 0,
6745 "offset of PauseTransformFeedback header should be 0");
6747 struct PixelStorei
{
6748 typedef PixelStorei ValueType
;
6749 static const CommandId kCmdId
= kPixelStorei
;
6750 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6751 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6753 static uint32_t ComputeSize() {
6754 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6757 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6759 void Init(GLenum _pname
, GLint _param
) {
6765 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
6766 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
6767 return NextCmdAddress
<ValueType
>(cmd
);
6770 gpu::CommandHeader header
;
6775 static_assert(sizeof(PixelStorei
) == 12, "size of PixelStorei should be 12");
6776 static_assert(offsetof(PixelStorei
, header
) == 0,
6777 "offset of PixelStorei header should be 0");
6778 static_assert(offsetof(PixelStorei
, pname
) == 4,
6779 "offset of PixelStorei pname should be 4");
6780 static_assert(offsetof(PixelStorei
, param
) == 8,
6781 "offset of PixelStorei param should be 8");
6783 struct PolygonOffset
{
6784 typedef PolygonOffset ValueType
;
6785 static const CommandId kCmdId
= kPolygonOffset
;
6786 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6787 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6789 static uint32_t ComputeSize() {
6790 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6793 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6795 void Init(GLfloat _factor
, GLfloat _units
) {
6801 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
6802 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
6803 return NextCmdAddress
<ValueType
>(cmd
);
6806 gpu::CommandHeader header
;
6811 static_assert(sizeof(PolygonOffset
) == 12,
6812 "size of PolygonOffset should be 12");
6813 static_assert(offsetof(PolygonOffset
, header
) == 0,
6814 "offset of PolygonOffset header should be 0");
6815 static_assert(offsetof(PolygonOffset
, factor
) == 4,
6816 "offset of PolygonOffset factor should be 4");
6817 static_assert(offsetof(PolygonOffset
, units
) == 8,
6818 "offset of PolygonOffset units should be 8");
6821 typedef ReadBuffer ValueType
;
6822 static const CommandId kCmdId
= kReadBuffer
;
6823 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6824 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6826 static uint32_t ComputeSize() {
6827 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6830 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6832 void Init(GLenum _src
) {
6837 void* Set(void* cmd
, GLenum _src
) {
6838 static_cast<ValueType
*>(cmd
)->Init(_src
);
6839 return NextCmdAddress
<ValueType
>(cmd
);
6842 gpu::CommandHeader header
;
6846 static_assert(sizeof(ReadBuffer
) == 8, "size of ReadBuffer should be 8");
6847 static_assert(offsetof(ReadBuffer
, header
) == 0,
6848 "offset of ReadBuffer header should be 0");
6849 static_assert(offsetof(ReadBuffer
, src
) == 4,
6850 "offset of ReadBuffer src should be 4");
6852 // ReadPixels has the result separated from the pixel buffer so that
6853 // it is easier to specify the result going to some specific place
6854 // that exactly fits the rectangle of pixels.
6856 typedef ReadPixels ValueType
;
6857 static const CommandId kCmdId
= kReadPixels
;
6858 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6859 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6861 typedef uint32_t Result
;
6863 static uint32_t ComputeSize() {
6864 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6867 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6875 uint32_t _pixels_shm_id
,
6876 uint32_t _pixels_shm_offset
,
6877 uint32_t _result_shm_id
,
6878 uint32_t _result_shm_offset
,
6887 pixels_shm_id
= _pixels_shm_id
;
6888 pixels_shm_offset
= _pixels_shm_offset
;
6889 result_shm_id
= _result_shm_id
;
6890 result_shm_offset
= _result_shm_offset
;
6894 void* Set(void* cmd
,
6901 uint32_t _pixels_shm_id
,
6902 uint32_t _pixels_shm_offset
,
6903 uint32_t _result_shm_id
,
6904 uint32_t _result_shm_offset
,
6906 static_cast<ValueType
*>(cmd
)
6907 ->Init(_x
, _y
, _width
, _height
, _format
, _type
, _pixels_shm_id
,
6908 _pixels_shm_offset
, _result_shm_id
, _result_shm_offset
, _async
);
6909 return NextCmdAddress
<ValueType
>(cmd
);
6912 gpu::CommandHeader header
;
6919 uint32_t pixels_shm_id
;
6920 uint32_t pixels_shm_offset
;
6921 uint32_t result_shm_id
;
6922 uint32_t result_shm_offset
;
6926 static_assert(sizeof(ReadPixels
) == 48, "size of ReadPixels should be 48");
6927 static_assert(offsetof(ReadPixels
, header
) == 0,
6928 "offset of ReadPixels header should be 0");
6929 static_assert(offsetof(ReadPixels
, x
) == 4,
6930 "offset of ReadPixels x should be 4");
6931 static_assert(offsetof(ReadPixels
, y
) == 8,
6932 "offset of ReadPixels y should be 8");
6933 static_assert(offsetof(ReadPixels
, width
) == 12,
6934 "offset of ReadPixels width should be 12");
6935 static_assert(offsetof(ReadPixels
, height
) == 16,
6936 "offset of ReadPixels height should be 16");
6937 static_assert(offsetof(ReadPixels
, format
) == 20,
6938 "offset of ReadPixels format should be 20");
6939 static_assert(offsetof(ReadPixels
, type
) == 24,
6940 "offset of ReadPixels type should be 24");
6941 static_assert(offsetof(ReadPixels
, pixels_shm_id
) == 28,
6942 "offset of ReadPixels pixels_shm_id should be 28");
6943 static_assert(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
6944 "offset of ReadPixels pixels_shm_offset should be 32");
6945 static_assert(offsetof(ReadPixels
, result_shm_id
) == 36,
6946 "offset of ReadPixels result_shm_id should be 36");
6947 static_assert(offsetof(ReadPixels
, result_shm_offset
) == 40,
6948 "offset of ReadPixels result_shm_offset should be 40");
6949 static_assert(offsetof(ReadPixels
, async
) == 44,
6950 "offset of ReadPixels async should be 44");
6952 struct ReleaseShaderCompiler
{
6953 typedef ReleaseShaderCompiler ValueType
;
6954 static const CommandId kCmdId
= kReleaseShaderCompiler
;
6955 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6956 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6958 static uint32_t ComputeSize() {
6959 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6962 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6964 void Init() { SetHeader(); }
6966 void* Set(void* cmd
) {
6967 static_cast<ValueType
*>(cmd
)->Init();
6968 return NextCmdAddress
<ValueType
>(cmd
);
6971 gpu::CommandHeader header
;
6974 static_assert(sizeof(ReleaseShaderCompiler
) == 4,
6975 "size of ReleaseShaderCompiler should be 4");
6976 static_assert(offsetof(ReleaseShaderCompiler
, header
) == 0,
6977 "offset of ReleaseShaderCompiler header should be 0");
6979 struct RenderbufferStorage
{
6980 typedef RenderbufferStorage ValueType
;
6981 static const CommandId kCmdId
= kRenderbufferStorage
;
6982 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6983 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6985 static uint32_t ComputeSize() {
6986 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6989 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6991 void Init(GLenum _target
,
6992 GLenum _internalformat
,
6997 internalformat
= _internalformat
;
7002 void* Set(void* cmd
,
7004 GLenum _internalformat
,
7007 static_cast<ValueType
*>(cmd
)
7008 ->Init(_target
, _internalformat
, _width
, _height
);
7009 return NextCmdAddress
<ValueType
>(cmd
);
7012 gpu::CommandHeader header
;
7014 uint32_t internalformat
;
7019 static_assert(sizeof(RenderbufferStorage
) == 20,
7020 "size of RenderbufferStorage should be 20");
7021 static_assert(offsetof(RenderbufferStorage
, header
) == 0,
7022 "offset of RenderbufferStorage header should be 0");
7023 static_assert(offsetof(RenderbufferStorage
, target
) == 4,
7024 "offset of RenderbufferStorage target should be 4");
7025 static_assert(offsetof(RenderbufferStorage
, internalformat
) == 8,
7026 "offset of RenderbufferStorage internalformat should be 8");
7027 static_assert(offsetof(RenderbufferStorage
, width
) == 12,
7028 "offset of RenderbufferStorage width should be 12");
7029 static_assert(offsetof(RenderbufferStorage
, height
) == 16,
7030 "offset of RenderbufferStorage height should be 16");
7032 struct ResumeTransformFeedback
{
7033 typedef ResumeTransformFeedback ValueType
;
7034 static const CommandId kCmdId
= kResumeTransformFeedback
;
7035 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7036 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7038 static uint32_t ComputeSize() {
7039 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7042 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7044 void Init() { SetHeader(); }
7046 void* Set(void* cmd
) {
7047 static_cast<ValueType
*>(cmd
)->Init();
7048 return NextCmdAddress
<ValueType
>(cmd
);
7051 gpu::CommandHeader header
;
7054 static_assert(sizeof(ResumeTransformFeedback
) == 4,
7055 "size of ResumeTransformFeedback should be 4");
7056 static_assert(offsetof(ResumeTransformFeedback
, header
) == 0,
7057 "offset of ResumeTransformFeedback header should be 0");
7059 struct SampleCoverage
{
7060 typedef SampleCoverage ValueType
;
7061 static const CommandId kCmdId
= kSampleCoverage
;
7062 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7063 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7065 static uint32_t ComputeSize() {
7066 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7069 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7071 void Init(GLclampf _value
, GLboolean _invert
) {
7077 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
7078 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
7079 return NextCmdAddress
<ValueType
>(cmd
);
7082 gpu::CommandHeader header
;
7087 static_assert(sizeof(SampleCoverage
) == 12,
7088 "size of SampleCoverage should be 12");
7089 static_assert(offsetof(SampleCoverage
, header
) == 0,
7090 "offset of SampleCoverage header should be 0");
7091 static_assert(offsetof(SampleCoverage
, value
) == 4,
7092 "offset of SampleCoverage value should be 4");
7093 static_assert(offsetof(SampleCoverage
, invert
) == 8,
7094 "offset of SampleCoverage invert should be 8");
7096 struct SamplerParameterf
{
7097 typedef SamplerParameterf ValueType
;
7098 static const CommandId kCmdId
= kSamplerParameterf
;
7099 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7100 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7102 static uint32_t ComputeSize() {
7103 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7106 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7108 void Init(GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
7115 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLfloat _param
) {
7116 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
7117 return NextCmdAddress
<ValueType
>(cmd
);
7120 gpu::CommandHeader header
;
7126 static_assert(sizeof(SamplerParameterf
) == 16,
7127 "size of SamplerParameterf should be 16");
7128 static_assert(offsetof(SamplerParameterf
, header
) == 0,
7129 "offset of SamplerParameterf header should be 0");
7130 static_assert(offsetof(SamplerParameterf
, sampler
) == 4,
7131 "offset of SamplerParameterf sampler should be 4");
7132 static_assert(offsetof(SamplerParameterf
, pname
) == 8,
7133 "offset of SamplerParameterf pname should be 8");
7134 static_assert(offsetof(SamplerParameterf
, param
) == 12,
7135 "offset of SamplerParameterf param should be 12");
7137 struct SamplerParameterfvImmediate
{
7138 typedef SamplerParameterfvImmediate ValueType
;
7139 static const CommandId kCmdId
= kSamplerParameterfvImmediate
;
7140 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7141 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7143 static uint32_t ComputeDataSize() {
7144 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
7147 static uint32_t ComputeSize() {
7148 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7151 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7153 void Init(GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
7157 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7160 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLfloat
* _params
) {
7161 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
7162 const uint32_t size
= ComputeSize();
7163 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7166 gpu::CommandHeader header
;
7171 static_assert(sizeof(SamplerParameterfvImmediate
) == 12,
7172 "size of SamplerParameterfvImmediate should be 12");
7173 static_assert(offsetof(SamplerParameterfvImmediate
, header
) == 0,
7174 "offset of SamplerParameterfvImmediate header should be 0");
7175 static_assert(offsetof(SamplerParameterfvImmediate
, sampler
) == 4,
7176 "offset of SamplerParameterfvImmediate sampler should be 4");
7177 static_assert(offsetof(SamplerParameterfvImmediate
, pname
) == 8,
7178 "offset of SamplerParameterfvImmediate pname should be 8");
7180 struct SamplerParameteri
{
7181 typedef SamplerParameteri ValueType
;
7182 static const CommandId kCmdId
= kSamplerParameteri
;
7183 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7184 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7186 static uint32_t ComputeSize() {
7187 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7190 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7192 void Init(GLuint _sampler
, GLenum _pname
, GLint _param
) {
7199 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, GLint _param
) {
7200 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _param
);
7201 return NextCmdAddress
<ValueType
>(cmd
);
7204 gpu::CommandHeader header
;
7210 static_assert(sizeof(SamplerParameteri
) == 16,
7211 "size of SamplerParameteri should be 16");
7212 static_assert(offsetof(SamplerParameteri
, header
) == 0,
7213 "offset of SamplerParameteri header should be 0");
7214 static_assert(offsetof(SamplerParameteri
, sampler
) == 4,
7215 "offset of SamplerParameteri sampler should be 4");
7216 static_assert(offsetof(SamplerParameteri
, pname
) == 8,
7217 "offset of SamplerParameteri pname should be 8");
7218 static_assert(offsetof(SamplerParameteri
, param
) == 12,
7219 "offset of SamplerParameteri param should be 12");
7221 struct SamplerParameterivImmediate
{
7222 typedef SamplerParameterivImmediate ValueType
;
7223 static const CommandId kCmdId
= kSamplerParameterivImmediate
;
7224 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7225 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7227 static uint32_t ComputeDataSize() {
7228 return static_cast<uint32_t>(sizeof(GLint
) * 1);
7231 static uint32_t ComputeSize() {
7232 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7235 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7237 void Init(GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
7241 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7244 void* Set(void* cmd
, GLuint _sampler
, GLenum _pname
, const GLint
* _params
) {
7245 static_cast<ValueType
*>(cmd
)->Init(_sampler
, _pname
, _params
);
7246 const uint32_t size
= ComputeSize();
7247 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7250 gpu::CommandHeader header
;
7255 static_assert(sizeof(SamplerParameterivImmediate
) == 12,
7256 "size of SamplerParameterivImmediate should be 12");
7257 static_assert(offsetof(SamplerParameterivImmediate
, header
) == 0,
7258 "offset of SamplerParameterivImmediate header should be 0");
7259 static_assert(offsetof(SamplerParameterivImmediate
, sampler
) == 4,
7260 "offset of SamplerParameterivImmediate sampler should be 4");
7261 static_assert(offsetof(SamplerParameterivImmediate
, pname
) == 8,
7262 "offset of SamplerParameterivImmediate pname should be 8");
7265 typedef Scissor ValueType
;
7266 static const CommandId kCmdId
= kScissor
;
7267 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7268 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7270 static uint32_t ComputeSize() {
7271 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7274 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7276 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
7284 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
7285 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
7286 return NextCmdAddress
<ValueType
>(cmd
);
7289 gpu::CommandHeader header
;
7296 static_assert(sizeof(Scissor
) == 20, "size of Scissor should be 20");
7297 static_assert(offsetof(Scissor
, header
) == 0,
7298 "offset of Scissor header should be 0");
7299 static_assert(offsetof(Scissor
, x
) == 4, "offset of Scissor x should be 4");
7300 static_assert(offsetof(Scissor
, y
) == 8, "offset of Scissor y should be 8");
7301 static_assert(offsetof(Scissor
, width
) == 12,
7302 "offset of Scissor width should be 12");
7303 static_assert(offsetof(Scissor
, height
) == 16,
7304 "offset of Scissor height should be 16");
7306 struct ShaderBinary
{
7307 typedef ShaderBinary ValueType
;
7308 static const CommandId kCmdId
= kShaderBinary
;
7309 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7310 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7312 static uint32_t ComputeSize() {
7313 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7316 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7318 void Init(GLsizei _n
,
7319 uint32_t _shaders_shm_id
,
7320 uint32_t _shaders_shm_offset
,
7321 GLenum _binaryformat
,
7322 uint32_t _binary_shm_id
,
7323 uint32_t _binary_shm_offset
,
7327 shaders_shm_id
= _shaders_shm_id
;
7328 shaders_shm_offset
= _shaders_shm_offset
;
7329 binaryformat
= _binaryformat
;
7330 binary_shm_id
= _binary_shm_id
;
7331 binary_shm_offset
= _binary_shm_offset
;
7335 void* Set(void* cmd
,
7337 uint32_t _shaders_shm_id
,
7338 uint32_t _shaders_shm_offset
,
7339 GLenum _binaryformat
,
7340 uint32_t _binary_shm_id
,
7341 uint32_t _binary_shm_offset
,
7343 static_cast<ValueType
*>(cmd
)->Init(_n
, _shaders_shm_id
, _shaders_shm_offset
,
7344 _binaryformat
, _binary_shm_id
,
7345 _binary_shm_offset
, _length
);
7346 return NextCmdAddress
<ValueType
>(cmd
);
7349 gpu::CommandHeader header
;
7351 uint32_t shaders_shm_id
;
7352 uint32_t shaders_shm_offset
;
7353 uint32_t binaryformat
;
7354 uint32_t binary_shm_id
;
7355 uint32_t binary_shm_offset
;
7359 static_assert(sizeof(ShaderBinary
) == 32, "size of ShaderBinary should be 32");
7360 static_assert(offsetof(ShaderBinary
, header
) == 0,
7361 "offset of ShaderBinary header should be 0");
7362 static_assert(offsetof(ShaderBinary
, n
) == 4,
7363 "offset of ShaderBinary n should be 4");
7364 static_assert(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
7365 "offset of ShaderBinary shaders_shm_id should be 8");
7366 static_assert(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
7367 "offset of ShaderBinary shaders_shm_offset should be 12");
7368 static_assert(offsetof(ShaderBinary
, binaryformat
) == 16,
7369 "offset of ShaderBinary binaryformat should be 16");
7370 static_assert(offsetof(ShaderBinary
, binary_shm_id
) == 20,
7371 "offset of ShaderBinary binary_shm_id should be 20");
7372 static_assert(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
7373 "offset of ShaderBinary binary_shm_offset should be 24");
7374 static_assert(offsetof(ShaderBinary
, length
) == 28,
7375 "offset of ShaderBinary length should be 28");
7377 struct ShaderSourceBucket
{
7378 typedef ShaderSourceBucket ValueType
;
7379 static const CommandId kCmdId
= kShaderSourceBucket
;
7380 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7381 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7383 static uint32_t ComputeSize() {
7384 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7387 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7389 void Init(GLuint _shader
, uint32_t _str_bucket_id
) {
7392 str_bucket_id
= _str_bucket_id
;
7395 void* Set(void* cmd
, GLuint _shader
, uint32_t _str_bucket_id
) {
7396 static_cast<ValueType
*>(cmd
)->Init(_shader
, _str_bucket_id
);
7397 return NextCmdAddress
<ValueType
>(cmd
);
7400 gpu::CommandHeader header
;
7402 uint32_t str_bucket_id
;
7405 static_assert(sizeof(ShaderSourceBucket
) == 12,
7406 "size of ShaderSourceBucket should be 12");
7407 static_assert(offsetof(ShaderSourceBucket
, header
) == 0,
7408 "offset of ShaderSourceBucket header should be 0");
7409 static_assert(offsetof(ShaderSourceBucket
, shader
) == 4,
7410 "offset of ShaderSourceBucket shader should be 4");
7411 static_assert(offsetof(ShaderSourceBucket
, str_bucket_id
) == 8,
7412 "offset of ShaderSourceBucket str_bucket_id should be 8");
7414 struct StencilFunc
{
7415 typedef StencilFunc ValueType
;
7416 static const CommandId kCmdId
= kStencilFunc
;
7417 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7418 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7420 static uint32_t ComputeSize() {
7421 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7424 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7426 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
7433 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7434 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
7435 return NextCmdAddress
<ValueType
>(cmd
);
7438 gpu::CommandHeader header
;
7444 static_assert(sizeof(StencilFunc
) == 16, "size of StencilFunc should be 16");
7445 static_assert(offsetof(StencilFunc
, header
) == 0,
7446 "offset of StencilFunc header should be 0");
7447 static_assert(offsetof(StencilFunc
, func
) == 4,
7448 "offset of StencilFunc func should be 4");
7449 static_assert(offsetof(StencilFunc
, ref
) == 8,
7450 "offset of StencilFunc ref should be 8");
7451 static_assert(offsetof(StencilFunc
, mask
) == 12,
7452 "offset of StencilFunc mask should be 12");
7454 struct StencilFuncSeparate
{
7455 typedef StencilFuncSeparate ValueType
;
7456 static const CommandId kCmdId
= kStencilFuncSeparate
;
7457 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7458 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7460 static uint32_t ComputeSize() {
7461 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7464 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7466 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7474 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
7475 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
7476 return NextCmdAddress
<ValueType
>(cmd
);
7479 gpu::CommandHeader header
;
7486 static_assert(sizeof(StencilFuncSeparate
) == 20,
7487 "size of StencilFuncSeparate should be 20");
7488 static_assert(offsetof(StencilFuncSeparate
, header
) == 0,
7489 "offset of StencilFuncSeparate header should be 0");
7490 static_assert(offsetof(StencilFuncSeparate
, face
) == 4,
7491 "offset of StencilFuncSeparate face should be 4");
7492 static_assert(offsetof(StencilFuncSeparate
, func
) == 8,
7493 "offset of StencilFuncSeparate func should be 8");
7494 static_assert(offsetof(StencilFuncSeparate
, ref
) == 12,
7495 "offset of StencilFuncSeparate ref should be 12");
7496 static_assert(offsetof(StencilFuncSeparate
, mask
) == 16,
7497 "offset of StencilFuncSeparate mask should be 16");
7499 struct StencilMask
{
7500 typedef StencilMask ValueType
;
7501 static const CommandId kCmdId
= kStencilMask
;
7502 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7503 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7505 static uint32_t ComputeSize() {
7506 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7509 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7511 void Init(GLuint _mask
) {
7516 void* Set(void* cmd
, GLuint _mask
) {
7517 static_cast<ValueType
*>(cmd
)->Init(_mask
);
7518 return NextCmdAddress
<ValueType
>(cmd
);
7521 gpu::CommandHeader header
;
7525 static_assert(sizeof(StencilMask
) == 8, "size of StencilMask should be 8");
7526 static_assert(offsetof(StencilMask
, header
) == 0,
7527 "offset of StencilMask header should be 0");
7528 static_assert(offsetof(StencilMask
, mask
) == 4,
7529 "offset of StencilMask mask should be 4");
7531 struct StencilMaskSeparate
{
7532 typedef StencilMaskSeparate ValueType
;
7533 static const CommandId kCmdId
= kStencilMaskSeparate
;
7534 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7535 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7537 static uint32_t ComputeSize() {
7538 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7541 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7543 void Init(GLenum _face
, GLuint _mask
) {
7549 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
7550 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
7551 return NextCmdAddress
<ValueType
>(cmd
);
7554 gpu::CommandHeader header
;
7559 static_assert(sizeof(StencilMaskSeparate
) == 12,
7560 "size of StencilMaskSeparate should be 12");
7561 static_assert(offsetof(StencilMaskSeparate
, header
) == 0,
7562 "offset of StencilMaskSeparate header should be 0");
7563 static_assert(offsetof(StencilMaskSeparate
, face
) == 4,
7564 "offset of StencilMaskSeparate face should be 4");
7565 static_assert(offsetof(StencilMaskSeparate
, mask
) == 8,
7566 "offset of StencilMaskSeparate mask should be 8");
7569 typedef StencilOp ValueType
;
7570 static const CommandId kCmdId
= kStencilOp
;
7571 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7572 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7574 static uint32_t ComputeSize() {
7575 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7578 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7580 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7587 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7588 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
7589 return NextCmdAddress
<ValueType
>(cmd
);
7592 gpu::CommandHeader header
;
7598 static_assert(sizeof(StencilOp
) == 16, "size of StencilOp should be 16");
7599 static_assert(offsetof(StencilOp
, header
) == 0,
7600 "offset of StencilOp header should be 0");
7601 static_assert(offsetof(StencilOp
, fail
) == 4,
7602 "offset of StencilOp fail should be 4");
7603 static_assert(offsetof(StencilOp
, zfail
) == 8,
7604 "offset of StencilOp zfail should be 8");
7605 static_assert(offsetof(StencilOp
, zpass
) == 12,
7606 "offset of StencilOp zpass should be 12");
7608 struct StencilOpSeparate
{
7609 typedef StencilOpSeparate ValueType
;
7610 static const CommandId kCmdId
= kStencilOpSeparate
;
7611 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7612 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7614 static uint32_t ComputeSize() {
7615 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7618 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7620 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
7628 void* Set(void* cmd
,
7633 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
7634 return NextCmdAddress
<ValueType
>(cmd
);
7637 gpu::CommandHeader header
;
7644 static_assert(sizeof(StencilOpSeparate
) == 20,
7645 "size of StencilOpSeparate should be 20");
7646 static_assert(offsetof(StencilOpSeparate
, header
) == 0,
7647 "offset of StencilOpSeparate header should be 0");
7648 static_assert(offsetof(StencilOpSeparate
, face
) == 4,
7649 "offset of StencilOpSeparate face should be 4");
7650 static_assert(offsetof(StencilOpSeparate
, fail
) == 8,
7651 "offset of StencilOpSeparate fail should be 8");
7652 static_assert(offsetof(StencilOpSeparate
, zfail
) == 12,
7653 "offset of StencilOpSeparate zfail should be 12");
7654 static_assert(offsetof(StencilOpSeparate
, zpass
) == 16,
7655 "offset of StencilOpSeparate zpass should be 16");
7658 typedef TexImage2D ValueType
;
7659 static const CommandId kCmdId
= kTexImage2D
;
7660 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7661 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7663 static uint32_t ComputeSize() {
7664 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7667 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7669 void Init(GLenum _target
,
7671 GLint _internalformat
,
7676 uint32_t _pixels_shm_id
,
7677 uint32_t _pixels_shm_offset
) {
7681 internalformat
= _internalformat
;
7686 pixels_shm_id
= _pixels_shm_id
;
7687 pixels_shm_offset
= _pixels_shm_offset
;
7690 void* Set(void* cmd
,
7693 GLint _internalformat
,
7698 uint32_t _pixels_shm_id
,
7699 uint32_t _pixels_shm_offset
) {
7700 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7701 _height
, _format
, _type
, _pixels_shm_id
,
7702 _pixels_shm_offset
);
7703 return NextCmdAddress
<ValueType
>(cmd
);
7706 gpu::CommandHeader header
;
7709 int32_t internalformat
;
7714 uint32_t pixels_shm_id
;
7715 uint32_t pixels_shm_offset
;
7716 static const int32_t border
= 0;
7719 static_assert(sizeof(TexImage2D
) == 40, "size of TexImage2D should be 40");
7720 static_assert(offsetof(TexImage2D
, header
) == 0,
7721 "offset of TexImage2D header should be 0");
7722 static_assert(offsetof(TexImage2D
, target
) == 4,
7723 "offset of TexImage2D target should be 4");
7724 static_assert(offsetof(TexImage2D
, level
) == 8,
7725 "offset of TexImage2D level should be 8");
7726 static_assert(offsetof(TexImage2D
, internalformat
) == 12,
7727 "offset of TexImage2D internalformat should be 12");
7728 static_assert(offsetof(TexImage2D
, width
) == 16,
7729 "offset of TexImage2D width should be 16");
7730 static_assert(offsetof(TexImage2D
, height
) == 20,
7731 "offset of TexImage2D height should be 20");
7732 static_assert(offsetof(TexImage2D
, format
) == 24,
7733 "offset of TexImage2D format should be 24");
7734 static_assert(offsetof(TexImage2D
, type
) == 28,
7735 "offset of TexImage2D type should be 28");
7736 static_assert(offsetof(TexImage2D
, pixels_shm_id
) == 32,
7737 "offset of TexImage2D pixels_shm_id should be 32");
7738 static_assert(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
7739 "offset of TexImage2D pixels_shm_offset should be 36");
7742 typedef TexImage3D ValueType
;
7743 static const CommandId kCmdId
= kTexImage3D
;
7744 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7745 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7747 static uint32_t ComputeSize() {
7748 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7751 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7753 void Init(GLenum _target
,
7755 GLint _internalformat
,
7761 uint32_t _pixels_shm_id
,
7762 uint32_t _pixels_shm_offset
) {
7766 internalformat
= _internalformat
;
7772 pixels_shm_id
= _pixels_shm_id
;
7773 pixels_shm_offset
= _pixels_shm_offset
;
7776 void* Set(void* cmd
,
7779 GLint _internalformat
,
7785 uint32_t _pixels_shm_id
,
7786 uint32_t _pixels_shm_offset
) {
7787 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
7788 _height
, _depth
, _format
, _type
,
7789 _pixels_shm_id
, _pixels_shm_offset
);
7790 return NextCmdAddress
<ValueType
>(cmd
);
7793 gpu::CommandHeader header
;
7796 int32_t internalformat
;
7802 uint32_t pixels_shm_id
;
7803 uint32_t pixels_shm_offset
;
7804 static const int32_t border
= 0;
7807 static_assert(sizeof(TexImage3D
) == 44, "size of TexImage3D should be 44");
7808 static_assert(offsetof(TexImage3D
, header
) == 0,
7809 "offset of TexImage3D header should be 0");
7810 static_assert(offsetof(TexImage3D
, target
) == 4,
7811 "offset of TexImage3D target should be 4");
7812 static_assert(offsetof(TexImage3D
, level
) == 8,
7813 "offset of TexImage3D level should be 8");
7814 static_assert(offsetof(TexImage3D
, internalformat
) == 12,
7815 "offset of TexImage3D internalformat should be 12");
7816 static_assert(offsetof(TexImage3D
, width
) == 16,
7817 "offset of TexImage3D width should be 16");
7818 static_assert(offsetof(TexImage3D
, height
) == 20,
7819 "offset of TexImage3D height should be 20");
7820 static_assert(offsetof(TexImage3D
, depth
) == 24,
7821 "offset of TexImage3D depth should be 24");
7822 static_assert(offsetof(TexImage3D
, format
) == 28,
7823 "offset of TexImage3D format should be 28");
7824 static_assert(offsetof(TexImage3D
, type
) == 32,
7825 "offset of TexImage3D type should be 32");
7826 static_assert(offsetof(TexImage3D
, pixels_shm_id
) == 36,
7827 "offset of TexImage3D pixels_shm_id should be 36");
7828 static_assert(offsetof(TexImage3D
, pixels_shm_offset
) == 40,
7829 "offset of TexImage3D pixels_shm_offset should be 40");
7831 struct TexParameterf
{
7832 typedef TexParameterf ValueType
;
7833 static const CommandId kCmdId
= kTexParameterf
;
7834 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7835 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7837 static uint32_t ComputeSize() {
7838 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7841 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7843 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
7850 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
7851 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7852 return NextCmdAddress
<ValueType
>(cmd
);
7855 gpu::CommandHeader header
;
7861 static_assert(sizeof(TexParameterf
) == 16,
7862 "size of TexParameterf should be 16");
7863 static_assert(offsetof(TexParameterf
, header
) == 0,
7864 "offset of TexParameterf header should be 0");
7865 static_assert(offsetof(TexParameterf
, target
) == 4,
7866 "offset of TexParameterf target should be 4");
7867 static_assert(offsetof(TexParameterf
, pname
) == 8,
7868 "offset of TexParameterf pname should be 8");
7869 static_assert(offsetof(TexParameterf
, param
) == 12,
7870 "offset of TexParameterf param should be 12");
7872 struct TexParameterfvImmediate
{
7873 typedef TexParameterfvImmediate ValueType
;
7874 static const CommandId kCmdId
= kTexParameterfvImmediate
;
7875 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7876 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7878 static uint32_t ComputeDataSize() {
7879 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
7882 static uint32_t ComputeSize() {
7883 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7886 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7888 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7892 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7895 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
7896 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7897 const uint32_t size
= ComputeSize();
7898 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7901 gpu::CommandHeader header
;
7906 static_assert(sizeof(TexParameterfvImmediate
) == 12,
7907 "size of TexParameterfvImmediate should be 12");
7908 static_assert(offsetof(TexParameterfvImmediate
, header
) == 0,
7909 "offset of TexParameterfvImmediate header should be 0");
7910 static_assert(offsetof(TexParameterfvImmediate
, target
) == 4,
7911 "offset of TexParameterfvImmediate target should be 4");
7912 static_assert(offsetof(TexParameterfvImmediate
, pname
) == 8,
7913 "offset of TexParameterfvImmediate pname should be 8");
7915 struct TexParameteri
{
7916 typedef TexParameteri ValueType
;
7917 static const CommandId kCmdId
= kTexParameteri
;
7918 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7919 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7921 static uint32_t ComputeSize() {
7922 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7925 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7927 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
7934 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
7935 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
7936 return NextCmdAddress
<ValueType
>(cmd
);
7939 gpu::CommandHeader header
;
7945 static_assert(sizeof(TexParameteri
) == 16,
7946 "size of TexParameteri should be 16");
7947 static_assert(offsetof(TexParameteri
, header
) == 0,
7948 "offset of TexParameteri header should be 0");
7949 static_assert(offsetof(TexParameteri
, target
) == 4,
7950 "offset of TexParameteri target should be 4");
7951 static_assert(offsetof(TexParameteri
, pname
) == 8,
7952 "offset of TexParameteri pname should be 8");
7953 static_assert(offsetof(TexParameteri
, param
) == 12,
7954 "offset of TexParameteri param should be 12");
7956 struct TexParameterivImmediate
{
7957 typedef TexParameterivImmediate ValueType
;
7958 static const CommandId kCmdId
= kTexParameterivImmediate
;
7959 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7960 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7962 static uint32_t ComputeDataSize() {
7963 return static_cast<uint32_t>(sizeof(GLint
) * 1);
7966 static uint32_t ComputeSize() {
7967 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
7970 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7972 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7976 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
7979 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
7980 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
7981 const uint32_t size
= ComputeSize();
7982 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7985 gpu::CommandHeader header
;
7990 static_assert(sizeof(TexParameterivImmediate
) == 12,
7991 "size of TexParameterivImmediate should be 12");
7992 static_assert(offsetof(TexParameterivImmediate
, header
) == 0,
7993 "offset of TexParameterivImmediate header should be 0");
7994 static_assert(offsetof(TexParameterivImmediate
, target
) == 4,
7995 "offset of TexParameterivImmediate target should be 4");
7996 static_assert(offsetof(TexParameterivImmediate
, pname
) == 8,
7997 "offset of TexParameterivImmediate pname should be 8");
7999 struct TexStorage3D
{
8000 typedef TexStorage3D ValueType
;
8001 static const CommandId kCmdId
= kTexStorage3D
;
8002 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8003 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8005 static uint32_t ComputeSize() {
8006 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8009 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8011 void Init(GLenum _target
,
8013 GLenum _internalFormat
,
8020 internalFormat
= _internalFormat
;
8026 void* Set(void* cmd
,
8029 GLenum _internalFormat
,
8033 static_cast<ValueType
*>(cmd
)
8034 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
, _depth
);
8035 return NextCmdAddress
<ValueType
>(cmd
);
8038 gpu::CommandHeader header
;
8041 uint32_t internalFormat
;
8047 static_assert(sizeof(TexStorage3D
) == 28, "size of TexStorage3D should be 28");
8048 static_assert(offsetof(TexStorage3D
, header
) == 0,
8049 "offset of TexStorage3D header should be 0");
8050 static_assert(offsetof(TexStorage3D
, target
) == 4,
8051 "offset of TexStorage3D target should be 4");
8052 static_assert(offsetof(TexStorage3D
, levels
) == 8,
8053 "offset of TexStorage3D levels should be 8");
8054 static_assert(offsetof(TexStorage3D
, internalFormat
) == 12,
8055 "offset of TexStorage3D internalFormat should be 12");
8056 static_assert(offsetof(TexStorage3D
, width
) == 16,
8057 "offset of TexStorage3D width should be 16");
8058 static_assert(offsetof(TexStorage3D
, height
) == 20,
8059 "offset of TexStorage3D height should be 20");
8060 static_assert(offsetof(TexStorage3D
, depth
) == 24,
8061 "offset of TexStorage3D depth should be 24");
8063 struct TexSubImage2D
{
8064 typedef TexSubImage2D ValueType
;
8065 static const CommandId kCmdId
= kTexSubImage2D
;
8066 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8067 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8069 static uint32_t ComputeSize() {
8070 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8073 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8075 void Init(GLenum _target
,
8083 uint32_t _pixels_shm_id
,
8084 uint32_t _pixels_shm_offset
,
8085 GLboolean _internal
) {
8095 pixels_shm_id
= _pixels_shm_id
;
8096 pixels_shm_offset
= _pixels_shm_offset
;
8097 internal
= _internal
;
8100 void* Set(void* cmd
,
8109 uint32_t _pixels_shm_id
,
8110 uint32_t _pixels_shm_offset
,
8111 GLboolean _internal
) {
8112 static_cast<ValueType
*>(cmd
)
8113 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
8114 _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
8115 return NextCmdAddress
<ValueType
>(cmd
);
8118 gpu::CommandHeader header
;
8127 uint32_t pixels_shm_id
;
8128 uint32_t pixels_shm_offset
;
8132 static_assert(sizeof(TexSubImage2D
) == 48,
8133 "size of TexSubImage2D should be 48");
8134 static_assert(offsetof(TexSubImage2D
, header
) == 0,
8135 "offset of TexSubImage2D header should be 0");
8136 static_assert(offsetof(TexSubImage2D
, target
) == 4,
8137 "offset of TexSubImage2D target should be 4");
8138 static_assert(offsetof(TexSubImage2D
, level
) == 8,
8139 "offset of TexSubImage2D level should be 8");
8140 static_assert(offsetof(TexSubImage2D
, xoffset
) == 12,
8141 "offset of TexSubImage2D xoffset should be 12");
8142 static_assert(offsetof(TexSubImage2D
, yoffset
) == 16,
8143 "offset of TexSubImage2D yoffset should be 16");
8144 static_assert(offsetof(TexSubImage2D
, width
) == 20,
8145 "offset of TexSubImage2D width should be 20");
8146 static_assert(offsetof(TexSubImage2D
, height
) == 24,
8147 "offset of TexSubImage2D height should be 24");
8148 static_assert(offsetof(TexSubImage2D
, format
) == 28,
8149 "offset of TexSubImage2D format should be 28");
8150 static_assert(offsetof(TexSubImage2D
, type
) == 32,
8151 "offset of TexSubImage2D type should be 32");
8152 static_assert(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
8153 "offset of TexSubImage2D pixels_shm_id should be 36");
8154 static_assert(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
8155 "offset of TexSubImage2D pixels_shm_offset should be 40");
8156 static_assert(offsetof(TexSubImage2D
, internal
) == 44,
8157 "offset of TexSubImage2D internal should be 44");
8159 struct TexSubImage3D
{
8160 typedef TexSubImage3D ValueType
;
8161 static const CommandId kCmdId
= kTexSubImage3D
;
8162 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8163 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8165 static uint32_t ComputeSize() {
8166 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8169 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8171 void Init(GLenum _target
,
8181 uint32_t _pixels_shm_id
,
8182 uint32_t _pixels_shm_offset
,
8183 GLboolean _internal
) {
8195 pixels_shm_id
= _pixels_shm_id
;
8196 pixels_shm_offset
= _pixels_shm_offset
;
8197 internal
= _internal
;
8200 void* Set(void* cmd
,
8211 uint32_t _pixels_shm_id
,
8212 uint32_t _pixels_shm_offset
,
8213 GLboolean _internal
) {
8214 static_cast<ValueType
*>(cmd
)->Init(
8215 _target
, _level
, _xoffset
, _yoffset
, _zoffset
, _width
, _height
, _depth
,
8216 _format
, _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
8217 return NextCmdAddress
<ValueType
>(cmd
);
8220 gpu::CommandHeader header
;
8231 uint32_t pixels_shm_id
;
8232 uint32_t pixels_shm_offset
;
8236 static_assert(sizeof(TexSubImage3D
) == 56,
8237 "size of TexSubImage3D should be 56");
8238 static_assert(offsetof(TexSubImage3D
, header
) == 0,
8239 "offset of TexSubImage3D header should be 0");
8240 static_assert(offsetof(TexSubImage3D
, target
) == 4,
8241 "offset of TexSubImage3D target should be 4");
8242 static_assert(offsetof(TexSubImage3D
, level
) == 8,
8243 "offset of TexSubImage3D level should be 8");
8244 static_assert(offsetof(TexSubImage3D
, xoffset
) == 12,
8245 "offset of TexSubImage3D xoffset should be 12");
8246 static_assert(offsetof(TexSubImage3D
, yoffset
) == 16,
8247 "offset of TexSubImage3D yoffset should be 16");
8248 static_assert(offsetof(TexSubImage3D
, zoffset
) == 20,
8249 "offset of TexSubImage3D zoffset should be 20");
8250 static_assert(offsetof(TexSubImage3D
, width
) == 24,
8251 "offset of TexSubImage3D width should be 24");
8252 static_assert(offsetof(TexSubImage3D
, height
) == 28,
8253 "offset of TexSubImage3D height should be 28");
8254 static_assert(offsetof(TexSubImage3D
, depth
) == 32,
8255 "offset of TexSubImage3D depth should be 32");
8256 static_assert(offsetof(TexSubImage3D
, format
) == 36,
8257 "offset of TexSubImage3D format should be 36");
8258 static_assert(offsetof(TexSubImage3D
, type
) == 40,
8259 "offset of TexSubImage3D type should be 40");
8260 static_assert(offsetof(TexSubImage3D
, pixels_shm_id
) == 44,
8261 "offset of TexSubImage3D pixels_shm_id should be 44");
8262 static_assert(offsetof(TexSubImage3D
, pixels_shm_offset
) == 48,
8263 "offset of TexSubImage3D pixels_shm_offset should be 48");
8264 static_assert(offsetof(TexSubImage3D
, internal
) == 52,
8265 "offset of TexSubImage3D internal should be 52");
8267 struct TransformFeedbackVaryingsBucket
{
8268 typedef TransformFeedbackVaryingsBucket ValueType
;
8269 static const CommandId kCmdId
= kTransformFeedbackVaryingsBucket
;
8270 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8271 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8273 static uint32_t ComputeSize() {
8274 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8277 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8279 void Init(GLuint _program
, uint32_t _varyings_bucket_id
, GLenum _buffermode
) {
8282 varyings_bucket_id
= _varyings_bucket_id
;
8283 buffermode
= _buffermode
;
8286 void* Set(void* cmd
,
8288 uint32_t _varyings_bucket_id
,
8289 GLenum _buffermode
) {
8290 static_cast<ValueType
*>(cmd
)
8291 ->Init(_program
, _varyings_bucket_id
, _buffermode
);
8292 return NextCmdAddress
<ValueType
>(cmd
);
8295 gpu::CommandHeader header
;
8297 uint32_t varyings_bucket_id
;
8298 uint32_t buffermode
;
8301 static_assert(sizeof(TransformFeedbackVaryingsBucket
) == 16,
8302 "size of TransformFeedbackVaryingsBucket should be 16");
8303 static_assert(offsetof(TransformFeedbackVaryingsBucket
, header
) == 0,
8304 "offset of TransformFeedbackVaryingsBucket header should be 0");
8305 static_assert(offsetof(TransformFeedbackVaryingsBucket
, program
) == 4,
8306 "offset of TransformFeedbackVaryingsBucket program should be 4");
8308 offsetof(TransformFeedbackVaryingsBucket
, varyings_bucket_id
) == 8,
8309 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8");
8311 offsetof(TransformFeedbackVaryingsBucket
, buffermode
) == 12,
8312 "offset of TransformFeedbackVaryingsBucket buffermode should be 12");
8315 typedef Uniform1f ValueType
;
8316 static const CommandId kCmdId
= kUniform1f
;
8317 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8318 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8320 static uint32_t ComputeSize() {
8321 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8324 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8326 void Init(GLint _location
, GLfloat _x
) {
8328 location
= _location
;
8332 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
8333 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
8334 return NextCmdAddress
<ValueType
>(cmd
);
8337 gpu::CommandHeader header
;
8342 static_assert(sizeof(Uniform1f
) == 12, "size of Uniform1f should be 12");
8343 static_assert(offsetof(Uniform1f
, header
) == 0,
8344 "offset of Uniform1f header should be 0");
8345 static_assert(offsetof(Uniform1f
, location
) == 4,
8346 "offset of Uniform1f location should be 4");
8347 static_assert(offsetof(Uniform1f
, x
) == 8, "offset of Uniform1f x should be 8");
8349 struct Uniform1fvImmediate
{
8350 typedef Uniform1fvImmediate ValueType
;
8351 static const CommandId kCmdId
= kUniform1fvImmediate
;
8352 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8353 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8355 static uint32_t ComputeDataSize(GLsizei count
) {
8356 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
8359 static uint32_t ComputeSize(GLsizei count
) {
8360 return static_cast<uint32_t>(sizeof(ValueType
) +
8361 ComputeDataSize(count
)); // NOLINT
8364 void SetHeader(GLsizei count
) {
8365 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8368 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8370 location
= _location
;
8372 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8375 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8376 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8377 const uint32_t size
= ComputeSize(_count
);
8378 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8381 gpu::CommandHeader header
;
8386 static_assert(sizeof(Uniform1fvImmediate
) == 12,
8387 "size of Uniform1fvImmediate should be 12");
8388 static_assert(offsetof(Uniform1fvImmediate
, header
) == 0,
8389 "offset of Uniform1fvImmediate header should be 0");
8390 static_assert(offsetof(Uniform1fvImmediate
, location
) == 4,
8391 "offset of Uniform1fvImmediate location should be 4");
8392 static_assert(offsetof(Uniform1fvImmediate
, count
) == 8,
8393 "offset of Uniform1fvImmediate count should be 8");
8396 typedef Uniform1i ValueType
;
8397 static const CommandId kCmdId
= kUniform1i
;
8398 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8399 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8401 static uint32_t ComputeSize() {
8402 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8405 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8407 void Init(GLint _location
, GLint _x
) {
8409 location
= _location
;
8413 void* Set(void* cmd
, GLint _location
, GLint _x
) {
8414 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
8415 return NextCmdAddress
<ValueType
>(cmd
);
8418 gpu::CommandHeader header
;
8423 static_assert(sizeof(Uniform1i
) == 12, "size of Uniform1i should be 12");
8424 static_assert(offsetof(Uniform1i
, header
) == 0,
8425 "offset of Uniform1i header should be 0");
8426 static_assert(offsetof(Uniform1i
, location
) == 4,
8427 "offset of Uniform1i location should be 4");
8428 static_assert(offsetof(Uniform1i
, x
) == 8, "offset of Uniform1i x should be 8");
8430 struct Uniform1ivImmediate
{
8431 typedef Uniform1ivImmediate ValueType
;
8432 static const CommandId kCmdId
= kUniform1ivImmediate
;
8433 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8434 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8436 static uint32_t ComputeDataSize(GLsizei count
) {
8437 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
8440 static uint32_t ComputeSize(GLsizei count
) {
8441 return static_cast<uint32_t>(sizeof(ValueType
) +
8442 ComputeDataSize(count
)); // NOLINT
8445 void SetHeader(GLsizei count
) {
8446 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8449 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8451 location
= _location
;
8453 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8456 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8457 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8458 const uint32_t size
= ComputeSize(_count
);
8459 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8462 gpu::CommandHeader header
;
8467 static_assert(sizeof(Uniform1ivImmediate
) == 12,
8468 "size of Uniform1ivImmediate should be 12");
8469 static_assert(offsetof(Uniform1ivImmediate
, header
) == 0,
8470 "offset of Uniform1ivImmediate header should be 0");
8471 static_assert(offsetof(Uniform1ivImmediate
, location
) == 4,
8472 "offset of Uniform1ivImmediate location should be 4");
8473 static_assert(offsetof(Uniform1ivImmediate
, count
) == 8,
8474 "offset of Uniform1ivImmediate count should be 8");
8477 typedef Uniform1ui ValueType
;
8478 static const CommandId kCmdId
= kUniform1ui
;
8479 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8480 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8482 static uint32_t ComputeSize() {
8483 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8486 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8488 void Init(GLint _location
, GLuint _x
) {
8490 location
= _location
;
8494 void* Set(void* cmd
, GLint _location
, GLuint _x
) {
8495 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
8496 return NextCmdAddress
<ValueType
>(cmd
);
8499 gpu::CommandHeader header
;
8504 static_assert(sizeof(Uniform1ui
) == 12, "size of Uniform1ui should be 12");
8505 static_assert(offsetof(Uniform1ui
, header
) == 0,
8506 "offset of Uniform1ui header should be 0");
8507 static_assert(offsetof(Uniform1ui
, location
) == 4,
8508 "offset of Uniform1ui location should be 4");
8509 static_assert(offsetof(Uniform1ui
, x
) == 8,
8510 "offset of Uniform1ui x should be 8");
8512 struct Uniform1uivImmediate
{
8513 typedef Uniform1uivImmediate ValueType
;
8514 static const CommandId kCmdId
= kUniform1uivImmediate
;
8515 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8516 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8518 static uint32_t ComputeDataSize(GLsizei count
) {
8519 return static_cast<uint32_t>(sizeof(GLuint
) * 1 * count
); // NOLINT
8522 static uint32_t ComputeSize(GLsizei count
) {
8523 return static_cast<uint32_t>(sizeof(ValueType
) +
8524 ComputeDataSize(count
)); // NOLINT
8527 void SetHeader(GLsizei count
) {
8528 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8531 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8533 location
= _location
;
8535 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8538 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8539 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8540 const uint32_t size
= ComputeSize(_count
);
8541 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8544 gpu::CommandHeader header
;
8549 static_assert(sizeof(Uniform1uivImmediate
) == 12,
8550 "size of Uniform1uivImmediate should be 12");
8551 static_assert(offsetof(Uniform1uivImmediate
, header
) == 0,
8552 "offset of Uniform1uivImmediate header should be 0");
8553 static_assert(offsetof(Uniform1uivImmediate
, location
) == 4,
8554 "offset of Uniform1uivImmediate location should be 4");
8555 static_assert(offsetof(Uniform1uivImmediate
, count
) == 8,
8556 "offset of Uniform1uivImmediate count should be 8");
8559 typedef Uniform2f ValueType
;
8560 static const CommandId kCmdId
= kUniform2f
;
8561 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8562 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8564 static uint32_t ComputeSize() {
8565 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8568 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8570 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
8572 location
= _location
;
8577 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
8578 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8579 return NextCmdAddress
<ValueType
>(cmd
);
8582 gpu::CommandHeader header
;
8588 static_assert(sizeof(Uniform2f
) == 16, "size of Uniform2f should be 16");
8589 static_assert(offsetof(Uniform2f
, header
) == 0,
8590 "offset of Uniform2f header should be 0");
8591 static_assert(offsetof(Uniform2f
, location
) == 4,
8592 "offset of Uniform2f location should be 4");
8593 static_assert(offsetof(Uniform2f
, x
) == 8, "offset of Uniform2f x should be 8");
8594 static_assert(offsetof(Uniform2f
, y
) == 12,
8595 "offset of Uniform2f y should be 12");
8597 struct Uniform2fvImmediate
{
8598 typedef Uniform2fvImmediate ValueType
;
8599 static const CommandId kCmdId
= kUniform2fvImmediate
;
8600 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8601 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8603 static uint32_t ComputeDataSize(GLsizei count
) {
8604 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
8607 static uint32_t ComputeSize(GLsizei count
) {
8608 return static_cast<uint32_t>(sizeof(ValueType
) +
8609 ComputeDataSize(count
)); // NOLINT
8612 void SetHeader(GLsizei count
) {
8613 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8616 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8618 location
= _location
;
8620 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8623 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8624 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8625 const uint32_t size
= ComputeSize(_count
);
8626 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8629 gpu::CommandHeader header
;
8634 static_assert(sizeof(Uniform2fvImmediate
) == 12,
8635 "size of Uniform2fvImmediate should be 12");
8636 static_assert(offsetof(Uniform2fvImmediate
, header
) == 0,
8637 "offset of Uniform2fvImmediate header should be 0");
8638 static_assert(offsetof(Uniform2fvImmediate
, location
) == 4,
8639 "offset of Uniform2fvImmediate location should be 4");
8640 static_assert(offsetof(Uniform2fvImmediate
, count
) == 8,
8641 "offset of Uniform2fvImmediate count should be 8");
8644 typedef Uniform2i ValueType
;
8645 static const CommandId kCmdId
= kUniform2i
;
8646 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8647 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8649 static uint32_t ComputeSize() {
8650 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8653 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8655 void Init(GLint _location
, GLint _x
, GLint _y
) {
8657 location
= _location
;
8662 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
8663 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8664 return NextCmdAddress
<ValueType
>(cmd
);
8667 gpu::CommandHeader header
;
8673 static_assert(sizeof(Uniform2i
) == 16, "size of Uniform2i should be 16");
8674 static_assert(offsetof(Uniform2i
, header
) == 0,
8675 "offset of Uniform2i header should be 0");
8676 static_assert(offsetof(Uniform2i
, location
) == 4,
8677 "offset of Uniform2i location should be 4");
8678 static_assert(offsetof(Uniform2i
, x
) == 8, "offset of Uniform2i x should be 8");
8679 static_assert(offsetof(Uniform2i
, y
) == 12,
8680 "offset of Uniform2i y should be 12");
8682 struct Uniform2ivImmediate
{
8683 typedef Uniform2ivImmediate ValueType
;
8684 static const CommandId kCmdId
= kUniform2ivImmediate
;
8685 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8686 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8688 static uint32_t ComputeDataSize(GLsizei count
) {
8689 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
8692 static uint32_t ComputeSize(GLsizei count
) {
8693 return static_cast<uint32_t>(sizeof(ValueType
) +
8694 ComputeDataSize(count
)); // NOLINT
8697 void SetHeader(GLsizei count
) {
8698 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8701 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8703 location
= _location
;
8705 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8708 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8709 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8710 const uint32_t size
= ComputeSize(_count
);
8711 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8714 gpu::CommandHeader header
;
8719 static_assert(sizeof(Uniform2ivImmediate
) == 12,
8720 "size of Uniform2ivImmediate should be 12");
8721 static_assert(offsetof(Uniform2ivImmediate
, header
) == 0,
8722 "offset of Uniform2ivImmediate header should be 0");
8723 static_assert(offsetof(Uniform2ivImmediate
, location
) == 4,
8724 "offset of Uniform2ivImmediate location should be 4");
8725 static_assert(offsetof(Uniform2ivImmediate
, count
) == 8,
8726 "offset of Uniform2ivImmediate count should be 8");
8729 typedef Uniform2ui ValueType
;
8730 static const CommandId kCmdId
= kUniform2ui
;
8731 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8732 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8734 static uint32_t ComputeSize() {
8735 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8738 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8740 void Init(GLint _location
, GLuint _x
, GLuint _y
) {
8742 location
= _location
;
8747 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
) {
8748 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
8749 return NextCmdAddress
<ValueType
>(cmd
);
8752 gpu::CommandHeader header
;
8758 static_assert(sizeof(Uniform2ui
) == 16, "size of Uniform2ui should be 16");
8759 static_assert(offsetof(Uniform2ui
, header
) == 0,
8760 "offset of Uniform2ui header should be 0");
8761 static_assert(offsetof(Uniform2ui
, location
) == 4,
8762 "offset of Uniform2ui location should be 4");
8763 static_assert(offsetof(Uniform2ui
, x
) == 8,
8764 "offset of Uniform2ui x should be 8");
8765 static_assert(offsetof(Uniform2ui
, y
) == 12,
8766 "offset of Uniform2ui y should be 12");
8768 struct Uniform2uivImmediate
{
8769 typedef Uniform2uivImmediate ValueType
;
8770 static const CommandId kCmdId
= kUniform2uivImmediate
;
8771 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8772 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8774 static uint32_t ComputeDataSize(GLsizei count
) {
8775 return static_cast<uint32_t>(sizeof(GLuint
) * 2 * count
); // NOLINT
8778 static uint32_t ComputeSize(GLsizei count
) {
8779 return static_cast<uint32_t>(sizeof(ValueType
) +
8780 ComputeDataSize(count
)); // NOLINT
8783 void SetHeader(GLsizei count
) {
8784 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8787 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8789 location
= _location
;
8791 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8794 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
8795 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8796 const uint32_t size
= ComputeSize(_count
);
8797 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8800 gpu::CommandHeader header
;
8805 static_assert(sizeof(Uniform2uivImmediate
) == 12,
8806 "size of Uniform2uivImmediate should be 12");
8807 static_assert(offsetof(Uniform2uivImmediate
, header
) == 0,
8808 "offset of Uniform2uivImmediate header should be 0");
8809 static_assert(offsetof(Uniform2uivImmediate
, location
) == 4,
8810 "offset of Uniform2uivImmediate location should be 4");
8811 static_assert(offsetof(Uniform2uivImmediate
, count
) == 8,
8812 "offset of Uniform2uivImmediate count should be 8");
8815 typedef Uniform3f ValueType
;
8816 static const CommandId kCmdId
= kUniform3f
;
8817 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8818 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8820 static uint32_t ComputeSize() {
8821 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8824 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8826 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8828 location
= _location
;
8834 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
8835 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8836 return NextCmdAddress
<ValueType
>(cmd
);
8839 gpu::CommandHeader header
;
8846 static_assert(sizeof(Uniform3f
) == 20, "size of Uniform3f should be 20");
8847 static_assert(offsetof(Uniform3f
, header
) == 0,
8848 "offset of Uniform3f header should be 0");
8849 static_assert(offsetof(Uniform3f
, location
) == 4,
8850 "offset of Uniform3f location should be 4");
8851 static_assert(offsetof(Uniform3f
, x
) == 8, "offset of Uniform3f x should be 8");
8852 static_assert(offsetof(Uniform3f
, y
) == 12,
8853 "offset of Uniform3f y should be 12");
8854 static_assert(offsetof(Uniform3f
, z
) == 16,
8855 "offset of Uniform3f z should be 16");
8857 struct Uniform3fvImmediate
{
8858 typedef Uniform3fvImmediate ValueType
;
8859 static const CommandId kCmdId
= kUniform3fvImmediate
;
8860 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8861 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8863 static uint32_t ComputeDataSize(GLsizei count
) {
8864 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
8867 static uint32_t ComputeSize(GLsizei count
) {
8868 return static_cast<uint32_t>(sizeof(ValueType
) +
8869 ComputeDataSize(count
)); // NOLINT
8872 void SetHeader(GLsizei count
) {
8873 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8876 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8878 location
= _location
;
8880 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8883 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
8884 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8885 const uint32_t size
= ComputeSize(_count
);
8886 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8889 gpu::CommandHeader header
;
8894 static_assert(sizeof(Uniform3fvImmediate
) == 12,
8895 "size of Uniform3fvImmediate should be 12");
8896 static_assert(offsetof(Uniform3fvImmediate
, header
) == 0,
8897 "offset of Uniform3fvImmediate header should be 0");
8898 static_assert(offsetof(Uniform3fvImmediate
, location
) == 4,
8899 "offset of Uniform3fvImmediate location should be 4");
8900 static_assert(offsetof(Uniform3fvImmediate
, count
) == 8,
8901 "offset of Uniform3fvImmediate count should be 8");
8904 typedef Uniform3i ValueType
;
8905 static const CommandId kCmdId
= kUniform3i
;
8906 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8907 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8909 static uint32_t ComputeSize() {
8910 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8913 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8915 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8917 location
= _location
;
8923 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
8924 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
8925 return NextCmdAddress
<ValueType
>(cmd
);
8928 gpu::CommandHeader header
;
8935 static_assert(sizeof(Uniform3i
) == 20, "size of Uniform3i should be 20");
8936 static_assert(offsetof(Uniform3i
, header
) == 0,
8937 "offset of Uniform3i header should be 0");
8938 static_assert(offsetof(Uniform3i
, location
) == 4,
8939 "offset of Uniform3i location should be 4");
8940 static_assert(offsetof(Uniform3i
, x
) == 8, "offset of Uniform3i x should be 8");
8941 static_assert(offsetof(Uniform3i
, y
) == 12,
8942 "offset of Uniform3i y should be 12");
8943 static_assert(offsetof(Uniform3i
, z
) == 16,
8944 "offset of Uniform3i z should be 16");
8946 struct Uniform3ivImmediate
{
8947 typedef Uniform3ivImmediate ValueType
;
8948 static const CommandId kCmdId
= kUniform3ivImmediate
;
8949 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8950 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8952 static uint32_t ComputeDataSize(GLsizei count
) {
8953 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
8956 static uint32_t ComputeSize(GLsizei count
) {
8957 return static_cast<uint32_t>(sizeof(ValueType
) +
8958 ComputeDataSize(count
)); // NOLINT
8961 void SetHeader(GLsizei count
) {
8962 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8965 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
8967 location
= _location
;
8969 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
8972 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
8973 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
8974 const uint32_t size
= ComputeSize(_count
);
8975 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8978 gpu::CommandHeader header
;
8983 static_assert(sizeof(Uniform3ivImmediate
) == 12,
8984 "size of Uniform3ivImmediate should be 12");
8985 static_assert(offsetof(Uniform3ivImmediate
, header
) == 0,
8986 "offset of Uniform3ivImmediate header should be 0");
8987 static_assert(offsetof(Uniform3ivImmediate
, location
) == 4,
8988 "offset of Uniform3ivImmediate location should be 4");
8989 static_assert(offsetof(Uniform3ivImmediate
, count
) == 8,
8990 "offset of Uniform3ivImmediate count should be 8");
8993 typedef Uniform3ui ValueType
;
8994 static const CommandId kCmdId
= kUniform3ui
;
8995 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8996 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8998 static uint32_t ComputeSize() {
8999 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9002 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9004 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
9006 location
= _location
;
9012 void* Set(void* cmd
, GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
) {
9013 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
9014 return NextCmdAddress
<ValueType
>(cmd
);
9017 gpu::CommandHeader header
;
9024 static_assert(sizeof(Uniform3ui
) == 20, "size of Uniform3ui should be 20");
9025 static_assert(offsetof(Uniform3ui
, header
) == 0,
9026 "offset of Uniform3ui header should be 0");
9027 static_assert(offsetof(Uniform3ui
, location
) == 4,
9028 "offset of Uniform3ui location should be 4");
9029 static_assert(offsetof(Uniform3ui
, x
) == 8,
9030 "offset of Uniform3ui x should be 8");
9031 static_assert(offsetof(Uniform3ui
, y
) == 12,
9032 "offset of Uniform3ui y should be 12");
9033 static_assert(offsetof(Uniform3ui
, z
) == 16,
9034 "offset of Uniform3ui z should be 16");
9036 struct Uniform3uivImmediate
{
9037 typedef Uniform3uivImmediate ValueType
;
9038 static const CommandId kCmdId
= kUniform3uivImmediate
;
9039 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9040 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9042 static uint32_t ComputeDataSize(GLsizei count
) {
9043 return static_cast<uint32_t>(sizeof(GLuint
) * 3 * count
); // NOLINT
9046 static uint32_t ComputeSize(GLsizei count
) {
9047 return static_cast<uint32_t>(sizeof(ValueType
) +
9048 ComputeDataSize(count
)); // NOLINT
9051 void SetHeader(GLsizei count
) {
9052 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9055 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
9057 location
= _location
;
9059 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
9062 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
9063 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
9064 const uint32_t size
= ComputeSize(_count
);
9065 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9068 gpu::CommandHeader header
;
9073 static_assert(sizeof(Uniform3uivImmediate
) == 12,
9074 "size of Uniform3uivImmediate should be 12");
9075 static_assert(offsetof(Uniform3uivImmediate
, header
) == 0,
9076 "offset of Uniform3uivImmediate header should be 0");
9077 static_assert(offsetof(Uniform3uivImmediate
, location
) == 4,
9078 "offset of Uniform3uivImmediate location should be 4");
9079 static_assert(offsetof(Uniform3uivImmediate
, count
) == 8,
9080 "offset of Uniform3uivImmediate count should be 8");
9083 typedef Uniform4f ValueType
;
9084 static const CommandId kCmdId
= kUniform4f
;
9085 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9086 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9088 static uint32_t ComputeSize() {
9089 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9092 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9094 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
9096 location
= _location
;
9103 void* Set(void* cmd
,
9109 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
9110 return NextCmdAddress
<ValueType
>(cmd
);
9113 gpu::CommandHeader header
;
9121 static_assert(sizeof(Uniform4f
) == 24, "size of Uniform4f should be 24");
9122 static_assert(offsetof(Uniform4f
, header
) == 0,
9123 "offset of Uniform4f header should be 0");
9124 static_assert(offsetof(Uniform4f
, location
) == 4,
9125 "offset of Uniform4f location should be 4");
9126 static_assert(offsetof(Uniform4f
, x
) == 8, "offset of Uniform4f x should be 8");
9127 static_assert(offsetof(Uniform4f
, y
) == 12,
9128 "offset of Uniform4f y should be 12");
9129 static_assert(offsetof(Uniform4f
, z
) == 16,
9130 "offset of Uniform4f z should be 16");
9131 static_assert(offsetof(Uniform4f
, w
) == 20,
9132 "offset of Uniform4f w should be 20");
9134 struct Uniform4fvImmediate
{
9135 typedef Uniform4fvImmediate ValueType
;
9136 static const CommandId kCmdId
= kUniform4fvImmediate
;
9137 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9138 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9140 static uint32_t ComputeDataSize(GLsizei count
) {
9141 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
9144 static uint32_t ComputeSize(GLsizei count
) {
9145 return static_cast<uint32_t>(sizeof(ValueType
) +
9146 ComputeDataSize(count
)); // NOLINT
9149 void SetHeader(GLsizei count
) {
9150 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9153 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
9155 location
= _location
;
9157 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
9160 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
9161 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
9162 const uint32_t size
= ComputeSize(_count
);
9163 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9166 gpu::CommandHeader header
;
9171 static_assert(sizeof(Uniform4fvImmediate
) == 12,
9172 "size of Uniform4fvImmediate should be 12");
9173 static_assert(offsetof(Uniform4fvImmediate
, header
) == 0,
9174 "offset of Uniform4fvImmediate header should be 0");
9175 static_assert(offsetof(Uniform4fvImmediate
, location
) == 4,
9176 "offset of Uniform4fvImmediate location should be 4");
9177 static_assert(offsetof(Uniform4fvImmediate
, count
) == 8,
9178 "offset of Uniform4fvImmediate count should be 8");
9181 typedef Uniform4i ValueType
;
9182 static const CommandId kCmdId
= kUniform4i
;
9183 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9184 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9186 static uint32_t ComputeSize() {
9187 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9190 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9192 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
9194 location
= _location
;
9201 void* Set(void* cmd
,
9207 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
9208 return NextCmdAddress
<ValueType
>(cmd
);
9211 gpu::CommandHeader header
;
9219 static_assert(sizeof(Uniform4i
) == 24, "size of Uniform4i should be 24");
9220 static_assert(offsetof(Uniform4i
, header
) == 0,
9221 "offset of Uniform4i header should be 0");
9222 static_assert(offsetof(Uniform4i
, location
) == 4,
9223 "offset of Uniform4i location should be 4");
9224 static_assert(offsetof(Uniform4i
, x
) == 8, "offset of Uniform4i x should be 8");
9225 static_assert(offsetof(Uniform4i
, y
) == 12,
9226 "offset of Uniform4i y should be 12");
9227 static_assert(offsetof(Uniform4i
, z
) == 16,
9228 "offset of Uniform4i z should be 16");
9229 static_assert(offsetof(Uniform4i
, w
) == 20,
9230 "offset of Uniform4i w should be 20");
9232 struct Uniform4ivImmediate
{
9233 typedef Uniform4ivImmediate ValueType
;
9234 static const CommandId kCmdId
= kUniform4ivImmediate
;
9235 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9236 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9238 static uint32_t ComputeDataSize(GLsizei count
) {
9239 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
9242 static uint32_t ComputeSize(GLsizei count
) {
9243 return static_cast<uint32_t>(sizeof(ValueType
) +
9244 ComputeDataSize(count
)); // NOLINT
9247 void SetHeader(GLsizei count
) {
9248 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9251 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
9253 location
= _location
;
9255 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
9258 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
9259 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
9260 const uint32_t size
= ComputeSize(_count
);
9261 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9264 gpu::CommandHeader header
;
9269 static_assert(sizeof(Uniform4ivImmediate
) == 12,
9270 "size of Uniform4ivImmediate should be 12");
9271 static_assert(offsetof(Uniform4ivImmediate
, header
) == 0,
9272 "offset of Uniform4ivImmediate header should be 0");
9273 static_assert(offsetof(Uniform4ivImmediate
, location
) == 4,
9274 "offset of Uniform4ivImmediate location should be 4");
9275 static_assert(offsetof(Uniform4ivImmediate
, count
) == 8,
9276 "offset of Uniform4ivImmediate count should be 8");
9279 typedef Uniform4ui ValueType
;
9280 static const CommandId kCmdId
= kUniform4ui
;
9281 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9282 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9284 static uint32_t ComputeSize() {
9285 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9288 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9290 void Init(GLint _location
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
9292 location
= _location
;
9299 void* Set(void* cmd
,
9305 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
9306 return NextCmdAddress
<ValueType
>(cmd
);
9309 gpu::CommandHeader header
;
9317 static_assert(sizeof(Uniform4ui
) == 24, "size of Uniform4ui should be 24");
9318 static_assert(offsetof(Uniform4ui
, header
) == 0,
9319 "offset of Uniform4ui header should be 0");
9320 static_assert(offsetof(Uniform4ui
, location
) == 4,
9321 "offset of Uniform4ui location should be 4");
9322 static_assert(offsetof(Uniform4ui
, x
) == 8,
9323 "offset of Uniform4ui x should be 8");
9324 static_assert(offsetof(Uniform4ui
, y
) == 12,
9325 "offset of Uniform4ui y should be 12");
9326 static_assert(offsetof(Uniform4ui
, z
) == 16,
9327 "offset of Uniform4ui z should be 16");
9328 static_assert(offsetof(Uniform4ui
, w
) == 20,
9329 "offset of Uniform4ui w should be 20");
9331 struct Uniform4uivImmediate
{
9332 typedef Uniform4uivImmediate ValueType
;
9333 static const CommandId kCmdId
= kUniform4uivImmediate
;
9334 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9335 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9337 static uint32_t ComputeDataSize(GLsizei count
) {
9338 return static_cast<uint32_t>(sizeof(GLuint
) * 4 * count
); // NOLINT
9341 static uint32_t ComputeSize(GLsizei count
) {
9342 return static_cast<uint32_t>(sizeof(ValueType
) +
9343 ComputeDataSize(count
)); // NOLINT
9346 void SetHeader(GLsizei count
) {
9347 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9350 void Init(GLint _location
, GLsizei _count
, const GLuint
* _v
) {
9352 location
= _location
;
9354 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
9357 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLuint
* _v
) {
9358 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
9359 const uint32_t size
= ComputeSize(_count
);
9360 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9363 gpu::CommandHeader header
;
9368 static_assert(sizeof(Uniform4uivImmediate
) == 12,
9369 "size of Uniform4uivImmediate should be 12");
9370 static_assert(offsetof(Uniform4uivImmediate
, header
) == 0,
9371 "offset of Uniform4uivImmediate header should be 0");
9372 static_assert(offsetof(Uniform4uivImmediate
, location
) == 4,
9373 "offset of Uniform4uivImmediate location should be 4");
9374 static_assert(offsetof(Uniform4uivImmediate
, count
) == 8,
9375 "offset of Uniform4uivImmediate count should be 8");
9377 struct UniformBlockBinding
{
9378 typedef UniformBlockBinding ValueType
;
9379 static const CommandId kCmdId
= kUniformBlockBinding
;
9380 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9381 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9383 static uint32_t ComputeSize() {
9384 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9387 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9389 void Init(GLuint _program
, GLuint _index
, GLuint _binding
) {
9396 void* Set(void* cmd
, GLuint _program
, GLuint _index
, GLuint _binding
) {
9397 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _binding
);
9398 return NextCmdAddress
<ValueType
>(cmd
);
9401 gpu::CommandHeader header
;
9407 static_assert(sizeof(UniformBlockBinding
) == 16,
9408 "size of UniformBlockBinding should be 16");
9409 static_assert(offsetof(UniformBlockBinding
, header
) == 0,
9410 "offset of UniformBlockBinding header should be 0");
9411 static_assert(offsetof(UniformBlockBinding
, program
) == 4,
9412 "offset of UniformBlockBinding program should be 4");
9413 static_assert(offsetof(UniformBlockBinding
, index
) == 8,
9414 "offset of UniformBlockBinding index should be 8");
9415 static_assert(offsetof(UniformBlockBinding
, binding
) == 12,
9416 "offset of UniformBlockBinding binding should be 12");
9418 struct UniformMatrix2fvImmediate
{
9419 typedef UniformMatrix2fvImmediate ValueType
;
9420 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
9421 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9422 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9424 static uint32_t ComputeDataSize(GLsizei count
) {
9425 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
9428 static uint32_t ComputeSize(GLsizei count
) {
9429 return static_cast<uint32_t>(sizeof(ValueType
) +
9430 ComputeDataSize(count
)); // NOLINT
9433 void SetHeader(GLsizei count
) {
9434 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9437 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9439 location
= _location
;
9441 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9444 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9445 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9446 const uint32_t size
= ComputeSize(_count
);
9447 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9450 gpu::CommandHeader header
;
9453 static const uint32_t transpose
= false;
9456 static_assert(sizeof(UniformMatrix2fvImmediate
) == 12,
9457 "size of UniformMatrix2fvImmediate should be 12");
9458 static_assert(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
9459 "offset of UniformMatrix2fvImmediate header should be 0");
9460 static_assert(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
9461 "offset of UniformMatrix2fvImmediate location should be 4");
9462 static_assert(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
9463 "offset of UniformMatrix2fvImmediate count should be 8");
9465 struct UniformMatrix2x3fvImmediate
{
9466 typedef UniformMatrix2x3fvImmediate ValueType
;
9467 static const CommandId kCmdId
= kUniformMatrix2x3fvImmediate
;
9468 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9469 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9471 static uint32_t ComputeDataSize(GLsizei count
) {
9472 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
9475 static uint32_t ComputeSize(GLsizei count
) {
9476 return static_cast<uint32_t>(sizeof(ValueType
) +
9477 ComputeDataSize(count
)); // NOLINT
9480 void SetHeader(GLsizei count
) {
9481 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9484 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9486 location
= _location
;
9488 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9491 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9492 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9493 const uint32_t size
= ComputeSize(_count
);
9494 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9497 gpu::CommandHeader header
;
9500 static const uint32_t transpose
= false;
9503 static_assert(sizeof(UniformMatrix2x3fvImmediate
) == 12,
9504 "size of UniformMatrix2x3fvImmediate should be 12");
9505 static_assert(offsetof(UniformMatrix2x3fvImmediate
, header
) == 0,
9506 "offset of UniformMatrix2x3fvImmediate header should be 0");
9507 static_assert(offsetof(UniformMatrix2x3fvImmediate
, location
) == 4,
9508 "offset of UniformMatrix2x3fvImmediate location should be 4");
9509 static_assert(offsetof(UniformMatrix2x3fvImmediate
, count
) == 8,
9510 "offset of UniformMatrix2x3fvImmediate count should be 8");
9512 struct UniformMatrix2x4fvImmediate
{
9513 typedef UniformMatrix2x4fvImmediate ValueType
;
9514 static const CommandId kCmdId
= kUniformMatrix2x4fvImmediate
;
9515 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9516 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9518 static uint32_t ComputeDataSize(GLsizei count
) {
9519 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9522 static uint32_t ComputeSize(GLsizei count
) {
9523 return static_cast<uint32_t>(sizeof(ValueType
) +
9524 ComputeDataSize(count
)); // NOLINT
9527 void SetHeader(GLsizei count
) {
9528 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9531 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9533 location
= _location
;
9535 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9538 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9539 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9540 const uint32_t size
= ComputeSize(_count
);
9541 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9544 gpu::CommandHeader header
;
9547 static const uint32_t transpose
= false;
9550 static_assert(sizeof(UniformMatrix2x4fvImmediate
) == 12,
9551 "size of UniformMatrix2x4fvImmediate should be 12");
9552 static_assert(offsetof(UniformMatrix2x4fvImmediate
, header
) == 0,
9553 "offset of UniformMatrix2x4fvImmediate header should be 0");
9554 static_assert(offsetof(UniformMatrix2x4fvImmediate
, location
) == 4,
9555 "offset of UniformMatrix2x4fvImmediate location should be 4");
9556 static_assert(offsetof(UniformMatrix2x4fvImmediate
, count
) == 8,
9557 "offset of UniformMatrix2x4fvImmediate count should be 8");
9559 struct UniformMatrix3fvImmediate
{
9560 typedef UniformMatrix3fvImmediate ValueType
;
9561 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
9562 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9563 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9565 static uint32_t ComputeDataSize(GLsizei count
) {
9566 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
9569 static uint32_t ComputeSize(GLsizei count
) {
9570 return static_cast<uint32_t>(sizeof(ValueType
) +
9571 ComputeDataSize(count
)); // NOLINT
9574 void SetHeader(GLsizei count
) {
9575 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9578 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9580 location
= _location
;
9582 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9585 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9586 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9587 const uint32_t size
= ComputeSize(_count
);
9588 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9591 gpu::CommandHeader header
;
9594 static const uint32_t transpose
= false;
9597 static_assert(sizeof(UniformMatrix3fvImmediate
) == 12,
9598 "size of UniformMatrix3fvImmediate should be 12");
9599 static_assert(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
9600 "offset of UniformMatrix3fvImmediate header should be 0");
9601 static_assert(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
9602 "offset of UniformMatrix3fvImmediate location should be 4");
9603 static_assert(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
9604 "offset of UniformMatrix3fvImmediate count should be 8");
9606 struct UniformMatrix3x2fvImmediate
{
9607 typedef UniformMatrix3x2fvImmediate ValueType
;
9608 static const CommandId kCmdId
= kUniformMatrix3x2fvImmediate
;
9609 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9610 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9612 static uint32_t ComputeDataSize(GLsizei count
) {
9613 return static_cast<uint32_t>(sizeof(GLfloat
) * 6 * count
); // NOLINT
9616 static uint32_t ComputeSize(GLsizei count
) {
9617 return static_cast<uint32_t>(sizeof(ValueType
) +
9618 ComputeDataSize(count
)); // NOLINT
9621 void SetHeader(GLsizei count
) {
9622 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9625 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9627 location
= _location
;
9629 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9632 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9633 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9634 const uint32_t size
= ComputeSize(_count
);
9635 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9638 gpu::CommandHeader header
;
9641 static const uint32_t transpose
= false;
9644 static_assert(sizeof(UniformMatrix3x2fvImmediate
) == 12,
9645 "size of UniformMatrix3x2fvImmediate should be 12");
9646 static_assert(offsetof(UniformMatrix3x2fvImmediate
, header
) == 0,
9647 "offset of UniformMatrix3x2fvImmediate header should be 0");
9648 static_assert(offsetof(UniformMatrix3x2fvImmediate
, location
) == 4,
9649 "offset of UniformMatrix3x2fvImmediate location should be 4");
9650 static_assert(offsetof(UniformMatrix3x2fvImmediate
, count
) == 8,
9651 "offset of UniformMatrix3x2fvImmediate count should be 8");
9653 struct UniformMatrix3x4fvImmediate
{
9654 typedef UniformMatrix3x4fvImmediate ValueType
;
9655 static const CommandId kCmdId
= kUniformMatrix3x4fvImmediate
;
9656 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9657 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9659 static uint32_t ComputeDataSize(GLsizei count
) {
9660 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9663 static uint32_t ComputeSize(GLsizei count
) {
9664 return static_cast<uint32_t>(sizeof(ValueType
) +
9665 ComputeDataSize(count
)); // NOLINT
9668 void SetHeader(GLsizei count
) {
9669 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9672 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9674 location
= _location
;
9676 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9679 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9680 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9681 const uint32_t size
= ComputeSize(_count
);
9682 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9685 gpu::CommandHeader header
;
9688 static const uint32_t transpose
= false;
9691 static_assert(sizeof(UniformMatrix3x4fvImmediate
) == 12,
9692 "size of UniformMatrix3x4fvImmediate should be 12");
9693 static_assert(offsetof(UniformMatrix3x4fvImmediate
, header
) == 0,
9694 "offset of UniformMatrix3x4fvImmediate header should be 0");
9695 static_assert(offsetof(UniformMatrix3x4fvImmediate
, location
) == 4,
9696 "offset of UniformMatrix3x4fvImmediate location should be 4");
9697 static_assert(offsetof(UniformMatrix3x4fvImmediate
, count
) == 8,
9698 "offset of UniformMatrix3x4fvImmediate count should be 8");
9700 struct UniformMatrix4fvImmediate
{
9701 typedef UniformMatrix4fvImmediate ValueType
;
9702 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
9703 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9704 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9706 static uint32_t ComputeDataSize(GLsizei count
) {
9707 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
9710 static uint32_t ComputeSize(GLsizei count
) {
9711 return static_cast<uint32_t>(sizeof(ValueType
) +
9712 ComputeDataSize(count
)); // NOLINT
9715 void SetHeader(GLsizei count
) {
9716 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9719 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9721 location
= _location
;
9723 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9726 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9727 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9728 const uint32_t size
= ComputeSize(_count
);
9729 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9732 gpu::CommandHeader header
;
9735 static const uint32_t transpose
= false;
9738 static_assert(sizeof(UniformMatrix4fvImmediate
) == 12,
9739 "size of UniformMatrix4fvImmediate should be 12");
9740 static_assert(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
9741 "offset of UniformMatrix4fvImmediate header should be 0");
9742 static_assert(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
9743 "offset of UniformMatrix4fvImmediate location should be 4");
9744 static_assert(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
9745 "offset of UniformMatrix4fvImmediate count should be 8");
9747 struct UniformMatrix4x2fvImmediate
{
9748 typedef UniformMatrix4x2fvImmediate ValueType
;
9749 static const CommandId kCmdId
= kUniformMatrix4x2fvImmediate
;
9750 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9751 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9753 static uint32_t ComputeDataSize(GLsizei count
) {
9754 return static_cast<uint32_t>(sizeof(GLfloat
) * 8 * count
); // NOLINT
9757 static uint32_t ComputeSize(GLsizei count
) {
9758 return static_cast<uint32_t>(sizeof(ValueType
) +
9759 ComputeDataSize(count
)); // NOLINT
9762 void SetHeader(GLsizei count
) {
9763 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9766 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9768 location
= _location
;
9770 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9773 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9774 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9775 const uint32_t size
= ComputeSize(_count
);
9776 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9779 gpu::CommandHeader header
;
9782 static const uint32_t transpose
= false;
9785 static_assert(sizeof(UniformMatrix4x2fvImmediate
) == 12,
9786 "size of UniformMatrix4x2fvImmediate should be 12");
9787 static_assert(offsetof(UniformMatrix4x2fvImmediate
, header
) == 0,
9788 "offset of UniformMatrix4x2fvImmediate header should be 0");
9789 static_assert(offsetof(UniformMatrix4x2fvImmediate
, location
) == 4,
9790 "offset of UniformMatrix4x2fvImmediate location should be 4");
9791 static_assert(offsetof(UniformMatrix4x2fvImmediate
, count
) == 8,
9792 "offset of UniformMatrix4x2fvImmediate count should be 8");
9794 struct UniformMatrix4x3fvImmediate
{
9795 typedef UniformMatrix4x3fvImmediate ValueType
;
9796 static const CommandId kCmdId
= kUniformMatrix4x3fvImmediate
;
9797 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9798 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9800 static uint32_t ComputeDataSize(GLsizei count
) {
9801 return static_cast<uint32_t>(sizeof(GLfloat
) * 12 * count
); // NOLINT
9804 static uint32_t ComputeSize(GLsizei count
) {
9805 return static_cast<uint32_t>(sizeof(ValueType
) +
9806 ComputeDataSize(count
)); // NOLINT
9809 void SetHeader(GLsizei count
) {
9810 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
9813 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9815 location
= _location
;
9817 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
9820 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
9821 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
9822 const uint32_t size
= ComputeSize(_count
);
9823 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9826 gpu::CommandHeader header
;
9829 static const uint32_t transpose
= false;
9832 static_assert(sizeof(UniformMatrix4x3fvImmediate
) == 12,
9833 "size of UniformMatrix4x3fvImmediate should be 12");
9834 static_assert(offsetof(UniformMatrix4x3fvImmediate
, header
) == 0,
9835 "offset of UniformMatrix4x3fvImmediate header should be 0");
9836 static_assert(offsetof(UniformMatrix4x3fvImmediate
, location
) == 4,
9837 "offset of UniformMatrix4x3fvImmediate location should be 4");
9838 static_assert(offsetof(UniformMatrix4x3fvImmediate
, count
) == 8,
9839 "offset of UniformMatrix4x3fvImmediate count should be 8");
9842 typedef UseProgram ValueType
;
9843 static const CommandId kCmdId
= kUseProgram
;
9844 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9845 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9847 static uint32_t ComputeSize() {
9848 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9851 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9853 void Init(GLuint _program
) {
9858 void* Set(void* cmd
, GLuint _program
) {
9859 static_cast<ValueType
*>(cmd
)->Init(_program
);
9860 return NextCmdAddress
<ValueType
>(cmd
);
9863 gpu::CommandHeader header
;
9867 static_assert(sizeof(UseProgram
) == 8, "size of UseProgram should be 8");
9868 static_assert(offsetof(UseProgram
, header
) == 0,
9869 "offset of UseProgram header should be 0");
9870 static_assert(offsetof(UseProgram
, program
) == 4,
9871 "offset of UseProgram program should be 4");
9873 struct ValidateProgram
{
9874 typedef ValidateProgram ValueType
;
9875 static const CommandId kCmdId
= kValidateProgram
;
9876 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9877 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9879 static uint32_t ComputeSize() {
9880 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9883 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9885 void Init(GLuint _program
) {
9890 void* Set(void* cmd
, GLuint _program
) {
9891 static_cast<ValueType
*>(cmd
)->Init(_program
);
9892 return NextCmdAddress
<ValueType
>(cmd
);
9895 gpu::CommandHeader header
;
9899 static_assert(sizeof(ValidateProgram
) == 8,
9900 "size of ValidateProgram should be 8");
9901 static_assert(offsetof(ValidateProgram
, header
) == 0,
9902 "offset of ValidateProgram header should be 0");
9903 static_assert(offsetof(ValidateProgram
, program
) == 4,
9904 "offset of ValidateProgram program should be 4");
9906 struct VertexAttrib1f
{
9907 typedef VertexAttrib1f ValueType
;
9908 static const CommandId kCmdId
= kVertexAttrib1f
;
9909 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9910 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9912 static uint32_t ComputeSize() {
9913 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9916 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9918 void Init(GLuint _indx
, GLfloat _x
) {
9924 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
9925 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
9926 return NextCmdAddress
<ValueType
>(cmd
);
9929 gpu::CommandHeader header
;
9934 static_assert(sizeof(VertexAttrib1f
) == 12,
9935 "size of VertexAttrib1f should be 12");
9936 static_assert(offsetof(VertexAttrib1f
, header
) == 0,
9937 "offset of VertexAttrib1f header should be 0");
9938 static_assert(offsetof(VertexAttrib1f
, indx
) == 4,
9939 "offset of VertexAttrib1f indx should be 4");
9940 static_assert(offsetof(VertexAttrib1f
, x
) == 8,
9941 "offset of VertexAttrib1f x should be 8");
9943 struct VertexAttrib1fvImmediate
{
9944 typedef VertexAttrib1fvImmediate ValueType
;
9945 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
9946 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9947 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9949 static uint32_t ComputeDataSize() {
9950 return static_cast<uint32_t>(sizeof(GLfloat
) * 1);
9953 static uint32_t ComputeSize() {
9954 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
9957 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9959 void Init(GLuint _indx
, const GLfloat
* _values
) {
9962 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
9965 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
9966 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
9967 const uint32_t size
= ComputeSize();
9968 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9971 gpu::CommandHeader header
;
9975 static_assert(sizeof(VertexAttrib1fvImmediate
) == 8,
9976 "size of VertexAttrib1fvImmediate should be 8");
9977 static_assert(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
9978 "offset of VertexAttrib1fvImmediate header should be 0");
9979 static_assert(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
9980 "offset of VertexAttrib1fvImmediate indx should be 4");
9982 struct VertexAttrib2f
{
9983 typedef VertexAttrib2f ValueType
;
9984 static const CommandId kCmdId
= kVertexAttrib2f
;
9985 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9986 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9988 static uint32_t ComputeSize() {
9989 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9992 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9994 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
10001 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
10002 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
10003 return NextCmdAddress
<ValueType
>(cmd
);
10006 gpu::CommandHeader header
;
10012 static_assert(sizeof(VertexAttrib2f
) == 16,
10013 "size of VertexAttrib2f should be 16");
10014 static_assert(offsetof(VertexAttrib2f
, header
) == 0,
10015 "offset of VertexAttrib2f header should be 0");
10016 static_assert(offsetof(VertexAttrib2f
, indx
) == 4,
10017 "offset of VertexAttrib2f indx should be 4");
10018 static_assert(offsetof(VertexAttrib2f
, x
) == 8,
10019 "offset of VertexAttrib2f x should be 8");
10020 static_assert(offsetof(VertexAttrib2f
, y
) == 12,
10021 "offset of VertexAttrib2f y should be 12");
10023 struct VertexAttrib2fvImmediate
{
10024 typedef VertexAttrib2fvImmediate ValueType
;
10025 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
10026 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10027 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10029 static uint32_t ComputeDataSize() {
10030 return static_cast<uint32_t>(sizeof(GLfloat
) * 2);
10033 static uint32_t ComputeSize() {
10034 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10037 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10039 void Init(GLuint _indx
, const GLfloat
* _values
) {
10042 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10045 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
10046 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10047 const uint32_t size
= ComputeSize();
10048 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10051 gpu::CommandHeader header
;
10055 static_assert(sizeof(VertexAttrib2fvImmediate
) == 8,
10056 "size of VertexAttrib2fvImmediate should be 8");
10057 static_assert(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
10058 "offset of VertexAttrib2fvImmediate header should be 0");
10059 static_assert(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
10060 "offset of VertexAttrib2fvImmediate indx should be 4");
10062 struct VertexAttrib3f
{
10063 typedef VertexAttrib3f ValueType
;
10064 static const CommandId kCmdId
= kVertexAttrib3f
;
10065 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10066 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10068 static uint32_t ComputeSize() {
10069 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10072 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10074 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
10082 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
10083 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
10084 return NextCmdAddress
<ValueType
>(cmd
);
10087 gpu::CommandHeader header
;
10094 static_assert(sizeof(VertexAttrib3f
) == 20,
10095 "size of VertexAttrib3f should be 20");
10096 static_assert(offsetof(VertexAttrib3f
, header
) == 0,
10097 "offset of VertexAttrib3f header should be 0");
10098 static_assert(offsetof(VertexAttrib3f
, indx
) == 4,
10099 "offset of VertexAttrib3f indx should be 4");
10100 static_assert(offsetof(VertexAttrib3f
, x
) == 8,
10101 "offset of VertexAttrib3f x should be 8");
10102 static_assert(offsetof(VertexAttrib3f
, y
) == 12,
10103 "offset of VertexAttrib3f y should be 12");
10104 static_assert(offsetof(VertexAttrib3f
, z
) == 16,
10105 "offset of VertexAttrib3f z should be 16");
10107 struct VertexAttrib3fvImmediate
{
10108 typedef VertexAttrib3fvImmediate ValueType
;
10109 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
10110 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10111 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10113 static uint32_t ComputeDataSize() {
10114 return static_cast<uint32_t>(sizeof(GLfloat
) * 3);
10117 static uint32_t ComputeSize() {
10118 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10121 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10123 void Init(GLuint _indx
, const GLfloat
* _values
) {
10126 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10129 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
10130 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10131 const uint32_t size
= ComputeSize();
10132 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10135 gpu::CommandHeader header
;
10139 static_assert(sizeof(VertexAttrib3fvImmediate
) == 8,
10140 "size of VertexAttrib3fvImmediate should be 8");
10141 static_assert(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
10142 "offset of VertexAttrib3fvImmediate header should be 0");
10143 static_assert(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
10144 "offset of VertexAttrib3fvImmediate indx should be 4");
10146 struct VertexAttrib4f
{
10147 typedef VertexAttrib4f ValueType
;
10148 static const CommandId kCmdId
= kVertexAttrib4f
;
10149 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10150 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10152 static uint32_t ComputeSize() {
10153 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10156 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10158 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
10167 void* Set(void* cmd
,
10173 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
10174 return NextCmdAddress
<ValueType
>(cmd
);
10177 gpu::CommandHeader header
;
10185 static_assert(sizeof(VertexAttrib4f
) == 24,
10186 "size of VertexAttrib4f should be 24");
10187 static_assert(offsetof(VertexAttrib4f
, header
) == 0,
10188 "offset of VertexAttrib4f header should be 0");
10189 static_assert(offsetof(VertexAttrib4f
, indx
) == 4,
10190 "offset of VertexAttrib4f indx should be 4");
10191 static_assert(offsetof(VertexAttrib4f
, x
) == 8,
10192 "offset of VertexAttrib4f x should be 8");
10193 static_assert(offsetof(VertexAttrib4f
, y
) == 12,
10194 "offset of VertexAttrib4f y should be 12");
10195 static_assert(offsetof(VertexAttrib4f
, z
) == 16,
10196 "offset of VertexAttrib4f z should be 16");
10197 static_assert(offsetof(VertexAttrib4f
, w
) == 20,
10198 "offset of VertexAttrib4f w should be 20");
10200 struct VertexAttrib4fvImmediate
{
10201 typedef VertexAttrib4fvImmediate ValueType
;
10202 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
10203 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10204 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10206 static uint32_t ComputeDataSize() {
10207 return static_cast<uint32_t>(sizeof(GLfloat
) * 4);
10210 static uint32_t ComputeSize() {
10211 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10214 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10216 void Init(GLuint _indx
, const GLfloat
* _values
) {
10219 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10222 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
10223 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10224 const uint32_t size
= ComputeSize();
10225 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10228 gpu::CommandHeader header
;
10232 static_assert(sizeof(VertexAttrib4fvImmediate
) == 8,
10233 "size of VertexAttrib4fvImmediate should be 8");
10234 static_assert(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
10235 "offset of VertexAttrib4fvImmediate header should be 0");
10236 static_assert(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
10237 "offset of VertexAttrib4fvImmediate indx should be 4");
10239 struct VertexAttribI4i
{
10240 typedef VertexAttribI4i ValueType
;
10241 static const CommandId kCmdId
= kVertexAttribI4i
;
10242 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10243 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10245 static uint32_t ComputeSize() {
10246 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10249 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10251 void Init(GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
10260 void* Set(void* cmd
, GLuint _indx
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
10261 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
10262 return NextCmdAddress
<ValueType
>(cmd
);
10265 gpu::CommandHeader header
;
10273 static_assert(sizeof(VertexAttribI4i
) == 24,
10274 "size of VertexAttribI4i should be 24");
10275 static_assert(offsetof(VertexAttribI4i
, header
) == 0,
10276 "offset of VertexAttribI4i header should be 0");
10277 static_assert(offsetof(VertexAttribI4i
, indx
) == 4,
10278 "offset of VertexAttribI4i indx should be 4");
10279 static_assert(offsetof(VertexAttribI4i
, x
) == 8,
10280 "offset of VertexAttribI4i x should be 8");
10281 static_assert(offsetof(VertexAttribI4i
, y
) == 12,
10282 "offset of VertexAttribI4i y should be 12");
10283 static_assert(offsetof(VertexAttribI4i
, z
) == 16,
10284 "offset of VertexAttribI4i z should be 16");
10285 static_assert(offsetof(VertexAttribI4i
, w
) == 20,
10286 "offset of VertexAttribI4i w should be 20");
10288 struct VertexAttribI4ivImmediate
{
10289 typedef VertexAttribI4ivImmediate ValueType
;
10290 static const CommandId kCmdId
= kVertexAttribI4ivImmediate
;
10291 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10292 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10294 static uint32_t ComputeDataSize() {
10295 return static_cast<uint32_t>(sizeof(GLint
) * 4);
10298 static uint32_t ComputeSize() {
10299 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10302 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10304 void Init(GLuint _indx
, const GLint
* _values
) {
10307 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10310 void* Set(void* cmd
, GLuint _indx
, const GLint
* _values
) {
10311 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10312 const uint32_t size
= ComputeSize();
10313 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10316 gpu::CommandHeader header
;
10320 static_assert(sizeof(VertexAttribI4ivImmediate
) == 8,
10321 "size of VertexAttribI4ivImmediate should be 8");
10322 static_assert(offsetof(VertexAttribI4ivImmediate
, header
) == 0,
10323 "offset of VertexAttribI4ivImmediate header should be 0");
10324 static_assert(offsetof(VertexAttribI4ivImmediate
, indx
) == 4,
10325 "offset of VertexAttribI4ivImmediate indx should be 4");
10327 struct VertexAttribI4ui
{
10328 typedef VertexAttribI4ui ValueType
;
10329 static const CommandId kCmdId
= kVertexAttribI4ui
;
10330 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10331 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10333 static uint32_t ComputeSize() {
10334 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10337 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10339 void Init(GLuint _indx
, GLuint _x
, GLuint _y
, GLuint _z
, GLuint _w
) {
10348 void* Set(void* cmd
,
10354 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
10355 return NextCmdAddress
<ValueType
>(cmd
);
10358 gpu::CommandHeader header
;
10366 static_assert(sizeof(VertexAttribI4ui
) == 24,
10367 "size of VertexAttribI4ui should be 24");
10368 static_assert(offsetof(VertexAttribI4ui
, header
) == 0,
10369 "offset of VertexAttribI4ui header should be 0");
10370 static_assert(offsetof(VertexAttribI4ui
, indx
) == 4,
10371 "offset of VertexAttribI4ui indx should be 4");
10372 static_assert(offsetof(VertexAttribI4ui
, x
) == 8,
10373 "offset of VertexAttribI4ui x should be 8");
10374 static_assert(offsetof(VertexAttribI4ui
, y
) == 12,
10375 "offset of VertexAttribI4ui y should be 12");
10376 static_assert(offsetof(VertexAttribI4ui
, z
) == 16,
10377 "offset of VertexAttribI4ui z should be 16");
10378 static_assert(offsetof(VertexAttribI4ui
, w
) == 20,
10379 "offset of VertexAttribI4ui w should be 20");
10381 struct VertexAttribI4uivImmediate
{
10382 typedef VertexAttribI4uivImmediate ValueType
;
10383 static const CommandId kCmdId
= kVertexAttribI4uivImmediate
;
10384 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10385 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10387 static uint32_t ComputeDataSize() {
10388 return static_cast<uint32_t>(sizeof(GLuint
) * 4);
10391 static uint32_t ComputeSize() {
10392 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
10395 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
10397 void Init(GLuint _indx
, const GLuint
* _values
) {
10400 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
10403 void* Set(void* cmd
, GLuint _indx
, const GLuint
* _values
) {
10404 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
10405 const uint32_t size
= ComputeSize();
10406 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
10409 gpu::CommandHeader header
;
10413 static_assert(sizeof(VertexAttribI4uivImmediate
) == 8,
10414 "size of VertexAttribI4uivImmediate should be 8");
10415 static_assert(offsetof(VertexAttribI4uivImmediate
, header
) == 0,
10416 "offset of VertexAttribI4uivImmediate header should be 0");
10417 static_assert(offsetof(VertexAttribI4uivImmediate
, indx
) == 4,
10418 "offset of VertexAttribI4uivImmediate indx should be 4");
10420 struct VertexAttribIPointer
{
10421 typedef VertexAttribIPointer ValueType
;
10422 static const CommandId kCmdId
= kVertexAttribIPointer
;
10423 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10424 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10426 static uint32_t ComputeSize() {
10427 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10430 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10432 void Init(GLuint _indx
,
10445 void* Set(void* cmd
,
10451 static_cast<ValueType
*>(cmd
)->Init(_indx
, _size
, _type
, _stride
, _offset
);
10452 return NextCmdAddress
<ValueType
>(cmd
);
10455 gpu::CommandHeader header
;
10463 static_assert(sizeof(VertexAttribIPointer
) == 24,
10464 "size of VertexAttribIPointer should be 24");
10465 static_assert(offsetof(VertexAttribIPointer
, header
) == 0,
10466 "offset of VertexAttribIPointer header should be 0");
10467 static_assert(offsetof(VertexAttribIPointer
, indx
) == 4,
10468 "offset of VertexAttribIPointer indx should be 4");
10469 static_assert(offsetof(VertexAttribIPointer
, size
) == 8,
10470 "offset of VertexAttribIPointer size should be 8");
10471 static_assert(offsetof(VertexAttribIPointer
, type
) == 12,
10472 "offset of VertexAttribIPointer type should be 12");
10473 static_assert(offsetof(VertexAttribIPointer
, stride
) == 16,
10474 "offset of VertexAttribIPointer stride should be 16");
10475 static_assert(offsetof(VertexAttribIPointer
, offset
) == 20,
10476 "offset of VertexAttribIPointer offset should be 20");
10478 struct VertexAttribPointer
{
10479 typedef VertexAttribPointer ValueType
;
10480 static const CommandId kCmdId
= kVertexAttribPointer
;
10481 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10482 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10484 static uint32_t ComputeSize() {
10485 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10488 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10490 void Init(GLuint _indx
,
10493 GLboolean _normalized
,
10500 normalized
= _normalized
;
10505 void* Set(void* cmd
,
10509 GLboolean _normalized
,
10512 static_cast<ValueType
*>(cmd
)
10513 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
10514 return NextCmdAddress
<ValueType
>(cmd
);
10517 gpu::CommandHeader header
;
10521 uint32_t normalized
;
10526 static_assert(sizeof(VertexAttribPointer
) == 28,
10527 "size of VertexAttribPointer should be 28");
10528 static_assert(offsetof(VertexAttribPointer
, header
) == 0,
10529 "offset of VertexAttribPointer header should be 0");
10530 static_assert(offsetof(VertexAttribPointer
, indx
) == 4,
10531 "offset of VertexAttribPointer indx should be 4");
10532 static_assert(offsetof(VertexAttribPointer
, size
) == 8,
10533 "offset of VertexAttribPointer size should be 8");
10534 static_assert(offsetof(VertexAttribPointer
, type
) == 12,
10535 "offset of VertexAttribPointer type should be 12");
10536 static_assert(offsetof(VertexAttribPointer
, normalized
) == 16,
10537 "offset of VertexAttribPointer normalized should be 16");
10538 static_assert(offsetof(VertexAttribPointer
, stride
) == 20,
10539 "offset of VertexAttribPointer stride should be 20");
10540 static_assert(offsetof(VertexAttribPointer
, offset
) == 24,
10541 "offset of VertexAttribPointer offset should be 24");
10544 typedef Viewport ValueType
;
10545 static const CommandId kCmdId
= kViewport
;
10546 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10547 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10549 static uint32_t ComputeSize() {
10550 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10553 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10555 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
10563 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
10564 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
10565 return NextCmdAddress
<ValueType
>(cmd
);
10568 gpu::CommandHeader header
;
10575 static_assert(sizeof(Viewport
) == 20, "size of Viewport should be 20");
10576 static_assert(offsetof(Viewport
, header
) == 0,
10577 "offset of Viewport header should be 0");
10578 static_assert(offsetof(Viewport
, x
) == 4, "offset of Viewport x should be 4");
10579 static_assert(offsetof(Viewport
, y
) == 8, "offset of Viewport y should be 8");
10580 static_assert(offsetof(Viewport
, width
) == 12,
10581 "offset of Viewport width should be 12");
10582 static_assert(offsetof(Viewport
, height
) == 16,
10583 "offset of Viewport height should be 16");
10586 typedef WaitSync ValueType
;
10587 static const CommandId kCmdId
= kWaitSync
;
10588 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10589 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10591 static uint32_t ComputeSize() {
10592 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10595 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10597 void Init(GLuint _sync
,
10600 GLuint _timeout_1
) {
10604 timeout_0
= _timeout_0
;
10605 timeout_1
= _timeout_1
;
10608 void* Set(void* cmd
,
10612 GLuint _timeout_1
) {
10613 static_cast<ValueType
*>(cmd
)->Init(_sync
, _flags
, _timeout_0
, _timeout_1
);
10614 return NextCmdAddress
<ValueType
>(cmd
);
10617 gpu::CommandHeader header
;
10620 uint32_t timeout_0
;
10621 uint32_t timeout_1
;
10624 static_assert(sizeof(WaitSync
) == 20, "size of WaitSync should be 20");
10625 static_assert(offsetof(WaitSync
, header
) == 0,
10626 "offset of WaitSync header should be 0");
10627 static_assert(offsetof(WaitSync
, sync
) == 4,
10628 "offset of WaitSync sync should be 4");
10629 static_assert(offsetof(WaitSync
, flags
) == 8,
10630 "offset of WaitSync flags should be 8");
10631 static_assert(offsetof(WaitSync
, timeout_0
) == 12,
10632 "offset of WaitSync timeout_0 should be 12");
10633 static_assert(offsetof(WaitSync
, timeout_1
) == 16,
10634 "offset of WaitSync timeout_1 should be 16");
10636 struct BlitFramebufferCHROMIUM
{
10637 typedef BlitFramebufferCHROMIUM ValueType
;
10638 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
10639 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10640 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10642 static uint32_t ComputeSize() {
10643 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10646 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10648 void Init(GLint _srcX0
,
10671 void* Set(void* cmd
,
10682 static_cast<ValueType
*>(cmd
)->Init(_srcX0
, _srcY0
, _srcX1
, _srcY1
, _dstX0
,
10683 _dstY0
, _dstX1
, _dstY1
, _mask
, _filter
);
10684 return NextCmdAddress
<ValueType
>(cmd
);
10687 gpu::CommandHeader header
;
10700 static_assert(sizeof(BlitFramebufferCHROMIUM
) == 44,
10701 "size of BlitFramebufferCHROMIUM should be 44");
10702 static_assert(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
10703 "offset of BlitFramebufferCHROMIUM header should be 0");
10704 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
10705 "offset of BlitFramebufferCHROMIUM srcX0 should be 4");
10706 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
10707 "offset of BlitFramebufferCHROMIUM srcY0 should be 8");
10708 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
10709 "offset of BlitFramebufferCHROMIUM srcX1 should be 12");
10710 static_assert(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
10711 "offset of BlitFramebufferCHROMIUM srcY1 should be 16");
10712 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
10713 "offset of BlitFramebufferCHROMIUM dstX0 should be 20");
10714 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
10715 "offset of BlitFramebufferCHROMIUM dstY0 should be 24");
10716 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
10717 "offset of BlitFramebufferCHROMIUM dstX1 should be 28");
10718 static_assert(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
10719 "offset of BlitFramebufferCHROMIUM dstY1 should be 32");
10720 static_assert(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
10721 "offset of BlitFramebufferCHROMIUM mask should be 36");
10722 static_assert(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
10723 "offset of BlitFramebufferCHROMIUM filter should be 40");
10725 // GL_CHROMIUM_framebuffer_multisample
10726 struct RenderbufferStorageMultisampleCHROMIUM
{
10727 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
10728 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
10729 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10730 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10732 static uint32_t ComputeSize() {
10733 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10736 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10738 void Init(GLenum _target
,
10740 GLenum _internalformat
,
10745 samples
= _samples
;
10746 internalformat
= _internalformat
;
10751 void* Set(void* cmd
,
10754 GLenum _internalformat
,
10757 static_cast<ValueType
*>(cmd
)
10758 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10759 return NextCmdAddress
<ValueType
>(cmd
);
10762 gpu::CommandHeader header
;
10765 uint32_t internalformat
;
10770 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
10771 "size of RenderbufferStorageMultisampleCHROMIUM should be 24");
10773 offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
10774 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0");
10776 offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
10777 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4");
10779 offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
10780 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8");
10781 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM
,
10782 internalformat
) == 12,
10783 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat "
10786 offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
10787 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16");
10789 offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
10790 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20");
10792 // GL_EXT_multisampled_render_to_texture
10793 struct RenderbufferStorageMultisampleEXT
{
10794 typedef RenderbufferStorageMultisampleEXT ValueType
;
10795 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
10796 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10797 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10799 static uint32_t ComputeSize() {
10800 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10803 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10805 void Init(GLenum _target
,
10807 GLenum _internalformat
,
10812 samples
= _samples
;
10813 internalformat
= _internalformat
;
10818 void* Set(void* cmd
,
10821 GLenum _internalformat
,
10824 static_cast<ValueType
*>(cmd
)
10825 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
10826 return NextCmdAddress
<ValueType
>(cmd
);
10829 gpu::CommandHeader header
;
10832 uint32_t internalformat
;
10837 static_assert(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
10838 "size of RenderbufferStorageMultisampleEXT should be 24");
10839 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
10840 "offset of RenderbufferStorageMultisampleEXT header should be 0");
10841 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
10842 "offset of RenderbufferStorageMultisampleEXT target should be 4");
10844 offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
10845 "offset of RenderbufferStorageMultisampleEXT samples should be 8");
10847 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
10848 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12");
10849 static_assert(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
10850 "offset of RenderbufferStorageMultisampleEXT width should be 16");
10852 offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
10853 "offset of RenderbufferStorageMultisampleEXT height should be 20");
10855 struct FramebufferTexture2DMultisampleEXT
{
10856 typedef FramebufferTexture2DMultisampleEXT ValueType
;
10857 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
10858 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10859 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
10861 static uint32_t ComputeSize() {
10862 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10865 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10867 void Init(GLenum _target
,
10868 GLenum _attachment
,
10871 GLsizei _samples
) {
10874 attachment
= _attachment
;
10875 textarget
= _textarget
;
10876 texture
= _texture
;
10877 samples
= _samples
;
10880 void* Set(void* cmd
,
10882 GLenum _attachment
,
10885 GLsizei _samples
) {
10886 static_cast<ValueType
*>(cmd
)
10887 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
10888 return NextCmdAddress
<ValueType
>(cmd
);
10891 gpu::CommandHeader header
;
10893 uint32_t attachment
;
10894 uint32_t textarget
;
10897 static const int32_t level
= 0;
10900 static_assert(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
10901 "size of FramebufferTexture2DMultisampleEXT should be 24");
10903 offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
10904 "offset of FramebufferTexture2DMultisampleEXT header should be 0");
10906 offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
10907 "offset of FramebufferTexture2DMultisampleEXT target should be 4");
10909 offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
10910 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8");
10912 offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
10913 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12");
10915 offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
10916 "offset of FramebufferTexture2DMultisampleEXT texture should be 16");
10918 offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
10919 "offset of FramebufferTexture2DMultisampleEXT samples should be 20");
10921 struct TexStorage2DEXT
{
10922 typedef TexStorage2DEXT ValueType
;
10923 static const CommandId kCmdId
= kTexStorage2DEXT
;
10924 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
10925 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10927 static uint32_t ComputeSize() {
10928 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
10931 void SetHeader() { header
.SetCmd
<ValueType
>(); }
10933 void Init(GLenum _target
,
10935 GLenum _internalFormat
,
10941 internalFormat
= _internalFormat
;
10946 void* Set(void* cmd
,
10949 GLenum _internalFormat
,
10952 static_cast<ValueType
*>(cmd
)
10953 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
10954 return NextCmdAddress
<ValueType
>(cmd
);
10957 gpu::CommandHeader header
;
10960 uint32_t internalFormat
;
10965 static_assert(sizeof(TexStorage2DEXT
) == 24,
10966 "size of TexStorage2DEXT should be 24");
10967 static_assert(offsetof(TexStorage2DEXT
, header
) == 0,
10968 "offset of TexStorage2DEXT header should be 0");
10969 static_assert(offsetof(TexStorage2DEXT
, target
) == 4,
10970 "offset of TexStorage2DEXT target should be 4");
10971 static_assert(offsetof(TexStorage2DEXT
, levels
) == 8,
10972 "offset of TexStorage2DEXT levels should be 8");
10973 static_assert(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
10974 "offset of TexStorage2DEXT internalFormat should be 12");
10975 static_assert(offsetof(TexStorage2DEXT
, width
) == 16,
10976 "offset of TexStorage2DEXT width should be 16");
10977 static_assert(offsetof(TexStorage2DEXT
, height
) == 20,
10978 "offset of TexStorage2DEXT height should be 20");
10980 struct GenQueriesEXTImmediate
{
10981 typedef GenQueriesEXTImmediate ValueType
;
10982 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
10983 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
10984 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
10986 static uint32_t ComputeDataSize(GLsizei n
) {
10987 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
10990 static uint32_t ComputeSize(GLsizei n
) {
10991 return static_cast<uint32_t>(sizeof(ValueType
) +
10992 ComputeDataSize(n
)); // NOLINT
10995 void SetHeader(GLsizei n
) {
10996 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
10999 void Init(GLsizei _n
, GLuint
* _queries
) {
11002 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
11005 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
11006 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
11007 const uint32_t size
= ComputeSize(_n
);
11008 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11011 gpu::CommandHeader header
;
11015 static_assert(sizeof(GenQueriesEXTImmediate
) == 8,
11016 "size of GenQueriesEXTImmediate should be 8");
11017 static_assert(offsetof(GenQueriesEXTImmediate
, header
) == 0,
11018 "offset of GenQueriesEXTImmediate header should be 0");
11019 static_assert(offsetof(GenQueriesEXTImmediate
, n
) == 4,
11020 "offset of GenQueriesEXTImmediate n should be 4");
11022 struct DeleteQueriesEXTImmediate
{
11023 typedef DeleteQueriesEXTImmediate ValueType
;
11024 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
11025 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11026 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11028 static uint32_t ComputeDataSize(GLsizei n
) {
11029 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11032 static uint32_t ComputeSize(GLsizei n
) {
11033 return static_cast<uint32_t>(sizeof(ValueType
) +
11034 ComputeDataSize(n
)); // NOLINT
11037 void SetHeader(GLsizei n
) {
11038 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11041 void Init(GLsizei _n
, const GLuint
* _queries
) {
11044 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
11047 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
11048 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
11049 const uint32_t size
= ComputeSize(_n
);
11050 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11053 gpu::CommandHeader header
;
11057 static_assert(sizeof(DeleteQueriesEXTImmediate
) == 8,
11058 "size of DeleteQueriesEXTImmediate should be 8");
11059 static_assert(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
11060 "offset of DeleteQueriesEXTImmediate header should be 0");
11061 static_assert(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
11062 "offset of DeleteQueriesEXTImmediate n should be 4");
11064 struct BeginQueryEXT
{
11065 typedef BeginQueryEXT ValueType
;
11066 static const CommandId kCmdId
= kBeginQueryEXT
;
11067 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11068 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11070 static uint32_t ComputeSize() {
11071 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11074 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11076 void Init(GLenum _target
,
11078 uint32_t _sync_data_shm_id
,
11079 uint32_t _sync_data_shm_offset
) {
11083 sync_data_shm_id
= _sync_data_shm_id
;
11084 sync_data_shm_offset
= _sync_data_shm_offset
;
11087 void* Set(void* cmd
,
11090 uint32_t _sync_data_shm_id
,
11091 uint32_t _sync_data_shm_offset
) {
11092 static_cast<ValueType
*>(cmd
)
11093 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
11094 return NextCmdAddress
<ValueType
>(cmd
);
11097 gpu::CommandHeader header
;
11100 uint32_t sync_data_shm_id
;
11101 uint32_t sync_data_shm_offset
;
11104 static_assert(sizeof(BeginQueryEXT
) == 20,
11105 "size of BeginQueryEXT should be 20");
11106 static_assert(offsetof(BeginQueryEXT
, header
) == 0,
11107 "offset of BeginQueryEXT header should be 0");
11108 static_assert(offsetof(BeginQueryEXT
, target
) == 4,
11109 "offset of BeginQueryEXT target should be 4");
11110 static_assert(offsetof(BeginQueryEXT
, id
) == 8,
11111 "offset of BeginQueryEXT id should be 8");
11112 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
11113 "offset of BeginQueryEXT sync_data_shm_id should be 12");
11114 static_assert(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
11115 "offset of BeginQueryEXT sync_data_shm_offset should be 16");
11117 struct BeginTransformFeedback
{
11118 typedef BeginTransformFeedback ValueType
;
11119 static const CommandId kCmdId
= kBeginTransformFeedback
;
11120 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11121 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11123 static uint32_t ComputeSize() {
11124 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11127 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11129 void Init(GLenum _primitivemode
) {
11131 primitivemode
= _primitivemode
;
11134 void* Set(void* cmd
, GLenum _primitivemode
) {
11135 static_cast<ValueType
*>(cmd
)->Init(_primitivemode
);
11136 return NextCmdAddress
<ValueType
>(cmd
);
11139 gpu::CommandHeader header
;
11140 uint32_t primitivemode
;
11143 static_assert(sizeof(BeginTransformFeedback
) == 8,
11144 "size of BeginTransformFeedback should be 8");
11145 static_assert(offsetof(BeginTransformFeedback
, header
) == 0,
11146 "offset of BeginTransformFeedback header should be 0");
11147 static_assert(offsetof(BeginTransformFeedback
, primitivemode
) == 4,
11148 "offset of BeginTransformFeedback primitivemode should be 4");
11150 struct EndQueryEXT
{
11151 typedef EndQueryEXT ValueType
;
11152 static const CommandId kCmdId
= kEndQueryEXT
;
11153 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11154 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11156 static uint32_t ComputeSize() {
11157 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11160 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11162 void Init(GLenum _target
, GLuint _submit_count
) {
11165 submit_count
= _submit_count
;
11168 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
11169 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
11170 return NextCmdAddress
<ValueType
>(cmd
);
11173 gpu::CommandHeader header
;
11175 uint32_t submit_count
;
11178 static_assert(sizeof(EndQueryEXT
) == 12, "size of EndQueryEXT should be 12");
11179 static_assert(offsetof(EndQueryEXT
, header
) == 0,
11180 "offset of EndQueryEXT header should be 0");
11181 static_assert(offsetof(EndQueryEXT
, target
) == 4,
11182 "offset of EndQueryEXT target should be 4");
11183 static_assert(offsetof(EndQueryEXT
, submit_count
) == 8,
11184 "offset of EndQueryEXT submit_count should be 8");
11186 struct EndTransformFeedback
{
11187 typedef EndTransformFeedback ValueType
;
11188 static const CommandId kCmdId
= kEndTransformFeedback
;
11189 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11190 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11192 static uint32_t ComputeSize() {
11193 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11196 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11198 void Init() { SetHeader(); }
11200 void* Set(void* cmd
) {
11201 static_cast<ValueType
*>(cmd
)->Init();
11202 return NextCmdAddress
<ValueType
>(cmd
);
11205 gpu::CommandHeader header
;
11208 static_assert(sizeof(EndTransformFeedback
) == 4,
11209 "size of EndTransformFeedback should be 4");
11210 static_assert(offsetof(EndTransformFeedback
, header
) == 0,
11211 "offset of EndTransformFeedback header should be 0");
11213 struct InsertEventMarkerEXT
{
11214 typedef InsertEventMarkerEXT ValueType
;
11215 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
11216 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11217 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11219 static uint32_t ComputeSize() {
11220 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11223 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11225 void Init(GLuint _bucket_id
) {
11227 bucket_id
= _bucket_id
;
11230 void* Set(void* cmd
, GLuint _bucket_id
) {
11231 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11232 return NextCmdAddress
<ValueType
>(cmd
);
11235 gpu::CommandHeader header
;
11236 uint32_t bucket_id
;
11239 static_assert(sizeof(InsertEventMarkerEXT
) == 8,
11240 "size of InsertEventMarkerEXT should be 8");
11241 static_assert(offsetof(InsertEventMarkerEXT
, header
) == 0,
11242 "offset of InsertEventMarkerEXT header should be 0");
11243 static_assert(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
11244 "offset of InsertEventMarkerEXT bucket_id should be 4");
11246 struct PushGroupMarkerEXT
{
11247 typedef PushGroupMarkerEXT ValueType
;
11248 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
11249 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11250 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11252 static uint32_t ComputeSize() {
11253 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11256 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11258 void Init(GLuint _bucket_id
) {
11260 bucket_id
= _bucket_id
;
11263 void* Set(void* cmd
, GLuint _bucket_id
) {
11264 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11265 return NextCmdAddress
<ValueType
>(cmd
);
11268 gpu::CommandHeader header
;
11269 uint32_t bucket_id
;
11272 static_assert(sizeof(PushGroupMarkerEXT
) == 8,
11273 "size of PushGroupMarkerEXT should be 8");
11274 static_assert(offsetof(PushGroupMarkerEXT
, header
) == 0,
11275 "offset of PushGroupMarkerEXT header should be 0");
11276 static_assert(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
11277 "offset of PushGroupMarkerEXT bucket_id should be 4");
11279 struct PopGroupMarkerEXT
{
11280 typedef PopGroupMarkerEXT ValueType
;
11281 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
11282 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11283 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11285 static uint32_t ComputeSize() {
11286 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11289 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11291 void Init() { SetHeader(); }
11293 void* Set(void* cmd
) {
11294 static_cast<ValueType
*>(cmd
)->Init();
11295 return NextCmdAddress
<ValueType
>(cmd
);
11298 gpu::CommandHeader header
;
11301 static_assert(sizeof(PopGroupMarkerEXT
) == 4,
11302 "size of PopGroupMarkerEXT should be 4");
11303 static_assert(offsetof(PopGroupMarkerEXT
, header
) == 0,
11304 "offset of PopGroupMarkerEXT header should be 0");
11306 struct GenVertexArraysOESImmediate
{
11307 typedef GenVertexArraysOESImmediate ValueType
;
11308 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
11309 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11310 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11312 static uint32_t ComputeDataSize(GLsizei n
) {
11313 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11316 static uint32_t ComputeSize(GLsizei n
) {
11317 return static_cast<uint32_t>(sizeof(ValueType
) +
11318 ComputeDataSize(n
)); // NOLINT
11321 void SetHeader(GLsizei n
) {
11322 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11325 void Init(GLsizei _n
, GLuint
* _arrays
) {
11328 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
11331 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
11332 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
11333 const uint32_t size
= ComputeSize(_n
);
11334 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11337 gpu::CommandHeader header
;
11341 static_assert(sizeof(GenVertexArraysOESImmediate
) == 8,
11342 "size of GenVertexArraysOESImmediate should be 8");
11343 static_assert(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
11344 "offset of GenVertexArraysOESImmediate header should be 0");
11345 static_assert(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
11346 "offset of GenVertexArraysOESImmediate n should be 4");
11348 struct DeleteVertexArraysOESImmediate
{
11349 typedef DeleteVertexArraysOESImmediate ValueType
;
11350 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
11351 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
11352 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11354 static uint32_t ComputeDataSize(GLsizei n
) {
11355 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
11358 static uint32_t ComputeSize(GLsizei n
) {
11359 return static_cast<uint32_t>(sizeof(ValueType
) +
11360 ComputeDataSize(n
)); // NOLINT
11363 void SetHeader(GLsizei n
) {
11364 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
11367 void Init(GLsizei _n
, const GLuint
* _arrays
) {
11370 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
11373 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
11374 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
11375 const uint32_t size
= ComputeSize(_n
);
11376 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
11379 gpu::CommandHeader header
;
11383 static_assert(sizeof(DeleteVertexArraysOESImmediate
) == 8,
11384 "size of DeleteVertexArraysOESImmediate should be 8");
11385 static_assert(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
11386 "offset of DeleteVertexArraysOESImmediate header should be 0");
11387 static_assert(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
11388 "offset of DeleteVertexArraysOESImmediate n should be 4");
11390 struct IsVertexArrayOES
{
11391 typedef IsVertexArrayOES ValueType
;
11392 static const CommandId kCmdId
= kIsVertexArrayOES
;
11393 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11394 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11396 typedef uint32_t Result
;
11398 static uint32_t ComputeSize() {
11399 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11402 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11404 void Init(GLuint _array
,
11405 uint32_t _result_shm_id
,
11406 uint32_t _result_shm_offset
) {
11409 result_shm_id
= _result_shm_id
;
11410 result_shm_offset
= _result_shm_offset
;
11413 void* Set(void* cmd
,
11415 uint32_t _result_shm_id
,
11416 uint32_t _result_shm_offset
) {
11417 static_cast<ValueType
*>(cmd
)
11418 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
11419 return NextCmdAddress
<ValueType
>(cmd
);
11422 gpu::CommandHeader header
;
11424 uint32_t result_shm_id
;
11425 uint32_t result_shm_offset
;
11428 static_assert(sizeof(IsVertexArrayOES
) == 16,
11429 "size of IsVertexArrayOES should be 16");
11430 static_assert(offsetof(IsVertexArrayOES
, header
) == 0,
11431 "offset of IsVertexArrayOES header should be 0");
11432 static_assert(offsetof(IsVertexArrayOES
, array
) == 4,
11433 "offset of IsVertexArrayOES array should be 4");
11434 static_assert(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
11435 "offset of IsVertexArrayOES result_shm_id should be 8");
11436 static_assert(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
11437 "offset of IsVertexArrayOES result_shm_offset should be 12");
11439 struct BindVertexArrayOES
{
11440 typedef BindVertexArrayOES ValueType
;
11441 static const CommandId kCmdId
= kBindVertexArrayOES
;
11442 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11443 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11445 static uint32_t ComputeSize() {
11446 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11449 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11451 void Init(GLuint _array
) {
11456 void* Set(void* cmd
, GLuint _array
) {
11457 static_cast<ValueType
*>(cmd
)->Init(_array
);
11458 return NextCmdAddress
<ValueType
>(cmd
);
11461 gpu::CommandHeader header
;
11465 static_assert(sizeof(BindVertexArrayOES
) == 8,
11466 "size of BindVertexArrayOES should be 8");
11467 static_assert(offsetof(BindVertexArrayOES
, header
) == 0,
11468 "offset of BindVertexArrayOES header should be 0");
11469 static_assert(offsetof(BindVertexArrayOES
, array
) == 4,
11470 "offset of BindVertexArrayOES array should be 4");
11472 struct SwapBuffers
{
11473 typedef SwapBuffers ValueType
;
11474 static const CommandId kCmdId
= kSwapBuffers
;
11475 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11476 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
11478 static uint32_t ComputeSize() {
11479 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11482 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11484 void Init() { SetHeader(); }
11486 void* Set(void* cmd
) {
11487 static_cast<ValueType
*>(cmd
)->Init();
11488 return NextCmdAddress
<ValueType
>(cmd
);
11491 gpu::CommandHeader header
;
11494 static_assert(sizeof(SwapBuffers
) == 4, "size of SwapBuffers should be 4");
11495 static_assert(offsetof(SwapBuffers
, header
) == 0,
11496 "offset of SwapBuffers header should be 0");
11498 struct GetMaxValueInBufferCHROMIUM
{
11499 typedef GetMaxValueInBufferCHROMIUM ValueType
;
11500 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
11501 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11502 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11504 typedef GLuint Result
;
11506 static uint32_t ComputeSize() {
11507 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11510 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11512 void Init(GLuint _buffer_id
,
11516 uint32_t _result_shm_id
,
11517 uint32_t _result_shm_offset
) {
11519 buffer_id
= _buffer_id
;
11523 result_shm_id
= _result_shm_id
;
11524 result_shm_offset
= _result_shm_offset
;
11527 void* Set(void* cmd
,
11532 uint32_t _result_shm_id
,
11533 uint32_t _result_shm_offset
) {
11534 static_cast<ValueType
*>(cmd
)->Init(_buffer_id
, _count
, _type
, _offset
,
11535 _result_shm_id
, _result_shm_offset
);
11536 return NextCmdAddress
<ValueType
>(cmd
);
11539 gpu::CommandHeader header
;
11540 uint32_t buffer_id
;
11544 uint32_t result_shm_id
;
11545 uint32_t result_shm_offset
;
11548 static_assert(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
11549 "size of GetMaxValueInBufferCHROMIUM should be 28");
11550 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
11551 "offset of GetMaxValueInBufferCHROMIUM header should be 0");
11552 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
11553 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4");
11554 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
11555 "offset of GetMaxValueInBufferCHROMIUM count should be 8");
11556 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
11557 "offset of GetMaxValueInBufferCHROMIUM type should be 12");
11558 static_assert(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
11559 "offset of GetMaxValueInBufferCHROMIUM offset should be 16");
11561 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
11562 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20");
11564 offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
11565 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24");
11567 struct EnableFeatureCHROMIUM
{
11568 typedef EnableFeatureCHROMIUM ValueType
;
11569 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
11570 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11571 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11573 typedef GLint Result
;
11575 static uint32_t ComputeSize() {
11576 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11579 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11581 void Init(GLuint _bucket_id
,
11582 uint32_t _result_shm_id
,
11583 uint32_t _result_shm_offset
) {
11585 bucket_id
= _bucket_id
;
11586 result_shm_id
= _result_shm_id
;
11587 result_shm_offset
= _result_shm_offset
;
11590 void* Set(void* cmd
,
11592 uint32_t _result_shm_id
,
11593 uint32_t _result_shm_offset
) {
11594 static_cast<ValueType
*>(cmd
)
11595 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
11596 return NextCmdAddress
<ValueType
>(cmd
);
11599 gpu::CommandHeader header
;
11600 uint32_t bucket_id
;
11601 uint32_t result_shm_id
;
11602 uint32_t result_shm_offset
;
11605 static_assert(sizeof(EnableFeatureCHROMIUM
) == 16,
11606 "size of EnableFeatureCHROMIUM should be 16");
11607 static_assert(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
11608 "offset of EnableFeatureCHROMIUM header should be 0");
11609 static_assert(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
11610 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
11611 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
11612 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
11613 static_assert(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
11614 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
11616 struct MapBufferRange
{
11617 typedef MapBufferRange ValueType
;
11618 static const CommandId kCmdId
= kMapBufferRange
;
11619 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11620 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11622 typedef uint32_t Result
;
11624 static uint32_t ComputeSize() {
11625 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11628 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11630 void Init(GLenum _target
,
11633 GLbitfield _access
,
11634 uint32_t _data_shm_id
,
11635 uint32_t _data_shm_offset
,
11636 uint32_t _result_shm_id
,
11637 uint32_t _result_shm_offset
) {
11643 data_shm_id
= _data_shm_id
;
11644 data_shm_offset
= _data_shm_offset
;
11645 result_shm_id
= _result_shm_id
;
11646 result_shm_offset
= _result_shm_offset
;
11649 void* Set(void* cmd
,
11653 GLbitfield _access
,
11654 uint32_t _data_shm_id
,
11655 uint32_t _data_shm_offset
,
11656 uint32_t _result_shm_id
,
11657 uint32_t _result_shm_offset
) {
11658 static_cast<ValueType
*>(cmd
)->Init(_target
, _offset
, _size
, _access
,
11659 _data_shm_id
, _data_shm_offset
,
11660 _result_shm_id
, _result_shm_offset
);
11661 return NextCmdAddress
<ValueType
>(cmd
);
11664 gpu::CommandHeader header
;
11669 uint32_t data_shm_id
;
11670 uint32_t data_shm_offset
;
11671 uint32_t result_shm_id
;
11672 uint32_t result_shm_offset
;
11675 static_assert(sizeof(MapBufferRange
) == 36,
11676 "size of MapBufferRange should be 36");
11677 static_assert(offsetof(MapBufferRange
, header
) == 0,
11678 "offset of MapBufferRange header should be 0");
11679 static_assert(offsetof(MapBufferRange
, target
) == 4,
11680 "offset of MapBufferRange target should be 4");
11681 static_assert(offsetof(MapBufferRange
, offset
) == 8,
11682 "offset of MapBufferRange offset should be 8");
11683 static_assert(offsetof(MapBufferRange
, size
) == 12,
11684 "offset of MapBufferRange size should be 12");
11685 static_assert(offsetof(MapBufferRange
, access
) == 16,
11686 "offset of MapBufferRange access should be 16");
11687 static_assert(offsetof(MapBufferRange
, data_shm_id
) == 20,
11688 "offset of MapBufferRange data_shm_id should be 20");
11689 static_assert(offsetof(MapBufferRange
, data_shm_offset
) == 24,
11690 "offset of MapBufferRange data_shm_offset should be 24");
11691 static_assert(offsetof(MapBufferRange
, result_shm_id
) == 28,
11692 "offset of MapBufferRange result_shm_id should be 28");
11693 static_assert(offsetof(MapBufferRange
, result_shm_offset
) == 32,
11694 "offset of MapBufferRange result_shm_offset should be 32");
11696 struct UnmapBuffer
{
11697 typedef UnmapBuffer ValueType
;
11698 static const CommandId kCmdId
= kUnmapBuffer
;
11699 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11700 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11702 static uint32_t ComputeSize() {
11703 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11706 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11708 void Init(GLenum _target
) {
11713 void* Set(void* cmd
, GLenum _target
) {
11714 static_cast<ValueType
*>(cmd
)->Init(_target
);
11715 return NextCmdAddress
<ValueType
>(cmd
);
11718 gpu::CommandHeader header
;
11722 static_assert(sizeof(UnmapBuffer
) == 8, "size of UnmapBuffer should be 8");
11723 static_assert(offsetof(UnmapBuffer
, header
) == 0,
11724 "offset of UnmapBuffer header should be 0");
11725 static_assert(offsetof(UnmapBuffer
, target
) == 4,
11726 "offset of UnmapBuffer target should be 4");
11728 struct ResizeCHROMIUM
{
11729 typedef ResizeCHROMIUM ValueType
;
11730 static const CommandId kCmdId
= kResizeCHROMIUM
;
11731 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11732 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11734 static uint32_t ComputeSize() {
11735 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11738 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11740 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
11744 scale_factor
= _scale_factor
;
11747 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
11748 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
11749 return NextCmdAddress
<ValueType
>(cmd
);
11752 gpu::CommandHeader header
;
11755 float scale_factor
;
11758 static_assert(sizeof(ResizeCHROMIUM
) == 16,
11759 "size of ResizeCHROMIUM should be 16");
11760 static_assert(offsetof(ResizeCHROMIUM
, header
) == 0,
11761 "offset of ResizeCHROMIUM header should be 0");
11762 static_assert(offsetof(ResizeCHROMIUM
, width
) == 4,
11763 "offset of ResizeCHROMIUM width should be 4");
11764 static_assert(offsetof(ResizeCHROMIUM
, height
) == 8,
11765 "offset of ResizeCHROMIUM height should be 8");
11766 static_assert(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
11767 "offset of ResizeCHROMIUM scale_factor should be 12");
11769 struct GetRequestableExtensionsCHROMIUM
{
11770 typedef GetRequestableExtensionsCHROMIUM ValueType
;
11771 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
11772 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11773 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11775 static uint32_t ComputeSize() {
11776 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11779 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11781 void Init(uint32_t _bucket_id
) {
11783 bucket_id
= _bucket_id
;
11786 void* Set(void* cmd
, uint32_t _bucket_id
) {
11787 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11788 return NextCmdAddress
<ValueType
>(cmd
);
11791 gpu::CommandHeader header
;
11792 uint32_t bucket_id
;
11795 static_assert(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
11796 "size of GetRequestableExtensionsCHROMIUM should be 8");
11797 static_assert(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
11798 "offset of GetRequestableExtensionsCHROMIUM header should be 0");
11800 offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
11801 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4");
11803 struct RequestExtensionCHROMIUM
{
11804 typedef RequestExtensionCHROMIUM ValueType
;
11805 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
11806 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11807 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11809 static uint32_t ComputeSize() {
11810 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11813 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11815 void Init(uint32_t _bucket_id
) {
11817 bucket_id
= _bucket_id
;
11820 void* Set(void* cmd
, uint32_t _bucket_id
) {
11821 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
11822 return NextCmdAddress
<ValueType
>(cmd
);
11825 gpu::CommandHeader header
;
11826 uint32_t bucket_id
;
11829 static_assert(sizeof(RequestExtensionCHROMIUM
) == 8,
11830 "size of RequestExtensionCHROMIUM should be 8");
11831 static_assert(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
11832 "offset of RequestExtensionCHROMIUM header should be 0");
11833 static_assert(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
11834 "offset of RequestExtensionCHROMIUM bucket_id should be 4");
11836 struct GetProgramInfoCHROMIUM
{
11837 typedef GetProgramInfoCHROMIUM ValueType
;
11838 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
11839 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11840 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11843 uint32_t link_status
;
11844 uint32_t num_attribs
;
11845 uint32_t num_uniforms
;
11848 static uint32_t ComputeSize() {
11849 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11852 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11854 void Init(GLuint _program
, uint32_t _bucket_id
) {
11856 program
= _program
;
11857 bucket_id
= _bucket_id
;
11860 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11861 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11862 return NextCmdAddress
<ValueType
>(cmd
);
11865 gpu::CommandHeader header
;
11867 uint32_t bucket_id
;
11870 static_assert(sizeof(GetProgramInfoCHROMIUM
) == 12,
11871 "size of GetProgramInfoCHROMIUM should be 12");
11872 static_assert(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
11873 "offset of GetProgramInfoCHROMIUM header should be 0");
11874 static_assert(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
11875 "offset of GetProgramInfoCHROMIUM program should be 4");
11876 static_assert(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
11877 "offset of GetProgramInfoCHROMIUM bucket_id should be 8");
11878 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
11879 "offset of GetProgramInfoCHROMIUM Result link_status should be "
11881 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
11882 "offset of GetProgramInfoCHROMIUM Result num_attribs should be "
11884 static_assert(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
11885 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be "
11888 struct GetUniformBlocksCHROMIUM
{
11889 typedef GetUniformBlocksCHROMIUM ValueType
;
11890 static const CommandId kCmdId
= kGetUniformBlocksCHROMIUM
;
11891 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11892 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11894 typedef uint32_t Result
;
11896 static uint32_t ComputeSize() {
11897 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11900 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11902 void Init(GLuint _program
, uint32_t _bucket_id
) {
11904 program
= _program
;
11905 bucket_id
= _bucket_id
;
11908 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11909 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11910 return NextCmdAddress
<ValueType
>(cmd
);
11913 gpu::CommandHeader header
;
11915 uint32_t bucket_id
;
11918 static_assert(sizeof(GetUniformBlocksCHROMIUM
) == 12,
11919 "size of GetUniformBlocksCHROMIUM should be 12");
11920 static_assert(offsetof(GetUniformBlocksCHROMIUM
, header
) == 0,
11921 "offset of GetUniformBlocksCHROMIUM header should be 0");
11922 static_assert(offsetof(GetUniformBlocksCHROMIUM
, program
) == 4,
11923 "offset of GetUniformBlocksCHROMIUM program should be 4");
11924 static_assert(offsetof(GetUniformBlocksCHROMIUM
, bucket_id
) == 8,
11925 "offset of GetUniformBlocksCHROMIUM bucket_id should be 8");
11927 struct GetTransformFeedbackVaryingsCHROMIUM
{
11928 typedef GetTransformFeedbackVaryingsCHROMIUM ValueType
;
11929 static const CommandId kCmdId
= kGetTransformFeedbackVaryingsCHROMIUM
;
11930 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11931 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11933 typedef uint32_t Result
;
11935 static uint32_t ComputeSize() {
11936 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11939 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11941 void Init(GLuint _program
, uint32_t _bucket_id
) {
11943 program
= _program
;
11944 bucket_id
= _bucket_id
;
11947 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11948 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11949 return NextCmdAddress
<ValueType
>(cmd
);
11952 gpu::CommandHeader header
;
11954 uint32_t bucket_id
;
11957 static_assert(sizeof(GetTransformFeedbackVaryingsCHROMIUM
) == 12,
11958 "size of GetTransformFeedbackVaryingsCHROMIUM should be 12");
11960 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, header
) == 0,
11961 "offset of GetTransformFeedbackVaryingsCHROMIUM header should be 0");
11963 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, program
) == 4,
11964 "offset of GetTransformFeedbackVaryingsCHROMIUM program should be 4");
11966 offsetof(GetTransformFeedbackVaryingsCHROMIUM
, bucket_id
) == 8,
11967 "offset of GetTransformFeedbackVaryingsCHROMIUM bucket_id should be 8");
11969 struct GetUniformsES3CHROMIUM
{
11970 typedef GetUniformsES3CHROMIUM ValueType
;
11971 static const CommandId kCmdId
= kGetUniformsES3CHROMIUM
;
11972 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
11973 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
11975 typedef uint32_t Result
;
11977 static uint32_t ComputeSize() {
11978 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
11981 void SetHeader() { header
.SetCmd
<ValueType
>(); }
11983 void Init(GLuint _program
, uint32_t _bucket_id
) {
11985 program
= _program
;
11986 bucket_id
= _bucket_id
;
11989 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
11990 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
11991 return NextCmdAddress
<ValueType
>(cmd
);
11994 gpu::CommandHeader header
;
11996 uint32_t bucket_id
;
11999 static_assert(sizeof(GetUniformsES3CHROMIUM
) == 12,
12000 "size of GetUniformsES3CHROMIUM should be 12");
12001 static_assert(offsetof(GetUniformsES3CHROMIUM
, header
) == 0,
12002 "offset of GetUniformsES3CHROMIUM header should be 0");
12003 static_assert(offsetof(GetUniformsES3CHROMIUM
, program
) == 4,
12004 "offset of GetUniformsES3CHROMIUM program should be 4");
12005 static_assert(offsetof(GetUniformsES3CHROMIUM
, bucket_id
) == 8,
12006 "offset of GetUniformsES3CHROMIUM bucket_id should be 8");
12008 struct GetTranslatedShaderSourceANGLE
{
12009 typedef GetTranslatedShaderSourceANGLE ValueType
;
12010 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
12011 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12012 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12014 static uint32_t ComputeSize() {
12015 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12018 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12020 void Init(GLuint _shader
, uint32_t _bucket_id
) {
12023 bucket_id
= _bucket_id
;
12026 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
12027 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
12028 return NextCmdAddress
<ValueType
>(cmd
);
12031 gpu::CommandHeader header
;
12033 uint32_t bucket_id
;
12036 static_assert(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
12037 "size of GetTranslatedShaderSourceANGLE should be 12");
12038 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
12039 "offset of GetTranslatedShaderSourceANGLE header should be 0");
12040 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
12041 "offset of GetTranslatedShaderSourceANGLE shader should be 4");
12042 static_assert(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
12043 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8");
12045 struct PostSubBufferCHROMIUM
{
12046 typedef PostSubBufferCHROMIUM ValueType
;
12047 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
12048 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12049 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12051 static uint32_t ComputeSize() {
12052 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12055 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12057 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
12065 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
12066 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
12067 return NextCmdAddress
<ValueType
>(cmd
);
12070 gpu::CommandHeader header
;
12077 static_assert(sizeof(PostSubBufferCHROMIUM
) == 20,
12078 "size of PostSubBufferCHROMIUM should be 20");
12079 static_assert(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
12080 "offset of PostSubBufferCHROMIUM header should be 0");
12081 static_assert(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
12082 "offset of PostSubBufferCHROMIUM x should be 4");
12083 static_assert(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
12084 "offset of PostSubBufferCHROMIUM y should be 8");
12085 static_assert(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
12086 "offset of PostSubBufferCHROMIUM width should be 12");
12087 static_assert(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
12088 "offset of PostSubBufferCHROMIUM height should be 16");
12090 struct TexImageIOSurface2DCHROMIUM
{
12091 typedef TexImageIOSurface2DCHROMIUM ValueType
;
12092 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
12093 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12094 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12096 static uint32_t ComputeSize() {
12097 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12100 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12102 void Init(GLenum _target
,
12105 GLuint _ioSurfaceId
,
12111 ioSurfaceId
= _ioSurfaceId
;
12115 void* Set(void* cmd
,
12119 GLuint _ioSurfaceId
,
12121 static_cast<ValueType
*>(cmd
)
12122 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
12123 return NextCmdAddress
<ValueType
>(cmd
);
12126 gpu::CommandHeader header
;
12130 uint32_t ioSurfaceId
;
12134 static_assert(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
12135 "size of TexImageIOSurface2DCHROMIUM should be 24");
12136 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
12137 "offset of TexImageIOSurface2DCHROMIUM header should be 0");
12138 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
12139 "offset of TexImageIOSurface2DCHROMIUM target should be 4");
12140 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
12141 "offset of TexImageIOSurface2DCHROMIUM width should be 8");
12142 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
12143 "offset of TexImageIOSurface2DCHROMIUM height should be 12");
12144 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
12145 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16");
12146 static_assert(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
12147 "offset of TexImageIOSurface2DCHROMIUM plane should be 20");
12149 struct CopyTextureCHROMIUM
{
12150 typedef CopyTextureCHROMIUM ValueType
;
12151 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
12152 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12153 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12155 static uint32_t ComputeSize() {
12156 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12159 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12161 void Init(GLenum _target
,
12164 GLint _internalformat
,
12165 GLenum _dest_type
) {
12168 source_id
= _source_id
;
12169 dest_id
= _dest_id
;
12170 internalformat
= _internalformat
;
12171 dest_type
= _dest_type
;
12174 void* Set(void* cmd
,
12178 GLint _internalformat
,
12179 GLenum _dest_type
) {
12180 static_cast<ValueType
*>(cmd
)
12181 ->Init(_target
, _source_id
, _dest_id
, _internalformat
, _dest_type
);
12182 return NextCmdAddress
<ValueType
>(cmd
);
12185 gpu::CommandHeader header
;
12187 uint32_t source_id
;
12189 int32_t internalformat
;
12190 uint32_t dest_type
;
12193 static_assert(sizeof(CopyTextureCHROMIUM
) == 24,
12194 "size of CopyTextureCHROMIUM should be 24");
12195 static_assert(offsetof(CopyTextureCHROMIUM
, header
) == 0,
12196 "offset of CopyTextureCHROMIUM header should be 0");
12197 static_assert(offsetof(CopyTextureCHROMIUM
, target
) == 4,
12198 "offset of CopyTextureCHROMIUM target should be 4");
12199 static_assert(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
12200 "offset of CopyTextureCHROMIUM source_id should be 8");
12201 static_assert(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
12202 "offset of CopyTextureCHROMIUM dest_id should be 12");
12203 static_assert(offsetof(CopyTextureCHROMIUM
, internalformat
) == 16,
12204 "offset of CopyTextureCHROMIUM internalformat should be 16");
12205 static_assert(offsetof(CopyTextureCHROMIUM
, dest_type
) == 20,
12206 "offset of CopyTextureCHROMIUM dest_type should be 20");
12208 struct CopySubTextureCHROMIUM
{
12209 typedef CopySubTextureCHROMIUM ValueType
;
12210 static const CommandId kCmdId
= kCopySubTextureCHROMIUM
;
12211 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12212 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12214 static uint32_t ComputeSize() {
12215 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12218 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12220 void Init(GLenum _target
,
12231 source_id
= _source_id
;
12232 dest_id
= _dest_id
;
12233 xoffset
= _xoffset
;
12234 yoffset
= _yoffset
;
12241 void* Set(void* cmd
,
12251 static_cast<ValueType
*>(cmd
)->Init(_target
, _source_id
, _dest_id
, _xoffset
,
12252 _yoffset
, _x
, _y
, _width
, _height
);
12253 return NextCmdAddress
<ValueType
>(cmd
);
12256 gpu::CommandHeader header
;
12258 uint32_t source_id
;
12268 static_assert(sizeof(CopySubTextureCHROMIUM
) == 40,
12269 "size of CopySubTextureCHROMIUM should be 40");
12270 static_assert(offsetof(CopySubTextureCHROMIUM
, header
) == 0,
12271 "offset of CopySubTextureCHROMIUM header should be 0");
12272 static_assert(offsetof(CopySubTextureCHROMIUM
, target
) == 4,
12273 "offset of CopySubTextureCHROMIUM target should be 4");
12274 static_assert(offsetof(CopySubTextureCHROMIUM
, source_id
) == 8,
12275 "offset of CopySubTextureCHROMIUM source_id should be 8");
12276 static_assert(offsetof(CopySubTextureCHROMIUM
, dest_id
) == 12,
12277 "offset of CopySubTextureCHROMIUM dest_id should be 12");
12278 static_assert(offsetof(CopySubTextureCHROMIUM
, xoffset
) == 16,
12279 "offset of CopySubTextureCHROMIUM xoffset should be 16");
12280 static_assert(offsetof(CopySubTextureCHROMIUM
, yoffset
) == 20,
12281 "offset of CopySubTextureCHROMIUM yoffset should be 20");
12282 static_assert(offsetof(CopySubTextureCHROMIUM
, x
) == 24,
12283 "offset of CopySubTextureCHROMIUM x should be 24");
12284 static_assert(offsetof(CopySubTextureCHROMIUM
, y
) == 28,
12285 "offset of CopySubTextureCHROMIUM y should be 28");
12286 static_assert(offsetof(CopySubTextureCHROMIUM
, width
) == 32,
12287 "offset of CopySubTextureCHROMIUM width should be 32");
12288 static_assert(offsetof(CopySubTextureCHROMIUM
, height
) == 36,
12289 "offset of CopySubTextureCHROMIUM height should be 36");
12291 struct DrawArraysInstancedANGLE
{
12292 typedef DrawArraysInstancedANGLE ValueType
;
12293 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
12294 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12295 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12297 static uint32_t ComputeSize() {
12298 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12301 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12303 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
12308 primcount
= _primcount
;
12311 void* Set(void* cmd
,
12315 GLsizei _primcount
) {
12316 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
12317 return NextCmdAddress
<ValueType
>(cmd
);
12320 gpu::CommandHeader header
;
12327 static_assert(sizeof(DrawArraysInstancedANGLE
) == 20,
12328 "size of DrawArraysInstancedANGLE should be 20");
12329 static_assert(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
12330 "offset of DrawArraysInstancedANGLE header should be 0");
12331 static_assert(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
12332 "offset of DrawArraysInstancedANGLE mode should be 4");
12333 static_assert(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
12334 "offset of DrawArraysInstancedANGLE first should be 8");
12335 static_assert(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
12336 "offset of DrawArraysInstancedANGLE count should be 12");
12337 static_assert(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
12338 "offset of DrawArraysInstancedANGLE primcount should be 16");
12340 struct DrawElementsInstancedANGLE
{
12341 typedef DrawElementsInstancedANGLE ValueType
;
12342 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
12343 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12344 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12346 static uint32_t ComputeSize() {
12347 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12350 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12352 void Init(GLenum _mode
,
12355 GLuint _index_offset
,
12356 GLsizei _primcount
) {
12361 index_offset
= _index_offset
;
12362 primcount
= _primcount
;
12365 void* Set(void* cmd
,
12369 GLuint _index_offset
,
12370 GLsizei _primcount
) {
12371 static_cast<ValueType
*>(cmd
)
12372 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
12373 return NextCmdAddress
<ValueType
>(cmd
);
12376 gpu::CommandHeader header
;
12380 uint32_t index_offset
;
12384 static_assert(sizeof(DrawElementsInstancedANGLE
) == 24,
12385 "size of DrawElementsInstancedANGLE should be 24");
12386 static_assert(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
12387 "offset of DrawElementsInstancedANGLE header should be 0");
12388 static_assert(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
12389 "offset of DrawElementsInstancedANGLE mode should be 4");
12390 static_assert(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
12391 "offset of DrawElementsInstancedANGLE count should be 8");
12392 static_assert(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
12393 "offset of DrawElementsInstancedANGLE type should be 12");
12394 static_assert(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
12395 "offset of DrawElementsInstancedANGLE index_offset should be 16");
12396 static_assert(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
12397 "offset of DrawElementsInstancedANGLE primcount should be 20");
12399 struct VertexAttribDivisorANGLE
{
12400 typedef VertexAttribDivisorANGLE ValueType
;
12401 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
12402 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12403 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12405 static uint32_t ComputeSize() {
12406 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12409 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12411 void Init(GLuint _index
, GLuint _divisor
) {
12414 divisor
= _divisor
;
12417 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
12418 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
12419 return NextCmdAddress
<ValueType
>(cmd
);
12422 gpu::CommandHeader header
;
12427 static_assert(sizeof(VertexAttribDivisorANGLE
) == 12,
12428 "size of VertexAttribDivisorANGLE should be 12");
12429 static_assert(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
12430 "offset of VertexAttribDivisorANGLE header should be 0");
12431 static_assert(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
12432 "offset of VertexAttribDivisorANGLE index should be 4");
12433 static_assert(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
12434 "offset of VertexAttribDivisorANGLE divisor should be 8");
12436 struct ProduceTextureCHROMIUMImmediate
{
12437 typedef ProduceTextureCHROMIUMImmediate ValueType
;
12438 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
12439 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12440 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12442 static uint32_t ComputeDataSize() {
12443 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12446 static uint32_t ComputeSize() {
12447 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12450 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12452 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
12455 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12458 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
12459 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
12460 const uint32_t size
= ComputeSize();
12461 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12464 gpu::CommandHeader header
;
12468 static_assert(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
12469 "size of ProduceTextureCHROMIUMImmediate should be 8");
12470 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
12471 "offset of ProduceTextureCHROMIUMImmediate header should be 0");
12472 static_assert(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
12473 "offset of ProduceTextureCHROMIUMImmediate target should be 4");
12475 struct ProduceTextureDirectCHROMIUMImmediate
{
12476 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
12477 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
12478 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12479 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12481 static uint32_t ComputeDataSize() {
12482 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12485 static uint32_t ComputeSize() {
12486 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12489 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12491 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
12493 texture
= _texture
;
12495 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12498 void* Set(void* cmd
,
12501 const GLbyte
* _mailbox
) {
12502 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
12503 const uint32_t size
= ComputeSize();
12504 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12507 gpu::CommandHeader header
;
12512 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
12513 "size of ProduceTextureDirectCHROMIUMImmediate should be 12");
12515 offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
12516 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0");
12518 offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
12519 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4");
12521 offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
12522 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8");
12524 struct ConsumeTextureCHROMIUMImmediate
{
12525 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
12526 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
12527 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12528 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
12530 static uint32_t ComputeDataSize() {
12531 return static_cast<uint32_t>(sizeof(GLbyte
) * 64);
12534 static uint32_t ComputeSize() {
12535 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
12538 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
12540 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
12543 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
12546 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
12547 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
12548 const uint32_t size
= ComputeSize();
12549 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12552 gpu::CommandHeader header
;
12556 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
12557 "size of ConsumeTextureCHROMIUMImmediate should be 8");
12558 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
12559 "offset of ConsumeTextureCHROMIUMImmediate header should be 0");
12560 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
12561 "offset of ConsumeTextureCHROMIUMImmediate target should be 4");
12563 struct BindUniformLocationCHROMIUMBucket
{
12564 typedef BindUniformLocationCHROMIUMBucket ValueType
;
12565 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
12566 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12567 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12569 static uint32_t ComputeSize() {
12570 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12573 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12575 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
12577 program
= _program
;
12578 location
= _location
;
12579 name_bucket_id
= _name_bucket_id
;
12582 void* Set(void* cmd
,
12585 uint32_t _name_bucket_id
) {
12586 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
12587 return NextCmdAddress
<ValueType
>(cmd
);
12590 gpu::CommandHeader header
;
12593 uint32_t name_bucket_id
;
12596 static_assert(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
12597 "size of BindUniformLocationCHROMIUMBucket should be 16");
12598 static_assert(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
12599 "offset of BindUniformLocationCHROMIUMBucket header should be 0");
12601 offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
12602 "offset of BindUniformLocationCHROMIUMBucket program should be 4");
12604 offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
12605 "offset of BindUniformLocationCHROMIUMBucket location should be 8");
12607 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
12608 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12");
12610 struct GenValuebuffersCHROMIUMImmediate
{
12611 typedef GenValuebuffersCHROMIUMImmediate ValueType
;
12612 static const CommandId kCmdId
= kGenValuebuffersCHROMIUMImmediate
;
12613 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12614 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12616 static uint32_t ComputeDataSize(GLsizei n
) {
12617 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
12620 static uint32_t ComputeSize(GLsizei n
) {
12621 return static_cast<uint32_t>(sizeof(ValueType
) +
12622 ComputeDataSize(n
)); // NOLINT
12625 void SetHeader(GLsizei n
) {
12626 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
12629 void Init(GLsizei _n
, GLuint
* _buffers
) {
12632 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
12635 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
12636 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
12637 const uint32_t size
= ComputeSize(_n
);
12638 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12641 gpu::CommandHeader header
;
12645 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate
) == 8,
12646 "size of GenValuebuffersCHROMIUMImmediate should be 8");
12647 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, header
) == 0,
12648 "offset of GenValuebuffersCHROMIUMImmediate header should be 0");
12649 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate
, n
) == 4,
12650 "offset of GenValuebuffersCHROMIUMImmediate n should be 4");
12652 struct DeleteValuebuffersCHROMIUMImmediate
{
12653 typedef DeleteValuebuffersCHROMIUMImmediate ValueType
;
12654 static const CommandId kCmdId
= kDeleteValuebuffersCHROMIUMImmediate
;
12655 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
12656 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12658 static uint32_t ComputeDataSize(GLsizei n
) {
12659 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
12662 static uint32_t ComputeSize(GLsizei n
) {
12663 return static_cast<uint32_t>(sizeof(ValueType
) +
12664 ComputeDataSize(n
)); // NOLINT
12667 void SetHeader(GLsizei n
) {
12668 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
12671 void Init(GLsizei _n
, const GLuint
* _valuebuffers
) {
12674 memcpy(ImmediateDataAddress(this), _valuebuffers
, ComputeDataSize(_n
));
12677 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _valuebuffers
) {
12678 static_cast<ValueType
*>(cmd
)->Init(_n
, _valuebuffers
);
12679 const uint32_t size
= ComputeSize(_n
);
12680 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
12683 gpu::CommandHeader header
;
12687 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate
) == 8,
12688 "size of DeleteValuebuffersCHROMIUMImmediate should be 8");
12690 offsetof(DeleteValuebuffersCHROMIUMImmediate
, header
) == 0,
12691 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0");
12692 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate
, n
) == 4,
12693 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4");
12695 struct IsValuebufferCHROMIUM
{
12696 typedef IsValuebufferCHROMIUM ValueType
;
12697 static const CommandId kCmdId
= kIsValuebufferCHROMIUM
;
12698 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12699 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12701 typedef uint32_t Result
;
12703 static uint32_t ComputeSize() {
12704 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12707 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12709 void Init(GLuint _valuebuffer
,
12710 uint32_t _result_shm_id
,
12711 uint32_t _result_shm_offset
) {
12713 valuebuffer
= _valuebuffer
;
12714 result_shm_id
= _result_shm_id
;
12715 result_shm_offset
= _result_shm_offset
;
12718 void* Set(void* cmd
,
12719 GLuint _valuebuffer
,
12720 uint32_t _result_shm_id
,
12721 uint32_t _result_shm_offset
) {
12722 static_cast<ValueType
*>(cmd
)
12723 ->Init(_valuebuffer
, _result_shm_id
, _result_shm_offset
);
12724 return NextCmdAddress
<ValueType
>(cmd
);
12727 gpu::CommandHeader header
;
12728 uint32_t valuebuffer
;
12729 uint32_t result_shm_id
;
12730 uint32_t result_shm_offset
;
12733 static_assert(sizeof(IsValuebufferCHROMIUM
) == 16,
12734 "size of IsValuebufferCHROMIUM should be 16");
12735 static_assert(offsetof(IsValuebufferCHROMIUM
, header
) == 0,
12736 "offset of IsValuebufferCHROMIUM header should be 0");
12737 static_assert(offsetof(IsValuebufferCHROMIUM
, valuebuffer
) == 4,
12738 "offset of IsValuebufferCHROMIUM valuebuffer should be 4");
12739 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_id
) == 8,
12740 "offset of IsValuebufferCHROMIUM result_shm_id should be 8");
12741 static_assert(offsetof(IsValuebufferCHROMIUM
, result_shm_offset
) == 12,
12742 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12");
12744 struct BindValuebufferCHROMIUM
{
12745 typedef BindValuebufferCHROMIUM ValueType
;
12746 static const CommandId kCmdId
= kBindValuebufferCHROMIUM
;
12747 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12748 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12750 static uint32_t ComputeSize() {
12751 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12754 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12756 void Init(GLenum _target
, GLuint _valuebuffer
) {
12759 valuebuffer
= _valuebuffer
;
12762 void* Set(void* cmd
, GLenum _target
, GLuint _valuebuffer
) {
12763 static_cast<ValueType
*>(cmd
)->Init(_target
, _valuebuffer
);
12764 return NextCmdAddress
<ValueType
>(cmd
);
12767 gpu::CommandHeader header
;
12769 uint32_t valuebuffer
;
12772 static_assert(sizeof(BindValuebufferCHROMIUM
) == 12,
12773 "size of BindValuebufferCHROMIUM should be 12");
12774 static_assert(offsetof(BindValuebufferCHROMIUM
, header
) == 0,
12775 "offset of BindValuebufferCHROMIUM header should be 0");
12776 static_assert(offsetof(BindValuebufferCHROMIUM
, target
) == 4,
12777 "offset of BindValuebufferCHROMIUM target should be 4");
12778 static_assert(offsetof(BindValuebufferCHROMIUM
, valuebuffer
) == 8,
12779 "offset of BindValuebufferCHROMIUM valuebuffer should be 8");
12781 struct SubscribeValueCHROMIUM
{
12782 typedef SubscribeValueCHROMIUM ValueType
;
12783 static const CommandId kCmdId
= kSubscribeValueCHROMIUM
;
12784 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12785 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12787 static uint32_t ComputeSize() {
12788 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12791 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12793 void Init(GLenum _target
, GLenum _subscription
) {
12796 subscription
= _subscription
;
12799 void* Set(void* cmd
, GLenum _target
, GLenum _subscription
) {
12800 static_cast<ValueType
*>(cmd
)->Init(_target
, _subscription
);
12801 return NextCmdAddress
<ValueType
>(cmd
);
12804 gpu::CommandHeader header
;
12806 uint32_t subscription
;
12809 static_assert(sizeof(SubscribeValueCHROMIUM
) == 12,
12810 "size of SubscribeValueCHROMIUM should be 12");
12811 static_assert(offsetof(SubscribeValueCHROMIUM
, header
) == 0,
12812 "offset of SubscribeValueCHROMIUM header should be 0");
12813 static_assert(offsetof(SubscribeValueCHROMIUM
, target
) == 4,
12814 "offset of SubscribeValueCHROMIUM target should be 4");
12815 static_assert(offsetof(SubscribeValueCHROMIUM
, subscription
) == 8,
12816 "offset of SubscribeValueCHROMIUM subscription should be 8");
12818 struct PopulateSubscribedValuesCHROMIUM
{
12819 typedef PopulateSubscribedValuesCHROMIUM ValueType
;
12820 static const CommandId kCmdId
= kPopulateSubscribedValuesCHROMIUM
;
12821 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12822 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12824 static uint32_t ComputeSize() {
12825 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12828 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12830 void Init(GLenum _target
) {
12835 void* Set(void* cmd
, GLenum _target
) {
12836 static_cast<ValueType
*>(cmd
)->Init(_target
);
12837 return NextCmdAddress
<ValueType
>(cmd
);
12840 gpu::CommandHeader header
;
12844 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM
) == 8,
12845 "size of PopulateSubscribedValuesCHROMIUM should be 8");
12846 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, header
) == 0,
12847 "offset of PopulateSubscribedValuesCHROMIUM header should be 0");
12848 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM
, target
) == 4,
12849 "offset of PopulateSubscribedValuesCHROMIUM target should be 4");
12851 struct UniformValuebufferCHROMIUM
{
12852 typedef UniformValuebufferCHROMIUM ValueType
;
12853 static const CommandId kCmdId
= kUniformValuebufferCHROMIUM
;
12854 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12855 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12857 static uint32_t ComputeSize() {
12858 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12861 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12863 void Init(GLint _location
, GLenum _target
, GLenum _subscription
) {
12865 location
= _location
;
12867 subscription
= _subscription
;
12870 void* Set(void* cmd
, GLint _location
, GLenum _target
, GLenum _subscription
) {
12871 static_cast<ValueType
*>(cmd
)->Init(_location
, _target
, _subscription
);
12872 return NextCmdAddress
<ValueType
>(cmd
);
12875 gpu::CommandHeader header
;
12878 uint32_t subscription
;
12881 static_assert(sizeof(UniformValuebufferCHROMIUM
) == 16,
12882 "size of UniformValuebufferCHROMIUM should be 16");
12883 static_assert(offsetof(UniformValuebufferCHROMIUM
, header
) == 0,
12884 "offset of UniformValuebufferCHROMIUM header should be 0");
12885 static_assert(offsetof(UniformValuebufferCHROMIUM
, location
) == 4,
12886 "offset of UniformValuebufferCHROMIUM location should be 4");
12887 static_assert(offsetof(UniformValuebufferCHROMIUM
, target
) == 8,
12888 "offset of UniformValuebufferCHROMIUM target should be 8");
12889 static_assert(offsetof(UniformValuebufferCHROMIUM
, subscription
) == 12,
12890 "offset of UniformValuebufferCHROMIUM subscription should be 12");
12892 struct BindTexImage2DCHROMIUM
{
12893 typedef BindTexImage2DCHROMIUM ValueType
;
12894 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
12895 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12896 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12898 static uint32_t ComputeSize() {
12899 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12902 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12904 void Init(GLenum _target
, GLint _imageId
) {
12907 imageId
= _imageId
;
12910 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12911 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12912 return NextCmdAddress
<ValueType
>(cmd
);
12915 gpu::CommandHeader header
;
12920 static_assert(sizeof(BindTexImage2DCHROMIUM
) == 12,
12921 "size of BindTexImage2DCHROMIUM should be 12");
12922 static_assert(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
12923 "offset of BindTexImage2DCHROMIUM header should be 0");
12924 static_assert(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
12925 "offset of BindTexImage2DCHROMIUM target should be 4");
12926 static_assert(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
12927 "offset of BindTexImage2DCHROMIUM imageId should be 8");
12929 struct ReleaseTexImage2DCHROMIUM
{
12930 typedef ReleaseTexImage2DCHROMIUM ValueType
;
12931 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
12932 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12933 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12935 static uint32_t ComputeSize() {
12936 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12939 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12941 void Init(GLenum _target
, GLint _imageId
) {
12944 imageId
= _imageId
;
12947 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
12948 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
12949 return NextCmdAddress
<ValueType
>(cmd
);
12952 gpu::CommandHeader header
;
12957 static_assert(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
12958 "size of ReleaseTexImage2DCHROMIUM should be 12");
12959 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
12960 "offset of ReleaseTexImage2DCHROMIUM header should be 0");
12961 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
12962 "offset of ReleaseTexImage2DCHROMIUM target should be 4");
12963 static_assert(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
12964 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
12966 struct TraceBeginCHROMIUM
{
12967 typedef TraceBeginCHROMIUM ValueType
;
12968 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
12969 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
12970 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
12972 static uint32_t ComputeSize() {
12973 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
12976 void SetHeader() { header
.SetCmd
<ValueType
>(); }
12978 void Init(GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12980 category_bucket_id
= _category_bucket_id
;
12981 name_bucket_id
= _name_bucket_id
;
12984 void* Set(void* cmd
, GLuint _category_bucket_id
, GLuint _name_bucket_id
) {
12985 static_cast<ValueType
*>(cmd
)->Init(_category_bucket_id
, _name_bucket_id
);
12986 return NextCmdAddress
<ValueType
>(cmd
);
12989 gpu::CommandHeader header
;
12990 uint32_t category_bucket_id
;
12991 uint32_t name_bucket_id
;
12994 static_assert(sizeof(TraceBeginCHROMIUM
) == 12,
12995 "size of TraceBeginCHROMIUM should be 12");
12996 static_assert(offsetof(TraceBeginCHROMIUM
, header
) == 0,
12997 "offset of TraceBeginCHROMIUM header should be 0");
12998 static_assert(offsetof(TraceBeginCHROMIUM
, category_bucket_id
) == 4,
12999 "offset of TraceBeginCHROMIUM category_bucket_id should be 4");
13000 static_assert(offsetof(TraceBeginCHROMIUM
, name_bucket_id
) == 8,
13001 "offset of TraceBeginCHROMIUM name_bucket_id should be 8");
13003 struct TraceEndCHROMIUM
{
13004 typedef TraceEndCHROMIUM ValueType
;
13005 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
13006 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13007 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13009 static uint32_t ComputeSize() {
13010 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13013 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13015 void Init() { SetHeader(); }
13017 void* Set(void* cmd
) {
13018 static_cast<ValueType
*>(cmd
)->Init();
13019 return NextCmdAddress
<ValueType
>(cmd
);
13022 gpu::CommandHeader header
;
13025 static_assert(sizeof(TraceEndCHROMIUM
) == 4,
13026 "size of TraceEndCHROMIUM should be 4");
13027 static_assert(offsetof(TraceEndCHROMIUM
, header
) == 0,
13028 "offset of TraceEndCHROMIUM header should be 0");
13030 struct AsyncTexSubImage2DCHROMIUM
{
13031 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
13032 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
13033 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13034 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13036 static uint32_t ComputeSize() {
13037 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13040 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13042 void Init(GLenum _target
,
13050 uint32_t _data_shm_id
,
13051 uint32_t _data_shm_offset
,
13052 uint32_t _async_upload_token
,
13053 uint32_t _sync_data_shm_id
,
13054 uint32_t _sync_data_shm_offset
) {
13058 xoffset
= _xoffset
;
13059 yoffset
= _yoffset
;
13064 data_shm_id
= _data_shm_id
;
13065 data_shm_offset
= _data_shm_offset
;
13066 async_upload_token
= _async_upload_token
;
13067 sync_data_shm_id
= _sync_data_shm_id
;
13068 sync_data_shm_offset
= _sync_data_shm_offset
;
13071 void* Set(void* cmd
,
13080 uint32_t _data_shm_id
,
13081 uint32_t _data_shm_offset
,
13082 uint32_t _async_upload_token
,
13083 uint32_t _sync_data_shm_id
,
13084 uint32_t _sync_data_shm_offset
) {
13085 static_cast<ValueType
*>(cmd
)
13086 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
13087 _type
, _data_shm_id
, _data_shm_offset
, _async_upload_token
,
13088 _sync_data_shm_id
, _sync_data_shm_offset
);
13089 return NextCmdAddress
<ValueType
>(cmd
);
13092 gpu::CommandHeader header
;
13101 uint32_t data_shm_id
;
13102 uint32_t data_shm_offset
;
13103 uint32_t async_upload_token
;
13104 uint32_t sync_data_shm_id
;
13105 uint32_t sync_data_shm_offset
;
13108 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
13109 "size of AsyncTexSubImage2DCHROMIUM should be 56");
13110 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
13111 "offset of AsyncTexSubImage2DCHROMIUM header should be 0");
13112 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
13113 "offset of AsyncTexSubImage2DCHROMIUM target should be 4");
13114 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
13115 "offset of AsyncTexSubImage2DCHROMIUM level should be 8");
13116 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
13117 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12");
13118 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
13119 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16");
13120 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
13121 "offset of AsyncTexSubImage2DCHROMIUM width should be 20");
13122 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
13123 "offset of AsyncTexSubImage2DCHROMIUM height should be 24");
13124 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
13125 "offset of AsyncTexSubImage2DCHROMIUM format should be 28");
13126 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
13127 "offset of AsyncTexSubImage2DCHROMIUM type should be 32");
13128 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
13129 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36");
13131 offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
13132 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40");
13134 offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
13135 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44");
13137 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
13138 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48");
13140 offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
13141 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52");
13143 struct AsyncTexImage2DCHROMIUM
{
13144 typedef AsyncTexImage2DCHROMIUM ValueType
;
13145 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
13146 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13147 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13149 static uint32_t ComputeSize() {
13150 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13153 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13155 void Init(GLenum _target
,
13157 GLint _internalformat
,
13162 uint32_t _pixels_shm_id
,
13163 uint32_t _pixels_shm_offset
,
13164 uint32_t _async_upload_token
,
13165 uint32_t _sync_data_shm_id
,
13166 uint32_t _sync_data_shm_offset
) {
13170 internalformat
= _internalformat
;
13175 pixels_shm_id
= _pixels_shm_id
;
13176 pixels_shm_offset
= _pixels_shm_offset
;
13177 async_upload_token
= _async_upload_token
;
13178 sync_data_shm_id
= _sync_data_shm_id
;
13179 sync_data_shm_offset
= _sync_data_shm_offset
;
13182 void* Set(void* cmd
,
13185 GLint _internalformat
,
13190 uint32_t _pixels_shm_id
,
13191 uint32_t _pixels_shm_offset
,
13192 uint32_t _async_upload_token
,
13193 uint32_t _sync_data_shm_id
,
13194 uint32_t _sync_data_shm_offset
) {
13195 static_cast<ValueType
*>(cmd
)
13196 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _format
,
13197 _type
, _pixels_shm_id
, _pixels_shm_offset
, _async_upload_token
,
13198 _sync_data_shm_id
, _sync_data_shm_offset
);
13199 return NextCmdAddress
<ValueType
>(cmd
);
13202 gpu::CommandHeader header
;
13205 int32_t internalformat
;
13210 uint32_t pixels_shm_id
;
13211 uint32_t pixels_shm_offset
;
13212 uint32_t async_upload_token
;
13213 uint32_t sync_data_shm_id
;
13214 uint32_t sync_data_shm_offset
;
13215 static const int32_t border
= 0;
13218 static_assert(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
13219 "size of AsyncTexImage2DCHROMIUM should be 52");
13220 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
13221 "offset of AsyncTexImage2DCHROMIUM header should be 0");
13222 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
13223 "offset of AsyncTexImage2DCHROMIUM target should be 4");
13224 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
13225 "offset of AsyncTexImage2DCHROMIUM level should be 8");
13226 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
13227 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12");
13228 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
13229 "offset of AsyncTexImage2DCHROMIUM width should be 16");
13230 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
13231 "offset of AsyncTexImage2DCHROMIUM height should be 20");
13232 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
13233 "offset of AsyncTexImage2DCHROMIUM format should be 24");
13234 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
13235 "offset of AsyncTexImage2DCHROMIUM type should be 28");
13236 static_assert(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
13237 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32");
13239 offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
13240 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36");
13242 offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
13243 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40");
13245 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
13246 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44");
13248 offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
13249 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48");
13251 struct WaitAsyncTexImage2DCHROMIUM
{
13252 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
13253 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
13254 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13255 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13257 static uint32_t ComputeSize() {
13258 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13261 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13263 void Init(GLenum _target
) {
13268 void* Set(void* cmd
, GLenum _target
) {
13269 static_cast<ValueType
*>(cmd
)->Init(_target
);
13270 return NextCmdAddress
<ValueType
>(cmd
);
13273 gpu::CommandHeader header
;
13277 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
13278 "size of WaitAsyncTexImage2DCHROMIUM should be 8");
13279 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
13280 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0");
13281 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
13282 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4");
13284 struct WaitAllAsyncTexImage2DCHROMIUM
{
13285 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
13286 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
13287 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13288 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13290 static uint32_t ComputeSize() {
13291 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13294 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13296 void Init() { SetHeader(); }
13298 void* Set(void* cmd
) {
13299 static_cast<ValueType
*>(cmd
)->Init();
13300 return NextCmdAddress
<ValueType
>(cmd
);
13303 gpu::CommandHeader header
;
13306 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
13307 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4");
13308 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
13309 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0");
13311 struct DiscardFramebufferEXTImmediate
{
13312 typedef DiscardFramebufferEXTImmediate ValueType
;
13313 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
13314 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
13315 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13317 static uint32_t ComputeDataSize(GLsizei count
) {
13318 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
13321 static uint32_t ComputeSize(GLsizei count
) {
13322 return static_cast<uint32_t>(sizeof(ValueType
) +
13323 ComputeDataSize(count
)); // NOLINT
13326 void SetHeader(GLsizei count
) {
13327 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
13330 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
13334 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
13337 void* Set(void* cmd
,
13340 const GLenum
* _attachments
) {
13341 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
13342 const uint32_t size
= ComputeSize(_count
);
13343 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
13346 gpu::CommandHeader header
;
13351 static_assert(sizeof(DiscardFramebufferEXTImmediate
) == 12,
13352 "size of DiscardFramebufferEXTImmediate should be 12");
13353 static_assert(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
13354 "offset of DiscardFramebufferEXTImmediate header should be 0");
13355 static_assert(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
13356 "offset of DiscardFramebufferEXTImmediate target should be 4");
13357 static_assert(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
13358 "offset of DiscardFramebufferEXTImmediate count should be 8");
13360 struct LoseContextCHROMIUM
{
13361 typedef LoseContextCHROMIUM ValueType
;
13362 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
13363 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13364 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13366 static uint32_t ComputeSize() {
13367 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13370 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13372 void Init(GLenum _current
, GLenum _other
) {
13374 current
= _current
;
13378 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
13379 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
13380 return NextCmdAddress
<ValueType
>(cmd
);
13383 gpu::CommandHeader header
;
13388 static_assert(sizeof(LoseContextCHROMIUM
) == 12,
13389 "size of LoseContextCHROMIUM should be 12");
13390 static_assert(offsetof(LoseContextCHROMIUM
, header
) == 0,
13391 "offset of LoseContextCHROMIUM header should be 0");
13392 static_assert(offsetof(LoseContextCHROMIUM
, current
) == 4,
13393 "offset of LoseContextCHROMIUM current should be 4");
13394 static_assert(offsetof(LoseContextCHROMIUM
, other
) == 8,
13395 "offset of LoseContextCHROMIUM other should be 8");
13397 struct WaitSyncPointCHROMIUM
{
13398 typedef WaitSyncPointCHROMIUM ValueType
;
13399 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
13400 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13401 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
13403 static uint32_t ComputeSize() {
13404 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13407 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13409 void Init(GLuint _sync_point
) {
13411 sync_point
= _sync_point
;
13414 void* Set(void* cmd
, GLuint _sync_point
) {
13415 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
13416 return NextCmdAddress
<ValueType
>(cmd
);
13419 gpu::CommandHeader header
;
13420 uint32_t sync_point
;
13423 static_assert(sizeof(WaitSyncPointCHROMIUM
) == 8,
13424 "size of WaitSyncPointCHROMIUM should be 8");
13425 static_assert(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
13426 "offset of WaitSyncPointCHROMIUM header should be 0");
13427 static_assert(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
13428 "offset of WaitSyncPointCHROMIUM sync_point should be 4");
13430 struct DrawBuffersEXTImmediate
{
13431 typedef DrawBuffersEXTImmediate ValueType
;
13432 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
13433 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
13434 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13436 static uint32_t ComputeDataSize(GLsizei count
) {
13437 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
13440 static uint32_t ComputeSize(GLsizei count
) {
13441 return static_cast<uint32_t>(sizeof(ValueType
) +
13442 ComputeDataSize(count
)); // NOLINT
13445 void SetHeader(GLsizei count
) {
13446 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
13449 void Init(GLsizei _count
, const GLenum
* _bufs
) {
13452 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
13455 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
13456 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
13457 const uint32_t size
= ComputeSize(_count
);
13458 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
13461 gpu::CommandHeader header
;
13465 static_assert(sizeof(DrawBuffersEXTImmediate
) == 8,
13466 "size of DrawBuffersEXTImmediate should be 8");
13467 static_assert(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
13468 "offset of DrawBuffersEXTImmediate header should be 0");
13469 static_assert(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
13470 "offset of DrawBuffersEXTImmediate count should be 4");
13472 struct DiscardBackbufferCHROMIUM
{
13473 typedef DiscardBackbufferCHROMIUM ValueType
;
13474 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
13475 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13476 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13478 static uint32_t ComputeSize() {
13479 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13482 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13484 void Init() { SetHeader(); }
13486 void* Set(void* cmd
) {
13487 static_cast<ValueType
*>(cmd
)->Init();
13488 return NextCmdAddress
<ValueType
>(cmd
);
13491 gpu::CommandHeader header
;
13494 static_assert(sizeof(DiscardBackbufferCHROMIUM
) == 4,
13495 "size of DiscardBackbufferCHROMIUM should be 4");
13496 static_assert(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
13497 "offset of DiscardBackbufferCHROMIUM header should be 0");
13499 struct ScheduleOverlayPlaneCHROMIUM
{
13500 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
13501 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
13502 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13503 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13505 static uint32_t ComputeSize() {
13506 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13509 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13511 void Init(GLint _plane_z_order
,
13512 GLenum _plane_transform
,
13513 GLuint _overlay_texture_id
,
13516 GLint _bounds_width
,
13517 GLint _bounds_height
,
13521 GLfloat _uv_height
) {
13523 plane_z_order
= _plane_z_order
;
13524 plane_transform
= _plane_transform
;
13525 overlay_texture_id
= _overlay_texture_id
;
13526 bounds_x
= _bounds_x
;
13527 bounds_y
= _bounds_y
;
13528 bounds_width
= _bounds_width
;
13529 bounds_height
= _bounds_height
;
13532 uv_width
= _uv_width
;
13533 uv_height
= _uv_height
;
13536 void* Set(void* cmd
,
13537 GLint _plane_z_order
,
13538 GLenum _plane_transform
,
13539 GLuint _overlay_texture_id
,
13542 GLint _bounds_width
,
13543 GLint _bounds_height
,
13547 GLfloat _uv_height
) {
13548 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
, _plane_transform
,
13549 _overlay_texture_id
, _bounds_x
,
13550 _bounds_y
, _bounds_width
, _bounds_height
,
13551 _uv_x
, _uv_y
, _uv_width
, _uv_height
);
13552 return NextCmdAddress
<ValueType
>(cmd
);
13555 gpu::CommandHeader header
;
13556 int32_t plane_z_order
;
13557 uint32_t plane_transform
;
13558 uint32_t overlay_texture_id
;
13561 int32_t bounds_width
;
13562 int32_t bounds_height
;
13569 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
13570 "size of ScheduleOverlayPlaneCHROMIUM should be 48");
13571 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
13572 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0");
13574 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
13575 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4");
13577 offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
13578 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8");
13580 offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
13581 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12");
13582 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
13583 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16");
13584 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
13585 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20");
13587 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
13588 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24");
13590 offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
13591 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28");
13592 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
13593 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32");
13594 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
13595 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36");
13596 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
13597 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40");
13598 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
13599 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44");
13601 struct SwapInterval
{
13602 typedef SwapInterval ValueType
;
13603 static const CommandId kCmdId
= kSwapInterval
;
13604 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13605 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
13607 static uint32_t ComputeSize() {
13608 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13611 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13613 void Init(GLint _interval
) {
13615 interval
= _interval
;
13618 void* Set(void* cmd
, GLint _interval
) {
13619 static_cast<ValueType
*>(cmd
)->Init(_interval
);
13620 return NextCmdAddress
<ValueType
>(cmd
);
13623 gpu::CommandHeader header
;
13627 static_assert(sizeof(SwapInterval
) == 8, "size of SwapInterval should be 8");
13628 static_assert(offsetof(SwapInterval
, header
) == 0,
13629 "offset of SwapInterval header should be 0");
13630 static_assert(offsetof(SwapInterval
, interval
) == 4,
13631 "offset of SwapInterval interval should be 4");
13633 struct MatrixLoadfCHROMIUMImmediate
{
13634 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
13635 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
13636 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
13637 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13639 static uint32_t ComputeDataSize() {
13640 return static_cast<uint32_t>(sizeof(GLfloat
) * 16);
13643 static uint32_t ComputeSize() {
13644 return static_cast<uint32_t>(sizeof(ValueType
) + ComputeDataSize());
13647 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
13649 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
13651 matrixMode
= _matrixMode
;
13652 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
13655 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
13656 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
13657 const uint32_t size
= ComputeSize();
13658 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
13661 gpu::CommandHeader header
;
13662 uint32_t matrixMode
;
13665 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
13666 "size of MatrixLoadfCHROMIUMImmediate should be 8");
13667 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
13668 "offset of MatrixLoadfCHROMIUMImmediate header should be 0");
13669 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
13670 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4");
13672 struct MatrixLoadIdentityCHROMIUM
{
13673 typedef MatrixLoadIdentityCHROMIUM ValueType
;
13674 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
13675 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13676 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13678 static uint32_t ComputeSize() {
13679 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13682 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13684 void Init(GLenum _matrixMode
) {
13686 matrixMode
= _matrixMode
;
13689 void* Set(void* cmd
, GLenum _matrixMode
) {
13690 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
13691 return NextCmdAddress
<ValueType
>(cmd
);
13694 gpu::CommandHeader header
;
13695 uint32_t matrixMode
;
13698 static_assert(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
13699 "size of MatrixLoadIdentityCHROMIUM should be 8");
13700 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
13701 "offset of MatrixLoadIdentityCHROMIUM header should be 0");
13702 static_assert(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
13703 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4");
13705 struct BlendBarrierKHR
{
13706 typedef BlendBarrierKHR ValueType
;
13707 static const CommandId kCmdId
= kBlendBarrierKHR
;
13708 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
13709 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
13711 static uint32_t ComputeSize() {
13712 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
13715 void SetHeader() { header
.SetCmd
<ValueType
>(); }
13717 void Init() { SetHeader(); }
13719 void* Set(void* cmd
) {
13720 static_cast<ValueType
*>(cmd
)->Init();
13721 return NextCmdAddress
<ValueType
>(cmd
);
13724 gpu::CommandHeader header
;
13727 static_assert(sizeof(BlendBarrierKHR
) == 4,
13728 "size of BlendBarrierKHR should be 4");
13729 static_assert(offsetof(BlendBarrierKHR
, header
) == 0,
13730 "offset of BlendBarrierKHR header should be 0");
13732 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_