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
, _level
, _internalformat
, _width
,
966 _height
, _imageSize
, _data_shm_id
,
968 return NextCmdAddress
<ValueType
>(cmd
);
971 gpu::CommandHeader header
;
974 uint32_t internalformat
;
978 uint32_t data_shm_id
;
979 uint32_t data_shm_offset
;
980 static const int32_t border
= 0;
983 COMPILE_ASSERT(sizeof(CompressedTexImage2D
) == 36,
984 Sizeof_CompressedTexImage2D_is_not_36
);
985 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, header
) == 0,
986 OffsetOf_CompressedTexImage2D_header_not_0
);
987 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, target
) == 4,
988 OffsetOf_CompressedTexImage2D_target_not_4
);
989 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, level
) == 8,
990 OffsetOf_CompressedTexImage2D_level_not_8
);
991 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, internalformat
) == 12,
992 OffsetOf_CompressedTexImage2D_internalformat_not_12
);
993 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, width
) == 16,
994 OffsetOf_CompressedTexImage2D_width_not_16
);
995 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, height
) == 20,
996 OffsetOf_CompressedTexImage2D_height_not_20
);
997 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, imageSize
) == 24,
998 OffsetOf_CompressedTexImage2D_imageSize_not_24
);
999 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, data_shm_id
) == 28,
1000 OffsetOf_CompressedTexImage2D_data_shm_id_not_28
);
1001 COMPILE_ASSERT(offsetof(CompressedTexImage2D
, data_shm_offset
) == 32,
1002 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32
);
1004 struct CompressedTexSubImage2DBucket
{
1005 typedef CompressedTexSubImage2DBucket ValueType
;
1006 static const CommandId kCmdId
= kCompressedTexSubImage2DBucket
;
1007 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1008 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1010 static uint32_t ComputeSize() {
1011 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1014 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1016 void Init(GLenum _target
,
1023 GLuint _bucket_id
) {
1032 bucket_id
= _bucket_id
;
1035 void* Set(void* cmd
,
1043 GLuint _bucket_id
) {
1044 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1045 _width
, _height
, _format
, _bucket_id
);
1046 return NextCmdAddress
<ValueType
>(cmd
);
1049 gpu::CommandHeader header
;
1060 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket
) == 36,
1061 Sizeof_CompressedTexSubImage2DBucket_is_not_36
);
1062 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, header
) == 0,
1063 OffsetOf_CompressedTexSubImage2DBucket_header_not_0
);
1064 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, target
) == 4,
1065 OffsetOf_CompressedTexSubImage2DBucket_target_not_4
);
1066 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, level
) == 8,
1067 OffsetOf_CompressedTexSubImage2DBucket_level_not_8
);
1068 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, xoffset
) == 12,
1069 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12
);
1070 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, yoffset
) == 16,
1071 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16
);
1072 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, width
) == 20,
1073 OffsetOf_CompressedTexSubImage2DBucket_width_not_20
);
1074 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, height
) == 24,
1075 OffsetOf_CompressedTexSubImage2DBucket_height_not_24
);
1076 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, format
) == 28,
1077 OffsetOf_CompressedTexSubImage2DBucket_format_not_28
);
1078 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket
, bucket_id
) == 32,
1079 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32
);
1081 struct CompressedTexSubImage2D
{
1082 typedef CompressedTexSubImage2D ValueType
;
1083 static const CommandId kCmdId
= kCompressedTexSubImage2D
;
1084 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1085 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1087 static uint32_t ComputeSize() {
1088 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1091 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1093 void Init(GLenum _target
,
1101 uint32_t _data_shm_id
,
1102 uint32_t _data_shm_offset
) {
1111 imageSize
= _imageSize
;
1112 data_shm_id
= _data_shm_id
;
1113 data_shm_offset
= _data_shm_offset
;
1116 void* Set(void* cmd
,
1125 uint32_t _data_shm_id
,
1126 uint32_t _data_shm_offset
) {
1127 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _xoffset
, _yoffset
,
1128 _width
, _height
, _format
, _imageSize
,
1129 _data_shm_id
, _data_shm_offset
);
1130 return NextCmdAddress
<ValueType
>(cmd
);
1133 gpu::CommandHeader header
;
1142 uint32_t data_shm_id
;
1143 uint32_t data_shm_offset
;
1146 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D
) == 44,
1147 Sizeof_CompressedTexSubImage2D_is_not_44
);
1148 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, header
) == 0,
1149 OffsetOf_CompressedTexSubImage2D_header_not_0
);
1150 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, target
) == 4,
1151 OffsetOf_CompressedTexSubImage2D_target_not_4
);
1152 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, level
) == 8,
1153 OffsetOf_CompressedTexSubImage2D_level_not_8
);
1154 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, xoffset
) == 12,
1155 OffsetOf_CompressedTexSubImage2D_xoffset_not_12
);
1156 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, yoffset
) == 16,
1157 OffsetOf_CompressedTexSubImage2D_yoffset_not_16
);
1158 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, width
) == 20,
1159 OffsetOf_CompressedTexSubImage2D_width_not_20
);
1160 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, height
) == 24,
1161 OffsetOf_CompressedTexSubImage2D_height_not_24
);
1162 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, format
) == 28,
1163 OffsetOf_CompressedTexSubImage2D_format_not_28
);
1164 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, imageSize
) == 32,
1165 OffsetOf_CompressedTexSubImage2D_imageSize_not_32
);
1166 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, data_shm_id
) == 36,
1167 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36
);
1168 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D
, data_shm_offset
) == 40,
1169 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40
);
1171 struct CopyTexImage2D
{
1172 typedef CopyTexImage2D ValueType
;
1173 static const CommandId kCmdId
= kCopyTexImage2D
;
1174 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1175 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1177 static uint32_t ComputeSize() {
1178 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1181 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1183 void Init(GLenum _target
,
1185 GLenum _internalformat
,
1193 internalformat
= _internalformat
;
1200 void* Set(void* cmd
,
1203 GLenum _internalformat
,
1208 static_cast<ValueType
*>(cmd
)
1209 ->Init(_target
, _level
, _internalformat
, _x
, _y
, _width
, _height
);
1210 return NextCmdAddress
<ValueType
>(cmd
);
1213 gpu::CommandHeader header
;
1216 uint32_t internalformat
;
1221 static const int32_t border
= 0;
1224 COMPILE_ASSERT(sizeof(CopyTexImage2D
) == 32, Sizeof_CopyTexImage2D_is_not_32
);
1225 COMPILE_ASSERT(offsetof(CopyTexImage2D
, header
) == 0,
1226 OffsetOf_CopyTexImage2D_header_not_0
);
1227 COMPILE_ASSERT(offsetof(CopyTexImage2D
, target
) == 4,
1228 OffsetOf_CopyTexImage2D_target_not_4
);
1229 COMPILE_ASSERT(offsetof(CopyTexImage2D
, level
) == 8,
1230 OffsetOf_CopyTexImage2D_level_not_8
);
1231 COMPILE_ASSERT(offsetof(CopyTexImage2D
, internalformat
) == 12,
1232 OffsetOf_CopyTexImage2D_internalformat_not_12
);
1233 COMPILE_ASSERT(offsetof(CopyTexImage2D
, x
) == 16,
1234 OffsetOf_CopyTexImage2D_x_not_16
);
1235 COMPILE_ASSERT(offsetof(CopyTexImage2D
, y
) == 20,
1236 OffsetOf_CopyTexImage2D_y_not_20
);
1237 COMPILE_ASSERT(offsetof(CopyTexImage2D
, width
) == 24,
1238 OffsetOf_CopyTexImage2D_width_not_24
);
1239 COMPILE_ASSERT(offsetof(CopyTexImage2D
, height
) == 28,
1240 OffsetOf_CopyTexImage2D_height_not_28
);
1242 struct CopyTexSubImage2D
{
1243 typedef CopyTexSubImage2D ValueType
;
1244 static const CommandId kCmdId
= kCopyTexSubImage2D
;
1245 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1246 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1248 static uint32_t ComputeSize() {
1249 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1252 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1254 void Init(GLenum _target
,
1273 void* Set(void* cmd
,
1282 static_cast<ValueType
*>(cmd
)
1283 ->Init(_target
, _level
, _xoffset
, _yoffset
, _x
, _y
, _width
, _height
);
1284 return NextCmdAddress
<ValueType
>(cmd
);
1287 gpu::CommandHeader header
;
1298 COMPILE_ASSERT(sizeof(CopyTexSubImage2D
) == 36,
1299 Sizeof_CopyTexSubImage2D_is_not_36
);
1300 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, header
) == 0,
1301 OffsetOf_CopyTexSubImage2D_header_not_0
);
1302 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, target
) == 4,
1303 OffsetOf_CopyTexSubImage2D_target_not_4
);
1304 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, level
) == 8,
1305 OffsetOf_CopyTexSubImage2D_level_not_8
);
1306 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, xoffset
) == 12,
1307 OffsetOf_CopyTexSubImage2D_xoffset_not_12
);
1308 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, yoffset
) == 16,
1309 OffsetOf_CopyTexSubImage2D_yoffset_not_16
);
1310 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, x
) == 20,
1311 OffsetOf_CopyTexSubImage2D_x_not_20
);
1312 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, y
) == 24,
1313 OffsetOf_CopyTexSubImage2D_y_not_24
);
1314 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, width
) == 28,
1315 OffsetOf_CopyTexSubImage2D_width_not_28
);
1316 COMPILE_ASSERT(offsetof(CopyTexSubImage2D
, height
) == 32,
1317 OffsetOf_CopyTexSubImage2D_height_not_32
);
1319 struct CreateProgram
{
1320 typedef CreateProgram ValueType
;
1321 static const CommandId kCmdId
= kCreateProgram
;
1322 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1323 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1325 static uint32_t ComputeSize() {
1326 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1329 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1331 void Init(uint32_t _client_id
) {
1333 client_id
= _client_id
;
1336 void* Set(void* cmd
, uint32_t _client_id
) {
1337 static_cast<ValueType
*>(cmd
)->Init(_client_id
);
1338 return NextCmdAddress
<ValueType
>(cmd
);
1341 gpu::CommandHeader header
;
1345 COMPILE_ASSERT(sizeof(CreateProgram
) == 8, Sizeof_CreateProgram_is_not_8
);
1346 COMPILE_ASSERT(offsetof(CreateProgram
, header
) == 0,
1347 OffsetOf_CreateProgram_header_not_0
);
1348 COMPILE_ASSERT(offsetof(CreateProgram
, client_id
) == 4,
1349 OffsetOf_CreateProgram_client_id_not_4
);
1351 struct CreateShader
{
1352 typedef CreateShader ValueType
;
1353 static const CommandId kCmdId
= kCreateShader
;
1354 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1355 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1357 static uint32_t ComputeSize() {
1358 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1361 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1363 void Init(GLenum _type
, uint32_t _client_id
) {
1366 client_id
= _client_id
;
1369 void* Set(void* cmd
, GLenum _type
, uint32_t _client_id
) {
1370 static_cast<ValueType
*>(cmd
)->Init(_type
, _client_id
);
1371 return NextCmdAddress
<ValueType
>(cmd
);
1374 gpu::CommandHeader header
;
1379 COMPILE_ASSERT(sizeof(CreateShader
) == 12, Sizeof_CreateShader_is_not_12
);
1380 COMPILE_ASSERT(offsetof(CreateShader
, header
) == 0,
1381 OffsetOf_CreateShader_header_not_0
);
1382 COMPILE_ASSERT(offsetof(CreateShader
, type
) == 4,
1383 OffsetOf_CreateShader_type_not_4
);
1384 COMPILE_ASSERT(offsetof(CreateShader
, client_id
) == 8,
1385 OffsetOf_CreateShader_client_id_not_8
);
1388 typedef CullFace ValueType
;
1389 static const CommandId kCmdId
= kCullFace
;
1390 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1391 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1393 static uint32_t ComputeSize() {
1394 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1397 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1399 void Init(GLenum _mode
) {
1404 void* Set(void* cmd
, GLenum _mode
) {
1405 static_cast<ValueType
*>(cmd
)->Init(_mode
);
1406 return NextCmdAddress
<ValueType
>(cmd
);
1409 gpu::CommandHeader header
;
1413 COMPILE_ASSERT(sizeof(CullFace
) == 8, Sizeof_CullFace_is_not_8
);
1414 COMPILE_ASSERT(offsetof(CullFace
, header
) == 0, OffsetOf_CullFace_header_not_0
);
1415 COMPILE_ASSERT(offsetof(CullFace
, mode
) == 4, OffsetOf_CullFace_mode_not_4
);
1417 struct DeleteBuffersImmediate
{
1418 typedef DeleteBuffersImmediate ValueType
;
1419 static const CommandId kCmdId
= kDeleteBuffersImmediate
;
1420 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1421 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1423 static uint32_t ComputeDataSize(GLsizei n
) {
1424 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1427 static uint32_t ComputeSize(GLsizei n
) {
1428 return static_cast<uint32_t>(sizeof(ValueType
) +
1429 ComputeDataSize(n
)); // NOLINT
1432 void SetHeader(GLsizei n
) {
1433 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1436 void Init(GLsizei _n
, const GLuint
* _buffers
) {
1439 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
1442 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _buffers
) {
1443 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
1444 const uint32_t size
= ComputeSize(_n
);
1445 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1448 gpu::CommandHeader header
;
1452 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate
) == 8,
1453 Sizeof_DeleteBuffersImmediate_is_not_8
);
1454 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate
, header
) == 0,
1455 OffsetOf_DeleteBuffersImmediate_header_not_0
);
1456 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate
, n
) == 4,
1457 OffsetOf_DeleteBuffersImmediate_n_not_4
);
1459 struct DeleteFramebuffersImmediate
{
1460 typedef DeleteFramebuffersImmediate ValueType
;
1461 static const CommandId kCmdId
= kDeleteFramebuffersImmediate
;
1462 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1463 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1465 static uint32_t ComputeDataSize(GLsizei n
) {
1466 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1469 static uint32_t ComputeSize(GLsizei n
) {
1470 return static_cast<uint32_t>(sizeof(ValueType
) +
1471 ComputeDataSize(n
)); // NOLINT
1474 void SetHeader(GLsizei n
) {
1475 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1478 void Init(GLsizei _n
, const GLuint
* _framebuffers
) {
1481 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
1484 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _framebuffers
) {
1485 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
1486 const uint32_t size
= ComputeSize(_n
);
1487 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1490 gpu::CommandHeader header
;
1494 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate
) == 8,
1495 Sizeof_DeleteFramebuffersImmediate_is_not_8
);
1496 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate
, header
) == 0,
1497 OffsetOf_DeleteFramebuffersImmediate_header_not_0
);
1498 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate
, n
) == 4,
1499 OffsetOf_DeleteFramebuffersImmediate_n_not_4
);
1501 struct DeleteProgram
{
1502 typedef DeleteProgram ValueType
;
1503 static const CommandId kCmdId
= kDeleteProgram
;
1504 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1505 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1507 static uint32_t ComputeSize() {
1508 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1511 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1513 void Init(GLuint _program
) {
1518 void* Set(void* cmd
, GLuint _program
) {
1519 static_cast<ValueType
*>(cmd
)->Init(_program
);
1520 return NextCmdAddress
<ValueType
>(cmd
);
1523 gpu::CommandHeader header
;
1527 COMPILE_ASSERT(sizeof(DeleteProgram
) == 8, Sizeof_DeleteProgram_is_not_8
);
1528 COMPILE_ASSERT(offsetof(DeleteProgram
, header
) == 0,
1529 OffsetOf_DeleteProgram_header_not_0
);
1530 COMPILE_ASSERT(offsetof(DeleteProgram
, program
) == 4,
1531 OffsetOf_DeleteProgram_program_not_4
);
1533 struct DeleteRenderbuffersImmediate
{
1534 typedef DeleteRenderbuffersImmediate ValueType
;
1535 static const CommandId kCmdId
= kDeleteRenderbuffersImmediate
;
1536 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1537 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1539 static uint32_t ComputeDataSize(GLsizei n
) {
1540 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1543 static uint32_t ComputeSize(GLsizei n
) {
1544 return static_cast<uint32_t>(sizeof(ValueType
) +
1545 ComputeDataSize(n
)); // NOLINT
1548 void SetHeader(GLsizei n
) {
1549 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1552 void Init(GLsizei _n
, const GLuint
* _renderbuffers
) {
1555 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
1558 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _renderbuffers
) {
1559 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
1560 const uint32_t size
= ComputeSize(_n
);
1561 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1564 gpu::CommandHeader header
;
1568 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate
) == 8,
1569 Sizeof_DeleteRenderbuffersImmediate_is_not_8
);
1570 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate
, header
) == 0,
1571 OffsetOf_DeleteRenderbuffersImmediate_header_not_0
);
1572 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate
, n
) == 4,
1573 OffsetOf_DeleteRenderbuffersImmediate_n_not_4
);
1575 struct DeleteShader
{
1576 typedef DeleteShader ValueType
;
1577 static const CommandId kCmdId
= kDeleteShader
;
1578 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1579 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1581 static uint32_t ComputeSize() {
1582 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1585 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1587 void Init(GLuint _shader
) {
1592 void* Set(void* cmd
, GLuint _shader
) {
1593 static_cast<ValueType
*>(cmd
)->Init(_shader
);
1594 return NextCmdAddress
<ValueType
>(cmd
);
1597 gpu::CommandHeader header
;
1601 COMPILE_ASSERT(sizeof(DeleteShader
) == 8, Sizeof_DeleteShader_is_not_8
);
1602 COMPILE_ASSERT(offsetof(DeleteShader
, header
) == 0,
1603 OffsetOf_DeleteShader_header_not_0
);
1604 COMPILE_ASSERT(offsetof(DeleteShader
, shader
) == 4,
1605 OffsetOf_DeleteShader_shader_not_4
);
1607 struct DeleteTexturesImmediate
{
1608 typedef DeleteTexturesImmediate ValueType
;
1609 static const CommandId kCmdId
= kDeleteTexturesImmediate
;
1610 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
1611 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1613 static uint32_t ComputeDataSize(GLsizei n
) {
1614 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
1617 static uint32_t ComputeSize(GLsizei n
) {
1618 return static_cast<uint32_t>(sizeof(ValueType
) +
1619 ComputeDataSize(n
)); // NOLINT
1622 void SetHeader(GLsizei n
) {
1623 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
1626 void Init(GLsizei _n
, const GLuint
* _textures
) {
1629 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
1632 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _textures
) {
1633 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
1634 const uint32_t size
= ComputeSize(_n
);
1635 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
1638 gpu::CommandHeader header
;
1642 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate
) == 8,
1643 Sizeof_DeleteTexturesImmediate_is_not_8
);
1644 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate
, header
) == 0,
1645 OffsetOf_DeleteTexturesImmediate_header_not_0
);
1646 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate
, n
) == 4,
1647 OffsetOf_DeleteTexturesImmediate_n_not_4
);
1650 typedef DepthFunc ValueType
;
1651 static const CommandId kCmdId
= kDepthFunc
;
1652 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1653 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1655 static uint32_t ComputeSize() {
1656 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1659 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1661 void Init(GLenum _func
) {
1666 void* Set(void* cmd
, GLenum _func
) {
1667 static_cast<ValueType
*>(cmd
)->Init(_func
);
1668 return NextCmdAddress
<ValueType
>(cmd
);
1671 gpu::CommandHeader header
;
1675 COMPILE_ASSERT(sizeof(DepthFunc
) == 8, Sizeof_DepthFunc_is_not_8
);
1676 COMPILE_ASSERT(offsetof(DepthFunc
, header
) == 0,
1677 OffsetOf_DepthFunc_header_not_0
);
1678 COMPILE_ASSERT(offsetof(DepthFunc
, func
) == 4, OffsetOf_DepthFunc_func_not_4
);
1681 typedef DepthMask ValueType
;
1682 static const CommandId kCmdId
= kDepthMask
;
1683 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1684 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1686 static uint32_t ComputeSize() {
1687 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1690 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1692 void Init(GLboolean _flag
) {
1697 void* Set(void* cmd
, GLboolean _flag
) {
1698 static_cast<ValueType
*>(cmd
)->Init(_flag
);
1699 return NextCmdAddress
<ValueType
>(cmd
);
1702 gpu::CommandHeader header
;
1706 COMPILE_ASSERT(sizeof(DepthMask
) == 8, Sizeof_DepthMask_is_not_8
);
1707 COMPILE_ASSERT(offsetof(DepthMask
, header
) == 0,
1708 OffsetOf_DepthMask_header_not_0
);
1709 COMPILE_ASSERT(offsetof(DepthMask
, flag
) == 4, OffsetOf_DepthMask_flag_not_4
);
1711 struct DepthRangef
{
1712 typedef DepthRangef ValueType
;
1713 static const CommandId kCmdId
= kDepthRangef
;
1714 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1715 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1717 static uint32_t ComputeSize() {
1718 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1721 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1723 void Init(GLclampf _zNear
, GLclampf _zFar
) {
1729 void* Set(void* cmd
, GLclampf _zNear
, GLclampf _zFar
) {
1730 static_cast<ValueType
*>(cmd
)->Init(_zNear
, _zFar
);
1731 return NextCmdAddress
<ValueType
>(cmd
);
1734 gpu::CommandHeader header
;
1739 COMPILE_ASSERT(sizeof(DepthRangef
) == 12, Sizeof_DepthRangef_is_not_12
);
1740 COMPILE_ASSERT(offsetof(DepthRangef
, header
) == 0,
1741 OffsetOf_DepthRangef_header_not_0
);
1742 COMPILE_ASSERT(offsetof(DepthRangef
, zNear
) == 4,
1743 OffsetOf_DepthRangef_zNear_not_4
);
1744 COMPILE_ASSERT(offsetof(DepthRangef
, zFar
) == 8,
1745 OffsetOf_DepthRangef_zFar_not_8
);
1747 struct DetachShader
{
1748 typedef DetachShader ValueType
;
1749 static const CommandId kCmdId
= kDetachShader
;
1750 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1751 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1753 static uint32_t ComputeSize() {
1754 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1757 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1759 void Init(GLuint _program
, GLuint _shader
) {
1765 void* Set(void* cmd
, GLuint _program
, GLuint _shader
) {
1766 static_cast<ValueType
*>(cmd
)->Init(_program
, _shader
);
1767 return NextCmdAddress
<ValueType
>(cmd
);
1770 gpu::CommandHeader header
;
1775 COMPILE_ASSERT(sizeof(DetachShader
) == 12, Sizeof_DetachShader_is_not_12
);
1776 COMPILE_ASSERT(offsetof(DetachShader
, header
) == 0,
1777 OffsetOf_DetachShader_header_not_0
);
1778 COMPILE_ASSERT(offsetof(DetachShader
, program
) == 4,
1779 OffsetOf_DetachShader_program_not_4
);
1780 COMPILE_ASSERT(offsetof(DetachShader
, shader
) == 8,
1781 OffsetOf_DetachShader_shader_not_8
);
1784 typedef Disable ValueType
;
1785 static const CommandId kCmdId
= kDisable
;
1786 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1787 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1789 static uint32_t ComputeSize() {
1790 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1793 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1795 void Init(GLenum _cap
) {
1800 void* Set(void* cmd
, GLenum _cap
) {
1801 static_cast<ValueType
*>(cmd
)->Init(_cap
);
1802 return NextCmdAddress
<ValueType
>(cmd
);
1805 gpu::CommandHeader header
;
1809 COMPILE_ASSERT(sizeof(Disable
) == 8, Sizeof_Disable_is_not_8
);
1810 COMPILE_ASSERT(offsetof(Disable
, header
) == 0, OffsetOf_Disable_header_not_0
);
1811 COMPILE_ASSERT(offsetof(Disable
, cap
) == 4, OffsetOf_Disable_cap_not_4
);
1813 struct DisableVertexAttribArray
{
1814 typedef DisableVertexAttribArray ValueType
;
1815 static const CommandId kCmdId
= kDisableVertexAttribArray
;
1816 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1817 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1819 static uint32_t ComputeSize() {
1820 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1823 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1825 void Init(GLuint _index
) {
1830 void* Set(void* cmd
, GLuint _index
) {
1831 static_cast<ValueType
*>(cmd
)->Init(_index
);
1832 return NextCmdAddress
<ValueType
>(cmd
);
1835 gpu::CommandHeader header
;
1839 COMPILE_ASSERT(sizeof(DisableVertexAttribArray
) == 8,
1840 Sizeof_DisableVertexAttribArray_is_not_8
);
1841 COMPILE_ASSERT(offsetof(DisableVertexAttribArray
, header
) == 0,
1842 OffsetOf_DisableVertexAttribArray_header_not_0
);
1843 COMPILE_ASSERT(offsetof(DisableVertexAttribArray
, index
) == 4,
1844 OffsetOf_DisableVertexAttribArray_index_not_4
);
1847 typedef DrawArrays ValueType
;
1848 static const CommandId kCmdId
= kDrawArrays
;
1849 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1850 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
1852 static uint32_t ComputeSize() {
1853 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1856 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1858 void Init(GLenum _mode
, GLint _first
, GLsizei _count
) {
1865 void* Set(void* cmd
, GLenum _mode
, GLint _first
, GLsizei _count
) {
1866 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
);
1867 return NextCmdAddress
<ValueType
>(cmd
);
1870 gpu::CommandHeader header
;
1876 COMPILE_ASSERT(sizeof(DrawArrays
) == 16, Sizeof_DrawArrays_is_not_16
);
1877 COMPILE_ASSERT(offsetof(DrawArrays
, header
) == 0,
1878 OffsetOf_DrawArrays_header_not_0
);
1879 COMPILE_ASSERT(offsetof(DrawArrays
, mode
) == 4, OffsetOf_DrawArrays_mode_not_4
);
1880 COMPILE_ASSERT(offsetof(DrawArrays
, first
) == 8,
1881 OffsetOf_DrawArrays_first_not_8
);
1882 COMPILE_ASSERT(offsetof(DrawArrays
, count
) == 12,
1883 OffsetOf_DrawArrays_count_not_12
);
1885 struct DrawElements
{
1886 typedef DrawElements ValueType
;
1887 static const CommandId kCmdId
= kDrawElements
;
1888 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(2);
1891 static uint32_t ComputeSize() {
1892 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1895 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1897 void Init(GLenum _mode
, GLsizei _count
, GLenum _type
, GLuint _index_offset
) {
1902 index_offset
= _index_offset
;
1905 void* Set(void* cmd
,
1909 GLuint _index_offset
) {
1910 static_cast<ValueType
*>(cmd
)->Init(_mode
, _count
, _type
, _index_offset
);
1911 return NextCmdAddress
<ValueType
>(cmd
);
1914 gpu::CommandHeader header
;
1918 uint32_t index_offset
;
1921 COMPILE_ASSERT(sizeof(DrawElements
) == 20, Sizeof_DrawElements_is_not_20
);
1922 COMPILE_ASSERT(offsetof(DrawElements
, header
) == 0,
1923 OffsetOf_DrawElements_header_not_0
);
1924 COMPILE_ASSERT(offsetof(DrawElements
, mode
) == 4,
1925 OffsetOf_DrawElements_mode_not_4
);
1926 COMPILE_ASSERT(offsetof(DrawElements
, count
) == 8,
1927 OffsetOf_DrawElements_count_not_8
);
1928 COMPILE_ASSERT(offsetof(DrawElements
, type
) == 12,
1929 OffsetOf_DrawElements_type_not_12
);
1930 COMPILE_ASSERT(offsetof(DrawElements
, index_offset
) == 16,
1931 OffsetOf_DrawElements_index_offset_not_16
);
1934 typedef Enable ValueType
;
1935 static const CommandId kCmdId
= kEnable
;
1936 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1937 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1939 static uint32_t ComputeSize() {
1940 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1943 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1945 void Init(GLenum _cap
) {
1950 void* Set(void* cmd
, GLenum _cap
) {
1951 static_cast<ValueType
*>(cmd
)->Init(_cap
);
1952 return NextCmdAddress
<ValueType
>(cmd
);
1955 gpu::CommandHeader header
;
1959 COMPILE_ASSERT(sizeof(Enable
) == 8, Sizeof_Enable_is_not_8
);
1960 COMPILE_ASSERT(offsetof(Enable
, header
) == 0, OffsetOf_Enable_header_not_0
);
1961 COMPILE_ASSERT(offsetof(Enable
, cap
) == 4, OffsetOf_Enable_cap_not_4
);
1963 struct EnableVertexAttribArray
{
1964 typedef EnableVertexAttribArray ValueType
;
1965 static const CommandId kCmdId
= kEnableVertexAttribArray
;
1966 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
1967 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
1969 static uint32_t ComputeSize() {
1970 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
1973 void SetHeader() { header
.SetCmd
<ValueType
>(); }
1975 void Init(GLuint _index
) {
1980 void* Set(void* cmd
, GLuint _index
) {
1981 static_cast<ValueType
*>(cmd
)->Init(_index
);
1982 return NextCmdAddress
<ValueType
>(cmd
);
1985 gpu::CommandHeader header
;
1989 COMPILE_ASSERT(sizeof(EnableVertexAttribArray
) == 8,
1990 Sizeof_EnableVertexAttribArray_is_not_8
);
1991 COMPILE_ASSERT(offsetof(EnableVertexAttribArray
, header
) == 0,
1992 OffsetOf_EnableVertexAttribArray_header_not_0
);
1993 COMPILE_ASSERT(offsetof(EnableVertexAttribArray
, index
) == 4,
1994 OffsetOf_EnableVertexAttribArray_index_not_4
);
1997 typedef Finish ValueType
;
1998 static const CommandId kCmdId
= kFinish
;
1999 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2000 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2002 static uint32_t ComputeSize() {
2003 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2006 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2008 void Init() { SetHeader(); }
2010 void* Set(void* cmd
) {
2011 static_cast<ValueType
*>(cmd
)->Init();
2012 return NextCmdAddress
<ValueType
>(cmd
);
2015 gpu::CommandHeader header
;
2018 COMPILE_ASSERT(sizeof(Finish
) == 4, Sizeof_Finish_is_not_4
);
2019 COMPILE_ASSERT(offsetof(Finish
, header
) == 0, OffsetOf_Finish_header_not_0
);
2022 typedef Flush ValueType
;
2023 static const CommandId kCmdId
= kFlush
;
2024 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2025 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2027 static uint32_t ComputeSize() {
2028 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2031 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2033 void Init() { SetHeader(); }
2035 void* Set(void* cmd
) {
2036 static_cast<ValueType
*>(cmd
)->Init();
2037 return NextCmdAddress
<ValueType
>(cmd
);
2040 gpu::CommandHeader header
;
2043 COMPILE_ASSERT(sizeof(Flush
) == 4, Sizeof_Flush_is_not_4
);
2044 COMPILE_ASSERT(offsetof(Flush
, header
) == 0, OffsetOf_Flush_header_not_0
);
2046 struct FramebufferRenderbuffer
{
2047 typedef FramebufferRenderbuffer ValueType
;
2048 static const CommandId kCmdId
= kFramebufferRenderbuffer
;
2049 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2050 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2052 static uint32_t ComputeSize() {
2053 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2056 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2058 void Init(GLenum _target
,
2060 GLenum _renderbuffertarget
,
2061 GLuint _renderbuffer
) {
2064 attachment
= _attachment
;
2065 renderbuffertarget
= _renderbuffertarget
;
2066 renderbuffer
= _renderbuffer
;
2069 void* Set(void* cmd
,
2072 GLenum _renderbuffertarget
,
2073 GLuint _renderbuffer
) {
2074 static_cast<ValueType
*>(cmd
)
2075 ->Init(_target
, _attachment
, _renderbuffertarget
, _renderbuffer
);
2076 return NextCmdAddress
<ValueType
>(cmd
);
2079 gpu::CommandHeader header
;
2081 uint32_t attachment
;
2082 uint32_t renderbuffertarget
;
2083 uint32_t renderbuffer
;
2086 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer
) == 20,
2087 Sizeof_FramebufferRenderbuffer_is_not_20
);
2088 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, header
) == 0,
2089 OffsetOf_FramebufferRenderbuffer_header_not_0
);
2090 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, target
) == 4,
2091 OffsetOf_FramebufferRenderbuffer_target_not_4
);
2092 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, attachment
) == 8,
2093 OffsetOf_FramebufferRenderbuffer_attachment_not_8
);
2094 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, renderbuffertarget
) == 12,
2095 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12
);
2096 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer
, renderbuffer
) == 16,
2097 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16
);
2099 struct FramebufferTexture2D
{
2100 typedef FramebufferTexture2D ValueType
;
2101 static const CommandId kCmdId
= kFramebufferTexture2D
;
2102 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2103 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
2105 static uint32_t ComputeSize() {
2106 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2109 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2111 void Init(GLenum _target
,
2117 attachment
= _attachment
;
2118 textarget
= _textarget
;
2122 void* Set(void* cmd
,
2127 static_cast<ValueType
*>(cmd
)
2128 ->Init(_target
, _attachment
, _textarget
, _texture
);
2129 return NextCmdAddress
<ValueType
>(cmd
);
2132 gpu::CommandHeader header
;
2134 uint32_t attachment
;
2137 static const int32_t level
= 0;
2140 COMPILE_ASSERT(sizeof(FramebufferTexture2D
) == 20,
2141 Sizeof_FramebufferTexture2D_is_not_20
);
2142 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, header
) == 0,
2143 OffsetOf_FramebufferTexture2D_header_not_0
);
2144 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, target
) == 4,
2145 OffsetOf_FramebufferTexture2D_target_not_4
);
2146 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, attachment
) == 8,
2147 OffsetOf_FramebufferTexture2D_attachment_not_8
);
2148 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, textarget
) == 12,
2149 OffsetOf_FramebufferTexture2D_textarget_not_12
);
2150 COMPILE_ASSERT(offsetof(FramebufferTexture2D
, texture
) == 16,
2151 OffsetOf_FramebufferTexture2D_texture_not_16
);
2154 typedef FrontFace ValueType
;
2155 static const CommandId kCmdId
= kFrontFace
;
2156 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2157 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2159 static uint32_t ComputeSize() {
2160 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2163 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2165 void Init(GLenum _mode
) {
2170 void* Set(void* cmd
, GLenum _mode
) {
2171 static_cast<ValueType
*>(cmd
)->Init(_mode
);
2172 return NextCmdAddress
<ValueType
>(cmd
);
2175 gpu::CommandHeader header
;
2179 COMPILE_ASSERT(sizeof(FrontFace
) == 8, Sizeof_FrontFace_is_not_8
);
2180 COMPILE_ASSERT(offsetof(FrontFace
, header
) == 0,
2181 OffsetOf_FrontFace_header_not_0
);
2182 COMPILE_ASSERT(offsetof(FrontFace
, mode
) == 4, OffsetOf_FrontFace_mode_not_4
);
2184 struct GenBuffersImmediate
{
2185 typedef GenBuffersImmediate ValueType
;
2186 static const CommandId kCmdId
= kGenBuffersImmediate
;
2187 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2188 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2190 static uint32_t ComputeDataSize(GLsizei n
) {
2191 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2194 static uint32_t ComputeSize(GLsizei n
) {
2195 return static_cast<uint32_t>(sizeof(ValueType
) +
2196 ComputeDataSize(n
)); // NOLINT
2199 void SetHeader(GLsizei n
) {
2200 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2203 void Init(GLsizei _n
, GLuint
* _buffers
) {
2206 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
2209 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
2210 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
2211 const uint32_t size
= ComputeSize(_n
);
2212 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2215 gpu::CommandHeader header
;
2219 COMPILE_ASSERT(sizeof(GenBuffersImmediate
) == 8,
2220 Sizeof_GenBuffersImmediate_is_not_8
);
2221 COMPILE_ASSERT(offsetof(GenBuffersImmediate
, header
) == 0,
2222 OffsetOf_GenBuffersImmediate_header_not_0
);
2223 COMPILE_ASSERT(offsetof(GenBuffersImmediate
, n
) == 4,
2224 OffsetOf_GenBuffersImmediate_n_not_4
);
2226 struct GenerateMipmap
{
2227 typedef GenerateMipmap ValueType
;
2228 static const CommandId kCmdId
= kGenerateMipmap
;
2229 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2230 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2232 static uint32_t ComputeSize() {
2233 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2236 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2238 void Init(GLenum _target
) {
2243 void* Set(void* cmd
, GLenum _target
) {
2244 static_cast<ValueType
*>(cmd
)->Init(_target
);
2245 return NextCmdAddress
<ValueType
>(cmd
);
2248 gpu::CommandHeader header
;
2252 COMPILE_ASSERT(sizeof(GenerateMipmap
) == 8, Sizeof_GenerateMipmap_is_not_8
);
2253 COMPILE_ASSERT(offsetof(GenerateMipmap
, header
) == 0,
2254 OffsetOf_GenerateMipmap_header_not_0
);
2255 COMPILE_ASSERT(offsetof(GenerateMipmap
, target
) == 4,
2256 OffsetOf_GenerateMipmap_target_not_4
);
2258 struct GenFramebuffersImmediate
{
2259 typedef GenFramebuffersImmediate ValueType
;
2260 static const CommandId kCmdId
= kGenFramebuffersImmediate
;
2261 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2262 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2264 static uint32_t ComputeDataSize(GLsizei n
) {
2265 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2268 static uint32_t ComputeSize(GLsizei n
) {
2269 return static_cast<uint32_t>(sizeof(ValueType
) +
2270 ComputeDataSize(n
)); // NOLINT
2273 void SetHeader(GLsizei n
) {
2274 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2277 void Init(GLsizei _n
, GLuint
* _framebuffers
) {
2280 memcpy(ImmediateDataAddress(this), _framebuffers
, ComputeDataSize(_n
));
2283 void* Set(void* cmd
, GLsizei _n
, GLuint
* _framebuffers
) {
2284 static_cast<ValueType
*>(cmd
)->Init(_n
, _framebuffers
);
2285 const uint32_t size
= ComputeSize(_n
);
2286 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2289 gpu::CommandHeader header
;
2293 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate
) == 8,
2294 Sizeof_GenFramebuffersImmediate_is_not_8
);
2295 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate
, header
) == 0,
2296 OffsetOf_GenFramebuffersImmediate_header_not_0
);
2297 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate
, n
) == 4,
2298 OffsetOf_GenFramebuffersImmediate_n_not_4
);
2300 struct GenRenderbuffersImmediate
{
2301 typedef GenRenderbuffersImmediate ValueType
;
2302 static const CommandId kCmdId
= kGenRenderbuffersImmediate
;
2303 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2304 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2306 static uint32_t ComputeDataSize(GLsizei n
) {
2307 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2310 static uint32_t ComputeSize(GLsizei n
) {
2311 return static_cast<uint32_t>(sizeof(ValueType
) +
2312 ComputeDataSize(n
)); // NOLINT
2315 void SetHeader(GLsizei n
) {
2316 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2319 void Init(GLsizei _n
, GLuint
* _renderbuffers
) {
2322 memcpy(ImmediateDataAddress(this), _renderbuffers
, ComputeDataSize(_n
));
2325 void* Set(void* cmd
, GLsizei _n
, GLuint
* _renderbuffers
) {
2326 static_cast<ValueType
*>(cmd
)->Init(_n
, _renderbuffers
);
2327 const uint32_t size
= ComputeSize(_n
);
2328 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2331 gpu::CommandHeader header
;
2335 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate
) == 8,
2336 Sizeof_GenRenderbuffersImmediate_is_not_8
);
2337 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate
, header
) == 0,
2338 OffsetOf_GenRenderbuffersImmediate_header_not_0
);
2339 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate
, n
) == 4,
2340 OffsetOf_GenRenderbuffersImmediate_n_not_4
);
2342 struct GenTexturesImmediate
{
2343 typedef GenTexturesImmediate ValueType
;
2344 static const CommandId kCmdId
= kGenTexturesImmediate
;
2345 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
2346 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2348 static uint32_t ComputeDataSize(GLsizei n
) {
2349 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
2352 static uint32_t ComputeSize(GLsizei n
) {
2353 return static_cast<uint32_t>(sizeof(ValueType
) +
2354 ComputeDataSize(n
)); // NOLINT
2357 void SetHeader(GLsizei n
) {
2358 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
2361 void Init(GLsizei _n
, GLuint
* _textures
) {
2364 memcpy(ImmediateDataAddress(this), _textures
, ComputeDataSize(_n
));
2367 void* Set(void* cmd
, GLsizei _n
, GLuint
* _textures
) {
2368 static_cast<ValueType
*>(cmd
)->Init(_n
, _textures
);
2369 const uint32_t size
= ComputeSize(_n
);
2370 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
2373 gpu::CommandHeader header
;
2377 COMPILE_ASSERT(sizeof(GenTexturesImmediate
) == 8,
2378 Sizeof_GenTexturesImmediate_is_not_8
);
2379 COMPILE_ASSERT(offsetof(GenTexturesImmediate
, header
) == 0,
2380 OffsetOf_GenTexturesImmediate_header_not_0
);
2381 COMPILE_ASSERT(offsetof(GenTexturesImmediate
, n
) == 4,
2382 OffsetOf_GenTexturesImmediate_n_not_4
);
2384 struct GetActiveAttrib
{
2385 typedef GetActiveAttrib ValueType
;
2386 static const CommandId kCmdId
= kGetActiveAttrib
;
2387 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2388 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2396 static uint32_t ComputeSize() {
2397 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2400 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2402 void Init(GLuint _program
,
2404 uint32_t _name_bucket_id
,
2405 uint32_t _result_shm_id
,
2406 uint32_t _result_shm_offset
) {
2410 name_bucket_id
= _name_bucket_id
;
2411 result_shm_id
= _result_shm_id
;
2412 result_shm_offset
= _result_shm_offset
;
2415 void* Set(void* cmd
,
2418 uint32_t _name_bucket_id
,
2419 uint32_t _result_shm_id
,
2420 uint32_t _result_shm_offset
) {
2421 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
2422 _result_shm_id
, _result_shm_offset
);
2423 return NextCmdAddress
<ValueType
>(cmd
);
2426 gpu::CommandHeader header
;
2429 uint32_t name_bucket_id
;
2430 uint32_t result_shm_id
;
2431 uint32_t result_shm_offset
;
2434 COMPILE_ASSERT(sizeof(GetActiveAttrib
) == 24, Sizeof_GetActiveAttrib_is_not_24
);
2435 COMPILE_ASSERT(offsetof(GetActiveAttrib
, header
) == 0,
2436 OffsetOf_GetActiveAttrib_header_not_0
);
2437 COMPILE_ASSERT(offsetof(GetActiveAttrib
, program
) == 4,
2438 OffsetOf_GetActiveAttrib_program_not_4
);
2439 COMPILE_ASSERT(offsetof(GetActiveAttrib
, index
) == 8,
2440 OffsetOf_GetActiveAttrib_index_not_8
);
2441 COMPILE_ASSERT(offsetof(GetActiveAttrib
, name_bucket_id
) == 12,
2442 OffsetOf_GetActiveAttrib_name_bucket_id_not_12
);
2443 COMPILE_ASSERT(offsetof(GetActiveAttrib
, result_shm_id
) == 16,
2444 OffsetOf_GetActiveAttrib_result_shm_id_not_16
);
2445 COMPILE_ASSERT(offsetof(GetActiveAttrib
, result_shm_offset
) == 20,
2446 OffsetOf_GetActiveAttrib_result_shm_offset_not_20
);
2447 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, success
) == 0,
2448 OffsetOf_GetActiveAttrib_Result_success_not_0
);
2449 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, size
) == 4,
2450 OffsetOf_GetActiveAttrib_Result_size_not_4
);
2451 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result
, type
) == 8,
2452 OffsetOf_GetActiveAttrib_Result_type_not_8
);
2454 struct GetActiveUniform
{
2455 typedef GetActiveUniform ValueType
;
2456 static const CommandId kCmdId
= kGetActiveUniform
;
2457 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2458 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2466 static uint32_t ComputeSize() {
2467 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2470 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2472 void Init(GLuint _program
,
2474 uint32_t _name_bucket_id
,
2475 uint32_t _result_shm_id
,
2476 uint32_t _result_shm_offset
) {
2480 name_bucket_id
= _name_bucket_id
;
2481 result_shm_id
= _result_shm_id
;
2482 result_shm_offset
= _result_shm_offset
;
2485 void* Set(void* cmd
,
2488 uint32_t _name_bucket_id
,
2489 uint32_t _result_shm_id
,
2490 uint32_t _result_shm_offset
) {
2491 static_cast<ValueType
*>(cmd
)->Init(_program
, _index
, _name_bucket_id
,
2492 _result_shm_id
, _result_shm_offset
);
2493 return NextCmdAddress
<ValueType
>(cmd
);
2496 gpu::CommandHeader header
;
2499 uint32_t name_bucket_id
;
2500 uint32_t result_shm_id
;
2501 uint32_t result_shm_offset
;
2504 COMPILE_ASSERT(sizeof(GetActiveUniform
) == 24,
2505 Sizeof_GetActiveUniform_is_not_24
);
2506 COMPILE_ASSERT(offsetof(GetActiveUniform
, header
) == 0,
2507 OffsetOf_GetActiveUniform_header_not_0
);
2508 COMPILE_ASSERT(offsetof(GetActiveUniform
, program
) == 4,
2509 OffsetOf_GetActiveUniform_program_not_4
);
2510 COMPILE_ASSERT(offsetof(GetActiveUniform
, index
) == 8,
2511 OffsetOf_GetActiveUniform_index_not_8
);
2512 COMPILE_ASSERT(offsetof(GetActiveUniform
, name_bucket_id
) == 12,
2513 OffsetOf_GetActiveUniform_name_bucket_id_not_12
);
2514 COMPILE_ASSERT(offsetof(GetActiveUniform
, result_shm_id
) == 16,
2515 OffsetOf_GetActiveUniform_result_shm_id_not_16
);
2516 COMPILE_ASSERT(offsetof(GetActiveUniform
, result_shm_offset
) == 20,
2517 OffsetOf_GetActiveUniform_result_shm_offset_not_20
);
2518 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, success
) == 0,
2519 OffsetOf_GetActiveUniform_Result_success_not_0
);
2520 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, size
) == 4,
2521 OffsetOf_GetActiveUniform_Result_size_not_4
);
2522 COMPILE_ASSERT(offsetof(GetActiveUniform::Result
, type
) == 8,
2523 OffsetOf_GetActiveUniform_Result_type_not_8
);
2525 struct GetAttachedShaders
{
2526 typedef GetAttachedShaders ValueType
;
2527 static const CommandId kCmdId
= kGetAttachedShaders
;
2528 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2529 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2531 typedef SizedResult
<GLuint
> Result
;
2533 static uint32_t ComputeSize() {
2534 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2537 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2539 void Init(GLuint _program
,
2540 uint32_t _result_shm_id
,
2541 uint32_t _result_shm_offset
,
2542 uint32_t _result_size
) {
2545 result_shm_id
= _result_shm_id
;
2546 result_shm_offset
= _result_shm_offset
;
2547 result_size
= _result_size
;
2550 void* Set(void* cmd
,
2552 uint32_t _result_shm_id
,
2553 uint32_t _result_shm_offset
,
2554 uint32_t _result_size
) {
2555 static_cast<ValueType
*>(cmd
)
2556 ->Init(_program
, _result_shm_id
, _result_shm_offset
, _result_size
);
2557 return NextCmdAddress
<ValueType
>(cmd
);
2560 gpu::CommandHeader header
;
2562 uint32_t result_shm_id
;
2563 uint32_t result_shm_offset
;
2564 uint32_t result_size
;
2567 COMPILE_ASSERT(sizeof(GetAttachedShaders
) == 20,
2568 Sizeof_GetAttachedShaders_is_not_20
);
2569 COMPILE_ASSERT(offsetof(GetAttachedShaders
, header
) == 0,
2570 OffsetOf_GetAttachedShaders_header_not_0
);
2571 COMPILE_ASSERT(offsetof(GetAttachedShaders
, program
) == 4,
2572 OffsetOf_GetAttachedShaders_program_not_4
);
2573 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_shm_id
) == 8,
2574 OffsetOf_GetAttachedShaders_result_shm_id_not_8
);
2575 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_shm_offset
) == 12,
2576 OffsetOf_GetAttachedShaders_result_shm_offset_not_12
);
2577 COMPILE_ASSERT(offsetof(GetAttachedShaders
, result_size
) == 16,
2578 OffsetOf_GetAttachedShaders_result_size_not_16
);
2580 struct GetAttribLocation
{
2581 typedef GetAttribLocation ValueType
;
2582 static const CommandId kCmdId
= kGetAttribLocation
;
2583 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2584 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2586 typedef GLint Result
;
2588 static uint32_t ComputeSize() {
2589 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2592 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2594 void Init(GLuint _program
,
2595 uint32_t _name_bucket_id
,
2596 uint32_t _location_shm_id
,
2597 uint32_t _location_shm_offset
) {
2600 name_bucket_id
= _name_bucket_id
;
2601 location_shm_id
= _location_shm_id
;
2602 location_shm_offset
= _location_shm_offset
;
2605 void* Set(void* cmd
,
2607 uint32_t _name_bucket_id
,
2608 uint32_t _location_shm_id
,
2609 uint32_t _location_shm_offset
) {
2610 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
2611 _location_shm_id
, _location_shm_offset
);
2612 return NextCmdAddress
<ValueType
>(cmd
);
2615 gpu::CommandHeader header
;
2617 uint32_t name_bucket_id
;
2618 uint32_t location_shm_id
;
2619 uint32_t location_shm_offset
;
2622 COMPILE_ASSERT(sizeof(GetAttribLocation
) == 20,
2623 Sizeof_GetAttribLocation_is_not_20
);
2624 COMPILE_ASSERT(offsetof(GetAttribLocation
, header
) == 0,
2625 OffsetOf_GetAttribLocation_header_not_0
);
2626 COMPILE_ASSERT(offsetof(GetAttribLocation
, program
) == 4,
2627 OffsetOf_GetAttribLocation_program_not_4
);
2628 COMPILE_ASSERT(offsetof(GetAttribLocation
, name_bucket_id
) == 8,
2629 OffsetOf_GetAttribLocation_name_bucket_id_not_8
);
2630 COMPILE_ASSERT(offsetof(GetAttribLocation
, location_shm_id
) == 12,
2631 OffsetOf_GetAttribLocation_location_shm_id_not_12
);
2632 COMPILE_ASSERT(offsetof(GetAttribLocation
, location_shm_offset
) == 16,
2633 OffsetOf_GetAttribLocation_location_shm_offset_not_16
);
2635 struct GetBooleanv
{
2636 typedef GetBooleanv ValueType
;
2637 static const CommandId kCmdId
= kGetBooleanv
;
2638 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2639 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2641 typedef SizedResult
<GLboolean
> Result
;
2643 static uint32_t ComputeSize() {
2644 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2647 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2649 void Init(GLenum _pname
,
2650 uint32_t _params_shm_id
,
2651 uint32_t _params_shm_offset
) {
2654 params_shm_id
= _params_shm_id
;
2655 params_shm_offset
= _params_shm_offset
;
2658 void* Set(void* cmd
,
2660 uint32_t _params_shm_id
,
2661 uint32_t _params_shm_offset
) {
2662 static_cast<ValueType
*>(cmd
)
2663 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2664 return NextCmdAddress
<ValueType
>(cmd
);
2667 gpu::CommandHeader header
;
2669 uint32_t params_shm_id
;
2670 uint32_t params_shm_offset
;
2673 COMPILE_ASSERT(sizeof(GetBooleanv
) == 16, Sizeof_GetBooleanv_is_not_16
);
2674 COMPILE_ASSERT(offsetof(GetBooleanv
, header
) == 0,
2675 OffsetOf_GetBooleanv_header_not_0
);
2676 COMPILE_ASSERT(offsetof(GetBooleanv
, pname
) == 4,
2677 OffsetOf_GetBooleanv_pname_not_4
);
2678 COMPILE_ASSERT(offsetof(GetBooleanv
, params_shm_id
) == 8,
2679 OffsetOf_GetBooleanv_params_shm_id_not_8
);
2680 COMPILE_ASSERT(offsetof(GetBooleanv
, params_shm_offset
) == 12,
2681 OffsetOf_GetBooleanv_params_shm_offset_not_12
);
2683 struct GetBufferParameteriv
{
2684 typedef GetBufferParameteriv ValueType
;
2685 static const CommandId kCmdId
= kGetBufferParameteriv
;
2686 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2687 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2689 typedef SizedResult
<GLint
> Result
;
2691 static uint32_t ComputeSize() {
2692 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2695 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2697 void Init(GLenum _target
,
2699 uint32_t _params_shm_id
,
2700 uint32_t _params_shm_offset
) {
2704 params_shm_id
= _params_shm_id
;
2705 params_shm_offset
= _params_shm_offset
;
2708 void* Set(void* cmd
,
2711 uint32_t _params_shm_id
,
2712 uint32_t _params_shm_offset
) {
2713 static_cast<ValueType
*>(cmd
)
2714 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
2715 return NextCmdAddress
<ValueType
>(cmd
);
2718 gpu::CommandHeader header
;
2721 uint32_t params_shm_id
;
2722 uint32_t params_shm_offset
;
2725 COMPILE_ASSERT(sizeof(GetBufferParameteriv
) == 20,
2726 Sizeof_GetBufferParameteriv_is_not_20
);
2727 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, header
) == 0,
2728 OffsetOf_GetBufferParameteriv_header_not_0
);
2729 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, target
) == 4,
2730 OffsetOf_GetBufferParameteriv_target_not_4
);
2731 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, pname
) == 8,
2732 OffsetOf_GetBufferParameteriv_pname_not_8
);
2733 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, params_shm_id
) == 12,
2734 OffsetOf_GetBufferParameteriv_params_shm_id_not_12
);
2735 COMPILE_ASSERT(offsetof(GetBufferParameteriv
, params_shm_offset
) == 16,
2736 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16
);
2739 typedef GetError ValueType
;
2740 static const CommandId kCmdId
= kGetError
;
2741 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2742 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2744 typedef GLenum Result
;
2746 static uint32_t ComputeSize() {
2747 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2750 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2752 void Init(uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
2754 result_shm_id
= _result_shm_id
;
2755 result_shm_offset
= _result_shm_offset
;
2758 void* Set(void* cmd
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
2759 static_cast<ValueType
*>(cmd
)->Init(_result_shm_id
, _result_shm_offset
);
2760 return NextCmdAddress
<ValueType
>(cmd
);
2763 gpu::CommandHeader header
;
2764 uint32_t result_shm_id
;
2765 uint32_t result_shm_offset
;
2768 COMPILE_ASSERT(sizeof(GetError
) == 12, Sizeof_GetError_is_not_12
);
2769 COMPILE_ASSERT(offsetof(GetError
, header
) == 0, OffsetOf_GetError_header_not_0
);
2770 COMPILE_ASSERT(offsetof(GetError
, result_shm_id
) == 4,
2771 OffsetOf_GetError_result_shm_id_not_4
);
2772 COMPILE_ASSERT(offsetof(GetError
, result_shm_offset
) == 8,
2773 OffsetOf_GetError_result_shm_offset_not_8
);
2776 typedef GetFloatv ValueType
;
2777 static const CommandId kCmdId
= kGetFloatv
;
2778 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2779 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2781 typedef SizedResult
<GLfloat
> Result
;
2783 static uint32_t ComputeSize() {
2784 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2787 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2789 void Init(GLenum _pname
,
2790 uint32_t _params_shm_id
,
2791 uint32_t _params_shm_offset
) {
2794 params_shm_id
= _params_shm_id
;
2795 params_shm_offset
= _params_shm_offset
;
2798 void* Set(void* cmd
,
2800 uint32_t _params_shm_id
,
2801 uint32_t _params_shm_offset
) {
2802 static_cast<ValueType
*>(cmd
)
2803 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2804 return NextCmdAddress
<ValueType
>(cmd
);
2807 gpu::CommandHeader header
;
2809 uint32_t params_shm_id
;
2810 uint32_t params_shm_offset
;
2813 COMPILE_ASSERT(sizeof(GetFloatv
) == 16, Sizeof_GetFloatv_is_not_16
);
2814 COMPILE_ASSERT(offsetof(GetFloatv
, header
) == 0,
2815 OffsetOf_GetFloatv_header_not_0
);
2816 COMPILE_ASSERT(offsetof(GetFloatv
, pname
) == 4, OffsetOf_GetFloatv_pname_not_4
);
2817 COMPILE_ASSERT(offsetof(GetFloatv
, params_shm_id
) == 8,
2818 OffsetOf_GetFloatv_params_shm_id_not_8
);
2819 COMPILE_ASSERT(offsetof(GetFloatv
, params_shm_offset
) == 12,
2820 OffsetOf_GetFloatv_params_shm_offset_not_12
);
2822 struct GetFramebufferAttachmentParameteriv
{
2823 typedef GetFramebufferAttachmentParameteriv ValueType
;
2824 static const CommandId kCmdId
= kGetFramebufferAttachmentParameteriv
;
2825 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2826 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2828 typedef SizedResult
<GLint
> Result
;
2830 static uint32_t ComputeSize() {
2831 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2834 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2836 void Init(GLenum _target
,
2839 uint32_t _params_shm_id
,
2840 uint32_t _params_shm_offset
) {
2843 attachment
= _attachment
;
2845 params_shm_id
= _params_shm_id
;
2846 params_shm_offset
= _params_shm_offset
;
2849 void* Set(void* cmd
,
2853 uint32_t _params_shm_id
,
2854 uint32_t _params_shm_offset
) {
2855 static_cast<ValueType
*>(cmd
)->Init(_target
, _attachment
, _pname
,
2856 _params_shm_id
, _params_shm_offset
);
2857 return NextCmdAddress
<ValueType
>(cmd
);
2860 gpu::CommandHeader header
;
2862 uint32_t attachment
;
2864 uint32_t params_shm_id
;
2865 uint32_t params_shm_offset
;
2868 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv
) == 24,
2869 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24
);
2870 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, header
) == 0,
2871 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0
);
2872 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, target
) == 4,
2873 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4
);
2874 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, attachment
) == 8,
2875 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8
);
2876 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv
, pname
) == 12,
2877 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12
);
2879 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_id
) == 16,
2880 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16
);
2882 offsetof(GetFramebufferAttachmentParameteriv
, params_shm_offset
) == 20,
2883 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20
);
2885 struct GetIntegerv
{
2886 typedef GetIntegerv ValueType
;
2887 static const CommandId kCmdId
= kGetIntegerv
;
2888 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2891 typedef SizedResult
<GLint
> Result
;
2893 static uint32_t ComputeSize() {
2894 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2897 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2899 void Init(GLenum _pname
,
2900 uint32_t _params_shm_id
,
2901 uint32_t _params_shm_offset
) {
2904 params_shm_id
= _params_shm_id
;
2905 params_shm_offset
= _params_shm_offset
;
2908 void* Set(void* cmd
,
2910 uint32_t _params_shm_id
,
2911 uint32_t _params_shm_offset
) {
2912 static_cast<ValueType
*>(cmd
)
2913 ->Init(_pname
, _params_shm_id
, _params_shm_offset
);
2914 return NextCmdAddress
<ValueType
>(cmd
);
2917 gpu::CommandHeader header
;
2919 uint32_t params_shm_id
;
2920 uint32_t params_shm_offset
;
2923 COMPILE_ASSERT(sizeof(GetIntegerv
) == 16, Sizeof_GetIntegerv_is_not_16
);
2924 COMPILE_ASSERT(offsetof(GetIntegerv
, header
) == 0,
2925 OffsetOf_GetIntegerv_header_not_0
);
2926 COMPILE_ASSERT(offsetof(GetIntegerv
, pname
) == 4,
2927 OffsetOf_GetIntegerv_pname_not_4
);
2928 COMPILE_ASSERT(offsetof(GetIntegerv
, params_shm_id
) == 8,
2929 OffsetOf_GetIntegerv_params_shm_id_not_8
);
2930 COMPILE_ASSERT(offsetof(GetIntegerv
, params_shm_offset
) == 12,
2931 OffsetOf_GetIntegerv_params_shm_offset_not_12
);
2933 struct GetProgramiv
{
2934 typedef GetProgramiv ValueType
;
2935 static const CommandId kCmdId
= kGetProgramiv
;
2936 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2937 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2939 typedef SizedResult
<GLint
> Result
;
2941 static uint32_t ComputeSize() {
2942 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2945 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2947 void Init(GLuint _program
,
2949 uint32_t _params_shm_id
,
2950 uint32_t _params_shm_offset
) {
2954 params_shm_id
= _params_shm_id
;
2955 params_shm_offset
= _params_shm_offset
;
2958 void* Set(void* cmd
,
2961 uint32_t _params_shm_id
,
2962 uint32_t _params_shm_offset
) {
2963 static_cast<ValueType
*>(cmd
)
2964 ->Init(_program
, _pname
, _params_shm_id
, _params_shm_offset
);
2965 return NextCmdAddress
<ValueType
>(cmd
);
2968 gpu::CommandHeader header
;
2971 uint32_t params_shm_id
;
2972 uint32_t params_shm_offset
;
2975 COMPILE_ASSERT(sizeof(GetProgramiv
) == 20, Sizeof_GetProgramiv_is_not_20
);
2976 COMPILE_ASSERT(offsetof(GetProgramiv
, header
) == 0,
2977 OffsetOf_GetProgramiv_header_not_0
);
2978 COMPILE_ASSERT(offsetof(GetProgramiv
, program
) == 4,
2979 OffsetOf_GetProgramiv_program_not_4
);
2980 COMPILE_ASSERT(offsetof(GetProgramiv
, pname
) == 8,
2981 OffsetOf_GetProgramiv_pname_not_8
);
2982 COMPILE_ASSERT(offsetof(GetProgramiv
, params_shm_id
) == 12,
2983 OffsetOf_GetProgramiv_params_shm_id_not_12
);
2984 COMPILE_ASSERT(offsetof(GetProgramiv
, params_shm_offset
) == 16,
2985 OffsetOf_GetProgramiv_params_shm_offset_not_16
);
2987 struct GetProgramInfoLog
{
2988 typedef GetProgramInfoLog ValueType
;
2989 static const CommandId kCmdId
= kGetProgramInfoLog
;
2990 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
2991 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
2993 static uint32_t ComputeSize() {
2994 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
2997 void SetHeader() { header
.SetCmd
<ValueType
>(); }
2999 void Init(GLuint _program
, uint32_t _bucket_id
) {
3002 bucket_id
= _bucket_id
;
3005 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
3006 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
3007 return NextCmdAddress
<ValueType
>(cmd
);
3010 gpu::CommandHeader header
;
3015 COMPILE_ASSERT(sizeof(GetProgramInfoLog
) == 12,
3016 Sizeof_GetProgramInfoLog_is_not_12
);
3017 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, header
) == 0,
3018 OffsetOf_GetProgramInfoLog_header_not_0
);
3019 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, program
) == 4,
3020 OffsetOf_GetProgramInfoLog_program_not_4
);
3021 COMPILE_ASSERT(offsetof(GetProgramInfoLog
, bucket_id
) == 8,
3022 OffsetOf_GetProgramInfoLog_bucket_id_not_8
);
3024 struct GetRenderbufferParameteriv
{
3025 typedef GetRenderbufferParameteriv ValueType
;
3026 static const CommandId kCmdId
= kGetRenderbufferParameteriv
;
3027 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3028 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3030 typedef SizedResult
<GLint
> Result
;
3032 static uint32_t ComputeSize() {
3033 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3036 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3038 void Init(GLenum _target
,
3040 uint32_t _params_shm_id
,
3041 uint32_t _params_shm_offset
) {
3045 params_shm_id
= _params_shm_id
;
3046 params_shm_offset
= _params_shm_offset
;
3049 void* Set(void* cmd
,
3052 uint32_t _params_shm_id
,
3053 uint32_t _params_shm_offset
) {
3054 static_cast<ValueType
*>(cmd
)
3055 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3056 return NextCmdAddress
<ValueType
>(cmd
);
3059 gpu::CommandHeader header
;
3062 uint32_t params_shm_id
;
3063 uint32_t params_shm_offset
;
3066 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv
) == 20,
3067 Sizeof_GetRenderbufferParameteriv_is_not_20
);
3068 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, header
) == 0,
3069 OffsetOf_GetRenderbufferParameteriv_header_not_0
);
3070 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, target
) == 4,
3071 OffsetOf_GetRenderbufferParameteriv_target_not_4
);
3072 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, pname
) == 8,
3073 OffsetOf_GetRenderbufferParameteriv_pname_not_8
);
3074 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, params_shm_id
) == 12,
3075 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12
);
3076 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv
, params_shm_offset
) == 16,
3077 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16
);
3079 struct GetShaderiv
{
3080 typedef GetShaderiv ValueType
;
3081 static const CommandId kCmdId
= kGetShaderiv
;
3082 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3083 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3085 typedef SizedResult
<GLint
> Result
;
3087 static uint32_t ComputeSize() {
3088 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3091 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3093 void Init(GLuint _shader
,
3095 uint32_t _params_shm_id
,
3096 uint32_t _params_shm_offset
) {
3100 params_shm_id
= _params_shm_id
;
3101 params_shm_offset
= _params_shm_offset
;
3104 void* Set(void* cmd
,
3107 uint32_t _params_shm_id
,
3108 uint32_t _params_shm_offset
) {
3109 static_cast<ValueType
*>(cmd
)
3110 ->Init(_shader
, _pname
, _params_shm_id
, _params_shm_offset
);
3111 return NextCmdAddress
<ValueType
>(cmd
);
3114 gpu::CommandHeader header
;
3117 uint32_t params_shm_id
;
3118 uint32_t params_shm_offset
;
3121 COMPILE_ASSERT(sizeof(GetShaderiv
) == 20, Sizeof_GetShaderiv_is_not_20
);
3122 COMPILE_ASSERT(offsetof(GetShaderiv
, header
) == 0,
3123 OffsetOf_GetShaderiv_header_not_0
);
3124 COMPILE_ASSERT(offsetof(GetShaderiv
, shader
) == 4,
3125 OffsetOf_GetShaderiv_shader_not_4
);
3126 COMPILE_ASSERT(offsetof(GetShaderiv
, pname
) == 8,
3127 OffsetOf_GetShaderiv_pname_not_8
);
3128 COMPILE_ASSERT(offsetof(GetShaderiv
, params_shm_id
) == 12,
3129 OffsetOf_GetShaderiv_params_shm_id_not_12
);
3130 COMPILE_ASSERT(offsetof(GetShaderiv
, params_shm_offset
) == 16,
3131 OffsetOf_GetShaderiv_params_shm_offset_not_16
);
3133 struct GetShaderInfoLog
{
3134 typedef GetShaderInfoLog ValueType
;
3135 static const CommandId kCmdId
= kGetShaderInfoLog
;
3136 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3137 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3139 static uint32_t ComputeSize() {
3140 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3143 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3145 void Init(GLuint _shader
, uint32_t _bucket_id
) {
3148 bucket_id
= _bucket_id
;
3151 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
3152 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
3153 return NextCmdAddress
<ValueType
>(cmd
);
3156 gpu::CommandHeader header
;
3161 COMPILE_ASSERT(sizeof(GetShaderInfoLog
) == 12,
3162 Sizeof_GetShaderInfoLog_is_not_12
);
3163 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, header
) == 0,
3164 OffsetOf_GetShaderInfoLog_header_not_0
);
3165 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, shader
) == 4,
3166 OffsetOf_GetShaderInfoLog_shader_not_4
);
3167 COMPILE_ASSERT(offsetof(GetShaderInfoLog
, bucket_id
) == 8,
3168 OffsetOf_GetShaderInfoLog_bucket_id_not_8
);
3170 struct GetShaderPrecisionFormat
{
3171 typedef GetShaderPrecisionFormat ValueType
;
3172 static const CommandId kCmdId
= kGetShaderPrecisionFormat
;
3173 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3174 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3183 static uint32_t ComputeSize() {
3184 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3187 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3189 void Init(GLenum _shadertype
,
3190 GLenum _precisiontype
,
3191 uint32_t _result_shm_id
,
3192 uint32_t _result_shm_offset
) {
3194 shadertype
= _shadertype
;
3195 precisiontype
= _precisiontype
;
3196 result_shm_id
= _result_shm_id
;
3197 result_shm_offset
= _result_shm_offset
;
3200 void* Set(void* cmd
,
3202 GLenum _precisiontype
,
3203 uint32_t _result_shm_id
,
3204 uint32_t _result_shm_offset
) {
3205 static_cast<ValueType
*>(cmd
)
3206 ->Init(_shadertype
, _precisiontype
, _result_shm_id
, _result_shm_offset
);
3207 return NextCmdAddress
<ValueType
>(cmd
);
3210 gpu::CommandHeader header
;
3211 uint32_t shadertype
;
3212 uint32_t precisiontype
;
3213 uint32_t result_shm_id
;
3214 uint32_t result_shm_offset
;
3217 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat
) == 20,
3218 Sizeof_GetShaderPrecisionFormat_is_not_20
);
3219 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, header
) == 0,
3220 OffsetOf_GetShaderPrecisionFormat_header_not_0
);
3221 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, shadertype
) == 4,
3222 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4
);
3223 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, precisiontype
) == 8,
3224 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8
);
3225 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, result_shm_id
) == 12,
3226 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12
);
3227 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat
, result_shm_offset
) == 16,
3228 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16
);
3229 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, success
) == 0,
3230 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0
);
3231 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, min_range
) == 4,
3232 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4
);
3233 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, max_range
) == 8,
3234 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8
);
3235 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result
, precision
) == 12,
3236 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12
);
3238 struct GetShaderSource
{
3239 typedef GetShaderSource ValueType
;
3240 static const CommandId kCmdId
= kGetShaderSource
;
3241 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3242 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3244 static uint32_t ComputeSize() {
3245 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3248 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3250 void Init(GLuint _shader
, uint32_t _bucket_id
) {
3253 bucket_id
= _bucket_id
;
3256 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
3257 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
3258 return NextCmdAddress
<ValueType
>(cmd
);
3261 gpu::CommandHeader header
;
3266 COMPILE_ASSERT(sizeof(GetShaderSource
) == 12, Sizeof_GetShaderSource_is_not_12
);
3267 COMPILE_ASSERT(offsetof(GetShaderSource
, header
) == 0,
3268 OffsetOf_GetShaderSource_header_not_0
);
3269 COMPILE_ASSERT(offsetof(GetShaderSource
, shader
) == 4,
3270 OffsetOf_GetShaderSource_shader_not_4
);
3271 COMPILE_ASSERT(offsetof(GetShaderSource
, bucket_id
) == 8,
3272 OffsetOf_GetShaderSource_bucket_id_not_8
);
3275 typedef GetString ValueType
;
3276 static const CommandId kCmdId
= kGetString
;
3277 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3278 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3280 static uint32_t ComputeSize() {
3281 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3284 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3286 void Init(GLenum _name
, uint32_t _bucket_id
) {
3289 bucket_id
= _bucket_id
;
3292 void* Set(void* cmd
, GLenum _name
, uint32_t _bucket_id
) {
3293 static_cast<ValueType
*>(cmd
)->Init(_name
, _bucket_id
);
3294 return NextCmdAddress
<ValueType
>(cmd
);
3297 gpu::CommandHeader header
;
3302 COMPILE_ASSERT(sizeof(GetString
) == 12, Sizeof_GetString_is_not_12
);
3303 COMPILE_ASSERT(offsetof(GetString
, header
) == 0,
3304 OffsetOf_GetString_header_not_0
);
3305 COMPILE_ASSERT(offsetof(GetString
, name
) == 4, OffsetOf_GetString_name_not_4
);
3306 COMPILE_ASSERT(offsetof(GetString
, bucket_id
) == 8,
3307 OffsetOf_GetString_bucket_id_not_8
);
3309 struct GetTexParameterfv
{
3310 typedef GetTexParameterfv ValueType
;
3311 static const CommandId kCmdId
= kGetTexParameterfv
;
3312 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3313 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3315 typedef SizedResult
<GLfloat
> Result
;
3317 static uint32_t ComputeSize() {
3318 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3321 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3323 void Init(GLenum _target
,
3325 uint32_t _params_shm_id
,
3326 uint32_t _params_shm_offset
) {
3330 params_shm_id
= _params_shm_id
;
3331 params_shm_offset
= _params_shm_offset
;
3334 void* Set(void* cmd
,
3337 uint32_t _params_shm_id
,
3338 uint32_t _params_shm_offset
) {
3339 static_cast<ValueType
*>(cmd
)
3340 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3341 return NextCmdAddress
<ValueType
>(cmd
);
3344 gpu::CommandHeader header
;
3347 uint32_t params_shm_id
;
3348 uint32_t params_shm_offset
;
3351 COMPILE_ASSERT(sizeof(GetTexParameterfv
) == 20,
3352 Sizeof_GetTexParameterfv_is_not_20
);
3353 COMPILE_ASSERT(offsetof(GetTexParameterfv
, header
) == 0,
3354 OffsetOf_GetTexParameterfv_header_not_0
);
3355 COMPILE_ASSERT(offsetof(GetTexParameterfv
, target
) == 4,
3356 OffsetOf_GetTexParameterfv_target_not_4
);
3357 COMPILE_ASSERT(offsetof(GetTexParameterfv
, pname
) == 8,
3358 OffsetOf_GetTexParameterfv_pname_not_8
);
3359 COMPILE_ASSERT(offsetof(GetTexParameterfv
, params_shm_id
) == 12,
3360 OffsetOf_GetTexParameterfv_params_shm_id_not_12
);
3361 COMPILE_ASSERT(offsetof(GetTexParameterfv
, params_shm_offset
) == 16,
3362 OffsetOf_GetTexParameterfv_params_shm_offset_not_16
);
3364 struct GetTexParameteriv
{
3365 typedef GetTexParameteriv ValueType
;
3366 static const CommandId kCmdId
= kGetTexParameteriv
;
3367 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3368 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3370 typedef SizedResult
<GLint
> Result
;
3372 static uint32_t ComputeSize() {
3373 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3376 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3378 void Init(GLenum _target
,
3380 uint32_t _params_shm_id
,
3381 uint32_t _params_shm_offset
) {
3385 params_shm_id
= _params_shm_id
;
3386 params_shm_offset
= _params_shm_offset
;
3389 void* Set(void* cmd
,
3392 uint32_t _params_shm_id
,
3393 uint32_t _params_shm_offset
) {
3394 static_cast<ValueType
*>(cmd
)
3395 ->Init(_target
, _pname
, _params_shm_id
, _params_shm_offset
);
3396 return NextCmdAddress
<ValueType
>(cmd
);
3399 gpu::CommandHeader header
;
3402 uint32_t params_shm_id
;
3403 uint32_t params_shm_offset
;
3406 COMPILE_ASSERT(sizeof(GetTexParameteriv
) == 20,
3407 Sizeof_GetTexParameteriv_is_not_20
);
3408 COMPILE_ASSERT(offsetof(GetTexParameteriv
, header
) == 0,
3409 OffsetOf_GetTexParameteriv_header_not_0
);
3410 COMPILE_ASSERT(offsetof(GetTexParameteriv
, target
) == 4,
3411 OffsetOf_GetTexParameteriv_target_not_4
);
3412 COMPILE_ASSERT(offsetof(GetTexParameteriv
, pname
) == 8,
3413 OffsetOf_GetTexParameteriv_pname_not_8
);
3414 COMPILE_ASSERT(offsetof(GetTexParameteriv
, params_shm_id
) == 12,
3415 OffsetOf_GetTexParameteriv_params_shm_id_not_12
);
3416 COMPILE_ASSERT(offsetof(GetTexParameteriv
, params_shm_offset
) == 16,
3417 OffsetOf_GetTexParameteriv_params_shm_offset_not_16
);
3419 struct GetUniformfv
{
3420 typedef GetUniformfv ValueType
;
3421 static const CommandId kCmdId
= kGetUniformfv
;
3422 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3423 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3425 typedef SizedResult
<GLfloat
> Result
;
3427 static uint32_t ComputeSize() {
3428 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3431 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3433 void Init(GLuint _program
,
3435 uint32_t _params_shm_id
,
3436 uint32_t _params_shm_offset
) {
3439 location
= _location
;
3440 params_shm_id
= _params_shm_id
;
3441 params_shm_offset
= _params_shm_offset
;
3444 void* Set(void* cmd
,
3447 uint32_t _params_shm_id
,
3448 uint32_t _params_shm_offset
) {
3449 static_cast<ValueType
*>(cmd
)
3450 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
3451 return NextCmdAddress
<ValueType
>(cmd
);
3454 gpu::CommandHeader header
;
3457 uint32_t params_shm_id
;
3458 uint32_t params_shm_offset
;
3461 COMPILE_ASSERT(sizeof(GetUniformfv
) == 20, Sizeof_GetUniformfv_is_not_20
);
3462 COMPILE_ASSERT(offsetof(GetUniformfv
, header
) == 0,
3463 OffsetOf_GetUniformfv_header_not_0
);
3464 COMPILE_ASSERT(offsetof(GetUniformfv
, program
) == 4,
3465 OffsetOf_GetUniformfv_program_not_4
);
3466 COMPILE_ASSERT(offsetof(GetUniformfv
, location
) == 8,
3467 OffsetOf_GetUniformfv_location_not_8
);
3468 COMPILE_ASSERT(offsetof(GetUniformfv
, params_shm_id
) == 12,
3469 OffsetOf_GetUniformfv_params_shm_id_not_12
);
3470 COMPILE_ASSERT(offsetof(GetUniformfv
, params_shm_offset
) == 16,
3471 OffsetOf_GetUniformfv_params_shm_offset_not_16
);
3473 struct GetUniformiv
{
3474 typedef GetUniformiv ValueType
;
3475 static const CommandId kCmdId
= kGetUniformiv
;
3476 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3477 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3479 typedef SizedResult
<GLint
> Result
;
3481 static uint32_t ComputeSize() {
3482 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3485 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3487 void Init(GLuint _program
,
3489 uint32_t _params_shm_id
,
3490 uint32_t _params_shm_offset
) {
3493 location
= _location
;
3494 params_shm_id
= _params_shm_id
;
3495 params_shm_offset
= _params_shm_offset
;
3498 void* Set(void* cmd
,
3501 uint32_t _params_shm_id
,
3502 uint32_t _params_shm_offset
) {
3503 static_cast<ValueType
*>(cmd
)
3504 ->Init(_program
, _location
, _params_shm_id
, _params_shm_offset
);
3505 return NextCmdAddress
<ValueType
>(cmd
);
3508 gpu::CommandHeader header
;
3511 uint32_t params_shm_id
;
3512 uint32_t params_shm_offset
;
3515 COMPILE_ASSERT(sizeof(GetUniformiv
) == 20, Sizeof_GetUniformiv_is_not_20
);
3516 COMPILE_ASSERT(offsetof(GetUniformiv
, header
) == 0,
3517 OffsetOf_GetUniformiv_header_not_0
);
3518 COMPILE_ASSERT(offsetof(GetUniformiv
, program
) == 4,
3519 OffsetOf_GetUniformiv_program_not_4
);
3520 COMPILE_ASSERT(offsetof(GetUniformiv
, location
) == 8,
3521 OffsetOf_GetUniformiv_location_not_8
);
3522 COMPILE_ASSERT(offsetof(GetUniformiv
, params_shm_id
) == 12,
3523 OffsetOf_GetUniformiv_params_shm_id_not_12
);
3524 COMPILE_ASSERT(offsetof(GetUniformiv
, params_shm_offset
) == 16,
3525 OffsetOf_GetUniformiv_params_shm_offset_not_16
);
3527 struct GetUniformLocation
{
3528 typedef GetUniformLocation ValueType
;
3529 static const CommandId kCmdId
= kGetUniformLocation
;
3530 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3531 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3533 typedef GLint Result
;
3535 static uint32_t ComputeSize() {
3536 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3539 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3541 void Init(GLuint _program
,
3542 uint32_t _name_bucket_id
,
3543 uint32_t _location_shm_id
,
3544 uint32_t _location_shm_offset
) {
3547 name_bucket_id
= _name_bucket_id
;
3548 location_shm_id
= _location_shm_id
;
3549 location_shm_offset
= _location_shm_offset
;
3552 void* Set(void* cmd
,
3554 uint32_t _name_bucket_id
,
3555 uint32_t _location_shm_id
,
3556 uint32_t _location_shm_offset
) {
3557 static_cast<ValueType
*>(cmd
)->Init(_program
, _name_bucket_id
,
3558 _location_shm_id
, _location_shm_offset
);
3559 return NextCmdAddress
<ValueType
>(cmd
);
3562 gpu::CommandHeader header
;
3564 uint32_t name_bucket_id
;
3565 uint32_t location_shm_id
;
3566 uint32_t location_shm_offset
;
3569 COMPILE_ASSERT(sizeof(GetUniformLocation
) == 20,
3570 Sizeof_GetUniformLocation_is_not_20
);
3571 COMPILE_ASSERT(offsetof(GetUniformLocation
, header
) == 0,
3572 OffsetOf_GetUniformLocation_header_not_0
);
3573 COMPILE_ASSERT(offsetof(GetUniformLocation
, program
) == 4,
3574 OffsetOf_GetUniformLocation_program_not_4
);
3575 COMPILE_ASSERT(offsetof(GetUniformLocation
, name_bucket_id
) == 8,
3576 OffsetOf_GetUniformLocation_name_bucket_id_not_8
);
3577 COMPILE_ASSERT(offsetof(GetUniformLocation
, location_shm_id
) == 12,
3578 OffsetOf_GetUniformLocation_location_shm_id_not_12
);
3579 COMPILE_ASSERT(offsetof(GetUniformLocation
, location_shm_offset
) == 16,
3580 OffsetOf_GetUniformLocation_location_shm_offset_not_16
);
3582 struct GetVertexAttribfv
{
3583 typedef GetVertexAttribfv ValueType
;
3584 static const CommandId kCmdId
= kGetVertexAttribfv
;
3585 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3586 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3588 typedef SizedResult
<GLfloat
> Result
;
3590 static uint32_t ComputeSize() {
3591 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3594 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3596 void Init(GLuint _index
,
3598 uint32_t _params_shm_id
,
3599 uint32_t _params_shm_offset
) {
3603 params_shm_id
= _params_shm_id
;
3604 params_shm_offset
= _params_shm_offset
;
3607 void* Set(void* cmd
,
3610 uint32_t _params_shm_id
,
3611 uint32_t _params_shm_offset
) {
3612 static_cast<ValueType
*>(cmd
)
3613 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
3614 return NextCmdAddress
<ValueType
>(cmd
);
3617 gpu::CommandHeader header
;
3620 uint32_t params_shm_id
;
3621 uint32_t params_shm_offset
;
3624 COMPILE_ASSERT(sizeof(GetVertexAttribfv
) == 20,
3625 Sizeof_GetVertexAttribfv_is_not_20
);
3626 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, header
) == 0,
3627 OffsetOf_GetVertexAttribfv_header_not_0
);
3628 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, index
) == 4,
3629 OffsetOf_GetVertexAttribfv_index_not_4
);
3630 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, pname
) == 8,
3631 OffsetOf_GetVertexAttribfv_pname_not_8
);
3632 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, params_shm_id
) == 12,
3633 OffsetOf_GetVertexAttribfv_params_shm_id_not_12
);
3634 COMPILE_ASSERT(offsetof(GetVertexAttribfv
, params_shm_offset
) == 16,
3635 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16
);
3637 struct GetVertexAttribiv
{
3638 typedef GetVertexAttribiv ValueType
;
3639 static const CommandId kCmdId
= kGetVertexAttribiv
;
3640 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3641 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3643 typedef SizedResult
<GLint
> Result
;
3645 static uint32_t ComputeSize() {
3646 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3649 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3651 void Init(GLuint _index
,
3653 uint32_t _params_shm_id
,
3654 uint32_t _params_shm_offset
) {
3658 params_shm_id
= _params_shm_id
;
3659 params_shm_offset
= _params_shm_offset
;
3662 void* Set(void* cmd
,
3665 uint32_t _params_shm_id
,
3666 uint32_t _params_shm_offset
) {
3667 static_cast<ValueType
*>(cmd
)
3668 ->Init(_index
, _pname
, _params_shm_id
, _params_shm_offset
);
3669 return NextCmdAddress
<ValueType
>(cmd
);
3672 gpu::CommandHeader header
;
3675 uint32_t params_shm_id
;
3676 uint32_t params_shm_offset
;
3679 COMPILE_ASSERT(sizeof(GetVertexAttribiv
) == 20,
3680 Sizeof_GetVertexAttribiv_is_not_20
);
3681 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, header
) == 0,
3682 OffsetOf_GetVertexAttribiv_header_not_0
);
3683 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, index
) == 4,
3684 OffsetOf_GetVertexAttribiv_index_not_4
);
3685 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, pname
) == 8,
3686 OffsetOf_GetVertexAttribiv_pname_not_8
);
3687 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, params_shm_id
) == 12,
3688 OffsetOf_GetVertexAttribiv_params_shm_id_not_12
);
3689 COMPILE_ASSERT(offsetof(GetVertexAttribiv
, params_shm_offset
) == 16,
3690 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16
);
3692 struct GetVertexAttribPointerv
{
3693 typedef GetVertexAttribPointerv ValueType
;
3694 static const CommandId kCmdId
= kGetVertexAttribPointerv
;
3695 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3696 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3698 typedef SizedResult
<GLuint
> Result
;
3700 static uint32_t ComputeSize() {
3701 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3704 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3706 void Init(GLuint _index
,
3708 uint32_t _pointer_shm_id
,
3709 uint32_t _pointer_shm_offset
) {
3713 pointer_shm_id
= _pointer_shm_id
;
3714 pointer_shm_offset
= _pointer_shm_offset
;
3717 void* Set(void* cmd
,
3720 uint32_t _pointer_shm_id
,
3721 uint32_t _pointer_shm_offset
) {
3722 static_cast<ValueType
*>(cmd
)
3723 ->Init(_index
, _pname
, _pointer_shm_id
, _pointer_shm_offset
);
3724 return NextCmdAddress
<ValueType
>(cmd
);
3727 gpu::CommandHeader header
;
3730 uint32_t pointer_shm_id
;
3731 uint32_t pointer_shm_offset
;
3734 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv
) == 20,
3735 Sizeof_GetVertexAttribPointerv_is_not_20
);
3736 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, header
) == 0,
3737 OffsetOf_GetVertexAttribPointerv_header_not_0
);
3738 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, index
) == 4,
3739 OffsetOf_GetVertexAttribPointerv_index_not_4
);
3740 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pname
) == 8,
3741 OffsetOf_GetVertexAttribPointerv_pname_not_8
);
3742 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pointer_shm_id
) == 12,
3743 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12
);
3744 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv
, pointer_shm_offset
) == 16,
3745 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16
);
3748 typedef Hint ValueType
;
3749 static const CommandId kCmdId
= kHint
;
3750 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3751 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3753 static uint32_t ComputeSize() {
3754 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3757 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3759 void Init(GLenum _target
, GLenum _mode
) {
3765 void* Set(void* cmd
, GLenum _target
, GLenum _mode
) {
3766 static_cast<ValueType
*>(cmd
)->Init(_target
, _mode
);
3767 return NextCmdAddress
<ValueType
>(cmd
);
3770 gpu::CommandHeader header
;
3775 COMPILE_ASSERT(sizeof(Hint
) == 12, Sizeof_Hint_is_not_12
);
3776 COMPILE_ASSERT(offsetof(Hint
, header
) == 0, OffsetOf_Hint_header_not_0
);
3777 COMPILE_ASSERT(offsetof(Hint
, target
) == 4, OffsetOf_Hint_target_not_4
);
3778 COMPILE_ASSERT(offsetof(Hint
, mode
) == 8, OffsetOf_Hint_mode_not_8
);
3781 typedef IsBuffer ValueType
;
3782 static const CommandId kCmdId
= kIsBuffer
;
3783 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3784 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3786 typedef uint32_t Result
;
3788 static uint32_t ComputeSize() {
3789 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3792 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3794 void Init(GLuint _buffer
,
3795 uint32_t _result_shm_id
,
3796 uint32_t _result_shm_offset
) {
3799 result_shm_id
= _result_shm_id
;
3800 result_shm_offset
= _result_shm_offset
;
3803 void* Set(void* cmd
,
3805 uint32_t _result_shm_id
,
3806 uint32_t _result_shm_offset
) {
3807 static_cast<ValueType
*>(cmd
)
3808 ->Init(_buffer
, _result_shm_id
, _result_shm_offset
);
3809 return NextCmdAddress
<ValueType
>(cmd
);
3812 gpu::CommandHeader header
;
3814 uint32_t result_shm_id
;
3815 uint32_t result_shm_offset
;
3818 COMPILE_ASSERT(sizeof(IsBuffer
) == 16, Sizeof_IsBuffer_is_not_16
);
3819 COMPILE_ASSERT(offsetof(IsBuffer
, header
) == 0, OffsetOf_IsBuffer_header_not_0
);
3820 COMPILE_ASSERT(offsetof(IsBuffer
, buffer
) == 4, OffsetOf_IsBuffer_buffer_not_4
);
3821 COMPILE_ASSERT(offsetof(IsBuffer
, result_shm_id
) == 8,
3822 OffsetOf_IsBuffer_result_shm_id_not_8
);
3823 COMPILE_ASSERT(offsetof(IsBuffer
, result_shm_offset
) == 12,
3824 OffsetOf_IsBuffer_result_shm_offset_not_12
);
3827 typedef IsEnabled ValueType
;
3828 static const CommandId kCmdId
= kIsEnabled
;
3829 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3830 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3832 typedef uint32_t Result
;
3834 static uint32_t ComputeSize() {
3835 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3838 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3840 void Init(GLenum _cap
, uint32_t _result_shm_id
, uint32_t _result_shm_offset
) {
3843 result_shm_id
= _result_shm_id
;
3844 result_shm_offset
= _result_shm_offset
;
3847 void* Set(void* cmd
,
3849 uint32_t _result_shm_id
,
3850 uint32_t _result_shm_offset
) {
3851 static_cast<ValueType
*>(cmd
)
3852 ->Init(_cap
, _result_shm_id
, _result_shm_offset
);
3853 return NextCmdAddress
<ValueType
>(cmd
);
3856 gpu::CommandHeader header
;
3858 uint32_t result_shm_id
;
3859 uint32_t result_shm_offset
;
3862 COMPILE_ASSERT(sizeof(IsEnabled
) == 16, Sizeof_IsEnabled_is_not_16
);
3863 COMPILE_ASSERT(offsetof(IsEnabled
, header
) == 0,
3864 OffsetOf_IsEnabled_header_not_0
);
3865 COMPILE_ASSERT(offsetof(IsEnabled
, cap
) == 4, OffsetOf_IsEnabled_cap_not_4
);
3866 COMPILE_ASSERT(offsetof(IsEnabled
, result_shm_id
) == 8,
3867 OffsetOf_IsEnabled_result_shm_id_not_8
);
3868 COMPILE_ASSERT(offsetof(IsEnabled
, result_shm_offset
) == 12,
3869 OffsetOf_IsEnabled_result_shm_offset_not_12
);
3871 struct IsFramebuffer
{
3872 typedef IsFramebuffer ValueType
;
3873 static const CommandId kCmdId
= kIsFramebuffer
;
3874 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3875 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3877 typedef uint32_t Result
;
3879 static uint32_t ComputeSize() {
3880 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3883 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3885 void Init(GLuint _framebuffer
,
3886 uint32_t _result_shm_id
,
3887 uint32_t _result_shm_offset
) {
3889 framebuffer
= _framebuffer
;
3890 result_shm_id
= _result_shm_id
;
3891 result_shm_offset
= _result_shm_offset
;
3894 void* Set(void* cmd
,
3895 GLuint _framebuffer
,
3896 uint32_t _result_shm_id
,
3897 uint32_t _result_shm_offset
) {
3898 static_cast<ValueType
*>(cmd
)
3899 ->Init(_framebuffer
, _result_shm_id
, _result_shm_offset
);
3900 return NextCmdAddress
<ValueType
>(cmd
);
3903 gpu::CommandHeader header
;
3904 uint32_t framebuffer
;
3905 uint32_t result_shm_id
;
3906 uint32_t result_shm_offset
;
3909 COMPILE_ASSERT(sizeof(IsFramebuffer
) == 16, Sizeof_IsFramebuffer_is_not_16
);
3910 COMPILE_ASSERT(offsetof(IsFramebuffer
, header
) == 0,
3911 OffsetOf_IsFramebuffer_header_not_0
);
3912 COMPILE_ASSERT(offsetof(IsFramebuffer
, framebuffer
) == 4,
3913 OffsetOf_IsFramebuffer_framebuffer_not_4
);
3914 COMPILE_ASSERT(offsetof(IsFramebuffer
, result_shm_id
) == 8,
3915 OffsetOf_IsFramebuffer_result_shm_id_not_8
);
3916 COMPILE_ASSERT(offsetof(IsFramebuffer
, result_shm_offset
) == 12,
3917 OffsetOf_IsFramebuffer_result_shm_offset_not_12
);
3920 typedef IsProgram ValueType
;
3921 static const CommandId kCmdId
= kIsProgram
;
3922 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3923 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3925 typedef uint32_t Result
;
3927 static uint32_t ComputeSize() {
3928 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3931 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3933 void Init(GLuint _program
,
3934 uint32_t _result_shm_id
,
3935 uint32_t _result_shm_offset
) {
3938 result_shm_id
= _result_shm_id
;
3939 result_shm_offset
= _result_shm_offset
;
3942 void* Set(void* cmd
,
3944 uint32_t _result_shm_id
,
3945 uint32_t _result_shm_offset
) {
3946 static_cast<ValueType
*>(cmd
)
3947 ->Init(_program
, _result_shm_id
, _result_shm_offset
);
3948 return NextCmdAddress
<ValueType
>(cmd
);
3951 gpu::CommandHeader header
;
3953 uint32_t result_shm_id
;
3954 uint32_t result_shm_offset
;
3957 COMPILE_ASSERT(sizeof(IsProgram
) == 16, Sizeof_IsProgram_is_not_16
);
3958 COMPILE_ASSERT(offsetof(IsProgram
, header
) == 0,
3959 OffsetOf_IsProgram_header_not_0
);
3960 COMPILE_ASSERT(offsetof(IsProgram
, program
) == 4,
3961 OffsetOf_IsProgram_program_not_4
);
3962 COMPILE_ASSERT(offsetof(IsProgram
, result_shm_id
) == 8,
3963 OffsetOf_IsProgram_result_shm_id_not_8
);
3964 COMPILE_ASSERT(offsetof(IsProgram
, result_shm_offset
) == 12,
3965 OffsetOf_IsProgram_result_shm_offset_not_12
);
3967 struct IsRenderbuffer
{
3968 typedef IsRenderbuffer ValueType
;
3969 static const CommandId kCmdId
= kIsRenderbuffer
;
3970 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
3971 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
3973 typedef uint32_t Result
;
3975 static uint32_t ComputeSize() {
3976 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
3979 void SetHeader() { header
.SetCmd
<ValueType
>(); }
3981 void Init(GLuint _renderbuffer
,
3982 uint32_t _result_shm_id
,
3983 uint32_t _result_shm_offset
) {
3985 renderbuffer
= _renderbuffer
;
3986 result_shm_id
= _result_shm_id
;
3987 result_shm_offset
= _result_shm_offset
;
3990 void* Set(void* cmd
,
3991 GLuint _renderbuffer
,
3992 uint32_t _result_shm_id
,
3993 uint32_t _result_shm_offset
) {
3994 static_cast<ValueType
*>(cmd
)
3995 ->Init(_renderbuffer
, _result_shm_id
, _result_shm_offset
);
3996 return NextCmdAddress
<ValueType
>(cmd
);
3999 gpu::CommandHeader header
;
4000 uint32_t renderbuffer
;
4001 uint32_t result_shm_id
;
4002 uint32_t result_shm_offset
;
4005 COMPILE_ASSERT(sizeof(IsRenderbuffer
) == 16, Sizeof_IsRenderbuffer_is_not_16
);
4006 COMPILE_ASSERT(offsetof(IsRenderbuffer
, header
) == 0,
4007 OffsetOf_IsRenderbuffer_header_not_0
);
4008 COMPILE_ASSERT(offsetof(IsRenderbuffer
, renderbuffer
) == 4,
4009 OffsetOf_IsRenderbuffer_renderbuffer_not_4
);
4010 COMPILE_ASSERT(offsetof(IsRenderbuffer
, result_shm_id
) == 8,
4011 OffsetOf_IsRenderbuffer_result_shm_id_not_8
);
4012 COMPILE_ASSERT(offsetof(IsRenderbuffer
, result_shm_offset
) == 12,
4013 OffsetOf_IsRenderbuffer_result_shm_offset_not_12
);
4016 typedef IsShader ValueType
;
4017 static const CommandId kCmdId
= kIsShader
;
4018 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4019 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4021 typedef uint32_t Result
;
4023 static uint32_t ComputeSize() {
4024 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4027 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4029 void Init(GLuint _shader
,
4030 uint32_t _result_shm_id
,
4031 uint32_t _result_shm_offset
) {
4034 result_shm_id
= _result_shm_id
;
4035 result_shm_offset
= _result_shm_offset
;
4038 void* Set(void* cmd
,
4040 uint32_t _result_shm_id
,
4041 uint32_t _result_shm_offset
) {
4042 static_cast<ValueType
*>(cmd
)
4043 ->Init(_shader
, _result_shm_id
, _result_shm_offset
);
4044 return NextCmdAddress
<ValueType
>(cmd
);
4047 gpu::CommandHeader header
;
4049 uint32_t result_shm_id
;
4050 uint32_t result_shm_offset
;
4053 COMPILE_ASSERT(sizeof(IsShader
) == 16, Sizeof_IsShader_is_not_16
);
4054 COMPILE_ASSERT(offsetof(IsShader
, header
) == 0, OffsetOf_IsShader_header_not_0
);
4055 COMPILE_ASSERT(offsetof(IsShader
, shader
) == 4, OffsetOf_IsShader_shader_not_4
);
4056 COMPILE_ASSERT(offsetof(IsShader
, result_shm_id
) == 8,
4057 OffsetOf_IsShader_result_shm_id_not_8
);
4058 COMPILE_ASSERT(offsetof(IsShader
, result_shm_offset
) == 12,
4059 OffsetOf_IsShader_result_shm_offset_not_12
);
4062 typedef IsTexture ValueType
;
4063 static const CommandId kCmdId
= kIsTexture
;
4064 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4065 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4067 typedef uint32_t Result
;
4069 static uint32_t ComputeSize() {
4070 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4073 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4075 void Init(GLuint _texture
,
4076 uint32_t _result_shm_id
,
4077 uint32_t _result_shm_offset
) {
4080 result_shm_id
= _result_shm_id
;
4081 result_shm_offset
= _result_shm_offset
;
4084 void* Set(void* cmd
,
4086 uint32_t _result_shm_id
,
4087 uint32_t _result_shm_offset
) {
4088 static_cast<ValueType
*>(cmd
)
4089 ->Init(_texture
, _result_shm_id
, _result_shm_offset
);
4090 return NextCmdAddress
<ValueType
>(cmd
);
4093 gpu::CommandHeader header
;
4095 uint32_t result_shm_id
;
4096 uint32_t result_shm_offset
;
4099 COMPILE_ASSERT(sizeof(IsTexture
) == 16, Sizeof_IsTexture_is_not_16
);
4100 COMPILE_ASSERT(offsetof(IsTexture
, header
) == 0,
4101 OffsetOf_IsTexture_header_not_0
);
4102 COMPILE_ASSERT(offsetof(IsTexture
, texture
) == 4,
4103 OffsetOf_IsTexture_texture_not_4
);
4104 COMPILE_ASSERT(offsetof(IsTexture
, result_shm_id
) == 8,
4105 OffsetOf_IsTexture_result_shm_id_not_8
);
4106 COMPILE_ASSERT(offsetof(IsTexture
, result_shm_offset
) == 12,
4107 OffsetOf_IsTexture_result_shm_offset_not_12
);
4110 typedef LineWidth ValueType
;
4111 static const CommandId kCmdId
= kLineWidth
;
4112 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4113 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4115 static uint32_t ComputeSize() {
4116 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4119 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4121 void Init(GLfloat _width
) {
4126 void* Set(void* cmd
, GLfloat _width
) {
4127 static_cast<ValueType
*>(cmd
)->Init(_width
);
4128 return NextCmdAddress
<ValueType
>(cmd
);
4131 gpu::CommandHeader header
;
4135 COMPILE_ASSERT(sizeof(LineWidth
) == 8, Sizeof_LineWidth_is_not_8
);
4136 COMPILE_ASSERT(offsetof(LineWidth
, header
) == 0,
4137 OffsetOf_LineWidth_header_not_0
);
4138 COMPILE_ASSERT(offsetof(LineWidth
, width
) == 4, OffsetOf_LineWidth_width_not_4
);
4140 struct LinkProgram
{
4141 typedef LinkProgram ValueType
;
4142 static const CommandId kCmdId
= kLinkProgram
;
4143 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4144 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4146 static uint32_t ComputeSize() {
4147 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4150 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4152 void Init(GLuint _program
) {
4157 void* Set(void* cmd
, GLuint _program
) {
4158 static_cast<ValueType
*>(cmd
)->Init(_program
);
4159 return NextCmdAddress
<ValueType
>(cmd
);
4162 gpu::CommandHeader header
;
4166 COMPILE_ASSERT(sizeof(LinkProgram
) == 8, Sizeof_LinkProgram_is_not_8
);
4167 COMPILE_ASSERT(offsetof(LinkProgram
, header
) == 0,
4168 OffsetOf_LinkProgram_header_not_0
);
4169 COMPILE_ASSERT(offsetof(LinkProgram
, program
) == 4,
4170 OffsetOf_LinkProgram_program_not_4
);
4172 struct PixelStorei
{
4173 typedef PixelStorei ValueType
;
4174 static const CommandId kCmdId
= kPixelStorei
;
4175 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4176 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4178 static uint32_t ComputeSize() {
4179 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4182 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4184 void Init(GLenum _pname
, GLint _param
) {
4190 void* Set(void* cmd
, GLenum _pname
, GLint _param
) {
4191 static_cast<ValueType
*>(cmd
)->Init(_pname
, _param
);
4192 return NextCmdAddress
<ValueType
>(cmd
);
4195 gpu::CommandHeader header
;
4200 COMPILE_ASSERT(sizeof(PixelStorei
) == 12, Sizeof_PixelStorei_is_not_12
);
4201 COMPILE_ASSERT(offsetof(PixelStorei
, header
) == 0,
4202 OffsetOf_PixelStorei_header_not_0
);
4203 COMPILE_ASSERT(offsetof(PixelStorei
, pname
) == 4,
4204 OffsetOf_PixelStorei_pname_not_4
);
4205 COMPILE_ASSERT(offsetof(PixelStorei
, param
) == 8,
4206 OffsetOf_PixelStorei_param_not_8
);
4208 struct PolygonOffset
{
4209 typedef PolygonOffset ValueType
;
4210 static const CommandId kCmdId
= kPolygonOffset
;
4211 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4212 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4214 static uint32_t ComputeSize() {
4215 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4218 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4220 void Init(GLfloat _factor
, GLfloat _units
) {
4226 void* Set(void* cmd
, GLfloat _factor
, GLfloat _units
) {
4227 static_cast<ValueType
*>(cmd
)->Init(_factor
, _units
);
4228 return NextCmdAddress
<ValueType
>(cmd
);
4231 gpu::CommandHeader header
;
4236 COMPILE_ASSERT(sizeof(PolygonOffset
) == 12, Sizeof_PolygonOffset_is_not_12
);
4237 COMPILE_ASSERT(offsetof(PolygonOffset
, header
) == 0,
4238 OffsetOf_PolygonOffset_header_not_0
);
4239 COMPILE_ASSERT(offsetof(PolygonOffset
, factor
) == 4,
4240 OffsetOf_PolygonOffset_factor_not_4
);
4241 COMPILE_ASSERT(offsetof(PolygonOffset
, units
) == 8,
4242 OffsetOf_PolygonOffset_units_not_8
);
4244 // ReadPixels has the result separated from the pixel buffer so that
4245 // it is easier to specify the result going to some specific place
4246 // that exactly fits the rectangle of pixels.
4248 typedef ReadPixels ValueType
;
4249 static const CommandId kCmdId
= kReadPixels
;
4250 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4251 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4253 typedef uint32_t Result
;
4255 static uint32_t ComputeSize() {
4256 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4259 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4267 uint32_t _pixels_shm_id
,
4268 uint32_t _pixels_shm_offset
,
4269 uint32_t _result_shm_id
,
4270 uint32_t _result_shm_offset
,
4279 pixels_shm_id
= _pixels_shm_id
;
4280 pixels_shm_offset
= _pixels_shm_offset
;
4281 result_shm_id
= _result_shm_id
;
4282 result_shm_offset
= _result_shm_offset
;
4286 void* Set(void* cmd
,
4293 uint32_t _pixels_shm_id
,
4294 uint32_t _pixels_shm_offset
,
4295 uint32_t _result_shm_id
,
4296 uint32_t _result_shm_offset
,
4298 static_cast<ValueType
*>(cmd
)
4299 ->Init(_x
, _y
, _width
, _height
, _format
, _type
, _pixels_shm_id
,
4300 _pixels_shm_offset
, _result_shm_id
, _result_shm_offset
, _async
);
4301 return NextCmdAddress
<ValueType
>(cmd
);
4304 gpu::CommandHeader header
;
4311 uint32_t pixels_shm_id
;
4312 uint32_t pixels_shm_offset
;
4313 uint32_t result_shm_id
;
4314 uint32_t result_shm_offset
;
4318 COMPILE_ASSERT(sizeof(ReadPixels
) == 48, Sizeof_ReadPixels_is_not_48
);
4319 COMPILE_ASSERT(offsetof(ReadPixels
, header
) == 0,
4320 OffsetOf_ReadPixels_header_not_0
);
4321 COMPILE_ASSERT(offsetof(ReadPixels
, x
) == 4, OffsetOf_ReadPixels_x_not_4
);
4322 COMPILE_ASSERT(offsetof(ReadPixels
, y
) == 8, OffsetOf_ReadPixels_y_not_8
);
4323 COMPILE_ASSERT(offsetof(ReadPixels
, width
) == 12,
4324 OffsetOf_ReadPixels_width_not_12
);
4325 COMPILE_ASSERT(offsetof(ReadPixels
, height
) == 16,
4326 OffsetOf_ReadPixels_height_not_16
);
4327 COMPILE_ASSERT(offsetof(ReadPixels
, format
) == 20,
4328 OffsetOf_ReadPixels_format_not_20
);
4329 COMPILE_ASSERT(offsetof(ReadPixels
, type
) == 24,
4330 OffsetOf_ReadPixels_type_not_24
);
4331 COMPILE_ASSERT(offsetof(ReadPixels
, pixels_shm_id
) == 28,
4332 OffsetOf_ReadPixels_pixels_shm_id_not_28
);
4333 COMPILE_ASSERT(offsetof(ReadPixels
, pixels_shm_offset
) == 32,
4334 OffsetOf_ReadPixels_pixels_shm_offset_not_32
);
4335 COMPILE_ASSERT(offsetof(ReadPixels
, result_shm_id
) == 36,
4336 OffsetOf_ReadPixels_result_shm_id_not_36
);
4337 COMPILE_ASSERT(offsetof(ReadPixels
, result_shm_offset
) == 40,
4338 OffsetOf_ReadPixels_result_shm_offset_not_40
);
4339 COMPILE_ASSERT(offsetof(ReadPixels
, async
) == 44,
4340 OffsetOf_ReadPixels_async_not_44
);
4342 struct ReleaseShaderCompiler
{
4343 typedef ReleaseShaderCompiler ValueType
;
4344 static const CommandId kCmdId
= kReleaseShaderCompiler
;
4345 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4346 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4348 static uint32_t ComputeSize() {
4349 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4352 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4354 void Init() { SetHeader(); }
4356 void* Set(void* cmd
) {
4357 static_cast<ValueType
*>(cmd
)->Init();
4358 return NextCmdAddress
<ValueType
>(cmd
);
4361 gpu::CommandHeader header
;
4364 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler
) == 4,
4365 Sizeof_ReleaseShaderCompiler_is_not_4
);
4366 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler
, header
) == 0,
4367 OffsetOf_ReleaseShaderCompiler_header_not_0
);
4369 struct RenderbufferStorage
{
4370 typedef RenderbufferStorage ValueType
;
4371 static const CommandId kCmdId
= kRenderbufferStorage
;
4372 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4373 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4375 static uint32_t ComputeSize() {
4376 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4379 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4381 void Init(GLenum _target
,
4382 GLenum _internalformat
,
4387 internalformat
= _internalformat
;
4392 void* Set(void* cmd
,
4394 GLenum _internalformat
,
4397 static_cast<ValueType
*>(cmd
)
4398 ->Init(_target
, _internalformat
, _width
, _height
);
4399 return NextCmdAddress
<ValueType
>(cmd
);
4402 gpu::CommandHeader header
;
4404 uint32_t internalformat
;
4409 COMPILE_ASSERT(sizeof(RenderbufferStorage
) == 20,
4410 Sizeof_RenderbufferStorage_is_not_20
);
4411 COMPILE_ASSERT(offsetof(RenderbufferStorage
, header
) == 0,
4412 OffsetOf_RenderbufferStorage_header_not_0
);
4413 COMPILE_ASSERT(offsetof(RenderbufferStorage
, target
) == 4,
4414 OffsetOf_RenderbufferStorage_target_not_4
);
4415 COMPILE_ASSERT(offsetof(RenderbufferStorage
, internalformat
) == 8,
4416 OffsetOf_RenderbufferStorage_internalformat_not_8
);
4417 COMPILE_ASSERT(offsetof(RenderbufferStorage
, width
) == 12,
4418 OffsetOf_RenderbufferStorage_width_not_12
);
4419 COMPILE_ASSERT(offsetof(RenderbufferStorage
, height
) == 16,
4420 OffsetOf_RenderbufferStorage_height_not_16
);
4422 struct SampleCoverage
{
4423 typedef SampleCoverage ValueType
;
4424 static const CommandId kCmdId
= kSampleCoverage
;
4425 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4426 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4428 static uint32_t ComputeSize() {
4429 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4432 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4434 void Init(GLclampf _value
, GLboolean _invert
) {
4440 void* Set(void* cmd
, GLclampf _value
, GLboolean _invert
) {
4441 static_cast<ValueType
*>(cmd
)->Init(_value
, _invert
);
4442 return NextCmdAddress
<ValueType
>(cmd
);
4445 gpu::CommandHeader header
;
4450 COMPILE_ASSERT(sizeof(SampleCoverage
) == 12, Sizeof_SampleCoverage_is_not_12
);
4451 COMPILE_ASSERT(offsetof(SampleCoverage
, header
) == 0,
4452 OffsetOf_SampleCoverage_header_not_0
);
4453 COMPILE_ASSERT(offsetof(SampleCoverage
, value
) == 4,
4454 OffsetOf_SampleCoverage_value_not_4
);
4455 COMPILE_ASSERT(offsetof(SampleCoverage
, invert
) == 8,
4456 OffsetOf_SampleCoverage_invert_not_8
);
4459 typedef Scissor ValueType
;
4460 static const CommandId kCmdId
= kScissor
;
4461 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4462 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4464 static uint32_t ComputeSize() {
4465 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4468 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4470 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
4478 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
4479 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
4480 return NextCmdAddress
<ValueType
>(cmd
);
4483 gpu::CommandHeader header
;
4490 COMPILE_ASSERT(sizeof(Scissor
) == 20, Sizeof_Scissor_is_not_20
);
4491 COMPILE_ASSERT(offsetof(Scissor
, header
) == 0, OffsetOf_Scissor_header_not_0
);
4492 COMPILE_ASSERT(offsetof(Scissor
, x
) == 4, OffsetOf_Scissor_x_not_4
);
4493 COMPILE_ASSERT(offsetof(Scissor
, y
) == 8, OffsetOf_Scissor_y_not_8
);
4494 COMPILE_ASSERT(offsetof(Scissor
, width
) == 12, OffsetOf_Scissor_width_not_12
);
4495 COMPILE_ASSERT(offsetof(Scissor
, height
) == 16, OffsetOf_Scissor_height_not_16
);
4497 struct ShaderBinary
{
4498 typedef ShaderBinary ValueType
;
4499 static const CommandId kCmdId
= kShaderBinary
;
4500 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4501 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4503 static uint32_t ComputeSize() {
4504 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4507 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4509 void Init(GLsizei _n
,
4510 uint32_t _shaders_shm_id
,
4511 uint32_t _shaders_shm_offset
,
4512 GLenum _binaryformat
,
4513 uint32_t _binary_shm_id
,
4514 uint32_t _binary_shm_offset
,
4518 shaders_shm_id
= _shaders_shm_id
;
4519 shaders_shm_offset
= _shaders_shm_offset
;
4520 binaryformat
= _binaryformat
;
4521 binary_shm_id
= _binary_shm_id
;
4522 binary_shm_offset
= _binary_shm_offset
;
4526 void* Set(void* cmd
,
4528 uint32_t _shaders_shm_id
,
4529 uint32_t _shaders_shm_offset
,
4530 GLenum _binaryformat
,
4531 uint32_t _binary_shm_id
,
4532 uint32_t _binary_shm_offset
,
4534 static_cast<ValueType
*>(cmd
)->Init(_n
, _shaders_shm_id
, _shaders_shm_offset
,
4535 _binaryformat
, _binary_shm_id
,
4536 _binary_shm_offset
, _length
);
4537 return NextCmdAddress
<ValueType
>(cmd
);
4540 gpu::CommandHeader header
;
4542 uint32_t shaders_shm_id
;
4543 uint32_t shaders_shm_offset
;
4544 uint32_t binaryformat
;
4545 uint32_t binary_shm_id
;
4546 uint32_t binary_shm_offset
;
4550 COMPILE_ASSERT(sizeof(ShaderBinary
) == 32, Sizeof_ShaderBinary_is_not_32
);
4551 COMPILE_ASSERT(offsetof(ShaderBinary
, header
) == 0,
4552 OffsetOf_ShaderBinary_header_not_0
);
4553 COMPILE_ASSERT(offsetof(ShaderBinary
, n
) == 4, OffsetOf_ShaderBinary_n_not_4
);
4554 COMPILE_ASSERT(offsetof(ShaderBinary
, shaders_shm_id
) == 8,
4555 OffsetOf_ShaderBinary_shaders_shm_id_not_8
);
4556 COMPILE_ASSERT(offsetof(ShaderBinary
, shaders_shm_offset
) == 12,
4557 OffsetOf_ShaderBinary_shaders_shm_offset_not_12
);
4558 COMPILE_ASSERT(offsetof(ShaderBinary
, binaryformat
) == 16,
4559 OffsetOf_ShaderBinary_binaryformat_not_16
);
4560 COMPILE_ASSERT(offsetof(ShaderBinary
, binary_shm_id
) == 20,
4561 OffsetOf_ShaderBinary_binary_shm_id_not_20
);
4562 COMPILE_ASSERT(offsetof(ShaderBinary
, binary_shm_offset
) == 24,
4563 OffsetOf_ShaderBinary_binary_shm_offset_not_24
);
4564 COMPILE_ASSERT(offsetof(ShaderBinary
, length
) == 28,
4565 OffsetOf_ShaderBinary_length_not_28
);
4567 struct ShaderSourceBucket
{
4568 typedef ShaderSourceBucket ValueType
;
4569 static const CommandId kCmdId
= kShaderSourceBucket
;
4570 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4571 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4573 static uint32_t ComputeSize() {
4574 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4577 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4579 void Init(GLuint _shader
, uint32_t _data_bucket_id
) {
4582 data_bucket_id
= _data_bucket_id
;
4585 void* Set(void* cmd
, GLuint _shader
, uint32_t _data_bucket_id
) {
4586 static_cast<ValueType
*>(cmd
)->Init(_shader
, _data_bucket_id
);
4587 return NextCmdAddress
<ValueType
>(cmd
);
4590 gpu::CommandHeader header
;
4592 uint32_t data_bucket_id
;
4595 COMPILE_ASSERT(sizeof(ShaderSourceBucket
) == 12,
4596 Sizeof_ShaderSourceBucket_is_not_12
);
4597 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, header
) == 0,
4598 OffsetOf_ShaderSourceBucket_header_not_0
);
4599 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, shader
) == 4,
4600 OffsetOf_ShaderSourceBucket_shader_not_4
);
4601 COMPILE_ASSERT(offsetof(ShaderSourceBucket
, data_bucket_id
) == 8,
4602 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8
);
4604 struct StencilFunc
{
4605 typedef StencilFunc ValueType
;
4606 static const CommandId kCmdId
= kStencilFunc
;
4607 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4608 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4610 static uint32_t ComputeSize() {
4611 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4614 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4616 void Init(GLenum _func
, GLint _ref
, GLuint _mask
) {
4623 void* Set(void* cmd
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4624 static_cast<ValueType
*>(cmd
)->Init(_func
, _ref
, _mask
);
4625 return NextCmdAddress
<ValueType
>(cmd
);
4628 gpu::CommandHeader header
;
4634 COMPILE_ASSERT(sizeof(StencilFunc
) == 16, Sizeof_StencilFunc_is_not_16
);
4635 COMPILE_ASSERT(offsetof(StencilFunc
, header
) == 0,
4636 OffsetOf_StencilFunc_header_not_0
);
4637 COMPILE_ASSERT(offsetof(StencilFunc
, func
) == 4,
4638 OffsetOf_StencilFunc_func_not_4
);
4639 COMPILE_ASSERT(offsetof(StencilFunc
, ref
) == 8, OffsetOf_StencilFunc_ref_not_8
);
4640 COMPILE_ASSERT(offsetof(StencilFunc
, mask
) == 12,
4641 OffsetOf_StencilFunc_mask_not_12
);
4643 struct StencilFuncSeparate
{
4644 typedef StencilFuncSeparate ValueType
;
4645 static const CommandId kCmdId
= kStencilFuncSeparate
;
4646 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4647 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4649 static uint32_t ComputeSize() {
4650 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4653 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4655 void Init(GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4663 void* Set(void* cmd
, GLenum _face
, GLenum _func
, GLint _ref
, GLuint _mask
) {
4664 static_cast<ValueType
*>(cmd
)->Init(_face
, _func
, _ref
, _mask
);
4665 return NextCmdAddress
<ValueType
>(cmd
);
4668 gpu::CommandHeader header
;
4675 COMPILE_ASSERT(sizeof(StencilFuncSeparate
) == 20,
4676 Sizeof_StencilFuncSeparate_is_not_20
);
4677 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, header
) == 0,
4678 OffsetOf_StencilFuncSeparate_header_not_0
);
4679 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, face
) == 4,
4680 OffsetOf_StencilFuncSeparate_face_not_4
);
4681 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, func
) == 8,
4682 OffsetOf_StencilFuncSeparate_func_not_8
);
4683 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, ref
) == 12,
4684 OffsetOf_StencilFuncSeparate_ref_not_12
);
4685 COMPILE_ASSERT(offsetof(StencilFuncSeparate
, mask
) == 16,
4686 OffsetOf_StencilFuncSeparate_mask_not_16
);
4688 struct StencilMask
{
4689 typedef StencilMask ValueType
;
4690 static const CommandId kCmdId
= kStencilMask
;
4691 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4692 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4694 static uint32_t ComputeSize() {
4695 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4698 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4700 void Init(GLuint _mask
) {
4705 void* Set(void* cmd
, GLuint _mask
) {
4706 static_cast<ValueType
*>(cmd
)->Init(_mask
);
4707 return NextCmdAddress
<ValueType
>(cmd
);
4710 gpu::CommandHeader header
;
4714 COMPILE_ASSERT(sizeof(StencilMask
) == 8, Sizeof_StencilMask_is_not_8
);
4715 COMPILE_ASSERT(offsetof(StencilMask
, header
) == 0,
4716 OffsetOf_StencilMask_header_not_0
);
4717 COMPILE_ASSERT(offsetof(StencilMask
, mask
) == 4,
4718 OffsetOf_StencilMask_mask_not_4
);
4720 struct StencilMaskSeparate
{
4721 typedef StencilMaskSeparate ValueType
;
4722 static const CommandId kCmdId
= kStencilMaskSeparate
;
4723 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4724 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4726 static uint32_t ComputeSize() {
4727 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4730 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4732 void Init(GLenum _face
, GLuint _mask
) {
4738 void* Set(void* cmd
, GLenum _face
, GLuint _mask
) {
4739 static_cast<ValueType
*>(cmd
)->Init(_face
, _mask
);
4740 return NextCmdAddress
<ValueType
>(cmd
);
4743 gpu::CommandHeader header
;
4748 COMPILE_ASSERT(sizeof(StencilMaskSeparate
) == 12,
4749 Sizeof_StencilMaskSeparate_is_not_12
);
4750 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, header
) == 0,
4751 OffsetOf_StencilMaskSeparate_header_not_0
);
4752 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, face
) == 4,
4753 OffsetOf_StencilMaskSeparate_face_not_4
);
4754 COMPILE_ASSERT(offsetof(StencilMaskSeparate
, mask
) == 8,
4755 OffsetOf_StencilMaskSeparate_mask_not_8
);
4758 typedef StencilOp ValueType
;
4759 static const CommandId kCmdId
= kStencilOp
;
4760 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4761 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4763 static uint32_t ComputeSize() {
4764 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4767 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4769 void Init(GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4776 void* Set(void* cmd
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4777 static_cast<ValueType
*>(cmd
)->Init(_fail
, _zfail
, _zpass
);
4778 return NextCmdAddress
<ValueType
>(cmd
);
4781 gpu::CommandHeader header
;
4787 COMPILE_ASSERT(sizeof(StencilOp
) == 16, Sizeof_StencilOp_is_not_16
);
4788 COMPILE_ASSERT(offsetof(StencilOp
, header
) == 0,
4789 OffsetOf_StencilOp_header_not_0
);
4790 COMPILE_ASSERT(offsetof(StencilOp
, fail
) == 4, OffsetOf_StencilOp_fail_not_4
);
4791 COMPILE_ASSERT(offsetof(StencilOp
, zfail
) == 8, OffsetOf_StencilOp_zfail_not_8
);
4792 COMPILE_ASSERT(offsetof(StencilOp
, zpass
) == 12,
4793 OffsetOf_StencilOp_zpass_not_12
);
4795 struct StencilOpSeparate
{
4796 typedef StencilOpSeparate ValueType
;
4797 static const CommandId kCmdId
= kStencilOpSeparate
;
4798 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4799 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4801 static uint32_t ComputeSize() {
4802 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4805 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4807 void Init(GLenum _face
, GLenum _fail
, GLenum _zfail
, GLenum _zpass
) {
4815 void* Set(void* cmd
,
4820 static_cast<ValueType
*>(cmd
)->Init(_face
, _fail
, _zfail
, _zpass
);
4821 return NextCmdAddress
<ValueType
>(cmd
);
4824 gpu::CommandHeader header
;
4831 COMPILE_ASSERT(sizeof(StencilOpSeparate
) == 20,
4832 Sizeof_StencilOpSeparate_is_not_20
);
4833 COMPILE_ASSERT(offsetof(StencilOpSeparate
, header
) == 0,
4834 OffsetOf_StencilOpSeparate_header_not_0
);
4835 COMPILE_ASSERT(offsetof(StencilOpSeparate
, face
) == 4,
4836 OffsetOf_StencilOpSeparate_face_not_4
);
4837 COMPILE_ASSERT(offsetof(StencilOpSeparate
, fail
) == 8,
4838 OffsetOf_StencilOpSeparate_fail_not_8
);
4839 COMPILE_ASSERT(offsetof(StencilOpSeparate
, zfail
) == 12,
4840 OffsetOf_StencilOpSeparate_zfail_not_12
);
4841 COMPILE_ASSERT(offsetof(StencilOpSeparate
, zpass
) == 16,
4842 OffsetOf_StencilOpSeparate_zpass_not_16
);
4845 typedef TexImage2D ValueType
;
4846 static const CommandId kCmdId
= kTexImage2D
;
4847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4850 static uint32_t ComputeSize() {
4851 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4854 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4856 void Init(GLenum _target
,
4858 GLint _internalformat
,
4863 uint32_t _pixels_shm_id
,
4864 uint32_t _pixels_shm_offset
) {
4868 internalformat
= _internalformat
;
4873 pixels_shm_id
= _pixels_shm_id
;
4874 pixels_shm_offset
= _pixels_shm_offset
;
4877 void* Set(void* cmd
,
4880 GLint _internalformat
,
4885 uint32_t _pixels_shm_id
,
4886 uint32_t _pixels_shm_offset
) {
4887 static_cast<ValueType
*>(cmd
)->Init(_target
, _level
, _internalformat
, _width
,
4888 _height
, _format
, _type
, _pixels_shm_id
,
4889 _pixels_shm_offset
);
4890 return NextCmdAddress
<ValueType
>(cmd
);
4893 gpu::CommandHeader header
;
4896 int32_t internalformat
;
4901 uint32_t pixels_shm_id
;
4902 uint32_t pixels_shm_offset
;
4903 static const int32_t border
= 0;
4906 COMPILE_ASSERT(sizeof(TexImage2D
) == 40, Sizeof_TexImage2D_is_not_40
);
4907 COMPILE_ASSERT(offsetof(TexImage2D
, header
) == 0,
4908 OffsetOf_TexImage2D_header_not_0
);
4909 COMPILE_ASSERT(offsetof(TexImage2D
, target
) == 4,
4910 OffsetOf_TexImage2D_target_not_4
);
4911 COMPILE_ASSERT(offsetof(TexImage2D
, level
) == 8,
4912 OffsetOf_TexImage2D_level_not_8
);
4913 COMPILE_ASSERT(offsetof(TexImage2D
, internalformat
) == 12,
4914 OffsetOf_TexImage2D_internalformat_not_12
);
4915 COMPILE_ASSERT(offsetof(TexImage2D
, width
) == 16,
4916 OffsetOf_TexImage2D_width_not_16
);
4917 COMPILE_ASSERT(offsetof(TexImage2D
, height
) == 20,
4918 OffsetOf_TexImage2D_height_not_20
);
4919 COMPILE_ASSERT(offsetof(TexImage2D
, format
) == 24,
4920 OffsetOf_TexImage2D_format_not_24
);
4921 COMPILE_ASSERT(offsetof(TexImage2D
, type
) == 28,
4922 OffsetOf_TexImage2D_type_not_28
);
4923 COMPILE_ASSERT(offsetof(TexImage2D
, pixels_shm_id
) == 32,
4924 OffsetOf_TexImage2D_pixels_shm_id_not_32
);
4925 COMPILE_ASSERT(offsetof(TexImage2D
, pixels_shm_offset
) == 36,
4926 OffsetOf_TexImage2D_pixels_shm_offset_not_36
);
4928 struct TexParameterf
{
4929 typedef TexParameterf ValueType
;
4930 static const CommandId kCmdId
= kTexParameterf
;
4931 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
4932 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4934 static uint32_t ComputeSize() {
4935 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
4938 void SetHeader() { header
.SetCmd
<ValueType
>(); }
4940 void Init(GLenum _target
, GLenum _pname
, GLfloat _param
) {
4947 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLfloat _param
) {
4948 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
4949 return NextCmdAddress
<ValueType
>(cmd
);
4952 gpu::CommandHeader header
;
4958 COMPILE_ASSERT(sizeof(TexParameterf
) == 16, Sizeof_TexParameterf_is_not_16
);
4959 COMPILE_ASSERT(offsetof(TexParameterf
, header
) == 0,
4960 OffsetOf_TexParameterf_header_not_0
);
4961 COMPILE_ASSERT(offsetof(TexParameterf
, target
) == 4,
4962 OffsetOf_TexParameterf_target_not_4
);
4963 COMPILE_ASSERT(offsetof(TexParameterf
, pname
) == 8,
4964 OffsetOf_TexParameterf_pname_not_8
);
4965 COMPILE_ASSERT(offsetof(TexParameterf
, param
) == 12,
4966 OffsetOf_TexParameterf_param_not_12
);
4968 struct TexParameterfvImmediate
{
4969 typedef TexParameterfvImmediate ValueType
;
4970 static const CommandId kCmdId
= kTexParameterfvImmediate
;
4971 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
4972 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
4974 static uint32_t ComputeDataSize() {
4975 return static_cast<uint32_t>(sizeof(GLfloat
) * 1); // NOLINT
4978 static uint32_t ComputeSize() {
4979 return static_cast<uint32_t>(sizeof(ValueType
) +
4980 ComputeDataSize()); // NOLINT
4983 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
4985 void Init(GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
4989 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
4992 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLfloat
* _params
) {
4993 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
4994 const uint32_t size
= ComputeSize();
4995 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
4998 gpu::CommandHeader header
;
5003 COMPILE_ASSERT(sizeof(TexParameterfvImmediate
) == 12,
5004 Sizeof_TexParameterfvImmediate_is_not_12
);
5005 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, header
) == 0,
5006 OffsetOf_TexParameterfvImmediate_header_not_0
);
5007 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, target
) == 4,
5008 OffsetOf_TexParameterfvImmediate_target_not_4
);
5009 COMPILE_ASSERT(offsetof(TexParameterfvImmediate
, pname
) == 8,
5010 OffsetOf_TexParameterfvImmediate_pname_not_8
);
5012 struct TexParameteri
{
5013 typedef TexParameteri ValueType
;
5014 static const CommandId kCmdId
= kTexParameteri
;
5015 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5016 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5018 static uint32_t ComputeSize() {
5019 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5022 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5024 void Init(GLenum _target
, GLenum _pname
, GLint _param
) {
5031 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, GLint _param
) {
5032 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _param
);
5033 return NextCmdAddress
<ValueType
>(cmd
);
5036 gpu::CommandHeader header
;
5042 COMPILE_ASSERT(sizeof(TexParameteri
) == 16, Sizeof_TexParameteri_is_not_16
);
5043 COMPILE_ASSERT(offsetof(TexParameteri
, header
) == 0,
5044 OffsetOf_TexParameteri_header_not_0
);
5045 COMPILE_ASSERT(offsetof(TexParameteri
, target
) == 4,
5046 OffsetOf_TexParameteri_target_not_4
);
5047 COMPILE_ASSERT(offsetof(TexParameteri
, pname
) == 8,
5048 OffsetOf_TexParameteri_pname_not_8
);
5049 COMPILE_ASSERT(offsetof(TexParameteri
, param
) == 12,
5050 OffsetOf_TexParameteri_param_not_12
);
5052 struct TexParameterivImmediate
{
5053 typedef TexParameterivImmediate ValueType
;
5054 static const CommandId kCmdId
= kTexParameterivImmediate
;
5055 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5056 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5058 static uint32_t ComputeDataSize() {
5059 return static_cast<uint32_t>(sizeof(GLint
) * 1); // NOLINT
5062 static uint32_t ComputeSize() {
5063 return static_cast<uint32_t>(sizeof(ValueType
) +
5064 ComputeDataSize()); // NOLINT
5067 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
5069 void Init(GLenum _target
, GLenum _pname
, const GLint
* _params
) {
5073 memcpy(ImmediateDataAddress(this), _params
, ComputeDataSize());
5076 void* Set(void* cmd
, GLenum _target
, GLenum _pname
, const GLint
* _params
) {
5077 static_cast<ValueType
*>(cmd
)->Init(_target
, _pname
, _params
);
5078 const uint32_t size
= ComputeSize();
5079 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5082 gpu::CommandHeader header
;
5087 COMPILE_ASSERT(sizeof(TexParameterivImmediate
) == 12,
5088 Sizeof_TexParameterivImmediate_is_not_12
);
5089 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, header
) == 0,
5090 OffsetOf_TexParameterivImmediate_header_not_0
);
5091 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, target
) == 4,
5092 OffsetOf_TexParameterivImmediate_target_not_4
);
5093 COMPILE_ASSERT(offsetof(TexParameterivImmediate
, pname
) == 8,
5094 OffsetOf_TexParameterivImmediate_pname_not_8
);
5096 struct TexSubImage2D
{
5097 typedef TexSubImage2D ValueType
;
5098 static const CommandId kCmdId
= kTexSubImage2D
;
5099 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5100 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5102 static uint32_t ComputeSize() {
5103 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5106 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5108 void Init(GLenum _target
,
5116 uint32_t _pixels_shm_id
,
5117 uint32_t _pixels_shm_offset
,
5118 GLboolean _internal
) {
5128 pixels_shm_id
= _pixels_shm_id
;
5129 pixels_shm_offset
= _pixels_shm_offset
;
5130 internal
= _internal
;
5133 void* Set(void* cmd
,
5142 uint32_t _pixels_shm_id
,
5143 uint32_t _pixels_shm_offset
,
5144 GLboolean _internal
) {
5145 static_cast<ValueType
*>(cmd
)
5146 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
5147 _type
, _pixels_shm_id
, _pixels_shm_offset
, _internal
);
5148 return NextCmdAddress
<ValueType
>(cmd
);
5151 gpu::CommandHeader header
;
5160 uint32_t pixels_shm_id
;
5161 uint32_t pixels_shm_offset
;
5165 COMPILE_ASSERT(sizeof(TexSubImage2D
) == 48, Sizeof_TexSubImage2D_is_not_48
);
5166 COMPILE_ASSERT(offsetof(TexSubImage2D
, header
) == 0,
5167 OffsetOf_TexSubImage2D_header_not_0
);
5168 COMPILE_ASSERT(offsetof(TexSubImage2D
, target
) == 4,
5169 OffsetOf_TexSubImage2D_target_not_4
);
5170 COMPILE_ASSERT(offsetof(TexSubImage2D
, level
) == 8,
5171 OffsetOf_TexSubImage2D_level_not_8
);
5172 COMPILE_ASSERT(offsetof(TexSubImage2D
, xoffset
) == 12,
5173 OffsetOf_TexSubImage2D_xoffset_not_12
);
5174 COMPILE_ASSERT(offsetof(TexSubImage2D
, yoffset
) == 16,
5175 OffsetOf_TexSubImage2D_yoffset_not_16
);
5176 COMPILE_ASSERT(offsetof(TexSubImage2D
, width
) == 20,
5177 OffsetOf_TexSubImage2D_width_not_20
);
5178 COMPILE_ASSERT(offsetof(TexSubImage2D
, height
) == 24,
5179 OffsetOf_TexSubImage2D_height_not_24
);
5180 COMPILE_ASSERT(offsetof(TexSubImage2D
, format
) == 28,
5181 OffsetOf_TexSubImage2D_format_not_28
);
5182 COMPILE_ASSERT(offsetof(TexSubImage2D
, type
) == 32,
5183 OffsetOf_TexSubImage2D_type_not_32
);
5184 COMPILE_ASSERT(offsetof(TexSubImage2D
, pixels_shm_id
) == 36,
5185 OffsetOf_TexSubImage2D_pixels_shm_id_not_36
);
5186 COMPILE_ASSERT(offsetof(TexSubImage2D
, pixels_shm_offset
) == 40,
5187 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40
);
5188 COMPILE_ASSERT(offsetof(TexSubImage2D
, internal
) == 44,
5189 OffsetOf_TexSubImage2D_internal_not_44
);
5192 typedef Uniform1f ValueType
;
5193 static const CommandId kCmdId
= kUniform1f
;
5194 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5195 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5197 static uint32_t ComputeSize() {
5198 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5201 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5203 void Init(GLint _location
, GLfloat _x
) {
5205 location
= _location
;
5209 void* Set(void* cmd
, GLint _location
, GLfloat _x
) {
5210 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
5211 return NextCmdAddress
<ValueType
>(cmd
);
5214 gpu::CommandHeader header
;
5219 COMPILE_ASSERT(sizeof(Uniform1f
) == 12, Sizeof_Uniform1f_is_not_12
);
5220 COMPILE_ASSERT(offsetof(Uniform1f
, header
) == 0,
5221 OffsetOf_Uniform1f_header_not_0
);
5222 COMPILE_ASSERT(offsetof(Uniform1f
, location
) == 4,
5223 OffsetOf_Uniform1f_location_not_4
);
5224 COMPILE_ASSERT(offsetof(Uniform1f
, x
) == 8, OffsetOf_Uniform1f_x_not_8
);
5226 struct Uniform1fvImmediate
{
5227 typedef Uniform1fvImmediate ValueType
;
5228 static const CommandId kCmdId
= kUniform1fvImmediate
;
5229 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5230 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5232 static uint32_t ComputeDataSize(GLsizei count
) {
5233 return static_cast<uint32_t>(sizeof(GLfloat
) * 1 * count
); // NOLINT
5236 static uint32_t ComputeSize(GLsizei count
) {
5237 return static_cast<uint32_t>(sizeof(ValueType
) +
5238 ComputeDataSize(count
)); // NOLINT
5241 void SetHeader(GLsizei count
) {
5242 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5245 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5247 location
= _location
;
5249 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5252 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5253 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5254 const uint32_t size
= ComputeSize(_count
);
5255 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5258 gpu::CommandHeader header
;
5263 COMPILE_ASSERT(sizeof(Uniform1fvImmediate
) == 12,
5264 Sizeof_Uniform1fvImmediate_is_not_12
);
5265 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, header
) == 0,
5266 OffsetOf_Uniform1fvImmediate_header_not_0
);
5267 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, location
) == 4,
5268 OffsetOf_Uniform1fvImmediate_location_not_4
);
5269 COMPILE_ASSERT(offsetof(Uniform1fvImmediate
, count
) == 8,
5270 OffsetOf_Uniform1fvImmediate_count_not_8
);
5273 typedef Uniform1i ValueType
;
5274 static const CommandId kCmdId
= kUniform1i
;
5275 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5276 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5278 static uint32_t ComputeSize() {
5279 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5282 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5284 void Init(GLint _location
, GLint _x
) {
5286 location
= _location
;
5290 void* Set(void* cmd
, GLint _location
, GLint _x
) {
5291 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
);
5292 return NextCmdAddress
<ValueType
>(cmd
);
5295 gpu::CommandHeader header
;
5300 COMPILE_ASSERT(sizeof(Uniform1i
) == 12, Sizeof_Uniform1i_is_not_12
);
5301 COMPILE_ASSERT(offsetof(Uniform1i
, header
) == 0,
5302 OffsetOf_Uniform1i_header_not_0
);
5303 COMPILE_ASSERT(offsetof(Uniform1i
, location
) == 4,
5304 OffsetOf_Uniform1i_location_not_4
);
5305 COMPILE_ASSERT(offsetof(Uniform1i
, x
) == 8, OffsetOf_Uniform1i_x_not_8
);
5307 struct Uniform1ivImmediate
{
5308 typedef Uniform1ivImmediate ValueType
;
5309 static const CommandId kCmdId
= kUniform1ivImmediate
;
5310 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5311 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5313 static uint32_t ComputeDataSize(GLsizei count
) {
5314 return static_cast<uint32_t>(sizeof(GLint
) * 1 * count
); // NOLINT
5317 static uint32_t ComputeSize(GLsizei count
) {
5318 return static_cast<uint32_t>(sizeof(ValueType
) +
5319 ComputeDataSize(count
)); // NOLINT
5322 void SetHeader(GLsizei count
) {
5323 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5326 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5328 location
= _location
;
5330 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5333 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5334 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5335 const uint32_t size
= ComputeSize(_count
);
5336 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5339 gpu::CommandHeader header
;
5344 COMPILE_ASSERT(sizeof(Uniform1ivImmediate
) == 12,
5345 Sizeof_Uniform1ivImmediate_is_not_12
);
5346 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, header
) == 0,
5347 OffsetOf_Uniform1ivImmediate_header_not_0
);
5348 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, location
) == 4,
5349 OffsetOf_Uniform1ivImmediate_location_not_4
);
5350 COMPILE_ASSERT(offsetof(Uniform1ivImmediate
, count
) == 8,
5351 OffsetOf_Uniform1ivImmediate_count_not_8
);
5354 typedef Uniform2f ValueType
;
5355 static const CommandId kCmdId
= kUniform2f
;
5356 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5357 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5359 static uint32_t ComputeSize() {
5360 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5363 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5365 void Init(GLint _location
, GLfloat _x
, GLfloat _y
) {
5367 location
= _location
;
5372 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
) {
5373 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
5374 return NextCmdAddress
<ValueType
>(cmd
);
5377 gpu::CommandHeader header
;
5383 COMPILE_ASSERT(sizeof(Uniform2f
) == 16, Sizeof_Uniform2f_is_not_16
);
5384 COMPILE_ASSERT(offsetof(Uniform2f
, header
) == 0,
5385 OffsetOf_Uniform2f_header_not_0
);
5386 COMPILE_ASSERT(offsetof(Uniform2f
, location
) == 4,
5387 OffsetOf_Uniform2f_location_not_4
);
5388 COMPILE_ASSERT(offsetof(Uniform2f
, x
) == 8, OffsetOf_Uniform2f_x_not_8
);
5389 COMPILE_ASSERT(offsetof(Uniform2f
, y
) == 12, OffsetOf_Uniform2f_y_not_12
);
5391 struct Uniform2fvImmediate
{
5392 typedef Uniform2fvImmediate ValueType
;
5393 static const CommandId kCmdId
= kUniform2fvImmediate
;
5394 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5395 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5397 static uint32_t ComputeDataSize(GLsizei count
) {
5398 return static_cast<uint32_t>(sizeof(GLfloat
) * 2 * count
); // NOLINT
5401 static uint32_t ComputeSize(GLsizei count
) {
5402 return static_cast<uint32_t>(sizeof(ValueType
) +
5403 ComputeDataSize(count
)); // NOLINT
5406 void SetHeader(GLsizei count
) {
5407 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5410 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5412 location
= _location
;
5414 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5417 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5418 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5419 const uint32_t size
= ComputeSize(_count
);
5420 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5423 gpu::CommandHeader header
;
5428 COMPILE_ASSERT(sizeof(Uniform2fvImmediate
) == 12,
5429 Sizeof_Uniform2fvImmediate_is_not_12
);
5430 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, header
) == 0,
5431 OffsetOf_Uniform2fvImmediate_header_not_0
);
5432 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, location
) == 4,
5433 OffsetOf_Uniform2fvImmediate_location_not_4
);
5434 COMPILE_ASSERT(offsetof(Uniform2fvImmediate
, count
) == 8,
5435 OffsetOf_Uniform2fvImmediate_count_not_8
);
5438 typedef Uniform2i ValueType
;
5439 static const CommandId kCmdId
= kUniform2i
;
5440 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5441 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5443 static uint32_t ComputeSize() {
5444 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5447 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5449 void Init(GLint _location
, GLint _x
, GLint _y
) {
5451 location
= _location
;
5456 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
) {
5457 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
);
5458 return NextCmdAddress
<ValueType
>(cmd
);
5461 gpu::CommandHeader header
;
5467 COMPILE_ASSERT(sizeof(Uniform2i
) == 16, Sizeof_Uniform2i_is_not_16
);
5468 COMPILE_ASSERT(offsetof(Uniform2i
, header
) == 0,
5469 OffsetOf_Uniform2i_header_not_0
);
5470 COMPILE_ASSERT(offsetof(Uniform2i
, location
) == 4,
5471 OffsetOf_Uniform2i_location_not_4
);
5472 COMPILE_ASSERT(offsetof(Uniform2i
, x
) == 8, OffsetOf_Uniform2i_x_not_8
);
5473 COMPILE_ASSERT(offsetof(Uniform2i
, y
) == 12, OffsetOf_Uniform2i_y_not_12
);
5475 struct Uniform2ivImmediate
{
5476 typedef Uniform2ivImmediate ValueType
;
5477 static const CommandId kCmdId
= kUniform2ivImmediate
;
5478 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5479 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5481 static uint32_t ComputeDataSize(GLsizei count
) {
5482 return static_cast<uint32_t>(sizeof(GLint
) * 2 * count
); // NOLINT
5485 static uint32_t ComputeSize(GLsizei count
) {
5486 return static_cast<uint32_t>(sizeof(ValueType
) +
5487 ComputeDataSize(count
)); // NOLINT
5490 void SetHeader(GLsizei count
) {
5491 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5494 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5496 location
= _location
;
5498 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5501 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5502 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5503 const uint32_t size
= ComputeSize(_count
);
5504 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5507 gpu::CommandHeader header
;
5512 COMPILE_ASSERT(sizeof(Uniform2ivImmediate
) == 12,
5513 Sizeof_Uniform2ivImmediate_is_not_12
);
5514 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, header
) == 0,
5515 OffsetOf_Uniform2ivImmediate_header_not_0
);
5516 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, location
) == 4,
5517 OffsetOf_Uniform2ivImmediate_location_not_4
);
5518 COMPILE_ASSERT(offsetof(Uniform2ivImmediate
, count
) == 8,
5519 OffsetOf_Uniform2ivImmediate_count_not_8
);
5522 typedef Uniform3f ValueType
;
5523 static const CommandId kCmdId
= kUniform3f
;
5524 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5525 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5527 static uint32_t ComputeSize() {
5528 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5531 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5533 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
5535 location
= _location
;
5541 void* Set(void* cmd
, GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
5542 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
5543 return NextCmdAddress
<ValueType
>(cmd
);
5546 gpu::CommandHeader header
;
5553 COMPILE_ASSERT(sizeof(Uniform3f
) == 20, Sizeof_Uniform3f_is_not_20
);
5554 COMPILE_ASSERT(offsetof(Uniform3f
, header
) == 0,
5555 OffsetOf_Uniform3f_header_not_0
);
5556 COMPILE_ASSERT(offsetof(Uniform3f
, location
) == 4,
5557 OffsetOf_Uniform3f_location_not_4
);
5558 COMPILE_ASSERT(offsetof(Uniform3f
, x
) == 8, OffsetOf_Uniform3f_x_not_8
);
5559 COMPILE_ASSERT(offsetof(Uniform3f
, y
) == 12, OffsetOf_Uniform3f_y_not_12
);
5560 COMPILE_ASSERT(offsetof(Uniform3f
, z
) == 16, OffsetOf_Uniform3f_z_not_16
);
5562 struct Uniform3fvImmediate
{
5563 typedef Uniform3fvImmediate ValueType
;
5564 static const CommandId kCmdId
= kUniform3fvImmediate
;
5565 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5566 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5568 static uint32_t ComputeDataSize(GLsizei count
) {
5569 return static_cast<uint32_t>(sizeof(GLfloat
) * 3 * count
); // NOLINT
5572 static uint32_t ComputeSize(GLsizei count
) {
5573 return static_cast<uint32_t>(sizeof(ValueType
) +
5574 ComputeDataSize(count
)); // NOLINT
5577 void SetHeader(GLsizei count
) {
5578 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5581 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5583 location
= _location
;
5585 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5588 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5589 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5590 const uint32_t size
= ComputeSize(_count
);
5591 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5594 gpu::CommandHeader header
;
5599 COMPILE_ASSERT(sizeof(Uniform3fvImmediate
) == 12,
5600 Sizeof_Uniform3fvImmediate_is_not_12
);
5601 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, header
) == 0,
5602 OffsetOf_Uniform3fvImmediate_header_not_0
);
5603 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, location
) == 4,
5604 OffsetOf_Uniform3fvImmediate_location_not_4
);
5605 COMPILE_ASSERT(offsetof(Uniform3fvImmediate
, count
) == 8,
5606 OffsetOf_Uniform3fvImmediate_count_not_8
);
5609 typedef Uniform3i ValueType
;
5610 static const CommandId kCmdId
= kUniform3i
;
5611 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5612 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5614 static uint32_t ComputeSize() {
5615 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5618 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5620 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
5622 location
= _location
;
5628 void* Set(void* cmd
, GLint _location
, GLint _x
, GLint _y
, GLint _z
) {
5629 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
);
5630 return NextCmdAddress
<ValueType
>(cmd
);
5633 gpu::CommandHeader header
;
5640 COMPILE_ASSERT(sizeof(Uniform3i
) == 20, Sizeof_Uniform3i_is_not_20
);
5641 COMPILE_ASSERT(offsetof(Uniform3i
, header
) == 0,
5642 OffsetOf_Uniform3i_header_not_0
);
5643 COMPILE_ASSERT(offsetof(Uniform3i
, location
) == 4,
5644 OffsetOf_Uniform3i_location_not_4
);
5645 COMPILE_ASSERT(offsetof(Uniform3i
, x
) == 8, OffsetOf_Uniform3i_x_not_8
);
5646 COMPILE_ASSERT(offsetof(Uniform3i
, y
) == 12, OffsetOf_Uniform3i_y_not_12
);
5647 COMPILE_ASSERT(offsetof(Uniform3i
, z
) == 16, OffsetOf_Uniform3i_z_not_16
);
5649 struct Uniform3ivImmediate
{
5650 typedef Uniform3ivImmediate ValueType
;
5651 static const CommandId kCmdId
= kUniform3ivImmediate
;
5652 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5653 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5655 static uint32_t ComputeDataSize(GLsizei count
) {
5656 return static_cast<uint32_t>(sizeof(GLint
) * 3 * count
); // NOLINT
5659 static uint32_t ComputeSize(GLsizei count
) {
5660 return static_cast<uint32_t>(sizeof(ValueType
) +
5661 ComputeDataSize(count
)); // NOLINT
5664 void SetHeader(GLsizei count
) {
5665 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5668 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5670 location
= _location
;
5672 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5675 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5676 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5677 const uint32_t size
= ComputeSize(_count
);
5678 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5681 gpu::CommandHeader header
;
5686 COMPILE_ASSERT(sizeof(Uniform3ivImmediate
) == 12,
5687 Sizeof_Uniform3ivImmediate_is_not_12
);
5688 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, header
) == 0,
5689 OffsetOf_Uniform3ivImmediate_header_not_0
);
5690 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, location
) == 4,
5691 OffsetOf_Uniform3ivImmediate_location_not_4
);
5692 COMPILE_ASSERT(offsetof(Uniform3ivImmediate
, count
) == 8,
5693 OffsetOf_Uniform3ivImmediate_count_not_8
);
5696 typedef Uniform4f ValueType
;
5697 static const CommandId kCmdId
= kUniform4f
;
5698 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5699 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5701 static uint32_t ComputeSize() {
5702 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5705 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5707 void Init(GLint _location
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
5709 location
= _location
;
5716 void* Set(void* cmd
,
5722 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
5723 return NextCmdAddress
<ValueType
>(cmd
);
5726 gpu::CommandHeader header
;
5734 COMPILE_ASSERT(sizeof(Uniform4f
) == 24, Sizeof_Uniform4f_is_not_24
);
5735 COMPILE_ASSERT(offsetof(Uniform4f
, header
) == 0,
5736 OffsetOf_Uniform4f_header_not_0
);
5737 COMPILE_ASSERT(offsetof(Uniform4f
, location
) == 4,
5738 OffsetOf_Uniform4f_location_not_4
);
5739 COMPILE_ASSERT(offsetof(Uniform4f
, x
) == 8, OffsetOf_Uniform4f_x_not_8
);
5740 COMPILE_ASSERT(offsetof(Uniform4f
, y
) == 12, OffsetOf_Uniform4f_y_not_12
);
5741 COMPILE_ASSERT(offsetof(Uniform4f
, z
) == 16, OffsetOf_Uniform4f_z_not_16
);
5742 COMPILE_ASSERT(offsetof(Uniform4f
, w
) == 20, OffsetOf_Uniform4f_w_not_20
);
5744 struct Uniform4fvImmediate
{
5745 typedef Uniform4fvImmediate ValueType
;
5746 static const CommandId kCmdId
= kUniform4fvImmediate
;
5747 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5748 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5750 static uint32_t ComputeDataSize(GLsizei count
) {
5751 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
5754 static uint32_t ComputeSize(GLsizei count
) {
5755 return static_cast<uint32_t>(sizeof(ValueType
) +
5756 ComputeDataSize(count
)); // NOLINT
5759 void SetHeader(GLsizei count
) {
5760 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5763 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5765 location
= _location
;
5767 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5770 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _v
) {
5771 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5772 const uint32_t size
= ComputeSize(_count
);
5773 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5776 gpu::CommandHeader header
;
5781 COMPILE_ASSERT(sizeof(Uniform4fvImmediate
) == 12,
5782 Sizeof_Uniform4fvImmediate_is_not_12
);
5783 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, header
) == 0,
5784 OffsetOf_Uniform4fvImmediate_header_not_0
);
5785 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, location
) == 4,
5786 OffsetOf_Uniform4fvImmediate_location_not_4
);
5787 COMPILE_ASSERT(offsetof(Uniform4fvImmediate
, count
) == 8,
5788 OffsetOf_Uniform4fvImmediate_count_not_8
);
5791 typedef Uniform4i ValueType
;
5792 static const CommandId kCmdId
= kUniform4i
;
5793 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
5794 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5796 static uint32_t ComputeSize() {
5797 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
5800 void SetHeader() { header
.SetCmd
<ValueType
>(); }
5802 void Init(GLint _location
, GLint _x
, GLint _y
, GLint _z
, GLint _w
) {
5804 location
= _location
;
5811 void* Set(void* cmd
,
5817 static_cast<ValueType
*>(cmd
)->Init(_location
, _x
, _y
, _z
, _w
);
5818 return NextCmdAddress
<ValueType
>(cmd
);
5821 gpu::CommandHeader header
;
5829 COMPILE_ASSERT(sizeof(Uniform4i
) == 24, Sizeof_Uniform4i_is_not_24
);
5830 COMPILE_ASSERT(offsetof(Uniform4i
, header
) == 0,
5831 OffsetOf_Uniform4i_header_not_0
);
5832 COMPILE_ASSERT(offsetof(Uniform4i
, location
) == 4,
5833 OffsetOf_Uniform4i_location_not_4
);
5834 COMPILE_ASSERT(offsetof(Uniform4i
, x
) == 8, OffsetOf_Uniform4i_x_not_8
);
5835 COMPILE_ASSERT(offsetof(Uniform4i
, y
) == 12, OffsetOf_Uniform4i_y_not_12
);
5836 COMPILE_ASSERT(offsetof(Uniform4i
, z
) == 16, OffsetOf_Uniform4i_z_not_16
);
5837 COMPILE_ASSERT(offsetof(Uniform4i
, w
) == 20, OffsetOf_Uniform4i_w_not_20
);
5839 struct Uniform4ivImmediate
{
5840 typedef Uniform4ivImmediate ValueType
;
5841 static const CommandId kCmdId
= kUniform4ivImmediate
;
5842 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5843 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5845 static uint32_t ComputeDataSize(GLsizei count
) {
5846 return static_cast<uint32_t>(sizeof(GLint
) * 4 * count
); // NOLINT
5849 static uint32_t ComputeSize(GLsizei count
) {
5850 return static_cast<uint32_t>(sizeof(ValueType
) +
5851 ComputeDataSize(count
)); // NOLINT
5854 void SetHeader(GLsizei count
) {
5855 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5858 void Init(GLint _location
, GLsizei _count
, const GLint
* _v
) {
5860 location
= _location
;
5862 memcpy(ImmediateDataAddress(this), _v
, ComputeDataSize(_count
));
5865 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLint
* _v
) {
5866 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _v
);
5867 const uint32_t size
= ComputeSize(_count
);
5868 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5871 gpu::CommandHeader header
;
5876 COMPILE_ASSERT(sizeof(Uniform4ivImmediate
) == 12,
5877 Sizeof_Uniform4ivImmediate_is_not_12
);
5878 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, header
) == 0,
5879 OffsetOf_Uniform4ivImmediate_header_not_0
);
5880 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, location
) == 4,
5881 OffsetOf_Uniform4ivImmediate_location_not_4
);
5882 COMPILE_ASSERT(offsetof(Uniform4ivImmediate
, count
) == 8,
5883 OffsetOf_Uniform4ivImmediate_count_not_8
);
5885 struct UniformMatrix2fvImmediate
{
5886 typedef UniformMatrix2fvImmediate ValueType
;
5887 static const CommandId kCmdId
= kUniformMatrix2fvImmediate
;
5888 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5889 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5891 static uint32_t ComputeDataSize(GLsizei count
) {
5892 return static_cast<uint32_t>(sizeof(GLfloat
) * 4 * count
); // NOLINT
5895 static uint32_t ComputeSize(GLsizei count
) {
5896 return static_cast<uint32_t>(sizeof(ValueType
) +
5897 ComputeDataSize(count
)); // NOLINT
5900 void SetHeader(GLsizei count
) {
5901 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5904 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5906 location
= _location
;
5908 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
5911 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5912 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
5913 const uint32_t size
= ComputeSize(_count
);
5914 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5917 gpu::CommandHeader header
;
5920 static const uint32_t transpose
= false;
5923 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate
) == 12,
5924 Sizeof_UniformMatrix2fvImmediate_is_not_12
);
5925 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, header
) == 0,
5926 OffsetOf_UniformMatrix2fvImmediate_header_not_0
);
5927 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, location
) == 4,
5928 OffsetOf_UniformMatrix2fvImmediate_location_not_4
);
5929 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate
, count
) == 8,
5930 OffsetOf_UniformMatrix2fvImmediate_count_not_8
);
5932 struct UniformMatrix3fvImmediate
{
5933 typedef UniformMatrix3fvImmediate ValueType
;
5934 static const CommandId kCmdId
= kUniformMatrix3fvImmediate
;
5935 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5936 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5938 static uint32_t ComputeDataSize(GLsizei count
) {
5939 return static_cast<uint32_t>(sizeof(GLfloat
) * 9 * count
); // NOLINT
5942 static uint32_t ComputeSize(GLsizei count
) {
5943 return static_cast<uint32_t>(sizeof(ValueType
) +
5944 ComputeDataSize(count
)); // NOLINT
5947 void SetHeader(GLsizei count
) {
5948 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5951 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5953 location
= _location
;
5955 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
5958 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
5959 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
5960 const uint32_t size
= ComputeSize(_count
);
5961 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
5964 gpu::CommandHeader header
;
5967 static const uint32_t transpose
= false;
5970 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate
) == 12,
5971 Sizeof_UniformMatrix3fvImmediate_is_not_12
);
5972 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, header
) == 0,
5973 OffsetOf_UniformMatrix3fvImmediate_header_not_0
);
5974 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, location
) == 4,
5975 OffsetOf_UniformMatrix3fvImmediate_location_not_4
);
5976 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate
, count
) == 8,
5977 OffsetOf_UniformMatrix3fvImmediate_count_not_8
);
5979 struct UniformMatrix4fvImmediate
{
5980 typedef UniformMatrix4fvImmediate ValueType
;
5981 static const CommandId kCmdId
= kUniformMatrix4fvImmediate
;
5982 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
5983 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
5985 static uint32_t ComputeDataSize(GLsizei count
) {
5986 return static_cast<uint32_t>(sizeof(GLfloat
) * 16 * count
); // NOLINT
5989 static uint32_t ComputeSize(GLsizei count
) {
5990 return static_cast<uint32_t>(sizeof(ValueType
) +
5991 ComputeDataSize(count
)); // NOLINT
5994 void SetHeader(GLsizei count
) {
5995 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
5998 void Init(GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
6000 location
= _location
;
6002 memcpy(ImmediateDataAddress(this), _value
, ComputeDataSize(_count
));
6005 void* Set(void* cmd
, GLint _location
, GLsizei _count
, const GLfloat
* _value
) {
6006 static_cast<ValueType
*>(cmd
)->Init(_location
, _count
, _value
);
6007 const uint32_t size
= ComputeSize(_count
);
6008 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6011 gpu::CommandHeader header
;
6014 static const uint32_t transpose
= false;
6017 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate
) == 12,
6018 Sizeof_UniformMatrix4fvImmediate_is_not_12
);
6019 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, header
) == 0,
6020 OffsetOf_UniformMatrix4fvImmediate_header_not_0
);
6021 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, location
) == 4,
6022 OffsetOf_UniformMatrix4fvImmediate_location_not_4
);
6023 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate
, count
) == 8,
6024 OffsetOf_UniformMatrix4fvImmediate_count_not_8
);
6027 typedef UseProgram ValueType
;
6028 static const CommandId kCmdId
= kUseProgram
;
6029 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6030 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6032 static uint32_t ComputeSize() {
6033 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6036 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6038 void Init(GLuint _program
) {
6043 void* Set(void* cmd
, GLuint _program
) {
6044 static_cast<ValueType
*>(cmd
)->Init(_program
);
6045 return NextCmdAddress
<ValueType
>(cmd
);
6048 gpu::CommandHeader header
;
6052 COMPILE_ASSERT(sizeof(UseProgram
) == 8, Sizeof_UseProgram_is_not_8
);
6053 COMPILE_ASSERT(offsetof(UseProgram
, header
) == 0,
6054 OffsetOf_UseProgram_header_not_0
);
6055 COMPILE_ASSERT(offsetof(UseProgram
, program
) == 4,
6056 OffsetOf_UseProgram_program_not_4
);
6058 struct ValidateProgram
{
6059 typedef ValidateProgram ValueType
;
6060 static const CommandId kCmdId
= kValidateProgram
;
6061 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6062 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6064 static uint32_t ComputeSize() {
6065 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6068 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6070 void Init(GLuint _program
) {
6075 void* Set(void* cmd
, GLuint _program
) {
6076 static_cast<ValueType
*>(cmd
)->Init(_program
);
6077 return NextCmdAddress
<ValueType
>(cmd
);
6080 gpu::CommandHeader header
;
6084 COMPILE_ASSERT(sizeof(ValidateProgram
) == 8, Sizeof_ValidateProgram_is_not_8
);
6085 COMPILE_ASSERT(offsetof(ValidateProgram
, header
) == 0,
6086 OffsetOf_ValidateProgram_header_not_0
);
6087 COMPILE_ASSERT(offsetof(ValidateProgram
, program
) == 4,
6088 OffsetOf_ValidateProgram_program_not_4
);
6090 struct VertexAttrib1f
{
6091 typedef VertexAttrib1f ValueType
;
6092 static const CommandId kCmdId
= kVertexAttrib1f
;
6093 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6094 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6096 static uint32_t ComputeSize() {
6097 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6100 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6102 void Init(GLuint _indx
, GLfloat _x
) {
6108 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
) {
6109 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
);
6110 return NextCmdAddress
<ValueType
>(cmd
);
6113 gpu::CommandHeader header
;
6118 COMPILE_ASSERT(sizeof(VertexAttrib1f
) == 12, Sizeof_VertexAttrib1f_is_not_12
);
6119 COMPILE_ASSERT(offsetof(VertexAttrib1f
, header
) == 0,
6120 OffsetOf_VertexAttrib1f_header_not_0
);
6121 COMPILE_ASSERT(offsetof(VertexAttrib1f
, indx
) == 4,
6122 OffsetOf_VertexAttrib1f_indx_not_4
);
6123 COMPILE_ASSERT(offsetof(VertexAttrib1f
, x
) == 8,
6124 OffsetOf_VertexAttrib1f_x_not_8
);
6126 struct VertexAttrib1fvImmediate
{
6127 typedef VertexAttrib1fvImmediate ValueType
;
6128 static const CommandId kCmdId
= kVertexAttrib1fvImmediate
;
6129 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6130 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6132 static uint32_t ComputeDataSize() {
6133 return static_cast<uint32_t>(sizeof(GLfloat
) * 1); // NOLINT
6136 static uint32_t ComputeSize() {
6137 return static_cast<uint32_t>(sizeof(ValueType
) +
6138 ComputeDataSize()); // NOLINT
6141 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6143 void Init(GLuint _indx
, const GLfloat
* _values
) {
6146 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6149 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6150 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6151 const uint32_t size
= ComputeSize();
6152 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6155 gpu::CommandHeader header
;
6159 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate
) == 8,
6160 Sizeof_VertexAttrib1fvImmediate_is_not_8
);
6161 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate
, header
) == 0,
6162 OffsetOf_VertexAttrib1fvImmediate_header_not_0
);
6163 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate
, indx
) == 4,
6164 OffsetOf_VertexAttrib1fvImmediate_indx_not_4
);
6166 struct VertexAttrib2f
{
6167 typedef VertexAttrib2f ValueType
;
6168 static const CommandId kCmdId
= kVertexAttrib2f
;
6169 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6170 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6172 static uint32_t ComputeSize() {
6173 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6176 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6178 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
) {
6185 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
) {
6186 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
);
6187 return NextCmdAddress
<ValueType
>(cmd
);
6190 gpu::CommandHeader header
;
6196 COMPILE_ASSERT(sizeof(VertexAttrib2f
) == 16, Sizeof_VertexAttrib2f_is_not_16
);
6197 COMPILE_ASSERT(offsetof(VertexAttrib2f
, header
) == 0,
6198 OffsetOf_VertexAttrib2f_header_not_0
);
6199 COMPILE_ASSERT(offsetof(VertexAttrib2f
, indx
) == 4,
6200 OffsetOf_VertexAttrib2f_indx_not_4
);
6201 COMPILE_ASSERT(offsetof(VertexAttrib2f
, x
) == 8,
6202 OffsetOf_VertexAttrib2f_x_not_8
);
6203 COMPILE_ASSERT(offsetof(VertexAttrib2f
, y
) == 12,
6204 OffsetOf_VertexAttrib2f_y_not_12
);
6206 struct VertexAttrib2fvImmediate
{
6207 typedef VertexAttrib2fvImmediate ValueType
;
6208 static const CommandId kCmdId
= kVertexAttrib2fvImmediate
;
6209 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6210 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6212 static uint32_t ComputeDataSize() {
6213 return static_cast<uint32_t>(sizeof(GLfloat
) * 2); // NOLINT
6216 static uint32_t ComputeSize() {
6217 return static_cast<uint32_t>(sizeof(ValueType
) +
6218 ComputeDataSize()); // NOLINT
6221 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6223 void Init(GLuint _indx
, const GLfloat
* _values
) {
6226 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6229 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6230 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6231 const uint32_t size
= ComputeSize();
6232 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6235 gpu::CommandHeader header
;
6239 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate
) == 8,
6240 Sizeof_VertexAttrib2fvImmediate_is_not_8
);
6241 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate
, header
) == 0,
6242 OffsetOf_VertexAttrib2fvImmediate_header_not_0
);
6243 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate
, indx
) == 4,
6244 OffsetOf_VertexAttrib2fvImmediate_indx_not_4
);
6246 struct VertexAttrib3f
{
6247 typedef VertexAttrib3f ValueType
;
6248 static const CommandId kCmdId
= kVertexAttrib3f
;
6249 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6250 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6252 static uint32_t ComputeSize() {
6253 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6256 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6258 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
6266 void* Set(void* cmd
, GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
) {
6267 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
);
6268 return NextCmdAddress
<ValueType
>(cmd
);
6271 gpu::CommandHeader header
;
6278 COMPILE_ASSERT(sizeof(VertexAttrib3f
) == 20, Sizeof_VertexAttrib3f_is_not_20
);
6279 COMPILE_ASSERT(offsetof(VertexAttrib3f
, header
) == 0,
6280 OffsetOf_VertexAttrib3f_header_not_0
);
6281 COMPILE_ASSERT(offsetof(VertexAttrib3f
, indx
) == 4,
6282 OffsetOf_VertexAttrib3f_indx_not_4
);
6283 COMPILE_ASSERT(offsetof(VertexAttrib3f
, x
) == 8,
6284 OffsetOf_VertexAttrib3f_x_not_8
);
6285 COMPILE_ASSERT(offsetof(VertexAttrib3f
, y
) == 12,
6286 OffsetOf_VertexAttrib3f_y_not_12
);
6287 COMPILE_ASSERT(offsetof(VertexAttrib3f
, z
) == 16,
6288 OffsetOf_VertexAttrib3f_z_not_16
);
6290 struct VertexAttrib3fvImmediate
{
6291 typedef VertexAttrib3fvImmediate ValueType
;
6292 static const CommandId kCmdId
= kVertexAttrib3fvImmediate
;
6293 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6294 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6296 static uint32_t ComputeDataSize() {
6297 return static_cast<uint32_t>(sizeof(GLfloat
) * 3); // NOLINT
6300 static uint32_t ComputeSize() {
6301 return static_cast<uint32_t>(sizeof(ValueType
) +
6302 ComputeDataSize()); // NOLINT
6305 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6307 void Init(GLuint _indx
, const GLfloat
* _values
) {
6310 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6313 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6314 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6315 const uint32_t size
= ComputeSize();
6316 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6319 gpu::CommandHeader header
;
6323 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate
) == 8,
6324 Sizeof_VertexAttrib3fvImmediate_is_not_8
);
6325 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate
, header
) == 0,
6326 OffsetOf_VertexAttrib3fvImmediate_header_not_0
);
6327 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate
, indx
) == 4,
6328 OffsetOf_VertexAttrib3fvImmediate_indx_not_4
);
6330 struct VertexAttrib4f
{
6331 typedef VertexAttrib4f ValueType
;
6332 static const CommandId kCmdId
= kVertexAttrib4f
;
6333 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6334 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6336 static uint32_t ComputeSize() {
6337 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6340 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6342 void Init(GLuint _indx
, GLfloat _x
, GLfloat _y
, GLfloat _z
, GLfloat _w
) {
6351 void* Set(void* cmd
,
6357 static_cast<ValueType
*>(cmd
)->Init(_indx
, _x
, _y
, _z
, _w
);
6358 return NextCmdAddress
<ValueType
>(cmd
);
6361 gpu::CommandHeader header
;
6369 COMPILE_ASSERT(sizeof(VertexAttrib4f
) == 24, Sizeof_VertexAttrib4f_is_not_24
);
6370 COMPILE_ASSERT(offsetof(VertexAttrib4f
, header
) == 0,
6371 OffsetOf_VertexAttrib4f_header_not_0
);
6372 COMPILE_ASSERT(offsetof(VertexAttrib4f
, indx
) == 4,
6373 OffsetOf_VertexAttrib4f_indx_not_4
);
6374 COMPILE_ASSERT(offsetof(VertexAttrib4f
, x
) == 8,
6375 OffsetOf_VertexAttrib4f_x_not_8
);
6376 COMPILE_ASSERT(offsetof(VertexAttrib4f
, y
) == 12,
6377 OffsetOf_VertexAttrib4f_y_not_12
);
6378 COMPILE_ASSERT(offsetof(VertexAttrib4f
, z
) == 16,
6379 OffsetOf_VertexAttrib4f_z_not_16
);
6380 COMPILE_ASSERT(offsetof(VertexAttrib4f
, w
) == 20,
6381 OffsetOf_VertexAttrib4f_w_not_20
);
6383 struct VertexAttrib4fvImmediate
{
6384 typedef VertexAttrib4fvImmediate ValueType
;
6385 static const CommandId kCmdId
= kVertexAttrib4fvImmediate
;
6386 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6387 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6389 static uint32_t ComputeDataSize() {
6390 return static_cast<uint32_t>(sizeof(GLfloat
) * 4); // NOLINT
6393 static uint32_t ComputeSize() {
6394 return static_cast<uint32_t>(sizeof(ValueType
) +
6395 ComputeDataSize()); // NOLINT
6398 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
6400 void Init(GLuint _indx
, const GLfloat
* _values
) {
6403 memcpy(ImmediateDataAddress(this), _values
, ComputeDataSize());
6406 void* Set(void* cmd
, GLuint _indx
, const GLfloat
* _values
) {
6407 static_cast<ValueType
*>(cmd
)->Init(_indx
, _values
);
6408 const uint32_t size
= ComputeSize();
6409 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6412 gpu::CommandHeader header
;
6416 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate
) == 8,
6417 Sizeof_VertexAttrib4fvImmediate_is_not_8
);
6418 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate
, header
) == 0,
6419 OffsetOf_VertexAttrib4fvImmediate_header_not_0
);
6420 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate
, indx
) == 4,
6421 OffsetOf_VertexAttrib4fvImmediate_indx_not_4
);
6423 struct VertexAttribPointer
{
6424 typedef VertexAttribPointer ValueType
;
6425 static const CommandId kCmdId
= kVertexAttribPointer
;
6426 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6427 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6429 static uint32_t ComputeSize() {
6430 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6433 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6435 void Init(GLuint _indx
,
6438 GLboolean _normalized
,
6445 normalized
= _normalized
;
6450 void* Set(void* cmd
,
6454 GLboolean _normalized
,
6457 static_cast<ValueType
*>(cmd
)
6458 ->Init(_indx
, _size
, _type
, _normalized
, _stride
, _offset
);
6459 return NextCmdAddress
<ValueType
>(cmd
);
6462 gpu::CommandHeader header
;
6466 uint32_t normalized
;
6471 COMPILE_ASSERT(sizeof(VertexAttribPointer
) == 28,
6472 Sizeof_VertexAttribPointer_is_not_28
);
6473 COMPILE_ASSERT(offsetof(VertexAttribPointer
, header
) == 0,
6474 OffsetOf_VertexAttribPointer_header_not_0
);
6475 COMPILE_ASSERT(offsetof(VertexAttribPointer
, indx
) == 4,
6476 OffsetOf_VertexAttribPointer_indx_not_4
);
6477 COMPILE_ASSERT(offsetof(VertexAttribPointer
, size
) == 8,
6478 OffsetOf_VertexAttribPointer_size_not_8
);
6479 COMPILE_ASSERT(offsetof(VertexAttribPointer
, type
) == 12,
6480 OffsetOf_VertexAttribPointer_type_not_12
);
6481 COMPILE_ASSERT(offsetof(VertexAttribPointer
, normalized
) == 16,
6482 OffsetOf_VertexAttribPointer_normalized_not_16
);
6483 COMPILE_ASSERT(offsetof(VertexAttribPointer
, stride
) == 20,
6484 OffsetOf_VertexAttribPointer_stride_not_20
);
6485 COMPILE_ASSERT(offsetof(VertexAttribPointer
, offset
) == 24,
6486 OffsetOf_VertexAttribPointer_offset_not_24
);
6489 typedef Viewport ValueType
;
6490 static const CommandId kCmdId
= kViewport
;
6491 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6492 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6494 static uint32_t ComputeSize() {
6495 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6498 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6500 void Init(GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6508 void* Set(void* cmd
, GLint _x
, GLint _y
, GLsizei _width
, GLsizei _height
) {
6509 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
6510 return NextCmdAddress
<ValueType
>(cmd
);
6513 gpu::CommandHeader header
;
6520 COMPILE_ASSERT(sizeof(Viewport
) == 20, Sizeof_Viewport_is_not_20
);
6521 COMPILE_ASSERT(offsetof(Viewport
, header
) == 0, OffsetOf_Viewport_header_not_0
);
6522 COMPILE_ASSERT(offsetof(Viewport
, x
) == 4, OffsetOf_Viewport_x_not_4
);
6523 COMPILE_ASSERT(offsetof(Viewport
, y
) == 8, OffsetOf_Viewport_y_not_8
);
6524 COMPILE_ASSERT(offsetof(Viewport
, width
) == 12, OffsetOf_Viewport_width_not_12
);
6525 COMPILE_ASSERT(offsetof(Viewport
, height
) == 16,
6526 OffsetOf_Viewport_height_not_16
);
6528 struct BlitFramebufferCHROMIUM
{
6529 typedef BlitFramebufferCHROMIUM ValueType
;
6530 static const CommandId kCmdId
= kBlitFramebufferCHROMIUM
;
6531 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6532 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
6534 static uint32_t ComputeSize() {
6535 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6538 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6540 void Init(GLint _srcX0
,
6563 void* Set(void* cmd
,
6574 static_cast<ValueType
*>(cmd
)->Init(_srcX0
, _srcY0
, _srcX1
, _srcY1
, _dstX0
,
6575 _dstY0
, _dstX1
, _dstY1
, _mask
, _filter
);
6576 return NextCmdAddress
<ValueType
>(cmd
);
6579 gpu::CommandHeader header
;
6592 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM
) == 44,
6593 Sizeof_BlitFramebufferCHROMIUM_is_not_44
);
6594 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, header
) == 0,
6595 OffsetOf_BlitFramebufferCHROMIUM_header_not_0
);
6596 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcX0
) == 4,
6597 OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4
);
6598 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcY0
) == 8,
6599 OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8
);
6600 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcX1
) == 12,
6601 OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12
);
6602 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, srcY1
) == 16,
6603 OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16
);
6604 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstX0
) == 20,
6605 OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20
);
6606 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstY0
) == 24,
6607 OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24
);
6608 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstX1
) == 28,
6609 OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28
);
6610 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, dstY1
) == 32,
6611 OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32
);
6612 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, mask
) == 36,
6613 OffsetOf_BlitFramebufferCHROMIUM_mask_not_36
);
6614 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM
, filter
) == 40,
6615 OffsetOf_BlitFramebufferCHROMIUM_filter_not_40
);
6617 // GL_CHROMIUM_framebuffer_multisample
6618 struct RenderbufferStorageMultisampleCHROMIUM
{
6619 typedef RenderbufferStorageMultisampleCHROMIUM ValueType
;
6620 static const CommandId kCmdId
= kRenderbufferStorageMultisampleCHROMIUM
;
6621 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6622 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6624 static uint32_t ComputeSize() {
6625 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6628 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6630 void Init(GLenum _target
,
6632 GLenum _internalformat
,
6638 internalformat
= _internalformat
;
6643 void* Set(void* cmd
,
6646 GLenum _internalformat
,
6649 static_cast<ValueType
*>(cmd
)
6650 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
6651 return NextCmdAddress
<ValueType
>(cmd
);
6654 gpu::CommandHeader header
;
6657 uint32_t internalformat
;
6662 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM
) == 24,
6663 Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24
);
6664 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, header
) == 0,
6665 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0
);
6666 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, target
) == 4,
6667 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4
);
6668 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, samples
) == 8,
6669 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8
);
6671 offsetof(RenderbufferStorageMultisampleCHROMIUM
, internalformat
) == 12,
6672 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12
);
6673 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, width
) == 16,
6674 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16
);
6675 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM
, height
) == 20,
6676 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20
);
6678 // GL_EXT_multisampled_render_to_texture
6679 struct RenderbufferStorageMultisampleEXT
{
6680 typedef RenderbufferStorageMultisampleEXT ValueType
;
6681 static const CommandId kCmdId
= kRenderbufferStorageMultisampleEXT
;
6682 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6683 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6685 static uint32_t ComputeSize() {
6686 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6689 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6691 void Init(GLenum _target
,
6693 GLenum _internalformat
,
6699 internalformat
= _internalformat
;
6704 void* Set(void* cmd
,
6707 GLenum _internalformat
,
6710 static_cast<ValueType
*>(cmd
)
6711 ->Init(_target
, _samples
, _internalformat
, _width
, _height
);
6712 return NextCmdAddress
<ValueType
>(cmd
);
6715 gpu::CommandHeader header
;
6718 uint32_t internalformat
;
6723 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT
) == 24,
6724 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24
);
6725 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, header
) == 0,
6726 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0
);
6727 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, target
) == 4,
6728 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4
);
6729 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, samples
) == 8,
6730 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8
);
6732 offsetof(RenderbufferStorageMultisampleEXT
, internalformat
) == 12,
6733 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12
);
6734 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, width
) == 16,
6735 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16
);
6736 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT
, height
) == 20,
6737 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20
);
6739 struct FramebufferTexture2DMultisampleEXT
{
6740 typedef FramebufferTexture2DMultisampleEXT ValueType
;
6741 static const CommandId kCmdId
= kFramebufferTexture2DMultisampleEXT
;
6742 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6743 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
6745 static uint32_t ComputeSize() {
6746 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6749 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6751 void Init(GLenum _target
,
6758 attachment
= _attachment
;
6759 textarget
= _textarget
;
6764 void* Set(void* cmd
,
6770 static_cast<ValueType
*>(cmd
)
6771 ->Init(_target
, _attachment
, _textarget
, _texture
, _samples
);
6772 return NextCmdAddress
<ValueType
>(cmd
);
6775 gpu::CommandHeader header
;
6777 uint32_t attachment
;
6781 static const int32_t level
= 0;
6784 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT
) == 24,
6785 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_24
);
6786 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, header
) == 0,
6787 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0
);
6788 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, target
) == 4,
6789 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4
);
6790 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, attachment
) == 8,
6791 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8
);
6792 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, textarget
) == 12,
6793 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12
);
6794 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, texture
) == 16,
6795 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16
);
6796 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT
, samples
) == 20,
6797 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_20
);
6799 struct TexStorage2DEXT
{
6800 typedef TexStorage2DEXT ValueType
;
6801 static const CommandId kCmdId
= kTexStorage2DEXT
;
6802 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6803 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6805 static uint32_t ComputeSize() {
6806 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6809 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6811 void Init(GLenum _target
,
6813 GLenum _internalFormat
,
6819 internalFormat
= _internalFormat
;
6824 void* Set(void* cmd
,
6827 GLenum _internalFormat
,
6830 static_cast<ValueType
*>(cmd
)
6831 ->Init(_target
, _levels
, _internalFormat
, _width
, _height
);
6832 return NextCmdAddress
<ValueType
>(cmd
);
6835 gpu::CommandHeader header
;
6838 uint32_t internalFormat
;
6843 COMPILE_ASSERT(sizeof(TexStorage2DEXT
) == 24, Sizeof_TexStorage2DEXT_is_not_24
);
6844 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, header
) == 0,
6845 OffsetOf_TexStorage2DEXT_header_not_0
);
6846 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, target
) == 4,
6847 OffsetOf_TexStorage2DEXT_target_not_4
);
6848 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, levels
) == 8,
6849 OffsetOf_TexStorage2DEXT_levels_not_8
);
6850 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, internalFormat
) == 12,
6851 OffsetOf_TexStorage2DEXT_internalFormat_not_12
);
6852 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, width
) == 16,
6853 OffsetOf_TexStorage2DEXT_width_not_16
);
6854 COMPILE_ASSERT(offsetof(TexStorage2DEXT
, height
) == 20,
6855 OffsetOf_TexStorage2DEXT_height_not_20
);
6857 struct GenQueriesEXTImmediate
{
6858 typedef GenQueriesEXTImmediate ValueType
;
6859 static const CommandId kCmdId
= kGenQueriesEXTImmediate
;
6860 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6861 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6863 static uint32_t ComputeDataSize(GLsizei n
) {
6864 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
6867 static uint32_t ComputeSize(GLsizei n
) {
6868 return static_cast<uint32_t>(sizeof(ValueType
) +
6869 ComputeDataSize(n
)); // NOLINT
6872 void SetHeader(GLsizei n
) {
6873 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
6876 void Init(GLsizei _n
, GLuint
* _queries
) {
6879 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
6882 void* Set(void* cmd
, GLsizei _n
, GLuint
* _queries
) {
6883 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
6884 const uint32_t size
= ComputeSize(_n
);
6885 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6888 gpu::CommandHeader header
;
6892 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate
) == 8,
6893 Sizeof_GenQueriesEXTImmediate_is_not_8
);
6894 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate
, header
) == 0,
6895 OffsetOf_GenQueriesEXTImmediate_header_not_0
);
6896 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate
, n
) == 4,
6897 OffsetOf_GenQueriesEXTImmediate_n_not_4
);
6899 struct DeleteQueriesEXTImmediate
{
6900 typedef DeleteQueriesEXTImmediate ValueType
;
6901 static const CommandId kCmdId
= kDeleteQueriesEXTImmediate
;
6902 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
6903 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6905 static uint32_t ComputeDataSize(GLsizei n
) {
6906 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
6909 static uint32_t ComputeSize(GLsizei n
) {
6910 return static_cast<uint32_t>(sizeof(ValueType
) +
6911 ComputeDataSize(n
)); // NOLINT
6914 void SetHeader(GLsizei n
) {
6915 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
6918 void Init(GLsizei _n
, const GLuint
* _queries
) {
6921 memcpy(ImmediateDataAddress(this), _queries
, ComputeDataSize(_n
));
6924 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _queries
) {
6925 static_cast<ValueType
*>(cmd
)->Init(_n
, _queries
);
6926 const uint32_t size
= ComputeSize(_n
);
6927 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
6930 gpu::CommandHeader header
;
6934 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate
) == 8,
6935 Sizeof_DeleteQueriesEXTImmediate_is_not_8
);
6936 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate
, header
) == 0,
6937 OffsetOf_DeleteQueriesEXTImmediate_header_not_0
);
6938 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate
, n
) == 4,
6939 OffsetOf_DeleteQueriesEXTImmediate_n_not_4
);
6941 struct BeginQueryEXT
{
6942 typedef BeginQueryEXT ValueType
;
6943 static const CommandId kCmdId
= kBeginQueryEXT
;
6944 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
6945 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
6947 static uint32_t ComputeSize() {
6948 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
6951 void SetHeader() { header
.SetCmd
<ValueType
>(); }
6953 void Init(GLenum _target
,
6955 uint32_t _sync_data_shm_id
,
6956 uint32_t _sync_data_shm_offset
) {
6960 sync_data_shm_id
= _sync_data_shm_id
;
6961 sync_data_shm_offset
= _sync_data_shm_offset
;
6964 void* Set(void* cmd
,
6967 uint32_t _sync_data_shm_id
,
6968 uint32_t _sync_data_shm_offset
) {
6969 static_cast<ValueType
*>(cmd
)
6970 ->Init(_target
, _id
, _sync_data_shm_id
, _sync_data_shm_offset
);
6971 return NextCmdAddress
<ValueType
>(cmd
);
6974 gpu::CommandHeader header
;
6977 uint32_t sync_data_shm_id
;
6978 uint32_t sync_data_shm_offset
;
6981 COMPILE_ASSERT(sizeof(BeginQueryEXT
) == 20, Sizeof_BeginQueryEXT_is_not_20
);
6982 COMPILE_ASSERT(offsetof(BeginQueryEXT
, header
) == 0,
6983 OffsetOf_BeginQueryEXT_header_not_0
);
6984 COMPILE_ASSERT(offsetof(BeginQueryEXT
, target
) == 4,
6985 OffsetOf_BeginQueryEXT_target_not_4
);
6986 COMPILE_ASSERT(offsetof(BeginQueryEXT
, id
) == 8,
6987 OffsetOf_BeginQueryEXT_id_not_8
);
6988 COMPILE_ASSERT(offsetof(BeginQueryEXT
, sync_data_shm_id
) == 12,
6989 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12
);
6990 COMPILE_ASSERT(offsetof(BeginQueryEXT
, sync_data_shm_offset
) == 16,
6991 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16
);
6993 struct EndQueryEXT
{
6994 typedef EndQueryEXT ValueType
;
6995 static const CommandId kCmdId
= kEndQueryEXT
;
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
, GLuint _submit_count
) {
7008 submit_count
= _submit_count
;
7011 void* Set(void* cmd
, GLenum _target
, GLuint _submit_count
) {
7012 static_cast<ValueType
*>(cmd
)->Init(_target
, _submit_count
);
7013 return NextCmdAddress
<ValueType
>(cmd
);
7016 gpu::CommandHeader header
;
7018 uint32_t submit_count
;
7021 COMPILE_ASSERT(sizeof(EndQueryEXT
) == 12, Sizeof_EndQueryEXT_is_not_12
);
7022 COMPILE_ASSERT(offsetof(EndQueryEXT
, header
) == 0,
7023 OffsetOf_EndQueryEXT_header_not_0
);
7024 COMPILE_ASSERT(offsetof(EndQueryEXT
, target
) == 4,
7025 OffsetOf_EndQueryEXT_target_not_4
);
7026 COMPILE_ASSERT(offsetof(EndQueryEXT
, submit_count
) == 8,
7027 OffsetOf_EndQueryEXT_submit_count_not_8
);
7029 struct InsertEventMarkerEXT
{
7030 typedef InsertEventMarkerEXT ValueType
;
7031 static const CommandId kCmdId
= kInsertEventMarkerEXT
;
7032 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7033 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7035 static uint32_t ComputeSize() {
7036 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7039 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7041 void Init(GLuint _bucket_id
) {
7043 bucket_id
= _bucket_id
;
7046 void* Set(void* cmd
, GLuint _bucket_id
) {
7047 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7048 return NextCmdAddress
<ValueType
>(cmd
);
7051 gpu::CommandHeader header
;
7055 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT
) == 8,
7056 Sizeof_InsertEventMarkerEXT_is_not_8
);
7057 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT
, header
) == 0,
7058 OffsetOf_InsertEventMarkerEXT_header_not_0
);
7059 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT
, bucket_id
) == 4,
7060 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4
);
7062 struct PushGroupMarkerEXT
{
7063 typedef PushGroupMarkerEXT ValueType
;
7064 static const CommandId kCmdId
= kPushGroupMarkerEXT
;
7065 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7066 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7068 static uint32_t ComputeSize() {
7069 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7072 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7074 void Init(GLuint _bucket_id
) {
7076 bucket_id
= _bucket_id
;
7079 void* Set(void* cmd
, GLuint _bucket_id
) {
7080 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7081 return NextCmdAddress
<ValueType
>(cmd
);
7084 gpu::CommandHeader header
;
7088 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT
) == 8,
7089 Sizeof_PushGroupMarkerEXT_is_not_8
);
7090 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT
, header
) == 0,
7091 OffsetOf_PushGroupMarkerEXT_header_not_0
);
7092 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT
, bucket_id
) == 4,
7093 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4
);
7095 struct PopGroupMarkerEXT
{
7096 typedef PopGroupMarkerEXT ValueType
;
7097 static const CommandId kCmdId
= kPopGroupMarkerEXT
;
7098 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7099 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7101 static uint32_t ComputeSize() {
7102 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7105 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7107 void Init() { SetHeader(); }
7109 void* Set(void* cmd
) {
7110 static_cast<ValueType
*>(cmd
)->Init();
7111 return NextCmdAddress
<ValueType
>(cmd
);
7114 gpu::CommandHeader header
;
7117 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT
) == 4,
7118 Sizeof_PopGroupMarkerEXT_is_not_4
);
7119 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT
, header
) == 0,
7120 OffsetOf_PopGroupMarkerEXT_header_not_0
);
7122 struct GenVertexArraysOESImmediate
{
7123 typedef GenVertexArraysOESImmediate ValueType
;
7124 static const CommandId kCmdId
= kGenVertexArraysOESImmediate
;
7125 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7126 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7128 static uint32_t ComputeDataSize(GLsizei n
) {
7129 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
7132 static uint32_t ComputeSize(GLsizei n
) {
7133 return static_cast<uint32_t>(sizeof(ValueType
) +
7134 ComputeDataSize(n
)); // NOLINT
7137 void SetHeader(GLsizei n
) {
7138 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
7141 void Init(GLsizei _n
, GLuint
* _arrays
) {
7144 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
7147 void* Set(void* cmd
, GLsizei _n
, GLuint
* _arrays
) {
7148 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
7149 const uint32_t size
= ComputeSize(_n
);
7150 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7153 gpu::CommandHeader header
;
7157 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate
) == 8,
7158 Sizeof_GenVertexArraysOESImmediate_is_not_8
);
7159 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate
, header
) == 0,
7160 OffsetOf_GenVertexArraysOESImmediate_header_not_0
);
7161 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate
, n
) == 4,
7162 OffsetOf_GenVertexArraysOESImmediate_n_not_4
);
7164 struct DeleteVertexArraysOESImmediate
{
7165 typedef DeleteVertexArraysOESImmediate ValueType
;
7166 static const CommandId kCmdId
= kDeleteVertexArraysOESImmediate
;
7167 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7168 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7170 static uint32_t ComputeDataSize(GLsizei n
) {
7171 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
7174 static uint32_t ComputeSize(GLsizei n
) {
7175 return static_cast<uint32_t>(sizeof(ValueType
) +
7176 ComputeDataSize(n
)); // NOLINT
7179 void SetHeader(GLsizei n
) {
7180 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
7183 void Init(GLsizei _n
, const GLuint
* _arrays
) {
7186 memcpy(ImmediateDataAddress(this), _arrays
, ComputeDataSize(_n
));
7189 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _arrays
) {
7190 static_cast<ValueType
*>(cmd
)->Init(_n
, _arrays
);
7191 const uint32_t size
= ComputeSize(_n
);
7192 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7195 gpu::CommandHeader header
;
7199 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate
) == 8,
7200 Sizeof_DeleteVertexArraysOESImmediate_is_not_8
);
7201 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate
, header
) == 0,
7202 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0
);
7203 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate
, n
) == 4,
7204 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4
);
7206 struct IsVertexArrayOES
{
7207 typedef IsVertexArrayOES ValueType
;
7208 static const CommandId kCmdId
= kIsVertexArrayOES
;
7209 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7210 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7212 typedef uint32_t Result
;
7214 static uint32_t ComputeSize() {
7215 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7218 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7220 void Init(GLuint _array
,
7221 uint32_t _result_shm_id
,
7222 uint32_t _result_shm_offset
) {
7225 result_shm_id
= _result_shm_id
;
7226 result_shm_offset
= _result_shm_offset
;
7229 void* Set(void* cmd
,
7231 uint32_t _result_shm_id
,
7232 uint32_t _result_shm_offset
) {
7233 static_cast<ValueType
*>(cmd
)
7234 ->Init(_array
, _result_shm_id
, _result_shm_offset
);
7235 return NextCmdAddress
<ValueType
>(cmd
);
7238 gpu::CommandHeader header
;
7240 uint32_t result_shm_id
;
7241 uint32_t result_shm_offset
;
7244 COMPILE_ASSERT(sizeof(IsVertexArrayOES
) == 16,
7245 Sizeof_IsVertexArrayOES_is_not_16
);
7246 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, header
) == 0,
7247 OffsetOf_IsVertexArrayOES_header_not_0
);
7248 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, array
) == 4,
7249 OffsetOf_IsVertexArrayOES_array_not_4
);
7250 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, result_shm_id
) == 8,
7251 OffsetOf_IsVertexArrayOES_result_shm_id_not_8
);
7252 COMPILE_ASSERT(offsetof(IsVertexArrayOES
, result_shm_offset
) == 12,
7253 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12
);
7255 struct BindVertexArrayOES
{
7256 typedef BindVertexArrayOES ValueType
;
7257 static const CommandId kCmdId
= kBindVertexArrayOES
;
7258 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7259 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7261 static uint32_t ComputeSize() {
7262 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7265 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7267 void Init(GLuint _array
) {
7272 void* Set(void* cmd
, GLuint _array
) {
7273 static_cast<ValueType
*>(cmd
)->Init(_array
);
7274 return NextCmdAddress
<ValueType
>(cmd
);
7277 gpu::CommandHeader header
;
7281 COMPILE_ASSERT(sizeof(BindVertexArrayOES
) == 8,
7282 Sizeof_BindVertexArrayOES_is_not_8
);
7283 COMPILE_ASSERT(offsetof(BindVertexArrayOES
, header
) == 0,
7284 OffsetOf_BindVertexArrayOES_header_not_0
);
7285 COMPILE_ASSERT(offsetof(BindVertexArrayOES
, array
) == 4,
7286 OffsetOf_BindVertexArrayOES_array_not_4
);
7288 struct SwapBuffers
{
7289 typedef SwapBuffers ValueType
;
7290 static const CommandId kCmdId
= kSwapBuffers
;
7291 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7292 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
7294 static uint32_t ComputeSize() {
7295 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7298 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7300 void Init() { SetHeader(); }
7302 void* Set(void* cmd
) {
7303 static_cast<ValueType
*>(cmd
)->Init();
7304 return NextCmdAddress
<ValueType
>(cmd
);
7307 gpu::CommandHeader header
;
7310 COMPILE_ASSERT(sizeof(SwapBuffers
) == 4, Sizeof_SwapBuffers_is_not_4
);
7311 COMPILE_ASSERT(offsetof(SwapBuffers
, header
) == 0,
7312 OffsetOf_SwapBuffers_header_not_0
);
7314 struct GetMaxValueInBufferCHROMIUM
{
7315 typedef GetMaxValueInBufferCHROMIUM ValueType
;
7316 static const CommandId kCmdId
= kGetMaxValueInBufferCHROMIUM
;
7317 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7318 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7320 typedef GLuint Result
;
7322 static uint32_t ComputeSize() {
7323 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7326 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7328 void Init(GLuint _buffer_id
,
7332 uint32_t _result_shm_id
,
7333 uint32_t _result_shm_offset
) {
7335 buffer_id
= _buffer_id
;
7339 result_shm_id
= _result_shm_id
;
7340 result_shm_offset
= _result_shm_offset
;
7343 void* Set(void* cmd
,
7348 uint32_t _result_shm_id
,
7349 uint32_t _result_shm_offset
) {
7350 static_cast<ValueType
*>(cmd
)->Init(_buffer_id
, _count
, _type
, _offset
,
7351 _result_shm_id
, _result_shm_offset
);
7352 return NextCmdAddress
<ValueType
>(cmd
);
7355 gpu::CommandHeader header
;
7360 uint32_t result_shm_id
;
7361 uint32_t result_shm_offset
;
7364 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM
) == 28,
7365 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28
);
7366 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, header
) == 0,
7367 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0
);
7368 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, buffer_id
) == 4,
7369 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4
);
7370 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, count
) == 8,
7371 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8
);
7372 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, type
) == 12,
7373 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12
);
7374 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, offset
) == 16,
7375 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16
);
7376 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_id
) == 20,
7377 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20
);
7378 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM
, result_shm_offset
) == 24,
7379 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24
);
7381 struct EnableFeatureCHROMIUM
{
7382 typedef EnableFeatureCHROMIUM ValueType
;
7383 static const CommandId kCmdId
= kEnableFeatureCHROMIUM
;
7384 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7385 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7387 typedef GLint Result
;
7389 static uint32_t ComputeSize() {
7390 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7393 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7395 void Init(GLuint _bucket_id
,
7396 uint32_t _result_shm_id
,
7397 uint32_t _result_shm_offset
) {
7399 bucket_id
= _bucket_id
;
7400 result_shm_id
= _result_shm_id
;
7401 result_shm_offset
= _result_shm_offset
;
7404 void* Set(void* cmd
,
7406 uint32_t _result_shm_id
,
7407 uint32_t _result_shm_offset
) {
7408 static_cast<ValueType
*>(cmd
)
7409 ->Init(_bucket_id
, _result_shm_id
, _result_shm_offset
);
7410 return NextCmdAddress
<ValueType
>(cmd
);
7413 gpu::CommandHeader header
;
7415 uint32_t result_shm_id
;
7416 uint32_t result_shm_offset
;
7419 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM
) == 16,
7420 Sizeof_EnableFeatureCHROMIUM_is_not_16
);
7421 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, header
) == 0,
7422 OffsetOf_EnableFeatureCHROMIUM_header_not_0
);
7423 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, bucket_id
) == 4,
7424 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4
);
7425 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, result_shm_id
) == 8,
7426 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8
);
7427 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM
, result_shm_offset
) == 12,
7428 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12
);
7430 struct ResizeCHROMIUM
{
7431 typedef ResizeCHROMIUM ValueType
;
7432 static const CommandId kCmdId
= kResizeCHROMIUM
;
7433 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7434 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7436 static uint32_t ComputeSize() {
7437 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7440 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7442 void Init(GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
7446 scale_factor
= _scale_factor
;
7449 void* Set(void* cmd
, GLuint _width
, GLuint _height
, GLfloat _scale_factor
) {
7450 static_cast<ValueType
*>(cmd
)->Init(_width
, _height
, _scale_factor
);
7451 return NextCmdAddress
<ValueType
>(cmd
);
7454 gpu::CommandHeader header
;
7460 COMPILE_ASSERT(sizeof(ResizeCHROMIUM
) == 16, Sizeof_ResizeCHROMIUM_is_not_16
);
7461 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, header
) == 0,
7462 OffsetOf_ResizeCHROMIUM_header_not_0
);
7463 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, width
) == 4,
7464 OffsetOf_ResizeCHROMIUM_width_not_4
);
7465 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, height
) == 8,
7466 OffsetOf_ResizeCHROMIUM_height_not_8
);
7467 COMPILE_ASSERT(offsetof(ResizeCHROMIUM
, scale_factor
) == 12,
7468 OffsetOf_ResizeCHROMIUM_scale_factor_not_12
);
7470 struct GetRequestableExtensionsCHROMIUM
{
7471 typedef GetRequestableExtensionsCHROMIUM ValueType
;
7472 static const CommandId kCmdId
= kGetRequestableExtensionsCHROMIUM
;
7473 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7474 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7476 static uint32_t ComputeSize() {
7477 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7480 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7482 void Init(uint32_t _bucket_id
) {
7484 bucket_id
= _bucket_id
;
7487 void* Set(void* cmd
, uint32_t _bucket_id
) {
7488 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7489 return NextCmdAddress
<ValueType
>(cmd
);
7492 gpu::CommandHeader header
;
7496 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM
) == 8,
7497 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8
);
7498 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM
, header
) == 0,
7499 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0
);
7500 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM
, bucket_id
) == 4,
7501 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4
);
7503 struct RequestExtensionCHROMIUM
{
7504 typedef RequestExtensionCHROMIUM ValueType
;
7505 static const CommandId kCmdId
= kRequestExtensionCHROMIUM
;
7506 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7507 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7509 static uint32_t ComputeSize() {
7510 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7513 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7515 void Init(uint32_t _bucket_id
) {
7517 bucket_id
= _bucket_id
;
7520 void* Set(void* cmd
, uint32_t _bucket_id
) {
7521 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
7522 return NextCmdAddress
<ValueType
>(cmd
);
7525 gpu::CommandHeader header
;
7529 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM
) == 8,
7530 Sizeof_RequestExtensionCHROMIUM_is_not_8
);
7531 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM
, header
) == 0,
7532 OffsetOf_RequestExtensionCHROMIUM_header_not_0
);
7533 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM
, bucket_id
) == 4,
7534 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4
);
7536 struct GetProgramInfoCHROMIUM
{
7537 typedef GetProgramInfoCHROMIUM ValueType
;
7538 static const CommandId kCmdId
= kGetProgramInfoCHROMIUM
;
7539 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7540 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7543 uint32_t link_status
;
7544 uint32_t num_attribs
;
7545 uint32_t num_uniforms
;
7548 static uint32_t ComputeSize() {
7549 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7552 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7554 void Init(GLuint _program
, uint32_t _bucket_id
) {
7557 bucket_id
= _bucket_id
;
7560 void* Set(void* cmd
, GLuint _program
, uint32_t _bucket_id
) {
7561 static_cast<ValueType
*>(cmd
)->Init(_program
, _bucket_id
);
7562 return NextCmdAddress
<ValueType
>(cmd
);
7565 gpu::CommandHeader header
;
7570 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM
) == 12,
7571 Sizeof_GetProgramInfoCHROMIUM_is_not_12
);
7572 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, header
) == 0,
7573 OffsetOf_GetProgramInfoCHROMIUM_header_not_0
);
7574 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, program
) == 4,
7575 OffsetOf_GetProgramInfoCHROMIUM_program_not_4
);
7576 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM
, bucket_id
) == 8,
7577 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8
);
7578 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, link_status
) == 0,
7579 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0
);
7580 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, num_attribs
) == 4,
7581 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4
);
7582 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result
, num_uniforms
) == 8,
7583 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8
);
7585 struct GetTranslatedShaderSourceANGLE
{
7586 typedef GetTranslatedShaderSourceANGLE ValueType
;
7587 static const CommandId kCmdId
= kGetTranslatedShaderSourceANGLE
;
7588 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7589 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7591 static uint32_t ComputeSize() {
7592 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7595 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7597 void Init(GLuint _shader
, uint32_t _bucket_id
) {
7600 bucket_id
= _bucket_id
;
7603 void* Set(void* cmd
, GLuint _shader
, uint32_t _bucket_id
) {
7604 static_cast<ValueType
*>(cmd
)->Init(_shader
, _bucket_id
);
7605 return NextCmdAddress
<ValueType
>(cmd
);
7608 gpu::CommandHeader header
;
7613 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE
) == 12,
7614 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12
);
7615 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, header
) == 0,
7616 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0
);
7617 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, shader
) == 4,
7618 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4
);
7619 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE
, bucket_id
) == 8,
7620 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8
);
7622 struct PostSubBufferCHROMIUM
{
7623 typedef PostSubBufferCHROMIUM ValueType
;
7624 static const CommandId kCmdId
= kPostSubBufferCHROMIUM
;
7625 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7626 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7628 static uint32_t ComputeSize() {
7629 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7632 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7634 void Init(GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
7642 void* Set(void* cmd
, GLint _x
, GLint _y
, GLint _width
, GLint _height
) {
7643 static_cast<ValueType
*>(cmd
)->Init(_x
, _y
, _width
, _height
);
7644 return NextCmdAddress
<ValueType
>(cmd
);
7647 gpu::CommandHeader header
;
7654 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM
) == 20,
7655 Sizeof_PostSubBufferCHROMIUM_is_not_20
);
7656 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, header
) == 0,
7657 OffsetOf_PostSubBufferCHROMIUM_header_not_0
);
7658 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, x
) == 4,
7659 OffsetOf_PostSubBufferCHROMIUM_x_not_4
);
7660 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, y
) == 8,
7661 OffsetOf_PostSubBufferCHROMIUM_y_not_8
);
7662 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, width
) == 12,
7663 OffsetOf_PostSubBufferCHROMIUM_width_not_12
);
7664 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM
, height
) == 16,
7665 OffsetOf_PostSubBufferCHROMIUM_height_not_16
);
7667 struct TexImageIOSurface2DCHROMIUM
{
7668 typedef TexImageIOSurface2DCHROMIUM ValueType
;
7669 static const CommandId kCmdId
= kTexImageIOSurface2DCHROMIUM
;
7670 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7671 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7673 static uint32_t ComputeSize() {
7674 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7677 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7679 void Init(GLenum _target
,
7682 GLuint _ioSurfaceId
,
7688 ioSurfaceId
= _ioSurfaceId
;
7692 void* Set(void* cmd
,
7696 GLuint _ioSurfaceId
,
7698 static_cast<ValueType
*>(cmd
)
7699 ->Init(_target
, _width
, _height
, _ioSurfaceId
, _plane
);
7700 return NextCmdAddress
<ValueType
>(cmd
);
7703 gpu::CommandHeader header
;
7707 uint32_t ioSurfaceId
;
7711 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM
) == 24,
7712 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24
);
7713 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, header
) == 0,
7714 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0
);
7715 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, target
) == 4,
7716 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4
);
7717 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, width
) == 8,
7718 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8
);
7719 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, height
) == 12,
7720 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12
);
7721 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, ioSurfaceId
) == 16,
7722 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16
);
7723 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM
, plane
) == 20,
7724 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20
);
7726 struct CopyTextureCHROMIUM
{
7727 typedef CopyTextureCHROMIUM ValueType
;
7728 static const CommandId kCmdId
= kCopyTextureCHROMIUM
;
7729 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7730 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7732 static uint32_t ComputeSize() {
7733 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7736 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7738 void Init(GLenum _target
,
7742 GLint _internalformat
,
7743 GLenum _dest_type
) {
7746 source_id
= _source_id
;
7749 internalformat
= _internalformat
;
7750 dest_type
= _dest_type
;
7753 void* Set(void* cmd
,
7758 GLint _internalformat
,
7759 GLenum _dest_type
) {
7760 static_cast<ValueType
*>(cmd
)->Init(_target
, _source_id
, _dest_id
, _level
,
7761 _internalformat
, _dest_type
);
7762 return NextCmdAddress
<ValueType
>(cmd
);
7765 gpu::CommandHeader header
;
7770 int32_t internalformat
;
7774 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM
) == 28,
7775 Sizeof_CopyTextureCHROMIUM_is_not_28
);
7776 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, header
) == 0,
7777 OffsetOf_CopyTextureCHROMIUM_header_not_0
);
7778 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, target
) == 4,
7779 OffsetOf_CopyTextureCHROMIUM_target_not_4
);
7780 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, source_id
) == 8,
7781 OffsetOf_CopyTextureCHROMIUM_source_id_not_8
);
7782 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, dest_id
) == 12,
7783 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12
);
7784 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, level
) == 16,
7785 OffsetOf_CopyTextureCHROMIUM_level_not_16
);
7786 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, internalformat
) == 20,
7787 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20
);
7788 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM
, dest_type
) == 24,
7789 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24
);
7791 struct DrawArraysInstancedANGLE
{
7792 typedef DrawArraysInstancedANGLE ValueType
;
7793 static const CommandId kCmdId
= kDrawArraysInstancedANGLE
;
7794 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7795 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7797 static uint32_t ComputeSize() {
7798 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7801 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7803 void Init(GLenum _mode
, GLint _first
, GLsizei _count
, GLsizei _primcount
) {
7808 primcount
= _primcount
;
7811 void* Set(void* cmd
,
7815 GLsizei _primcount
) {
7816 static_cast<ValueType
*>(cmd
)->Init(_mode
, _first
, _count
, _primcount
);
7817 return NextCmdAddress
<ValueType
>(cmd
);
7820 gpu::CommandHeader header
;
7827 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE
) == 20,
7828 Sizeof_DrawArraysInstancedANGLE_is_not_20
);
7829 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, header
) == 0,
7830 OffsetOf_DrawArraysInstancedANGLE_header_not_0
);
7831 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, mode
) == 4,
7832 OffsetOf_DrawArraysInstancedANGLE_mode_not_4
);
7833 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, first
) == 8,
7834 OffsetOf_DrawArraysInstancedANGLE_first_not_8
);
7835 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, count
) == 12,
7836 OffsetOf_DrawArraysInstancedANGLE_count_not_12
);
7837 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE
, primcount
) == 16,
7838 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16
);
7840 struct DrawElementsInstancedANGLE
{
7841 typedef DrawElementsInstancedANGLE ValueType
;
7842 static const CommandId kCmdId
= kDrawElementsInstancedANGLE
;
7843 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7844 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7846 static uint32_t ComputeSize() {
7847 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7850 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7852 void Init(GLenum _mode
,
7855 GLuint _index_offset
,
7856 GLsizei _primcount
) {
7861 index_offset
= _index_offset
;
7862 primcount
= _primcount
;
7865 void* Set(void* cmd
,
7869 GLuint _index_offset
,
7870 GLsizei _primcount
) {
7871 static_cast<ValueType
*>(cmd
)
7872 ->Init(_mode
, _count
, _type
, _index_offset
, _primcount
);
7873 return NextCmdAddress
<ValueType
>(cmd
);
7876 gpu::CommandHeader header
;
7880 uint32_t index_offset
;
7884 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE
) == 24,
7885 Sizeof_DrawElementsInstancedANGLE_is_not_24
);
7886 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, header
) == 0,
7887 OffsetOf_DrawElementsInstancedANGLE_header_not_0
);
7888 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, mode
) == 4,
7889 OffsetOf_DrawElementsInstancedANGLE_mode_not_4
);
7890 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, count
) == 8,
7891 OffsetOf_DrawElementsInstancedANGLE_count_not_8
);
7892 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, type
) == 12,
7893 OffsetOf_DrawElementsInstancedANGLE_type_not_12
);
7894 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, index_offset
) == 16,
7895 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16
);
7896 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE
, primcount
) == 20,
7897 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20
);
7899 struct VertexAttribDivisorANGLE
{
7900 typedef VertexAttribDivisorANGLE ValueType
;
7901 static const CommandId kCmdId
= kVertexAttribDivisorANGLE
;
7902 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
7903 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
7905 static uint32_t ComputeSize() {
7906 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
7909 void SetHeader() { header
.SetCmd
<ValueType
>(); }
7911 void Init(GLuint _index
, GLuint _divisor
) {
7917 void* Set(void* cmd
, GLuint _index
, GLuint _divisor
) {
7918 static_cast<ValueType
*>(cmd
)->Init(_index
, _divisor
);
7919 return NextCmdAddress
<ValueType
>(cmd
);
7922 gpu::CommandHeader header
;
7927 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE
) == 12,
7928 Sizeof_VertexAttribDivisorANGLE_is_not_12
);
7929 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, header
) == 0,
7930 OffsetOf_VertexAttribDivisorANGLE_header_not_0
);
7931 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, index
) == 4,
7932 OffsetOf_VertexAttribDivisorANGLE_index_not_4
);
7933 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE
, divisor
) == 8,
7934 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8
);
7936 struct ProduceTextureCHROMIUMImmediate
{
7937 typedef ProduceTextureCHROMIUMImmediate ValueType
;
7938 static const CommandId kCmdId
= kProduceTextureCHROMIUMImmediate
;
7939 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7940 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
7942 static uint32_t ComputeDataSize() {
7943 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
7946 static uint32_t ComputeSize() {
7947 return static_cast<uint32_t>(sizeof(ValueType
) +
7948 ComputeDataSize()); // NOLINT
7951 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7953 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
7956 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
7959 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
7960 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
7961 const uint32_t size
= ComputeSize();
7962 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
7965 gpu::CommandHeader header
;
7969 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate
) == 8,
7970 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8
);
7971 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate
, header
) == 0,
7972 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0
);
7973 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate
, target
) == 4,
7974 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4
);
7976 struct ProduceTextureDirectCHROMIUMImmediate
{
7977 typedef ProduceTextureDirectCHROMIUMImmediate ValueType
;
7978 static const CommandId kCmdId
= kProduceTextureDirectCHROMIUMImmediate
;
7979 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
7980 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
7982 static uint32_t ComputeDataSize() {
7983 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
7986 static uint32_t ComputeSize() {
7987 return static_cast<uint32_t>(sizeof(ValueType
) +
7988 ComputeDataSize()); // NOLINT
7991 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
7993 void Init(GLuint _texture
, GLenum _target
, const GLbyte
* _mailbox
) {
7997 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
8000 void* Set(void* cmd
,
8003 const GLbyte
* _mailbox
) {
8004 static_cast<ValueType
*>(cmd
)->Init(_texture
, _target
, _mailbox
);
8005 const uint32_t size
= ComputeSize();
8006 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8009 gpu::CommandHeader header
;
8014 COMPILE_ASSERT(sizeof(ProduceTextureDirectCHROMIUMImmediate
) == 12,
8015 Sizeof_ProduceTextureDirectCHROMIUMImmediate_is_not_12
);
8016 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, header
) == 0,
8017 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_header_not_0
);
8018 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, texture
) == 4,
8019 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_texture_not_4
);
8020 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate
, target
) == 8,
8021 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_target_not_8
);
8023 struct ConsumeTextureCHROMIUMImmediate
{
8024 typedef ConsumeTextureCHROMIUMImmediate ValueType
;
8025 static const CommandId kCmdId
= kConsumeTextureCHROMIUMImmediate
;
8026 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8027 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8029 static uint32_t ComputeDataSize() {
8030 return static_cast<uint32_t>(sizeof(GLbyte
) * 64); // NOLINT
8033 static uint32_t ComputeSize() {
8034 return static_cast<uint32_t>(sizeof(ValueType
) +
8035 ComputeDataSize()); // NOLINT
8038 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
8040 void Init(GLenum _target
, const GLbyte
* _mailbox
) {
8043 memcpy(ImmediateDataAddress(this), _mailbox
, ComputeDataSize());
8046 void* Set(void* cmd
, GLenum _target
, const GLbyte
* _mailbox
) {
8047 static_cast<ValueType
*>(cmd
)->Init(_target
, _mailbox
);
8048 const uint32_t size
= ComputeSize();
8049 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8052 gpu::CommandHeader header
;
8056 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate
) == 8,
8057 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8
);
8058 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate
, header
) == 0,
8059 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0
);
8060 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate
, target
) == 4,
8061 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4
);
8063 struct BindUniformLocationCHROMIUMBucket
{
8064 typedef BindUniformLocationCHROMIUMBucket ValueType
;
8065 static const CommandId kCmdId
= kBindUniformLocationCHROMIUMBucket
;
8066 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8067 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8069 static uint32_t ComputeSize() {
8070 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8073 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8075 void Init(GLuint _program
, GLint _location
, uint32_t _name_bucket_id
) {
8078 location
= _location
;
8079 name_bucket_id
= _name_bucket_id
;
8082 void* Set(void* cmd
,
8085 uint32_t _name_bucket_id
) {
8086 static_cast<ValueType
*>(cmd
)->Init(_program
, _location
, _name_bucket_id
);
8087 return NextCmdAddress
<ValueType
>(cmd
);
8090 gpu::CommandHeader header
;
8093 uint32_t name_bucket_id
;
8096 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket
) == 16,
8097 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16
);
8098 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, header
) == 0,
8099 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0
);
8100 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, program
) == 4,
8101 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4
);
8102 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket
, location
) == 8,
8103 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8
);
8105 offsetof(BindUniformLocationCHROMIUMBucket
, name_bucket_id
) == 12,
8106 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12
);
8108 struct GenValuebuffersCHROMIUMImmediate
{
8109 typedef GenValuebuffersCHROMIUMImmediate ValueType
;
8110 static const CommandId kCmdId
= kGenValuebuffersCHROMIUMImmediate
;
8111 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8112 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8114 static uint32_t ComputeDataSize(GLsizei n
) {
8115 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
8118 static uint32_t ComputeSize(GLsizei n
) {
8119 return static_cast<uint32_t>(sizeof(ValueType
) +
8120 ComputeDataSize(n
)); // NOLINT
8123 void SetHeader(GLsizei n
) {
8124 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
8127 void Init(GLsizei _n
, GLuint
* _buffers
) {
8130 memcpy(ImmediateDataAddress(this), _buffers
, ComputeDataSize(_n
));
8133 void* Set(void* cmd
, GLsizei _n
, GLuint
* _buffers
) {
8134 static_cast<ValueType
*>(cmd
)->Init(_n
, _buffers
);
8135 const uint32_t size
= ComputeSize(_n
);
8136 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8139 gpu::CommandHeader header
;
8143 COMPILE_ASSERT(sizeof(GenValuebuffersCHROMIUMImmediate
) == 8,
8144 Sizeof_GenValuebuffersCHROMIUMImmediate_is_not_8
);
8145 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate
, header
) == 0,
8146 OffsetOf_GenValuebuffersCHROMIUMImmediate_header_not_0
);
8147 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate
, n
) == 4,
8148 OffsetOf_GenValuebuffersCHROMIUMImmediate_n_not_4
);
8150 struct DeleteValuebuffersCHROMIUMImmediate
{
8151 typedef DeleteValuebuffersCHROMIUMImmediate ValueType
;
8152 static const CommandId kCmdId
= kDeleteValuebuffersCHROMIUMImmediate
;
8153 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8154 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8156 static uint32_t ComputeDataSize(GLsizei n
) {
8157 return static_cast<uint32_t>(sizeof(GLuint
) * n
); // NOLINT
8160 static uint32_t ComputeSize(GLsizei n
) {
8161 return static_cast<uint32_t>(sizeof(ValueType
) +
8162 ComputeDataSize(n
)); // NOLINT
8165 void SetHeader(GLsizei n
) {
8166 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(n
));
8169 void Init(GLsizei _n
, const GLuint
* _valuebuffers
) {
8172 memcpy(ImmediateDataAddress(this), _valuebuffers
, ComputeDataSize(_n
));
8175 void* Set(void* cmd
, GLsizei _n
, const GLuint
* _valuebuffers
) {
8176 static_cast<ValueType
*>(cmd
)->Init(_n
, _valuebuffers
);
8177 const uint32_t size
= ComputeSize(_n
);
8178 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8181 gpu::CommandHeader header
;
8185 COMPILE_ASSERT(sizeof(DeleteValuebuffersCHROMIUMImmediate
) == 8,
8186 Sizeof_DeleteValuebuffersCHROMIUMImmediate_is_not_8
);
8187 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate
, header
) == 0,
8188 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_header_not_0
);
8189 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate
, n
) == 4,
8190 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_n_not_4
);
8192 struct IsValuebufferCHROMIUM
{
8193 typedef IsValuebufferCHROMIUM ValueType
;
8194 static const CommandId kCmdId
= kIsValuebufferCHROMIUM
;
8195 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8196 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8198 typedef uint32_t Result
;
8200 static uint32_t ComputeSize() {
8201 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8204 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8206 void Init(GLuint _valuebuffer
,
8207 uint32_t _result_shm_id
,
8208 uint32_t _result_shm_offset
) {
8210 valuebuffer
= _valuebuffer
;
8211 result_shm_id
= _result_shm_id
;
8212 result_shm_offset
= _result_shm_offset
;
8215 void* Set(void* cmd
,
8216 GLuint _valuebuffer
,
8217 uint32_t _result_shm_id
,
8218 uint32_t _result_shm_offset
) {
8219 static_cast<ValueType
*>(cmd
)
8220 ->Init(_valuebuffer
, _result_shm_id
, _result_shm_offset
);
8221 return NextCmdAddress
<ValueType
>(cmd
);
8224 gpu::CommandHeader header
;
8225 uint32_t valuebuffer
;
8226 uint32_t result_shm_id
;
8227 uint32_t result_shm_offset
;
8230 COMPILE_ASSERT(sizeof(IsValuebufferCHROMIUM
) == 16,
8231 Sizeof_IsValuebufferCHROMIUM_is_not_16
);
8232 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM
, header
) == 0,
8233 OffsetOf_IsValuebufferCHROMIUM_header_not_0
);
8234 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM
, valuebuffer
) == 4,
8235 OffsetOf_IsValuebufferCHROMIUM_valuebuffer_not_4
);
8236 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM
, result_shm_id
) == 8,
8237 OffsetOf_IsValuebufferCHROMIUM_result_shm_id_not_8
);
8238 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM
, result_shm_offset
) == 12,
8239 OffsetOf_IsValuebufferCHROMIUM_result_shm_offset_not_12
);
8241 struct BindValuebufferCHROMIUM
{
8242 typedef BindValuebufferCHROMIUM ValueType
;
8243 static const CommandId kCmdId
= kBindValuebufferCHROMIUM
;
8244 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8245 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8247 static uint32_t ComputeSize() {
8248 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8251 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8253 void Init(GLenum _target
, GLuint _valuebuffer
) {
8256 valuebuffer
= _valuebuffer
;
8259 void* Set(void* cmd
, GLenum _target
, GLuint _valuebuffer
) {
8260 static_cast<ValueType
*>(cmd
)->Init(_target
, _valuebuffer
);
8261 return NextCmdAddress
<ValueType
>(cmd
);
8264 gpu::CommandHeader header
;
8266 uint32_t valuebuffer
;
8269 COMPILE_ASSERT(sizeof(BindValuebufferCHROMIUM
) == 12,
8270 Sizeof_BindValuebufferCHROMIUM_is_not_12
);
8271 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM
, header
) == 0,
8272 OffsetOf_BindValuebufferCHROMIUM_header_not_0
);
8273 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM
, target
) == 4,
8274 OffsetOf_BindValuebufferCHROMIUM_target_not_4
);
8275 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM
, valuebuffer
) == 8,
8276 OffsetOf_BindValuebufferCHROMIUM_valuebuffer_not_8
);
8278 struct SubscribeValueCHROMIUM
{
8279 typedef SubscribeValueCHROMIUM ValueType
;
8280 static const CommandId kCmdId
= kSubscribeValueCHROMIUM
;
8281 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8282 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8284 static uint32_t ComputeSize() {
8285 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8288 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8290 void Init(GLenum _target
, GLenum _subscription
) {
8293 subscription
= _subscription
;
8296 void* Set(void* cmd
, GLenum _target
, GLenum _subscription
) {
8297 static_cast<ValueType
*>(cmd
)->Init(_target
, _subscription
);
8298 return NextCmdAddress
<ValueType
>(cmd
);
8301 gpu::CommandHeader header
;
8303 uint32_t subscription
;
8306 COMPILE_ASSERT(sizeof(SubscribeValueCHROMIUM
) == 12,
8307 Sizeof_SubscribeValueCHROMIUM_is_not_12
);
8308 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM
, header
) == 0,
8309 OffsetOf_SubscribeValueCHROMIUM_header_not_0
);
8310 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM
, target
) == 4,
8311 OffsetOf_SubscribeValueCHROMIUM_target_not_4
);
8312 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM
, subscription
) == 8,
8313 OffsetOf_SubscribeValueCHROMIUM_subscription_not_8
);
8315 struct PopulateSubscribedValuesCHROMIUM
{
8316 typedef PopulateSubscribedValuesCHROMIUM ValueType
;
8317 static const CommandId kCmdId
= kPopulateSubscribedValuesCHROMIUM
;
8318 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8319 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8321 static uint32_t ComputeSize() {
8322 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8325 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8327 void Init(GLenum _target
) {
8332 void* Set(void* cmd
, GLenum _target
) {
8333 static_cast<ValueType
*>(cmd
)->Init(_target
);
8334 return NextCmdAddress
<ValueType
>(cmd
);
8337 gpu::CommandHeader header
;
8341 COMPILE_ASSERT(sizeof(PopulateSubscribedValuesCHROMIUM
) == 8,
8342 Sizeof_PopulateSubscribedValuesCHROMIUM_is_not_8
);
8343 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM
, header
) == 0,
8344 OffsetOf_PopulateSubscribedValuesCHROMIUM_header_not_0
);
8345 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM
, target
) == 4,
8346 OffsetOf_PopulateSubscribedValuesCHROMIUM_target_not_4
);
8348 struct UniformValuebufferCHROMIUM
{
8349 typedef UniformValuebufferCHROMIUM ValueType
;
8350 static const CommandId kCmdId
= kUniformValuebufferCHROMIUM
;
8351 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8352 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8354 static uint32_t ComputeSize() {
8355 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8358 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8360 void Init(GLint _location
, GLenum _target
, GLenum _subscription
) {
8362 location
= _location
;
8364 subscription
= _subscription
;
8367 void* Set(void* cmd
, GLint _location
, GLenum _target
, GLenum _subscription
) {
8368 static_cast<ValueType
*>(cmd
)->Init(_location
, _target
, _subscription
);
8369 return NextCmdAddress
<ValueType
>(cmd
);
8372 gpu::CommandHeader header
;
8375 uint32_t subscription
;
8378 COMPILE_ASSERT(sizeof(UniformValuebufferCHROMIUM
) == 16,
8379 Sizeof_UniformValuebufferCHROMIUM_is_not_16
);
8380 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM
, header
) == 0,
8381 OffsetOf_UniformValuebufferCHROMIUM_header_not_0
);
8382 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM
, location
) == 4,
8383 OffsetOf_UniformValuebufferCHROMIUM_location_not_4
);
8384 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM
, target
) == 8,
8385 OffsetOf_UniformValuebufferCHROMIUM_target_not_8
);
8386 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM
, subscription
) == 12,
8387 OffsetOf_UniformValuebufferCHROMIUM_subscription_not_12
);
8389 struct BindTexImage2DCHROMIUM
{
8390 typedef BindTexImage2DCHROMIUM ValueType
;
8391 static const CommandId kCmdId
= kBindTexImage2DCHROMIUM
;
8392 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8393 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8395 static uint32_t ComputeSize() {
8396 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8399 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8401 void Init(GLenum _target
, GLint _imageId
) {
8407 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
8408 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
8409 return NextCmdAddress
<ValueType
>(cmd
);
8412 gpu::CommandHeader header
;
8417 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM
) == 12,
8418 Sizeof_BindTexImage2DCHROMIUM_is_not_12
);
8419 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, header
) == 0,
8420 OffsetOf_BindTexImage2DCHROMIUM_header_not_0
);
8421 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, target
) == 4,
8422 OffsetOf_BindTexImage2DCHROMIUM_target_not_4
);
8423 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM
, imageId
) == 8,
8424 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8
);
8426 struct ReleaseTexImage2DCHROMIUM
{
8427 typedef ReleaseTexImage2DCHROMIUM ValueType
;
8428 static const CommandId kCmdId
= kReleaseTexImage2DCHROMIUM
;
8429 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8430 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8432 static uint32_t ComputeSize() {
8433 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8436 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8438 void Init(GLenum _target
, GLint _imageId
) {
8444 void* Set(void* cmd
, GLenum _target
, GLint _imageId
) {
8445 static_cast<ValueType
*>(cmd
)->Init(_target
, _imageId
);
8446 return NextCmdAddress
<ValueType
>(cmd
);
8449 gpu::CommandHeader header
;
8454 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM
) == 12,
8455 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12
);
8456 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, header
) == 0,
8457 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0
);
8458 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, target
) == 4,
8459 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4
);
8460 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM
, imageId
) == 8,
8461 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8
);
8463 struct TraceBeginCHROMIUM
{
8464 typedef TraceBeginCHROMIUM ValueType
;
8465 static const CommandId kCmdId
= kTraceBeginCHROMIUM
;
8466 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8467 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8469 static uint32_t ComputeSize() {
8470 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8473 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8475 void Init(GLuint _bucket_id
) {
8477 bucket_id
= _bucket_id
;
8480 void* Set(void* cmd
, GLuint _bucket_id
) {
8481 static_cast<ValueType
*>(cmd
)->Init(_bucket_id
);
8482 return NextCmdAddress
<ValueType
>(cmd
);
8485 gpu::CommandHeader header
;
8489 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM
) == 8,
8490 Sizeof_TraceBeginCHROMIUM_is_not_8
);
8491 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM
, header
) == 0,
8492 OffsetOf_TraceBeginCHROMIUM_header_not_0
);
8493 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM
, bucket_id
) == 4,
8494 OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4
);
8496 struct TraceEndCHROMIUM
{
8497 typedef TraceEndCHROMIUM ValueType
;
8498 static const CommandId kCmdId
= kTraceEndCHROMIUM
;
8499 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8500 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8502 static uint32_t ComputeSize() {
8503 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8506 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8508 void Init() { SetHeader(); }
8510 void* Set(void* cmd
) {
8511 static_cast<ValueType
*>(cmd
)->Init();
8512 return NextCmdAddress
<ValueType
>(cmd
);
8515 gpu::CommandHeader header
;
8518 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM
) == 4, Sizeof_TraceEndCHROMIUM_is_not_4
);
8519 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM
, header
) == 0,
8520 OffsetOf_TraceEndCHROMIUM_header_not_0
);
8522 struct AsyncTexSubImage2DCHROMIUM
{
8523 typedef AsyncTexSubImage2DCHROMIUM ValueType
;
8524 static const CommandId kCmdId
= kAsyncTexSubImage2DCHROMIUM
;
8525 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8526 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8528 static uint32_t ComputeSize() {
8529 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8532 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8534 void Init(GLenum _target
,
8542 uint32_t _data_shm_id
,
8543 uint32_t _data_shm_offset
,
8544 uint32_t _async_upload_token
,
8545 uint32_t _sync_data_shm_id
,
8546 uint32_t _sync_data_shm_offset
) {
8556 data_shm_id
= _data_shm_id
;
8557 data_shm_offset
= _data_shm_offset
;
8558 async_upload_token
= _async_upload_token
;
8559 sync_data_shm_id
= _sync_data_shm_id
;
8560 sync_data_shm_offset
= _sync_data_shm_offset
;
8563 void* Set(void* cmd
,
8572 uint32_t _data_shm_id
,
8573 uint32_t _data_shm_offset
,
8574 uint32_t _async_upload_token
,
8575 uint32_t _sync_data_shm_id
,
8576 uint32_t _sync_data_shm_offset
) {
8577 static_cast<ValueType
*>(cmd
)
8578 ->Init(_target
, _level
, _xoffset
, _yoffset
, _width
, _height
, _format
,
8579 _type
, _data_shm_id
, _data_shm_offset
, _async_upload_token
,
8580 _sync_data_shm_id
, _sync_data_shm_offset
);
8581 return NextCmdAddress
<ValueType
>(cmd
);
8584 gpu::CommandHeader header
;
8593 uint32_t data_shm_id
;
8594 uint32_t data_shm_offset
;
8595 uint32_t async_upload_token
;
8596 uint32_t sync_data_shm_id
;
8597 uint32_t sync_data_shm_offset
;
8600 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM
) == 56,
8601 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_56
);
8602 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, header
) == 0,
8603 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0
);
8604 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, target
) == 4,
8605 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4
);
8606 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, level
) == 8,
8607 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8
);
8608 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, xoffset
) == 12,
8609 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12
);
8610 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, yoffset
) == 16,
8611 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16
);
8612 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, width
) == 20,
8613 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20
);
8614 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, height
) == 24,
8615 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24
);
8616 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, format
) == 28,
8617 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28
);
8618 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, type
) == 32,
8619 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32
);
8620 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_id
) == 36,
8621 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36
);
8622 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, data_shm_offset
) == 40,
8623 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40
);
8624 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, async_upload_token
) == 44,
8625 OffsetOf_AsyncTexSubImage2DCHROMIUM_async_upload_token_not_44
);
8626 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_id
) == 48,
8627 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_id_not_48
);
8628 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM
, sync_data_shm_offset
) == 52,
8629 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_offset_not_52
);
8631 struct AsyncTexImage2DCHROMIUM
{
8632 typedef AsyncTexImage2DCHROMIUM ValueType
;
8633 static const CommandId kCmdId
= kAsyncTexImage2DCHROMIUM
;
8634 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8635 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8637 static uint32_t ComputeSize() {
8638 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8641 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8643 void Init(GLenum _target
,
8645 GLint _internalformat
,
8650 uint32_t _pixels_shm_id
,
8651 uint32_t _pixels_shm_offset
,
8652 uint32_t _async_upload_token
,
8653 uint32_t _sync_data_shm_id
,
8654 uint32_t _sync_data_shm_offset
) {
8658 internalformat
= _internalformat
;
8663 pixels_shm_id
= _pixels_shm_id
;
8664 pixels_shm_offset
= _pixels_shm_offset
;
8665 async_upload_token
= _async_upload_token
;
8666 sync_data_shm_id
= _sync_data_shm_id
;
8667 sync_data_shm_offset
= _sync_data_shm_offset
;
8670 void* Set(void* cmd
,
8673 GLint _internalformat
,
8678 uint32_t _pixels_shm_id
,
8679 uint32_t _pixels_shm_offset
,
8680 uint32_t _async_upload_token
,
8681 uint32_t _sync_data_shm_id
,
8682 uint32_t _sync_data_shm_offset
) {
8683 static_cast<ValueType
*>(cmd
)
8684 ->Init(_target
, _level
, _internalformat
, _width
, _height
, _format
,
8685 _type
, _pixels_shm_id
, _pixels_shm_offset
, _async_upload_token
,
8686 _sync_data_shm_id
, _sync_data_shm_offset
);
8687 return NextCmdAddress
<ValueType
>(cmd
);
8690 gpu::CommandHeader header
;
8693 int32_t internalformat
;
8698 uint32_t pixels_shm_id
;
8699 uint32_t pixels_shm_offset
;
8700 uint32_t async_upload_token
;
8701 uint32_t sync_data_shm_id
;
8702 uint32_t sync_data_shm_offset
;
8703 static const int32_t border
= 0;
8706 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM
) == 52,
8707 Sizeof_AsyncTexImage2DCHROMIUM_is_not_52
);
8708 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, header
) == 0,
8709 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0
);
8710 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, target
) == 4,
8711 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4
);
8712 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, level
) == 8,
8713 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8
);
8714 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, internalformat
) == 12,
8715 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12
);
8716 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, width
) == 16,
8717 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16
);
8718 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, height
) == 20,
8719 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20
);
8720 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, format
) == 24,
8721 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_24
);
8722 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, type
) == 28,
8723 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_28
);
8724 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_id
) == 32,
8725 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_32
);
8726 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, pixels_shm_offset
) == 36,
8727 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_36
);
8728 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, async_upload_token
) == 40,
8729 OffsetOf_AsyncTexImage2DCHROMIUM_async_upload_token_not_40
);
8730 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_id
) == 44,
8731 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_id_not_44
);
8732 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM
, sync_data_shm_offset
) == 48,
8733 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_offset_not_48
);
8735 struct WaitAsyncTexImage2DCHROMIUM
{
8736 typedef WaitAsyncTexImage2DCHROMIUM ValueType
;
8737 static const CommandId kCmdId
= kWaitAsyncTexImage2DCHROMIUM
;
8738 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8739 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8741 static uint32_t ComputeSize() {
8742 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8745 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8747 void Init(GLenum _target
) {
8752 void* Set(void* cmd
, GLenum _target
) {
8753 static_cast<ValueType
*>(cmd
)->Init(_target
);
8754 return NextCmdAddress
<ValueType
>(cmd
);
8757 gpu::CommandHeader header
;
8761 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM
) == 8,
8762 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8
);
8763 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM
, header
) == 0,
8764 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0
);
8765 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM
, target
) == 4,
8766 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4
);
8768 struct WaitAllAsyncTexImage2DCHROMIUM
{
8769 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType
;
8770 static const CommandId kCmdId
= kWaitAllAsyncTexImage2DCHROMIUM
;
8771 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8772 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8774 static uint32_t ComputeSize() {
8775 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8778 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8780 void Init() { SetHeader(); }
8782 void* Set(void* cmd
) {
8783 static_cast<ValueType
*>(cmd
)->Init();
8784 return NextCmdAddress
<ValueType
>(cmd
);
8787 gpu::CommandHeader header
;
8790 COMPILE_ASSERT(sizeof(WaitAllAsyncTexImage2DCHROMIUM
) == 4,
8791 Sizeof_WaitAllAsyncTexImage2DCHROMIUM_is_not_4
);
8792 COMPILE_ASSERT(offsetof(WaitAllAsyncTexImage2DCHROMIUM
, header
) == 0,
8793 OffsetOf_WaitAllAsyncTexImage2DCHROMIUM_header_not_0
);
8795 struct DiscardFramebufferEXTImmediate
{
8796 typedef DiscardFramebufferEXTImmediate ValueType
;
8797 static const CommandId kCmdId
= kDiscardFramebufferEXTImmediate
;
8798 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8799 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8801 static uint32_t ComputeDataSize(GLsizei count
) {
8802 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
8805 static uint32_t ComputeSize(GLsizei count
) {
8806 return static_cast<uint32_t>(sizeof(ValueType
) +
8807 ComputeDataSize(count
)); // NOLINT
8810 void SetHeader(GLsizei count
) {
8811 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8814 void Init(GLenum _target
, GLsizei _count
, const GLenum
* _attachments
) {
8818 memcpy(ImmediateDataAddress(this), _attachments
, ComputeDataSize(_count
));
8821 void* Set(void* cmd
,
8824 const GLenum
* _attachments
) {
8825 static_cast<ValueType
*>(cmd
)->Init(_target
, _count
, _attachments
);
8826 const uint32_t size
= ComputeSize(_count
);
8827 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8830 gpu::CommandHeader header
;
8835 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate
) == 12,
8836 Sizeof_DiscardFramebufferEXTImmediate_is_not_12
);
8837 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, header
) == 0,
8838 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0
);
8839 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, target
) == 4,
8840 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4
);
8841 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate
, count
) == 8,
8842 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8
);
8844 struct LoseContextCHROMIUM
{
8845 typedef LoseContextCHROMIUM ValueType
;
8846 static const CommandId kCmdId
= kLoseContextCHROMIUM
;
8847 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8848 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8850 static uint32_t ComputeSize() {
8851 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8854 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8856 void Init(GLenum _current
, GLenum _other
) {
8862 void* Set(void* cmd
, GLenum _current
, GLenum _other
) {
8863 static_cast<ValueType
*>(cmd
)->Init(_current
, _other
);
8864 return NextCmdAddress
<ValueType
>(cmd
);
8867 gpu::CommandHeader header
;
8872 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM
) == 12,
8873 Sizeof_LoseContextCHROMIUM_is_not_12
);
8874 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, header
) == 0,
8875 OffsetOf_LoseContextCHROMIUM_header_not_0
);
8876 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, current
) == 4,
8877 OffsetOf_LoseContextCHROMIUM_current_not_4
);
8878 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM
, other
) == 8,
8879 OffsetOf_LoseContextCHROMIUM_other_not_8
);
8881 struct WaitSyncPointCHROMIUM
{
8882 typedef WaitSyncPointCHROMIUM ValueType
;
8883 static const CommandId kCmdId
= kWaitSyncPointCHROMIUM
;
8884 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8885 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(1);
8887 static uint32_t ComputeSize() {
8888 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8891 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8893 void Init(GLuint _sync_point
) {
8895 sync_point
= _sync_point
;
8898 void* Set(void* cmd
, GLuint _sync_point
) {
8899 static_cast<ValueType
*>(cmd
)->Init(_sync_point
);
8900 return NextCmdAddress
<ValueType
>(cmd
);
8903 gpu::CommandHeader header
;
8904 uint32_t sync_point
;
8907 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM
) == 8,
8908 Sizeof_WaitSyncPointCHROMIUM_is_not_8
);
8909 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM
, header
) == 0,
8910 OffsetOf_WaitSyncPointCHROMIUM_header_not_0
);
8911 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM
, sync_point
) == 4,
8912 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4
);
8914 struct DrawBuffersEXTImmediate
{
8915 typedef DrawBuffersEXTImmediate ValueType
;
8916 static const CommandId kCmdId
= kDrawBuffersEXTImmediate
;
8917 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
8918 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8920 static uint32_t ComputeDataSize(GLsizei count
) {
8921 return static_cast<uint32_t>(sizeof(GLenum
) * 1 * count
); // NOLINT
8924 static uint32_t ComputeSize(GLsizei count
) {
8925 return static_cast<uint32_t>(sizeof(ValueType
) +
8926 ComputeDataSize(count
)); // NOLINT
8929 void SetHeader(GLsizei count
) {
8930 header
.SetCmdByTotalSize
<ValueType
>(ComputeSize(count
));
8933 void Init(GLsizei _count
, const GLenum
* _bufs
) {
8936 memcpy(ImmediateDataAddress(this), _bufs
, ComputeDataSize(_count
));
8939 void* Set(void* cmd
, GLsizei _count
, const GLenum
* _bufs
) {
8940 static_cast<ValueType
*>(cmd
)->Init(_count
, _bufs
);
8941 const uint32_t size
= ComputeSize(_count
);
8942 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
8945 gpu::CommandHeader header
;
8949 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate
) == 8,
8950 Sizeof_DrawBuffersEXTImmediate_is_not_8
);
8951 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate
, header
) == 0,
8952 OffsetOf_DrawBuffersEXTImmediate_header_not_0
);
8953 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate
, count
) == 4,
8954 OffsetOf_DrawBuffersEXTImmediate_count_not_4
);
8956 struct DiscardBackbufferCHROMIUM
{
8957 typedef DiscardBackbufferCHROMIUM ValueType
;
8958 static const CommandId kCmdId
= kDiscardBackbufferCHROMIUM
;
8959 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8960 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8962 static uint32_t ComputeSize() {
8963 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8966 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8968 void Init() { SetHeader(); }
8970 void* Set(void* cmd
) {
8971 static_cast<ValueType
*>(cmd
)->Init();
8972 return NextCmdAddress
<ValueType
>(cmd
);
8975 gpu::CommandHeader header
;
8978 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM
) == 4,
8979 Sizeof_DiscardBackbufferCHROMIUM_is_not_4
);
8980 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM
, header
) == 0,
8981 OffsetOf_DiscardBackbufferCHROMIUM_header_not_0
);
8983 struct ScheduleOverlayPlaneCHROMIUM
{
8984 typedef ScheduleOverlayPlaneCHROMIUM ValueType
;
8985 static const CommandId kCmdId
= kScheduleOverlayPlaneCHROMIUM
;
8986 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
8987 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
8989 static uint32_t ComputeSize() {
8990 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
8993 void SetHeader() { header
.SetCmd
<ValueType
>(); }
8995 void Init(GLint _plane_z_order
,
8996 GLenum _plane_transform
,
8997 GLuint _overlay_texture_id
,
9000 GLint _bounds_width
,
9001 GLint _bounds_height
,
9005 GLfloat _uv_height
) {
9007 plane_z_order
= _plane_z_order
;
9008 plane_transform
= _plane_transform
;
9009 overlay_texture_id
= _overlay_texture_id
;
9010 bounds_x
= _bounds_x
;
9011 bounds_y
= _bounds_y
;
9012 bounds_width
= _bounds_width
;
9013 bounds_height
= _bounds_height
;
9016 uv_width
= _uv_width
;
9017 uv_height
= _uv_height
;
9020 void* Set(void* cmd
,
9021 GLint _plane_z_order
,
9022 GLenum _plane_transform
,
9023 GLuint _overlay_texture_id
,
9026 GLint _bounds_width
,
9027 GLint _bounds_height
,
9031 GLfloat _uv_height
) {
9032 static_cast<ValueType
*>(cmd
)->Init(_plane_z_order
, _plane_transform
,
9033 _overlay_texture_id
, _bounds_x
,
9034 _bounds_y
, _bounds_width
, _bounds_height
,
9035 _uv_x
, _uv_y
, _uv_width
, _uv_height
);
9036 return NextCmdAddress
<ValueType
>(cmd
);
9039 gpu::CommandHeader header
;
9040 int32_t plane_z_order
;
9041 uint32_t plane_transform
;
9042 uint32_t overlay_texture_id
;
9045 int32_t bounds_width
;
9046 int32_t bounds_height
;
9053 COMPILE_ASSERT(sizeof(ScheduleOverlayPlaneCHROMIUM
) == 48,
9054 Sizeof_ScheduleOverlayPlaneCHROMIUM_is_not_48
);
9055 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, header
) == 0,
9056 OffsetOf_ScheduleOverlayPlaneCHROMIUM_header_not_0
);
9057 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_z_order
) == 4,
9058 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_z_order_not_4
);
9059 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, plane_transform
) == 8,
9060 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_transform_not_8
);
9061 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, overlay_texture_id
) == 12,
9062 OffsetOf_ScheduleOverlayPlaneCHROMIUM_overlay_texture_id_not_12
);
9063 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_x
) == 16,
9064 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_x_not_16
);
9065 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_y
) == 20,
9066 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_y_not_20
);
9067 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_width
) == 24,
9068 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_width_not_24
);
9069 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, bounds_height
) == 28,
9070 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28
);
9071 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_x
) == 32,
9072 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32
);
9073 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_y
) == 36,
9074 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36
);
9075 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_width
) == 40,
9076 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40
);
9077 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM
, uv_height
) == 44,
9078 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44
);
9080 struct MatrixLoadfCHROMIUMImmediate
{
9081 typedef MatrixLoadfCHROMIUMImmediate ValueType
;
9082 static const CommandId kCmdId
= kMatrixLoadfCHROMIUMImmediate
;
9083 static const cmd::ArgFlags kArgFlags
= cmd::kAtLeastN
;
9084 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9086 static uint32_t ComputeDataSize() {
9087 return static_cast<uint32_t>(sizeof(GLfloat
) * 16); // NOLINT
9090 static uint32_t ComputeSize() {
9091 return static_cast<uint32_t>(sizeof(ValueType
) +
9092 ComputeDataSize()); // NOLINT
9095 void SetHeader() { header
.SetCmdByTotalSize
<ValueType
>(ComputeSize()); }
9097 void Init(GLenum _matrixMode
, const GLfloat
* _m
) {
9099 matrixMode
= _matrixMode
;
9100 memcpy(ImmediateDataAddress(this), _m
, ComputeDataSize());
9103 void* Set(void* cmd
, GLenum _matrixMode
, const GLfloat
* _m
) {
9104 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
, _m
);
9105 const uint32_t size
= ComputeSize();
9106 return NextImmediateCmdAddressTotalSize
<ValueType
>(cmd
, size
);
9109 gpu::CommandHeader header
;
9110 uint32_t matrixMode
;
9113 COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate
) == 8,
9114 Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8
);
9115 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate
, header
) == 0,
9116 OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0
);
9117 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate
, matrixMode
) == 4,
9118 OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4
);
9120 struct MatrixLoadIdentityCHROMIUM
{
9121 typedef MatrixLoadIdentityCHROMIUM ValueType
;
9122 static const CommandId kCmdId
= kMatrixLoadIdentityCHROMIUM
;
9123 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9124 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9126 static uint32_t ComputeSize() {
9127 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9130 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9132 void Init(GLenum _matrixMode
) {
9134 matrixMode
= _matrixMode
;
9137 void* Set(void* cmd
, GLenum _matrixMode
) {
9138 static_cast<ValueType
*>(cmd
)->Init(_matrixMode
);
9139 return NextCmdAddress
<ValueType
>(cmd
);
9142 gpu::CommandHeader header
;
9143 uint32_t matrixMode
;
9146 COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM
) == 8,
9147 Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8
);
9148 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM
, header
) == 0,
9149 OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0
);
9150 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM
, matrixMode
) == 4,
9151 OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_4
);
9153 struct BlendBarrierKHR
{
9154 typedef BlendBarrierKHR ValueType
;
9155 static const CommandId kCmdId
= kBlendBarrierKHR
;
9156 static const cmd::ArgFlags kArgFlags
= cmd::kFixed
;
9157 static const uint8 cmd_flags
= CMD_FLAG_SET_TRACE_LEVEL(3);
9159 static uint32_t ComputeSize() {
9160 return static_cast<uint32_t>(sizeof(ValueType
)); // NOLINT
9163 void SetHeader() { header
.SetCmd
<ValueType
>(); }
9165 void Init() { SetHeader(); }
9167 void* Set(void* cmd
) {
9168 static_cast<ValueType
*>(cmd
)->Init();
9169 return NextCmdAddress
<ValueType
>(cmd
);
9172 gpu::CommandHeader header
;
9175 COMPILE_ASSERT(sizeof(BlendBarrierKHR
) == 4, Sizeof_BlendBarrierKHR_is_not_4
);
9176 COMPILE_ASSERT(offsetof(BlendBarrierKHR
, header
) == 0,
9177 OffsetOf_BlendBarrierKHR_header_not_0
);
9179 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_