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 struct ActiveTexture
{
15 typedef ActiveTexture ValueType
;
16 static const CommandId kCmdId
= kActiveTexture
;
17 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
18 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
20 static uint32_t ComputeSize() {
21 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
24 void SetHeader() { header
.SetCmd
<ValueType
>(); }
26 void Init(GLenum _texture
) {
31 void* Set(void* cmd
, GLenum _texture
) {
32 static_cast<ValueType
*>(cmd
)->Init(_texture
);
33 return NextCmdAddress
<ValueType
>(cmd
);
36 gpu::CommandHeader header
;
40 COMPILE_ASSERT(sizeof(ActiveTexture
) == 8, Sizeof_ActiveTexture_is_not_8
);
41 COMPILE_ASSERT(offsetof(ActiveTexture
, header
) == 0,
42 OffsetOf_ActiveTexture_header_not_0
);
43 COMPILE_ASSERT(offsetof(ActiveTexture
, texture
) == 4,
44 OffsetOf_ActiveTexture_texture_not_4
);
47 typedef AttachShader ValueType
;
48 static const CommandId kCmdId
= kAttachShader
;
49 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
50 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
52 static uint32_t ComputeSize() {
53 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
56 void SetHeader() { header
.SetCmd
<ValueType
>(); }
58 void Init(GLuint _program
, GLuint _shader
) {
64 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
65 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
66 return NextCmdAddress
<ValueType
>(cmd
);
69 gpu::CommandHeader header
;
74 COMPILE_ASSERT(sizeof(AttachShader
) == 12, Sizeof_AttachShader_is_not_12
);
75 COMPILE_ASSERT(offsetof(AttachShader
, header
) == 0,
76 OffsetOf_AttachShader_header_not_0
);
77 COMPILE_ASSERT(offsetof(AttachShader
, program
) == 4,
78 OffsetOf_AttachShader_program_not_4
);
79 COMPILE_ASSERT(offsetof(AttachShader
, shader
) == 8,
80 OffsetOf_AttachShader_shader_not_8
);
82 struct BindAttribLocationBucket
{
83 typedef BindAttribLocationBucket ValueType
;
84 static const CommandId kCmdId
= kBindAttribLocationBucket
;
85 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
86 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
88 static uint32_t ComputeSize() {
89 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
92 void SetHeader() { header
.SetCmd
<ValueType
>(); }
94 void Init(GLuint _program
, GLuint _index
, uint32_t _name_bucket_id
) {
98 name_bucket_id
= _name_bucket_id
;
104 uint32_t _name_bucket_id
) {
105 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
);
106 return NextCmdAddress
<ValueType
>(cmd
);
109 gpu::CommandHeader header
;
112 uint32_t name_bucket_id
;
115 COMPILE_ASSERT(sizeof(BindAttribLocationBucket
) == 16,
116 Sizeof_BindAttribLocationBucket_is_not_16
);
117 COMPILE_ASSERT(offsetof(BindAttribLocationBucket
, header
) == 0,
118 OffsetOf_BindAttribLocationBucket_header_not_0
);
119 COMPILE_ASSERT(offsetof(BindAttribLocationBucket
, program
) == 4,
120 OffsetOf_BindAttribLocationBucket_program_not_4
);
121 COMPILE_ASSERT(offsetof(BindAttribLocationBucket
, index
) == 8,
122 OffsetOf_BindAttribLocationBucket_index_not_8
);
123 COMPILE_ASSERT(offsetof(BindAttribLocationBucket
, name_bucket_id
) == 12,
124 OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12
);
127 typedef BindBuffer ValueType
;
128 static const CommandId kCmdId
= kBindBuffer
;
129 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
130 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
132 static uint32_t ComputeSize() {
133 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
136 void SetHeader() { header
.SetCmd
<ValueType
>(); }
138 void Init(GLenum _target
, GLuint _buffer
) {
144 void* Set(void* cmd
, GLenum _target
, GLuint _buffer
) {
145 static_cast<ValueType
*>(cmd
)->Init(_target
, _buffer
);
146 return NextCmdAddress
<ValueType
>(cmd
);
149 gpu::CommandHeader header
;
154 COMPILE_ASSERT(sizeof(BindBuffer
) == 12, Sizeof_BindBuffer_is_not_12
);
155 COMPILE_ASSERT(offsetof(BindBuffer
, header
) == 0,
156 OffsetOf_BindBuffer_header_not_0
);
157 COMPILE_ASSERT(offsetof(BindBuffer
, target
) == 4,
158 OffsetOf_BindBuffer_target_not_4
);
159 COMPILE_ASSERT(offsetof(BindBuffer
, buffer
) == 8,
160 OffsetOf_BindBuffer_buffer_not_8
);
162 struct BindFramebuffer
{
163 typedef BindFramebuffer ValueType
;
164 static const CommandId kCmdId
= kBindFramebuffer
;
165 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
166 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
168 static uint32_t ComputeSize() {
169 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
172 void SetHeader() { header
.SetCmd
<ValueType
>(); }
174 void Init(GLenum _target
, GLuint _framebuffer
) {
177 framebuffer
= _framebuffer
;
180 void* Set(void* cmd
, GLenum _target
, GLuint _framebuffer
) {
181 static_cast<ValueType
*>(cmd
)->Init(_target
, _framebuffer
);
182 return NextCmdAddress
<ValueType
>(cmd
);
185 gpu::CommandHeader header
;
187 uint32_t framebuffer
;
190 COMPILE_ASSERT(sizeof(BindFramebuffer
) == 12, Sizeof_BindFramebuffer_is_not_12
);
191 COMPILE_ASSERT(offsetof(BindFramebuffer
, header
) == 0,
192 OffsetOf_BindFramebuffer_header_not_0
);
193 COMPILE_ASSERT(offsetof(BindFramebuffer
, target
) == 4,
194 OffsetOf_BindFramebuffer_target_not_4
);
195 COMPILE_ASSERT(offsetof(BindFramebuffer
, framebuffer
) == 8,
196 OffsetOf_BindFramebuffer_framebuffer_not_8
);
198 struct BindRenderbuffer
{
199 typedef BindRenderbuffer ValueType
;
200 static const CommandId kCmdId
= kBindRenderbuffer
;
201 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
202 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
204 static uint32_t ComputeSize() {
205 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
208 void SetHeader() { header
.SetCmd
<ValueType
>(); }
210 void Init(GLenum _target
, GLuint _renderbuffer
) {
213 renderbuffer
= _renderbuffer
;
216 void* Set(void* cmd
, GLenum _target
, GLuint _renderbuffer
) {
217 static_cast<ValueType
*>(cmd
)->Init(_target
, _renderbuffer
);
218 return NextCmdAddress
<ValueType
>(cmd
);
221 gpu::CommandHeader header
;
223 uint32_t renderbuffer
;
226 COMPILE_ASSERT(sizeof(BindRenderbuffer
) == 12,
227 Sizeof_BindRenderbuffer_is_not_12
);
228 COMPILE_ASSERT(offsetof(BindRenderbuffer
, header
) == 0,
229 OffsetOf_BindRenderbuffer_header_not_0
);
230 COMPILE_ASSERT(offsetof(BindRenderbuffer
, target
) == 4,
231 OffsetOf_BindRenderbuffer_target_not_4
);
232 COMPILE_ASSERT(offsetof(BindRenderbuffer
, renderbuffer
) == 8,
233 OffsetOf_BindRenderbuffer_renderbuffer_not_8
);
236 typedef BindTexture ValueType
;
237 static const CommandId kCmdId
= kBindTexture
;
238 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
239 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
241 static uint32_t ComputeSize() {
242 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
245 void SetHeader() { header
.SetCmd
<ValueType
>(); }
247 void Init(GLenum _target
, GLuint _texture
) {
253 void* Set(void* cmd
, GLenum _target
, GLuint _texture
) {
254 static_cast<ValueType
*>(cmd
)->Init(_target
, _texture
);
255 return NextCmdAddress
<ValueType
>(cmd
);
258 gpu::CommandHeader header
;
263 COMPILE_ASSERT(sizeof(BindTexture
) == 12, Sizeof_BindTexture_is_not_12
);
264 COMPILE_ASSERT(offsetof(BindTexture
, header
) == 0,
265 OffsetOf_BindTexture_header_not_0
);
266 COMPILE_ASSERT(offsetof(BindTexture
, target
) == 4,
267 OffsetOf_BindTexture_target_not_4
);
268 COMPILE_ASSERT(offsetof(BindTexture
, texture
) == 8,
269 OffsetOf_BindTexture_texture_not_8
);
272 typedef BlendColor ValueType
;
273 static const CommandId kCmdId
= kBlendColor
;
274 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
275 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
277 static uint32_t ComputeSize() {
278 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
281 void SetHeader() { header
.SetCmd
<ValueType
>(); }
283 void Init(GLclampf _red
, GLclampf _green
, GLclampf _blue
, GLclampf _alpha
) {
296 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
297 return NextCmdAddress
<ValueType
>(cmd
);
300 gpu::CommandHeader header
;
307 COMPILE_ASSERT(sizeof(BlendColor
) == 20, Sizeof_BlendColor_is_not_20
);
308 COMPILE_ASSERT(offsetof(BlendColor
, header
) == 0,
309 OffsetOf_BlendColor_header_not_0
);
310 COMPILE_ASSERT(offsetof(BlendColor
, red
) == 4, OffsetOf_BlendColor_red_not_4
);
311 COMPILE_ASSERT(offsetof(BlendColor
, green
) == 8,
312 OffsetOf_BlendColor_green_not_8
);
313 COMPILE_ASSERT(offsetof(BlendColor
, blue
) == 12,
314 OffsetOf_BlendColor_blue_not_12
);
315 COMPILE_ASSERT(offsetof(BlendColor
, alpha
) == 16,
316 OffsetOf_BlendColor_alpha_not_16
);
318 struct BlendEquation
{
319 typedef BlendEquation ValueType
;
320 static const CommandId kCmdId
= kBlendEquation
;
321 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
322 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
324 static uint32_t ComputeSize() {
325 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
328 void SetHeader() { header
.SetCmd
<ValueType
>(); }
330 void Init(GLenum _mode
) {
335 void* Set(void* cmd
, GLenum _mode
) {
336 static_cast<ValueType
*>(cmd
)->Init(_mode
);
337 return NextCmdAddress
<ValueType
>(cmd
);
340 gpu::CommandHeader header
;
344 COMPILE_ASSERT(sizeof(BlendEquation
) == 8, Sizeof_BlendEquation_is_not_8
);
345 COMPILE_ASSERT(offsetof(BlendEquation
, header
) == 0,
346 OffsetOf_BlendEquation_header_not_0
);
347 COMPILE_ASSERT(offsetof(BlendEquation
, mode
) == 4,
348 OffsetOf_BlendEquation_mode_not_4
);
350 struct BlendEquationSeparate
{
351 typedef BlendEquationSeparate ValueType
;
352 static const CommandId kCmdId
= kBlendEquationSeparate
;
353 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
354 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
356 static uint32_t ComputeSize() {
357 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
360 void SetHeader() { header
.SetCmd
<ValueType
>(); }
362 void Init(GLenum _modeRGB
, GLenum _modeAlpha
) {
365 modeAlpha
= _modeAlpha
;
368 void* Set(void* cmd
, GLenum _modeRGB
, GLenum _modeAlpha
) {
369 static_cast<ValueType
*>(cmd
)->Init(_modeRGB
, _modeAlpha
);
370 return NextCmdAddress
<ValueType
>(cmd
);
373 gpu::CommandHeader header
;
378 COMPILE_ASSERT(sizeof(BlendEquationSeparate
) == 12,
379 Sizeof_BlendEquationSeparate_is_not_12
);
380 COMPILE_ASSERT(offsetof(BlendEquationSeparate
, header
) == 0,
381 OffsetOf_BlendEquationSeparate_header_not_0
);
382 COMPILE_ASSERT(offsetof(BlendEquationSeparate
, modeRGB
) == 4,
383 OffsetOf_BlendEquationSeparate_modeRGB_not_4
);
384 COMPILE_ASSERT(offsetof(BlendEquationSeparate
, modeAlpha
) == 8,
385 OffsetOf_BlendEquationSeparate_modeAlpha_not_8
);
388 typedef BlendFunc ValueType
;
389 static const CommandId kCmdId
= kBlendFunc
;
390 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
391 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
393 static uint32_t ComputeSize() {
394 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
397 void SetHeader() { header
.SetCmd
<ValueType
>(); }
399 void Init(GLenum _sfactor
, GLenum _dfactor
) {
405 void* Set(void* cmd
, GLenum _sfactor
, GLenum _dfactor
) {
406 static_cast<ValueType
*>(cmd
)->Init(_sfactor
, _dfactor
);
407 return NextCmdAddress
<ValueType
>(cmd
);
410 gpu::CommandHeader header
;
415 COMPILE_ASSERT(sizeof(BlendFunc
) == 12, Sizeof_BlendFunc_is_not_12
);
416 COMPILE_ASSERT(offsetof(BlendFunc
, header
) == 0,
417 OffsetOf_BlendFunc_header_not_0
);
418 COMPILE_ASSERT(offsetof(BlendFunc
, sfactor
) == 4,
419 OffsetOf_BlendFunc_sfactor_not_4
);
420 COMPILE_ASSERT(offsetof(BlendFunc
, dfactor
) == 8,
421 OffsetOf_BlendFunc_dfactor_not_8
);
423 struct BlendFuncSeparate
{
424 typedef BlendFuncSeparate ValueType
;
425 static const CommandId kCmdId
= kBlendFuncSeparate
;
426 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
427 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
429 static uint32_t ComputeSize() {
430 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
433 void SetHeader() { header
.SetCmd
<ValueType
>(); }
435 void Init(GLenum _srcRGB
,
442 srcAlpha
= _srcAlpha
;
443 dstAlpha
= _dstAlpha
;
451 static_cast<ValueType
*>(cmd
)->Init(_srcRGB
, _dstRGB
, _srcAlpha
, _dstAlpha
);
452 return NextCmdAddress
<ValueType
>(cmd
);
455 gpu::CommandHeader header
;
462 COMPILE_ASSERT(sizeof(BlendFuncSeparate
) == 20,
463 Sizeof_BlendFuncSeparate_is_not_20
);
464 COMPILE_ASSERT(offsetof(BlendFuncSeparate
, header
) == 0,
465 OffsetOf_BlendFuncSeparate_header_not_0
);
466 COMPILE_ASSERT(offsetof(BlendFuncSeparate
, srcRGB
) == 4,
467 OffsetOf_BlendFuncSeparate_srcRGB_not_4
);
468 COMPILE_ASSERT(offsetof(BlendFuncSeparate
, dstRGB
) == 8,
469 OffsetOf_BlendFuncSeparate_dstRGB_not_8
);
470 COMPILE_ASSERT(offsetof(BlendFuncSeparate
, srcAlpha
) == 12,
471 OffsetOf_BlendFuncSeparate_srcAlpha_not_12
);
472 COMPILE_ASSERT(offsetof(BlendFuncSeparate
, dstAlpha
) == 16,
473 OffsetOf_BlendFuncSeparate_dstAlpha_not_16
);
476 typedef BufferData ValueType
;
477 static const CommandId kCmdId
= kBufferData
;
478 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
479 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
481 static uint32_t ComputeSize() {
482 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
485 void SetHeader() { header
.SetCmd
<ValueType
>(); }
487 void Init(GLenum _target
,
489 uint32_t _data_shm_id
,
490 uint32_t _data_shm_offset
,
495 data_shm_id
= _data_shm_id
;
496 data_shm_offset
= _data_shm_offset
;
503 uint32_t _data_shm_id
,
504 uint32_t _data_shm_offset
,
506 static_cast<ValueType
*>(cmd
)
507 ->Init(_target
, _size
, _data_shm_id
, _data_shm_offset
, _usage
);
508 return NextCmdAddress
<ValueType
>(cmd
);
511 gpu::CommandHeader header
;
514 uint32_t data_shm_id
;
515 uint32_t data_shm_offset
;
519 COMPILE_ASSERT(sizeof(BufferData
) == 24, Sizeof_BufferData_is_not_24
);
520 COMPILE_ASSERT(offsetof(BufferData
, header
) == 0,
521 OffsetOf_BufferData_header_not_0
);
522 COMPILE_ASSERT(offsetof(BufferData
, target
) == 4,
523 OffsetOf_BufferData_target_not_4
);
524 COMPILE_ASSERT(offsetof(BufferData
, size
) == 8, OffsetOf_BufferData_size_not_8
);
525 COMPILE_ASSERT(offsetof(BufferData
, data_shm_id
) == 12,
526 OffsetOf_BufferData_data_shm_id_not_12
);
527 COMPILE_ASSERT(offsetof(BufferData
, data_shm_offset
) == 16,
528 OffsetOf_BufferData_data_shm_offset_not_16
);
529 COMPILE_ASSERT(offsetof(BufferData
, usage
) == 20,
530 OffsetOf_BufferData_usage_not_20
);
532 struct BufferSubData
{
533 typedef BufferSubData ValueType
;
534 static const CommandId kCmdId
= kBufferSubData
;
535 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
536 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
538 static uint32_t ComputeSize() {
539 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
542 void SetHeader() { header
.SetCmd
<ValueType
>(); }
544 void Init(GLenum _target
,
547 uint32_t _data_shm_id
,
548 uint32_t _data_shm_offset
) {
553 data_shm_id
= _data_shm_id
;
554 data_shm_offset
= _data_shm_offset
;
561 uint32_t _data_shm_id
,
562 uint32_t _data_shm_offset
) {
563 static_cast<ValueType
*>(cmd
)
564 ->Init(_target
, _offset
, _size
, _data_shm_id
, _data_shm_offset
);
565 return NextCmdAddress
<ValueType
>(cmd
);
568 gpu::CommandHeader header
;
572 uint32_t data_shm_id
;
573 uint32_t data_shm_offset
;
576 COMPILE_ASSERT(sizeof(BufferSubData
) == 24, Sizeof_BufferSubData_is_not_24
);
577 COMPILE_ASSERT(offsetof(BufferSubData
, header
) == 0,
578 OffsetOf_BufferSubData_header_not_0
);
579 COMPILE_ASSERT(offsetof(BufferSubData
, target
) == 4,
580 OffsetOf_BufferSubData_target_not_4
);
581 COMPILE_ASSERT(offsetof(BufferSubData
, offset
) == 8,
582 OffsetOf_BufferSubData_offset_not_8
);
583 COMPILE_ASSERT(offsetof(BufferSubData
, size
) == 12,
584 OffsetOf_BufferSubData_size_not_12
);
585 COMPILE_ASSERT(offsetof(BufferSubData
, data_shm_id
) == 16,
586 OffsetOf_BufferSubData_data_shm_id_not_16
);
587 COMPILE_ASSERT(offsetof(BufferSubData
, data_shm_offset
) == 20,
588 OffsetOf_BufferSubData_data_shm_offset_not_20
);
590 struct CheckFramebufferStatus
{
591 typedef CheckFramebufferStatus ValueType
;
592 static const CommandId kCmdId
= kCheckFramebufferStatus
;
593 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
594 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
596 typedef GLenum Result
;
598 static uint32_t ComputeSize() {
599 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
602 void SetHeader() { header
.SetCmd
<ValueType
>(); }
604 void Init(GLenum _target
,
605 uint32_t _result_shm_id
,
606 uint32_t _result_shm_offset
) {
609 result_shm_id
= _result_shm_id
;
610 result_shm_offset
= _result_shm_offset
;
615 uint32_t _result_shm_id
,
616 uint32_t _result_shm_offset
) {
617 static_cast<ValueType
*>(cmd
)
618 ->Init(_target
, _result_shm_id
, _result_shm_offset
);
619 return NextCmdAddress
<ValueType
>(cmd
);
622 gpu::CommandHeader header
;
624 uint32_t result_shm_id
;
625 uint32_t result_shm_offset
;
628 COMPILE_ASSERT(sizeof(CheckFramebufferStatus
) == 16,
629 Sizeof_CheckFramebufferStatus_is_not_16
);
630 COMPILE_ASSERT(offsetof(CheckFramebufferStatus
, header
) == 0,
631 OffsetOf_CheckFramebufferStatus_header_not_0
);
632 COMPILE_ASSERT(offsetof(CheckFramebufferStatus
, target
) == 4,
633 OffsetOf_CheckFramebufferStatus_target_not_4
);
634 COMPILE_ASSERT(offsetof(CheckFramebufferStatus
, result_shm_id
) == 8,
635 OffsetOf_CheckFramebufferStatus_result_shm_id_not_8
);
636 COMPILE_ASSERT(offsetof(CheckFramebufferStatus
, result_shm_offset
) == 12,
637 OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12
);
640 typedef Clear ValueType
;
641 static const CommandId kCmdId
= kClear
;
642 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
643 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
645 static uint32_t ComputeSize() {
646 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
649 void SetHeader() { header
.SetCmd
<ValueType
>(); }
651 void Init(GLbitfield _mask
) {
656 void* Set(void* cmd
, GLbitfield _mask
) {
657 static_cast<ValueType
*>(cmd
)->Init(_mask
);
658 return NextCmdAddress
<ValueType
>(cmd
);
661 gpu::CommandHeader header
;
665 COMPILE_ASSERT(sizeof(Clear
) == 8, Sizeof_Clear_is_not_8
);
666 COMPILE_ASSERT(offsetof(Clear
, header
) == 0, OffsetOf_Clear_header_not_0
);
667 COMPILE_ASSERT(offsetof(Clear
, mask
) == 4, OffsetOf_Clear_mask_not_4
);
670 typedef ClearColor ValueType
;
671 static const CommandId kCmdId
= kClearColor
;
672 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
673 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
675 static uint32_t ComputeSize() {
676 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
679 void SetHeader() { header
.SetCmd
<ValueType
>(); }
681 void Init(GLclampf _red
, GLclampf _green
, GLclampf _blue
, GLclampf _alpha
) {
694 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
695 return NextCmdAddress
<ValueType
>(cmd
);
698 gpu::CommandHeader header
;
705 COMPILE_ASSERT(sizeof(ClearColor
) == 20, Sizeof_ClearColor_is_not_20
);
706 COMPILE_ASSERT(offsetof(ClearColor
, header
) == 0,
707 OffsetOf_ClearColor_header_not_0
);
708 COMPILE_ASSERT(offsetof(ClearColor
, red
) == 4, OffsetOf_ClearColor_red_not_4
);
709 COMPILE_ASSERT(offsetof(ClearColor
, green
) == 8,
710 OffsetOf_ClearColor_green_not_8
);
711 COMPILE_ASSERT(offsetof(ClearColor
, blue
) == 12,
712 OffsetOf_ClearColor_blue_not_12
);
713 COMPILE_ASSERT(offsetof(ClearColor
, alpha
) == 16,
714 OffsetOf_ClearColor_alpha_not_16
);
717 typedef ClearDepthf ValueType
;
718 static const CommandId kCmdId
= kClearDepthf
;
719 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
720 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
722 static uint32_t ComputeSize() {
723 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
726 void SetHeader() { header
.SetCmd
<ValueType
>(); }
728 void Init(GLclampf _depth
) {
733 void* Set(void* cmd
, GLclampf _depth
) {
734 static_cast<ValueType
*>(cmd
)->Init(_depth
);
735 return NextCmdAddress
<ValueType
>(cmd
);
738 gpu::CommandHeader header
;
742 COMPILE_ASSERT(sizeof(ClearDepthf
) == 8, Sizeof_ClearDepthf_is_not_8
);
743 COMPILE_ASSERT(offsetof(ClearDepthf
, header
) == 0,
744 OffsetOf_ClearDepthf_header_not_0
);
745 COMPILE_ASSERT(offsetof(ClearDepthf
, depth
) == 4,
746 OffsetOf_ClearDepthf_depth_not_4
);
748 struct ClearStencil
{
749 typedef ClearStencil ValueType
;
750 static const CommandId kCmdId
= kClearStencil
;
751 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
752 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
754 static uint32_t ComputeSize() {
755 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
758 void SetHeader() { header
.SetCmd
<ValueType
>(); }
760 void Init(GLint _s
) {
765 void* Set(void* cmd
, GLint _s
) {
766 static_cast<ValueType
*>(cmd
)->Init(_s
);
767 return NextCmdAddress
<ValueType
>(cmd
);
770 gpu::CommandHeader header
;
774 COMPILE_ASSERT(sizeof(ClearStencil
) == 8, Sizeof_ClearStencil_is_not_8
);
775 COMPILE_ASSERT(offsetof(ClearStencil
, header
) == 0,
776 OffsetOf_ClearStencil_header_not_0
);
777 COMPILE_ASSERT(offsetof(ClearStencil
, s
) == 4, OffsetOf_ClearStencil_s_not_4
);
780 typedef ColorMask ValueType
;
781 static const CommandId kCmdId
= kColorMask
;
782 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
783 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
785 static uint32_t ComputeSize() {
786 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
789 void SetHeader() { header
.SetCmd
<ValueType
>(); }
791 void Init(GLboolean _red
,
807 static_cast<ValueType
*>(cmd
)->Init(_red
, _green
, _blue
, _alpha
);
808 return NextCmdAddress
<ValueType
>(cmd
);
811 gpu::CommandHeader header
;
818 COMPILE_ASSERT(sizeof(ColorMask
) == 20, Sizeof_ColorMask_is_not_20
);
819 COMPILE_ASSERT(offsetof(ColorMask
, header
) == 0,
820 OffsetOf_ColorMask_header_not_0
);
821 COMPILE_ASSERT(offsetof(ColorMask
, red
) == 4, OffsetOf_ColorMask_red_not_4
);
822 COMPILE_ASSERT(offsetof(ColorMask
, green
) == 8, OffsetOf_ColorMask_green_not_8
);
823 COMPILE_ASSERT(offsetof(ColorMask
, blue
) == 12, OffsetOf_ColorMask_blue_not_12
);
824 COMPILE_ASSERT(offsetof(ColorMask
, alpha
) == 16,
825 OffsetOf_ColorMask_alpha_not_16
);
827 struct CompileShader
{
828 typedef CompileShader ValueType
;
829 static const CommandId kCmdId
= kCompileShader
;
830 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
831 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
833 static uint32_t ComputeSize() {
834 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
837 void SetHeader() { header
.SetCmd
<ValueType
>(); }
839 void Init(GLuint _shader
) {
844 void* Set(void* cmd
, GLuint _shader
) {
845 static_cast<ValueType
*>(cmd
)->Init(_shader
);
846 return NextCmdAddress
<ValueType
>(cmd
);
849 gpu::CommandHeader header
;
853 COMPILE_ASSERT(sizeof(CompileShader
) == 8, Sizeof_CompileShader_is_not_8
);
854 COMPILE_ASSERT(offsetof(CompileShader
, header
) == 0,
855 OffsetOf_CompileShader_header_not_0
);
856 COMPILE_ASSERT(offsetof(CompileShader
, shader
) == 4,
857 OffsetOf_CompileShader_shader_not_4
);
859 struct CompressedTexImage2DBucket
{
860 typedef CompressedTexImage2DBucket ValueType
;
861 static const CommandId kCmdId
= kCompressedTexImage2DBucket
;
862 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
863 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
865 static uint32_t ComputeSize() {
866 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
869 void SetHeader() { header
.SetCmd
<ValueType
>(); }
871 void Init(GLenum _target
,
873 GLenum _internalformat
,
880 internalformat
= _internalformat
;
883 bucket_id
= _bucket_id
;
889 GLenum _internalformat
,
893 static_cast<ValueType
*>(cmd
)
894 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _bucket_id
);
895 return NextCmdAddress
<ValueType
>(cmd
);
898 gpu::CommandHeader header
;
901 uint32_t internalformat
;
905 static const int32_t border
= 0;
908 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket
) == 28,
909 Sizeof_CompressedTexImage2DBucket_is_not_28
);
910 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, header
) == 0,
911 OffsetOf_CompressedTexImage2DBucket_header_not_0
);
912 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, target
) == 4,
913 OffsetOf_CompressedTexImage2DBucket_target_not_4
);
914 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, level
) == 8,
915 OffsetOf_CompressedTexImage2DBucket_level_not_8
);
916 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, internalformat
) == 12,
917 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12
);
918 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, width
) == 16,
919 OffsetOf_CompressedTexImage2DBucket_width_not_16
);
920 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, height
) == 20,
921 OffsetOf_CompressedTexImage2DBucket_height_not_20
);
922 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket
, bucket_id
) == 24,
923 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_24
);
925 struct CompressedTexImage2D
{
926 typedef CompressedTexImage2D ValueType
;
927 static const CommandId kCmdId
= kCompressedTexImage2D
;
928 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
929 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
931 static uint32_t ComputeSize() {
932 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
935 void SetHeader() { header
.SetCmd
<ValueType
>(); }
937 void Init(GLenum _target
,
939 GLenum _internalformat
,
943 uint32_t _data_shm_id
,
944 uint32_t _data_shm_offset
) {
948 internalformat
= _internalformat
;
951 imageSize
= _imageSize
;
952 data_shm_id
= _data_shm_id
;
953 data_shm_offset
= _data_shm_offset
;
959 GLenum _internalformat
,
963 uint32_t _data_shm_id
,
964 uint32_t _data_shm_offset
) {
965 static_cast<ValueType
*>(cmd
)->Init(_target
,
973 return NextCmdAddress
<ValueType
>(cmd
);
976 gpu::CommandHeader header
;
979 uint32_t internalformat
;
983 uint32_t data_shm_id
;
984 uint32_t data_shm_offset
;
985 static const int32_t border
= 0;
988 COMPILE_ASSERT(sizeof(CompressedTexImage2D
) == 36,
989 Sizeof_CompressedTexImage2D_is_not_36
);
990 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, header
) == 0,
991 OffsetOf_CompressedTexImage2D_header_not_0
);
992 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, target
) == 4,
993 OffsetOf_CompressedTexImage2D_target_not_4
);
994 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, level
) == 8,
995 OffsetOf_CompressedTexImage2D_level_not_8
);
996 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, internalformat
) == 12,
997 OffsetOf_CompressedTexImage2D_internalformat_not_12
);
998 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, width
) == 16,
999 OffsetOf_CompressedTexImage2D_width_not_16
);
1000 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, height
) == 20,
1001 OffsetOf_CompressedTexImage2D_height_not_20
);
1002 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, imageSize
) == 24,
1003 OffsetOf_CompressedTexImage2D_imageSize_not_24
);
1004 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, data_shm_id
) == 28,
1005 OffsetOf_CompressedTexImage2D_data_shm_id_not_28
);
1006 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, data_shm_offset
) == 32,
1007 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32
);
1009 struct CompressedTexSubImage2DBucket
{
1010 typedef CompressedTexSubImage2DBucket ValueType
;
1011 static const CommandId kCmdId
= kCompressedTexSubImage2DBucket
;
1012 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1013 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1015 static uint32_t ComputeSize() {
1016 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1019 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1021 void Init(GLenum _target
,
1028 GLuint _bucket_id
) {
1037 bucket_id
= _bucket_id
;
1040 void* Set(void* cmd
,
1048 GLuint _bucket_id
) {
1049 static_cast<ValueType
*>(cmd
)->Init(_target
,
1057 return NextCmdAddress
<ValueType
>(cmd
);
1060 gpu::CommandHeader header
;
1071 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket
) == 36,
1072 Sizeof_CompressedTexSubImage2DBucket_is_not_36
);
1073 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, header
) == 0,
1074 OffsetOf_CompressedTexSubImage2DBucket_header_not_0
);
1075 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, target
) == 4,
1076 OffsetOf_CompressedTexSubImage2DBucket_target_not_4
);
1077 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, level
) == 8,
1078 OffsetOf_CompressedTexSubImage2DBucket_level_not_8
);
1079 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, xoffset
) == 12,
1080 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12
);
1081 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, yoffset
) == 16,
1082 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16
);
1083 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, width
) == 20,
1084 OffsetOf_CompressedTexSubImage2DBucket_width_not_20
);
1085 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, height
) == 24,
1086 OffsetOf_CompressedTexSubImage2DBucket_height_not_24
);
1087 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, format
) == 28,
1088 OffsetOf_CompressedTexSubImage2DBucket_format_not_28
);
1089 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, bucket_id
) == 32,
1090 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32
);
1092 struct CompressedTexSubImage2D
{
1093 typedef CompressedTexSubImage2D ValueType
;
1094 static const CommandId kCmdId
= kCompressedTexSubImage2D
;
1095 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1096 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1098 static uint32_t ComputeSize() {
1099 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1102 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1104 void Init(GLenum _target
,
1112 uint32_t _data_shm_id
,
1113 uint32_t _data_shm_offset
) {
1122 imageSize
= _imageSize
;
1123 data_shm_id
= _data_shm_id
;
1124 data_shm_offset
= _data_shm_offset
;
1127 void* Set(void* cmd
,
1136 uint32_t _data_shm_id
,
1137 uint32_t _data_shm_offset
) {
1138 static_cast<ValueType
*>(cmd
)->Init(_target
,
1148 return NextCmdAddress
<ValueType
>(cmd
);
1151 gpu::CommandHeader header
;
1160 uint32_t data_shm_id
;
1161 uint32_t data_shm_offset
;
1164 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D
) == 44,
1165 Sizeof_CompressedTexSubImage2D_is_not_44
);
1166 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, header
) == 0,
1167 OffsetOf_CompressedTexSubImage2D_header_not_0
);
1168 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, target
) == 4,
1169 OffsetOf_CompressedTexSubImage2D_target_not_4
);
1170 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, level
) == 8,
1171 OffsetOf_CompressedTexSubImage2D_level_not_8
);
1172 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, xoffset
) == 12,
1173 OffsetOf_CompressedTexSubImage2D_xoffset_not_12
);
1174 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, yoffset
) == 16,
1175 OffsetOf_CompressedTexSubImage2D_yoffset_not_16
);
1176 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, width
) == 20,
1177 OffsetOf_CompressedTexSubImage2D_width_not_20
);
1178 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, height
) == 24,
1179 OffsetOf_CompressedTexSubImage2D_height_not_24
);
1180 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, format
) == 28,
1181 OffsetOf_CompressedTexSubImage2D_format_not_28
);
1182 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, imageSize
) == 32,
1183 OffsetOf_CompressedTexSubImage2D_imageSize_not_32
);
1184 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, data_shm_id
) == 36,
1185 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36
);
1186 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, data_shm_offset
) == 40,
1187 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40
);
1189 struct CopyTexImage2D
{
1190 typedef CopyTexImage2D ValueType
;
1191 static const CommandId kCmdId
= kCopyTexImage2D
;
1192 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1193 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1195 static uint32_t ComputeSize() {
1196 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1199 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1201 void Init(GLenum _target
,
1203 GLenum _internalformat
,
1211 internalformat
= _internalformat
;
1218 void* Set(void* cmd
,
1221 GLenum _internalformat
,
1226 static_cast<ValueType
*>(cmd
)
1227 ->Init(_target
, _level
, _internalformat
, _x
, _y
, _width
, _height
);
1228 return NextCmdAddress
<ValueType
>(cmd
);
1231 gpu::CommandHeader header
;
1234 uint32_t internalformat
;
1239 static const int32_t border
= 0;
1242 COMPILE_ASSERT(sizeof(CopyTexImage2D
) == 32, Sizeof_CopyTexImage2D_is_not_32
);
1243 COMPILE_ASSERT(offsetof(CopyTexImage2D
, header
) == 0,
1244 OffsetOf_CopyTexImage2D_header_not_0
);
1245 COMPILE_ASSERT(offsetof(CopyTexImage2D
, target
) == 4,
1246 OffsetOf_CopyTexImage2D_target_not_4
);
1247 COMPILE_ASSERT(offsetof(CopyTexImage2D
, level
) == 8,
1248 OffsetOf_CopyTexImage2D_level_not_8
);
1249 COMPILE_ASSERT(offsetof(CopyTexImage2D
, internalformat
) == 12,
1250 OffsetOf_CopyTexImage2D_internalformat_not_12
);
1251 COMPILE_ASSERT(offsetof(CopyTexImage2D
, x
) == 16,
1252 OffsetOf_CopyTexImage2D_x_not_16
);
1253 COMPILE_ASSERT(offsetof(CopyTexImage2D
, y
) == 20,
1254 OffsetOf_CopyTexImage2D_y_not_20
);
1255 COMPILE_ASSERT(offsetof(CopyTexImage2D
, width
) == 24,
1256 OffsetOf_CopyTexImage2D_width_not_24
);
1257 COMPILE_ASSERT(offsetof(CopyTexImage2D
, height
) == 28,
1258 OffsetOf_CopyTexImage2D_height_not_28
);
1260 struct CopyTexSubImage2D
{
1261 typedef CopyTexSubImage2D ValueType
;
1262 static const CommandId kCmdId
= kCopyTexSubImage2D
;
1263 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1264 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1266 static uint32_t ComputeSize() {
1267 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1270 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1272 void Init(GLenum _target
,
1291 void* Set(void* cmd
,
1300 static_cast<ValueType
*>(cmd
)
1301 ->Init(_target
, _level
, _xoffset
, _yoffset
, _x
, _y
, _width
, _height
);
1302 return NextCmdAddress
<ValueType
>(cmd
);
1305 gpu::CommandHeader header
;
1316 COMPILE_ASSERT(sizeof(CopyTexSubImage2D
) == 36,
1317 Sizeof_CopyTexSubImage2D_is_not_36
);
1318 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, header
) == 0,
1319 OffsetOf_CopyTexSubImage2D_header_not_0
);
1320 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, target
) == 4,
1321 OffsetOf_CopyTexSubImage2D_target_not_4
);
1322 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, level
) == 8,
1323 OffsetOf_CopyTexSubImage2D_level_not_8
);
1324 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, xoffset
) == 12,
1325 OffsetOf_CopyTexSubImage2D_xoffset_not_12
);
1326 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, yoffset
) == 16,
1327 OffsetOf_CopyTexSubImage2D_yoffset_not_16
);
1328 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, x
) == 20,
1329 OffsetOf_CopyTexSubImage2D_x_not_20
);
1330 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, y
) == 24,
1331 OffsetOf_CopyTexSubImage2D_y_not_24
);
1332 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, width
) == 28,
1333 OffsetOf_CopyTexSubImage2D_width_not_28
);
1334 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, height
) == 32,
1335 OffsetOf_CopyTexSubImage2D_height_not_32
);
1337 struct CreateProgram
{
1338 typedef CreateProgram ValueType
;
1339 static const CommandId kCmdId
= kCreateProgram
;
1340 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1341 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1343 static uint32_t ComputeSize() {
1344 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1347 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1349 void Init(uint32_t _client_id
) {
1351 client_id
= _client_id
;
1354 void* Set(void* cmd
, uint32_t _client_id
) {
1355 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
1356 return NextCmdAddress
<ValueType
>(cmd
);
1359 gpu::CommandHeader header
;
1363 COMPILE_ASSERT(sizeof(CreateProgram
) == 8, Sizeof_CreateProgram_is_not_8
);
1364 COMPILE_ASSERT(offsetof(CreateProgram
, header
) == 0,
1365 OffsetOf_CreateProgram_header_not_0
);
1366 COMPILE_ASSERT(offsetof(CreateProgram
, client_id
) == 4,
1367 OffsetOf_CreateProgram_client_id_not_4
);
1369 struct CreateShader
{
1370 typedef CreateShader ValueType
;
1371 static const CommandId kCmdId
= kCreateShader
;
1372 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1373 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1375 static uint32_t ComputeSize() {
1376 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1379 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1381 void Init(GLenum _type
, uint32_t _client_id
) {
1384 client_id
= _client_id
;
1387 void* Set(void* cmd
, GLenum _type
, uint32_t _client_id
) {
1388 static_cast<ValueType
*>(cmd
)->Init(_type
, _client_id
);
1389 return NextCmdAddress
<ValueType
>(cmd
);
1392 gpu::CommandHeader header
;
1397 COMPILE_ASSERT(sizeof(CreateShader
) == 12, Sizeof_CreateShader_is_not_12
);
1398 COMPILE_ASSERT(offsetof(CreateShader
, header
) == 0,
1399 OffsetOf_CreateShader_header_not_0
);
1400 COMPILE_ASSERT(offsetof(CreateShader
, type
) == 4,
1401 OffsetOf_CreateShader_type_not_4
);
1402 COMPILE_ASSERT(offsetof(CreateShader
, client_id
) == 8,
1403 OffsetOf_CreateShader_client_id_not_8
);
1406 typedef CullFace ValueType
;
1407 static const CommandId kCmdId
= kCullFace
;
1408 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1409 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1411 static uint32_t ComputeSize() {
1412 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1415 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1417 void Init(GLenum _mode
) {
1422 void* Set(void* cmd
, GLenum _mode
) {
1423 static_cast<ValueType
*>(cmd
)->Init(_mode
);
1424 return NextCmdAddress
<ValueType
>(cmd
);
1427 gpu::CommandHeader header
;
1431 COMPILE_ASSERT(sizeof(CullFace
) == 8, Sizeof_CullFace_is_not_8
);
1432 COMPILE_ASSERT(offsetof(CullFace
, header
) == 0, OffsetOf_CullFace_header_not_0
);
1433 COMPILE_ASSERT(offsetof(CullFace
, mode
) == 4, OffsetOf_CullFace_mode_not_4
);
1435 struct DeleteBuffersImmediate
{
1436 typedef DeleteBuffersImmediate ValueType
;
1437 static const CommandId kCmdId
= kDeleteBuffersImmediate
;
1438 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1439 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1441 static uint32_t ComputeDataSize(GLsizei n
) {
1442 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1445 static uint32_t ComputeSize(GLsizei n
) {
1446 return static_cast<uint32_t>(sizeof(ValueType
) +
1447 ComputeDataSize(n
)); // NOLINT
1450 void SetHeader(GLsizei n
) {
1451 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1454 void Init(GLsizei _n
, const GLuint
* _buffers
) {
1457 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
1460 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _buffers
) {
1461 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
1462 const uint32_t size
= ComputeSize(_n
);
1463 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1466 gpu::CommandHeader header
;
1470 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate
) == 8,
1471 Sizeof_DeleteBuffersImmediate_is_not_8
);
1472 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate
, header
) == 0,
1473 OffsetOf_DeleteBuffersImmediate_header_not_0
);
1474 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate
, n
) == 4,
1475 OffsetOf_DeleteBuffersImmediate_n_not_4
);
1477 struct DeleteFramebuffersImmediate
{
1478 typedef DeleteFramebuffersImmediate ValueType
;
1479 static const CommandId kCmdId
= kDeleteFramebuffersImmediate
;
1480 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1481 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1483 static uint32_t ComputeDataSize(GLsizei n
) {
1484 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1487 static uint32_t ComputeSize(GLsizei n
) {
1488 return static_cast<uint32_t>(sizeof(ValueType
) +
1489 ComputeDataSize(n
)); // NOLINT
1492 void SetHeader(GLsizei n
) {
1493 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1496 void Init(GLsizei _n
, const GLuint
* _framebuffers
) {
1499 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
1502 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _framebuffers
) {
1503 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
1504 const uint32_t size
= ComputeSize(_n
);
1505 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1508 gpu::CommandHeader header
;
1512 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate
) == 8,
1513 Sizeof_DeleteFramebuffersImmediate_is_not_8
);
1514 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate
, header
) == 0,
1515 OffsetOf_DeleteFramebuffersImmediate_header_not_0
);
1516 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate
, n
) == 4,
1517 OffsetOf_DeleteFramebuffersImmediate_n_not_4
);
1519 struct DeleteProgram
{
1520 typedef DeleteProgram ValueType
;
1521 static const CommandId kCmdId
= kDeleteProgram
;
1522 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1523 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1525 static uint32_t ComputeSize() {
1526 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1529 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1531 void Init(GLuint _program
) {
1536 void* Set(void* cmd
, GLuint _program
) {
1537 static_cast<ValueType
*>(cmd
)->Init(_program
);
1538 return NextCmdAddress
<ValueType
>(cmd
);
1541 gpu::CommandHeader header
;
1545 COMPILE_ASSERT(sizeof(DeleteProgram
) == 8, Sizeof_DeleteProgram_is_not_8
);
1546 COMPILE_ASSERT(offsetof(DeleteProgram
, header
) == 0,
1547 OffsetOf_DeleteProgram_header_not_0
);
1548 COMPILE_ASSERT(offsetof(DeleteProgram
, program
) == 4,
1549 OffsetOf_DeleteProgram_program_not_4
);
1551 struct DeleteRenderbuffersImmediate
{
1552 typedef DeleteRenderbuffersImmediate ValueType
;
1553 static const CommandId kCmdId
= kDeleteRenderbuffersImmediate
;
1554 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1555 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1557 static uint32_t ComputeDataSize(GLsizei n
) {
1558 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1561 static uint32_t ComputeSize(GLsizei n
) {
1562 return static_cast<uint32_t>(sizeof(ValueType
) +
1563 ComputeDataSize(n
)); // NOLINT
1566 void SetHeader(GLsizei n
) {
1567 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1570 void Init(GLsizei _n
, const GLuint
* _renderbuffers
) {
1573 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
1576 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _renderbuffers
) {
1577 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
1578 const uint32_t size
= ComputeSize(_n
);
1579 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1582 gpu::CommandHeader header
;
1586 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate
) == 8,
1587 Sizeof_DeleteRenderbuffersImmediate_is_not_8
);
1588 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate
, header
) == 0,
1589 OffsetOf_DeleteRenderbuffersImmediate_header_not_0
);
1590 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate
, n
) == 4,
1591 OffsetOf_DeleteRenderbuffersImmediate_n_not_4
);
1593 struct DeleteShader
{
1594 typedef DeleteShader ValueType
;
1595 static const CommandId kCmdId
= kDeleteShader
;
1596 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1597 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1599 static uint32_t ComputeSize() {
1600 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1603 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1605 void Init(GLuint _shader
) {
1610 void* Set(void* cmd
, GLuint _shader
) {
1611 static_cast<ValueType
*>(cmd
)->Init(_shader
);
1612 return NextCmdAddress
<ValueType
>(cmd
);
1615 gpu::CommandHeader header
;
1619 COMPILE_ASSERT(sizeof(DeleteShader
) == 8, Sizeof_DeleteShader_is_not_8
);
1620 COMPILE_ASSERT(offsetof(DeleteShader
, header
) == 0,
1621 OffsetOf_DeleteShader_header_not_0
);
1622 COMPILE_ASSERT(offsetof(DeleteShader
, shader
) == 4,
1623 OffsetOf_DeleteShader_shader_not_4
);
1625 struct DeleteTexturesImmediate
{
1626 typedef DeleteTexturesImmediate ValueType
;
1627 static const CommandId kCmdId
= kDeleteTexturesImmediate
;
1628 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1629 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1631 static uint32_t ComputeDataSize(GLsizei n
) {
1632 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1635 static uint32_t ComputeSize(GLsizei n
) {
1636 return static_cast<uint32_t>(sizeof(ValueType
) +
1637 ComputeDataSize(n
)); // NOLINT
1640 void SetHeader(GLsizei n
) {
1641 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1644 void Init(GLsizei _n
, const GLuint
* _textures
) {
1647 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
1650 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _textures
) {
1651 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
1652 const uint32_t size
= ComputeSize(_n
);
1653 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1656 gpu::CommandHeader header
;
1660 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate
) == 8,
1661 Sizeof_DeleteTexturesImmediate_is_not_8
);
1662 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate
, header
) == 0,
1663 OffsetOf_DeleteTexturesImmediate_header_not_0
);
1664 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate
, n
) == 4,
1665 OffsetOf_DeleteTexturesImmediate_n_not_4
);
1668 typedef DepthFunc ValueType
;
1669 static const CommandId kCmdId
= kDepthFunc
;
1670 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1671 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1673 static uint32_t ComputeSize() {
1674 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1677 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1679 void Init(GLenum _func
) {
1684 void* Set(void* cmd
, GLenum _func
) {
1685 static_cast<ValueType
*>(cmd
)->Init(_func
);
1686 return NextCmdAddress
<ValueType
>(cmd
);
1689 gpu::CommandHeader header
;
1693 COMPILE_ASSERT(sizeof(DepthFunc
) == 8, Sizeof_DepthFunc_is_not_8
);
1694 COMPILE_ASSERT(offsetof(DepthFunc
, header
) == 0,
1695 OffsetOf_DepthFunc_header_not_0
);
1696 COMPILE_ASSERT(offsetof(DepthFunc
, func
) == 4, OffsetOf_DepthFunc_func_not_4
);
1699 typedef DepthMask ValueType
;
1700 static const CommandId kCmdId
= kDepthMask
;
1701 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1702 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1704 static uint32_t ComputeSize() {
1705 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1708 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1710 void Init(GLboolean _flag
) {
1715 void* Set(void* cmd
, GLboolean _flag
) {
1716 static_cast<ValueType
*>(cmd
)->Init(_flag
);
1717 return NextCmdAddress
<ValueType
>(cmd
);
1720 gpu::CommandHeader header
;
1724 COMPILE_ASSERT(sizeof(DepthMask
) == 8, Sizeof_DepthMask_is_not_8
);
1725 COMPILE_ASSERT(offsetof(DepthMask
, header
) == 0,
1726 OffsetOf_DepthMask_header_not_0
);
1727 COMPILE_ASSERT(offsetof(DepthMask
, flag
) == 4, OffsetOf_DepthMask_flag_not_4
);
1729 struct DepthRangef
{
1730 typedef DepthRangef ValueType
;
1731 static const CommandId kCmdId
= kDepthRangef
;
1732 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1733 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1735 static uint32_t ComputeSize() {
1736 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1739 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1741 void Init(GLclampf _zNear
, GLclampf _zFar
) {
1747 void* Set(void* cmd
, GLclampf _zNear
, GLclampf _zFar
) {
1748 static_cast<ValueType
*>(cmd
)->Init(_zNear
, _zFar
);
1749 return NextCmdAddress
<ValueType
>(cmd
);
1752 gpu::CommandHeader header
;
1757 COMPILE_ASSERT(sizeof(DepthRangef
) == 12, Sizeof_DepthRangef_is_not_12
);
1758 COMPILE_ASSERT(offsetof(DepthRangef
, header
) == 0,
1759 OffsetOf_DepthRangef_header_not_0
);
1760 COMPILE_ASSERT(offsetof(DepthRangef
, zNear
) == 4,
1761 OffsetOf_DepthRangef_zNear_not_4
);
1762 COMPILE_ASSERT(offsetof(DepthRangef
, zFar
) == 8,
1763 OffsetOf_DepthRangef_zFar_not_8
);
1765 struct DetachShader
{
1766 typedef DetachShader ValueType
;
1767 static const CommandId kCmdId
= kDetachShader
;
1768 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1769 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1771 static uint32_t ComputeSize() {
1772 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1775 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1777 void Init(GLuint _program
, GLuint _shader
) {
1783 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
1784 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
1785 return NextCmdAddress
<ValueType
>(cmd
);
1788 gpu::CommandHeader header
;
1793 COMPILE_ASSERT(sizeof(DetachShader
) == 12, Sizeof_DetachShader_is_not_12
);
1794 COMPILE_ASSERT(offsetof(DetachShader
, header
) == 0,
1795 OffsetOf_DetachShader_header_not_0
);
1796 COMPILE_ASSERT(offsetof(DetachShader
, program
) == 4,
1797 OffsetOf_DetachShader_program_not_4
);
1798 COMPILE_ASSERT(offsetof(DetachShader
, shader
) == 8,
1799 OffsetOf_DetachShader_shader_not_8
);
1802 typedef Disable ValueType
;
1803 static const CommandId kCmdId
= kDisable
;
1804 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1805 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1807 static uint32_t ComputeSize() {
1808 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1811 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1813 void Init(GLenum _cap
) {
1818 void* Set(void* cmd
, GLenum _cap
) {
1819 static_cast<ValueType
*>(cmd
)->Init(_cap
);
1820 return NextCmdAddress
<ValueType
>(cmd
);
1823 gpu::CommandHeader header
;
1827 COMPILE_ASSERT(sizeof(Disable
) == 8, Sizeof_Disable_is_not_8
);
1828 COMPILE_ASSERT(offsetof(Disable
, header
) == 0, OffsetOf_Disable_header_not_0
);
1829 COMPILE_ASSERT(offsetof(Disable
, cap
) == 4, OffsetOf_Disable_cap_not_4
);
1831 struct DisableVertexAttribArray
{
1832 typedef DisableVertexAttribArray ValueType
;
1833 static const CommandId kCmdId
= kDisableVertexAttribArray
;
1834 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1835 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1837 static uint32_t ComputeSize() {
1838 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1841 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1843 void Init(GLuint _index
) {
1848 void* Set(void* cmd
, GLuint _index
) {
1849 static_cast<ValueType
*>(cmd
)->Init(_index
);
1850 return NextCmdAddress
<ValueType
>(cmd
);
1853 gpu::CommandHeader header
;
1857 COMPILE_ASSERT(sizeof(DisableVertexAttribArray
) == 8,
1858 Sizeof_DisableVertexAttribArray_is_not_8
);
1859 COMPILE_ASSERT(offsetof(DisableVertexAttribArray
, header
) == 0,
1860 OffsetOf_DisableVertexAttribArray_header_not_0
);
1861 COMPILE_ASSERT(offsetof(DisableVertexAttribArray
, index
) == 4,
1862 OffsetOf_DisableVertexAttribArray_index_not_4
);
1865 typedef DrawArrays ValueType
;
1866 static const CommandId kCmdId
= kDrawArrays
;
1867 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1868 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
1870 static uint32_t ComputeSize() {
1871 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1874 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1876 void Init(GLenum _mode
, GLint _first
, GLsizei _count
) {
1883 void* Set(void* cmd
, GLenum _mode
, GLint _first
, GLsizei _count
) {
1884 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
);
1885 return NextCmdAddress
<ValueType
>(cmd
);
1888 gpu::CommandHeader header
;
1894 COMPILE_ASSERT(sizeof(DrawArrays
) == 16, Sizeof_DrawArrays_is_not_16
);
1895 COMPILE_ASSERT(offsetof(DrawArrays
, header
) == 0,
1896 OffsetOf_DrawArrays_header_not_0
);
1897 COMPILE_ASSERT(offsetof(DrawArrays
, mode
) == 4, OffsetOf_DrawArrays_mode_not_4
);
1898 COMPILE_ASSERT(offsetof(DrawArrays
, first
) == 8,
1899 OffsetOf_DrawArrays_first_not_8
);
1900 COMPILE_ASSERT(offsetof(DrawArrays
, count
) == 12,
1901 OffsetOf_DrawArrays_count_not_12
);
1903 struct DrawElements
{
1904 typedef DrawElements ValueType
;
1905 static const CommandId kCmdId
= kDrawElements
;
1906 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1907 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
1909 static uint32_t ComputeSize() {
1910 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1913 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1915 void Init(GLenum _mode
, GLsizei _count
, GLenum _type
, GLuint _index_offset
) {
1920 index_offset
= _index_offset
;
1923 void* Set(void* cmd
,
1927 GLuint _index_offset
) {
1928 static_cast<ValueType
*>(cmd
)->Init(_mode
, _count
, _type
, _index_offset
);
1929 return NextCmdAddress
<ValueType
>(cmd
);
1932 gpu::CommandHeader header
;
1936 uint32_t index_offset
;
1939 COMPILE_ASSERT(sizeof(DrawElements
) == 20, Sizeof_DrawElements_is_not_20
);
1940 COMPILE_ASSERT(offsetof(DrawElements
, header
) == 0,
1941 OffsetOf_DrawElements_header_not_0
);
1942 COMPILE_ASSERT(offsetof(DrawElements
, mode
) == 4,
1943 OffsetOf_DrawElements_mode_not_4
);
1944 COMPILE_ASSERT(offsetof(DrawElements
, count
) == 8,
1945 OffsetOf_DrawElements_count_not_8
);
1946 COMPILE_ASSERT(offsetof(DrawElements
, type
) == 12,
1947 OffsetOf_DrawElements_type_not_12
);
1948 COMPILE_ASSERT(offsetof(DrawElements
, index_offset
) == 16,
1949 OffsetOf_DrawElements_index_offset_not_16
);
1952 typedef Enable ValueType
;
1953 static const CommandId kCmdId
= kEnable
;
1954 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1955 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1957 static uint32_t ComputeSize() {
1958 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1961 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1963 void Init(GLenum _cap
) {
1968 void* Set(void* cmd
, GLenum _cap
) {
1969 static_cast<ValueType
*>(cmd
)->Init(_cap
);
1970 return NextCmdAddress
<ValueType
>(cmd
);
1973 gpu::CommandHeader header
;
1977 COMPILE_ASSERT(sizeof(Enable
) == 8, Sizeof_Enable_is_not_8
);
1978 COMPILE_ASSERT(offsetof(Enable
, header
) == 0, OffsetOf_Enable_header_not_0
);
1979 COMPILE_ASSERT(offsetof(Enable
, cap
) == 4, OffsetOf_Enable_cap_not_4
);
1981 struct EnableVertexAttribArray
{
1982 typedef EnableVertexAttribArray ValueType
;
1983 static const CommandId kCmdId
= kEnableVertexAttribArray
;
1984 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1985 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1987 static uint32_t ComputeSize() {
1988 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1991 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1993 void Init(GLuint _index
) {
1998 void* Set(void* cmd
, GLuint _index
) {
1999 static_cast<ValueType
*>(cmd
)->Init(_index
);
2000 return NextCmdAddress
<ValueType
>(cmd
);
2003 gpu::CommandHeader header
;
2007 COMPILE_ASSERT(sizeof(EnableVertexAttribArray
) == 8,
2008 Sizeof_EnableVertexAttribArray_is_not_8
);
2009 COMPILE_ASSERT(offsetof(EnableVertexAttribArray
, header
) == 0,
2010 OffsetOf_EnableVertexAttribArray_header_not_0
);
2011 COMPILE_ASSERT(offsetof(EnableVertexAttribArray
, index
) == 4,
2012 OffsetOf_EnableVertexAttribArray_index_not_4
);
2015 typedef Finish ValueType
;
2016 static const CommandId kCmdId
= kFinish
;
2017 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2018 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2020 static uint32_t ComputeSize() {
2021 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2024 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2026 void Init() { SetHeader(); }
2028 void* Set(void* cmd
) {
2029 static_cast<ValueType
*>(cmd
)->Init();
2030 return NextCmdAddress
<ValueType
>(cmd
);
2033 gpu::CommandHeader header
;
2036 COMPILE_ASSERT(sizeof(Finish
) == 4, Sizeof_Finish_is_not_4
);
2037 COMPILE_ASSERT(offsetof(Finish
, header
) == 0, OffsetOf_Finish_header_not_0
);
2040 typedef Flush ValueType
;
2041 static const CommandId kCmdId
= kFlush
;
2042 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2043 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2045 static uint32_t ComputeSize() {
2046 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2049 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2051 void Init() { SetHeader(); }
2053 void* Set(void* cmd
) {
2054 static_cast<ValueType
*>(cmd
)->Init();
2055 return NextCmdAddress
<ValueType
>(cmd
);
2058 gpu::CommandHeader header
;
2061 COMPILE_ASSERT(sizeof(Flush
) == 4, Sizeof_Flush_is_not_4
);
2062 COMPILE_ASSERT(offsetof(Flush
, header
) == 0, OffsetOf_Flush_header_not_0
);
2064 struct FramebufferRenderbuffer
{
2065 typedef FramebufferRenderbuffer ValueType
;
2066 static const CommandId kCmdId
= kFramebufferRenderbuffer
;
2067 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2068 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2070 static uint32_t ComputeSize() {
2071 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2074 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2076 void Init(GLenum _target
,
2078 GLenum _renderbuffertarget
,
2079 GLuint _renderbuffer
) {
2082 attachment
= _attachment
;
2083 renderbuffertarget
= _renderbuffertarget
;
2084 renderbuffer
= _renderbuffer
;
2087 void* Set(void* cmd
,
2090 GLenum _renderbuffertarget
,
2091 GLuint _renderbuffer
) {
2092 static_cast<ValueType
*>(cmd
)
2093 ->Init(_target
, _attachment
, _renderbuffertarget
, _renderbuffer
);
2094 return NextCmdAddress
<ValueType
>(cmd
);
2097 gpu::CommandHeader header
;
2099 uint32_t attachment
;
2100 uint32_t renderbuffertarget
;
2101 uint32_t renderbuffer
;
2104 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer
) == 20,
2105 Sizeof_FramebufferRenderbuffer_is_not_20
);
2106 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, header
) == 0,
2107 OffsetOf_FramebufferRenderbuffer_header_not_0
);
2108 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, target
) == 4,
2109 OffsetOf_FramebufferRenderbuffer_target_not_4
);
2110 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, attachment
) == 8,
2111 OffsetOf_FramebufferRenderbuffer_attachment_not_8
);
2112 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, renderbuffertarget
) == 12,
2113 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12
);
2114 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, renderbuffer
) == 16,
2115 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16
);
2117 struct FramebufferTexture2D
{
2118 typedef FramebufferTexture2D ValueType
;
2119 static const CommandId kCmdId
= kFramebufferTexture2D
;
2120 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2121 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
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
,
2135 attachment
= _attachment
;
2136 textarget
= _textarget
;
2140 void* Set(void* cmd
,
2145 static_cast<ValueType
*>(cmd
)
2146 ->Init(_target
, _attachment
, _textarget
, _texture
);
2147 return NextCmdAddress
<ValueType
>(cmd
);
2150 gpu::CommandHeader header
;
2152 uint32_t attachment
;
2155 static const int32_t level
= 0;
2158 COMPILE_ASSERT(sizeof(FramebufferTexture2D
) == 20,
2159 Sizeof_FramebufferTexture2D_is_not_20
);
2160 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, header
) == 0,
2161 OffsetOf_FramebufferTexture2D_header_not_0
);
2162 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, target
) == 4,
2163 OffsetOf_FramebufferTexture2D_target_not_4
);
2164 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, attachment
) == 8,
2165 OffsetOf_FramebufferTexture2D_attachment_not_8
);
2166 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, textarget
) == 12,
2167 OffsetOf_FramebufferTexture2D_textarget_not_12
);
2168 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, texture
) == 16,
2169 OffsetOf_FramebufferTexture2D_texture_not_16
);
2172 typedef FrontFace ValueType
;
2173 static const CommandId kCmdId
= kFrontFace
;
2174 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2175 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2177 static uint32_t ComputeSize() {
2178 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2181 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2183 void Init(GLenum _mode
) {
2188 void* Set(void* cmd
, GLenum _mode
) {
2189 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2190 return NextCmdAddress
<ValueType
>(cmd
);
2193 gpu::CommandHeader header
;
2197 COMPILE_ASSERT(sizeof(FrontFace
) == 8, Sizeof_FrontFace_is_not_8
);
2198 COMPILE_ASSERT(offsetof(FrontFace
, header
) == 0,
2199 OffsetOf_FrontFace_header_not_0
);
2200 COMPILE_ASSERT(offsetof(FrontFace
, mode
) == 4, OffsetOf_FrontFace_mode_not_4
);
2202 struct GenBuffersImmediate
{
2203 typedef GenBuffersImmediate ValueType
;
2204 static const CommandId kCmdId
= kGenBuffersImmediate
;
2205 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2206 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2208 static uint32_t ComputeDataSize(GLsizei n
) {
2209 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2212 static uint32_t ComputeSize(GLsizei n
) {
2213 return static_cast<uint32_t>(sizeof(ValueType
) +
2214 ComputeDataSize(n
)); // NOLINT
2217 void SetHeader(GLsizei n
) {
2218 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2221 void Init(GLsizei _n
, GLuint
* _buffers
) {
2224 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
2227 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
2228 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
2229 const uint32_t size
= ComputeSize(_n
);
2230 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2233 gpu::CommandHeader header
;
2237 COMPILE_ASSERT(sizeof(GenBuffersImmediate
) == 8,
2238 Sizeof_GenBuffersImmediate_is_not_8
);
2239 COMPILE_ASSERT(offsetof(GenBuffersImmediate
, header
) == 0,
2240 OffsetOf_GenBuffersImmediate_header_not_0
);
2241 COMPILE_ASSERT(offsetof(GenBuffersImmediate
, n
) == 4,
2242 OffsetOf_GenBuffersImmediate_n_not_4
);
2244 struct GenerateMipmap
{
2245 typedef GenerateMipmap ValueType
;
2246 static const CommandId kCmdId
= kGenerateMipmap
;
2247 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2248 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2250 static uint32_t ComputeSize() {
2251 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2254 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2256 void Init(GLenum _target
) {
2261 void* Set(void* cmd
, GLenum _target
) {
2262 static_cast<ValueType
*>(cmd
)->Init(_target
);
2263 return NextCmdAddress
<ValueType
>(cmd
);
2266 gpu::CommandHeader header
;
2270 COMPILE_ASSERT(sizeof(GenerateMipmap
) == 8, Sizeof_GenerateMipmap_is_not_8
);
2271 COMPILE_ASSERT(offsetof(GenerateMipmap
, header
) == 0,
2272 OffsetOf_GenerateMipmap_header_not_0
);
2273 COMPILE_ASSERT(offsetof(GenerateMipmap
, target
) == 4,
2274 OffsetOf_GenerateMipmap_target_not_4
);
2276 struct GenFramebuffersImmediate
{
2277 typedef GenFramebuffersImmediate ValueType
;
2278 static const CommandId kCmdId
= kGenFramebuffersImmediate
;
2279 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2280 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2282 static uint32_t ComputeDataSize(GLsizei n
) {
2283 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2286 static uint32_t ComputeSize(GLsizei n
) {
2287 return static_cast<uint32_t>(sizeof(ValueType
) +
2288 ComputeDataSize(n
)); // NOLINT
2291 void SetHeader(GLsizei n
) {
2292 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2295 void Init(GLsizei _n
, GLuint
* _framebuffers
) {
2298 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
2301 void* Set(void* cmd
, GLsizei _n
, GLuint
* _framebuffers
) {
2302 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
2303 const uint32_t size
= ComputeSize(_n
);
2304 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2307 gpu::CommandHeader header
;
2311 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate
) == 8,
2312 Sizeof_GenFramebuffersImmediate_is_not_8
);
2313 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate
, header
) == 0,
2314 OffsetOf_GenFramebuffersImmediate_header_not_0
);
2315 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate
, n
) == 4,
2316 OffsetOf_GenFramebuffersImmediate_n_not_4
);
2318 struct GenRenderbuffersImmediate
{
2319 typedef GenRenderbuffersImmediate ValueType
;
2320 static const CommandId kCmdId
= kGenRenderbuffersImmediate
;
2321 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2322 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2324 static uint32_t ComputeDataSize(GLsizei n
) {
2325 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2328 static uint32_t ComputeSize(GLsizei n
) {
2329 return static_cast<uint32_t>(sizeof(ValueType
) +
2330 ComputeDataSize(n
)); // NOLINT
2333 void SetHeader(GLsizei n
) {
2334 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2337 void Init(GLsizei _n
, GLuint
* _renderbuffers
) {
2340 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
2343 void* Set(void* cmd
, GLsizei _n
, GLuint
* _renderbuffers
) {
2344 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
2345 const uint32_t size
= ComputeSize(_n
);
2346 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2349 gpu::CommandHeader header
;
2353 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate
) == 8,
2354 Sizeof_GenRenderbuffersImmediate_is_not_8
);
2355 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate
, header
) == 0,
2356 OffsetOf_GenRenderbuffersImmediate_header_not_0
);
2357 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate
, n
) == 4,
2358 OffsetOf_GenRenderbuffersImmediate_n_not_4
);
2360 struct GenTexturesImmediate
{
2361 typedef GenTexturesImmediate ValueType
;
2362 static const CommandId kCmdId
= kGenTexturesImmediate
;
2363 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2364 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2366 static uint32_t ComputeDataSize(GLsizei n
) {
2367 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2370 static uint32_t ComputeSize(GLsizei n
) {
2371 return static_cast<uint32_t>(sizeof(ValueType
) +
2372 ComputeDataSize(n
)); // NOLINT
2375 void SetHeader(GLsizei n
) {
2376 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2379 void Init(GLsizei _n
, GLuint
* _textures
) {
2382 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
2385 void* Set(void* cmd
, GLsizei _n
, GLuint
* _textures
) {
2386 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
2387 const uint32_t size
= ComputeSize(_n
);
2388 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2391 gpu::CommandHeader header
;
2395 COMPILE_ASSERT(sizeof(GenTexturesImmediate
) == 8,
2396 Sizeof_GenTexturesImmediate_is_not_8
);
2397 COMPILE_ASSERT(offsetof(GenTexturesImmediate
, header
) == 0,
2398 OffsetOf_GenTexturesImmediate_header_not_0
);
2399 COMPILE_ASSERT(offsetof(GenTexturesImmediate
, n
) == 4,
2400 OffsetOf_GenTexturesImmediate_n_not_4
);
2402 struct GetActiveAttrib
{
2403 typedef GetActiveAttrib ValueType
;
2404 static const CommandId kCmdId
= kGetActiveAttrib
;
2405 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2406 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2414 static uint32_t ComputeSize() {
2415 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2418 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2420 void Init(GLuint _program
,
2422 uint32_t _name_bucket_id
,
2423 uint32_t _result_shm_id
,
2424 uint32_t _result_shm_offset
) {
2428 name_bucket_id
= _name_bucket_id
;
2429 result_shm_id
= _result_shm_id
;
2430 result_shm_offset
= _result_shm_offset
;
2433 void* Set(void* cmd
,
2436 uint32_t _name_bucket_id
,
2437 uint32_t _result_shm_id
,
2438 uint32_t _result_shm_offset
) {
2439 static_cast<ValueType
*>(cmd
)->Init(
2440 _program
, _index
, _name_bucket_id
, _result_shm_id
, _result_shm_offset
);
2441 return NextCmdAddress
<ValueType
>(cmd
);
2444 gpu::CommandHeader header
;
2447 uint32_t name_bucket_id
;
2448 uint32_t result_shm_id
;
2449 uint32_t result_shm_offset
;
2452 COMPILE_ASSERT(sizeof(GetActiveAttrib
) == 24, Sizeof_GetActiveAttrib_is_not_24
);
2453 COMPILE_ASSERT(offsetof(GetActiveAttrib
, header
) == 0,
2454 OffsetOf_GetActiveAttrib_header_not_0
);
2455 COMPILE_ASSERT(offsetof(GetActiveAttrib
, program
) == 4,
2456 OffsetOf_GetActiveAttrib_program_not_4
);
2457 COMPILE_ASSERT(offsetof(GetActiveAttrib
, index
) == 8,
2458 OffsetOf_GetActiveAttrib_index_not_8
);
2459 COMPILE_ASSERT(offsetof(GetActiveAttrib
, name_bucket_id
) == 12,
2460 OffsetOf_GetActiveAttrib_name_bucket_id_not_12
);
2461 COMPILE_ASSERT(offsetof(GetActiveAttrib
, result_shm_id
) == 16,
2462 OffsetOf_GetActiveAttrib_result_shm_id_not_16
);
2463 COMPILE_ASSERT(offsetof(GetActiveAttrib
, result_shm_offset
) == 20,
2464 OffsetOf_GetActiveAttrib_result_shm_offset_not_20
);
2465 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, success
) == 0,
2466 OffsetOf_GetActiveAttrib_Result_success_not_0
);
2467 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, size
) == 4,
2468 OffsetOf_GetActiveAttrib_Result_size_not_4
);
2469 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, type
) == 8,
2470 OffsetOf_GetActiveAttrib_Result_type_not_8
);
2472 struct GetActiveUniform
{
2473 typedef GetActiveUniform ValueType
;
2474 static const CommandId kCmdId
= kGetActiveUniform
;
2475 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2476 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2484 static uint32_t ComputeSize() {
2485 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2488 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2490 void Init(GLuint _program
,
2492 uint32_t _name_bucket_id
,
2493 uint32_t _result_shm_id
,
2494 uint32_t _result_shm_offset
) {
2498 name_bucket_id
= _name_bucket_id
;
2499 result_shm_id
= _result_shm_id
;
2500 result_shm_offset
= _result_shm_offset
;
2503 void* Set(void* cmd
,
2506 uint32_t _name_bucket_id
,
2507 uint32_t _result_shm_id
,
2508 uint32_t _result_shm_offset
) {
2509 static_cast<ValueType
*>(cmd
)->Init(
2510 _program
, _index
, _name_bucket_id
, _result_shm_id
, _result_shm_offset
);
2511 return NextCmdAddress
<ValueType
>(cmd
);
2514 gpu::CommandHeader header
;
2517 uint32_t name_bucket_id
;
2518 uint32_t result_shm_id
;
2519 uint32_t result_shm_offset
;
2522 COMPILE_ASSERT(sizeof(GetActiveUniform
) == 24,
2523 Sizeof_GetActiveUniform_is_not_24
);
2524 COMPILE_ASSERT(offsetof(GetActiveUniform
, header
) == 0,
2525 OffsetOf_GetActiveUniform_header_not_0
);
2526 COMPILE_ASSERT(offsetof(GetActiveUniform
, program
) == 4,
2527 OffsetOf_GetActiveUniform_program_not_4
);
2528 COMPILE_ASSERT(offsetof(GetActiveUniform
, index
) == 8,
2529 OffsetOf_GetActiveUniform_index_not_8
);
2530 COMPILE_ASSERT(offsetof(GetActiveUniform
, name_bucket_id
) == 12,
2531 OffsetOf_GetActiveUniform_name_bucket_id_not_12
);
2532 COMPILE_ASSERT(offsetof(GetActiveUniform
, result_shm_id
) == 16,
2533 OffsetOf_GetActiveUniform_result_shm_id_not_16
);
2534 COMPILE_ASSERT(offsetof(GetActiveUniform
, result_shm_offset
) == 20,
2535 OffsetOf_GetActiveUniform_result_shm_offset_not_20
);
2536 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, success
) == 0,
2537 OffsetOf_GetActiveUniform_Result_success_not_0
);
2538 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, size
) == 4,
2539 OffsetOf_GetActiveUniform_Result_size_not_4
);
2540 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, type
) == 8,
2541 OffsetOf_GetActiveUniform_Result_type_not_8
);
2543 struct GetAttachedShaders
{
2544 typedef GetAttachedShaders ValueType
;
2545 static const CommandId kCmdId
= kGetAttachedShaders
;
2546 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2547 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2549 typedef SizedResult
<GLuint
> Result
;
2551 static uint32_t ComputeSize() {
2552 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2555 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2557 void Init(GLuint _program
,
2558 uint32_t _result_shm_id
,
2559 uint32_t _result_shm_offset
,
2560 uint32_t _result_size
) {
2563 result_shm_id
= _result_shm_id
;
2564 result_shm_offset
= _result_shm_offset
;
2565 result_size
= _result_size
;
2568 void* Set(void* cmd
,
2570 uint32_t _result_shm_id
,
2571 uint32_t _result_shm_offset
,
2572 uint32_t _result_size
) {
2573 static_cast<ValueType
*>(cmd
)
2574 ->Init(_program
, _result_shm_id
, _result_shm_offset
, _result_size
);
2575 return NextCmdAddress
<ValueType
>(cmd
);
2578 gpu::CommandHeader header
;
2580 uint32_t result_shm_id
;
2581 uint32_t result_shm_offset
;
2582 uint32_t result_size
;
2585 COMPILE_ASSERT(sizeof(GetAttachedShaders
) == 20,
2586 Sizeof_GetAttachedShaders_is_not_20
);
2587 COMPILE_ASSERT(offsetof(GetAttachedShaders
, header
) == 0,
2588 OffsetOf_GetAttachedShaders_header_not_0
);
2589 COMPILE_ASSERT(offsetof(GetAttachedShaders
, program
) == 4,
2590 OffsetOf_GetAttachedShaders_program_not_4
);
2591 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_shm_id
) == 8,
2592 OffsetOf_GetAttachedShaders_result_shm_id_not_8
);
2593 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_shm_offset
) == 12,
2594 OffsetOf_GetAttachedShaders_result_shm_offset_not_12
);
2595 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_size
) == 16,
2596 OffsetOf_GetAttachedShaders_result_size_not_16
);
2598 struct GetAttribLocation
{
2599 typedef GetAttribLocation ValueType
;
2600 static const CommandId kCmdId
= kGetAttribLocation
;
2601 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2602 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2604 typedef GLint Result
;
2606 static uint32_t ComputeSize() {
2607 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2610 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2612 void Init(GLuint _program
,
2613 uint32_t _name_bucket_id
,
2614 uint32_t _location_shm_id
,
2615 uint32_t _location_shm_offset
) {
2618 name_bucket_id
= _name_bucket_id
;
2619 location_shm_id
= _location_shm_id
;
2620 location_shm_offset
= _location_shm_offset
;
2623 void* Set(void* cmd
,
2625 uint32_t _name_bucket_id
,
2626 uint32_t _location_shm_id
,
2627 uint32_t _location_shm_offset
) {
2628 static_cast<ValueType
*>(cmd
)->Init(
2629 _program
, _name_bucket_id
, _location_shm_id
, _location_shm_offset
);
2630 return NextCmdAddress
<ValueType
>(cmd
);
2633 gpu::CommandHeader header
;
2635 uint32_t name_bucket_id
;
2636 uint32_t location_shm_id
;
2637 uint32_t location_shm_offset
;
2640 COMPILE_ASSERT(sizeof(GetAttribLocation
) == 20,
2641 Sizeof_GetAttribLocation_is_not_20
);
2642 COMPILE_ASSERT(offsetof(GetAttribLocation
, header
) == 0,
2643 OffsetOf_GetAttribLocation_header_not_0
);
2644 COMPILE_ASSERT(offsetof(GetAttribLocation
, program
) == 4,
2645 OffsetOf_GetAttribLocation_program_not_4
);
2646 COMPILE_ASSERT(offsetof(GetAttribLocation
, name_bucket_id
) == 8,
2647 OffsetOf_GetAttribLocation_name_bucket_id_not_8
);
2648 COMPILE_ASSERT(offsetof(GetAttribLocation
, location_shm_id
) == 12,
2649 OffsetOf_GetAttribLocation_location_shm_id_not_12
);
2650 COMPILE_ASSERT(offsetof(GetAttribLocation
, location_shm_offset
) == 16,
2651 OffsetOf_GetAttribLocation_location_shm_offset_not_16
);
2653 struct GetBooleanv
{
2654 typedef GetBooleanv ValueType
;
2655 static const CommandId kCmdId
= kGetBooleanv
;
2656 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2657 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2659 typedef SizedResult
<GLboolean
> Result
;
2661 static uint32_t ComputeSize() {
2662 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2665 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2667 void Init(GLenum _pname
,
2668 uint32_t _params_shm_id
,
2669 uint32_t _params_shm_offset
) {
2672 params_shm_id
= _params_shm_id
;
2673 params_shm_offset
= _params_shm_offset
;
2676 void* Set(void* cmd
,
2678 uint32_t _params_shm_id
,
2679 uint32_t _params_shm_offset
) {
2680 static_cast<ValueType
*>(cmd
)
2681 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2682 return NextCmdAddress
<ValueType
>(cmd
);
2685 gpu::CommandHeader header
;
2687 uint32_t params_shm_id
;
2688 uint32_t params_shm_offset
;
2691 COMPILE_ASSERT(sizeof(GetBooleanv
) == 16, Sizeof_GetBooleanv_is_not_16
);
2692 COMPILE_ASSERT(offsetof(GetBooleanv
, header
) == 0,
2693 OffsetOf_GetBooleanv_header_not_0
);
2694 COMPILE_ASSERT(offsetof(GetBooleanv
, pname
) == 4,
2695 OffsetOf_GetBooleanv_pname_not_4
);
2696 COMPILE_ASSERT(offsetof(GetBooleanv
, params_shm_id
) == 8,
2697 OffsetOf_GetBooleanv_params_shm_id_not_8
);
2698 COMPILE_ASSERT(offsetof(GetBooleanv
, params_shm_offset
) == 12,
2699 OffsetOf_GetBooleanv_params_shm_offset_not_12
);
2701 struct GetBufferParameteriv
{
2702 typedef GetBufferParameteriv ValueType
;
2703 static const CommandId kCmdId
= kGetBufferParameteriv
;
2704 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2705 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2707 typedef SizedResult
<GLint
> Result
;
2709 static uint32_t ComputeSize() {
2710 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2713 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2715 void Init(GLenum _target
,
2717 uint32_t _params_shm_id
,
2718 uint32_t _params_shm_offset
) {
2722 params_shm_id
= _params_shm_id
;
2723 params_shm_offset
= _params_shm_offset
;
2726 void* Set(void* cmd
,
2729 uint32_t _params_shm_id
,
2730 uint32_t _params_shm_offset
) {
2731 static_cast<ValueType
*>(cmd
)
2732 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
2733 return NextCmdAddress
<ValueType
>(cmd
);
2736 gpu::CommandHeader header
;
2739 uint32_t params_shm_id
;
2740 uint32_t params_shm_offset
;
2743 COMPILE_ASSERT(sizeof(GetBufferParameteriv
) == 20,
2744 Sizeof_GetBufferParameteriv_is_not_20
);
2745 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, header
) == 0,
2746 OffsetOf_GetBufferParameteriv_header_not_0
);
2747 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, target
) == 4,
2748 OffsetOf_GetBufferParameteriv_target_not_4
);
2749 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, pname
) == 8,
2750 OffsetOf_GetBufferParameteriv_pname_not_8
);
2751 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, params_shm_id
) == 12,
2752 OffsetOf_GetBufferParameteriv_params_shm_id_not_12
);
2753 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, params_shm_offset
) == 16,
2754 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16
);
2757 typedef GetError ValueType
;
2758 static const CommandId kCmdId
= kGetError
;
2759 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2760 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2762 typedef GLenum Result
;
2764 static uint32_t ComputeSize() {
2765 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2768 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2770 void Init(uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
2772 result_shm_id
= _result_shm_id
;
2773 result_shm_offset
= _result_shm_offset
;
2776 void* Set(void* cmd
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
2777 static_cast<ValueType
*>(cmd
)->Init(_result_shm_id
, _result_shm_offset
);
2778 return NextCmdAddress
<ValueType
>(cmd
);
2781 gpu::CommandHeader header
;
2782 uint32_t result_shm_id
;
2783 uint32_t result_shm_offset
;
2786 COMPILE_ASSERT(sizeof(GetError
) == 12, Sizeof_GetError_is_not_12
);
2787 COMPILE_ASSERT(offsetof(GetError
, header
) == 0, OffsetOf_GetError_header_not_0
);
2788 COMPILE_ASSERT(offsetof(GetError
, result_shm_id
) == 4,
2789 OffsetOf_GetError_result_shm_id_not_4
);
2790 COMPILE_ASSERT(offsetof(GetError
, result_shm_offset
) == 8,
2791 OffsetOf_GetError_result_shm_offset_not_8
);
2794 typedef GetFloatv ValueType
;
2795 static const CommandId kCmdId
= kGetFloatv
;
2796 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2797 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2799 typedef SizedResult
<GLfloat
> Result
;
2801 static uint32_t ComputeSize() {
2802 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2805 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2807 void Init(GLenum _pname
,
2808 uint32_t _params_shm_id
,
2809 uint32_t _params_shm_offset
) {
2812 params_shm_id
= _params_shm_id
;
2813 params_shm_offset
= _params_shm_offset
;
2816 void* Set(void* cmd
,
2818 uint32_t _params_shm_id
,
2819 uint32_t _params_shm_offset
) {
2820 static_cast<ValueType
*>(cmd
)
2821 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2822 return NextCmdAddress
<ValueType
>(cmd
);
2825 gpu::CommandHeader header
;
2827 uint32_t params_shm_id
;
2828 uint32_t params_shm_offset
;
2831 COMPILE_ASSERT(sizeof(GetFloatv
) == 16, Sizeof_GetFloatv_is_not_16
);
2832 COMPILE_ASSERT(offsetof(GetFloatv
, header
) == 0,
2833 OffsetOf_GetFloatv_header_not_0
);
2834 COMPILE_ASSERT(offsetof(GetFloatv
, pname
) == 4, OffsetOf_GetFloatv_pname_not_4
);
2835 COMPILE_ASSERT(offsetof(GetFloatv
, params_shm_id
) == 8,
2836 OffsetOf_GetFloatv_params_shm_id_not_8
);
2837 COMPILE_ASSERT(offsetof(GetFloatv
, params_shm_offset
) == 12,
2838 OffsetOf_GetFloatv_params_shm_offset_not_12
);
2840 struct GetFramebufferAttachmentParameteriv
{
2841 typedef GetFramebufferAttachmentParameteriv ValueType
;
2842 static const CommandId kCmdId
= kGetFramebufferAttachmentParameteriv
;
2843 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2844 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2846 typedef SizedResult
<GLint
> Result
;
2848 static uint32_t ComputeSize() {
2849 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2852 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2854 void Init(GLenum _target
,
2857 uint32_t _params_shm_id
,
2858 uint32_t _params_shm_offset
) {
2861 attachment
= _attachment
;
2863 params_shm_id
= _params_shm_id
;
2864 params_shm_offset
= _params_shm_offset
;
2867 void* Set(void* cmd
,
2871 uint32_t _params_shm_id
,
2872 uint32_t _params_shm_offset
) {
2873 static_cast<ValueType
*>(cmd
)->Init(
2874 _target
, _attachment
, _pname
, _params_shm_id
, _params_shm_offset
);
2875 return NextCmdAddress
<ValueType
>(cmd
);
2878 gpu::CommandHeader header
;
2880 uint32_t attachment
;
2882 uint32_t params_shm_id
;
2883 uint32_t params_shm_offset
;
2886 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv
) == 24,
2887 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24
);
2888 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, header
) == 0,
2889 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0
);
2890 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, target
) == 4,
2891 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4
);
2892 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, attachment
) == 8,
2893 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8
);
2894 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, pname
) == 12,
2895 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12
);
2897 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_id
) == 16,
2898 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16
);
2900 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_offset
) == 20,
2901 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20
);
2903 struct GetIntegerv
{
2904 typedef GetIntegerv ValueType
;
2905 static const CommandId kCmdId
= kGetIntegerv
;
2906 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2907 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2909 typedef SizedResult
<GLint
> Result
;
2911 static uint32_t ComputeSize() {
2912 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2915 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2917 void Init(GLenum _pname
,
2918 uint32_t _params_shm_id
,
2919 uint32_t _params_shm_offset
) {
2922 params_shm_id
= _params_shm_id
;
2923 params_shm_offset
= _params_shm_offset
;
2926 void* Set(void* cmd
,
2928 uint32_t _params_shm_id
,
2929 uint32_t _params_shm_offset
) {
2930 static_cast<ValueType
*>(cmd
)
2931 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2932 return NextCmdAddress
<ValueType
>(cmd
);
2935 gpu::CommandHeader header
;
2937 uint32_t params_shm_id
;
2938 uint32_t params_shm_offset
;
2941 COMPILE_ASSERT(sizeof(GetIntegerv
) == 16, Sizeof_GetIntegerv_is_not_16
);
2942 COMPILE_ASSERT(offsetof(GetIntegerv
, header
) == 0,
2943 OffsetOf_GetIntegerv_header_not_0
);
2944 COMPILE_ASSERT(offsetof(GetIntegerv
, pname
) == 4,
2945 OffsetOf_GetIntegerv_pname_not_4
);
2946 COMPILE_ASSERT(offsetof(GetIntegerv
, params_shm_id
) == 8,
2947 OffsetOf_GetIntegerv_params_shm_id_not_8
);
2948 COMPILE_ASSERT(offsetof(GetIntegerv
, params_shm_offset
) == 12,
2949 OffsetOf_GetIntegerv_params_shm_offset_not_12
);
2951 struct GetProgramiv
{
2952 typedef GetProgramiv ValueType
;
2953 static const CommandId kCmdId
= kGetProgramiv
;
2954 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2955 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2957 typedef SizedResult
<GLint
> Result
;
2959 static uint32_t ComputeSize() {
2960 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2963 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2965 void Init(GLuint _program
,
2967 uint32_t _params_shm_id
,
2968 uint32_t _params_shm_offset
) {
2972 params_shm_id
= _params_shm_id
;
2973 params_shm_offset
= _params_shm_offset
;
2976 void* Set(void* cmd
,
2979 uint32_t _params_shm_id
,
2980 uint32_t _params_shm_offset
) {
2981 static_cast<ValueType
*>(cmd
)
2982 ->Init(_program
, _pname
, _params_shm_id
, _params_shm_offset
);
2983 return NextCmdAddress
<ValueType
>(cmd
);
2986 gpu::CommandHeader header
;
2989 uint32_t params_shm_id
;
2990 uint32_t params_shm_offset
;
2993 COMPILE_ASSERT(sizeof(GetProgramiv
) == 20, Sizeof_GetProgramiv_is_not_20
);
2994 COMPILE_ASSERT(offsetof(GetProgramiv
, header
) == 0,
2995 OffsetOf_GetProgramiv_header_not_0
);
2996 COMPILE_ASSERT(offsetof(GetProgramiv
, program
) == 4,
2997 OffsetOf_GetProgramiv_program_not_4
);
2998 COMPILE_ASSERT(offsetof(GetProgramiv
, pname
) == 8,
2999 OffsetOf_GetProgramiv_pname_not_8
);
3000 COMPILE_ASSERT(offsetof(GetProgramiv
, params_shm_id
) == 12,
3001 OffsetOf_GetProgramiv_params_shm_id_not_12
);
3002 COMPILE_ASSERT(offsetof(GetProgramiv
, params_shm_offset
) == 16,
3003 OffsetOf_GetProgramiv_params_shm_offset_not_16
);
3005 struct GetProgramInfoLog
{
3006 typedef GetProgramInfoLog ValueType
;
3007 static const CommandId kCmdId
= kGetProgramInfoLog
;
3008 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3009 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3011 static uint32_t ComputeSize() {
3012 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3015 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3017 void Init(GLuint _program
, uint32_t _bucket_id
) {
3020 bucket_id
= _bucket_id
;
3023 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
3024 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
3025 return NextCmdAddress
<ValueType
>(cmd
);
3028 gpu::CommandHeader header
;
3033 COMPILE_ASSERT(sizeof(GetProgramInfoLog
) == 12,
3034 Sizeof_GetProgramInfoLog_is_not_12
);
3035 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, header
) == 0,
3036 OffsetOf_GetProgramInfoLog_header_not_0
);
3037 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, program
) == 4,
3038 OffsetOf_GetProgramInfoLog_program_not_4
);
3039 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, bucket_id
) == 8,
3040 OffsetOf_GetProgramInfoLog_bucket_id_not_8
);
3042 struct GetRenderbufferParameteriv
{
3043 typedef GetRenderbufferParameteriv ValueType
;
3044 static const CommandId kCmdId
= kGetRenderbufferParameteriv
;
3045 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3046 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3048 typedef SizedResult
<GLint
> Result
;
3050 static uint32_t ComputeSize() {
3051 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3054 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3056 void Init(GLenum _target
,
3058 uint32_t _params_shm_id
,
3059 uint32_t _params_shm_offset
) {
3063 params_shm_id
= _params_shm_id
;
3064 params_shm_offset
= _params_shm_offset
;
3067 void* Set(void* cmd
,
3070 uint32_t _params_shm_id
,
3071 uint32_t _params_shm_offset
) {
3072 static_cast<ValueType
*>(cmd
)
3073 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3074 return NextCmdAddress
<ValueType
>(cmd
);
3077 gpu::CommandHeader header
;
3080 uint32_t params_shm_id
;
3081 uint32_t params_shm_offset
;
3084 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv
) == 20,
3085 Sizeof_GetRenderbufferParameteriv_is_not_20
);
3086 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, header
) == 0,
3087 OffsetOf_GetRenderbufferParameteriv_header_not_0
);
3088 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, target
) == 4,
3089 OffsetOf_GetRenderbufferParameteriv_target_not_4
);
3090 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, pname
) == 8,
3091 OffsetOf_GetRenderbufferParameteriv_pname_not_8
);
3092 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, params_shm_id
) == 12,
3093 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12
);
3094 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, params_shm_offset
) == 16,
3095 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16
);
3097 struct GetShaderiv
{
3098 typedef GetShaderiv ValueType
;
3099 static const CommandId kCmdId
= kGetShaderiv
;
3100 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3101 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3103 typedef SizedResult
<GLint
> Result
;
3105 static uint32_t ComputeSize() {
3106 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3109 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3111 void Init(GLuint _shader
,
3113 uint32_t _params_shm_id
,
3114 uint32_t _params_shm_offset
) {
3118 params_shm_id
= _params_shm_id
;
3119 params_shm_offset
= _params_shm_offset
;
3122 void* Set(void* cmd
,
3125 uint32_t _params_shm_id
,
3126 uint32_t _params_shm_offset
) {
3127 static_cast<ValueType
*>(cmd
)
3128 ->Init(_shader
, _pname
, _params_shm_id
, _params_shm_offset
);
3129 return NextCmdAddress
<ValueType
>(cmd
);
3132 gpu::CommandHeader header
;
3135 uint32_t params_shm_id
;
3136 uint32_t params_shm_offset
;
3139 COMPILE_ASSERT(sizeof(GetShaderiv
) == 20, Sizeof_GetShaderiv_is_not_20
);
3140 COMPILE_ASSERT(offsetof(GetShaderiv
, header
) == 0,
3141 OffsetOf_GetShaderiv_header_not_0
);
3142 COMPILE_ASSERT(offsetof(GetShaderiv
, shader
) == 4,
3143 OffsetOf_GetShaderiv_shader_not_4
);
3144 COMPILE_ASSERT(offsetof(GetShaderiv
, pname
) == 8,
3145 OffsetOf_GetShaderiv_pname_not_8
);
3146 COMPILE_ASSERT(offsetof(GetShaderiv
, params_shm_id
) == 12,
3147 OffsetOf_GetShaderiv_params_shm_id_not_12
);
3148 COMPILE_ASSERT(offsetof(GetShaderiv
, params_shm_offset
) == 16,
3149 OffsetOf_GetShaderiv_params_shm_offset_not_16
);
3151 struct GetShaderInfoLog
{
3152 typedef GetShaderInfoLog ValueType
;
3153 static const CommandId kCmdId
= kGetShaderInfoLog
;
3154 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3155 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3157 static uint32_t ComputeSize() {
3158 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3161 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3163 void Init(GLuint _shader
, uint32_t _bucket_id
) {
3166 bucket_id
= _bucket_id
;
3169 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
3170 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
3171 return NextCmdAddress
<ValueType
>(cmd
);
3174 gpu::CommandHeader header
;
3179 COMPILE_ASSERT(sizeof(GetShaderInfoLog
) == 12,
3180 Sizeof_GetShaderInfoLog_is_not_12
);
3181 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, header
) == 0,
3182 OffsetOf_GetShaderInfoLog_header_not_0
);
3183 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, shader
) == 4,
3184 OffsetOf_GetShaderInfoLog_shader_not_4
);
3185 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, bucket_id
) == 8,
3186 OffsetOf_GetShaderInfoLog_bucket_id_not_8
);
3188 struct GetShaderPrecisionFormat
{
3189 typedef GetShaderPrecisionFormat ValueType
;
3190 static const CommandId kCmdId
= kGetShaderPrecisionFormat
;
3191 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3192 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3201 static uint32_t ComputeSize() {
3202 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3205 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3207 void Init(GLenum _shadertype
,
3208 GLenum _precisiontype
,
3209 uint32_t _result_shm_id
,
3210 uint32_t _result_shm_offset
) {
3212 shadertype
= _shadertype
;
3213 precisiontype
= _precisiontype
;
3214 result_shm_id
= _result_shm_id
;
3215 result_shm_offset
= _result_shm_offset
;
3218 void* Set(void* cmd
,
3220 GLenum _precisiontype
,
3221 uint32_t _result_shm_id
,
3222 uint32_t _result_shm_offset
) {
3223 static_cast<ValueType
*>(cmd
)
3224 ->Init(_shadertype
, _precisiontype
, _result_shm_id
, _result_shm_offset
);
3225 return NextCmdAddress
<ValueType
>(cmd
);
3228 gpu::CommandHeader header
;
3229 uint32_t shadertype
;
3230 uint32_t precisiontype
;
3231 uint32_t result_shm_id
;
3232 uint32_t result_shm_offset
;
3235 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat
) == 20,
3236 Sizeof_GetShaderPrecisionFormat_is_not_20
);
3237 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, header
) == 0,
3238 OffsetOf_GetShaderPrecisionFormat_header_not_0
);
3239 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, shadertype
) == 4,
3240 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4
);
3241 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, precisiontype
) == 8,
3242 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8
);
3243 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, result_shm_id
) == 12,
3244 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12
);
3245 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, result_shm_offset
) == 16,
3246 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16
);
3247 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, success
) == 0,
3248 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0
);
3249 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, min_range
) == 4,
3250 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4
);
3251 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, max_range
) == 8,
3252 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8
);
3253 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, precision
) == 12,
3254 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12
);
3256 struct GetShaderSource
{
3257 typedef GetShaderSource ValueType
;
3258 static const CommandId kCmdId
= kGetShaderSource
;
3259 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3260 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3262 static uint32_t ComputeSize() {
3263 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3266 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3268 void Init(GLuint _shader
, uint32_t _bucket_id
) {
3271 bucket_id
= _bucket_id
;
3274 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
3275 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
3276 return NextCmdAddress
<ValueType
>(cmd
);
3279 gpu::CommandHeader header
;
3284 COMPILE_ASSERT(sizeof(GetShaderSource
) == 12, Sizeof_GetShaderSource_is_not_12
);
3285 COMPILE_ASSERT(offsetof(GetShaderSource
, header
) == 0,
3286 OffsetOf_GetShaderSource_header_not_0
);
3287 COMPILE_ASSERT(offsetof(GetShaderSource
, shader
) == 4,
3288 OffsetOf_GetShaderSource_shader_not_4
);
3289 COMPILE_ASSERT(offsetof(GetShaderSource
, bucket_id
) == 8,
3290 OffsetOf_GetShaderSource_bucket_id_not_8
);
3293 typedef GetString ValueType
;
3294 static const CommandId kCmdId
= kGetString
;
3295 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3296 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3298 static uint32_t ComputeSize() {
3299 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3302 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3304 void Init(GLenum _name
, uint32_t _bucket_id
) {
3307 bucket_id
= _bucket_id
;
3310 void* Set(void* cmd
, GLenum _name
, uint32_t _bucket_id
) {
3311 static_cast<ValueType
*>(cmd
)->Init(_name
, _bucket_id
);
3312 return NextCmdAddress
<ValueType
>(cmd
);
3315 gpu::CommandHeader header
;
3320 COMPILE_ASSERT(sizeof(GetString
) == 12, Sizeof_GetString_is_not_12
);
3321 COMPILE_ASSERT(offsetof(GetString
, header
) == 0,
3322 OffsetOf_GetString_header_not_0
);
3323 COMPILE_ASSERT(offsetof(GetString
, name
) == 4, OffsetOf_GetString_name_not_4
);
3324 COMPILE_ASSERT(offsetof(GetString
, bucket_id
) == 8,
3325 OffsetOf_GetString_bucket_id_not_8
);
3327 struct GetTexParameterfv
{
3328 typedef GetTexParameterfv ValueType
;
3329 static const CommandId kCmdId
= kGetTexParameterfv
;
3330 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3331 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3333 typedef SizedResult
<GLfloat
> Result
;
3335 static uint32_t ComputeSize() {
3336 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3339 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3341 void Init(GLenum _target
,
3343 uint32_t _params_shm_id
,
3344 uint32_t _params_shm_offset
) {
3348 params_shm_id
= _params_shm_id
;
3349 params_shm_offset
= _params_shm_offset
;
3352 void* Set(void* cmd
,
3355 uint32_t _params_shm_id
,
3356 uint32_t _params_shm_offset
) {
3357 static_cast<ValueType
*>(cmd
)
3358 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3359 return NextCmdAddress
<ValueType
>(cmd
);
3362 gpu::CommandHeader header
;
3365 uint32_t params_shm_id
;
3366 uint32_t params_shm_offset
;
3369 COMPILE_ASSERT(sizeof(GetTexParameterfv
) == 20,
3370 Sizeof_GetTexParameterfv_is_not_20
);
3371 COMPILE_ASSERT(offsetof(GetTexParameterfv
, header
) == 0,
3372 OffsetOf_GetTexParameterfv_header_not_0
);
3373 COMPILE_ASSERT(offsetof(GetTexParameterfv
, target
) == 4,
3374 OffsetOf_GetTexParameterfv_target_not_4
);
3375 COMPILE_ASSERT(offsetof(GetTexParameterfv
, pname
) == 8,
3376 OffsetOf_GetTexParameterfv_pname_not_8
);
3377 COMPILE_ASSERT(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
3378 OffsetOf_GetTexParameterfv_params_shm_id_not_12
);
3379 COMPILE_ASSERT(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
3380 OffsetOf_GetTexParameterfv_params_shm_offset_not_16
);
3382 struct GetTexParameteriv
{
3383 typedef GetTexParameteriv ValueType
;
3384 static const CommandId kCmdId
= kGetTexParameteriv
;
3385 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3386 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3388 typedef SizedResult
<GLint
> Result
;
3390 static uint32_t ComputeSize() {
3391 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3394 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3396 void Init(GLenum _target
,
3398 uint32_t _params_shm_id
,
3399 uint32_t _params_shm_offset
) {
3403 params_shm_id
= _params_shm_id
;
3404 params_shm_offset
= _params_shm_offset
;
3407 void* Set(void* cmd
,
3410 uint32_t _params_shm_id
,
3411 uint32_t _params_shm_offset
) {
3412 static_cast<ValueType
*>(cmd
)
3413 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3414 return NextCmdAddress
<ValueType
>(cmd
);
3417 gpu::CommandHeader header
;
3420 uint32_t params_shm_id
;
3421 uint32_t params_shm_offset
;
3424 COMPILE_ASSERT(sizeof(GetTexParameteriv
) == 20,
3425 Sizeof_GetTexParameteriv_is_not_20
);
3426 COMPILE_ASSERT(offsetof(GetTexParameteriv
, header
) == 0,
3427 OffsetOf_GetTexParameteriv_header_not_0
);
3428 COMPILE_ASSERT(offsetof(GetTexParameteriv
, target
) == 4,
3429 OffsetOf_GetTexParameteriv_target_not_4
);
3430 COMPILE_ASSERT(offsetof(GetTexParameteriv
, pname
) == 8,
3431 OffsetOf_GetTexParameteriv_pname_not_8
);
3432 COMPILE_ASSERT(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
3433 OffsetOf_GetTexParameteriv_params_shm_id_not_12
);
3434 COMPILE_ASSERT(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
3435 OffsetOf_GetTexParameteriv_params_shm_offset_not_16
);
3437 struct GetUniformfv
{
3438 typedef GetUniformfv ValueType
;
3439 static const CommandId kCmdId
= kGetUniformfv
;
3440 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3441 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3443 typedef SizedResult
<GLfloat
> Result
;
3445 static uint32_t ComputeSize() {
3446 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3449 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3451 void Init(GLuint _program
,
3453 uint32_t _params_shm_id
,
3454 uint32_t _params_shm_offset
) {
3457 location
= _location
;
3458 params_shm_id
= _params_shm_id
;
3459 params_shm_offset
= _params_shm_offset
;
3462 void* Set(void* cmd
,
3465 uint32_t _params_shm_id
,
3466 uint32_t _params_shm_offset
) {
3467 static_cast<ValueType
*>(cmd
)
3468 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
3469 return NextCmdAddress
<ValueType
>(cmd
);
3472 gpu::CommandHeader header
;
3475 uint32_t params_shm_id
;
3476 uint32_t params_shm_offset
;
3479 COMPILE_ASSERT(sizeof(GetUniformfv
) == 20, Sizeof_GetUniformfv_is_not_20
);
3480 COMPILE_ASSERT(offsetof(GetUniformfv
, header
) == 0,
3481 OffsetOf_GetUniformfv_header_not_0
);
3482 COMPILE_ASSERT(offsetof(GetUniformfv
, program
) == 4,
3483 OffsetOf_GetUniformfv_program_not_4
);
3484 COMPILE_ASSERT(offsetof(GetUniformfv
, location
) == 8,
3485 OffsetOf_GetUniformfv_location_not_8
);
3486 COMPILE_ASSERT(offsetof(GetUniformfv
, params_shm_id
) == 12,
3487 OffsetOf_GetUniformfv_params_shm_id_not_12
);
3488 COMPILE_ASSERT(offsetof(GetUniformfv
, params_shm_offset
) == 16,
3489 OffsetOf_GetUniformfv_params_shm_offset_not_16
);
3491 struct GetUniformiv
{
3492 typedef GetUniformiv ValueType
;
3493 static const CommandId kCmdId
= kGetUniformiv
;
3494 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3495 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3497 typedef SizedResult
<GLint
> Result
;
3499 static uint32_t ComputeSize() {
3500 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3503 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3505 void Init(GLuint _program
,
3507 uint32_t _params_shm_id
,
3508 uint32_t _params_shm_offset
) {
3511 location
= _location
;
3512 params_shm_id
= _params_shm_id
;
3513 params_shm_offset
= _params_shm_offset
;
3516 void* Set(void* cmd
,
3519 uint32_t _params_shm_id
,
3520 uint32_t _params_shm_offset
) {
3521 static_cast<ValueType
*>(cmd
)
3522 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
3523 return NextCmdAddress
<ValueType
>(cmd
);
3526 gpu::CommandHeader header
;
3529 uint32_t params_shm_id
;
3530 uint32_t params_shm_offset
;
3533 COMPILE_ASSERT(sizeof(GetUniformiv
) == 20, Sizeof_GetUniformiv_is_not_20
);
3534 COMPILE_ASSERT(offsetof(GetUniformiv
, header
) == 0,
3535 OffsetOf_GetUniformiv_header_not_0
);
3536 COMPILE_ASSERT(offsetof(GetUniformiv
, program
) == 4,
3537 OffsetOf_GetUniformiv_program_not_4
);
3538 COMPILE_ASSERT(offsetof(GetUniformiv
, location
) == 8,
3539 OffsetOf_GetUniformiv_location_not_8
);
3540 COMPILE_ASSERT(offsetof(GetUniformiv
, params_shm_id
) == 12,
3541 OffsetOf_GetUniformiv_params_shm_id_not_12
);
3542 COMPILE_ASSERT(offsetof(GetUniformiv
, params_shm_offset
) == 16,
3543 OffsetOf_GetUniformiv_params_shm_offset_not_16
);
3545 struct GetUniformLocation
{
3546 typedef GetUniformLocation ValueType
;
3547 static const CommandId kCmdId
= kGetUniformLocation
;
3548 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3549 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3551 typedef GLint Result
;
3553 static uint32_t ComputeSize() {
3554 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3557 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3559 void Init(GLuint _program
,
3560 uint32_t _name_bucket_id
,
3561 uint32_t _location_shm_id
,
3562 uint32_t _location_shm_offset
) {
3565 name_bucket_id
= _name_bucket_id
;
3566 location_shm_id
= _location_shm_id
;
3567 location_shm_offset
= _location_shm_offset
;
3570 void* Set(void* cmd
,
3572 uint32_t _name_bucket_id
,
3573 uint32_t _location_shm_id
,
3574 uint32_t _location_shm_offset
) {
3575 static_cast<ValueType
*>(cmd
)->Init(
3576 _program
, _name_bucket_id
, _location_shm_id
, _location_shm_offset
);
3577 return NextCmdAddress
<ValueType
>(cmd
);
3580 gpu::CommandHeader header
;
3582 uint32_t name_bucket_id
;
3583 uint32_t location_shm_id
;
3584 uint32_t location_shm_offset
;
3587 COMPILE_ASSERT(sizeof(GetUniformLocation
) == 20,
3588 Sizeof_GetUniformLocation_is_not_20
);
3589 COMPILE_ASSERT(offsetof(GetUniformLocation
, header
) == 0,
3590 OffsetOf_GetUniformLocation_header_not_0
);
3591 COMPILE_ASSERT(offsetof(GetUniformLocation
, program
) == 4,
3592 OffsetOf_GetUniformLocation_program_not_4
);
3593 COMPILE_ASSERT(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
3594 OffsetOf_GetUniformLocation_name_bucket_id_not_8
);
3595 COMPILE_ASSERT(offsetof(GetUniformLocation
, location_shm_id
) == 12,
3596 OffsetOf_GetUniformLocation_location_shm_id_not_12
);
3597 COMPILE_ASSERT(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
3598 OffsetOf_GetUniformLocation_location_shm_offset_not_16
);
3600 struct GetVertexAttribfv
{
3601 typedef GetVertexAttribfv ValueType
;
3602 static const CommandId kCmdId
= kGetVertexAttribfv
;
3603 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3604 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3606 typedef SizedResult
<GLfloat
> Result
;
3608 static uint32_t ComputeSize() {
3609 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3612 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3614 void Init(GLuint _index
,
3616 uint32_t _params_shm_id
,
3617 uint32_t _params_shm_offset
) {
3621 params_shm_id
= _params_shm_id
;
3622 params_shm_offset
= _params_shm_offset
;
3625 void* Set(void* cmd
,
3628 uint32_t _params_shm_id
,
3629 uint32_t _params_shm_offset
) {
3630 static_cast<ValueType
*>(cmd
)
3631 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
3632 return NextCmdAddress
<ValueType
>(cmd
);
3635 gpu::CommandHeader header
;
3638 uint32_t params_shm_id
;
3639 uint32_t params_shm_offset
;
3642 COMPILE_ASSERT(sizeof(GetVertexAttribfv
) == 20,
3643 Sizeof_GetVertexAttribfv_is_not_20
);
3644 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, header
) == 0,
3645 OffsetOf_GetVertexAttribfv_header_not_0
);
3646 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, index
) == 4,
3647 OffsetOf_GetVertexAttribfv_index_not_4
);
3648 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, pname
) == 8,
3649 OffsetOf_GetVertexAttribfv_pname_not_8
);
3650 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
3651 OffsetOf_GetVertexAttribfv_params_shm_id_not_12
);
3652 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
3653 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16
);
3655 struct GetVertexAttribiv
{
3656 typedef GetVertexAttribiv ValueType
;
3657 static const CommandId kCmdId
= kGetVertexAttribiv
;
3658 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3659 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3661 typedef SizedResult
<GLint
> Result
;
3663 static uint32_t ComputeSize() {
3664 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3667 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3669 void Init(GLuint _index
,
3671 uint32_t _params_shm_id
,
3672 uint32_t _params_shm_offset
) {
3676 params_shm_id
= _params_shm_id
;
3677 params_shm_offset
= _params_shm_offset
;
3680 void* Set(void* cmd
,
3683 uint32_t _params_shm_id
,
3684 uint32_t _params_shm_offset
) {
3685 static_cast<ValueType
*>(cmd
)
3686 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
3687 return NextCmdAddress
<ValueType
>(cmd
);
3690 gpu::CommandHeader header
;
3693 uint32_t params_shm_id
;
3694 uint32_t params_shm_offset
;
3697 COMPILE_ASSERT(sizeof(GetVertexAttribiv
) == 20,
3698 Sizeof_GetVertexAttribiv_is_not_20
);
3699 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, header
) == 0,
3700 OffsetOf_GetVertexAttribiv_header_not_0
);
3701 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, index
) == 4,
3702 OffsetOf_GetVertexAttribiv_index_not_4
);
3703 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, pname
) == 8,
3704 OffsetOf_GetVertexAttribiv_pname_not_8
);
3705 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
3706 OffsetOf_GetVertexAttribiv_params_shm_id_not_12
);
3707 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
3708 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16
);
3710 struct GetVertexAttribPointerv
{
3711 typedef GetVertexAttribPointerv ValueType
;
3712 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
3713 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3714 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3716 typedef SizedResult
<GLuint
> Result
;
3718 static uint32_t ComputeSize() {
3719 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3722 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3724 void Init(GLuint _index
,
3726 uint32_t _pointer_shm_id
,
3727 uint32_t _pointer_shm_offset
) {
3731 pointer_shm_id
= _pointer_shm_id
;
3732 pointer_shm_offset
= _pointer_shm_offset
;
3735 void* Set(void* cmd
,
3738 uint32_t _pointer_shm_id
,
3739 uint32_t _pointer_shm_offset
) {
3740 static_cast<ValueType
*>(cmd
)
3741 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
3742 return NextCmdAddress
<ValueType
>(cmd
);
3745 gpu::CommandHeader header
;
3748 uint32_t pointer_shm_id
;
3749 uint32_t pointer_shm_offset
;
3752 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv
) == 20,
3753 Sizeof_GetVertexAttribPointerv_is_not_20
);
3754 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, header
) == 0,
3755 OffsetOf_GetVertexAttribPointerv_header_not_0
);
3756 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, index
) == 4,
3757 OffsetOf_GetVertexAttribPointerv_index_not_4
);
3758 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pname
) == 8,
3759 OffsetOf_GetVertexAttribPointerv_pname_not_8
);
3760 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
3761 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12
);
3762 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
3763 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16
);
3766 typedef Hint ValueType
;
3767 static const CommandId kCmdId
= kHint
;
3768 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3769 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3771 static uint32_t ComputeSize() {
3772 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3775 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3777 void Init(GLenum _target
, GLenum _mode
) {
3783 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
3784 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
3785 return NextCmdAddress
<ValueType
>(cmd
);
3788 gpu::CommandHeader header
;
3793 COMPILE_ASSERT(sizeof(Hint
) == 12, Sizeof_Hint_is_not_12
);
3794 COMPILE_ASSERT(offsetof(Hint
, header
) == 0, OffsetOf_Hint_header_not_0
);
3795 COMPILE_ASSERT(offsetof(Hint
, target
) == 4, OffsetOf_Hint_target_not_4
);
3796 COMPILE_ASSERT(offsetof(Hint
, mode
) == 8, OffsetOf_Hint_mode_not_8
);
3799 typedef IsBuffer ValueType
;
3800 static const CommandId kCmdId
= kIsBuffer
;
3801 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3802 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3804 typedef uint32_t Result
;
3806 static uint32_t ComputeSize() {
3807 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3810 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3812 void Init(GLuint _buffer
,
3813 uint32_t _result_shm_id
,
3814 uint32_t _result_shm_offset
) {
3817 result_shm_id
= _result_shm_id
;
3818 result_shm_offset
= _result_shm_offset
;
3821 void* Set(void* cmd
,
3823 uint32_t _result_shm_id
,
3824 uint32_t _result_shm_offset
) {
3825 static_cast<ValueType
*>(cmd
)
3826 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
3827 return NextCmdAddress
<ValueType
>(cmd
);
3830 gpu::CommandHeader header
;
3832 uint32_t result_shm_id
;
3833 uint32_t result_shm_offset
;
3836 COMPILE_ASSERT(sizeof(IsBuffer
) == 16, Sizeof_IsBuffer_is_not_16
);
3837 COMPILE_ASSERT(offsetof(IsBuffer
, header
) == 0, OffsetOf_IsBuffer_header_not_0
);
3838 COMPILE_ASSERT(offsetof(IsBuffer
, buffer
) == 4, OffsetOf_IsBuffer_buffer_not_4
);
3839 COMPILE_ASSERT(offsetof(IsBuffer
, result_shm_id
) == 8,
3840 OffsetOf_IsBuffer_result_shm_id_not_8
);
3841 COMPILE_ASSERT(offsetof(IsBuffer
, result_shm_offset
) == 12,
3842 OffsetOf_IsBuffer_result_shm_offset_not_12
);
3845 typedef IsEnabled ValueType
;
3846 static const CommandId kCmdId
= kIsEnabled
;
3847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3850 typedef uint32_t Result
;
3852 static uint32_t ComputeSize() {
3853 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3856 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3858 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
3861 result_shm_id
= _result_shm_id
;
3862 result_shm_offset
= _result_shm_offset
;
3865 void* Set(void* cmd
,
3867 uint32_t _result_shm_id
,
3868 uint32_t _result_shm_offset
) {
3869 static_cast<ValueType
*>(cmd
)
3870 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
3871 return NextCmdAddress
<ValueType
>(cmd
);
3874 gpu::CommandHeader header
;
3876 uint32_t result_shm_id
;
3877 uint32_t result_shm_offset
;
3880 COMPILE_ASSERT(sizeof(IsEnabled
) == 16, Sizeof_IsEnabled_is_not_16
);
3881 COMPILE_ASSERT(offsetof(IsEnabled
, header
) == 0,
3882 OffsetOf_IsEnabled_header_not_0
);
3883 COMPILE_ASSERT(offsetof(IsEnabled
, cap
) == 4, OffsetOf_IsEnabled_cap_not_4
);
3884 COMPILE_ASSERT(offsetof(IsEnabled
, result_shm_id
) == 8,
3885 OffsetOf_IsEnabled_result_shm_id_not_8
);
3886 COMPILE_ASSERT(offsetof(IsEnabled
, result_shm_offset
) == 12,
3887 OffsetOf_IsEnabled_result_shm_offset_not_12
);
3889 struct IsFramebuffer
{
3890 typedef IsFramebuffer ValueType
;
3891 static const CommandId kCmdId
= kIsFramebuffer
;
3892 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3893 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3895 typedef uint32_t Result
;
3897 static uint32_t ComputeSize() {
3898 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3901 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3903 void Init(GLuint _framebuffer
,
3904 uint32_t _result_shm_id
,
3905 uint32_t _result_shm_offset
) {
3907 framebuffer
= _framebuffer
;
3908 result_shm_id
= _result_shm_id
;
3909 result_shm_offset
= _result_shm_offset
;
3912 void* Set(void* cmd
,
3913 GLuint _framebuffer
,
3914 uint32_t _result_shm_id
,
3915 uint32_t _result_shm_offset
) {
3916 static_cast<ValueType
*>(cmd
)
3917 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
3918 return NextCmdAddress
<ValueType
>(cmd
);
3921 gpu::CommandHeader header
;
3922 uint32_t framebuffer
;
3923 uint32_t result_shm_id
;
3924 uint32_t result_shm_offset
;
3927 COMPILE_ASSERT(sizeof(IsFramebuffer
) == 16, Sizeof_IsFramebuffer_is_not_16
);
3928 COMPILE_ASSERT(offsetof(IsFramebuffer
, header
) == 0,
3929 OffsetOf_IsFramebuffer_header_not_0
);
3930 COMPILE_ASSERT(offsetof(IsFramebuffer
, framebuffer
) == 4,
3931 OffsetOf_IsFramebuffer_framebuffer_not_4
);
3932 COMPILE_ASSERT(offsetof(IsFramebuffer
, result_shm_id
) == 8,
3933 OffsetOf_IsFramebuffer_result_shm_id_not_8
);
3934 COMPILE_ASSERT(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
3935 OffsetOf_IsFramebuffer_result_shm_offset_not_12
);
3938 typedef IsProgram ValueType
;
3939 static const CommandId kCmdId
= kIsProgram
;
3940 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3941 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3943 typedef uint32_t Result
;
3945 static uint32_t ComputeSize() {
3946 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3949 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3951 void Init(GLuint _program
,
3952 uint32_t _result_shm_id
,
3953 uint32_t _result_shm_offset
) {
3956 result_shm_id
= _result_shm_id
;
3957 result_shm_offset
= _result_shm_offset
;
3960 void* Set(void* cmd
,
3962 uint32_t _result_shm_id
,
3963 uint32_t _result_shm_offset
) {
3964 static_cast<ValueType
*>(cmd
)
3965 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
3966 return NextCmdAddress
<ValueType
>(cmd
);
3969 gpu::CommandHeader header
;
3971 uint32_t result_shm_id
;
3972 uint32_t result_shm_offset
;
3975 COMPILE_ASSERT(sizeof(IsProgram
) == 16, Sizeof_IsProgram_is_not_16
);
3976 COMPILE_ASSERT(offsetof(IsProgram
, header
) == 0,
3977 OffsetOf_IsProgram_header_not_0
);
3978 COMPILE_ASSERT(offsetof(IsProgram
, program
) == 4,
3979 OffsetOf_IsProgram_program_not_4
);
3980 COMPILE_ASSERT(offsetof(IsProgram
, result_shm_id
) == 8,
3981 OffsetOf_IsProgram_result_shm_id_not_8
);
3982 COMPILE_ASSERT(offsetof(IsProgram
, result_shm_offset
) == 12,
3983 OffsetOf_IsProgram_result_shm_offset_not_12
);
3985 struct IsRenderbuffer
{
3986 typedef IsRenderbuffer ValueType
;
3987 static const CommandId kCmdId
= kIsRenderbuffer
;
3988 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3989 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3991 typedef uint32_t Result
;
3993 static uint32_t ComputeSize() {
3994 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3997 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3999 void Init(GLuint _renderbuffer
,
4000 uint32_t _result_shm_id
,
4001 uint32_t _result_shm_offset
) {
4003 renderbuffer
= _renderbuffer
;
4004 result_shm_id
= _result_shm_id
;
4005 result_shm_offset
= _result_shm_offset
;
4008 void* Set(void* cmd
,
4009 GLuint _renderbuffer
,
4010 uint32_t _result_shm_id
,
4011 uint32_t _result_shm_offset
) {
4012 static_cast<ValueType
*>(cmd
)
4013 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
4014 return NextCmdAddress
<ValueType
>(cmd
);
4017 gpu::CommandHeader header
;
4018 uint32_t renderbuffer
;
4019 uint32_t result_shm_id
;
4020 uint32_t result_shm_offset
;
4023 COMPILE_ASSERT(sizeof(IsRenderbuffer
) == 16, Sizeof_IsRenderbuffer_is_not_16
);
4024 COMPILE_ASSERT(offsetof(IsRenderbuffer
, header
) == 0,
4025 OffsetOf_IsRenderbuffer_header_not_0
);
4026 COMPILE_ASSERT(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
4027 OffsetOf_IsRenderbuffer_renderbuffer_not_4
);
4028 COMPILE_ASSERT(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
4029 OffsetOf_IsRenderbuffer_result_shm_id_not_8
);
4030 COMPILE_ASSERT(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
4031 OffsetOf_IsRenderbuffer_result_shm_offset_not_12
);
4034 typedef IsShader ValueType
;
4035 static const CommandId kCmdId
= kIsShader
;
4036 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4037 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4039 typedef uint32_t Result
;
4041 static uint32_t ComputeSize() {
4042 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4045 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4047 void Init(GLuint _shader
,
4048 uint32_t _result_shm_id
,
4049 uint32_t _result_shm_offset
) {
4052 result_shm_id
= _result_shm_id
;
4053 result_shm_offset
= _result_shm_offset
;
4056 void* Set(void* cmd
,
4058 uint32_t _result_shm_id
,
4059 uint32_t _result_shm_offset
) {
4060 static_cast<ValueType
*>(cmd
)
4061 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
4062 return NextCmdAddress
<ValueType
>(cmd
);
4065 gpu::CommandHeader header
;
4067 uint32_t result_shm_id
;
4068 uint32_t result_shm_offset
;
4071 COMPILE_ASSERT(sizeof(IsShader
) == 16, Sizeof_IsShader_is_not_16
);
4072 COMPILE_ASSERT(offsetof(IsShader
, header
) == 0, OffsetOf_IsShader_header_not_0
);
4073 COMPILE_ASSERT(offsetof(IsShader
, shader
) == 4, OffsetOf_IsShader_shader_not_4
);
4074 COMPILE_ASSERT(offsetof(IsShader
, result_shm_id
) == 8,
4075 OffsetOf_IsShader_result_shm_id_not_8
);
4076 COMPILE_ASSERT(offsetof(IsShader
, result_shm_offset
) == 12,
4077 OffsetOf_IsShader_result_shm_offset_not_12
);
4080 typedef IsTexture ValueType
;
4081 static const CommandId kCmdId
= kIsTexture
;
4082 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4083 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4085 typedef uint32_t Result
;
4087 static uint32_t ComputeSize() {
4088 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4091 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4093 void Init(GLuint _texture
,
4094 uint32_t _result_shm_id
,
4095 uint32_t _result_shm_offset
) {
4098 result_shm_id
= _result_shm_id
;
4099 result_shm_offset
= _result_shm_offset
;
4102 void* Set(void* cmd
,
4104 uint32_t _result_shm_id
,
4105 uint32_t _result_shm_offset
) {
4106 static_cast<ValueType
*>(cmd
)
4107 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
4108 return NextCmdAddress
<ValueType
>(cmd
);
4111 gpu::CommandHeader header
;
4113 uint32_t result_shm_id
;
4114 uint32_t result_shm_offset
;
4117 COMPILE_ASSERT(sizeof(IsTexture
) == 16, Sizeof_IsTexture_is_not_16
);
4118 COMPILE_ASSERT(offsetof(IsTexture
, header
) == 0,
4119 OffsetOf_IsTexture_header_not_0
);
4120 COMPILE_ASSERT(offsetof(IsTexture
, texture
) == 4,
4121 OffsetOf_IsTexture_texture_not_4
);
4122 COMPILE_ASSERT(offsetof(IsTexture
, result_shm_id
) == 8,
4123 OffsetOf_IsTexture_result_shm_id_not_8
);
4124 COMPILE_ASSERT(offsetof(IsTexture
, result_shm_offset
) == 12,
4125 OffsetOf_IsTexture_result_shm_offset_not_12
);
4128 typedef LineWidth ValueType
;
4129 static const CommandId kCmdId
= kLineWidth
;
4130 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4131 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4133 static uint32_t ComputeSize() {
4134 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4137 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4139 void Init(GLfloat _width
) {
4144 void* Set(void* cmd
, GLfloat _width
) {
4145 static_cast<ValueType
*>(cmd
)->Init(_width
);
4146 return NextCmdAddress
<ValueType
>(cmd
);
4149 gpu::CommandHeader header
;
4153 COMPILE_ASSERT(sizeof(LineWidth
) == 8, Sizeof_LineWidth_is_not_8
);
4154 COMPILE_ASSERT(offsetof(LineWidth
, header
) == 0,
4155 OffsetOf_LineWidth_header_not_0
);
4156 COMPILE_ASSERT(offsetof(LineWidth
, width
) == 4, OffsetOf_LineWidth_width_not_4
);
4158 struct LinkProgram
{
4159 typedef LinkProgram ValueType
;
4160 static const CommandId kCmdId
= kLinkProgram
;
4161 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4162 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4164 static uint32_t ComputeSize() {
4165 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4168 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4170 void Init(GLuint _program
) {
4175 void* Set(void* cmd
, GLuint _program
) {
4176 static_cast<ValueType
*>(cmd
)->Init(_program
);
4177 return NextCmdAddress
<ValueType
>(cmd
);
4180 gpu::CommandHeader header
;
4184 COMPILE_ASSERT(sizeof(LinkProgram
) == 8, Sizeof_LinkProgram_is_not_8
);
4185 COMPILE_ASSERT(offsetof(LinkProgram
, header
) == 0,
4186 OffsetOf_LinkProgram_header_not_0
);
4187 COMPILE_ASSERT(offsetof(LinkProgram
, program
) == 4,
4188 OffsetOf_LinkProgram_program_not_4
);
4190 struct PixelStorei
{
4191 typedef PixelStorei ValueType
;
4192 static const CommandId kCmdId
= kPixelStorei
;
4193 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4194 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4196 static uint32_t ComputeSize() {
4197 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4200 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4202 void Init(GLenum _pname
, GLint _param
) {
4208 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
4209 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
4210 return NextCmdAddress
<ValueType
>(cmd
);
4213 gpu::CommandHeader header
;
4218 COMPILE_ASSERT(sizeof(PixelStorei
) == 12, Sizeof_PixelStorei_is_not_12
);
4219 COMPILE_ASSERT(offsetof(PixelStorei
, header
) == 0,
4220 OffsetOf_PixelStorei_header_not_0
);
4221 COMPILE_ASSERT(offsetof(PixelStorei
, pname
) == 4,
4222 OffsetOf_PixelStorei_pname_not_4
);
4223 COMPILE_ASSERT(offsetof(PixelStorei
, param
) == 8,
4224 OffsetOf_PixelStorei_param_not_8
);
4226 struct PolygonOffset
{
4227 typedef PolygonOffset ValueType
;
4228 static const CommandId kCmdId
= kPolygonOffset
;
4229 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4230 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4232 static uint32_t ComputeSize() {
4233 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4236 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4238 void Init(GLfloat _factor
, GLfloat _units
) {
4244 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
4245 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
4246 return NextCmdAddress
<ValueType
>(cmd
);
4249 gpu::CommandHeader header
;
4254 COMPILE_ASSERT(sizeof(PolygonOffset
) == 12, Sizeof_PolygonOffset_is_not_12
);
4255 COMPILE_ASSERT(offsetof(PolygonOffset
, header
) == 0,
4256 OffsetOf_PolygonOffset_header_not_0
);
4257 COMPILE_ASSERT(offsetof(PolygonOffset
, factor
) == 4,
4258 OffsetOf_PolygonOffset_factor_not_4
);
4259 COMPILE_ASSERT(offsetof(PolygonOffset
, units
) == 8,
4260 OffsetOf_PolygonOffset_units_not_8
);
4262 // ReadPixels has the result separated from the pixel buffer so that
4263 // it is easier to specify the result going to some specific place
4264 // that exactly fits the rectangle of pixels.
4266 typedef ReadPixels ValueType
;
4267 static const CommandId kCmdId
= kReadPixels
;
4268 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4269 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4271 typedef uint32_t Result
;
4273 static uint32_t ComputeSize() {
4274 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4277 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4285 uint32_t _pixels_shm_id
,
4286 uint32_t _pixels_shm_offset
,
4287 uint32_t _result_shm_id
,
4288 uint32_t _result_shm_offset
,
4297 pixels_shm_id
= _pixels_shm_id
;
4298 pixels_shm_offset
= _pixels_shm_offset
;
4299 result_shm_id
= _result_shm_id
;
4300 result_shm_offset
= _result_shm_offset
;
4304 void* Set(void* cmd
,
4311 uint32_t _pixels_shm_id
,
4312 uint32_t _pixels_shm_offset
,
4313 uint32_t _result_shm_id
,
4314 uint32_t _result_shm_offset
,
4316 static_cast<ValueType
*>(cmd
)->Init(_x
,
4327 return NextCmdAddress
<ValueType
>(cmd
);
4330 gpu::CommandHeader header
;
4337 uint32_t pixels_shm_id
;
4338 uint32_t pixels_shm_offset
;
4339 uint32_t result_shm_id
;
4340 uint32_t result_shm_offset
;
4344 COMPILE_ASSERT(sizeof(ReadPixels
) == 48, Sizeof_ReadPixels_is_not_48
);
4345 COMPILE_ASSERT(offsetof(ReadPixels
, header
) == 0,
4346 OffsetOf_ReadPixels_header_not_0
);
4347 COMPILE_ASSERT(offsetof(ReadPixels
, x
) == 4, OffsetOf_ReadPixels_x_not_4
);
4348 COMPILE_ASSERT(offsetof(ReadPixels
, y
) == 8, OffsetOf_ReadPixels_y_not_8
);
4349 COMPILE_ASSERT(offsetof(ReadPixels
, width
) == 12,
4350 OffsetOf_ReadPixels_width_not_12
);
4351 COMPILE_ASSERT(offsetof(ReadPixels
, height
) == 16,
4352 OffsetOf_ReadPixels_height_not_16
);
4353 COMPILE_ASSERT(offsetof(ReadPixels
, format
) == 20,
4354 OffsetOf_ReadPixels_format_not_20
);
4355 COMPILE_ASSERT(offsetof(ReadPixels
, type
) == 24,
4356 OffsetOf_ReadPixels_type_not_24
);
4357 COMPILE_ASSERT(offsetof(ReadPixels
, pixels_shm_id
) == 28,
4358 OffsetOf_ReadPixels_pixels_shm_id_not_28
);
4359 COMPILE_ASSERT(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
4360 OffsetOf_ReadPixels_pixels_shm_offset_not_32
);
4361 COMPILE_ASSERT(offsetof(ReadPixels
, result_shm_id
) == 36,
4362 OffsetOf_ReadPixels_result_shm_id_not_36
);
4363 COMPILE_ASSERT(offsetof(ReadPixels
, result_shm_offset
) == 40,
4364 OffsetOf_ReadPixels_result_shm_offset_not_40
);
4365 COMPILE_ASSERT(offsetof(ReadPixels
, async
) == 44,
4366 OffsetOf_ReadPixels_async_not_44
);
4368 struct ReleaseShaderCompiler
{
4369 typedef ReleaseShaderCompiler ValueType
;
4370 static const CommandId kCmdId
= kReleaseShaderCompiler
;
4371 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4372 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4374 static uint32_t ComputeSize() {
4375 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4378 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4380 void Init() { SetHeader(); }
4382 void* Set(void* cmd
) {
4383 static_cast<ValueType
*>(cmd
)->Init();
4384 return NextCmdAddress
<ValueType
>(cmd
);
4387 gpu::CommandHeader header
;
4390 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler
) == 4,
4391 Sizeof_ReleaseShaderCompiler_is_not_4
);
4392 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler
, header
) == 0,
4393 OffsetOf_ReleaseShaderCompiler_header_not_0
);
4395 struct RenderbufferStorage
{
4396 typedef RenderbufferStorage ValueType
;
4397 static const CommandId kCmdId
= kRenderbufferStorage
;
4398 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4399 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4401 static uint32_t ComputeSize() {
4402 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4405 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4407 void Init(GLenum _target
,
4408 GLenum _internalformat
,
4413 internalformat
= _internalformat
;
4418 void* Set(void* cmd
,
4420 GLenum _internalformat
,
4423 static_cast<ValueType
*>(cmd
)
4424 ->Init(_target
, _internalformat
, _width
, _height
);
4425 return NextCmdAddress
<ValueType
>(cmd
);
4428 gpu::CommandHeader header
;
4430 uint32_t internalformat
;
4435 COMPILE_ASSERT(sizeof(RenderbufferStorage
) == 20,
4436 Sizeof_RenderbufferStorage_is_not_20
);
4437 COMPILE_ASSERT(offsetof(RenderbufferStorage
, header
) == 0,
4438 OffsetOf_RenderbufferStorage_header_not_0
);
4439 COMPILE_ASSERT(offsetof(RenderbufferStorage
, target
) == 4,
4440 OffsetOf_RenderbufferStorage_target_not_4
);
4441 COMPILE_ASSERT(offsetof(RenderbufferStorage
, internalformat
) == 8,
4442 OffsetOf_RenderbufferStorage_internalformat_not_8
);
4443 COMPILE_ASSERT(offsetof(RenderbufferStorage
, width
) == 12,
4444 OffsetOf_RenderbufferStorage_width_not_12
);
4445 COMPILE_ASSERT(offsetof(RenderbufferStorage
, height
) == 16,
4446 OffsetOf_RenderbufferStorage_height_not_16
);
4448 struct SampleCoverage
{
4449 typedef SampleCoverage ValueType
;
4450 static const CommandId kCmdId
= kSampleCoverage
;
4451 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4452 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4454 static uint32_t ComputeSize() {
4455 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4458 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4460 void Init(GLclampf _value
, GLboolean _invert
) {
4466 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
4467 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
4468 return NextCmdAddress
<ValueType
>(cmd
);
4471 gpu::CommandHeader header
;
4476 COMPILE_ASSERT(sizeof(SampleCoverage
) == 12, Sizeof_SampleCoverage_is_not_12
);
4477 COMPILE_ASSERT(offsetof(SampleCoverage
, header
) == 0,
4478 OffsetOf_SampleCoverage_header_not_0
);
4479 COMPILE_ASSERT(offsetof(SampleCoverage
, value
) == 4,
4480 OffsetOf_SampleCoverage_value_not_4
);
4481 COMPILE_ASSERT(offsetof(SampleCoverage
, invert
) == 8,
4482 OffsetOf_SampleCoverage_invert_not_8
);
4485 typedef Scissor ValueType
;
4486 static const CommandId kCmdId
= kScissor
;
4487 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4488 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4490 static uint32_t ComputeSize() {
4491 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4494 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4496 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
4504 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
4505 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
4506 return NextCmdAddress
<ValueType
>(cmd
);
4509 gpu::CommandHeader header
;
4516 COMPILE_ASSERT(sizeof(Scissor
) == 20, Sizeof_Scissor_is_not_20
);
4517 COMPILE_ASSERT(offsetof(Scissor
, header
) == 0, OffsetOf_Scissor_header_not_0
);
4518 COMPILE_ASSERT(offsetof(Scissor
, x
) == 4, OffsetOf_Scissor_x_not_4
);
4519 COMPILE_ASSERT(offsetof(Scissor
, y
) == 8, OffsetOf_Scissor_y_not_8
);
4520 COMPILE_ASSERT(offsetof(Scissor
, width
) == 12, OffsetOf_Scissor_width_not_12
);
4521 COMPILE_ASSERT(offsetof(Scissor
, height
) == 16, OffsetOf_Scissor_height_not_16
);
4523 struct ShaderBinary
{
4524 typedef ShaderBinary ValueType
;
4525 static const CommandId kCmdId
= kShaderBinary
;
4526 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4527 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4529 static uint32_t ComputeSize() {
4530 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4533 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4535 void Init(GLsizei _n
,
4536 uint32_t _shaders_shm_id
,
4537 uint32_t _shaders_shm_offset
,
4538 GLenum _binaryformat
,
4539 uint32_t _binary_shm_id
,
4540 uint32_t _binary_shm_offset
,
4544 shaders_shm_id
= _shaders_shm_id
;
4545 shaders_shm_offset
= _shaders_shm_offset
;
4546 binaryformat
= _binaryformat
;
4547 binary_shm_id
= _binary_shm_id
;
4548 binary_shm_offset
= _binary_shm_offset
;
4552 void* Set(void* cmd
,
4554 uint32_t _shaders_shm_id
,
4555 uint32_t _shaders_shm_offset
,
4556 GLenum _binaryformat
,
4557 uint32_t _binary_shm_id
,
4558 uint32_t _binary_shm_offset
,
4560 static_cast<ValueType
*>(cmd
)->Init(_n
,
4562 _shaders_shm_offset
,
4567 return NextCmdAddress
<ValueType
>(cmd
);
4570 gpu::CommandHeader header
;
4572 uint32_t shaders_shm_id
;
4573 uint32_t shaders_shm_offset
;
4574 uint32_t binaryformat
;
4575 uint32_t binary_shm_id
;
4576 uint32_t binary_shm_offset
;
4580 COMPILE_ASSERT(sizeof(ShaderBinary
) == 32, Sizeof_ShaderBinary_is_not_32
);
4581 COMPILE_ASSERT(offsetof(ShaderBinary
, header
) == 0,
4582 OffsetOf_ShaderBinary_header_not_0
);
4583 COMPILE_ASSERT(offsetof(ShaderBinary
, n
) == 4, OffsetOf_ShaderBinary_n_not_4
);
4584 COMPILE_ASSERT(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
4585 OffsetOf_ShaderBinary_shaders_shm_id_not_8
);
4586 COMPILE_ASSERT(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
4587 OffsetOf_ShaderBinary_shaders_shm_offset_not_12
);
4588 COMPILE_ASSERT(offsetof(ShaderBinary
, binaryformat
) == 16,
4589 OffsetOf_ShaderBinary_binaryformat_not_16
);
4590 COMPILE_ASSERT(offsetof(ShaderBinary
, binary_shm_id
) == 20,
4591 OffsetOf_ShaderBinary_binary_shm_id_not_20
);
4592 COMPILE_ASSERT(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
4593 OffsetOf_ShaderBinary_binary_shm_offset_not_24
);
4594 COMPILE_ASSERT(offsetof(ShaderBinary
, length
) == 28,
4595 OffsetOf_ShaderBinary_length_not_28
);
4597 struct ShaderSourceBucket
{
4598 typedef ShaderSourceBucket ValueType
;
4599 static const CommandId kCmdId
= kShaderSourceBucket
;
4600 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4601 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4603 static uint32_t ComputeSize() {
4604 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4607 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4609 void Init(GLuint _shader
, uint32_t _data_bucket_id
) {
4612 data_bucket_id
= _data_bucket_id
;
4615 void* Set(void* cmd
, GLuint _shader
, uint32_t _data_bucket_id
) {
4616 static_cast<ValueType
*>(cmd
)->Init(_shader
, _data_bucket_id
);
4617 return NextCmdAddress
<ValueType
>(cmd
);
4620 gpu::CommandHeader header
;
4622 uint32_t data_bucket_id
;
4625 COMPILE_ASSERT(sizeof(ShaderSourceBucket
) == 12,
4626 Sizeof_ShaderSourceBucket_is_not_12
);
4627 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, header
) == 0,
4628 OffsetOf_ShaderSourceBucket_header_not_0
);
4629 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, shader
) == 4,
4630 OffsetOf_ShaderSourceBucket_shader_not_4
);
4631 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, data_bucket_id
) == 8,
4632 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8
);
4634 struct StencilFunc
{
4635 typedef StencilFunc ValueType
;
4636 static const CommandId kCmdId
= kStencilFunc
;
4637 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4638 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4640 static uint32_t ComputeSize() {
4641 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4644 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4646 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
4653 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4654 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
4655 return NextCmdAddress
<ValueType
>(cmd
);
4658 gpu::CommandHeader header
;
4664 COMPILE_ASSERT(sizeof(StencilFunc
) == 16, Sizeof_StencilFunc_is_not_16
);
4665 COMPILE_ASSERT(offsetof(StencilFunc
, header
) == 0,
4666 OffsetOf_StencilFunc_header_not_0
);
4667 COMPILE_ASSERT(offsetof(StencilFunc
, func
) == 4,
4668 OffsetOf_StencilFunc_func_not_4
);
4669 COMPILE_ASSERT(offsetof(StencilFunc
, ref
) == 8, OffsetOf_StencilFunc_ref_not_8
);
4670 COMPILE_ASSERT(offsetof(StencilFunc
, mask
) == 12,
4671 OffsetOf_StencilFunc_mask_not_12
);
4673 struct StencilFuncSeparate
{
4674 typedef StencilFuncSeparate ValueType
;
4675 static const CommandId kCmdId
= kStencilFuncSeparate
;
4676 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4677 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4679 static uint32_t ComputeSize() {
4680 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4683 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4685 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4693 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4694 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
4695 return NextCmdAddress
<ValueType
>(cmd
);
4698 gpu::CommandHeader header
;
4705 COMPILE_ASSERT(sizeof(StencilFuncSeparate
) == 20,
4706 Sizeof_StencilFuncSeparate_is_not_20
);
4707 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, header
) == 0,
4708 OffsetOf_StencilFuncSeparate_header_not_0
);
4709 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, face
) == 4,
4710 OffsetOf_StencilFuncSeparate_face_not_4
);
4711 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, func
) == 8,
4712 OffsetOf_StencilFuncSeparate_func_not_8
);
4713 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, ref
) == 12,
4714 OffsetOf_StencilFuncSeparate_ref_not_12
);
4715 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, mask
) == 16,
4716 OffsetOf_StencilFuncSeparate_mask_not_16
);
4718 struct StencilMask
{
4719 typedef StencilMask ValueType
;
4720 static const CommandId kCmdId
= kStencilMask
;
4721 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4722 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4724 static uint32_t ComputeSize() {
4725 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4728 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4730 void Init(GLuint _mask
) {
4735 void* Set(void* cmd
, GLuint _mask
) {
4736 static_cast<ValueType
*>(cmd
)->Init(_mask
);
4737 return NextCmdAddress
<ValueType
>(cmd
);
4740 gpu::CommandHeader header
;
4744 COMPILE_ASSERT(sizeof(StencilMask
) == 8, Sizeof_StencilMask_is_not_8
);
4745 COMPILE_ASSERT(offsetof(StencilMask
, header
) == 0,
4746 OffsetOf_StencilMask_header_not_0
);
4747 COMPILE_ASSERT(offsetof(StencilMask
, mask
) == 4,
4748 OffsetOf_StencilMask_mask_not_4
);
4750 struct StencilMaskSeparate
{
4751 typedef StencilMaskSeparate ValueType
;
4752 static const CommandId kCmdId
= kStencilMaskSeparate
;
4753 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4754 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4756 static uint32_t ComputeSize() {
4757 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4760 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4762 void Init(GLenum _face
, GLuint _mask
) {
4768 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
4769 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
4770 return NextCmdAddress
<ValueType
>(cmd
);
4773 gpu::CommandHeader header
;
4778 COMPILE_ASSERT(sizeof(StencilMaskSeparate
) == 12,
4779 Sizeof_StencilMaskSeparate_is_not_12
);
4780 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, header
) == 0,
4781 OffsetOf_StencilMaskSeparate_header_not_0
);
4782 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, face
) == 4,
4783 OffsetOf_StencilMaskSeparate_face_not_4
);
4784 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, mask
) == 8,
4785 OffsetOf_StencilMaskSeparate_mask_not_8
);
4788 typedef StencilOp ValueType
;
4789 static const CommandId kCmdId
= kStencilOp
;
4790 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4791 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4793 static uint32_t ComputeSize() {
4794 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4797 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4799 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4806 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4807 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
4808 return NextCmdAddress
<ValueType
>(cmd
);
4811 gpu::CommandHeader header
;
4817 COMPILE_ASSERT(sizeof(StencilOp
) == 16, Sizeof_StencilOp_is_not_16
);
4818 COMPILE_ASSERT(offsetof(StencilOp
, header
) == 0,
4819 OffsetOf_StencilOp_header_not_0
);
4820 COMPILE_ASSERT(offsetof(StencilOp
, fail
) == 4, OffsetOf_StencilOp_fail_not_4
);
4821 COMPILE_ASSERT(offsetof(StencilOp
, zfail
) == 8, OffsetOf_StencilOp_zfail_not_8
);
4822 COMPILE_ASSERT(offsetof(StencilOp
, zpass
) == 12,
4823 OffsetOf_StencilOp_zpass_not_12
);
4825 struct StencilOpSeparate
{
4826 typedef StencilOpSeparate ValueType
;
4827 static const CommandId kCmdId
= kStencilOpSeparate
;
4828 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4829 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4831 static uint32_t ComputeSize() {
4832 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4835 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4837 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4845 void* Set(void* cmd
,
4850 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
4851 return NextCmdAddress
<ValueType
>(cmd
);
4854 gpu::CommandHeader header
;
4861 COMPILE_ASSERT(sizeof(StencilOpSeparate
) == 20,
4862 Sizeof_StencilOpSeparate_is_not_20
);
4863 COMPILE_ASSERT(offsetof(StencilOpSeparate
, header
) == 0,
4864 OffsetOf_StencilOpSeparate_header_not_0
);
4865 COMPILE_ASSERT(offsetof(StencilOpSeparate
, face
) == 4,
4866 OffsetOf_StencilOpSeparate_face_not_4
);
4867 COMPILE_ASSERT(offsetof(StencilOpSeparate
, fail
) == 8,
4868 OffsetOf_StencilOpSeparate_fail_not_8
);
4869 COMPILE_ASSERT(offsetof(StencilOpSeparate
, zfail
) == 12,
4870 OffsetOf_StencilOpSeparate_zfail_not_12
);
4871 COMPILE_ASSERT(offsetof(StencilOpSeparate
, zpass
) == 16,
4872 OffsetOf_StencilOpSeparate_zpass_not_16
);
4875 typedef TexImage2D ValueType
;
4876 static const CommandId kCmdId
= kTexImage2D
;
4877 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4878 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4880 static uint32_t ComputeSize() {
4881 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4884 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4886 void Init(GLenum _target
,
4888 GLint _internalformat
,
4893 uint32_t _pixels_shm_id
,
4894 uint32_t _pixels_shm_offset
) {
4898 internalformat
= _internalformat
;
4903 pixels_shm_id
= _pixels_shm_id
;
4904 pixels_shm_offset
= _pixels_shm_offset
;
4907 void* Set(void* cmd
,
4910 GLint _internalformat
,
4915 uint32_t _pixels_shm_id
,
4916 uint32_t _pixels_shm_offset
) {
4917 static_cast<ValueType
*>(cmd
)->Init(_target
,
4925 _pixels_shm_offset
);
4926 return NextCmdAddress
<ValueType
>(cmd
);
4929 gpu::CommandHeader header
;
4932 int32_t internalformat
;
4937 uint32_t pixels_shm_id
;
4938 uint32_t pixels_shm_offset
;
4939 static const int32_t border
= 0;
4942 COMPILE_ASSERT(sizeof(TexImage2D
) == 40, Sizeof_TexImage2D_is_not_40
);
4943 COMPILE_ASSERT(offsetof(TexImage2D
, header
) == 0,
4944 OffsetOf_TexImage2D_header_not_0
);
4945 COMPILE_ASSERT(offsetof(TexImage2D
, target
) == 4,
4946 OffsetOf_TexImage2D_target_not_4
);
4947 COMPILE_ASSERT(offsetof(TexImage2D
, level
) == 8,
4948 OffsetOf_TexImage2D_level_not_8
);
4949 COMPILE_ASSERT(offsetof(TexImage2D
, internalformat
) == 12,
4950 OffsetOf_TexImage2D_internalformat_not_12
);
4951 COMPILE_ASSERT(offsetof(TexImage2D
, width
) == 16,
4952 OffsetOf_TexImage2D_width_not_16
);
4953 COMPILE_ASSERT(offsetof(TexImage2D
, height
) == 20,
4954 OffsetOf_TexImage2D_height_not_20
);
4955 COMPILE_ASSERT(offsetof(TexImage2D
, format
) == 24,
4956 OffsetOf_TexImage2D_format_not_24
);
4957 COMPILE_ASSERT(offsetof(TexImage2D
, type
) == 28,
4958 OffsetOf_TexImage2D_type_not_28
);
4959 COMPILE_ASSERT(offsetof(TexImage2D
, pixels_shm_id
) == 32,
4960 OffsetOf_TexImage2D_pixels_shm_id_not_32
);
4961 COMPILE_ASSERT(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
4962 OffsetOf_TexImage2D_pixels_shm_offset_not_36
);
4964 struct TexParameterf
{
4965 typedef TexParameterf ValueType
;
4966 static const CommandId kCmdId
= kTexParameterf
;
4967 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4968 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4970 static uint32_t ComputeSize() {
4971 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4974 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4976 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
4983 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
4984 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
4985 return NextCmdAddress
<ValueType
>(cmd
);
4988 gpu::CommandHeader header
;
4994 COMPILE_ASSERT(sizeof(TexParameterf
) == 16, Sizeof_TexParameterf_is_not_16
);
4995 COMPILE_ASSERT(offsetof(TexParameterf
, header
) == 0,
4996 OffsetOf_TexParameterf_header_not_0
);
4997 COMPILE_ASSERT(offsetof(TexParameterf
, target
) == 4,
4998 OffsetOf_TexParameterf_target_not_4
);
4999 COMPILE_ASSERT(offsetof(TexParameterf
, pname
) == 8,
5000 OffsetOf_TexParameterf_pname_not_8
);
5001 COMPILE_ASSERT(offsetof(TexParameterf
, param
) == 12,
5002 OffsetOf_TexParameterf_param_not_12
);
5004 struct TexParameterfvImmediate
{
5005 typedef TexParameterfvImmediate ValueType
;
5006 static const CommandId kCmdId
= kTexParameterfvImmediate
;
5007 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5008 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5010 static uint32_t ComputeDataSize() {
5011 return static_cast<uint32_t>(sizeof(GLfloat
) * 1); // NOLINT
5014 static uint32_t ComputeSize() {
5015 return static_cast<uint32_t>(sizeof(ValueType
) +
5016 ComputeDataSize()); // NOLINT
5019 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
5021 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
5025 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
5028 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
5029 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
5030 const uint32_t size
= ComputeSize();
5031 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5034 gpu::CommandHeader header
;
5039 COMPILE_ASSERT(sizeof(TexParameterfvImmediate
) == 12,
5040 Sizeof_TexParameterfvImmediate_is_not_12
);
5041 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, header
) == 0,
5042 OffsetOf_TexParameterfvImmediate_header_not_0
);
5043 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, target
) == 4,
5044 OffsetOf_TexParameterfvImmediate_target_not_4
);
5045 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, pname
) == 8,
5046 OffsetOf_TexParameterfvImmediate_pname_not_8
);
5048 struct TexParameteri
{
5049 typedef TexParameteri ValueType
;
5050 static const CommandId kCmdId
= kTexParameteri
;
5051 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5052 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5054 static uint32_t ComputeSize() {
5055 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5058 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5060 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
5067 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
5068 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
5069 return NextCmdAddress
<ValueType
>(cmd
);
5072 gpu::CommandHeader header
;
5078 COMPILE_ASSERT(sizeof(TexParameteri
) == 16, Sizeof_TexParameteri_is_not_16
);
5079 COMPILE_ASSERT(offsetof(TexParameteri
, header
) == 0,
5080 OffsetOf_TexParameteri_header_not_0
);
5081 COMPILE_ASSERT(offsetof(TexParameteri
, target
) == 4,
5082 OffsetOf_TexParameteri_target_not_4
);
5083 COMPILE_ASSERT(offsetof(TexParameteri
, pname
) == 8,
5084 OffsetOf_TexParameteri_pname_not_8
);
5085 COMPILE_ASSERT(offsetof(TexParameteri
, param
) == 12,
5086 OffsetOf_TexParameteri_param_not_12
);
5088 struct TexParameterivImmediate
{
5089 typedef TexParameterivImmediate ValueType
;
5090 static const CommandId kCmdId
= kTexParameterivImmediate
;
5091 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5092 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5094 static uint32_t ComputeDataSize() {
5095 return static_cast<uint32_t>(sizeof(GLint
) * 1); // NOLINT
5098 static uint32_t ComputeSize() {
5099 return static_cast<uint32_t>(sizeof(ValueType
) +
5100 ComputeDataSize()); // NOLINT
5103 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
5105 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
5109 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
5112 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
5113 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
5114 const uint32_t size
= ComputeSize();
5115 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5118 gpu::CommandHeader header
;
5123 COMPILE_ASSERT(sizeof(TexParameterivImmediate
) == 12,
5124 Sizeof_TexParameterivImmediate_is_not_12
);
5125 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, header
) == 0,
5126 OffsetOf_TexParameterivImmediate_header_not_0
);
5127 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, target
) == 4,
5128 OffsetOf_TexParameterivImmediate_target_not_4
);
5129 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, pname
) == 8,
5130 OffsetOf_TexParameterivImmediate_pname_not_8
);
5132 struct TexSubImage2D
{
5133 typedef TexSubImage2D ValueType
;
5134 static const CommandId kCmdId
= kTexSubImage2D
;
5135 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5136 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5138 static uint32_t ComputeSize() {
5139 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5142 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5144 void Init(GLenum _target
,
5152 uint32_t _pixels_shm_id
,
5153 uint32_t _pixels_shm_offset
,
5154 GLboolean _internal
) {
5164 pixels_shm_id
= _pixels_shm_id
;
5165 pixels_shm_offset
= _pixels_shm_offset
;
5166 internal
= _internal
;
5169 void* Set(void* cmd
,
5178 uint32_t _pixels_shm_id
,
5179 uint32_t _pixels_shm_offset
,
5180 GLboolean _internal
) {
5181 static_cast<ValueType
*>(cmd
)->Init(_target
,
5192 return NextCmdAddress
<ValueType
>(cmd
);
5195 gpu::CommandHeader header
;
5204 uint32_t pixels_shm_id
;
5205 uint32_t pixels_shm_offset
;
5209 COMPILE_ASSERT(sizeof(TexSubImage2D
) == 48, Sizeof_TexSubImage2D_is_not_48
);
5210 COMPILE_ASSERT(offsetof(TexSubImage2D
, header
) == 0,
5211 OffsetOf_TexSubImage2D_header_not_0
);
5212 COMPILE_ASSERT(offsetof(TexSubImage2D
, target
) == 4,
5213 OffsetOf_TexSubImage2D_target_not_4
);
5214 COMPILE_ASSERT(offsetof(TexSubImage2D
, level
) == 8,
5215 OffsetOf_TexSubImage2D_level_not_8
);
5216 COMPILE_ASSERT(offsetof(TexSubImage2D
, xoffset
) == 12,
5217 OffsetOf_TexSubImage2D_xoffset_not_12
);
5218 COMPILE_ASSERT(offsetof(TexSubImage2D
, yoffset
) == 16,
5219 OffsetOf_TexSubImage2D_yoffset_not_16
);
5220 COMPILE_ASSERT(offsetof(TexSubImage2D
, width
) == 20,
5221 OffsetOf_TexSubImage2D_width_not_20
);
5222 COMPILE_ASSERT(offsetof(TexSubImage2D
, height
) == 24,
5223 OffsetOf_TexSubImage2D_height_not_24
);
5224 COMPILE_ASSERT(offsetof(TexSubImage2D
, format
) == 28,
5225 OffsetOf_TexSubImage2D_format_not_28
);
5226 COMPILE_ASSERT(offsetof(TexSubImage2D
, type
) == 32,
5227 OffsetOf_TexSubImage2D_type_not_32
);
5228 COMPILE_ASSERT(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
5229 OffsetOf_TexSubImage2D_pixels_shm_id_not_36
);
5230 COMPILE_ASSERT(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
5231 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40
);
5232 COMPILE_ASSERT(offsetof(TexSubImage2D
, internal
) == 44,
5233 OffsetOf_TexSubImage2D_internal_not_44
);
5236 typedef Uniform1f ValueType
;
5237 static const CommandId kCmdId
= kUniform1f
;
5238 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5239 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5241 static uint32_t ComputeSize() {
5242 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5245 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5247 void Init(GLint _location
, GLfloat _x
) {
5249 location
= _location
;
5253 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
5254 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
5255 return NextCmdAddress
<ValueType
>(cmd
);
5258 gpu::CommandHeader header
;
5263 COMPILE_ASSERT(sizeof(Uniform1f
) == 12, Sizeof_Uniform1f_is_not_12
);
5264 COMPILE_ASSERT(offsetof(Uniform1f
, header
) == 0,
5265 OffsetOf_Uniform1f_header_not_0
);
5266 COMPILE_ASSERT(offsetof(Uniform1f
, location
) == 4,
5267 OffsetOf_Uniform1f_location_not_4
);
5268 COMPILE_ASSERT(offsetof(Uniform1f
, x
) == 8, OffsetOf_Uniform1f_x_not_8
);
5270 struct Uniform1fvImmediate
{
5271 typedef Uniform1fvImmediate ValueType
;
5272 static const CommandId kCmdId
= kUniform1fvImmediate
;
5273 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5274 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5276 static uint32_t ComputeDataSize(GLsizei count
) {
5277 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
5280 static uint32_t ComputeSize(GLsizei count
) {
5281 return static_cast<uint32_t>(sizeof(ValueType
) +
5282 ComputeDataSize(count
)); // NOLINT
5285 void SetHeader(GLsizei count
) {
5286 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5289 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5291 location
= _location
;
5293 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5296 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5297 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5298 const uint32_t size
= ComputeSize(_count
);
5299 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5302 gpu::CommandHeader header
;
5307 COMPILE_ASSERT(sizeof(Uniform1fvImmediate
) == 12,
5308 Sizeof_Uniform1fvImmediate_is_not_12
);
5309 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, header
) == 0,
5310 OffsetOf_Uniform1fvImmediate_header_not_0
);
5311 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, location
) == 4,
5312 OffsetOf_Uniform1fvImmediate_location_not_4
);
5313 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, count
) == 8,
5314 OffsetOf_Uniform1fvImmediate_count_not_8
);
5317 typedef Uniform1i ValueType
;
5318 static const CommandId kCmdId
= kUniform1i
;
5319 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5320 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5322 static uint32_t ComputeSize() {
5323 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5326 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5328 void Init(GLint _location
, GLint _x
) {
5330 location
= _location
;
5334 void* Set(void* cmd
, GLint _location
, GLint _x
) {
5335 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
5336 return NextCmdAddress
<ValueType
>(cmd
);
5339 gpu::CommandHeader header
;
5344 COMPILE_ASSERT(sizeof(Uniform1i
) == 12, Sizeof_Uniform1i_is_not_12
);
5345 COMPILE_ASSERT(offsetof(Uniform1i
, header
) == 0,
5346 OffsetOf_Uniform1i_header_not_0
);
5347 COMPILE_ASSERT(offsetof(Uniform1i
, location
) == 4,
5348 OffsetOf_Uniform1i_location_not_4
);
5349 COMPILE_ASSERT(offsetof(Uniform1i
, x
) == 8, OffsetOf_Uniform1i_x_not_8
);
5351 struct Uniform1ivImmediate
{
5352 typedef Uniform1ivImmediate ValueType
;
5353 static const CommandId kCmdId
= kUniform1ivImmediate
;
5354 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5355 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5357 static uint32_t ComputeDataSize(GLsizei count
) {
5358 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
5361 static uint32_t ComputeSize(GLsizei count
) {
5362 return static_cast<uint32_t>(sizeof(ValueType
) +
5363 ComputeDataSize(count
)); // NOLINT
5366 void SetHeader(GLsizei count
) {
5367 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5370 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5372 location
= _location
;
5374 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5377 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5378 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5379 const uint32_t size
= ComputeSize(_count
);
5380 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5383 gpu::CommandHeader header
;
5388 COMPILE_ASSERT(sizeof(Uniform1ivImmediate
) == 12,
5389 Sizeof_Uniform1ivImmediate_is_not_12
);
5390 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, header
) == 0,
5391 OffsetOf_Uniform1ivImmediate_header_not_0
);
5392 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, location
) == 4,
5393 OffsetOf_Uniform1ivImmediate_location_not_4
);
5394 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, count
) == 8,
5395 OffsetOf_Uniform1ivImmediate_count_not_8
);
5398 typedef Uniform2f ValueType
;
5399 static const CommandId kCmdId
= kUniform2f
;
5400 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5401 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5403 static uint32_t ComputeSize() {
5404 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5407 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5409 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
5411 location
= _location
;
5416 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
5417 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
5418 return NextCmdAddress
<ValueType
>(cmd
);
5421 gpu::CommandHeader header
;
5427 COMPILE_ASSERT(sizeof(Uniform2f
) == 16, Sizeof_Uniform2f_is_not_16
);
5428 COMPILE_ASSERT(offsetof(Uniform2f
, header
) == 0,
5429 OffsetOf_Uniform2f_header_not_0
);
5430 COMPILE_ASSERT(offsetof(Uniform2f
, location
) == 4,
5431 OffsetOf_Uniform2f_location_not_4
);
5432 COMPILE_ASSERT(offsetof(Uniform2f
, x
) == 8, OffsetOf_Uniform2f_x_not_8
);
5433 COMPILE_ASSERT(offsetof(Uniform2f
, y
) == 12, OffsetOf_Uniform2f_y_not_12
);
5435 struct Uniform2fvImmediate
{
5436 typedef Uniform2fvImmediate ValueType
;
5437 static const CommandId kCmdId
= kUniform2fvImmediate
;
5438 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5439 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5441 static uint32_t ComputeDataSize(GLsizei count
) {
5442 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
5445 static uint32_t ComputeSize(GLsizei count
) {
5446 return static_cast<uint32_t>(sizeof(ValueType
) +
5447 ComputeDataSize(count
)); // NOLINT
5450 void SetHeader(GLsizei count
) {
5451 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5454 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5456 location
= _location
;
5458 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5461 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5462 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5463 const uint32_t size
= ComputeSize(_count
);
5464 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5467 gpu::CommandHeader header
;
5472 COMPILE_ASSERT(sizeof(Uniform2fvImmediate
) == 12,
5473 Sizeof_Uniform2fvImmediate_is_not_12
);
5474 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, header
) == 0,
5475 OffsetOf_Uniform2fvImmediate_header_not_0
);
5476 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, location
) == 4,
5477 OffsetOf_Uniform2fvImmediate_location_not_4
);
5478 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, count
) == 8,
5479 OffsetOf_Uniform2fvImmediate_count_not_8
);
5482 typedef Uniform2i ValueType
;
5483 static const CommandId kCmdId
= kUniform2i
;
5484 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5485 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5487 static uint32_t ComputeSize() {
5488 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5491 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5493 void Init(GLint _location
, GLint _x
, GLint _y
) {
5495 location
= _location
;
5500 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
5501 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
5502 return NextCmdAddress
<ValueType
>(cmd
);
5505 gpu::CommandHeader header
;
5511 COMPILE_ASSERT(sizeof(Uniform2i
) == 16, Sizeof_Uniform2i_is_not_16
);
5512 COMPILE_ASSERT(offsetof(Uniform2i
, header
) == 0,
5513 OffsetOf_Uniform2i_header_not_0
);
5514 COMPILE_ASSERT(offsetof(Uniform2i
, location
) == 4,
5515 OffsetOf_Uniform2i_location_not_4
);
5516 COMPILE_ASSERT(offsetof(Uniform2i
, x
) == 8, OffsetOf_Uniform2i_x_not_8
);
5517 COMPILE_ASSERT(offsetof(Uniform2i
, y
) == 12, OffsetOf_Uniform2i_y_not_12
);
5519 struct Uniform2ivImmediate
{
5520 typedef Uniform2ivImmediate ValueType
;
5521 static const CommandId kCmdId
= kUniform2ivImmediate
;
5522 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5523 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5525 static uint32_t ComputeDataSize(GLsizei count
) {
5526 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
5529 static uint32_t ComputeSize(GLsizei count
) {
5530 return static_cast<uint32_t>(sizeof(ValueType
) +
5531 ComputeDataSize(count
)); // NOLINT
5534 void SetHeader(GLsizei count
) {
5535 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5538 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5540 location
= _location
;
5542 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5545 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5546 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5547 const uint32_t size
= ComputeSize(_count
);
5548 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5551 gpu::CommandHeader header
;
5556 COMPILE_ASSERT(sizeof(Uniform2ivImmediate
) == 12,
5557 Sizeof_Uniform2ivImmediate_is_not_12
);
5558 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, header
) == 0,
5559 OffsetOf_Uniform2ivImmediate_header_not_0
);
5560 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, location
) == 4,
5561 OffsetOf_Uniform2ivImmediate_location_not_4
);
5562 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, count
) == 8,
5563 OffsetOf_Uniform2ivImmediate_count_not_8
);
5566 typedef Uniform3f ValueType
;
5567 static const CommandId kCmdId
= kUniform3f
;
5568 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5569 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5571 static uint32_t ComputeSize() {
5572 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5575 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5577 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
5579 location
= _location
;
5585 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
5586 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
5587 return NextCmdAddress
<ValueType
>(cmd
);
5590 gpu::CommandHeader header
;
5597 COMPILE_ASSERT(sizeof(Uniform3f
) == 20, Sizeof_Uniform3f_is_not_20
);
5598 COMPILE_ASSERT(offsetof(Uniform3f
, header
) == 0,
5599 OffsetOf_Uniform3f_header_not_0
);
5600 COMPILE_ASSERT(offsetof(Uniform3f
, location
) == 4,
5601 OffsetOf_Uniform3f_location_not_4
);
5602 COMPILE_ASSERT(offsetof(Uniform3f
, x
) == 8, OffsetOf_Uniform3f_x_not_8
);
5603 COMPILE_ASSERT(offsetof(Uniform3f
, y
) == 12, OffsetOf_Uniform3f_y_not_12
);
5604 COMPILE_ASSERT(offsetof(Uniform3f
, z
) == 16, OffsetOf_Uniform3f_z_not_16
);
5606 struct Uniform3fvImmediate
{
5607 typedef Uniform3fvImmediate ValueType
;
5608 static const CommandId kCmdId
= kUniform3fvImmediate
;
5609 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5610 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5612 static uint32_t ComputeDataSize(GLsizei count
) {
5613 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
5616 static uint32_t ComputeSize(GLsizei count
) {
5617 return static_cast<uint32_t>(sizeof(ValueType
) +
5618 ComputeDataSize(count
)); // NOLINT
5621 void SetHeader(GLsizei count
) {
5622 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5625 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5627 location
= _location
;
5629 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5632 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5633 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5634 const uint32_t size
= ComputeSize(_count
);
5635 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5638 gpu::CommandHeader header
;
5643 COMPILE_ASSERT(sizeof(Uniform3fvImmediate
) == 12,
5644 Sizeof_Uniform3fvImmediate_is_not_12
);
5645 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, header
) == 0,
5646 OffsetOf_Uniform3fvImmediate_header_not_0
);
5647 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, location
) == 4,
5648 OffsetOf_Uniform3fvImmediate_location_not_4
);
5649 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, count
) == 8,
5650 OffsetOf_Uniform3fvImmediate_count_not_8
);
5653 typedef Uniform3i ValueType
;
5654 static const CommandId kCmdId
= kUniform3i
;
5655 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5656 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5658 static uint32_t ComputeSize() {
5659 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5662 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5664 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
5666 location
= _location
;
5672 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
5673 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
5674 return NextCmdAddress
<ValueType
>(cmd
);
5677 gpu::CommandHeader header
;
5684 COMPILE_ASSERT(sizeof(Uniform3i
) == 20, Sizeof_Uniform3i_is_not_20
);
5685 COMPILE_ASSERT(offsetof(Uniform3i
, header
) == 0,
5686 OffsetOf_Uniform3i_header_not_0
);
5687 COMPILE_ASSERT(offsetof(Uniform3i
, location
) == 4,
5688 OffsetOf_Uniform3i_location_not_4
);
5689 COMPILE_ASSERT(offsetof(Uniform3i
, x
) == 8, OffsetOf_Uniform3i_x_not_8
);
5690 COMPILE_ASSERT(offsetof(Uniform3i
, y
) == 12, OffsetOf_Uniform3i_y_not_12
);
5691 COMPILE_ASSERT(offsetof(Uniform3i
, z
) == 16, OffsetOf_Uniform3i_z_not_16
);
5693 struct Uniform3ivImmediate
{
5694 typedef Uniform3ivImmediate ValueType
;
5695 static const CommandId kCmdId
= kUniform3ivImmediate
;
5696 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5697 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5699 static uint32_t ComputeDataSize(GLsizei count
) {
5700 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
5703 static uint32_t ComputeSize(GLsizei count
) {
5704 return static_cast<uint32_t>(sizeof(ValueType
) +
5705 ComputeDataSize(count
)); // NOLINT
5708 void SetHeader(GLsizei count
) {
5709 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5712 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5714 location
= _location
;
5716 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5719 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5720 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5721 const uint32_t size
= ComputeSize(_count
);
5722 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5725 gpu::CommandHeader header
;
5730 COMPILE_ASSERT(sizeof(Uniform3ivImmediate
) == 12,
5731 Sizeof_Uniform3ivImmediate_is_not_12
);
5732 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, header
) == 0,
5733 OffsetOf_Uniform3ivImmediate_header_not_0
);
5734 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, location
) == 4,
5735 OffsetOf_Uniform3ivImmediate_location_not_4
);
5736 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, count
) == 8,
5737 OffsetOf_Uniform3ivImmediate_count_not_8
);
5740 typedef Uniform4f ValueType
;
5741 static const CommandId kCmdId
= kUniform4f
;
5742 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5743 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5745 static uint32_t ComputeSize() {
5746 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5749 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5751 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
5753 location
= _location
;
5760 void* Set(void* cmd
,
5766 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
5767 return NextCmdAddress
<ValueType
>(cmd
);
5770 gpu::CommandHeader header
;
5778 COMPILE_ASSERT(sizeof(Uniform4f
) == 24, Sizeof_Uniform4f_is_not_24
);
5779 COMPILE_ASSERT(offsetof(Uniform4f
, header
) == 0,
5780 OffsetOf_Uniform4f_header_not_0
);
5781 COMPILE_ASSERT(offsetof(Uniform4f
, location
) == 4,
5782 OffsetOf_Uniform4f_location_not_4
);
5783 COMPILE_ASSERT(offsetof(Uniform4f
, x
) == 8, OffsetOf_Uniform4f_x_not_8
);
5784 COMPILE_ASSERT(offsetof(Uniform4f
, y
) == 12, OffsetOf_Uniform4f_y_not_12
);
5785 COMPILE_ASSERT(offsetof(Uniform4f
, z
) == 16, OffsetOf_Uniform4f_z_not_16
);
5786 COMPILE_ASSERT(offsetof(Uniform4f
, w
) == 20, OffsetOf_Uniform4f_w_not_20
);
5788 struct Uniform4fvImmediate
{
5789 typedef Uniform4fvImmediate ValueType
;
5790 static const CommandId kCmdId
= kUniform4fvImmediate
;
5791 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5792 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5794 static uint32_t ComputeDataSize(GLsizei count
) {
5795 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
5798 static uint32_t ComputeSize(GLsizei count
) {
5799 return static_cast<uint32_t>(sizeof(ValueType
) +
5800 ComputeDataSize(count
)); // NOLINT
5803 void SetHeader(GLsizei count
) {
5804 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5807 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5809 location
= _location
;
5811 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5814 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5815 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5816 const uint32_t size
= ComputeSize(_count
);
5817 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5820 gpu::CommandHeader header
;
5825 COMPILE_ASSERT(sizeof(Uniform4fvImmediate
) == 12,
5826 Sizeof_Uniform4fvImmediate_is_not_12
);
5827 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, header
) == 0,
5828 OffsetOf_Uniform4fvImmediate_header_not_0
);
5829 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, location
) == 4,
5830 OffsetOf_Uniform4fvImmediate_location_not_4
);
5831 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, count
) == 8,
5832 OffsetOf_Uniform4fvImmediate_count_not_8
);
5835 typedef Uniform4i ValueType
;
5836 static const CommandId kCmdId
= kUniform4i
;
5837 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5838 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5840 static uint32_t ComputeSize() {
5841 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5844 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5846 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
5848 location
= _location
;
5855 void* Set(void* cmd
,
5861 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
5862 return NextCmdAddress
<ValueType
>(cmd
);
5865 gpu::CommandHeader header
;
5873 COMPILE_ASSERT(sizeof(Uniform4i
) == 24, Sizeof_Uniform4i_is_not_24
);
5874 COMPILE_ASSERT(offsetof(Uniform4i
, header
) == 0,
5875 OffsetOf_Uniform4i_header_not_0
);
5876 COMPILE_ASSERT(offsetof(Uniform4i
, location
) == 4,
5877 OffsetOf_Uniform4i_location_not_4
);
5878 COMPILE_ASSERT(offsetof(Uniform4i
, x
) == 8, OffsetOf_Uniform4i_x_not_8
);
5879 COMPILE_ASSERT(offsetof(Uniform4i
, y
) == 12, OffsetOf_Uniform4i_y_not_12
);
5880 COMPILE_ASSERT(offsetof(Uniform4i
, z
) == 16, OffsetOf_Uniform4i_z_not_16
);
5881 COMPILE_ASSERT(offsetof(Uniform4i
, w
) == 20, OffsetOf_Uniform4i_w_not_20
);
5883 struct Uniform4ivImmediate
{
5884 typedef Uniform4ivImmediate ValueType
;
5885 static const CommandId kCmdId
= kUniform4ivImmediate
;
5886 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5887 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5889 static uint32_t ComputeDataSize(GLsizei count
) {
5890 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
5893 static uint32_t ComputeSize(GLsizei count
) {
5894 return static_cast<uint32_t>(sizeof(ValueType
) +
5895 ComputeDataSize(count
)); // NOLINT
5898 void SetHeader(GLsizei count
) {
5899 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5902 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5904 location
= _location
;
5906 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5909 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5910 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5911 const uint32_t size
= ComputeSize(_count
);
5912 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5915 gpu::CommandHeader header
;
5920 COMPILE_ASSERT(sizeof(Uniform4ivImmediate
) == 12,
5921 Sizeof_Uniform4ivImmediate_is_not_12
);
5922 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, header
) == 0,
5923 OffsetOf_Uniform4ivImmediate_header_not_0
);
5924 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, location
) == 4,
5925 OffsetOf_Uniform4ivImmediate_location_not_4
);
5926 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, count
) == 8,
5927 OffsetOf_Uniform4ivImmediate_count_not_8
);
5929 struct UniformMatrix2fvImmediate
{
5930 typedef UniformMatrix2fvImmediate ValueType
;
5931 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
5932 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5933 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5935 static uint32_t ComputeDataSize(GLsizei count
) {
5936 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
5939 static uint32_t ComputeSize(GLsizei count
) {
5940 return static_cast<uint32_t>(sizeof(ValueType
) +
5941 ComputeDataSize(count
)); // NOLINT
5944 void SetHeader(GLsizei count
) {
5945 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5948 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5950 location
= _location
;
5952 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
5955 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5956 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
5957 const uint32_t size
= ComputeSize(_count
);
5958 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5961 gpu::CommandHeader header
;
5964 static const uint32_t transpose
= false;
5967 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate
) == 12,
5968 Sizeof_UniformMatrix2fvImmediate_is_not_12
);
5969 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
5970 OffsetOf_UniformMatrix2fvImmediate_header_not_0
);
5971 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
5972 OffsetOf_UniformMatrix2fvImmediate_location_not_4
);
5973 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
5974 OffsetOf_UniformMatrix2fvImmediate_count_not_8
);
5976 struct UniformMatrix3fvImmediate
{
5977 typedef UniformMatrix3fvImmediate ValueType
;
5978 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
5979 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5980 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5982 static uint32_t ComputeDataSize(GLsizei count
) {
5983 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
5986 static uint32_t ComputeSize(GLsizei count
) {
5987 return static_cast<uint32_t>(sizeof(ValueType
) +
5988 ComputeDataSize(count
)); // NOLINT
5991 void SetHeader(GLsizei count
) {
5992 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5995 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5997 location
= _location
;
5999 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
6002 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
6003 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
6004 const uint32_t size
= ComputeSize(_count
);
6005 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6008 gpu::CommandHeader header
;
6011 static const uint32_t transpose
= false;
6014 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate
) == 12,
6015 Sizeof_UniformMatrix3fvImmediate_is_not_12
);
6016 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
6017 OffsetOf_UniformMatrix3fvImmediate_header_not_0
);
6018 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
6019 OffsetOf_UniformMatrix3fvImmediate_location_not_4
);
6020 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
6021 OffsetOf_UniformMatrix3fvImmediate_count_not_8
);
6023 struct UniformMatrix4fvImmediate
{
6024 typedef UniformMatrix4fvImmediate ValueType
;
6025 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
6026 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6027 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6029 static uint32_t ComputeDataSize(GLsizei count
) {
6030 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
6033 static uint32_t ComputeSize(GLsizei count
) {
6034 return static_cast<uint32_t>(sizeof(ValueType
) +
6035 ComputeDataSize(count
)); // NOLINT
6038 void SetHeader(GLsizei count
) {
6039 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
6042 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
6044 location
= _location
;
6046 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
6049 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
6050 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
6051 const uint32_t size
= ComputeSize(_count
);
6052 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6055 gpu::CommandHeader header
;
6058 static const uint32_t transpose
= false;
6061 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate
) == 12,
6062 Sizeof_UniformMatrix4fvImmediate_is_not_12
);
6063 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
6064 OffsetOf_UniformMatrix4fvImmediate_header_not_0
);
6065 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
6066 OffsetOf_UniformMatrix4fvImmediate_location_not_4
);
6067 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
6068 OffsetOf_UniformMatrix4fvImmediate_count_not_8
);
6071 typedef UseProgram ValueType
;
6072 static const CommandId kCmdId
= kUseProgram
;
6073 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6074 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6076 static uint32_t ComputeSize() {
6077 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6080 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6082 void Init(GLuint _program
) {
6087 void* Set(void* cmd
, GLuint _program
) {
6088 static_cast<ValueType
*>(cmd
)->Init(_program
);
6089 return NextCmdAddress
<ValueType
>(cmd
);
6092 gpu::CommandHeader header
;
6096 COMPILE_ASSERT(sizeof(UseProgram
) == 8, Sizeof_UseProgram_is_not_8
);
6097 COMPILE_ASSERT(offsetof(UseProgram
, header
) == 0,
6098 OffsetOf_UseProgram_header_not_0
);
6099 COMPILE_ASSERT(offsetof(UseProgram
, program
) == 4,
6100 OffsetOf_UseProgram_program_not_4
);
6102 struct ValidateProgram
{
6103 typedef ValidateProgram ValueType
;
6104 static const CommandId kCmdId
= kValidateProgram
;
6105 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6106 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6108 static uint32_t ComputeSize() {
6109 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6112 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6114 void Init(GLuint _program
) {
6119 void* Set(void* cmd
, GLuint _program
) {
6120 static_cast<ValueType
*>(cmd
)->Init(_program
);
6121 return NextCmdAddress
<ValueType
>(cmd
);
6124 gpu::CommandHeader header
;
6128 COMPILE_ASSERT(sizeof(ValidateProgram
) == 8, Sizeof_ValidateProgram_is_not_8
);
6129 COMPILE_ASSERT(offsetof(ValidateProgram
, header
) == 0,
6130 OffsetOf_ValidateProgram_header_not_0
);
6131 COMPILE_ASSERT(offsetof(ValidateProgram
, program
) == 4,
6132 OffsetOf_ValidateProgram_program_not_4
);
6134 struct VertexAttrib1f
{
6135 typedef VertexAttrib1f ValueType
;
6136 static const CommandId kCmdId
= kVertexAttrib1f
;
6137 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6138 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6140 static uint32_t ComputeSize() {
6141 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6144 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6146 void Init(GLuint _indx
, GLfloat _x
) {
6152 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
6153 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
6154 return NextCmdAddress
<ValueType
>(cmd
);
6157 gpu::CommandHeader header
;
6162 COMPILE_ASSERT(sizeof(VertexAttrib1f
) == 12, Sizeof_VertexAttrib1f_is_not_12
);
6163 COMPILE_ASSERT(offsetof(VertexAttrib1f
, header
) == 0,
6164 OffsetOf_VertexAttrib1f_header_not_0
);
6165 COMPILE_ASSERT(offsetof(VertexAttrib1f
, indx
) == 4,
6166 OffsetOf_VertexAttrib1f_indx_not_4
);
6167 COMPILE_ASSERT(offsetof(VertexAttrib1f
, x
) == 8,
6168 OffsetOf_VertexAttrib1f_x_not_8
);
6170 struct VertexAttrib1fvImmediate
{
6171 typedef VertexAttrib1fvImmediate ValueType
;
6172 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
6173 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6174 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6176 static uint32_t ComputeDataSize() {
6177 return static_cast<uint32_t>(sizeof(GLfloat
) * 1); // NOLINT
6180 static uint32_t ComputeSize() {
6181 return static_cast<uint32_t>(sizeof(ValueType
) +
6182 ComputeDataSize()); // NOLINT
6185 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6187 void Init(GLuint _indx
, const GLfloat
* _values
) {
6190 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6193 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6194 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6195 const uint32_t size
= ComputeSize();
6196 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6199 gpu::CommandHeader header
;
6203 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate
) == 8,
6204 Sizeof_VertexAttrib1fvImmediate_is_not_8
);
6205 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
6206 OffsetOf_VertexAttrib1fvImmediate_header_not_0
);
6207 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
6208 OffsetOf_VertexAttrib1fvImmediate_indx_not_4
);
6210 struct VertexAttrib2f
{
6211 typedef VertexAttrib2f ValueType
;
6212 static const CommandId kCmdId
= kVertexAttrib2f
;
6213 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6214 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6216 static uint32_t ComputeSize() {
6217 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6220 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6222 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
6229 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
6230 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
6231 return NextCmdAddress
<ValueType
>(cmd
);
6234 gpu::CommandHeader header
;
6240 COMPILE_ASSERT(sizeof(VertexAttrib2f
) == 16, Sizeof_VertexAttrib2f_is_not_16
);
6241 COMPILE_ASSERT(offsetof(VertexAttrib2f
, header
) == 0,
6242 OffsetOf_VertexAttrib2f_header_not_0
);
6243 COMPILE_ASSERT(offsetof(VertexAttrib2f
, indx
) == 4,
6244 OffsetOf_VertexAttrib2f_indx_not_4
);
6245 COMPILE_ASSERT(offsetof(VertexAttrib2f
, x
) == 8,
6246 OffsetOf_VertexAttrib2f_x_not_8
);
6247 COMPILE_ASSERT(offsetof(VertexAttrib2f
, y
) == 12,
6248 OffsetOf_VertexAttrib2f_y_not_12
);
6250 struct VertexAttrib2fvImmediate
{
6251 typedef VertexAttrib2fvImmediate ValueType
;
6252 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
6253 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6254 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6256 static uint32_t ComputeDataSize() {
6257 return static_cast<uint32_t>(sizeof(GLfloat
) * 2); // NOLINT
6260 static uint32_t ComputeSize() {
6261 return static_cast<uint32_t>(sizeof(ValueType
) +
6262 ComputeDataSize()); // NOLINT
6265 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6267 void Init(GLuint _indx
, const GLfloat
* _values
) {
6270 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6273 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6274 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6275 const uint32_t size
= ComputeSize();
6276 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6279 gpu::CommandHeader header
;
6283 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate
) == 8,
6284 Sizeof_VertexAttrib2fvImmediate_is_not_8
);
6285 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
6286 OffsetOf_VertexAttrib2fvImmediate_header_not_0
);
6287 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
6288 OffsetOf_VertexAttrib2fvImmediate_indx_not_4
);
6290 struct VertexAttrib3f
{
6291 typedef VertexAttrib3f ValueType
;
6292 static const CommandId kCmdId
= kVertexAttrib3f
;
6293 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6294 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6296 static uint32_t ComputeSize() {
6297 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6300 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6302 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
6310 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
6311 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
6312 return NextCmdAddress
<ValueType
>(cmd
);
6315 gpu::CommandHeader header
;
6322 COMPILE_ASSERT(sizeof(VertexAttrib3f
) == 20, Sizeof_VertexAttrib3f_is_not_20
);
6323 COMPILE_ASSERT(offsetof(VertexAttrib3f
, header
) == 0,
6324 OffsetOf_VertexAttrib3f_header_not_0
);
6325 COMPILE_ASSERT(offsetof(VertexAttrib3f
, indx
) == 4,
6326 OffsetOf_VertexAttrib3f_indx_not_4
);
6327 COMPILE_ASSERT(offsetof(VertexAttrib3f
, x
) == 8,
6328 OffsetOf_VertexAttrib3f_x_not_8
);
6329 COMPILE_ASSERT(offsetof(VertexAttrib3f
, y
) == 12,
6330 OffsetOf_VertexAttrib3f_y_not_12
);
6331 COMPILE_ASSERT(offsetof(VertexAttrib3f
, z
) == 16,
6332 OffsetOf_VertexAttrib3f_z_not_16
);
6334 struct VertexAttrib3fvImmediate
{
6335 typedef VertexAttrib3fvImmediate ValueType
;
6336 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
6337 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6338 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6340 static uint32_t ComputeDataSize() {
6341 return static_cast<uint32_t>(sizeof(GLfloat
) * 3); // NOLINT
6344 static uint32_t ComputeSize() {
6345 return static_cast<uint32_t>(sizeof(ValueType
) +
6346 ComputeDataSize()); // NOLINT
6349 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6351 void Init(GLuint _indx
, const GLfloat
* _values
) {
6354 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6357 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6358 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6359 const uint32_t size
= ComputeSize();
6360 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6363 gpu::CommandHeader header
;
6367 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate
) == 8,
6368 Sizeof_VertexAttrib3fvImmediate_is_not_8
);
6369 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
6370 OffsetOf_VertexAttrib3fvImmediate_header_not_0
);
6371 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
6372 OffsetOf_VertexAttrib3fvImmediate_indx_not_4
);
6374 struct VertexAttrib4f
{
6375 typedef VertexAttrib4f ValueType
;
6376 static const CommandId kCmdId
= kVertexAttrib4f
;
6377 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6378 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6380 static uint32_t ComputeSize() {
6381 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6384 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6386 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
6395 void* Set(void* cmd
,
6401 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
6402 return NextCmdAddress
<ValueType
>(cmd
);
6405 gpu::CommandHeader header
;
6413 COMPILE_ASSERT(sizeof(VertexAttrib4f
) == 24, Sizeof_VertexAttrib4f_is_not_24
);
6414 COMPILE_ASSERT(offsetof(VertexAttrib4f
, header
) == 0,
6415 OffsetOf_VertexAttrib4f_header_not_0
);
6416 COMPILE_ASSERT(offsetof(VertexAttrib4f
, indx
) == 4,
6417 OffsetOf_VertexAttrib4f_indx_not_4
);
6418 COMPILE_ASSERT(offsetof(VertexAttrib4f
, x
) == 8,
6419 OffsetOf_VertexAttrib4f_x_not_8
);
6420 COMPILE_ASSERT(offsetof(VertexAttrib4f
, y
) == 12,
6421 OffsetOf_VertexAttrib4f_y_not_12
);
6422 COMPILE_ASSERT(offsetof(VertexAttrib4f
, z
) == 16,
6423 OffsetOf_VertexAttrib4f_z_not_16
);
6424 COMPILE_ASSERT(offsetof(VertexAttrib4f
, w
) == 20,
6425 OffsetOf_VertexAttrib4f_w_not_20
);
6427 struct VertexAttrib4fvImmediate
{
6428 typedef VertexAttrib4fvImmediate ValueType
;
6429 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
6430 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6431 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6433 static uint32_t ComputeDataSize() {
6434 return static_cast<uint32_t>(sizeof(GLfloat
) * 4); // NOLINT
6437 static uint32_t ComputeSize() {
6438 return static_cast<uint32_t>(sizeof(ValueType
) +
6439 ComputeDataSize()); // NOLINT
6442 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6444 void Init(GLuint _indx
, const GLfloat
* _values
) {
6447 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6450 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6451 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6452 const uint32_t size
= ComputeSize();
6453 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6456 gpu::CommandHeader header
;
6460 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate
) == 8,
6461 Sizeof_VertexAttrib4fvImmediate_is_not_8
);
6462 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
6463 OffsetOf_VertexAttrib4fvImmediate_header_not_0
);
6464 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
6465 OffsetOf_VertexAttrib4fvImmediate_indx_not_4
);
6467 struct VertexAttribPointer
{
6468 typedef VertexAttribPointer ValueType
;
6469 static const CommandId kCmdId
= kVertexAttribPointer
;
6470 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6471 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6473 static uint32_t ComputeSize() {
6474 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6477 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6479 void Init(GLuint _indx
,
6482 GLboolean _normalized
,
6489 normalized
= _normalized
;
6494 void* Set(void* cmd
,
6498 GLboolean _normalized
,
6501 static_cast<ValueType
*>(cmd
)
6502 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
6503 return NextCmdAddress
<ValueType
>(cmd
);
6506 gpu::CommandHeader header
;
6510 uint32_t normalized
;
6515 COMPILE_ASSERT(sizeof(VertexAttribPointer
) == 28,
6516 Sizeof_VertexAttribPointer_is_not_28
);
6517 COMPILE_ASSERT(offsetof(VertexAttribPointer
, header
) == 0,
6518 OffsetOf_VertexAttribPointer_header_not_0
);
6519 COMPILE_ASSERT(offsetof(VertexAttribPointer
, indx
) == 4,
6520 OffsetOf_VertexAttribPointer_indx_not_4
);
6521 COMPILE_ASSERT(offsetof(VertexAttribPointer
, size
) == 8,
6522 OffsetOf_VertexAttribPointer_size_not_8
);
6523 COMPILE_ASSERT(offsetof(VertexAttribPointer
, type
) == 12,
6524 OffsetOf_VertexAttribPointer_type_not_12
);
6525 COMPILE_ASSERT(offsetof(VertexAttribPointer
, normalized
) == 16,
6526 OffsetOf_VertexAttribPointer_normalized_not_16
);
6527 COMPILE_ASSERT(offsetof(VertexAttribPointer
, stride
) == 20,
6528 OffsetOf_VertexAttribPointer_stride_not_20
);
6529 COMPILE_ASSERT(offsetof(VertexAttribPointer
, offset
) == 24,
6530 OffsetOf_VertexAttribPointer_offset_not_24
);
6533 typedef Viewport ValueType
;
6534 static const CommandId kCmdId
= kViewport
;
6535 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6536 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6538 static uint32_t ComputeSize() {
6539 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6542 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6544 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6552 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6553 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
6554 return NextCmdAddress
<ValueType
>(cmd
);
6557 gpu::CommandHeader header
;
6564 COMPILE_ASSERT(sizeof(Viewport
) == 20, Sizeof_Viewport_is_not_20
);
6565 COMPILE_ASSERT(offsetof(Viewport
, header
) == 0, OffsetOf_Viewport_header_not_0
);
6566 COMPILE_ASSERT(offsetof(Viewport
, x
) == 4, OffsetOf_Viewport_x_not_4
);
6567 COMPILE_ASSERT(offsetof(Viewport
, y
) == 8, OffsetOf_Viewport_y_not_8
);
6568 COMPILE_ASSERT(offsetof(Viewport
, width
) == 12, OffsetOf_Viewport_width_not_12
);
6569 COMPILE_ASSERT(offsetof(Viewport
, height
) == 16,
6570 OffsetOf_Viewport_height_not_16
);
6572 struct BlitFramebufferCHROMIUM
{
6573 typedef BlitFramebufferCHROMIUM ValueType
;
6574 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
6575 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6576 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
6578 static uint32_t ComputeSize() {
6579 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6582 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6584 void Init(GLint _srcX0
,
6607 void* Set(void* cmd
,
6618 static_cast<ValueType
*>(cmd
)->Init(_srcX0
,
6628 return NextCmdAddress
<ValueType
>(cmd
);
6631 gpu::CommandHeader header
;
6644 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM
) == 44,
6645 Sizeof_BlitFramebufferCHROMIUM_is_not_44
);
6646 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
6647 OffsetOf_BlitFramebufferCHROMIUM_header_not_0
);
6648 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
6649 OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4
);
6650 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
6651 OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8
);
6652 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
6653 OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12
);
6654 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
6655 OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16
);
6656 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
6657 OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20
);
6658 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
6659 OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24
);
6660 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
6661 OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28
);
6662 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
6663 OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32
);
6664 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
6665 OffsetOf_BlitFramebufferCHROMIUM_mask_not_36
);
6666 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
6667 OffsetOf_BlitFramebufferCHROMIUM_filter_not_40
);
6669 // GL_CHROMIUM_framebuffer_multisample
6670 struct RenderbufferStorageMultisampleCHROMIUM
{
6671 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
6672 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
6673 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6674 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6676 static uint32_t ComputeSize() {
6677 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6680 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6682 void Init(GLenum _target
,
6684 GLenum _internalformat
,
6690 internalformat
= _internalformat
;
6695 void* Set(void* cmd
,
6698 GLenum _internalformat
,
6701 static_cast<ValueType
*>(cmd
)
6702 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
6703 return NextCmdAddress
<ValueType
>(cmd
);
6706 gpu::CommandHeader header
;
6709 uint32_t internalformat
;
6714 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
6715 Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24
);
6716 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
6717 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0
);
6718 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
6719 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4
);
6720 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
6721 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8
);
6723 offsetof(RenderbufferStorageMultisampleCHROMIUM
, internalformat
) == 12,
6724 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12
);
6725 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
6726 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16
);
6727 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
6728 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20
);
6730 // GL_EXT_multisampled_render_to_texture
6731 struct RenderbufferStorageMultisampleEXT
{
6732 typedef RenderbufferStorageMultisampleEXT ValueType
;
6733 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
6734 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6735 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6737 static uint32_t ComputeSize() {
6738 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6741 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6743 void Init(GLenum _target
,
6745 GLenum _internalformat
,
6751 internalformat
= _internalformat
;
6756 void* Set(void* cmd
,
6759 GLenum _internalformat
,
6762 static_cast<ValueType
*>(cmd
)
6763 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
6764 return NextCmdAddress
<ValueType
>(cmd
);
6767 gpu::CommandHeader header
;
6770 uint32_t internalformat
;
6775 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
6776 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24
);
6777 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
6778 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0
);
6779 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
6780 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4
);
6781 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
6782 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8
);
6784 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
6785 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12
);
6786 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
6787 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16
);
6788 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
6789 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20
);
6791 struct FramebufferTexture2DMultisampleEXT
{
6792 typedef FramebufferTexture2DMultisampleEXT ValueType
;
6793 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
6794 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6795 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
6797 static uint32_t ComputeSize() {
6798 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6801 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6803 void Init(GLenum _target
,
6810 attachment
= _attachment
;
6811 textarget
= _textarget
;
6816 void* Set(void* cmd
,
6822 static_cast<ValueType
*>(cmd
)
6823 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
6824 return NextCmdAddress
<ValueType
>(cmd
);
6827 gpu::CommandHeader header
;
6829 uint32_t attachment
;
6833 static const int32_t level
= 0;
6836 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
6837 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_24
);
6838 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
6839 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0
);
6840 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
6841 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4
);
6842 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
6843 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8
);
6844 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
6845 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12
);
6846 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
6847 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16
);
6848 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
6849 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_20
);
6851 struct TexStorage2DEXT
{
6852 typedef TexStorage2DEXT ValueType
;
6853 static const CommandId kCmdId
= kTexStorage2DEXT
;
6854 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6855 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6857 static uint32_t ComputeSize() {
6858 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6861 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6863 void Init(GLenum _target
,
6865 GLenum _internalFormat
,
6871 internalFormat
= _internalFormat
;
6876 void* Set(void* cmd
,
6879 GLenum _internalFormat
,
6882 static_cast<ValueType
*>(cmd
)
6883 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
6884 return NextCmdAddress
<ValueType
>(cmd
);
6887 gpu::CommandHeader header
;
6890 uint32_t internalFormat
;
6895 COMPILE_ASSERT(sizeof(TexStorage2DEXT
) == 24, Sizeof_TexStorage2DEXT_is_not_24
);
6896 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, header
) == 0,
6897 OffsetOf_TexStorage2DEXT_header_not_0
);
6898 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, target
) == 4,
6899 OffsetOf_TexStorage2DEXT_target_not_4
);
6900 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, levels
) == 8,
6901 OffsetOf_TexStorage2DEXT_levels_not_8
);
6902 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
6903 OffsetOf_TexStorage2DEXT_internalFormat_not_12
);
6904 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, width
) == 16,
6905 OffsetOf_TexStorage2DEXT_width_not_16
);
6906 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, height
) == 20,
6907 OffsetOf_TexStorage2DEXT_height_not_20
);
6909 struct GenQueriesEXTImmediate
{
6910 typedef GenQueriesEXTImmediate ValueType
;
6911 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
6912 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6913 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6915 static uint32_t ComputeDataSize(GLsizei n
) {
6916 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
6919 static uint32_t ComputeSize(GLsizei n
) {
6920 return static_cast<uint32_t>(sizeof(ValueType
) +
6921 ComputeDataSize(n
)); // NOLINT
6924 void SetHeader(GLsizei n
) {
6925 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
6928 void Init(GLsizei _n
, GLuint
* _queries
) {
6931 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
6934 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
6935 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
6936 const uint32_t size
= ComputeSize(_n
);
6937 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6940 gpu::CommandHeader header
;
6944 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate
) == 8,
6945 Sizeof_GenQueriesEXTImmediate_is_not_8
);
6946 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate
, header
) == 0,
6947 OffsetOf_GenQueriesEXTImmediate_header_not_0
);
6948 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate
, n
) == 4,
6949 OffsetOf_GenQueriesEXTImmediate_n_not_4
);
6951 struct DeleteQueriesEXTImmediate
{
6952 typedef DeleteQueriesEXTImmediate ValueType
;
6953 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
6954 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6955 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6957 static uint32_t ComputeDataSize(GLsizei n
) {
6958 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
6961 static uint32_t ComputeSize(GLsizei n
) {
6962 return static_cast<uint32_t>(sizeof(ValueType
) +
6963 ComputeDataSize(n
)); // NOLINT
6966 void SetHeader(GLsizei n
) {
6967 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
6970 void Init(GLsizei _n
, const GLuint
* _queries
) {
6973 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
6976 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
6977 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
6978 const uint32_t size
= ComputeSize(_n
);
6979 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6982 gpu::CommandHeader header
;
6986 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate
) == 8,
6987 Sizeof_DeleteQueriesEXTImmediate_is_not_8
);
6988 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
6989 OffsetOf_DeleteQueriesEXTImmediate_header_not_0
);
6990 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
6991 OffsetOf_DeleteQueriesEXTImmediate_n_not_4
);
6993 struct BeginQueryEXT
{
6994 typedef BeginQueryEXT ValueType
;
6995 static const CommandId kCmdId
= kBeginQueryEXT
;
6996 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6997 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6999 static uint32_t ComputeSize() {
7000 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7003 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7005 void Init(GLenum _target
,
7007 uint32_t _sync_data_shm_id
,
7008 uint32_t _sync_data_shm_offset
) {
7012 sync_data_shm_id
= _sync_data_shm_id
;
7013 sync_data_shm_offset
= _sync_data_shm_offset
;
7016 void* Set(void* cmd
,
7019 uint32_t _sync_data_shm_id
,
7020 uint32_t _sync_data_shm_offset
) {
7021 static_cast<ValueType
*>(cmd
)
7022 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
7023 return NextCmdAddress
<ValueType
>(cmd
);
7026 gpu::CommandHeader header
;
7029 uint32_t sync_data_shm_id
;
7030 uint32_t sync_data_shm_offset
;
7033 COMPILE_ASSERT(sizeof(BeginQueryEXT
) == 20, Sizeof_BeginQueryEXT_is_not_20
);
7034 COMPILE_ASSERT(offsetof(BeginQueryEXT
, header
) == 0,
7035 OffsetOf_BeginQueryEXT_header_not_0
);
7036 COMPILE_ASSERT(offsetof(BeginQueryEXT
, target
) == 4,
7037 OffsetOf_BeginQueryEXT_target_not_4
);
7038 COMPILE_ASSERT(offsetof(BeginQueryEXT
, id
) == 8,
7039 OffsetOf_BeginQueryEXT_id_not_8
);
7040 COMPILE_ASSERT(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
7041 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12
);
7042 COMPILE_ASSERT(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
7043 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16
);
7045 struct EndQueryEXT
{
7046 typedef EndQueryEXT ValueType
;
7047 static const CommandId kCmdId
= kEndQueryEXT
;
7048 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7049 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7051 static uint32_t ComputeSize() {
7052 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7055 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7057 void Init(GLenum _target
, GLuint _submit_count
) {
7060 submit_count
= _submit_count
;
7063 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
7064 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
7065 return NextCmdAddress
<ValueType
>(cmd
);
7068 gpu::CommandHeader header
;
7070 uint32_t submit_count
;
7073 COMPILE_ASSERT(sizeof(EndQueryEXT
) == 12, Sizeof_EndQueryEXT_is_not_12
);
7074 COMPILE_ASSERT(offsetof(EndQueryEXT
, header
) == 0,
7075 OffsetOf_EndQueryEXT_header_not_0
);
7076 COMPILE_ASSERT(offsetof(EndQueryEXT
, target
) == 4,
7077 OffsetOf_EndQueryEXT_target_not_4
);
7078 COMPILE_ASSERT(offsetof(EndQueryEXT
, submit_count
) == 8,
7079 OffsetOf_EndQueryEXT_submit_count_not_8
);
7081 struct InsertEventMarkerEXT
{
7082 typedef InsertEventMarkerEXT ValueType
;
7083 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
7084 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7085 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7087 static uint32_t ComputeSize() {
7088 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7091 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7093 void Init(GLuint _bucket_id
) {
7095 bucket_id
= _bucket_id
;
7098 void* Set(void* cmd
, GLuint _bucket_id
) {
7099 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7100 return NextCmdAddress
<ValueType
>(cmd
);
7103 gpu::CommandHeader header
;
7107 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT
) == 8,
7108 Sizeof_InsertEventMarkerEXT_is_not_8
);
7109 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT
, header
) == 0,
7110 OffsetOf_InsertEventMarkerEXT_header_not_0
);
7111 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
7112 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4
);
7114 struct PushGroupMarkerEXT
{
7115 typedef PushGroupMarkerEXT ValueType
;
7116 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
7117 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7118 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7120 static uint32_t ComputeSize() {
7121 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7124 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7126 void Init(GLuint _bucket_id
) {
7128 bucket_id
= _bucket_id
;
7131 void* Set(void* cmd
, GLuint _bucket_id
) {
7132 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7133 return NextCmdAddress
<ValueType
>(cmd
);
7136 gpu::CommandHeader header
;
7140 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT
) == 8,
7141 Sizeof_PushGroupMarkerEXT_is_not_8
);
7142 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT
, header
) == 0,
7143 OffsetOf_PushGroupMarkerEXT_header_not_0
);
7144 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
7145 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4
);
7147 struct PopGroupMarkerEXT
{
7148 typedef PopGroupMarkerEXT ValueType
;
7149 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
7150 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7151 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7153 static uint32_t ComputeSize() {
7154 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7157 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7159 void Init() { SetHeader(); }
7161 void* Set(void* cmd
) {
7162 static_cast<ValueType
*>(cmd
)->Init();
7163 return NextCmdAddress
<ValueType
>(cmd
);
7166 gpu::CommandHeader header
;
7169 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT
) == 4,
7170 Sizeof_PopGroupMarkerEXT_is_not_4
);
7171 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT
, header
) == 0,
7172 OffsetOf_PopGroupMarkerEXT_header_not_0
);
7174 struct GenVertexArraysOESImmediate
{
7175 typedef GenVertexArraysOESImmediate ValueType
;
7176 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
7177 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7178 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7180 static uint32_t ComputeDataSize(GLsizei n
) {
7181 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
7184 static uint32_t ComputeSize(GLsizei n
) {
7185 return static_cast<uint32_t>(sizeof(ValueType
) +
7186 ComputeDataSize(n
)); // NOLINT
7189 void SetHeader(GLsizei n
) {
7190 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
7193 void Init(GLsizei _n
, GLuint
* _arrays
) {
7196 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
7199 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
7200 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
7201 const uint32_t size
= ComputeSize(_n
);
7202 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7205 gpu::CommandHeader header
;
7209 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate
) == 8,
7210 Sizeof_GenVertexArraysOESImmediate_is_not_8
);
7211 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
7212 OffsetOf_GenVertexArraysOESImmediate_header_not_0
);
7213 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
7214 OffsetOf_GenVertexArraysOESImmediate_n_not_4
);
7216 struct DeleteVertexArraysOESImmediate
{
7217 typedef DeleteVertexArraysOESImmediate ValueType
;
7218 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
7219 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7220 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7222 static uint32_t ComputeDataSize(GLsizei n
) {
7223 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
7226 static uint32_t ComputeSize(GLsizei n
) {
7227 return static_cast<uint32_t>(sizeof(ValueType
) +
7228 ComputeDataSize(n
)); // NOLINT
7231 void SetHeader(GLsizei n
) {
7232 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
7235 void Init(GLsizei _n
, const GLuint
* _arrays
) {
7238 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
7241 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
7242 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
7243 const uint32_t size
= ComputeSize(_n
);
7244 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7247 gpu::CommandHeader header
;
7251 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate
) == 8,
7252 Sizeof_DeleteVertexArraysOESImmediate_is_not_8
);
7253 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
7254 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0
);
7255 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
7256 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4
);
7258 struct IsVertexArrayOES
{
7259 typedef IsVertexArrayOES ValueType
;
7260 static const CommandId kCmdId
= kIsVertexArrayOES
;
7261 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7262 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7264 typedef uint32_t Result
;
7266 static uint32_t ComputeSize() {
7267 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7270 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7272 void Init(GLuint _array
,
7273 uint32_t _result_shm_id
,
7274 uint32_t _result_shm_offset
) {
7277 result_shm_id
= _result_shm_id
;
7278 result_shm_offset
= _result_shm_offset
;
7281 void* Set(void* cmd
,
7283 uint32_t _result_shm_id
,
7284 uint32_t _result_shm_offset
) {
7285 static_cast<ValueType
*>(cmd
)
7286 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
7287 return NextCmdAddress
<ValueType
>(cmd
);
7290 gpu::CommandHeader header
;
7292 uint32_t result_shm_id
;
7293 uint32_t result_shm_offset
;
7296 COMPILE_ASSERT(sizeof(IsVertexArrayOES
) == 16,
7297 Sizeof_IsVertexArrayOES_is_not_16
);
7298 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, header
) == 0,
7299 OffsetOf_IsVertexArrayOES_header_not_0
);
7300 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, array
) == 4,
7301 OffsetOf_IsVertexArrayOES_array_not_4
);
7302 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
7303 OffsetOf_IsVertexArrayOES_result_shm_id_not_8
);
7304 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
7305 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12
);
7307 struct BindVertexArrayOES
{
7308 typedef BindVertexArrayOES ValueType
;
7309 static const CommandId kCmdId
= kBindVertexArrayOES
;
7310 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7311 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7313 static uint32_t ComputeSize() {
7314 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7317 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7319 void Init(GLuint _array
) {
7324 void* Set(void* cmd
, GLuint _array
) {
7325 static_cast<ValueType
*>(cmd
)->Init(_array
);
7326 return NextCmdAddress
<ValueType
>(cmd
);
7329 gpu::CommandHeader header
;
7333 COMPILE_ASSERT(sizeof(BindVertexArrayOES
) == 8,
7334 Sizeof_BindVertexArrayOES_is_not_8
);
7335 COMPILE_ASSERT(offsetof(BindVertexArrayOES
, header
) == 0,
7336 OffsetOf_BindVertexArrayOES_header_not_0
);
7337 COMPILE_ASSERT(offsetof(BindVertexArrayOES
, array
) == 4,
7338 OffsetOf_BindVertexArrayOES_array_not_4
);
7340 struct SwapBuffers
{
7341 typedef SwapBuffers ValueType
;
7342 static const CommandId kCmdId
= kSwapBuffers
;
7343 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7344 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
7346 static uint32_t ComputeSize() {
7347 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7350 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7352 void Init() { SetHeader(); }
7354 void* Set(void* cmd
) {
7355 static_cast<ValueType
*>(cmd
)->Init();
7356 return NextCmdAddress
<ValueType
>(cmd
);
7359 gpu::CommandHeader header
;
7362 COMPILE_ASSERT(sizeof(SwapBuffers
) == 4, Sizeof_SwapBuffers_is_not_4
);
7363 COMPILE_ASSERT(offsetof(SwapBuffers
, header
) == 0,
7364 OffsetOf_SwapBuffers_header_not_0
);
7366 struct GetMaxValueInBufferCHROMIUM
{
7367 typedef GetMaxValueInBufferCHROMIUM ValueType
;
7368 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
7369 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7370 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7372 typedef GLuint Result
;
7374 static uint32_t ComputeSize() {
7375 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7378 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7380 void Init(GLuint _buffer_id
,
7384 uint32_t _result_shm_id
,
7385 uint32_t _result_shm_offset
) {
7387 buffer_id
= _buffer_id
;
7391 result_shm_id
= _result_shm_id
;
7392 result_shm_offset
= _result_shm_offset
;
7395 void* Set(void* cmd
,
7400 uint32_t _result_shm_id
,
7401 uint32_t _result_shm_offset
) {
7402 static_cast<ValueType
*>(cmd
)->Init(
7403 _buffer_id
, _count
, _type
, _offset
, _result_shm_id
, _result_shm_offset
);
7404 return NextCmdAddress
<ValueType
>(cmd
);
7407 gpu::CommandHeader header
;
7412 uint32_t result_shm_id
;
7413 uint32_t result_shm_offset
;
7416 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
7417 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28
);
7418 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
7419 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0
);
7420 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
7421 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4
);
7422 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
7423 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8
);
7424 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
7425 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12
);
7426 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
7427 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16
);
7428 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
7429 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20
);
7430 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
7431 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24
);
7433 struct EnableFeatureCHROMIUM
{
7434 typedef EnableFeatureCHROMIUM ValueType
;
7435 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
7436 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7437 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7439 typedef GLint Result
;
7441 static uint32_t ComputeSize() {
7442 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7445 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7447 void Init(GLuint _bucket_id
,
7448 uint32_t _result_shm_id
,
7449 uint32_t _result_shm_offset
) {
7451 bucket_id
= _bucket_id
;
7452 result_shm_id
= _result_shm_id
;
7453 result_shm_offset
= _result_shm_offset
;
7456 void* Set(void* cmd
,
7458 uint32_t _result_shm_id
,
7459 uint32_t _result_shm_offset
) {
7460 static_cast<ValueType
*>(cmd
)
7461 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
7462 return NextCmdAddress
<ValueType
>(cmd
);
7465 gpu::CommandHeader header
;
7467 uint32_t result_shm_id
;
7468 uint32_t result_shm_offset
;
7471 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM
) == 16,
7472 Sizeof_EnableFeatureCHROMIUM_is_not_16
);
7473 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
7474 OffsetOf_EnableFeatureCHROMIUM_header_not_0
);
7475 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
7476 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4
);
7477 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
7478 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8
);
7479 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
7480 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12
);
7482 struct ResizeCHROMIUM
{
7483 typedef ResizeCHROMIUM ValueType
;
7484 static const CommandId kCmdId
= kResizeCHROMIUM
;
7485 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7486 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7488 static uint32_t ComputeSize() {
7489 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7492 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7494 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
7498 scale_factor
= _scale_factor
;
7501 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
7502 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
7503 return NextCmdAddress
<ValueType
>(cmd
);
7506 gpu::CommandHeader header
;
7512 COMPILE_ASSERT(sizeof(ResizeCHROMIUM
) == 16, Sizeof_ResizeCHROMIUM_is_not_16
);
7513 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, header
) == 0,
7514 OffsetOf_ResizeCHROMIUM_header_not_0
);
7515 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, width
) == 4,
7516 OffsetOf_ResizeCHROMIUM_width_not_4
);
7517 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, height
) == 8,
7518 OffsetOf_ResizeCHROMIUM_height_not_8
);
7519 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
7520 OffsetOf_ResizeCHROMIUM_scale_factor_not_12
);
7522 struct GetRequestableExtensionsCHROMIUM
{
7523 typedef GetRequestableExtensionsCHROMIUM ValueType
;
7524 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
7525 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7526 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7528 static uint32_t ComputeSize() {
7529 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7532 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7534 void Init(uint32_t _bucket_id
) {
7536 bucket_id
= _bucket_id
;
7539 void* Set(void* cmd
, uint32_t _bucket_id
) {
7540 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7541 return NextCmdAddress
<ValueType
>(cmd
);
7544 gpu::CommandHeader header
;
7548 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
7549 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8
);
7550 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
7551 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0
);
7552 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
7553 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4
);
7555 struct RequestExtensionCHROMIUM
{
7556 typedef RequestExtensionCHROMIUM ValueType
;
7557 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
7558 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7559 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7561 static uint32_t ComputeSize() {
7562 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7565 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7567 void Init(uint32_t _bucket_id
) {
7569 bucket_id
= _bucket_id
;
7572 void* Set(void* cmd
, uint32_t _bucket_id
) {
7573 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7574 return NextCmdAddress
<ValueType
>(cmd
);
7577 gpu::CommandHeader header
;
7581 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM
) == 8,
7582 Sizeof_RequestExtensionCHROMIUM_is_not_8
);
7583 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
7584 OffsetOf_RequestExtensionCHROMIUM_header_not_0
);
7585 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
7586 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4
);
7588 struct GetMultipleIntegervCHROMIUM
{
7589 typedef GetMultipleIntegervCHROMIUM ValueType
;
7590 static const CommandId kCmdId
= kGetMultipleIntegervCHROMIUM
;
7591 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7592 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7594 static uint32_t ComputeSize() {
7595 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7598 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7600 void Init(uint32_t _pnames_shm_id
,
7601 uint32_t _pnames_shm_offset
,
7603 uint32_t _results_shm_id
,
7604 uint32_t _results_shm_offset
,
7607 pnames_shm_id
= _pnames_shm_id
;
7608 pnames_shm_offset
= _pnames_shm_offset
;
7610 results_shm_id
= _results_shm_id
;
7611 results_shm_offset
= _results_shm_offset
;
7615 void* Set(void* cmd
,
7616 uint32_t _pnames_shm_id
,
7617 uint32_t _pnames_shm_offset
,
7619 uint32_t _results_shm_id
,
7620 uint32_t _results_shm_offset
,
7622 static_cast<ValueType
*>(cmd
)->Init(_pnames_shm_id
,
7626 _results_shm_offset
,
7628 return NextCmdAddress
<ValueType
>(cmd
);
7631 gpu::CommandHeader header
;
7632 uint32_t pnames_shm_id
;
7633 uint32_t pnames_shm_offset
;
7635 uint32_t results_shm_id
;
7636 uint32_t results_shm_offset
;
7640 COMPILE_ASSERT(sizeof(GetMultipleIntegervCHROMIUM
) == 28,
7641 Sizeof_GetMultipleIntegervCHROMIUM_is_not_28
);
7642 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, header
) == 0,
7643 OffsetOf_GetMultipleIntegervCHROMIUM_header_not_0
);
7644 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, pnames_shm_id
) == 4,
7645 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_id_not_4
);
7646 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, pnames_shm_offset
) == 8,
7647 OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_offset_not_8
);
7648 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, count
) == 12,
7649 OffsetOf_GetMultipleIntegervCHROMIUM_count_not_12
);
7650 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, results_shm_id
) == 16,
7651 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_id_not_16
);
7652 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, results_shm_offset
) == 20,
7653 OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_offset_not_20
);
7654 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM
, size
) == 24,
7655 OffsetOf_GetMultipleIntegervCHROMIUM_size_not_24
);
7657 struct GetProgramInfoCHROMIUM
{
7658 typedef GetProgramInfoCHROMIUM ValueType
;
7659 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
7660 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7661 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7664 uint32_t link_status
;
7665 uint32_t num_attribs
;
7666 uint32_t num_uniforms
;
7669 static uint32_t ComputeSize() {
7670 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7673 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7675 void Init(GLuint _program
, uint32_t _bucket_id
) {
7678 bucket_id
= _bucket_id
;
7681 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
7682 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
7683 return NextCmdAddress
<ValueType
>(cmd
);
7686 gpu::CommandHeader header
;
7691 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM
) == 12,
7692 Sizeof_GetProgramInfoCHROMIUM_is_not_12
);
7693 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
7694 OffsetOf_GetProgramInfoCHROMIUM_header_not_0
);
7695 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
7696 OffsetOf_GetProgramInfoCHROMIUM_program_not_4
);
7697 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
7698 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8
);
7699 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
7700 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0
);
7701 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
7702 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4
);
7703 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
7704 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8
);
7706 struct GetTranslatedShaderSourceANGLE
{
7707 typedef GetTranslatedShaderSourceANGLE ValueType
;
7708 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
7709 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7710 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7712 static uint32_t ComputeSize() {
7713 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7716 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7718 void Init(GLuint _shader
, uint32_t _bucket_id
) {
7721 bucket_id
= _bucket_id
;
7724 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
7725 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
7726 return NextCmdAddress
<ValueType
>(cmd
);
7729 gpu::CommandHeader header
;
7734 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
7735 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12
);
7736 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
7737 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0
);
7738 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
7739 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4
);
7740 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
7741 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8
);
7743 struct PostSubBufferCHROMIUM
{
7744 typedef PostSubBufferCHROMIUM ValueType
;
7745 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
7746 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7747 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7749 static uint32_t ComputeSize() {
7750 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7753 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7755 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
7763 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
7764 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
7765 return NextCmdAddress
<ValueType
>(cmd
);
7768 gpu::CommandHeader header
;
7775 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM
) == 20,
7776 Sizeof_PostSubBufferCHROMIUM_is_not_20
);
7777 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
7778 OffsetOf_PostSubBufferCHROMIUM_header_not_0
);
7779 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
7780 OffsetOf_PostSubBufferCHROMIUM_x_not_4
);
7781 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
7782 OffsetOf_PostSubBufferCHROMIUM_y_not_8
);
7783 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
7784 OffsetOf_PostSubBufferCHROMIUM_width_not_12
);
7785 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
7786 OffsetOf_PostSubBufferCHROMIUM_height_not_16
);
7788 struct TexImageIOSurface2DCHROMIUM
{
7789 typedef TexImageIOSurface2DCHROMIUM ValueType
;
7790 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
7791 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7792 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7794 static uint32_t ComputeSize() {
7795 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7798 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7800 void Init(GLenum _target
,
7803 GLuint _ioSurfaceId
,
7809 ioSurfaceId
= _ioSurfaceId
;
7813 void* Set(void* cmd
,
7817 GLuint _ioSurfaceId
,
7819 static_cast<ValueType
*>(cmd
)
7820 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
7821 return NextCmdAddress
<ValueType
>(cmd
);
7824 gpu::CommandHeader header
;
7828 uint32_t ioSurfaceId
;
7832 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
7833 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24
);
7834 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
7835 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0
);
7836 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
7837 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4
);
7838 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
7839 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8
);
7840 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
7841 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12
);
7842 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
7843 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16
);
7844 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
7845 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20
);
7847 struct CopyTextureCHROMIUM
{
7848 typedef CopyTextureCHROMIUM ValueType
;
7849 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
7850 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7851 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7853 static uint32_t ComputeSize() {
7854 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7857 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7859 void Init(GLenum _target
,
7863 GLint _internalformat
,
7864 GLenum _dest_type
) {
7867 source_id
= _source_id
;
7870 internalformat
= _internalformat
;
7871 dest_type
= _dest_type
;
7874 void* Set(void* cmd
,
7879 GLint _internalformat
,
7880 GLenum _dest_type
) {
7881 static_cast<ValueType
*>(cmd
)->Init(
7882 _target
, _source_id
, _dest_id
, _level
, _internalformat
, _dest_type
);
7883 return NextCmdAddress
<ValueType
>(cmd
);
7886 gpu::CommandHeader header
;
7891 int32_t internalformat
;
7895 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM
) == 28,
7896 Sizeof_CopyTextureCHROMIUM_is_not_28
);
7897 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, header
) == 0,
7898 OffsetOf_CopyTextureCHROMIUM_header_not_0
);
7899 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, target
) == 4,
7900 OffsetOf_CopyTextureCHROMIUM_target_not_4
);
7901 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
7902 OffsetOf_CopyTextureCHROMIUM_source_id_not_8
);
7903 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
7904 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12
);
7905 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, level
) == 16,
7906 OffsetOf_CopyTextureCHROMIUM_level_not_16
);
7907 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, internalformat
) == 20,
7908 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20
);
7909 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, dest_type
) == 24,
7910 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24
);
7912 struct DrawArraysInstancedANGLE
{
7913 typedef DrawArraysInstancedANGLE ValueType
;
7914 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
7915 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7916 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7918 static uint32_t ComputeSize() {
7919 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7922 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7924 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
7929 primcount
= _primcount
;
7932 void* Set(void* cmd
,
7936 GLsizei _primcount
) {
7937 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
7938 return NextCmdAddress
<ValueType
>(cmd
);
7941 gpu::CommandHeader header
;
7948 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE
) == 20,
7949 Sizeof_DrawArraysInstancedANGLE_is_not_20
);
7950 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
7951 OffsetOf_DrawArraysInstancedANGLE_header_not_0
);
7952 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
7953 OffsetOf_DrawArraysInstancedANGLE_mode_not_4
);
7954 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
7955 OffsetOf_DrawArraysInstancedANGLE_first_not_8
);
7956 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
7957 OffsetOf_DrawArraysInstancedANGLE_count_not_12
);
7958 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
7959 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16
);
7961 struct DrawElementsInstancedANGLE
{
7962 typedef DrawElementsInstancedANGLE ValueType
;
7963 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
7964 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7965 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7967 static uint32_t ComputeSize() {
7968 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7971 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7973 void Init(GLenum _mode
,
7976 GLuint _index_offset
,
7977 GLsizei _primcount
) {
7982 index_offset
= _index_offset
;
7983 primcount
= _primcount
;
7986 void* Set(void* cmd
,
7990 GLuint _index_offset
,
7991 GLsizei _primcount
) {
7992 static_cast<ValueType
*>(cmd
)
7993 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
7994 return NextCmdAddress
<ValueType
>(cmd
);
7997 gpu::CommandHeader header
;
8001 uint32_t index_offset
;
8005 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE
) == 24,
8006 Sizeof_DrawElementsInstancedANGLE_is_not_24
);
8007 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
8008 OffsetOf_DrawElementsInstancedANGLE_header_not_0
);
8009 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
8010 OffsetOf_DrawElementsInstancedANGLE_mode_not_4
);
8011 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
8012 OffsetOf_DrawElementsInstancedANGLE_count_not_8
);
8013 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
8014 OffsetOf_DrawElementsInstancedANGLE_type_not_12
);
8015 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
8016 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16
);
8017 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
8018 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20
);
8020 struct VertexAttribDivisorANGLE
{
8021 typedef VertexAttribDivisorANGLE ValueType
;
8022 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
8023 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8024 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8026 static uint32_t ComputeSize() {
8027 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8030 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8032 void Init(GLuint _index
, GLuint _divisor
) {
8038 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
8039 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
8040 return NextCmdAddress
<ValueType
>(cmd
);
8043 gpu::CommandHeader header
;
8048 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE
) == 12,
8049 Sizeof_VertexAttribDivisorANGLE_is_not_12
);
8050 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
8051 OffsetOf_VertexAttribDivisorANGLE_header_not_0
);
8052 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
8053 OffsetOf_VertexAttribDivisorANGLE_index_not_4
);
8054 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
8055 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8
);
8057 struct ProduceTextureCHROMIUMImmediate
{
8058 typedef ProduceTextureCHROMIUMImmediate ValueType
;
8059 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
8060 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8061 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8063 static uint32_t ComputeDataSize() {
8064 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
8067 static uint32_t ComputeSize() {
8068 return static_cast<uint32_t>(sizeof(ValueType
) +
8069 ComputeDataSize()); // NOLINT
8072 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
8074 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
8077 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
8080 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
8081 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
8082 const uint32_t size
= ComputeSize();
8083 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8086 gpu::CommandHeader header
;
8090 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
8091 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8
);
8092 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
8093 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0
);
8094 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
8095 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4
);
8097 struct ProduceTextureDirectCHROMIUMImmediate
{
8098 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
8099 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
8100 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8101 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8103 static uint32_t ComputeDataSize() {
8104 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
8107 static uint32_t ComputeSize() {
8108 return static_cast<uint32_t>(sizeof(ValueType
) +
8109 ComputeDataSize()); // NOLINT
8112 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
8114 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
8118 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
8121 void* Set(void* cmd
,
8124 const GLbyte
* _mailbox
) {
8125 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
8126 const uint32_t size
= ComputeSize();
8127 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8130 gpu::CommandHeader header
;
8135 COMPILE_ASSERT(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
8136 Sizeof_ProduceTextureDirectCHROMIUMImmediate_is_not_12
);
8137 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
8138 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_header_not_0
);
8139 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
8140 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_texture_not_4
);
8141 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
8142 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_target_not_8
);
8144 struct ConsumeTextureCHROMIUMImmediate
{
8145 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
8146 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
8147 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8148 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8150 static uint32_t ComputeDataSize() {
8151 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
8154 static uint32_t ComputeSize() {
8155 return static_cast<uint32_t>(sizeof(ValueType
) +
8156 ComputeDataSize()); // NOLINT
8159 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
8161 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
8164 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
8167 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
8168 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
8169 const uint32_t size
= ComputeSize();
8170 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8173 gpu::CommandHeader header
;
8177 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
8178 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8
);
8179 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
8180 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0
);
8181 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
8182 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4
);
8184 struct BindUniformLocationCHROMIUMBucket
{
8185 typedef BindUniformLocationCHROMIUMBucket ValueType
;
8186 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
8187 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8188 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8190 static uint32_t ComputeSize() {
8191 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8194 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8196 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
8199 location
= _location
;
8200 name_bucket_id
= _name_bucket_id
;
8203 void* Set(void* cmd
,
8206 uint32_t _name_bucket_id
) {
8207 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
8208 return NextCmdAddress
<ValueType
>(cmd
);
8211 gpu::CommandHeader header
;
8214 uint32_t name_bucket_id
;
8217 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
8218 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16
);
8219 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
8220 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0
);
8221 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
8222 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4
);
8223 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
8224 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8
);
8226 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
8227 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12
);
8229 struct BindTexImage2DCHROMIUM
{
8230 typedef BindTexImage2DCHROMIUM ValueType
;
8231 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
8232 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8233 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8235 static uint32_t ComputeSize() {
8236 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8239 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8241 void Init(GLenum _target
, GLint _imageId
) {
8247 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
8248 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
8249 return NextCmdAddress
<ValueType
>(cmd
);
8252 gpu::CommandHeader header
;
8257 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM
) == 12,
8258 Sizeof_BindTexImage2DCHROMIUM_is_not_12
);
8259 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
8260 OffsetOf_BindTexImage2DCHROMIUM_header_not_0
);
8261 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
8262 OffsetOf_BindTexImage2DCHROMIUM_target_not_4
);
8263 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
8264 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8
);
8266 struct ReleaseTexImage2DCHROMIUM
{
8267 typedef ReleaseTexImage2DCHROMIUM ValueType
;
8268 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
8269 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8270 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8272 static uint32_t ComputeSize() {
8273 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8276 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8278 void Init(GLenum _target
, GLint _imageId
) {
8284 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
8285 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
8286 return NextCmdAddress
<ValueType
>(cmd
);
8289 gpu::CommandHeader header
;
8294 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
8295 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12
);
8296 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
8297 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0
);
8298 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
8299 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4
);
8300 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
8301 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8
);
8303 struct TraceBeginCHROMIUM
{
8304 typedef TraceBeginCHROMIUM ValueType
;
8305 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
8306 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8307 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8309 static uint32_t ComputeSize() {
8310 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8313 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8315 void Init(GLuint _bucket_id
) {
8317 bucket_id
= _bucket_id
;
8320 void* Set(void* cmd
, GLuint _bucket_id
) {
8321 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
8322 return NextCmdAddress
<ValueType
>(cmd
);
8325 gpu::CommandHeader header
;
8329 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM
) == 8,
8330 Sizeof_TraceBeginCHROMIUM_is_not_8
);
8331 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM
, header
) == 0,
8332 OffsetOf_TraceBeginCHROMIUM_header_not_0
);
8333 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM
, bucket_id
) == 4,
8334 OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4
);
8336 struct TraceEndCHROMIUM
{
8337 typedef TraceEndCHROMIUM ValueType
;
8338 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
8339 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8340 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8342 static uint32_t ComputeSize() {
8343 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8346 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8348 void Init() { SetHeader(); }
8350 void* Set(void* cmd
) {
8351 static_cast<ValueType
*>(cmd
)->Init();
8352 return NextCmdAddress
<ValueType
>(cmd
);
8355 gpu::CommandHeader header
;
8358 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM
) == 4, Sizeof_TraceEndCHROMIUM_is_not_4
);
8359 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM
, header
) == 0,
8360 OffsetOf_TraceEndCHROMIUM_header_not_0
);
8362 struct AsyncTexSubImage2DCHROMIUM
{
8363 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
8364 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
8365 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8366 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8368 static uint32_t ComputeSize() {
8369 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8372 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8374 void Init(GLenum _target
,
8382 uint32_t _data_shm_id
,
8383 uint32_t _data_shm_offset
,
8384 uint32_t _async_upload_token
,
8385 uint32_t _sync_data_shm_id
,
8386 uint32_t _sync_data_shm_offset
) {
8396 data_shm_id
= _data_shm_id
;
8397 data_shm_offset
= _data_shm_offset
;
8398 async_upload_token
= _async_upload_token
;
8399 sync_data_shm_id
= _sync_data_shm_id
;
8400 sync_data_shm_offset
= _sync_data_shm_offset
;
8403 void* Set(void* cmd
,
8412 uint32_t _data_shm_id
,
8413 uint32_t _data_shm_offset
,
8414 uint32_t _async_upload_token
,
8415 uint32_t _sync_data_shm_id
,
8416 uint32_t _sync_data_shm_offset
) {
8417 static_cast<ValueType
*>(cmd
)->Init(_target
,
8427 _async_upload_token
,
8429 _sync_data_shm_offset
);
8430 return NextCmdAddress
<ValueType
>(cmd
);
8433 gpu::CommandHeader header
;
8442 uint32_t data_shm_id
;
8443 uint32_t data_shm_offset
;
8444 uint32_t async_upload_token
;
8445 uint32_t sync_data_shm_id
;
8446 uint32_t sync_data_shm_offset
;
8449 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
8450 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_56
);
8451 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
8452 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0
);
8453 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
8454 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4
);
8455 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
8456 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8
);
8457 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
8458 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12
);
8459 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
8460 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16
);
8461 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
8462 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20
);
8463 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
8464 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24
);
8465 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
8466 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28
);
8467 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
8468 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32
);
8469 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
8470 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36
);
8471 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
8472 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40
);
8473 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
8474 OffsetOf_AsyncTexSubImage2DCHROMIUM_async_upload_token_not_44
);
8475 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
8476 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_id_not_48
);
8477 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
8478 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_offset_not_52
);
8480 struct AsyncTexImage2DCHROMIUM
{
8481 typedef AsyncTexImage2DCHROMIUM ValueType
;
8482 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
8483 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8484 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8486 static uint32_t ComputeSize() {
8487 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8490 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8492 void Init(GLenum _target
,
8494 GLint _internalformat
,
8499 uint32_t _pixels_shm_id
,
8500 uint32_t _pixels_shm_offset
,
8501 uint32_t _async_upload_token
,
8502 uint32_t _sync_data_shm_id
,
8503 uint32_t _sync_data_shm_offset
) {
8507 internalformat
= _internalformat
;
8512 pixels_shm_id
= _pixels_shm_id
;
8513 pixels_shm_offset
= _pixels_shm_offset
;
8514 async_upload_token
= _async_upload_token
;
8515 sync_data_shm_id
= _sync_data_shm_id
;
8516 sync_data_shm_offset
= _sync_data_shm_offset
;
8519 void* Set(void* cmd
,
8522 GLint _internalformat
,
8527 uint32_t _pixels_shm_id
,
8528 uint32_t _pixels_shm_offset
,
8529 uint32_t _async_upload_token
,
8530 uint32_t _sync_data_shm_id
,
8531 uint32_t _sync_data_shm_offset
) {
8532 static_cast<ValueType
*>(cmd
)->Init(_target
,
8541 _async_upload_token
,
8543 _sync_data_shm_offset
);
8544 return NextCmdAddress
<ValueType
>(cmd
);
8547 gpu::CommandHeader header
;
8550 int32_t internalformat
;
8555 uint32_t pixels_shm_id
;
8556 uint32_t pixels_shm_offset
;
8557 uint32_t async_upload_token
;
8558 uint32_t sync_data_shm_id
;
8559 uint32_t sync_data_shm_offset
;
8560 static const int32_t border
= 0;
8563 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
8564 Sizeof_AsyncTexImage2DCHROMIUM_is_not_52
);
8565 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
8566 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0
);
8567 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
8568 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4
);
8569 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
8570 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8
);
8571 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
8572 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12
);
8573 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
8574 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16
);
8575 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
8576 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20
);
8577 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
8578 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_24
);
8579 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
8580 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_28
);
8581 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
8582 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_32
);
8583 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
8584 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_36
);
8585 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
8586 OffsetOf_AsyncTexImage2DCHROMIUM_async_upload_token_not_40
);
8587 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
8588 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_id_not_44
);
8589 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
8590 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_offset_not_48
);
8592 struct WaitAsyncTexImage2DCHROMIUM
{
8593 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
8594 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
8595 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8596 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8598 static uint32_t ComputeSize() {
8599 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8602 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8604 void Init(GLenum _target
) {
8609 void* Set(void* cmd
, GLenum _target
) {
8610 static_cast<ValueType
*>(cmd
)->Init(_target
);
8611 return NextCmdAddress
<ValueType
>(cmd
);
8614 gpu::CommandHeader header
;
8618 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
8619 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8
);
8620 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
8621 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0
);
8622 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
8623 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4
);
8625 struct WaitAllAsyncTexImage2DCHROMIUM
{
8626 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
8627 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
8628 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8629 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8631 static uint32_t ComputeSize() {
8632 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8635 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8637 void Init() { SetHeader(); }
8639 void* Set(void* cmd
) {
8640 static_cast<ValueType
*>(cmd
)->Init();
8641 return NextCmdAddress
<ValueType
>(cmd
);
8644 gpu::CommandHeader header
;
8647 COMPILE_ASSERT(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
8648 Sizeof_WaitAllAsyncTexImage2DCHROMIUM_is_not_4
);
8649 COMPILE_ASSERT(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
8650 OffsetOf_WaitAllAsyncTexImage2DCHROMIUM_header_not_0
);
8652 struct DiscardFramebufferEXTImmediate
{
8653 typedef DiscardFramebufferEXTImmediate ValueType
;
8654 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
8655 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8656 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8658 static uint32_t ComputeDataSize(GLsizei count
) {
8659 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
8662 static uint32_t ComputeSize(GLsizei count
) {
8663 return static_cast<uint32_t>(sizeof(ValueType
) +
8664 ComputeDataSize(count
)); // NOLINT
8667 void SetHeader(GLsizei count
) {
8668 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8671 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
8675 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
8678 void* Set(void* cmd
,
8681 const GLenum
* _attachments
) {
8682 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
8683 const uint32_t size
= ComputeSize(_count
);
8684 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8687 gpu::CommandHeader header
;
8692 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate
) == 12,
8693 Sizeof_DiscardFramebufferEXTImmediate_is_not_12
);
8694 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
8695 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0
);
8696 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
8697 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4
);
8698 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
8699 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8
);
8701 struct LoseContextCHROMIUM
{
8702 typedef LoseContextCHROMIUM ValueType
;
8703 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
8704 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8705 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8707 static uint32_t ComputeSize() {
8708 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8711 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8713 void Init(GLenum _current
, GLenum _other
) {
8719 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
8720 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
8721 return NextCmdAddress
<ValueType
>(cmd
);
8724 gpu::CommandHeader header
;
8729 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM
) == 12,
8730 Sizeof_LoseContextCHROMIUM_is_not_12
);
8731 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, header
) == 0,
8732 OffsetOf_LoseContextCHROMIUM_header_not_0
);
8733 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, current
) == 4,
8734 OffsetOf_LoseContextCHROMIUM_current_not_4
);
8735 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, other
) == 8,
8736 OffsetOf_LoseContextCHROMIUM_other_not_8
);
8738 struct WaitSyncPointCHROMIUM
{
8739 typedef WaitSyncPointCHROMIUM ValueType
;
8740 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
8741 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8742 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8744 static uint32_t ComputeSize() {
8745 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8748 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8750 void Init(GLuint _sync_point
) {
8752 sync_point
= _sync_point
;
8755 void* Set(void* cmd
, GLuint _sync_point
) {
8756 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
8757 return NextCmdAddress
<ValueType
>(cmd
);
8760 gpu::CommandHeader header
;
8761 uint32_t sync_point
;
8764 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM
) == 8,
8765 Sizeof_WaitSyncPointCHROMIUM_is_not_8
);
8766 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
8767 OffsetOf_WaitSyncPointCHROMIUM_header_not_0
);
8768 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
8769 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4
);
8771 struct DrawBuffersEXTImmediate
{
8772 typedef DrawBuffersEXTImmediate ValueType
;
8773 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
8774 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8775 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8777 static uint32_t ComputeDataSize(GLsizei count
) {
8778 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
8781 static uint32_t ComputeSize(GLsizei count
) {
8782 return static_cast<uint32_t>(sizeof(ValueType
) +
8783 ComputeDataSize(count
)); // NOLINT
8786 void SetHeader(GLsizei count
) {
8787 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8790 void Init(GLsizei _count
, const GLenum
* _bufs
) {
8793 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
8796 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
8797 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
8798 const uint32_t size
= ComputeSize(_count
);
8799 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8802 gpu::CommandHeader header
;
8806 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate
) == 8,
8807 Sizeof_DrawBuffersEXTImmediate_is_not_8
);
8808 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
8809 OffsetOf_DrawBuffersEXTImmediate_header_not_0
);
8810 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
8811 OffsetOf_DrawBuffersEXTImmediate_count_not_4
);
8813 struct DiscardBackbufferCHROMIUM
{
8814 typedef DiscardBackbufferCHROMIUM ValueType
;
8815 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
8816 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8817 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8819 static uint32_t ComputeSize() {
8820 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8823 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8825 void Init() { SetHeader(); }
8827 void* Set(void* cmd
) {
8828 static_cast<ValueType
*>(cmd
)->Init();
8829 return NextCmdAddress
<ValueType
>(cmd
);
8832 gpu::CommandHeader header
;
8835 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM
) == 4,
8836 Sizeof_DiscardBackbufferCHROMIUM_is_not_4
);
8837 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
8838 OffsetOf_DiscardBackbufferCHROMIUM_header_not_0
);
8840 struct ScheduleOverlayPlaneCHROMIUM
{
8841 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
8842 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
8843 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8844 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8846 static uint32_t ComputeSize() {
8847 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8850 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8852 void Init(GLint _plane_z_order
,
8853 GLenum _plane_transform
,
8854 GLuint _overlay_texture_id
,
8857 GLint _bounds_width
,
8858 GLint _bounds_height
,
8862 GLfloat _uv_height
) {
8864 plane_z_order
= _plane_z_order
;
8865 plane_transform
= _plane_transform
;
8866 overlay_texture_id
= _overlay_texture_id
;
8867 bounds_x
= _bounds_x
;
8868 bounds_y
= _bounds_y
;
8869 bounds_width
= _bounds_width
;
8870 bounds_height
= _bounds_height
;
8873 uv_width
= _uv_width
;
8874 uv_height
= _uv_height
;
8877 void* Set(void* cmd
,
8878 GLint _plane_z_order
,
8879 GLenum _plane_transform
,
8880 GLuint _overlay_texture_id
,
8883 GLint _bounds_width
,
8884 GLint _bounds_height
,
8888 GLfloat _uv_height
) {
8889 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
,
8891 _overlay_texture_id
,
8900 return NextCmdAddress
<ValueType
>(cmd
);
8903 gpu::CommandHeader header
;
8904 int32_t plane_z_order
;
8905 uint32_t plane_transform
;
8906 uint32_t overlay_texture_id
;
8909 int32_t bounds_width
;
8910 int32_t bounds_height
;
8917 COMPILE_ASSERT(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
8918 Sizeof_ScheduleOverlayPlaneCHROMIUM_is_not_48
);
8919 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
8920 OffsetOf_ScheduleOverlayPlaneCHROMIUM_header_not_0
);
8921 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
8922 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_z_order_not_4
);
8923 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
8924 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_transform_not_8
);
8925 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
8926 OffsetOf_ScheduleOverlayPlaneCHROMIUM_overlay_texture_id_not_12
);
8927 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
8928 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_x_not_16
);
8929 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
8930 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_y_not_20
);
8931 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
8932 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_width_not_24
);
8933 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
8934 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28
);
8935 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
8936 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32
);
8937 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
8938 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36
);
8939 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
8940 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40
);
8941 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
8942 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44
);
8944 struct MatrixLoadfCHROMIUMImmediate
{
8945 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
8946 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
8947 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8948 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8950 static uint32_t ComputeDataSize() {
8951 return static_cast<uint32_t>(sizeof(GLfloat
) * 16); // NOLINT
8954 static uint32_t ComputeSize() {
8955 return static_cast<uint32_t>(sizeof(ValueType
) +
8956 ComputeDataSize()); // NOLINT
8959 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
8961 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
8963 matrixMode
= _matrixMode
;
8964 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
8967 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
8968 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
8969 const uint32_t size
= ComputeSize();
8970 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8973 gpu::CommandHeader header
;
8974 uint32_t matrixMode
;
8977 COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
8978 Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8
);
8979 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
8980 OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0
);
8981 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
8982 OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4
);
8984 struct MatrixLoadIdentityCHROMIUM
{
8985 typedef MatrixLoadIdentityCHROMIUM ValueType
;
8986 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
8987 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8988 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8990 static uint32_t ComputeSize() {
8991 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8994 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8996 void Init(GLenum _matrixMode
) {
8998 matrixMode
= _matrixMode
;
9001 void* Set(void* cmd
, GLenum _matrixMode
) {
9002 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
9003 return NextCmdAddress
<ValueType
>(cmd
);
9006 gpu::CommandHeader header
;
9007 uint32_t matrixMode
;
9010 COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
9011 Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8
);
9012 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
9013 OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0
);
9014 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
9015 OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_4
);
9017 struct BlendBarrierKHR
{
9018 typedef BlendBarrierKHR ValueType
;
9019 static const CommandId kCmdId
= kBlendBarrierKHR
;
9020 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9021 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9023 static uint32_t ComputeSize() {
9024 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9027 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9029 void Init() { SetHeader(); }
9031 void* Set(void* cmd
) {
9032 static_cast<ValueType
*>(cmd
)->Init();
9033 return NextCmdAddress
<ValueType
>(cmd
);
9036 gpu::CommandHeader header
;
9039 COMPILE_ASSERT(sizeof(BlendBarrierKHR
) == 4, Sizeof_BlendBarrierKHR_is_not_4
);
9040 COMPILE_ASSERT(offsetof(BlendBarrierKHR
, header
) == 0,
9041 OffsetOf_BlendBarrierKHR_header_not_0
);
9043 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_