Home | History | Annotate | Download | only in common
      1 // Copyright (c) 2012 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.
      4 
      5 // This file is auto-generated from
      6 // gpu/command_buffer/build_gles2_cmd_buffer.py
      7 // DO NOT EDIT!
      8 
      9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
     10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
     11 
     12 struct ActiveTexture {
     13   typedef ActiveTexture ValueType;
     14   static const CommandId kCmdId = kActiveTexture;
     15   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
     16 
     17   static uint32 ComputeSize() {
     18     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
     19   }
     20 
     21   void SetHeader() {
     22     header.SetCmd<ValueType>();
     23   }
     24 
     25   void Init(GLenum _texture) {
     26     SetHeader();
     27     texture = _texture;
     28   }
     29 
     30   void* Set(void* cmd, GLenum _texture) {
     31     static_cast<ValueType*>(cmd)->Init(_texture);
     32     return NextCmdAddress<ValueType>(cmd);
     33   }
     34 
     35   gpu::CommandHeader header;
     36   uint32 texture;
     37 };
     38 
     39 COMPILE_ASSERT(sizeof(ActiveTexture) == 8,
     40                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);
     45 
     46 struct AttachShader {
     47   typedef AttachShader ValueType;
     48   static const CommandId kCmdId = kAttachShader;
     49   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
     50 
     51   static uint32 ComputeSize() {
     52     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
     53   }
     54 
     55   void SetHeader() {
     56     header.SetCmd<ValueType>();
     57   }
     58 
     59   void Init(GLuint _program, GLuint _shader) {
     60     SetHeader();
     61     program = _program;
     62     shader = _shader;
     63   }
     64 
     65   void* Set(void* cmd, GLuint _program, GLuint _shader) {
     66     static_cast<ValueType*>(cmd)->Init(_program, _shader);
     67     return NextCmdAddress<ValueType>(cmd);
     68   }
     69 
     70   gpu::CommandHeader header;
     71   uint32 program;
     72   uint32 shader;
     73 };
     74 
     75 COMPILE_ASSERT(sizeof(AttachShader) == 12,
     76                Sizeof_AttachShader_is_not_12);
     77 COMPILE_ASSERT(offsetof(AttachShader, header) == 0,
     78                OffsetOf_AttachShader_header_not_0);
     79 COMPILE_ASSERT(offsetof(AttachShader, program) == 4,
     80                OffsetOf_AttachShader_program_not_4);
     81 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8,
     82                OffsetOf_AttachShader_shader_not_8);
     83 
     84 struct BindAttribLocation {
     85   typedef BindAttribLocation ValueType;
     86   static const CommandId kCmdId = kBindAttribLocation;
     87   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
     88 
     89   static uint32 ComputeSize() {
     90     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
     91   }
     92 
     93   void SetHeader() {
     94     header.SetCmd<ValueType>();
     95   }
     96 
     97   void Init(
     98       GLuint _program, GLuint _index, uint32 _name_shm_id,
     99       uint32 _name_shm_offset, uint32 _data_size) {
    100     SetHeader();
    101     program = _program;
    102     index = _index;
    103     name_shm_id = _name_shm_id;
    104     name_shm_offset = _name_shm_offset;
    105     data_size = _data_size;
    106   }
    107 
    108   void* Set(
    109       void* cmd, GLuint _program, GLuint _index, uint32 _name_shm_id,
    110       uint32 _name_shm_offset, uint32 _data_size) {
    111     static_cast<ValueType*>(
    112         cmd)->Init(
    113             _program, _index, _name_shm_id, _name_shm_offset, _data_size);
    114     return NextCmdAddress<ValueType>(cmd);
    115   }
    116 
    117   gpu::CommandHeader header;
    118   uint32 program;
    119   uint32 index;
    120   uint32 name_shm_id;
    121   uint32 name_shm_offset;
    122   uint32 data_size;
    123 };
    124 
    125 COMPILE_ASSERT(sizeof(BindAttribLocation) == 24,
    126                Sizeof_BindAttribLocation_is_not_24);
    127 COMPILE_ASSERT(offsetof(BindAttribLocation, header) == 0,
    128                OffsetOf_BindAttribLocation_header_not_0);
    129 COMPILE_ASSERT(offsetof(BindAttribLocation, program) == 4,
    130                OffsetOf_BindAttribLocation_program_not_4);
    131 COMPILE_ASSERT(offsetof(BindAttribLocation, index) == 8,
    132                OffsetOf_BindAttribLocation_index_not_8);
    133 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_id) == 12,
    134                OffsetOf_BindAttribLocation_name_shm_id_not_12);
    135 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_offset) == 16,
    136                OffsetOf_BindAttribLocation_name_shm_offset_not_16);
    137 COMPILE_ASSERT(offsetof(BindAttribLocation, data_size) == 20,
    138                OffsetOf_BindAttribLocation_data_size_not_20);
    139 
    140 struct BindAttribLocationBucket {
    141   typedef BindAttribLocationBucket ValueType;
    142   static const CommandId kCmdId = kBindAttribLocationBucket;
    143   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    144 
    145   static uint32 ComputeSize() {
    146     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    147   }
    148 
    149   void SetHeader() {
    150     header.SetCmd<ValueType>();
    151   }
    152 
    153   void Init(GLuint _program, GLuint _index, uint32 _name_bucket_id) {
    154     SetHeader();
    155     program = _program;
    156     index = _index;
    157     name_bucket_id = _name_bucket_id;
    158   }
    159 
    160   void* Set(
    161       void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id) {
    162     static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
    163     return NextCmdAddress<ValueType>(cmd);
    164   }
    165 
    166   gpu::CommandHeader header;
    167   uint32 program;
    168   uint32 index;
    169   uint32 name_bucket_id;
    170 };
    171 
    172 COMPILE_ASSERT(sizeof(BindAttribLocationBucket) == 16,
    173                Sizeof_BindAttribLocationBucket_is_not_16);
    174 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, header) == 0,
    175                OffsetOf_BindAttribLocationBucket_header_not_0);
    176 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, program) == 4,
    177                OffsetOf_BindAttribLocationBucket_program_not_4);
    178 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, index) == 8,
    179                OffsetOf_BindAttribLocationBucket_index_not_8);
    180 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
    181                OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12);
    182 
    183 struct BindBuffer {
    184   typedef BindBuffer ValueType;
    185   static const CommandId kCmdId = kBindBuffer;
    186   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    187 
    188   static uint32 ComputeSize() {
    189     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    190   }
    191 
    192   void SetHeader() {
    193     header.SetCmd<ValueType>();
    194   }
    195 
    196   void Init(GLenum _target, GLuint _buffer) {
    197     SetHeader();
    198     target = _target;
    199     buffer = _buffer;
    200   }
    201 
    202   void* Set(void* cmd, GLenum _target, GLuint _buffer) {
    203     static_cast<ValueType*>(cmd)->Init(_target, _buffer);
    204     return NextCmdAddress<ValueType>(cmd);
    205   }
    206 
    207   gpu::CommandHeader header;
    208   uint32 target;
    209   uint32 buffer;
    210 };
    211 
    212 COMPILE_ASSERT(sizeof(BindBuffer) == 12,
    213                Sizeof_BindBuffer_is_not_12);
    214 COMPILE_ASSERT(offsetof(BindBuffer, header) == 0,
    215                OffsetOf_BindBuffer_header_not_0);
    216 COMPILE_ASSERT(offsetof(BindBuffer, target) == 4,
    217                OffsetOf_BindBuffer_target_not_4);
    218 COMPILE_ASSERT(offsetof(BindBuffer, buffer) == 8,
    219                OffsetOf_BindBuffer_buffer_not_8);
    220 
    221 struct BindFramebuffer {
    222   typedef BindFramebuffer ValueType;
    223   static const CommandId kCmdId = kBindFramebuffer;
    224   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    225 
    226   static uint32 ComputeSize() {
    227     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    228   }
    229 
    230   void SetHeader() {
    231     header.SetCmd<ValueType>();
    232   }
    233 
    234   void Init(GLenum _target, GLuint _framebuffer) {
    235     SetHeader();
    236     target = _target;
    237     framebuffer = _framebuffer;
    238   }
    239 
    240   void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
    241     static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
    242     return NextCmdAddress<ValueType>(cmd);
    243   }
    244 
    245   gpu::CommandHeader header;
    246   uint32 target;
    247   uint32 framebuffer;
    248 };
    249 
    250 COMPILE_ASSERT(sizeof(BindFramebuffer) == 12,
    251                Sizeof_BindFramebuffer_is_not_12);
    252 COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0,
    253                OffsetOf_BindFramebuffer_header_not_0);
    254 COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4,
    255                OffsetOf_BindFramebuffer_target_not_4);
    256 COMPILE_ASSERT(offsetof(BindFramebuffer, framebuffer) == 8,
    257                OffsetOf_BindFramebuffer_framebuffer_not_8);
    258 
    259 struct BindRenderbuffer {
    260   typedef BindRenderbuffer ValueType;
    261   static const CommandId kCmdId = kBindRenderbuffer;
    262   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    263 
    264   static uint32 ComputeSize() {
    265     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    266   }
    267 
    268   void SetHeader() {
    269     header.SetCmd<ValueType>();
    270   }
    271 
    272   void Init(GLenum _target, GLuint _renderbuffer) {
    273     SetHeader();
    274     target = _target;
    275     renderbuffer = _renderbuffer;
    276   }
    277 
    278   void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
    279     static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
    280     return NextCmdAddress<ValueType>(cmd);
    281   }
    282 
    283   gpu::CommandHeader header;
    284   uint32 target;
    285   uint32 renderbuffer;
    286 };
    287 
    288 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12,
    289                Sizeof_BindRenderbuffer_is_not_12);
    290 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0,
    291                OffsetOf_BindRenderbuffer_header_not_0);
    292 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4,
    293                OffsetOf_BindRenderbuffer_target_not_4);
    294 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8,
    295                OffsetOf_BindRenderbuffer_renderbuffer_not_8);
    296 
    297 struct BindTexture {
    298   typedef BindTexture ValueType;
    299   static const CommandId kCmdId = kBindTexture;
    300   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    301 
    302   static uint32 ComputeSize() {
    303     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    304   }
    305 
    306   void SetHeader() {
    307     header.SetCmd<ValueType>();
    308   }
    309 
    310   void Init(GLenum _target, GLuint _texture) {
    311     SetHeader();
    312     target = _target;
    313     texture = _texture;
    314   }
    315 
    316   void* Set(void* cmd, GLenum _target, GLuint _texture) {
    317     static_cast<ValueType*>(cmd)->Init(_target, _texture);
    318     return NextCmdAddress<ValueType>(cmd);
    319   }
    320 
    321   gpu::CommandHeader header;
    322   uint32 target;
    323   uint32 texture;
    324 };
    325 
    326 COMPILE_ASSERT(sizeof(BindTexture) == 12,
    327                Sizeof_BindTexture_is_not_12);
    328 COMPILE_ASSERT(offsetof(BindTexture, header) == 0,
    329                OffsetOf_BindTexture_header_not_0);
    330 COMPILE_ASSERT(offsetof(BindTexture, target) == 4,
    331                OffsetOf_BindTexture_target_not_4);
    332 COMPILE_ASSERT(offsetof(BindTexture, texture) == 8,
    333                OffsetOf_BindTexture_texture_not_8);
    334 
    335 struct BlendColor {
    336   typedef BlendColor ValueType;
    337   static const CommandId kCmdId = kBlendColor;
    338   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    339 
    340   static uint32 ComputeSize() {
    341     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    342   }
    343 
    344   void SetHeader() {
    345     header.SetCmd<ValueType>();
    346   }
    347 
    348   void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
    349     SetHeader();
    350     red = _red;
    351     green = _green;
    352     blue = _blue;
    353     alpha = _alpha;
    354   }
    355 
    356   void* Set(
    357       void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue,
    358       GLclampf _alpha) {
    359     static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
    360     return NextCmdAddress<ValueType>(cmd);
    361   }
    362 
    363   gpu::CommandHeader header;
    364   float red;
    365   float green;
    366   float blue;
    367   float alpha;
    368 };
    369 
    370 COMPILE_ASSERT(sizeof(BlendColor) == 20,
    371                Sizeof_BlendColor_is_not_20);
    372 COMPILE_ASSERT(offsetof(BlendColor, header) == 0,
    373                OffsetOf_BlendColor_header_not_0);
    374 COMPILE_ASSERT(offsetof(BlendColor, red) == 4,
    375                OffsetOf_BlendColor_red_not_4);
    376 COMPILE_ASSERT(offsetof(BlendColor, green) == 8,
    377                OffsetOf_BlendColor_green_not_8);
    378 COMPILE_ASSERT(offsetof(BlendColor, blue) == 12,
    379                OffsetOf_BlendColor_blue_not_12);
    380 COMPILE_ASSERT(offsetof(BlendColor, alpha) == 16,
    381                OffsetOf_BlendColor_alpha_not_16);
    382 
    383 struct BlendEquation {
    384   typedef BlendEquation ValueType;
    385   static const CommandId kCmdId = kBlendEquation;
    386   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    387 
    388   static uint32 ComputeSize() {
    389     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    390   }
    391 
    392   void SetHeader() {
    393     header.SetCmd<ValueType>();
    394   }
    395 
    396   void Init(GLenum _mode) {
    397     SetHeader();
    398     mode = _mode;
    399   }
    400 
    401   void* Set(void* cmd, GLenum _mode) {
    402     static_cast<ValueType*>(cmd)->Init(_mode);
    403     return NextCmdAddress<ValueType>(cmd);
    404   }
    405 
    406   gpu::CommandHeader header;
    407   uint32 mode;
    408 };
    409 
    410 COMPILE_ASSERT(sizeof(BlendEquation) == 8,
    411                Sizeof_BlendEquation_is_not_8);
    412 COMPILE_ASSERT(offsetof(BlendEquation, header) == 0,
    413                OffsetOf_BlendEquation_header_not_0);
    414 COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4,
    415                OffsetOf_BlendEquation_mode_not_4);
    416 
    417 struct BlendEquationSeparate {
    418   typedef BlendEquationSeparate ValueType;
    419   static const CommandId kCmdId = kBlendEquationSeparate;
    420   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    421 
    422   static uint32 ComputeSize() {
    423     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    424   }
    425 
    426   void SetHeader() {
    427     header.SetCmd<ValueType>();
    428   }
    429 
    430   void Init(GLenum _modeRGB, GLenum _modeAlpha) {
    431     SetHeader();
    432     modeRGB = _modeRGB;
    433     modeAlpha = _modeAlpha;
    434   }
    435 
    436   void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
    437     static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
    438     return NextCmdAddress<ValueType>(cmd);
    439   }
    440 
    441   gpu::CommandHeader header;
    442   uint32 modeRGB;
    443   uint32 modeAlpha;
    444 };
    445 
    446 COMPILE_ASSERT(sizeof(BlendEquationSeparate) == 12,
    447                Sizeof_BlendEquationSeparate_is_not_12);
    448 COMPILE_ASSERT(offsetof(BlendEquationSeparate, header) == 0,
    449                OffsetOf_BlendEquationSeparate_header_not_0);
    450 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeRGB) == 4,
    451                OffsetOf_BlendEquationSeparate_modeRGB_not_4);
    452 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeAlpha) == 8,
    453                OffsetOf_BlendEquationSeparate_modeAlpha_not_8);
    454 
    455 struct BlendFunc {
    456   typedef BlendFunc ValueType;
    457   static const CommandId kCmdId = kBlendFunc;
    458   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    459 
    460   static uint32 ComputeSize() {
    461     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    462   }
    463 
    464   void SetHeader() {
    465     header.SetCmd<ValueType>();
    466   }
    467 
    468   void Init(GLenum _sfactor, GLenum _dfactor) {
    469     SetHeader();
    470     sfactor = _sfactor;
    471     dfactor = _dfactor;
    472   }
    473 
    474   void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
    475     static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
    476     return NextCmdAddress<ValueType>(cmd);
    477   }
    478 
    479   gpu::CommandHeader header;
    480   uint32 sfactor;
    481   uint32 dfactor;
    482 };
    483 
    484 COMPILE_ASSERT(sizeof(BlendFunc) == 12,
    485                Sizeof_BlendFunc_is_not_12);
    486 COMPILE_ASSERT(offsetof(BlendFunc, header) == 0,
    487                OffsetOf_BlendFunc_header_not_0);
    488 COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4,
    489                OffsetOf_BlendFunc_sfactor_not_4);
    490 COMPILE_ASSERT(offsetof(BlendFunc, dfactor) == 8,
    491                OffsetOf_BlendFunc_dfactor_not_8);
    492 
    493 struct BlendFuncSeparate {
    494   typedef BlendFuncSeparate ValueType;
    495   static const CommandId kCmdId = kBlendFuncSeparate;
    496   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    497 
    498   static uint32 ComputeSize() {
    499     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    500   }
    501 
    502   void SetHeader() {
    503     header.SetCmd<ValueType>();
    504   }
    505 
    506   void Init(
    507       GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha, GLenum _dstAlpha) {
    508     SetHeader();
    509     srcRGB = _srcRGB;
    510     dstRGB = _dstRGB;
    511     srcAlpha = _srcAlpha;
    512     dstAlpha = _dstAlpha;
    513   }
    514 
    515   void* Set(
    516       void* cmd, GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha,
    517       GLenum _dstAlpha) {
    518     static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
    519     return NextCmdAddress<ValueType>(cmd);
    520   }
    521 
    522   gpu::CommandHeader header;
    523   uint32 srcRGB;
    524   uint32 dstRGB;
    525   uint32 srcAlpha;
    526   uint32 dstAlpha;
    527 };
    528 
    529 COMPILE_ASSERT(sizeof(BlendFuncSeparate) == 20,
    530                Sizeof_BlendFuncSeparate_is_not_20);
    531 COMPILE_ASSERT(offsetof(BlendFuncSeparate, header) == 0,
    532                OffsetOf_BlendFuncSeparate_header_not_0);
    533 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcRGB) == 4,
    534                OffsetOf_BlendFuncSeparate_srcRGB_not_4);
    535 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstRGB) == 8,
    536                OffsetOf_BlendFuncSeparate_dstRGB_not_8);
    537 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcAlpha) == 12,
    538                OffsetOf_BlendFuncSeparate_srcAlpha_not_12);
    539 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstAlpha) == 16,
    540                OffsetOf_BlendFuncSeparate_dstAlpha_not_16);
    541 
    542 struct BufferData {
    543   typedef BufferData ValueType;
    544   static const CommandId kCmdId = kBufferData;
    545   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    546 
    547   static uint32 ComputeSize() {
    548     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    549   }
    550 
    551   void SetHeader() {
    552     header.SetCmd<ValueType>();
    553   }
    554 
    555   void Init(
    556       GLenum _target, GLsizeiptr _size, uint32 _data_shm_id,
    557       uint32 _data_shm_offset, GLenum _usage) {
    558     SetHeader();
    559     target = _target;
    560     size = _size;
    561     data_shm_id = _data_shm_id;
    562     data_shm_offset = _data_shm_offset;
    563     usage = _usage;
    564   }
    565 
    566   void* Set(
    567       void* cmd, GLenum _target, GLsizeiptr _size, uint32 _data_shm_id,
    568       uint32 _data_shm_offset, GLenum _usage) {
    569     static_cast<ValueType*>(
    570         cmd)->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage);
    571     return NextCmdAddress<ValueType>(cmd);
    572   }
    573 
    574   gpu::CommandHeader header;
    575   uint32 target;
    576   int32 size;
    577   uint32 data_shm_id;
    578   uint32 data_shm_offset;
    579   uint32 usage;
    580 };
    581 
    582 COMPILE_ASSERT(sizeof(BufferData) == 24,
    583                Sizeof_BufferData_is_not_24);
    584 COMPILE_ASSERT(offsetof(BufferData, header) == 0,
    585                OffsetOf_BufferData_header_not_0);
    586 COMPILE_ASSERT(offsetof(BufferData, target) == 4,
    587                OffsetOf_BufferData_target_not_4);
    588 COMPILE_ASSERT(offsetof(BufferData, size) == 8,
    589                OffsetOf_BufferData_size_not_8);
    590 COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12,
    591                OffsetOf_BufferData_data_shm_id_not_12);
    592 COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16,
    593                OffsetOf_BufferData_data_shm_offset_not_16);
    594 COMPILE_ASSERT(offsetof(BufferData, usage) == 20,
    595                OffsetOf_BufferData_usage_not_20);
    596 
    597 struct BufferSubData {
    598   typedef BufferSubData ValueType;
    599   static const CommandId kCmdId = kBufferSubData;
    600   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    601 
    602   static uint32 ComputeSize() {
    603     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    604   }
    605 
    606   void SetHeader() {
    607     header.SetCmd<ValueType>();
    608   }
    609 
    610   void Init(
    611       GLenum _target, GLintptr _offset, GLsizeiptr _size, uint32 _data_shm_id,
    612       uint32 _data_shm_offset) {
    613     SetHeader();
    614     target = _target;
    615     offset = _offset;
    616     size = _size;
    617     data_shm_id = _data_shm_id;
    618     data_shm_offset = _data_shm_offset;
    619   }
    620 
    621   void* Set(
    622       void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size,
    623       uint32 _data_shm_id, uint32 _data_shm_offset) {
    624     static_cast<ValueType*>(
    625         cmd)->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset);
    626     return NextCmdAddress<ValueType>(cmd);
    627   }
    628 
    629   gpu::CommandHeader header;
    630   uint32 target;
    631   int32 offset;
    632   int32 size;
    633   uint32 data_shm_id;
    634   uint32 data_shm_offset;
    635 };
    636 
    637 COMPILE_ASSERT(sizeof(BufferSubData) == 24,
    638                Sizeof_BufferSubData_is_not_24);
    639 COMPILE_ASSERT(offsetof(BufferSubData, header) == 0,
    640                OffsetOf_BufferSubData_header_not_0);
    641 COMPILE_ASSERT(offsetof(BufferSubData, target) == 4,
    642                OffsetOf_BufferSubData_target_not_4);
    643 COMPILE_ASSERT(offsetof(BufferSubData, offset) == 8,
    644                OffsetOf_BufferSubData_offset_not_8);
    645 COMPILE_ASSERT(offsetof(BufferSubData, size) == 12,
    646                OffsetOf_BufferSubData_size_not_12);
    647 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16,
    648                OffsetOf_BufferSubData_data_shm_id_not_16);
    649 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20,
    650                OffsetOf_BufferSubData_data_shm_offset_not_20);
    651 
    652 struct CheckFramebufferStatus {
    653   typedef CheckFramebufferStatus ValueType;
    654   static const CommandId kCmdId = kCheckFramebufferStatus;
    655   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    656 
    657   typedef GLenum Result;
    658 
    659   static uint32 ComputeSize() {
    660     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    661   }
    662 
    663   void SetHeader() {
    664     header.SetCmd<ValueType>();
    665   }
    666 
    667   void Init(GLenum _target, uint32 _result_shm_id, uint32 _result_shm_offset) {
    668     SetHeader();
    669     target = _target;
    670     result_shm_id = _result_shm_id;
    671     result_shm_offset = _result_shm_offset;
    672   }
    673 
    674   void* Set(
    675       void* cmd, GLenum _target, uint32 _result_shm_id,
    676       uint32 _result_shm_offset) {
    677     static_cast<ValueType*>(
    678         cmd)->Init(_target, _result_shm_id, _result_shm_offset);
    679     return NextCmdAddress<ValueType>(cmd);
    680   }
    681 
    682   gpu::CommandHeader header;
    683   uint32 target;
    684   uint32 result_shm_id;
    685   uint32 result_shm_offset;
    686 };
    687 
    688 COMPILE_ASSERT(sizeof(CheckFramebufferStatus) == 16,
    689                Sizeof_CheckFramebufferStatus_is_not_16);
    690 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, header) == 0,
    691                OffsetOf_CheckFramebufferStatus_header_not_0);
    692 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, target) == 4,
    693                OffsetOf_CheckFramebufferStatus_target_not_4);
    694 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
    695                OffsetOf_CheckFramebufferStatus_result_shm_id_not_8);
    696 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
    697                OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12);
    698 
    699 struct Clear {
    700   typedef Clear ValueType;
    701   static const CommandId kCmdId = kClear;
    702   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    703 
    704   static uint32 ComputeSize() {
    705     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    706   }
    707 
    708   void SetHeader() {
    709     header.SetCmd<ValueType>();
    710   }
    711 
    712   void Init(GLbitfield _mask) {
    713     SetHeader();
    714     mask = _mask;
    715   }
    716 
    717   void* Set(void* cmd, GLbitfield _mask) {
    718     static_cast<ValueType*>(cmd)->Init(_mask);
    719     return NextCmdAddress<ValueType>(cmd);
    720   }
    721 
    722   gpu::CommandHeader header;
    723   uint32 mask;
    724 };
    725 
    726 COMPILE_ASSERT(sizeof(Clear) == 8,
    727                Sizeof_Clear_is_not_8);
    728 COMPILE_ASSERT(offsetof(Clear, header) == 0,
    729                OffsetOf_Clear_header_not_0);
    730 COMPILE_ASSERT(offsetof(Clear, mask) == 4,
    731                OffsetOf_Clear_mask_not_4);
    732 
    733 struct ClearColor {
    734   typedef ClearColor ValueType;
    735   static const CommandId kCmdId = kClearColor;
    736   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    737 
    738   static uint32 ComputeSize() {
    739     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    740   }
    741 
    742   void SetHeader() {
    743     header.SetCmd<ValueType>();
    744   }
    745 
    746   void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
    747     SetHeader();
    748     red = _red;
    749     green = _green;
    750     blue = _blue;
    751     alpha = _alpha;
    752   }
    753 
    754   void* Set(
    755       void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue,
    756       GLclampf _alpha) {
    757     static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
    758     return NextCmdAddress<ValueType>(cmd);
    759   }
    760 
    761   gpu::CommandHeader header;
    762   float red;
    763   float green;
    764   float blue;
    765   float alpha;
    766 };
    767 
    768 COMPILE_ASSERT(sizeof(ClearColor) == 20,
    769                Sizeof_ClearColor_is_not_20);
    770 COMPILE_ASSERT(offsetof(ClearColor, header) == 0,
    771                OffsetOf_ClearColor_header_not_0);
    772 COMPILE_ASSERT(offsetof(ClearColor, red) == 4,
    773                OffsetOf_ClearColor_red_not_4);
    774 COMPILE_ASSERT(offsetof(ClearColor, green) == 8,
    775                OffsetOf_ClearColor_green_not_8);
    776 COMPILE_ASSERT(offsetof(ClearColor, blue) == 12,
    777                OffsetOf_ClearColor_blue_not_12);
    778 COMPILE_ASSERT(offsetof(ClearColor, alpha) == 16,
    779                OffsetOf_ClearColor_alpha_not_16);
    780 
    781 struct ClearDepthf {
    782   typedef ClearDepthf ValueType;
    783   static const CommandId kCmdId = kClearDepthf;
    784   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    785 
    786   static uint32 ComputeSize() {
    787     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    788   }
    789 
    790   void SetHeader() {
    791     header.SetCmd<ValueType>();
    792   }
    793 
    794   void Init(GLclampf _depth) {
    795     SetHeader();
    796     depth = _depth;
    797   }
    798 
    799   void* Set(void* cmd, GLclampf _depth) {
    800     static_cast<ValueType*>(cmd)->Init(_depth);
    801     return NextCmdAddress<ValueType>(cmd);
    802   }
    803 
    804   gpu::CommandHeader header;
    805   float depth;
    806 };
    807 
    808 COMPILE_ASSERT(sizeof(ClearDepthf) == 8,
    809                Sizeof_ClearDepthf_is_not_8);
    810 COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0,
    811                OffsetOf_ClearDepthf_header_not_0);
    812 COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4,
    813                OffsetOf_ClearDepthf_depth_not_4);
    814 
    815 struct ClearStencil {
    816   typedef ClearStencil ValueType;
    817   static const CommandId kCmdId = kClearStencil;
    818   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    819 
    820   static uint32 ComputeSize() {
    821     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    822   }
    823 
    824   void SetHeader() {
    825     header.SetCmd<ValueType>();
    826   }
    827 
    828   void Init(GLint _s) {
    829     SetHeader();
    830     s = _s;
    831   }
    832 
    833   void* Set(void* cmd, GLint _s) {
    834     static_cast<ValueType*>(cmd)->Init(_s);
    835     return NextCmdAddress<ValueType>(cmd);
    836   }
    837 
    838   gpu::CommandHeader header;
    839   int32 s;
    840 };
    841 
    842 COMPILE_ASSERT(sizeof(ClearStencil) == 8,
    843                Sizeof_ClearStencil_is_not_8);
    844 COMPILE_ASSERT(offsetof(ClearStencil, header) == 0,
    845                OffsetOf_ClearStencil_header_not_0);
    846 COMPILE_ASSERT(offsetof(ClearStencil, s) == 4,
    847                OffsetOf_ClearStencil_s_not_4);
    848 
    849 struct ColorMask {
    850   typedef ColorMask ValueType;
    851   static const CommandId kCmdId = kColorMask;
    852   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    853 
    854   static uint32 ComputeSize() {
    855     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    856   }
    857 
    858   void SetHeader() {
    859     header.SetCmd<ValueType>();
    860   }
    861 
    862   void Init(
    863       GLboolean _red, GLboolean _green, GLboolean _blue, GLboolean _alpha) {
    864     SetHeader();
    865     red = _red;
    866     green = _green;
    867     blue = _blue;
    868     alpha = _alpha;
    869   }
    870 
    871   void* Set(
    872       void* cmd, GLboolean _red, GLboolean _green, GLboolean _blue,
    873       GLboolean _alpha) {
    874     static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
    875     return NextCmdAddress<ValueType>(cmd);
    876   }
    877 
    878   gpu::CommandHeader header;
    879   uint32 red;
    880   uint32 green;
    881   uint32 blue;
    882   uint32 alpha;
    883 };
    884 
    885 COMPILE_ASSERT(sizeof(ColorMask) == 20,
    886                Sizeof_ColorMask_is_not_20);
    887 COMPILE_ASSERT(offsetof(ColorMask, header) == 0,
    888                OffsetOf_ColorMask_header_not_0);
    889 COMPILE_ASSERT(offsetof(ColorMask, red) == 4,
    890                OffsetOf_ColorMask_red_not_4);
    891 COMPILE_ASSERT(offsetof(ColorMask, green) == 8,
    892                OffsetOf_ColorMask_green_not_8);
    893 COMPILE_ASSERT(offsetof(ColorMask, blue) == 12,
    894                OffsetOf_ColorMask_blue_not_12);
    895 COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16,
    896                OffsetOf_ColorMask_alpha_not_16);
    897 
    898 struct CompileShader {
    899   typedef CompileShader ValueType;
    900   static const CommandId kCmdId = kCompileShader;
    901   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    902 
    903   static uint32 ComputeSize() {
    904     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    905   }
    906 
    907   void SetHeader() {
    908     header.SetCmd<ValueType>();
    909   }
    910 
    911   void Init(GLuint _shader) {
    912     SetHeader();
    913     shader = _shader;
    914   }
    915 
    916   void* Set(void* cmd, GLuint _shader) {
    917     static_cast<ValueType*>(cmd)->Init(_shader);
    918     return NextCmdAddress<ValueType>(cmd);
    919   }
    920 
    921   gpu::CommandHeader header;
    922   uint32 shader;
    923 };
    924 
    925 COMPILE_ASSERT(sizeof(CompileShader) == 8,
    926                Sizeof_CompileShader_is_not_8);
    927 COMPILE_ASSERT(offsetof(CompileShader, header) == 0,
    928                OffsetOf_CompileShader_header_not_0);
    929 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4,
    930                OffsetOf_CompileShader_shader_not_4);
    931 
    932 struct CompressedTexImage2D {
    933   typedef CompressedTexImage2D ValueType;
    934   static const CommandId kCmdId = kCompressedTexImage2D;
    935   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
    936 
    937   static uint32 ComputeSize() {
    938     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
    939   }
    940 
    941   void SetHeader() {
    942     header.SetCmd<ValueType>();
    943   }
    944 
    945   void Init(
    946       GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width,
    947       GLsizei _height, GLint _border, GLsizei _imageSize, uint32 _data_shm_id,
    948       uint32 _data_shm_offset) {
    949     SetHeader();
    950     target = _target;
    951     level = _level;
    952     internalformat = _internalformat;
    953     width = _width;
    954     height = _height;
    955     border = _border;
    956     imageSize = _imageSize;
    957     data_shm_id = _data_shm_id;
    958     data_shm_offset = _data_shm_offset;
    959   }
    960 
    961   void* Set(
    962       void* cmd, GLenum _target, GLint _level, GLenum _internalformat,
    963       GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize,
    964       uint32 _data_shm_id, uint32 _data_shm_offset) {
    965     static_cast<ValueType*>(
    966         cmd)->Init(
    967             _target, _level, _internalformat, _width, _height, _border,
    968             _imageSize, _data_shm_id, _data_shm_offset);
    969     return NextCmdAddress<ValueType>(cmd);
    970   }
    971 
    972   gpu::CommandHeader header;
    973   uint32 target;
    974   int32 level;
    975   uint32 internalformat;
    976   int32 width;
    977   int32 height;
    978   int32 border;
    979   int32 imageSize;
    980   uint32 data_shm_id;
    981   uint32 data_shm_offset;
    982 };
    983 
    984 COMPILE_ASSERT(sizeof(CompressedTexImage2D) == 40,
    985                Sizeof_CompressedTexImage2D_is_not_40);
    986 COMPILE_ASSERT(offsetof(CompressedTexImage2D, header) == 0,
    987                OffsetOf_CompressedTexImage2D_header_not_0);
    988 COMPILE_ASSERT(offsetof(CompressedTexImage2D, target) == 4,
    989                OffsetOf_CompressedTexImage2D_target_not_4);
    990 COMPILE_ASSERT(offsetof(CompressedTexImage2D, level) == 8,
    991                OffsetOf_CompressedTexImage2D_level_not_8);
    992 COMPILE_ASSERT(offsetof(CompressedTexImage2D, internalformat) == 12,
    993                OffsetOf_CompressedTexImage2D_internalformat_not_12);
    994 COMPILE_ASSERT(offsetof(CompressedTexImage2D, width) == 16,
    995                OffsetOf_CompressedTexImage2D_width_not_16);
    996 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20,
    997                OffsetOf_CompressedTexImage2D_height_not_20);
    998 COMPILE_ASSERT(offsetof(CompressedTexImage2D, border) == 24,
    999                OffsetOf_CompressedTexImage2D_border_not_24);
   1000 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 28,
   1001                OffsetOf_CompressedTexImage2D_imageSize_not_28);
   1002 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 32,
   1003                OffsetOf_CompressedTexImage2D_data_shm_id_not_32);
   1004 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 36,
   1005                OffsetOf_CompressedTexImage2D_data_shm_offset_not_36);
   1006 
   1007 struct CompressedTexImage2DBucket {
   1008   typedef CompressedTexImage2DBucket ValueType;
   1009   static const CommandId kCmdId = kCompressedTexImage2DBucket;
   1010   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1011 
   1012   static uint32 ComputeSize() {
   1013     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1014   }
   1015 
   1016   void SetHeader() {
   1017     header.SetCmd<ValueType>();
   1018   }
   1019 
   1020   void Init(
   1021       GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width,
   1022       GLsizei _height, GLint _border, GLuint _bucket_id) {
   1023     SetHeader();
   1024     target = _target;
   1025     level = _level;
   1026     internalformat = _internalformat;
   1027     width = _width;
   1028     height = _height;
   1029     border = _border;
   1030     bucket_id = _bucket_id;
   1031   }
   1032 
   1033   void* Set(
   1034       void* cmd, GLenum _target, GLint _level, GLenum _internalformat,
   1035       GLsizei _width, GLsizei _height, GLint _border, GLuint _bucket_id) {
   1036     static_cast<ValueType*>(
   1037         cmd)->Init(
   1038             _target, _level, _internalformat, _width, _height, _border,
   1039             _bucket_id);
   1040     return NextCmdAddress<ValueType>(cmd);
   1041   }
   1042 
   1043   gpu::CommandHeader header;
   1044   uint32 target;
   1045   int32 level;
   1046   uint32 internalformat;
   1047   int32 width;
   1048   int32 height;
   1049   int32 border;
   1050   uint32 bucket_id;
   1051 };
   1052 
   1053 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 32,
   1054                Sizeof_CompressedTexImage2DBucket_is_not_32);
   1055 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0,
   1056                OffsetOf_CompressedTexImage2DBucket_header_not_0);
   1057 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4,
   1058                OffsetOf_CompressedTexImage2DBucket_target_not_4);
   1059 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8,
   1060                OffsetOf_CompressedTexImage2DBucket_level_not_8);
   1061 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12,
   1062                OffsetOf_CompressedTexImage2DBucket_internalformat_not_12);
   1063 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16,
   1064                OffsetOf_CompressedTexImage2DBucket_width_not_16);
   1065 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20,
   1066                OffsetOf_CompressedTexImage2DBucket_height_not_20);
   1067 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, border) == 24,
   1068                OffsetOf_CompressedTexImage2DBucket_border_not_24);
   1069 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 28,
   1070                OffsetOf_CompressedTexImage2DBucket_bucket_id_not_28);
   1071 
   1072 struct CompressedTexSubImage2D {
   1073   typedef CompressedTexSubImage2D ValueType;
   1074   static const CommandId kCmdId = kCompressedTexSubImage2D;
   1075   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1076 
   1077   static uint32 ComputeSize() {
   1078     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1079   }
   1080 
   1081   void SetHeader() {
   1082     header.SetCmd<ValueType>();
   1083   }
   1084 
   1085   void Init(
   1086       GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   1087       GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize,
   1088       uint32 _data_shm_id, uint32 _data_shm_offset) {
   1089     SetHeader();
   1090     target = _target;
   1091     level = _level;
   1092     xoffset = _xoffset;
   1093     yoffset = _yoffset;
   1094     width = _width;
   1095     height = _height;
   1096     format = _format;
   1097     imageSize = _imageSize;
   1098     data_shm_id = _data_shm_id;
   1099     data_shm_offset = _data_shm_offset;
   1100   }
   1101 
   1102   void* Set(
   1103       void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   1104       GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize,
   1105       uint32 _data_shm_id, uint32 _data_shm_offset) {
   1106     static_cast<ValueType*>(
   1107         cmd)->Init(
   1108             _target, _level, _xoffset, _yoffset, _width, _height, _format,
   1109             _imageSize, _data_shm_id, _data_shm_offset);
   1110     return NextCmdAddress<ValueType>(cmd);
   1111   }
   1112 
   1113   gpu::CommandHeader header;
   1114   uint32 target;
   1115   int32 level;
   1116   int32 xoffset;
   1117   int32 yoffset;
   1118   int32 width;
   1119   int32 height;
   1120   uint32 format;
   1121   int32 imageSize;
   1122   uint32 data_shm_id;
   1123   uint32 data_shm_offset;
   1124 };
   1125 
   1126 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D) == 44,
   1127                Sizeof_CompressedTexSubImage2D_is_not_44);
   1128 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, header) == 0,
   1129                OffsetOf_CompressedTexSubImage2D_header_not_0);
   1130 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, target) == 4,
   1131                OffsetOf_CompressedTexSubImage2D_target_not_4);
   1132 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, level) == 8,
   1133                OffsetOf_CompressedTexSubImage2D_level_not_8);
   1134 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, xoffset) == 12,
   1135                OffsetOf_CompressedTexSubImage2D_xoffset_not_12);
   1136 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, yoffset) == 16,
   1137                OffsetOf_CompressedTexSubImage2D_yoffset_not_16);
   1138 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, width) == 20,
   1139                OffsetOf_CompressedTexSubImage2D_width_not_20);
   1140 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, height) == 24,
   1141                OffsetOf_CompressedTexSubImage2D_height_not_24);
   1142 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28,
   1143                OffsetOf_CompressedTexSubImage2D_format_not_28);
   1144 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32,
   1145                OffsetOf_CompressedTexSubImage2D_imageSize_not_32);
   1146 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36,
   1147                OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36);
   1148 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40,
   1149                OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40);
   1150 
   1151 struct CompressedTexSubImage2DBucket {
   1152   typedef CompressedTexSubImage2DBucket ValueType;
   1153   static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
   1154   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1155 
   1156   static uint32 ComputeSize() {
   1157     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1158   }
   1159 
   1160   void SetHeader() {
   1161     header.SetCmd<ValueType>();
   1162   }
   1163 
   1164   void Init(
   1165       GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   1166       GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) {
   1167     SetHeader();
   1168     target = _target;
   1169     level = _level;
   1170     xoffset = _xoffset;
   1171     yoffset = _yoffset;
   1172     width = _width;
   1173     height = _height;
   1174     format = _format;
   1175     bucket_id = _bucket_id;
   1176   }
   1177 
   1178   void* Set(
   1179       void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   1180       GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) {
   1181     static_cast<ValueType*>(
   1182         cmd)->Init(
   1183             _target, _level, _xoffset, _yoffset, _width, _height, _format,
   1184             _bucket_id);
   1185     return NextCmdAddress<ValueType>(cmd);
   1186   }
   1187 
   1188   gpu::CommandHeader header;
   1189   uint32 target;
   1190   int32 level;
   1191   int32 xoffset;
   1192   int32 yoffset;
   1193   int32 width;
   1194   int32 height;
   1195   uint32 format;
   1196   uint32 bucket_id;
   1197 };
   1198 
   1199 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36,
   1200                Sizeof_CompressedTexSubImage2DBucket_is_not_36);
   1201 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0,
   1202                OffsetOf_CompressedTexSubImage2DBucket_header_not_0);
   1203 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4,
   1204                OffsetOf_CompressedTexSubImage2DBucket_target_not_4);
   1205 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8,
   1206                OffsetOf_CompressedTexSubImage2DBucket_level_not_8);
   1207 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
   1208                OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12);
   1209 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
   1210                OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16);
   1211 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20,
   1212                OffsetOf_CompressedTexSubImage2DBucket_width_not_20);
   1213 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24,
   1214                OffsetOf_CompressedTexSubImage2DBucket_height_not_24);
   1215 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28,
   1216                OffsetOf_CompressedTexSubImage2DBucket_format_not_28);
   1217 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
   1218                OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32);
   1219 
   1220 struct CopyTexImage2D {
   1221   typedef CopyTexImage2D ValueType;
   1222   static const CommandId kCmdId = kCopyTexImage2D;
   1223   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1224 
   1225   static uint32 ComputeSize() {
   1226     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1227   }
   1228 
   1229   void SetHeader() {
   1230     header.SetCmd<ValueType>();
   1231   }
   1232 
   1233   void Init(
   1234       GLenum _target, GLint _level, GLenum _internalformat, GLint _x, GLint _y,
   1235       GLsizei _width, GLsizei _height, GLint _border) {
   1236     SetHeader();
   1237     target = _target;
   1238     level = _level;
   1239     internalformat = _internalformat;
   1240     x = _x;
   1241     y = _y;
   1242     width = _width;
   1243     height = _height;
   1244     border = _border;
   1245   }
   1246 
   1247   void* Set(
   1248       void* cmd, GLenum _target, GLint _level, GLenum _internalformat, GLint _x,
   1249       GLint _y, GLsizei _width, GLsizei _height, GLint _border) {
   1250     static_cast<ValueType*>(
   1251         cmd)->Init(
   1252             _target, _level, _internalformat, _x, _y, _width, _height,
   1253             _border);
   1254     return NextCmdAddress<ValueType>(cmd);
   1255   }
   1256 
   1257   gpu::CommandHeader header;
   1258   uint32 target;
   1259   int32 level;
   1260   uint32 internalformat;
   1261   int32 x;
   1262   int32 y;
   1263   int32 width;
   1264   int32 height;
   1265   int32 border;
   1266 };
   1267 
   1268 COMPILE_ASSERT(sizeof(CopyTexImage2D) == 36,
   1269                Sizeof_CopyTexImage2D_is_not_36);
   1270 COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0,
   1271                OffsetOf_CopyTexImage2D_header_not_0);
   1272 COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4,
   1273                OffsetOf_CopyTexImage2D_target_not_4);
   1274 COMPILE_ASSERT(offsetof(CopyTexImage2D, level) == 8,
   1275                OffsetOf_CopyTexImage2D_level_not_8);
   1276 COMPILE_ASSERT(offsetof(CopyTexImage2D, internalformat) == 12,
   1277                OffsetOf_CopyTexImage2D_internalformat_not_12);
   1278 COMPILE_ASSERT(offsetof(CopyTexImage2D, x) == 16,
   1279                OffsetOf_CopyTexImage2D_x_not_16);
   1280 COMPILE_ASSERT(offsetof(CopyTexImage2D, y) == 20,
   1281                OffsetOf_CopyTexImage2D_y_not_20);
   1282 COMPILE_ASSERT(offsetof(CopyTexImage2D, width) == 24,
   1283                OffsetOf_CopyTexImage2D_width_not_24);
   1284 COMPILE_ASSERT(offsetof(CopyTexImage2D, height) == 28,
   1285                OffsetOf_CopyTexImage2D_height_not_28);
   1286 COMPILE_ASSERT(offsetof(CopyTexImage2D, border) == 32,
   1287                OffsetOf_CopyTexImage2D_border_not_32);
   1288 
   1289 struct CopyTexSubImage2D {
   1290   typedef CopyTexSubImage2D ValueType;
   1291   static const CommandId kCmdId = kCopyTexSubImage2D;
   1292   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1293 
   1294   static uint32 ComputeSize() {
   1295     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1296   }
   1297 
   1298   void SetHeader() {
   1299     header.SetCmd<ValueType>();
   1300   }
   1301 
   1302   void Init(
   1303       GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, GLint _x,
   1304       GLint _y, GLsizei _width, GLsizei _height) {
   1305     SetHeader();
   1306     target = _target;
   1307     level = _level;
   1308     xoffset = _xoffset;
   1309     yoffset = _yoffset;
   1310     x = _x;
   1311     y = _y;
   1312     width = _width;
   1313     height = _height;
   1314   }
   1315 
   1316   void* Set(
   1317       void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   1318       GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
   1319     static_cast<ValueType*>(
   1320         cmd)->Init(
   1321             _target, _level, _xoffset, _yoffset, _x, _y, _width, _height);
   1322     return NextCmdAddress<ValueType>(cmd);
   1323   }
   1324 
   1325   gpu::CommandHeader header;
   1326   uint32 target;
   1327   int32 level;
   1328   int32 xoffset;
   1329   int32 yoffset;
   1330   int32 x;
   1331   int32 y;
   1332   int32 width;
   1333   int32 height;
   1334 };
   1335 
   1336 COMPILE_ASSERT(sizeof(CopyTexSubImage2D) == 36,
   1337                Sizeof_CopyTexSubImage2D_is_not_36);
   1338 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, header) == 0,
   1339                OffsetOf_CopyTexSubImage2D_header_not_0);
   1340 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, target) == 4,
   1341                OffsetOf_CopyTexSubImage2D_target_not_4);
   1342 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, level) == 8,
   1343                OffsetOf_CopyTexSubImage2D_level_not_8);
   1344 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, xoffset) == 12,
   1345                OffsetOf_CopyTexSubImage2D_xoffset_not_12);
   1346 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, yoffset) == 16,
   1347                OffsetOf_CopyTexSubImage2D_yoffset_not_16);
   1348 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, x) == 20,
   1349                OffsetOf_CopyTexSubImage2D_x_not_20);
   1350 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, y) == 24,
   1351                OffsetOf_CopyTexSubImage2D_y_not_24);
   1352 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, width) == 28,
   1353                OffsetOf_CopyTexSubImage2D_width_not_28);
   1354 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, height) == 32,
   1355                OffsetOf_CopyTexSubImage2D_height_not_32);
   1356 
   1357 struct CreateProgram {
   1358   typedef CreateProgram ValueType;
   1359   static const CommandId kCmdId = kCreateProgram;
   1360   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1361 
   1362   static uint32 ComputeSize() {
   1363     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1364   }
   1365 
   1366   void SetHeader() {
   1367     header.SetCmd<ValueType>();
   1368   }
   1369 
   1370   void Init(uint32 _client_id) {
   1371     SetHeader();
   1372     client_id = _client_id;
   1373   }
   1374 
   1375   void* Set(void* cmd, uint32 _client_id) {
   1376     static_cast<ValueType*>(cmd)->Init(_client_id);
   1377     return NextCmdAddress<ValueType>(cmd);
   1378   }
   1379 
   1380   gpu::CommandHeader header;
   1381   uint32 client_id;
   1382 };
   1383 
   1384 COMPILE_ASSERT(sizeof(CreateProgram) == 8,
   1385                Sizeof_CreateProgram_is_not_8);
   1386 COMPILE_ASSERT(offsetof(CreateProgram, header) == 0,
   1387                OffsetOf_CreateProgram_header_not_0);
   1388 COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4,
   1389                OffsetOf_CreateProgram_client_id_not_4);
   1390 
   1391 struct CreateShader {
   1392   typedef CreateShader ValueType;
   1393   static const CommandId kCmdId = kCreateShader;
   1394   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1395 
   1396   static uint32 ComputeSize() {
   1397     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1398   }
   1399 
   1400   void SetHeader() {
   1401     header.SetCmd<ValueType>();
   1402   }
   1403 
   1404   void Init(GLenum _type, uint32 _client_id) {
   1405     SetHeader();
   1406     type = _type;
   1407     client_id = _client_id;
   1408   }
   1409 
   1410   void* Set(void* cmd, GLenum _type, uint32 _client_id) {
   1411     static_cast<ValueType*>(cmd)->Init(_type, _client_id);
   1412     return NextCmdAddress<ValueType>(cmd);
   1413   }
   1414 
   1415   gpu::CommandHeader header;
   1416   uint32 type;
   1417   uint32 client_id;
   1418 };
   1419 
   1420 COMPILE_ASSERT(sizeof(CreateShader) == 12,
   1421                Sizeof_CreateShader_is_not_12);
   1422 COMPILE_ASSERT(offsetof(CreateShader, header) == 0,
   1423                OffsetOf_CreateShader_header_not_0);
   1424 COMPILE_ASSERT(offsetof(CreateShader, type) == 4,
   1425                OffsetOf_CreateShader_type_not_4);
   1426 COMPILE_ASSERT(offsetof(CreateShader, client_id) == 8,
   1427                OffsetOf_CreateShader_client_id_not_8);
   1428 
   1429 struct CullFace {
   1430   typedef CullFace ValueType;
   1431   static const CommandId kCmdId = kCullFace;
   1432   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1433 
   1434   static uint32 ComputeSize() {
   1435     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1436   }
   1437 
   1438   void SetHeader() {
   1439     header.SetCmd<ValueType>();
   1440   }
   1441 
   1442   void Init(GLenum _mode) {
   1443     SetHeader();
   1444     mode = _mode;
   1445   }
   1446 
   1447   void* Set(void* cmd, GLenum _mode) {
   1448     static_cast<ValueType*>(cmd)->Init(_mode);
   1449     return NextCmdAddress<ValueType>(cmd);
   1450   }
   1451 
   1452   gpu::CommandHeader header;
   1453   uint32 mode;
   1454 };
   1455 
   1456 COMPILE_ASSERT(sizeof(CullFace) == 8,
   1457                Sizeof_CullFace_is_not_8);
   1458 COMPILE_ASSERT(offsetof(CullFace, header) == 0,
   1459                OffsetOf_CullFace_header_not_0);
   1460 COMPILE_ASSERT(offsetof(CullFace, mode) == 4,
   1461                OffsetOf_CullFace_mode_not_4);
   1462 
   1463 struct DeleteBuffers {
   1464   typedef DeleteBuffers ValueType;
   1465   static const CommandId kCmdId = kDeleteBuffers;
   1466   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1467 
   1468   static uint32 ComputeSize() {
   1469     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1470   }
   1471 
   1472   void SetHeader() {
   1473     header.SetCmd<ValueType>();
   1474   }
   1475 
   1476   void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
   1477     SetHeader();
   1478     n = _n;
   1479     buffers_shm_id = _buffers_shm_id;
   1480     buffers_shm_offset = _buffers_shm_offset;
   1481   }
   1482 
   1483   void* Set(
   1484       void* cmd, GLsizei _n, uint32 _buffers_shm_id,
   1485       uint32 _buffers_shm_offset) {
   1486     static_cast<ValueType*>(
   1487         cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset);
   1488     return NextCmdAddress<ValueType>(cmd);
   1489   }
   1490 
   1491   gpu::CommandHeader header;
   1492   int32 n;
   1493   uint32 buffers_shm_id;
   1494   uint32 buffers_shm_offset;
   1495 };
   1496 
   1497 COMPILE_ASSERT(sizeof(DeleteBuffers) == 16,
   1498                Sizeof_DeleteBuffers_is_not_16);
   1499 COMPILE_ASSERT(offsetof(DeleteBuffers, header) == 0,
   1500                OffsetOf_DeleteBuffers_header_not_0);
   1501 COMPILE_ASSERT(offsetof(DeleteBuffers, n) == 4,
   1502                OffsetOf_DeleteBuffers_n_not_4);
   1503 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_id) == 8,
   1504                OffsetOf_DeleteBuffers_buffers_shm_id_not_8);
   1505 COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_offset) == 12,
   1506                OffsetOf_DeleteBuffers_buffers_shm_offset_not_12);
   1507 
   1508 struct DeleteBuffersImmediate {
   1509   typedef DeleteBuffersImmediate ValueType;
   1510   static const CommandId kCmdId = kDeleteBuffersImmediate;
   1511   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   1512 
   1513   static uint32 ComputeDataSize(GLsizei n) {
   1514     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   1515   }
   1516 
   1517   static uint32 ComputeSize(GLsizei n) {
   1518     return static_cast<uint32>(
   1519         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   1520   }
   1521 
   1522   void SetHeader(GLsizei n) {
   1523     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   1524   }
   1525 
   1526   void Init(GLsizei _n, const GLuint* _buffers) {
   1527     SetHeader(_n);
   1528     n = _n;
   1529     memcpy(ImmediateDataAddress(this),
   1530            _buffers, ComputeDataSize(_n));
   1531   }
   1532 
   1533   void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
   1534     static_cast<ValueType*>(cmd)->Init(_n, _buffers);
   1535     const uint32 size = ComputeSize(_n);
   1536     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   1537   }
   1538 
   1539   gpu::CommandHeader header;
   1540   int32 n;
   1541 };
   1542 
   1543 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate) == 8,
   1544                Sizeof_DeleteBuffersImmediate_is_not_8);
   1545 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, header) == 0,
   1546                OffsetOf_DeleteBuffersImmediate_header_not_0);
   1547 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, n) == 4,
   1548                OffsetOf_DeleteBuffersImmediate_n_not_4);
   1549 
   1550 struct DeleteFramebuffers {
   1551   typedef DeleteFramebuffers ValueType;
   1552   static const CommandId kCmdId = kDeleteFramebuffers;
   1553   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1554 
   1555   static uint32 ComputeSize() {
   1556     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1557   }
   1558 
   1559   void SetHeader() {
   1560     header.SetCmd<ValueType>();
   1561   }
   1562 
   1563   void Init(
   1564       GLsizei _n, uint32 _framebuffers_shm_id,
   1565       uint32 _framebuffers_shm_offset) {
   1566     SetHeader();
   1567     n = _n;
   1568     framebuffers_shm_id = _framebuffers_shm_id;
   1569     framebuffers_shm_offset = _framebuffers_shm_offset;
   1570   }
   1571 
   1572   void* Set(
   1573       void* cmd, GLsizei _n, uint32 _framebuffers_shm_id,
   1574       uint32 _framebuffers_shm_offset) {
   1575     static_cast<ValueType*>(
   1576         cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
   1577     return NextCmdAddress<ValueType>(cmd);
   1578   }
   1579 
   1580   gpu::CommandHeader header;
   1581   int32 n;
   1582   uint32 framebuffers_shm_id;
   1583   uint32 framebuffers_shm_offset;
   1584 };
   1585 
   1586 COMPILE_ASSERT(sizeof(DeleteFramebuffers) == 16,
   1587                Sizeof_DeleteFramebuffers_is_not_16);
   1588 COMPILE_ASSERT(offsetof(DeleteFramebuffers, header) == 0,
   1589                OffsetOf_DeleteFramebuffers_header_not_0);
   1590 COMPILE_ASSERT(offsetof(DeleteFramebuffers, n) == 4,
   1591                OffsetOf_DeleteFramebuffers_n_not_4);
   1592 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_id) == 8,
   1593                OffsetOf_DeleteFramebuffers_framebuffers_shm_id_not_8);
   1594 COMPILE_ASSERT(offsetof(DeleteFramebuffers, framebuffers_shm_offset) == 12,
   1595                OffsetOf_DeleteFramebuffers_framebuffers_shm_offset_not_12);
   1596 
   1597 struct DeleteFramebuffersImmediate {
   1598   typedef DeleteFramebuffersImmediate ValueType;
   1599   static const CommandId kCmdId = kDeleteFramebuffersImmediate;
   1600   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   1601 
   1602   static uint32 ComputeDataSize(GLsizei n) {
   1603     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   1604   }
   1605 
   1606   static uint32 ComputeSize(GLsizei n) {
   1607     return static_cast<uint32>(
   1608         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   1609   }
   1610 
   1611   void SetHeader(GLsizei n) {
   1612     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   1613   }
   1614 
   1615   void Init(GLsizei _n, const GLuint* _framebuffers) {
   1616     SetHeader(_n);
   1617     n = _n;
   1618     memcpy(ImmediateDataAddress(this),
   1619            _framebuffers, ComputeDataSize(_n));
   1620   }
   1621 
   1622   void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
   1623     static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
   1624     const uint32 size = ComputeSize(_n);
   1625     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   1626   }
   1627 
   1628   gpu::CommandHeader header;
   1629   int32 n;
   1630 };
   1631 
   1632 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate) == 8,
   1633                Sizeof_DeleteFramebuffersImmediate_is_not_8);
   1634 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, header) == 0,
   1635                OffsetOf_DeleteFramebuffersImmediate_header_not_0);
   1636 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, n) == 4,
   1637                OffsetOf_DeleteFramebuffersImmediate_n_not_4);
   1638 
   1639 struct DeleteProgram {
   1640   typedef DeleteProgram ValueType;
   1641   static const CommandId kCmdId = kDeleteProgram;
   1642   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1643 
   1644   static uint32 ComputeSize() {
   1645     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1646   }
   1647 
   1648   void SetHeader() {
   1649     header.SetCmd<ValueType>();
   1650   }
   1651 
   1652   void Init(GLuint _program) {
   1653     SetHeader();
   1654     program = _program;
   1655   }
   1656 
   1657   void* Set(void* cmd, GLuint _program) {
   1658     static_cast<ValueType*>(cmd)->Init(_program);
   1659     return NextCmdAddress<ValueType>(cmd);
   1660   }
   1661 
   1662   gpu::CommandHeader header;
   1663   uint32 program;
   1664 };
   1665 
   1666 COMPILE_ASSERT(sizeof(DeleteProgram) == 8,
   1667                Sizeof_DeleteProgram_is_not_8);
   1668 COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0,
   1669                OffsetOf_DeleteProgram_header_not_0);
   1670 COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4,
   1671                OffsetOf_DeleteProgram_program_not_4);
   1672 
   1673 struct DeleteRenderbuffers {
   1674   typedef DeleteRenderbuffers ValueType;
   1675   static const CommandId kCmdId = kDeleteRenderbuffers;
   1676   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1677 
   1678   static uint32 ComputeSize() {
   1679     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1680   }
   1681 
   1682   void SetHeader() {
   1683     header.SetCmd<ValueType>();
   1684   }
   1685 
   1686   void Init(
   1687       GLsizei _n, uint32 _renderbuffers_shm_id,
   1688       uint32 _renderbuffers_shm_offset) {
   1689     SetHeader();
   1690     n = _n;
   1691     renderbuffers_shm_id = _renderbuffers_shm_id;
   1692     renderbuffers_shm_offset = _renderbuffers_shm_offset;
   1693   }
   1694 
   1695   void* Set(
   1696       void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id,
   1697       uint32 _renderbuffers_shm_offset) {
   1698     static_cast<ValueType*>(
   1699         cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
   1700     return NextCmdAddress<ValueType>(cmd);
   1701   }
   1702 
   1703   gpu::CommandHeader header;
   1704   int32 n;
   1705   uint32 renderbuffers_shm_id;
   1706   uint32 renderbuffers_shm_offset;
   1707 };
   1708 
   1709 COMPILE_ASSERT(sizeof(DeleteRenderbuffers) == 16,
   1710                Sizeof_DeleteRenderbuffers_is_not_16);
   1711 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, header) == 0,
   1712                OffsetOf_DeleteRenderbuffers_header_not_0);
   1713 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, n) == 4,
   1714                OffsetOf_DeleteRenderbuffers_n_not_4);
   1715 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_id) == 8,
   1716                OffsetOf_DeleteRenderbuffers_renderbuffers_shm_id_not_8);
   1717 COMPILE_ASSERT(offsetof(DeleteRenderbuffers, renderbuffers_shm_offset) == 12,
   1718                OffsetOf_DeleteRenderbuffers_renderbuffers_shm_offset_not_12);
   1719 
   1720 struct DeleteRenderbuffersImmediate {
   1721   typedef DeleteRenderbuffersImmediate ValueType;
   1722   static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
   1723   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   1724 
   1725   static uint32 ComputeDataSize(GLsizei n) {
   1726     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   1727   }
   1728 
   1729   static uint32 ComputeSize(GLsizei n) {
   1730     return static_cast<uint32>(
   1731         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   1732   }
   1733 
   1734   void SetHeader(GLsizei n) {
   1735     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   1736   }
   1737 
   1738   void Init(GLsizei _n, const GLuint* _renderbuffers) {
   1739     SetHeader(_n);
   1740     n = _n;
   1741     memcpy(ImmediateDataAddress(this),
   1742            _renderbuffers, ComputeDataSize(_n));
   1743   }
   1744 
   1745   void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
   1746     static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
   1747     const uint32 size = ComputeSize(_n);
   1748     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   1749   }
   1750 
   1751   gpu::CommandHeader header;
   1752   int32 n;
   1753 };
   1754 
   1755 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8,
   1756                Sizeof_DeleteRenderbuffersImmediate_is_not_8);
   1757 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0,
   1758                OffsetOf_DeleteRenderbuffersImmediate_header_not_0);
   1759 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4,
   1760                OffsetOf_DeleteRenderbuffersImmediate_n_not_4);
   1761 
   1762 struct DeleteShader {
   1763   typedef DeleteShader ValueType;
   1764   static const CommandId kCmdId = kDeleteShader;
   1765   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1766 
   1767   static uint32 ComputeSize() {
   1768     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1769   }
   1770 
   1771   void SetHeader() {
   1772     header.SetCmd<ValueType>();
   1773   }
   1774 
   1775   void Init(GLuint _shader) {
   1776     SetHeader();
   1777     shader = _shader;
   1778   }
   1779 
   1780   void* Set(void* cmd, GLuint _shader) {
   1781     static_cast<ValueType*>(cmd)->Init(_shader);
   1782     return NextCmdAddress<ValueType>(cmd);
   1783   }
   1784 
   1785   gpu::CommandHeader header;
   1786   uint32 shader;
   1787 };
   1788 
   1789 COMPILE_ASSERT(sizeof(DeleteShader) == 8,
   1790                Sizeof_DeleteShader_is_not_8);
   1791 COMPILE_ASSERT(offsetof(DeleteShader, header) == 0,
   1792                OffsetOf_DeleteShader_header_not_0);
   1793 COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4,
   1794                OffsetOf_DeleteShader_shader_not_4);
   1795 
   1796 struct DeleteTextures {
   1797   typedef DeleteTextures ValueType;
   1798   static const CommandId kCmdId = kDeleteTextures;
   1799   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1800 
   1801   static uint32 ComputeSize() {
   1802     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1803   }
   1804 
   1805   void SetHeader() {
   1806     header.SetCmd<ValueType>();
   1807   }
   1808 
   1809   void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
   1810     SetHeader();
   1811     n = _n;
   1812     textures_shm_id = _textures_shm_id;
   1813     textures_shm_offset = _textures_shm_offset;
   1814   }
   1815 
   1816   void* Set(
   1817       void* cmd, GLsizei _n, uint32 _textures_shm_id,
   1818       uint32 _textures_shm_offset) {
   1819     static_cast<ValueType*>(
   1820         cmd)->Init(_n, _textures_shm_id, _textures_shm_offset);
   1821     return NextCmdAddress<ValueType>(cmd);
   1822   }
   1823 
   1824   gpu::CommandHeader header;
   1825   int32 n;
   1826   uint32 textures_shm_id;
   1827   uint32 textures_shm_offset;
   1828 };
   1829 
   1830 COMPILE_ASSERT(sizeof(DeleteTextures) == 16,
   1831                Sizeof_DeleteTextures_is_not_16);
   1832 COMPILE_ASSERT(offsetof(DeleteTextures, header) == 0,
   1833                OffsetOf_DeleteTextures_header_not_0);
   1834 COMPILE_ASSERT(offsetof(DeleteTextures, n) == 4,
   1835                OffsetOf_DeleteTextures_n_not_4);
   1836 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_id) == 8,
   1837                OffsetOf_DeleteTextures_textures_shm_id_not_8);
   1838 COMPILE_ASSERT(offsetof(DeleteTextures, textures_shm_offset) == 12,
   1839                OffsetOf_DeleteTextures_textures_shm_offset_not_12);
   1840 
   1841 struct DeleteTexturesImmediate {
   1842   typedef DeleteTexturesImmediate ValueType;
   1843   static const CommandId kCmdId = kDeleteTexturesImmediate;
   1844   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   1845 
   1846   static uint32 ComputeDataSize(GLsizei n) {
   1847     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   1848   }
   1849 
   1850   static uint32 ComputeSize(GLsizei n) {
   1851     return static_cast<uint32>(
   1852         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   1853   }
   1854 
   1855   void SetHeader(GLsizei n) {
   1856     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   1857   }
   1858 
   1859   void Init(GLsizei _n, const GLuint* _textures) {
   1860     SetHeader(_n);
   1861     n = _n;
   1862     memcpy(ImmediateDataAddress(this),
   1863            _textures, ComputeDataSize(_n));
   1864   }
   1865 
   1866   void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
   1867     static_cast<ValueType*>(cmd)->Init(_n, _textures);
   1868     const uint32 size = ComputeSize(_n);
   1869     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   1870   }
   1871 
   1872   gpu::CommandHeader header;
   1873   int32 n;
   1874 };
   1875 
   1876 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate) == 8,
   1877                Sizeof_DeleteTexturesImmediate_is_not_8);
   1878 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, header) == 0,
   1879                OffsetOf_DeleteTexturesImmediate_header_not_0);
   1880 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, n) == 4,
   1881                OffsetOf_DeleteTexturesImmediate_n_not_4);
   1882 
   1883 struct DepthFunc {
   1884   typedef DepthFunc ValueType;
   1885   static const CommandId kCmdId = kDepthFunc;
   1886   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1887 
   1888   static uint32 ComputeSize() {
   1889     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1890   }
   1891 
   1892   void SetHeader() {
   1893     header.SetCmd<ValueType>();
   1894   }
   1895 
   1896   void Init(GLenum _func) {
   1897     SetHeader();
   1898     func = _func;
   1899   }
   1900 
   1901   void* Set(void* cmd, GLenum _func) {
   1902     static_cast<ValueType*>(cmd)->Init(_func);
   1903     return NextCmdAddress<ValueType>(cmd);
   1904   }
   1905 
   1906   gpu::CommandHeader header;
   1907   uint32 func;
   1908 };
   1909 
   1910 COMPILE_ASSERT(sizeof(DepthFunc) == 8,
   1911                Sizeof_DepthFunc_is_not_8);
   1912 COMPILE_ASSERT(offsetof(DepthFunc, header) == 0,
   1913                OffsetOf_DepthFunc_header_not_0);
   1914 COMPILE_ASSERT(offsetof(DepthFunc, func) == 4,
   1915                OffsetOf_DepthFunc_func_not_4);
   1916 
   1917 struct DepthMask {
   1918   typedef DepthMask ValueType;
   1919   static const CommandId kCmdId = kDepthMask;
   1920   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1921 
   1922   static uint32 ComputeSize() {
   1923     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1924   }
   1925 
   1926   void SetHeader() {
   1927     header.SetCmd<ValueType>();
   1928   }
   1929 
   1930   void Init(GLboolean _flag) {
   1931     SetHeader();
   1932     flag = _flag;
   1933   }
   1934 
   1935   void* Set(void* cmd, GLboolean _flag) {
   1936     static_cast<ValueType*>(cmd)->Init(_flag);
   1937     return NextCmdAddress<ValueType>(cmd);
   1938   }
   1939 
   1940   gpu::CommandHeader header;
   1941   uint32 flag;
   1942 };
   1943 
   1944 COMPILE_ASSERT(sizeof(DepthMask) == 8,
   1945                Sizeof_DepthMask_is_not_8);
   1946 COMPILE_ASSERT(offsetof(DepthMask, header) == 0,
   1947                OffsetOf_DepthMask_header_not_0);
   1948 COMPILE_ASSERT(offsetof(DepthMask, flag) == 4,
   1949                OffsetOf_DepthMask_flag_not_4);
   1950 
   1951 struct DepthRangef {
   1952   typedef DepthRangef ValueType;
   1953   static const CommandId kCmdId = kDepthRangef;
   1954   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1955 
   1956   static uint32 ComputeSize() {
   1957     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1958   }
   1959 
   1960   void SetHeader() {
   1961     header.SetCmd<ValueType>();
   1962   }
   1963 
   1964   void Init(GLclampf _zNear, GLclampf _zFar) {
   1965     SetHeader();
   1966     zNear = _zNear;
   1967     zFar = _zFar;
   1968   }
   1969 
   1970   void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) {
   1971     static_cast<ValueType*>(cmd)->Init(_zNear, _zFar);
   1972     return NextCmdAddress<ValueType>(cmd);
   1973   }
   1974 
   1975   gpu::CommandHeader header;
   1976   float zNear;
   1977   float zFar;
   1978 };
   1979 
   1980 COMPILE_ASSERT(sizeof(DepthRangef) == 12,
   1981                Sizeof_DepthRangef_is_not_12);
   1982 COMPILE_ASSERT(offsetof(DepthRangef, header) == 0,
   1983                OffsetOf_DepthRangef_header_not_0);
   1984 COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4,
   1985                OffsetOf_DepthRangef_zNear_not_4);
   1986 COMPILE_ASSERT(offsetof(DepthRangef, zFar) == 8,
   1987                OffsetOf_DepthRangef_zFar_not_8);
   1988 
   1989 struct DetachShader {
   1990   typedef DetachShader ValueType;
   1991   static const CommandId kCmdId = kDetachShader;
   1992   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   1993 
   1994   static uint32 ComputeSize() {
   1995     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   1996   }
   1997 
   1998   void SetHeader() {
   1999     header.SetCmd<ValueType>();
   2000   }
   2001 
   2002   void Init(GLuint _program, GLuint _shader) {
   2003     SetHeader();
   2004     program = _program;
   2005     shader = _shader;
   2006   }
   2007 
   2008   void* Set(void* cmd, GLuint _program, GLuint _shader) {
   2009     static_cast<ValueType*>(cmd)->Init(_program, _shader);
   2010     return NextCmdAddress<ValueType>(cmd);
   2011   }
   2012 
   2013   gpu::CommandHeader header;
   2014   uint32 program;
   2015   uint32 shader;
   2016 };
   2017 
   2018 COMPILE_ASSERT(sizeof(DetachShader) == 12,
   2019                Sizeof_DetachShader_is_not_12);
   2020 COMPILE_ASSERT(offsetof(DetachShader, header) == 0,
   2021                OffsetOf_DetachShader_header_not_0);
   2022 COMPILE_ASSERT(offsetof(DetachShader, program) == 4,
   2023                OffsetOf_DetachShader_program_not_4);
   2024 COMPILE_ASSERT(offsetof(DetachShader, shader) == 8,
   2025                OffsetOf_DetachShader_shader_not_8);
   2026 
   2027 struct Disable {
   2028   typedef Disable ValueType;
   2029   static const CommandId kCmdId = kDisable;
   2030   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2031 
   2032   static uint32 ComputeSize() {
   2033     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2034   }
   2035 
   2036   void SetHeader() {
   2037     header.SetCmd<ValueType>();
   2038   }
   2039 
   2040   void Init(GLenum _cap) {
   2041     SetHeader();
   2042     cap = _cap;
   2043   }
   2044 
   2045   void* Set(void* cmd, GLenum _cap) {
   2046     static_cast<ValueType*>(cmd)->Init(_cap);
   2047     return NextCmdAddress<ValueType>(cmd);
   2048   }
   2049 
   2050   gpu::CommandHeader header;
   2051   uint32 cap;
   2052 };
   2053 
   2054 COMPILE_ASSERT(sizeof(Disable) == 8,
   2055                Sizeof_Disable_is_not_8);
   2056 COMPILE_ASSERT(offsetof(Disable, header) == 0,
   2057                OffsetOf_Disable_header_not_0);
   2058 COMPILE_ASSERT(offsetof(Disable, cap) == 4,
   2059                OffsetOf_Disable_cap_not_4);
   2060 
   2061 struct DisableVertexAttribArray {
   2062   typedef DisableVertexAttribArray ValueType;
   2063   static const CommandId kCmdId = kDisableVertexAttribArray;
   2064   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2065 
   2066   static uint32 ComputeSize() {
   2067     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2068   }
   2069 
   2070   void SetHeader() {
   2071     header.SetCmd<ValueType>();
   2072   }
   2073 
   2074   void Init(GLuint _index) {
   2075     SetHeader();
   2076     index = _index;
   2077   }
   2078 
   2079   void* Set(void* cmd, GLuint _index) {
   2080     static_cast<ValueType*>(cmd)->Init(_index);
   2081     return NextCmdAddress<ValueType>(cmd);
   2082   }
   2083 
   2084   gpu::CommandHeader header;
   2085   uint32 index;
   2086 };
   2087 
   2088 COMPILE_ASSERT(sizeof(DisableVertexAttribArray) == 8,
   2089                Sizeof_DisableVertexAttribArray_is_not_8);
   2090 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, header) == 0,
   2091                OffsetOf_DisableVertexAttribArray_header_not_0);
   2092 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, index) == 4,
   2093                OffsetOf_DisableVertexAttribArray_index_not_4);
   2094 
   2095 struct DrawArrays {
   2096   typedef DrawArrays ValueType;
   2097   static const CommandId kCmdId = kDrawArrays;
   2098   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2099 
   2100   static uint32 ComputeSize() {
   2101     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2102   }
   2103 
   2104   void SetHeader() {
   2105     header.SetCmd<ValueType>();
   2106   }
   2107 
   2108   void Init(GLenum _mode, GLint _first, GLsizei _count) {
   2109     SetHeader();
   2110     mode = _mode;
   2111     first = _first;
   2112     count = _count;
   2113   }
   2114 
   2115   void* Set(void* cmd, GLenum _mode, GLint _first, GLsizei _count) {
   2116     static_cast<ValueType*>(cmd)->Init(_mode, _first, _count);
   2117     return NextCmdAddress<ValueType>(cmd);
   2118   }
   2119 
   2120   gpu::CommandHeader header;
   2121   uint32 mode;
   2122   int32 first;
   2123   int32 count;
   2124 };
   2125 
   2126 COMPILE_ASSERT(sizeof(DrawArrays) == 16,
   2127                Sizeof_DrawArrays_is_not_16);
   2128 COMPILE_ASSERT(offsetof(DrawArrays, header) == 0,
   2129                OffsetOf_DrawArrays_header_not_0);
   2130 COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4,
   2131                OffsetOf_DrawArrays_mode_not_4);
   2132 COMPILE_ASSERT(offsetof(DrawArrays, first) == 8,
   2133                OffsetOf_DrawArrays_first_not_8);
   2134 COMPILE_ASSERT(offsetof(DrawArrays, count) == 12,
   2135                OffsetOf_DrawArrays_count_not_12);
   2136 
   2137 struct DrawElements {
   2138   typedef DrawElements ValueType;
   2139   static const CommandId kCmdId = kDrawElements;
   2140   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2141 
   2142   static uint32 ComputeSize() {
   2143     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2144   }
   2145 
   2146   void SetHeader() {
   2147     header.SetCmd<ValueType>();
   2148   }
   2149 
   2150   void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) {
   2151     SetHeader();
   2152     mode = _mode;
   2153     count = _count;
   2154     type = _type;
   2155     index_offset = _index_offset;
   2156   }
   2157 
   2158   void* Set(
   2159       void* cmd, GLenum _mode, GLsizei _count, GLenum _type,
   2160       GLuint _index_offset) {
   2161     static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset);
   2162     return NextCmdAddress<ValueType>(cmd);
   2163   }
   2164 
   2165   gpu::CommandHeader header;
   2166   uint32 mode;
   2167   int32 count;
   2168   uint32 type;
   2169   uint32 index_offset;
   2170 };
   2171 
   2172 COMPILE_ASSERT(sizeof(DrawElements) == 20,
   2173                Sizeof_DrawElements_is_not_20);
   2174 COMPILE_ASSERT(offsetof(DrawElements, header) == 0,
   2175                OffsetOf_DrawElements_header_not_0);
   2176 COMPILE_ASSERT(offsetof(DrawElements, mode) == 4,
   2177                OffsetOf_DrawElements_mode_not_4);
   2178 COMPILE_ASSERT(offsetof(DrawElements, count) == 8,
   2179                OffsetOf_DrawElements_count_not_8);
   2180 COMPILE_ASSERT(offsetof(DrawElements, type) == 12,
   2181                OffsetOf_DrawElements_type_not_12);
   2182 COMPILE_ASSERT(offsetof(DrawElements, index_offset) == 16,
   2183                OffsetOf_DrawElements_index_offset_not_16);
   2184 
   2185 struct Enable {
   2186   typedef Enable ValueType;
   2187   static const CommandId kCmdId = kEnable;
   2188   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2189 
   2190   static uint32 ComputeSize() {
   2191     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2192   }
   2193 
   2194   void SetHeader() {
   2195     header.SetCmd<ValueType>();
   2196   }
   2197 
   2198   void Init(GLenum _cap) {
   2199     SetHeader();
   2200     cap = _cap;
   2201   }
   2202 
   2203   void* Set(void* cmd, GLenum _cap) {
   2204     static_cast<ValueType*>(cmd)->Init(_cap);
   2205     return NextCmdAddress<ValueType>(cmd);
   2206   }
   2207 
   2208   gpu::CommandHeader header;
   2209   uint32 cap;
   2210 };
   2211 
   2212 COMPILE_ASSERT(sizeof(Enable) == 8,
   2213                Sizeof_Enable_is_not_8);
   2214 COMPILE_ASSERT(offsetof(Enable, header) == 0,
   2215                OffsetOf_Enable_header_not_0);
   2216 COMPILE_ASSERT(offsetof(Enable, cap) == 4,
   2217                OffsetOf_Enable_cap_not_4);
   2218 
   2219 struct EnableVertexAttribArray {
   2220   typedef EnableVertexAttribArray ValueType;
   2221   static const CommandId kCmdId = kEnableVertexAttribArray;
   2222   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2223 
   2224   static uint32 ComputeSize() {
   2225     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2226   }
   2227 
   2228   void SetHeader() {
   2229     header.SetCmd<ValueType>();
   2230   }
   2231 
   2232   void Init(GLuint _index) {
   2233     SetHeader();
   2234     index = _index;
   2235   }
   2236 
   2237   void* Set(void* cmd, GLuint _index) {
   2238     static_cast<ValueType*>(cmd)->Init(_index);
   2239     return NextCmdAddress<ValueType>(cmd);
   2240   }
   2241 
   2242   gpu::CommandHeader header;
   2243   uint32 index;
   2244 };
   2245 
   2246 COMPILE_ASSERT(sizeof(EnableVertexAttribArray) == 8,
   2247                Sizeof_EnableVertexAttribArray_is_not_8);
   2248 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, header) == 0,
   2249                OffsetOf_EnableVertexAttribArray_header_not_0);
   2250 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, index) == 4,
   2251                OffsetOf_EnableVertexAttribArray_index_not_4);
   2252 
   2253 struct Finish {
   2254   typedef Finish ValueType;
   2255   static const CommandId kCmdId = kFinish;
   2256   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2257 
   2258   static uint32 ComputeSize() {
   2259     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2260   }
   2261 
   2262   void SetHeader() {
   2263     header.SetCmd<ValueType>();
   2264   }
   2265 
   2266   void Init() {
   2267     SetHeader();
   2268   }
   2269 
   2270   void* Set(void* cmd) {
   2271     static_cast<ValueType*>(cmd)->Init();
   2272     return NextCmdAddress<ValueType>(cmd);
   2273   }
   2274 
   2275   gpu::CommandHeader header;
   2276 };
   2277 
   2278 COMPILE_ASSERT(sizeof(Finish) == 4,
   2279                Sizeof_Finish_is_not_4);
   2280 COMPILE_ASSERT(offsetof(Finish, header) == 0,
   2281                OffsetOf_Finish_header_not_0);
   2282 
   2283 struct Flush {
   2284   typedef Flush ValueType;
   2285   static const CommandId kCmdId = kFlush;
   2286   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2287 
   2288   static uint32 ComputeSize() {
   2289     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2290   }
   2291 
   2292   void SetHeader() {
   2293     header.SetCmd<ValueType>();
   2294   }
   2295 
   2296   void Init() {
   2297     SetHeader();
   2298   }
   2299 
   2300   void* Set(void* cmd) {
   2301     static_cast<ValueType*>(cmd)->Init();
   2302     return NextCmdAddress<ValueType>(cmd);
   2303   }
   2304 
   2305   gpu::CommandHeader header;
   2306 };
   2307 
   2308 COMPILE_ASSERT(sizeof(Flush) == 4,
   2309                Sizeof_Flush_is_not_4);
   2310 COMPILE_ASSERT(offsetof(Flush, header) == 0,
   2311                OffsetOf_Flush_header_not_0);
   2312 
   2313 struct FramebufferRenderbuffer {
   2314   typedef FramebufferRenderbuffer ValueType;
   2315   static const CommandId kCmdId = kFramebufferRenderbuffer;
   2316   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2317 
   2318   static uint32 ComputeSize() {
   2319     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2320   }
   2321 
   2322   void SetHeader() {
   2323     header.SetCmd<ValueType>();
   2324   }
   2325 
   2326   void Init(
   2327       GLenum _target, GLenum _attachment, GLenum _renderbuffertarget,
   2328       GLuint _renderbuffer) {
   2329     SetHeader();
   2330     target = _target;
   2331     attachment = _attachment;
   2332     renderbuffertarget = _renderbuffertarget;
   2333     renderbuffer = _renderbuffer;
   2334   }
   2335 
   2336   void* Set(
   2337       void* cmd, GLenum _target, GLenum _attachment, GLenum _renderbuffertarget,
   2338       GLuint _renderbuffer) {
   2339     static_cast<ValueType*>(
   2340         cmd)->Init(_target, _attachment, _renderbuffertarget, _renderbuffer);
   2341     return NextCmdAddress<ValueType>(cmd);
   2342   }
   2343 
   2344   gpu::CommandHeader header;
   2345   uint32 target;
   2346   uint32 attachment;
   2347   uint32 renderbuffertarget;
   2348   uint32 renderbuffer;
   2349 };
   2350 
   2351 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer) == 20,
   2352                Sizeof_FramebufferRenderbuffer_is_not_20);
   2353 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, header) == 0,
   2354                OffsetOf_FramebufferRenderbuffer_header_not_0);
   2355 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, target) == 4,
   2356                OffsetOf_FramebufferRenderbuffer_target_not_4);
   2357 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, attachment) == 8,
   2358                OffsetOf_FramebufferRenderbuffer_attachment_not_8);
   2359 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12,
   2360                OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12);
   2361 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffer) == 16,
   2362                OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16);
   2363 
   2364 struct FramebufferTexture2D {
   2365   typedef FramebufferTexture2D ValueType;
   2366   static const CommandId kCmdId = kFramebufferTexture2D;
   2367   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2368 
   2369   static uint32 ComputeSize() {
   2370     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2371   }
   2372 
   2373   void SetHeader() {
   2374     header.SetCmd<ValueType>();
   2375   }
   2376 
   2377   void Init(
   2378       GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture,
   2379       GLint _level) {
   2380     SetHeader();
   2381     target = _target;
   2382     attachment = _attachment;
   2383     textarget = _textarget;
   2384     texture = _texture;
   2385     level = _level;
   2386   }
   2387 
   2388   void* Set(
   2389       void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget,
   2390       GLuint _texture, GLint _level) {
   2391     static_cast<ValueType*>(
   2392         cmd)->Init(_target, _attachment, _textarget, _texture, _level);
   2393     return NextCmdAddress<ValueType>(cmd);
   2394   }
   2395 
   2396   gpu::CommandHeader header;
   2397   uint32 target;
   2398   uint32 attachment;
   2399   uint32 textarget;
   2400   uint32 texture;
   2401   int32 level;
   2402 };
   2403 
   2404 COMPILE_ASSERT(sizeof(FramebufferTexture2D) == 24,
   2405                Sizeof_FramebufferTexture2D_is_not_24);
   2406 COMPILE_ASSERT(offsetof(FramebufferTexture2D, header) == 0,
   2407                OffsetOf_FramebufferTexture2D_header_not_0);
   2408 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4,
   2409                OffsetOf_FramebufferTexture2D_target_not_4);
   2410 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8,
   2411                OffsetOf_FramebufferTexture2D_attachment_not_8);
   2412 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12,
   2413                OffsetOf_FramebufferTexture2D_textarget_not_12);
   2414 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16,
   2415                OffsetOf_FramebufferTexture2D_texture_not_16);
   2416 COMPILE_ASSERT(offsetof(FramebufferTexture2D, level) == 20,
   2417                OffsetOf_FramebufferTexture2D_level_not_20);
   2418 
   2419 struct FrontFace {
   2420   typedef FrontFace ValueType;
   2421   static const CommandId kCmdId = kFrontFace;
   2422   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2423 
   2424   static uint32 ComputeSize() {
   2425     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2426   }
   2427 
   2428   void SetHeader() {
   2429     header.SetCmd<ValueType>();
   2430   }
   2431 
   2432   void Init(GLenum _mode) {
   2433     SetHeader();
   2434     mode = _mode;
   2435   }
   2436 
   2437   void* Set(void* cmd, GLenum _mode) {
   2438     static_cast<ValueType*>(cmd)->Init(_mode);
   2439     return NextCmdAddress<ValueType>(cmd);
   2440   }
   2441 
   2442   gpu::CommandHeader header;
   2443   uint32 mode;
   2444 };
   2445 
   2446 COMPILE_ASSERT(sizeof(FrontFace) == 8,
   2447                Sizeof_FrontFace_is_not_8);
   2448 COMPILE_ASSERT(offsetof(FrontFace, header) == 0,
   2449                OffsetOf_FrontFace_header_not_0);
   2450 COMPILE_ASSERT(offsetof(FrontFace, mode) == 4,
   2451                OffsetOf_FrontFace_mode_not_4);
   2452 
   2453 struct GenBuffers {
   2454   typedef GenBuffers ValueType;
   2455   static const CommandId kCmdId = kGenBuffers;
   2456   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2457 
   2458   static uint32 ComputeSize() {
   2459     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2460   }
   2461 
   2462   void SetHeader() {
   2463     header.SetCmd<ValueType>();
   2464   }
   2465 
   2466   void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) {
   2467     SetHeader();
   2468     n = _n;
   2469     buffers_shm_id = _buffers_shm_id;
   2470     buffers_shm_offset = _buffers_shm_offset;
   2471   }
   2472 
   2473   void* Set(
   2474       void* cmd, GLsizei _n, uint32 _buffers_shm_id,
   2475       uint32 _buffers_shm_offset) {
   2476     static_cast<ValueType*>(
   2477         cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset);
   2478     return NextCmdAddress<ValueType>(cmd);
   2479   }
   2480 
   2481   gpu::CommandHeader header;
   2482   int32 n;
   2483   uint32 buffers_shm_id;
   2484   uint32 buffers_shm_offset;
   2485 };
   2486 
   2487 COMPILE_ASSERT(sizeof(GenBuffers) == 16,
   2488                Sizeof_GenBuffers_is_not_16);
   2489 COMPILE_ASSERT(offsetof(GenBuffers, header) == 0,
   2490                OffsetOf_GenBuffers_header_not_0);
   2491 COMPILE_ASSERT(offsetof(GenBuffers, n) == 4,
   2492                OffsetOf_GenBuffers_n_not_4);
   2493 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_id) == 8,
   2494                OffsetOf_GenBuffers_buffers_shm_id_not_8);
   2495 COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_offset) == 12,
   2496                OffsetOf_GenBuffers_buffers_shm_offset_not_12);
   2497 
   2498 struct GenBuffersImmediate {
   2499   typedef GenBuffersImmediate ValueType;
   2500   static const CommandId kCmdId = kGenBuffersImmediate;
   2501   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   2502 
   2503   static uint32 ComputeDataSize(GLsizei n) {
   2504     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   2505   }
   2506 
   2507   static uint32 ComputeSize(GLsizei n) {
   2508     return static_cast<uint32>(
   2509         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   2510   }
   2511 
   2512   void SetHeader(GLsizei n) {
   2513     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   2514   }
   2515 
   2516   void Init(GLsizei _n, GLuint* _buffers) {
   2517     SetHeader(_n);
   2518     n = _n;
   2519     memcpy(ImmediateDataAddress(this),
   2520            _buffers, ComputeDataSize(_n));
   2521   }
   2522 
   2523   void* Set(void* cmd, GLsizei _n, GLuint* _buffers) {
   2524     static_cast<ValueType*>(cmd)->Init(_n, _buffers);
   2525     const uint32 size = ComputeSize(_n);
   2526     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   2527   }
   2528 
   2529   gpu::CommandHeader header;
   2530   int32 n;
   2531 };
   2532 
   2533 COMPILE_ASSERT(sizeof(GenBuffersImmediate) == 8,
   2534                Sizeof_GenBuffersImmediate_is_not_8);
   2535 COMPILE_ASSERT(offsetof(GenBuffersImmediate, header) == 0,
   2536                OffsetOf_GenBuffersImmediate_header_not_0);
   2537 COMPILE_ASSERT(offsetof(GenBuffersImmediate, n) == 4,
   2538                OffsetOf_GenBuffersImmediate_n_not_4);
   2539 
   2540 struct GenerateMipmap {
   2541   typedef GenerateMipmap ValueType;
   2542   static const CommandId kCmdId = kGenerateMipmap;
   2543   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2544 
   2545   static uint32 ComputeSize() {
   2546     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2547   }
   2548 
   2549   void SetHeader() {
   2550     header.SetCmd<ValueType>();
   2551   }
   2552 
   2553   void Init(GLenum _target) {
   2554     SetHeader();
   2555     target = _target;
   2556   }
   2557 
   2558   void* Set(void* cmd, GLenum _target) {
   2559     static_cast<ValueType*>(cmd)->Init(_target);
   2560     return NextCmdAddress<ValueType>(cmd);
   2561   }
   2562 
   2563   gpu::CommandHeader header;
   2564   uint32 target;
   2565 };
   2566 
   2567 COMPILE_ASSERT(sizeof(GenerateMipmap) == 8,
   2568                Sizeof_GenerateMipmap_is_not_8);
   2569 COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0,
   2570                OffsetOf_GenerateMipmap_header_not_0);
   2571 COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4,
   2572                OffsetOf_GenerateMipmap_target_not_4);
   2573 
   2574 struct GenFramebuffers {
   2575   typedef GenFramebuffers ValueType;
   2576   static const CommandId kCmdId = kGenFramebuffers;
   2577   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2578 
   2579   static uint32 ComputeSize() {
   2580     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2581   }
   2582 
   2583   void SetHeader() {
   2584     header.SetCmd<ValueType>();
   2585   }
   2586 
   2587   void Init(
   2588       GLsizei _n, uint32 _framebuffers_shm_id,
   2589       uint32 _framebuffers_shm_offset) {
   2590     SetHeader();
   2591     n = _n;
   2592     framebuffers_shm_id = _framebuffers_shm_id;
   2593     framebuffers_shm_offset = _framebuffers_shm_offset;
   2594   }
   2595 
   2596   void* Set(
   2597       void* cmd, GLsizei _n, uint32 _framebuffers_shm_id,
   2598       uint32 _framebuffers_shm_offset) {
   2599     static_cast<ValueType*>(
   2600         cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset);
   2601     return NextCmdAddress<ValueType>(cmd);
   2602   }
   2603 
   2604   gpu::CommandHeader header;
   2605   int32 n;
   2606   uint32 framebuffers_shm_id;
   2607   uint32 framebuffers_shm_offset;
   2608 };
   2609 
   2610 COMPILE_ASSERT(sizeof(GenFramebuffers) == 16,
   2611                Sizeof_GenFramebuffers_is_not_16);
   2612 COMPILE_ASSERT(offsetof(GenFramebuffers, header) == 0,
   2613                OffsetOf_GenFramebuffers_header_not_0);
   2614 COMPILE_ASSERT(offsetof(GenFramebuffers, n) == 4,
   2615                OffsetOf_GenFramebuffers_n_not_4);
   2616 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_id) == 8,
   2617                OffsetOf_GenFramebuffers_framebuffers_shm_id_not_8);
   2618 COMPILE_ASSERT(offsetof(GenFramebuffers, framebuffers_shm_offset) == 12,
   2619                OffsetOf_GenFramebuffers_framebuffers_shm_offset_not_12);
   2620 
   2621 struct GenFramebuffersImmediate {
   2622   typedef GenFramebuffersImmediate ValueType;
   2623   static const CommandId kCmdId = kGenFramebuffersImmediate;
   2624   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   2625 
   2626   static uint32 ComputeDataSize(GLsizei n) {
   2627     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   2628   }
   2629 
   2630   static uint32 ComputeSize(GLsizei n) {
   2631     return static_cast<uint32>(
   2632         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   2633   }
   2634 
   2635   void SetHeader(GLsizei n) {
   2636     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   2637   }
   2638 
   2639   void Init(GLsizei _n, GLuint* _framebuffers) {
   2640     SetHeader(_n);
   2641     n = _n;
   2642     memcpy(ImmediateDataAddress(this),
   2643            _framebuffers, ComputeDataSize(_n));
   2644   }
   2645 
   2646   void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) {
   2647     static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
   2648     const uint32 size = ComputeSize(_n);
   2649     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   2650   }
   2651 
   2652   gpu::CommandHeader header;
   2653   int32 n;
   2654 };
   2655 
   2656 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate) == 8,
   2657                Sizeof_GenFramebuffersImmediate_is_not_8);
   2658 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, header) == 0,
   2659                OffsetOf_GenFramebuffersImmediate_header_not_0);
   2660 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, n) == 4,
   2661                OffsetOf_GenFramebuffersImmediate_n_not_4);
   2662 
   2663 struct GenRenderbuffers {
   2664   typedef GenRenderbuffers ValueType;
   2665   static const CommandId kCmdId = kGenRenderbuffers;
   2666   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2667 
   2668   static uint32 ComputeSize() {
   2669     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2670   }
   2671 
   2672   void SetHeader() {
   2673     header.SetCmd<ValueType>();
   2674   }
   2675 
   2676   void Init(
   2677       GLsizei _n, uint32 _renderbuffers_shm_id,
   2678       uint32 _renderbuffers_shm_offset) {
   2679     SetHeader();
   2680     n = _n;
   2681     renderbuffers_shm_id = _renderbuffers_shm_id;
   2682     renderbuffers_shm_offset = _renderbuffers_shm_offset;
   2683   }
   2684 
   2685   void* Set(
   2686       void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id,
   2687       uint32 _renderbuffers_shm_offset) {
   2688     static_cast<ValueType*>(
   2689         cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset);
   2690     return NextCmdAddress<ValueType>(cmd);
   2691   }
   2692 
   2693   gpu::CommandHeader header;
   2694   int32 n;
   2695   uint32 renderbuffers_shm_id;
   2696   uint32 renderbuffers_shm_offset;
   2697 };
   2698 
   2699 COMPILE_ASSERT(sizeof(GenRenderbuffers) == 16,
   2700                Sizeof_GenRenderbuffers_is_not_16);
   2701 COMPILE_ASSERT(offsetof(GenRenderbuffers, header) == 0,
   2702                OffsetOf_GenRenderbuffers_header_not_0);
   2703 COMPILE_ASSERT(offsetof(GenRenderbuffers, n) == 4,
   2704                OffsetOf_GenRenderbuffers_n_not_4);
   2705 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_id) == 8,
   2706                OffsetOf_GenRenderbuffers_renderbuffers_shm_id_not_8);
   2707 COMPILE_ASSERT(offsetof(GenRenderbuffers, renderbuffers_shm_offset) == 12,
   2708                OffsetOf_GenRenderbuffers_renderbuffers_shm_offset_not_12);
   2709 
   2710 struct GenRenderbuffersImmediate {
   2711   typedef GenRenderbuffersImmediate ValueType;
   2712   static const CommandId kCmdId = kGenRenderbuffersImmediate;
   2713   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   2714 
   2715   static uint32 ComputeDataSize(GLsizei n) {
   2716     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   2717   }
   2718 
   2719   static uint32 ComputeSize(GLsizei n) {
   2720     return static_cast<uint32>(
   2721         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   2722   }
   2723 
   2724   void SetHeader(GLsizei n) {
   2725     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   2726   }
   2727 
   2728   void Init(GLsizei _n, GLuint* _renderbuffers) {
   2729     SetHeader(_n);
   2730     n = _n;
   2731     memcpy(ImmediateDataAddress(this),
   2732            _renderbuffers, ComputeDataSize(_n));
   2733   }
   2734 
   2735   void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) {
   2736     static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
   2737     const uint32 size = ComputeSize(_n);
   2738     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   2739   }
   2740 
   2741   gpu::CommandHeader header;
   2742   int32 n;
   2743 };
   2744 
   2745 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8,
   2746                Sizeof_GenRenderbuffersImmediate_is_not_8);
   2747 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0,
   2748                OffsetOf_GenRenderbuffersImmediate_header_not_0);
   2749 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4,
   2750                OffsetOf_GenRenderbuffersImmediate_n_not_4);
   2751 
   2752 struct GenTextures {
   2753   typedef GenTextures ValueType;
   2754   static const CommandId kCmdId = kGenTextures;
   2755   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2756 
   2757   static uint32 ComputeSize() {
   2758     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2759   }
   2760 
   2761   void SetHeader() {
   2762     header.SetCmd<ValueType>();
   2763   }
   2764 
   2765   void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) {
   2766     SetHeader();
   2767     n = _n;
   2768     textures_shm_id = _textures_shm_id;
   2769     textures_shm_offset = _textures_shm_offset;
   2770   }
   2771 
   2772   void* Set(
   2773       void* cmd, GLsizei _n, uint32 _textures_shm_id,
   2774       uint32 _textures_shm_offset) {
   2775     static_cast<ValueType*>(
   2776         cmd)->Init(_n, _textures_shm_id, _textures_shm_offset);
   2777     return NextCmdAddress<ValueType>(cmd);
   2778   }
   2779 
   2780   gpu::CommandHeader header;
   2781   int32 n;
   2782   uint32 textures_shm_id;
   2783   uint32 textures_shm_offset;
   2784 };
   2785 
   2786 COMPILE_ASSERT(sizeof(GenTextures) == 16,
   2787                Sizeof_GenTextures_is_not_16);
   2788 COMPILE_ASSERT(offsetof(GenTextures, header) == 0,
   2789                OffsetOf_GenTextures_header_not_0);
   2790 COMPILE_ASSERT(offsetof(GenTextures, n) == 4,
   2791                OffsetOf_GenTextures_n_not_4);
   2792 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_id) == 8,
   2793                OffsetOf_GenTextures_textures_shm_id_not_8);
   2794 COMPILE_ASSERT(offsetof(GenTextures, textures_shm_offset) == 12,
   2795                OffsetOf_GenTextures_textures_shm_offset_not_12);
   2796 
   2797 struct GenTexturesImmediate {
   2798   typedef GenTexturesImmediate ValueType;
   2799   static const CommandId kCmdId = kGenTexturesImmediate;
   2800   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   2801 
   2802   static uint32 ComputeDataSize(GLsizei n) {
   2803     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   2804   }
   2805 
   2806   static uint32 ComputeSize(GLsizei n) {
   2807     return static_cast<uint32>(
   2808         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   2809   }
   2810 
   2811   void SetHeader(GLsizei n) {
   2812     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   2813   }
   2814 
   2815   void Init(GLsizei _n, GLuint* _textures) {
   2816     SetHeader(_n);
   2817     n = _n;
   2818     memcpy(ImmediateDataAddress(this),
   2819            _textures, ComputeDataSize(_n));
   2820   }
   2821 
   2822   void* Set(void* cmd, GLsizei _n, GLuint* _textures) {
   2823     static_cast<ValueType*>(cmd)->Init(_n, _textures);
   2824     const uint32 size = ComputeSize(_n);
   2825     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   2826   }
   2827 
   2828   gpu::CommandHeader header;
   2829   int32 n;
   2830 };
   2831 
   2832 COMPILE_ASSERT(sizeof(GenTexturesImmediate) == 8,
   2833                Sizeof_GenTexturesImmediate_is_not_8);
   2834 COMPILE_ASSERT(offsetof(GenTexturesImmediate, header) == 0,
   2835                OffsetOf_GenTexturesImmediate_header_not_0);
   2836 COMPILE_ASSERT(offsetof(GenTexturesImmediate, n) == 4,
   2837                OffsetOf_GenTexturesImmediate_n_not_4);
   2838 
   2839 struct GetActiveAttrib {
   2840   typedef GetActiveAttrib ValueType;
   2841   static const CommandId kCmdId = kGetActiveAttrib;
   2842   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2843 
   2844   struct Result {
   2845     int32 success;
   2846     int32 size;
   2847     uint32 type;
   2848   };
   2849 
   2850   static uint32 ComputeSize() {
   2851     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2852   }
   2853 
   2854   void SetHeader() {
   2855     header.SetCmd<ValueType>();
   2856   }
   2857 
   2858   void Init(
   2859       GLuint _program, GLuint _index, uint32 _name_bucket_id,
   2860       uint32 _result_shm_id, uint32 _result_shm_offset) {
   2861     SetHeader();
   2862     program = _program;
   2863     index = _index;
   2864     name_bucket_id = _name_bucket_id;
   2865     result_shm_id = _result_shm_id;
   2866     result_shm_offset = _result_shm_offset;
   2867   }
   2868 
   2869   void* Set(
   2870       void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id,
   2871       uint32 _result_shm_id, uint32 _result_shm_offset) {
   2872     static_cast<ValueType*>(
   2873         cmd)->Init(
   2874             _program, _index, _name_bucket_id, _result_shm_id,
   2875             _result_shm_offset);
   2876     return NextCmdAddress<ValueType>(cmd);
   2877   }
   2878 
   2879   gpu::CommandHeader header;
   2880   uint32 program;
   2881   uint32 index;
   2882   uint32 name_bucket_id;
   2883   uint32 result_shm_id;
   2884   uint32 result_shm_offset;
   2885 };
   2886 
   2887 COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24,
   2888                Sizeof_GetActiveAttrib_is_not_24);
   2889 COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0,
   2890                OffsetOf_GetActiveAttrib_header_not_0);
   2891 COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4,
   2892                OffsetOf_GetActiveAttrib_program_not_4);
   2893 COMPILE_ASSERT(offsetof(GetActiveAttrib, index) == 8,
   2894                OffsetOf_GetActiveAttrib_index_not_8);
   2895 COMPILE_ASSERT(offsetof(GetActiveAttrib, name_bucket_id) == 12,
   2896                OffsetOf_GetActiveAttrib_name_bucket_id_not_12);
   2897 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_id) == 16,
   2898                OffsetOf_GetActiveAttrib_result_shm_id_not_16);
   2899 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_offset) == 20,
   2900                OffsetOf_GetActiveAttrib_result_shm_offset_not_20);
   2901 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, success) == 0,
   2902                OffsetOf_GetActiveAttrib_Result_success_not_0);
   2903 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, size) == 4,
   2904                OffsetOf_GetActiveAttrib_Result_size_not_4);
   2905 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, type) == 8,
   2906                OffsetOf_GetActiveAttrib_Result_type_not_8);
   2907 
   2908 struct GetActiveUniform {
   2909   typedef GetActiveUniform ValueType;
   2910   static const CommandId kCmdId = kGetActiveUniform;
   2911   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2912 
   2913   struct Result {
   2914     int32 success;
   2915     int32 size;
   2916     uint32 type;
   2917   };
   2918 
   2919   static uint32 ComputeSize() {
   2920     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2921   }
   2922 
   2923   void SetHeader() {
   2924     header.SetCmd<ValueType>();
   2925   }
   2926 
   2927   void Init(
   2928       GLuint _program, GLuint _index, uint32 _name_bucket_id,
   2929       uint32 _result_shm_id, uint32 _result_shm_offset) {
   2930     SetHeader();
   2931     program = _program;
   2932     index = _index;
   2933     name_bucket_id = _name_bucket_id;
   2934     result_shm_id = _result_shm_id;
   2935     result_shm_offset = _result_shm_offset;
   2936   }
   2937 
   2938   void* Set(
   2939       void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id,
   2940       uint32 _result_shm_id, uint32 _result_shm_offset) {
   2941     static_cast<ValueType*>(
   2942         cmd)->Init(
   2943             _program, _index, _name_bucket_id, _result_shm_id,
   2944             _result_shm_offset);
   2945     return NextCmdAddress<ValueType>(cmd);
   2946   }
   2947 
   2948   gpu::CommandHeader header;
   2949   uint32 program;
   2950   uint32 index;
   2951   uint32 name_bucket_id;
   2952   uint32 result_shm_id;
   2953   uint32 result_shm_offset;
   2954 };
   2955 
   2956 COMPILE_ASSERT(sizeof(GetActiveUniform) == 24,
   2957                Sizeof_GetActiveUniform_is_not_24);
   2958 COMPILE_ASSERT(offsetof(GetActiveUniform, header) == 0,
   2959                OffsetOf_GetActiveUniform_header_not_0);
   2960 COMPILE_ASSERT(offsetof(GetActiveUniform, program) == 4,
   2961                OffsetOf_GetActiveUniform_program_not_4);
   2962 COMPILE_ASSERT(offsetof(GetActiveUniform, index) == 8,
   2963                OffsetOf_GetActiveUniform_index_not_8);
   2964 COMPILE_ASSERT(offsetof(GetActiveUniform, name_bucket_id) == 12,
   2965                OffsetOf_GetActiveUniform_name_bucket_id_not_12);
   2966 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_id) == 16,
   2967                OffsetOf_GetActiveUniform_result_shm_id_not_16);
   2968 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_offset) == 20,
   2969                OffsetOf_GetActiveUniform_result_shm_offset_not_20);
   2970 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, success) == 0,
   2971                OffsetOf_GetActiveUniform_Result_success_not_0);
   2972 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, size) == 4,
   2973                OffsetOf_GetActiveUniform_Result_size_not_4);
   2974 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, type) == 8,
   2975                OffsetOf_GetActiveUniform_Result_type_not_8);
   2976 
   2977 struct GetAttachedShaders {
   2978   typedef GetAttachedShaders ValueType;
   2979   static const CommandId kCmdId = kGetAttachedShaders;
   2980   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   2981 
   2982   typedef SizedResult<GLuint> Result;
   2983 
   2984   static uint32 ComputeSize() {
   2985     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   2986   }
   2987 
   2988   void SetHeader() {
   2989     header.SetCmd<ValueType>();
   2990   }
   2991 
   2992   void Init(
   2993       GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset,
   2994       uint32 _result_size) {
   2995     SetHeader();
   2996     program = _program;
   2997     result_shm_id = _result_shm_id;
   2998     result_shm_offset = _result_shm_offset;
   2999     result_size = _result_size;
   3000   }
   3001 
   3002   void* Set(
   3003       void* cmd, GLuint _program, uint32 _result_shm_id,
   3004       uint32 _result_shm_offset, uint32 _result_size) {
   3005     static_cast<ValueType*>(
   3006         cmd)->Init(_program, _result_shm_id, _result_shm_offset, _result_size);
   3007     return NextCmdAddress<ValueType>(cmd);
   3008   }
   3009 
   3010   gpu::CommandHeader header;
   3011   uint32 program;
   3012   uint32 result_shm_id;
   3013   uint32 result_shm_offset;
   3014   uint32 result_size;
   3015 };
   3016 
   3017 COMPILE_ASSERT(sizeof(GetAttachedShaders) == 20,
   3018                Sizeof_GetAttachedShaders_is_not_20);
   3019 COMPILE_ASSERT(offsetof(GetAttachedShaders, header) == 0,
   3020                OffsetOf_GetAttachedShaders_header_not_0);
   3021 COMPILE_ASSERT(offsetof(GetAttachedShaders, program) == 4,
   3022                OffsetOf_GetAttachedShaders_program_not_4);
   3023 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_id) == 8,
   3024                OffsetOf_GetAttachedShaders_result_shm_id_not_8);
   3025 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_offset) == 12,
   3026                OffsetOf_GetAttachedShaders_result_shm_offset_not_12);
   3027 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_size) == 16,
   3028                OffsetOf_GetAttachedShaders_result_size_not_16);
   3029 
   3030 struct GetBooleanv {
   3031   typedef GetBooleanv ValueType;
   3032   static const CommandId kCmdId = kGetBooleanv;
   3033   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3034 
   3035   typedef SizedResult<GLboolean> Result;
   3036 
   3037   static uint32 ComputeSize() {
   3038     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3039   }
   3040 
   3041   void SetHeader() {
   3042     header.SetCmd<ValueType>();
   3043   }
   3044 
   3045   void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
   3046     SetHeader();
   3047     pname = _pname;
   3048     params_shm_id = _params_shm_id;
   3049     params_shm_offset = _params_shm_offset;
   3050   }
   3051 
   3052   void* Set(
   3053       void* cmd, GLenum _pname, uint32 _params_shm_id,
   3054       uint32 _params_shm_offset) {
   3055     static_cast<ValueType*>(
   3056         cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
   3057     return NextCmdAddress<ValueType>(cmd);
   3058   }
   3059 
   3060   gpu::CommandHeader header;
   3061   uint32 pname;
   3062   uint32 params_shm_id;
   3063   uint32 params_shm_offset;
   3064 };
   3065 
   3066 COMPILE_ASSERT(sizeof(GetBooleanv) == 16,
   3067                Sizeof_GetBooleanv_is_not_16);
   3068 COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0,
   3069                OffsetOf_GetBooleanv_header_not_0);
   3070 COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4,
   3071                OffsetOf_GetBooleanv_pname_not_4);
   3072 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_id) == 8,
   3073                OffsetOf_GetBooleanv_params_shm_id_not_8);
   3074 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_offset) == 12,
   3075                OffsetOf_GetBooleanv_params_shm_offset_not_12);
   3076 
   3077 struct GetBufferParameteriv {
   3078   typedef GetBufferParameteriv ValueType;
   3079   static const CommandId kCmdId = kGetBufferParameteriv;
   3080   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3081 
   3082   typedef SizedResult<GLint> Result;
   3083 
   3084   static uint32 ComputeSize() {
   3085     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3086   }
   3087 
   3088   void SetHeader() {
   3089     header.SetCmd<ValueType>();
   3090   }
   3091 
   3092   void Init(
   3093       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3094       uint32 _params_shm_offset) {
   3095     SetHeader();
   3096     target = _target;
   3097     pname = _pname;
   3098     params_shm_id = _params_shm_id;
   3099     params_shm_offset = _params_shm_offset;
   3100   }
   3101 
   3102   void* Set(
   3103       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3104       uint32 _params_shm_offset) {
   3105     static_cast<ValueType*>(
   3106         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   3107     return NextCmdAddress<ValueType>(cmd);
   3108   }
   3109 
   3110   gpu::CommandHeader header;
   3111   uint32 target;
   3112   uint32 pname;
   3113   uint32 params_shm_id;
   3114   uint32 params_shm_offset;
   3115 };
   3116 
   3117 COMPILE_ASSERT(sizeof(GetBufferParameteriv) == 20,
   3118                Sizeof_GetBufferParameteriv_is_not_20);
   3119 COMPILE_ASSERT(offsetof(GetBufferParameteriv, header) == 0,
   3120                OffsetOf_GetBufferParameteriv_header_not_0);
   3121 COMPILE_ASSERT(offsetof(GetBufferParameteriv, target) == 4,
   3122                OffsetOf_GetBufferParameteriv_target_not_4);
   3123 COMPILE_ASSERT(offsetof(GetBufferParameteriv, pname) == 8,
   3124                OffsetOf_GetBufferParameteriv_pname_not_8);
   3125 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_id) == 12,
   3126                OffsetOf_GetBufferParameteriv_params_shm_id_not_12);
   3127 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_offset) == 16,
   3128                OffsetOf_GetBufferParameteriv_params_shm_offset_not_16);
   3129 
   3130 struct GetError {
   3131   typedef GetError ValueType;
   3132   static const CommandId kCmdId = kGetError;
   3133   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3134 
   3135   typedef GLenum Result;
   3136 
   3137   static uint32 ComputeSize() {
   3138     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3139   }
   3140 
   3141   void SetHeader() {
   3142     header.SetCmd<ValueType>();
   3143   }
   3144 
   3145   void Init(uint32 _result_shm_id, uint32 _result_shm_offset) {
   3146     SetHeader();
   3147     result_shm_id = _result_shm_id;
   3148     result_shm_offset = _result_shm_offset;
   3149   }
   3150 
   3151   void* Set(void* cmd, uint32 _result_shm_id, uint32 _result_shm_offset) {
   3152     static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset);
   3153     return NextCmdAddress<ValueType>(cmd);
   3154   }
   3155 
   3156   gpu::CommandHeader header;
   3157   uint32 result_shm_id;
   3158   uint32 result_shm_offset;
   3159 };
   3160 
   3161 COMPILE_ASSERT(sizeof(GetError) == 12,
   3162                Sizeof_GetError_is_not_12);
   3163 COMPILE_ASSERT(offsetof(GetError, header) == 0,
   3164                OffsetOf_GetError_header_not_0);
   3165 COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4,
   3166                OffsetOf_GetError_result_shm_id_not_4);
   3167 COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8,
   3168                OffsetOf_GetError_result_shm_offset_not_8);
   3169 
   3170 struct GetFloatv {
   3171   typedef GetFloatv ValueType;
   3172   static const CommandId kCmdId = kGetFloatv;
   3173   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3174 
   3175   typedef SizedResult<GLfloat> Result;
   3176 
   3177   static uint32 ComputeSize() {
   3178     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3179   }
   3180 
   3181   void SetHeader() {
   3182     header.SetCmd<ValueType>();
   3183   }
   3184 
   3185   void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
   3186     SetHeader();
   3187     pname = _pname;
   3188     params_shm_id = _params_shm_id;
   3189     params_shm_offset = _params_shm_offset;
   3190   }
   3191 
   3192   void* Set(
   3193       void* cmd, GLenum _pname, uint32 _params_shm_id,
   3194       uint32 _params_shm_offset) {
   3195     static_cast<ValueType*>(
   3196         cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
   3197     return NextCmdAddress<ValueType>(cmd);
   3198   }
   3199 
   3200   gpu::CommandHeader header;
   3201   uint32 pname;
   3202   uint32 params_shm_id;
   3203   uint32 params_shm_offset;
   3204 };
   3205 
   3206 COMPILE_ASSERT(sizeof(GetFloatv) == 16,
   3207                Sizeof_GetFloatv_is_not_16);
   3208 COMPILE_ASSERT(offsetof(GetFloatv, header) == 0,
   3209                OffsetOf_GetFloatv_header_not_0);
   3210 COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4,
   3211                OffsetOf_GetFloatv_pname_not_4);
   3212 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8,
   3213                OffsetOf_GetFloatv_params_shm_id_not_8);
   3214 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12,
   3215                OffsetOf_GetFloatv_params_shm_offset_not_12);
   3216 
   3217 struct GetFramebufferAttachmentParameteriv {
   3218   typedef GetFramebufferAttachmentParameteriv ValueType;
   3219   static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
   3220   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3221 
   3222   typedef SizedResult<GLint> Result;
   3223 
   3224   static uint32 ComputeSize() {
   3225     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3226   }
   3227 
   3228   void SetHeader() {
   3229     header.SetCmd<ValueType>();
   3230   }
   3231 
   3232   void Init(
   3233       GLenum _target, GLenum _attachment, GLenum _pname, uint32 _params_shm_id,
   3234       uint32 _params_shm_offset) {
   3235     SetHeader();
   3236     target = _target;
   3237     attachment = _attachment;
   3238     pname = _pname;
   3239     params_shm_id = _params_shm_id;
   3240     params_shm_offset = _params_shm_offset;
   3241   }
   3242 
   3243   void* Set(
   3244       void* cmd, GLenum _target, GLenum _attachment, GLenum _pname,
   3245       uint32 _params_shm_id, uint32 _params_shm_offset) {
   3246     static_cast<ValueType*>(
   3247         cmd)->Init(
   3248             _target, _attachment, _pname, _params_shm_id, _params_shm_offset);
   3249     return NextCmdAddress<ValueType>(cmd);
   3250   }
   3251 
   3252   gpu::CommandHeader header;
   3253   uint32 target;
   3254   uint32 attachment;
   3255   uint32 pname;
   3256   uint32 params_shm_id;
   3257   uint32 params_shm_offset;
   3258 };
   3259 
   3260 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv) == 24,
   3261                Sizeof_GetFramebufferAttachmentParameteriv_is_not_24);
   3262 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, header) == 0,
   3263                OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0);
   3264 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, target) == 4,
   3265                OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4);
   3266 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8,
   3267                OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8);
   3268 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12,
   3269                OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12);
   3270 COMPILE_ASSERT(
   3271     offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16,
   3272                OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16);  // NOLINT
   3273 COMPILE_ASSERT(
   3274     offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20,
   3275                OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20);  // NOLINT
   3276 
   3277 struct GetIntegerv {
   3278   typedef GetIntegerv ValueType;
   3279   static const CommandId kCmdId = kGetIntegerv;
   3280   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3281 
   3282   typedef SizedResult<GLint> Result;
   3283 
   3284   static uint32 ComputeSize() {
   3285     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3286   }
   3287 
   3288   void SetHeader() {
   3289     header.SetCmd<ValueType>();
   3290   }
   3291 
   3292   void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) {
   3293     SetHeader();
   3294     pname = _pname;
   3295     params_shm_id = _params_shm_id;
   3296     params_shm_offset = _params_shm_offset;
   3297   }
   3298 
   3299   void* Set(
   3300       void* cmd, GLenum _pname, uint32 _params_shm_id,
   3301       uint32 _params_shm_offset) {
   3302     static_cast<ValueType*>(
   3303         cmd)->Init(_pname, _params_shm_id, _params_shm_offset);
   3304     return NextCmdAddress<ValueType>(cmd);
   3305   }
   3306 
   3307   gpu::CommandHeader header;
   3308   uint32 pname;
   3309   uint32 params_shm_id;
   3310   uint32 params_shm_offset;
   3311 };
   3312 
   3313 COMPILE_ASSERT(sizeof(GetIntegerv) == 16,
   3314                Sizeof_GetIntegerv_is_not_16);
   3315 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0,
   3316                OffsetOf_GetIntegerv_header_not_0);
   3317 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4,
   3318                OffsetOf_GetIntegerv_pname_not_4);
   3319 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8,
   3320                OffsetOf_GetIntegerv_params_shm_id_not_8);
   3321 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12,
   3322                OffsetOf_GetIntegerv_params_shm_offset_not_12);
   3323 
   3324 struct GetProgramiv {
   3325   typedef GetProgramiv ValueType;
   3326   static const CommandId kCmdId = kGetProgramiv;
   3327   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3328 
   3329   typedef SizedResult<GLint> Result;
   3330 
   3331   static uint32 ComputeSize() {
   3332     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3333   }
   3334 
   3335   void SetHeader() {
   3336     header.SetCmd<ValueType>();
   3337   }
   3338 
   3339   void Init(
   3340       GLuint _program, GLenum _pname, uint32 _params_shm_id,
   3341       uint32 _params_shm_offset) {
   3342     SetHeader();
   3343     program = _program;
   3344     pname = _pname;
   3345     params_shm_id = _params_shm_id;
   3346     params_shm_offset = _params_shm_offset;
   3347   }
   3348 
   3349   void* Set(
   3350       void* cmd, GLuint _program, GLenum _pname, uint32 _params_shm_id,
   3351       uint32 _params_shm_offset) {
   3352     static_cast<ValueType*>(
   3353         cmd)->Init(_program, _pname, _params_shm_id, _params_shm_offset);
   3354     return NextCmdAddress<ValueType>(cmd);
   3355   }
   3356 
   3357   gpu::CommandHeader header;
   3358   uint32 program;
   3359   uint32 pname;
   3360   uint32 params_shm_id;
   3361   uint32 params_shm_offset;
   3362 };
   3363 
   3364 COMPILE_ASSERT(sizeof(GetProgramiv) == 20,
   3365                Sizeof_GetProgramiv_is_not_20);
   3366 COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0,
   3367                OffsetOf_GetProgramiv_header_not_0);
   3368 COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4,
   3369                OffsetOf_GetProgramiv_program_not_4);
   3370 COMPILE_ASSERT(offsetof(GetProgramiv, pname) == 8,
   3371                OffsetOf_GetProgramiv_pname_not_8);
   3372 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_id) == 12,
   3373                OffsetOf_GetProgramiv_params_shm_id_not_12);
   3374 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_offset) == 16,
   3375                OffsetOf_GetProgramiv_params_shm_offset_not_16);
   3376 
   3377 struct GetProgramInfoLog {
   3378   typedef GetProgramInfoLog ValueType;
   3379   static const CommandId kCmdId = kGetProgramInfoLog;
   3380   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3381 
   3382   static uint32 ComputeSize() {
   3383     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3384   }
   3385 
   3386   void SetHeader() {
   3387     header.SetCmd<ValueType>();
   3388   }
   3389 
   3390   void Init(GLuint _program, uint32 _bucket_id) {
   3391     SetHeader();
   3392     program = _program;
   3393     bucket_id = _bucket_id;
   3394   }
   3395 
   3396   void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
   3397     static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
   3398     return NextCmdAddress<ValueType>(cmd);
   3399   }
   3400 
   3401   gpu::CommandHeader header;
   3402   uint32 program;
   3403   uint32 bucket_id;
   3404 };
   3405 
   3406 COMPILE_ASSERT(sizeof(GetProgramInfoLog) == 12,
   3407                Sizeof_GetProgramInfoLog_is_not_12);
   3408 COMPILE_ASSERT(offsetof(GetProgramInfoLog, header) == 0,
   3409                OffsetOf_GetProgramInfoLog_header_not_0);
   3410 COMPILE_ASSERT(offsetof(GetProgramInfoLog, program) == 4,
   3411                OffsetOf_GetProgramInfoLog_program_not_4);
   3412 COMPILE_ASSERT(offsetof(GetProgramInfoLog, bucket_id) == 8,
   3413                OffsetOf_GetProgramInfoLog_bucket_id_not_8);
   3414 
   3415 struct GetRenderbufferParameteriv {
   3416   typedef GetRenderbufferParameteriv ValueType;
   3417   static const CommandId kCmdId = kGetRenderbufferParameteriv;
   3418   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3419 
   3420   typedef SizedResult<GLint> Result;
   3421 
   3422   static uint32 ComputeSize() {
   3423     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3424   }
   3425 
   3426   void SetHeader() {
   3427     header.SetCmd<ValueType>();
   3428   }
   3429 
   3430   void Init(
   3431       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3432       uint32 _params_shm_offset) {
   3433     SetHeader();
   3434     target = _target;
   3435     pname = _pname;
   3436     params_shm_id = _params_shm_id;
   3437     params_shm_offset = _params_shm_offset;
   3438   }
   3439 
   3440   void* Set(
   3441       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3442       uint32 _params_shm_offset) {
   3443     static_cast<ValueType*>(
   3444         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   3445     return NextCmdAddress<ValueType>(cmd);
   3446   }
   3447 
   3448   gpu::CommandHeader header;
   3449   uint32 target;
   3450   uint32 pname;
   3451   uint32 params_shm_id;
   3452   uint32 params_shm_offset;
   3453 };
   3454 
   3455 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv) == 20,
   3456                Sizeof_GetRenderbufferParameteriv_is_not_20);
   3457 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, header) == 0,
   3458                OffsetOf_GetRenderbufferParameteriv_header_not_0);
   3459 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4,
   3460                OffsetOf_GetRenderbufferParameteriv_target_not_4);
   3461 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8,
   3462                OffsetOf_GetRenderbufferParameteriv_pname_not_8);
   3463 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12,
   3464                OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12);
   3465 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16,
   3466                OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16);
   3467 
   3468 struct GetShaderiv {
   3469   typedef GetShaderiv ValueType;
   3470   static const CommandId kCmdId = kGetShaderiv;
   3471   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3472 
   3473   typedef SizedResult<GLint> Result;
   3474 
   3475   static uint32 ComputeSize() {
   3476     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3477   }
   3478 
   3479   void SetHeader() {
   3480     header.SetCmd<ValueType>();
   3481   }
   3482 
   3483   void Init(
   3484       GLuint _shader, GLenum _pname, uint32 _params_shm_id,
   3485       uint32 _params_shm_offset) {
   3486     SetHeader();
   3487     shader = _shader;
   3488     pname = _pname;
   3489     params_shm_id = _params_shm_id;
   3490     params_shm_offset = _params_shm_offset;
   3491   }
   3492 
   3493   void* Set(
   3494       void* cmd, GLuint _shader, GLenum _pname, uint32 _params_shm_id,
   3495       uint32 _params_shm_offset) {
   3496     static_cast<ValueType*>(
   3497         cmd)->Init(_shader, _pname, _params_shm_id, _params_shm_offset);
   3498     return NextCmdAddress<ValueType>(cmd);
   3499   }
   3500 
   3501   gpu::CommandHeader header;
   3502   uint32 shader;
   3503   uint32 pname;
   3504   uint32 params_shm_id;
   3505   uint32 params_shm_offset;
   3506 };
   3507 
   3508 COMPILE_ASSERT(sizeof(GetShaderiv) == 20,
   3509                Sizeof_GetShaderiv_is_not_20);
   3510 COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0,
   3511                OffsetOf_GetShaderiv_header_not_0);
   3512 COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4,
   3513                OffsetOf_GetShaderiv_shader_not_4);
   3514 COMPILE_ASSERT(offsetof(GetShaderiv, pname) == 8,
   3515                OffsetOf_GetShaderiv_pname_not_8);
   3516 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_id) == 12,
   3517                OffsetOf_GetShaderiv_params_shm_id_not_12);
   3518 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_offset) == 16,
   3519                OffsetOf_GetShaderiv_params_shm_offset_not_16);
   3520 
   3521 struct GetShaderInfoLog {
   3522   typedef GetShaderInfoLog ValueType;
   3523   static const CommandId kCmdId = kGetShaderInfoLog;
   3524   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3525 
   3526   static uint32 ComputeSize() {
   3527     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3528   }
   3529 
   3530   void SetHeader() {
   3531     header.SetCmd<ValueType>();
   3532   }
   3533 
   3534   void Init(GLuint _shader, uint32 _bucket_id) {
   3535     SetHeader();
   3536     shader = _shader;
   3537     bucket_id = _bucket_id;
   3538   }
   3539 
   3540   void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
   3541     static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
   3542     return NextCmdAddress<ValueType>(cmd);
   3543   }
   3544 
   3545   gpu::CommandHeader header;
   3546   uint32 shader;
   3547   uint32 bucket_id;
   3548 };
   3549 
   3550 COMPILE_ASSERT(sizeof(GetShaderInfoLog) == 12,
   3551                Sizeof_GetShaderInfoLog_is_not_12);
   3552 COMPILE_ASSERT(offsetof(GetShaderInfoLog, header) == 0,
   3553                OffsetOf_GetShaderInfoLog_header_not_0);
   3554 COMPILE_ASSERT(offsetof(GetShaderInfoLog, shader) == 4,
   3555                OffsetOf_GetShaderInfoLog_shader_not_4);
   3556 COMPILE_ASSERT(offsetof(GetShaderInfoLog, bucket_id) == 8,
   3557                OffsetOf_GetShaderInfoLog_bucket_id_not_8);
   3558 
   3559 struct GetShaderPrecisionFormat {
   3560   typedef GetShaderPrecisionFormat ValueType;
   3561   static const CommandId kCmdId = kGetShaderPrecisionFormat;
   3562   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3563 
   3564   struct Result {
   3565     int32 success;
   3566     int32 min_range;
   3567     int32 max_range;
   3568     int32 precision;
   3569   };
   3570 
   3571   static uint32 ComputeSize() {
   3572     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3573   }
   3574 
   3575   void SetHeader() {
   3576     header.SetCmd<ValueType>();
   3577   }
   3578 
   3579   void Init(
   3580       GLenum _shadertype, GLenum _precisiontype, uint32 _result_shm_id,
   3581       uint32 _result_shm_offset) {
   3582     SetHeader();
   3583     shadertype = _shadertype;
   3584     precisiontype = _precisiontype;
   3585     result_shm_id = _result_shm_id;
   3586     result_shm_offset = _result_shm_offset;
   3587   }
   3588 
   3589   void* Set(
   3590       void* cmd, GLenum _shadertype, GLenum _precisiontype,
   3591       uint32 _result_shm_id, uint32 _result_shm_offset) {
   3592     static_cast<ValueType*>(
   3593         cmd)->Init(
   3594             _shadertype, _precisiontype, _result_shm_id, _result_shm_offset);
   3595     return NextCmdAddress<ValueType>(cmd);
   3596   }
   3597 
   3598   gpu::CommandHeader header;
   3599   uint32 shadertype;
   3600   uint32 precisiontype;
   3601   uint32 result_shm_id;
   3602   uint32 result_shm_offset;
   3603 };
   3604 
   3605 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat) == 20,
   3606                Sizeof_GetShaderPrecisionFormat_is_not_20);
   3607 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, header) == 0,
   3608                OffsetOf_GetShaderPrecisionFormat_header_not_0);
   3609 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, shadertype) == 4,
   3610                OffsetOf_GetShaderPrecisionFormat_shadertype_not_4);
   3611 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, precisiontype) == 8,
   3612                OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8);
   3613 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12,
   3614                OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12);
   3615 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16,
   3616                OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16);
   3617 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, success) == 0,
   3618                OffsetOf_GetShaderPrecisionFormat_Result_success_not_0);
   3619 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4,
   3620                OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4);
   3621 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8,
   3622                OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8);
   3623 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, precision) == 12,
   3624                OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12);
   3625 
   3626 struct GetShaderSource {
   3627   typedef GetShaderSource ValueType;
   3628   static const CommandId kCmdId = kGetShaderSource;
   3629   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3630 
   3631   static uint32 ComputeSize() {
   3632     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3633   }
   3634 
   3635   void SetHeader() {
   3636     header.SetCmd<ValueType>();
   3637   }
   3638 
   3639   void Init(GLuint _shader, uint32 _bucket_id) {
   3640     SetHeader();
   3641     shader = _shader;
   3642     bucket_id = _bucket_id;
   3643   }
   3644 
   3645   void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
   3646     static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
   3647     return NextCmdAddress<ValueType>(cmd);
   3648   }
   3649 
   3650   gpu::CommandHeader header;
   3651   uint32 shader;
   3652   uint32 bucket_id;
   3653 };
   3654 
   3655 COMPILE_ASSERT(sizeof(GetShaderSource) == 12,
   3656                Sizeof_GetShaderSource_is_not_12);
   3657 COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0,
   3658                OffsetOf_GetShaderSource_header_not_0);
   3659 COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4,
   3660                OffsetOf_GetShaderSource_shader_not_4);
   3661 COMPILE_ASSERT(offsetof(GetShaderSource, bucket_id) == 8,
   3662                OffsetOf_GetShaderSource_bucket_id_not_8);
   3663 
   3664 struct GetString {
   3665   typedef GetString ValueType;
   3666   static const CommandId kCmdId = kGetString;
   3667   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3668 
   3669   static uint32 ComputeSize() {
   3670     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3671   }
   3672 
   3673   void SetHeader() {
   3674     header.SetCmd<ValueType>();
   3675   }
   3676 
   3677   void Init(GLenum _name, uint32 _bucket_id) {
   3678     SetHeader();
   3679     name = _name;
   3680     bucket_id = _bucket_id;
   3681   }
   3682 
   3683   void* Set(void* cmd, GLenum _name, uint32 _bucket_id) {
   3684     static_cast<ValueType*>(cmd)->Init(_name, _bucket_id);
   3685     return NextCmdAddress<ValueType>(cmd);
   3686   }
   3687 
   3688   gpu::CommandHeader header;
   3689   uint32 name;
   3690   uint32 bucket_id;
   3691 };
   3692 
   3693 COMPILE_ASSERT(sizeof(GetString) == 12,
   3694                Sizeof_GetString_is_not_12);
   3695 COMPILE_ASSERT(offsetof(GetString, header) == 0,
   3696                OffsetOf_GetString_header_not_0);
   3697 COMPILE_ASSERT(offsetof(GetString, name) == 4,
   3698                OffsetOf_GetString_name_not_4);
   3699 COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8,
   3700                OffsetOf_GetString_bucket_id_not_8);
   3701 
   3702 struct GetTexParameterfv {
   3703   typedef GetTexParameterfv ValueType;
   3704   static const CommandId kCmdId = kGetTexParameterfv;
   3705   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3706 
   3707   typedef SizedResult<GLfloat> Result;
   3708 
   3709   static uint32 ComputeSize() {
   3710     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3711   }
   3712 
   3713   void SetHeader() {
   3714     header.SetCmd<ValueType>();
   3715   }
   3716 
   3717   void Init(
   3718       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3719       uint32 _params_shm_offset) {
   3720     SetHeader();
   3721     target = _target;
   3722     pname = _pname;
   3723     params_shm_id = _params_shm_id;
   3724     params_shm_offset = _params_shm_offset;
   3725   }
   3726 
   3727   void* Set(
   3728       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3729       uint32 _params_shm_offset) {
   3730     static_cast<ValueType*>(
   3731         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   3732     return NextCmdAddress<ValueType>(cmd);
   3733   }
   3734 
   3735   gpu::CommandHeader header;
   3736   uint32 target;
   3737   uint32 pname;
   3738   uint32 params_shm_id;
   3739   uint32 params_shm_offset;
   3740 };
   3741 
   3742 COMPILE_ASSERT(sizeof(GetTexParameterfv) == 20,
   3743                Sizeof_GetTexParameterfv_is_not_20);
   3744 COMPILE_ASSERT(offsetof(GetTexParameterfv, header) == 0,
   3745                OffsetOf_GetTexParameterfv_header_not_0);
   3746 COMPILE_ASSERT(offsetof(GetTexParameterfv, target) == 4,
   3747                OffsetOf_GetTexParameterfv_target_not_4);
   3748 COMPILE_ASSERT(offsetof(GetTexParameterfv, pname) == 8,
   3749                OffsetOf_GetTexParameterfv_pname_not_8);
   3750 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_id) == 12,
   3751                OffsetOf_GetTexParameterfv_params_shm_id_not_12);
   3752 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_offset) == 16,
   3753                OffsetOf_GetTexParameterfv_params_shm_offset_not_16);
   3754 
   3755 struct GetTexParameteriv {
   3756   typedef GetTexParameteriv ValueType;
   3757   static const CommandId kCmdId = kGetTexParameteriv;
   3758   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3759 
   3760   typedef SizedResult<GLint> Result;
   3761 
   3762   static uint32 ComputeSize() {
   3763     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3764   }
   3765 
   3766   void SetHeader() {
   3767     header.SetCmd<ValueType>();
   3768   }
   3769 
   3770   void Init(
   3771       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3772       uint32 _params_shm_offset) {
   3773     SetHeader();
   3774     target = _target;
   3775     pname = _pname;
   3776     params_shm_id = _params_shm_id;
   3777     params_shm_offset = _params_shm_offset;
   3778   }
   3779 
   3780   void* Set(
   3781       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   3782       uint32 _params_shm_offset) {
   3783     static_cast<ValueType*>(
   3784         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   3785     return NextCmdAddress<ValueType>(cmd);
   3786   }
   3787 
   3788   gpu::CommandHeader header;
   3789   uint32 target;
   3790   uint32 pname;
   3791   uint32 params_shm_id;
   3792   uint32 params_shm_offset;
   3793 };
   3794 
   3795 COMPILE_ASSERT(sizeof(GetTexParameteriv) == 20,
   3796                Sizeof_GetTexParameteriv_is_not_20);
   3797 COMPILE_ASSERT(offsetof(GetTexParameteriv, header) == 0,
   3798                OffsetOf_GetTexParameteriv_header_not_0);
   3799 COMPILE_ASSERT(offsetof(GetTexParameteriv, target) == 4,
   3800                OffsetOf_GetTexParameteriv_target_not_4);
   3801 COMPILE_ASSERT(offsetof(GetTexParameteriv, pname) == 8,
   3802                OffsetOf_GetTexParameteriv_pname_not_8);
   3803 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_id) == 12,
   3804                OffsetOf_GetTexParameteriv_params_shm_id_not_12);
   3805 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_offset) == 16,
   3806                OffsetOf_GetTexParameteriv_params_shm_offset_not_16);
   3807 
   3808 struct GetUniformfv {
   3809   typedef GetUniformfv ValueType;
   3810   static const CommandId kCmdId = kGetUniformfv;
   3811   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3812 
   3813   typedef SizedResult<GLfloat> Result;
   3814 
   3815   static uint32 ComputeSize() {
   3816     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3817   }
   3818 
   3819   void SetHeader() {
   3820     header.SetCmd<ValueType>();
   3821   }
   3822 
   3823   void Init(
   3824       GLuint _program, GLint _location, uint32 _params_shm_id,
   3825       uint32 _params_shm_offset) {
   3826     SetHeader();
   3827     program = _program;
   3828     location = _location;
   3829     params_shm_id = _params_shm_id;
   3830     params_shm_offset = _params_shm_offset;
   3831   }
   3832 
   3833   void* Set(
   3834       void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id,
   3835       uint32 _params_shm_offset) {
   3836     static_cast<ValueType*>(
   3837         cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset);
   3838     return NextCmdAddress<ValueType>(cmd);
   3839   }
   3840 
   3841   gpu::CommandHeader header;
   3842   uint32 program;
   3843   int32 location;
   3844   uint32 params_shm_id;
   3845   uint32 params_shm_offset;
   3846 };
   3847 
   3848 COMPILE_ASSERT(sizeof(GetUniformfv) == 20,
   3849                Sizeof_GetUniformfv_is_not_20);
   3850 COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0,
   3851                OffsetOf_GetUniformfv_header_not_0);
   3852 COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4,
   3853                OffsetOf_GetUniformfv_program_not_4);
   3854 COMPILE_ASSERT(offsetof(GetUniformfv, location) == 8,
   3855                OffsetOf_GetUniformfv_location_not_8);
   3856 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_id) == 12,
   3857                OffsetOf_GetUniformfv_params_shm_id_not_12);
   3858 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_offset) == 16,
   3859                OffsetOf_GetUniformfv_params_shm_offset_not_16);
   3860 
   3861 struct GetUniformiv {
   3862   typedef GetUniformiv ValueType;
   3863   static const CommandId kCmdId = kGetUniformiv;
   3864   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3865 
   3866   typedef SizedResult<GLint> Result;
   3867 
   3868   static uint32 ComputeSize() {
   3869     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3870   }
   3871 
   3872   void SetHeader() {
   3873     header.SetCmd<ValueType>();
   3874   }
   3875 
   3876   void Init(
   3877       GLuint _program, GLint _location, uint32 _params_shm_id,
   3878       uint32 _params_shm_offset) {
   3879     SetHeader();
   3880     program = _program;
   3881     location = _location;
   3882     params_shm_id = _params_shm_id;
   3883     params_shm_offset = _params_shm_offset;
   3884   }
   3885 
   3886   void* Set(
   3887       void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id,
   3888       uint32 _params_shm_offset) {
   3889     static_cast<ValueType*>(
   3890         cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset);
   3891     return NextCmdAddress<ValueType>(cmd);
   3892   }
   3893 
   3894   gpu::CommandHeader header;
   3895   uint32 program;
   3896   int32 location;
   3897   uint32 params_shm_id;
   3898   uint32 params_shm_offset;
   3899 };
   3900 
   3901 COMPILE_ASSERT(sizeof(GetUniformiv) == 20,
   3902                Sizeof_GetUniformiv_is_not_20);
   3903 COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0,
   3904                OffsetOf_GetUniformiv_header_not_0);
   3905 COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4,
   3906                OffsetOf_GetUniformiv_program_not_4);
   3907 COMPILE_ASSERT(offsetof(GetUniformiv, location) == 8,
   3908                OffsetOf_GetUniformiv_location_not_8);
   3909 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_id) == 12,
   3910                OffsetOf_GetUniformiv_params_shm_id_not_12);
   3911 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_offset) == 16,
   3912                OffsetOf_GetUniformiv_params_shm_offset_not_16);
   3913 
   3914 struct GetVertexAttribfv {
   3915   typedef GetVertexAttribfv ValueType;
   3916   static const CommandId kCmdId = kGetVertexAttribfv;
   3917   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3918 
   3919   typedef SizedResult<GLfloat> Result;
   3920 
   3921   static uint32 ComputeSize() {
   3922     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3923   }
   3924 
   3925   void SetHeader() {
   3926     header.SetCmd<ValueType>();
   3927   }
   3928 
   3929   void Init(
   3930       GLuint _index, GLenum _pname, uint32 _params_shm_id,
   3931       uint32 _params_shm_offset) {
   3932     SetHeader();
   3933     index = _index;
   3934     pname = _pname;
   3935     params_shm_id = _params_shm_id;
   3936     params_shm_offset = _params_shm_offset;
   3937   }
   3938 
   3939   void* Set(
   3940       void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id,
   3941       uint32 _params_shm_offset) {
   3942     static_cast<ValueType*>(
   3943         cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset);
   3944     return NextCmdAddress<ValueType>(cmd);
   3945   }
   3946 
   3947   gpu::CommandHeader header;
   3948   uint32 index;
   3949   uint32 pname;
   3950   uint32 params_shm_id;
   3951   uint32 params_shm_offset;
   3952 };
   3953 
   3954 COMPILE_ASSERT(sizeof(GetVertexAttribfv) == 20,
   3955                Sizeof_GetVertexAttribfv_is_not_20);
   3956 COMPILE_ASSERT(offsetof(GetVertexAttribfv, header) == 0,
   3957                OffsetOf_GetVertexAttribfv_header_not_0);
   3958 COMPILE_ASSERT(offsetof(GetVertexAttribfv, index) == 4,
   3959                OffsetOf_GetVertexAttribfv_index_not_4);
   3960 COMPILE_ASSERT(offsetof(GetVertexAttribfv, pname) == 8,
   3961                OffsetOf_GetVertexAttribfv_pname_not_8);
   3962 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_id) == 12,
   3963                OffsetOf_GetVertexAttribfv_params_shm_id_not_12);
   3964 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_offset) == 16,
   3965                OffsetOf_GetVertexAttribfv_params_shm_offset_not_16);
   3966 
   3967 struct GetVertexAttribiv {
   3968   typedef GetVertexAttribiv ValueType;
   3969   static const CommandId kCmdId = kGetVertexAttribiv;
   3970   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   3971 
   3972   typedef SizedResult<GLint> Result;
   3973 
   3974   static uint32 ComputeSize() {
   3975     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   3976   }
   3977 
   3978   void SetHeader() {
   3979     header.SetCmd<ValueType>();
   3980   }
   3981 
   3982   void Init(
   3983       GLuint _index, GLenum _pname, uint32 _params_shm_id,
   3984       uint32 _params_shm_offset) {
   3985     SetHeader();
   3986     index = _index;
   3987     pname = _pname;
   3988     params_shm_id = _params_shm_id;
   3989     params_shm_offset = _params_shm_offset;
   3990   }
   3991 
   3992   void* Set(
   3993       void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id,
   3994       uint32 _params_shm_offset) {
   3995     static_cast<ValueType*>(
   3996         cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset);
   3997     return NextCmdAddress<ValueType>(cmd);
   3998   }
   3999 
   4000   gpu::CommandHeader header;
   4001   uint32 index;
   4002   uint32 pname;
   4003   uint32 params_shm_id;
   4004   uint32 params_shm_offset;
   4005 };
   4006 
   4007 COMPILE_ASSERT(sizeof(GetVertexAttribiv) == 20,
   4008                Sizeof_GetVertexAttribiv_is_not_20);
   4009 COMPILE_ASSERT(offsetof(GetVertexAttribiv, header) == 0,
   4010                OffsetOf_GetVertexAttribiv_header_not_0);
   4011 COMPILE_ASSERT(offsetof(GetVertexAttribiv, index) == 4,
   4012                OffsetOf_GetVertexAttribiv_index_not_4);
   4013 COMPILE_ASSERT(offsetof(GetVertexAttribiv, pname) == 8,
   4014                OffsetOf_GetVertexAttribiv_pname_not_8);
   4015 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_id) == 12,
   4016                OffsetOf_GetVertexAttribiv_params_shm_id_not_12);
   4017 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_offset) == 16,
   4018                OffsetOf_GetVertexAttribiv_params_shm_offset_not_16);
   4019 
   4020 struct GetVertexAttribPointerv {
   4021   typedef GetVertexAttribPointerv ValueType;
   4022   static const CommandId kCmdId = kGetVertexAttribPointerv;
   4023   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4024 
   4025   typedef SizedResult<GLuint> Result;
   4026 
   4027   static uint32 ComputeSize() {
   4028     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4029   }
   4030 
   4031   void SetHeader() {
   4032     header.SetCmd<ValueType>();
   4033   }
   4034 
   4035   void Init(
   4036       GLuint _index, GLenum _pname, uint32 _pointer_shm_id,
   4037       uint32 _pointer_shm_offset) {
   4038     SetHeader();
   4039     index = _index;
   4040     pname = _pname;
   4041     pointer_shm_id = _pointer_shm_id;
   4042     pointer_shm_offset = _pointer_shm_offset;
   4043   }
   4044 
   4045   void* Set(
   4046       void* cmd, GLuint _index, GLenum _pname, uint32 _pointer_shm_id,
   4047       uint32 _pointer_shm_offset) {
   4048     static_cast<ValueType*>(
   4049         cmd)->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset);
   4050     return NextCmdAddress<ValueType>(cmd);
   4051   }
   4052 
   4053   gpu::CommandHeader header;
   4054   uint32 index;
   4055   uint32 pname;
   4056   uint32 pointer_shm_id;
   4057   uint32 pointer_shm_offset;
   4058 };
   4059 
   4060 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv) == 20,
   4061                Sizeof_GetVertexAttribPointerv_is_not_20);
   4062 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, header) == 0,
   4063                OffsetOf_GetVertexAttribPointerv_header_not_0);
   4064 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, index) == 4,
   4065                OffsetOf_GetVertexAttribPointerv_index_not_4);
   4066 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pname) == 8,
   4067                OffsetOf_GetVertexAttribPointerv_pname_not_8);
   4068 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12,
   4069                OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12);
   4070 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16,
   4071                OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16);
   4072 
   4073 struct Hint {
   4074   typedef Hint ValueType;
   4075   static const CommandId kCmdId = kHint;
   4076   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4077 
   4078   static uint32 ComputeSize() {
   4079     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4080   }
   4081 
   4082   void SetHeader() {
   4083     header.SetCmd<ValueType>();
   4084   }
   4085 
   4086   void Init(GLenum _target, GLenum _mode) {
   4087     SetHeader();
   4088     target = _target;
   4089     mode = _mode;
   4090   }
   4091 
   4092   void* Set(void* cmd, GLenum _target, GLenum _mode) {
   4093     static_cast<ValueType*>(cmd)->Init(_target, _mode);
   4094     return NextCmdAddress<ValueType>(cmd);
   4095   }
   4096 
   4097   gpu::CommandHeader header;
   4098   uint32 target;
   4099   uint32 mode;
   4100 };
   4101 
   4102 COMPILE_ASSERT(sizeof(Hint) == 12,
   4103                Sizeof_Hint_is_not_12);
   4104 COMPILE_ASSERT(offsetof(Hint, header) == 0,
   4105                OffsetOf_Hint_header_not_0);
   4106 COMPILE_ASSERT(offsetof(Hint, target) == 4,
   4107                OffsetOf_Hint_target_not_4);
   4108 COMPILE_ASSERT(offsetof(Hint, mode) == 8,
   4109                OffsetOf_Hint_mode_not_8);
   4110 
   4111 struct IsBuffer {
   4112   typedef IsBuffer ValueType;
   4113   static const CommandId kCmdId = kIsBuffer;
   4114   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4115 
   4116   typedef uint32 Result;
   4117 
   4118   static uint32 ComputeSize() {
   4119     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4120   }
   4121 
   4122   void SetHeader() {
   4123     header.SetCmd<ValueType>();
   4124   }
   4125 
   4126   void Init(GLuint _buffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4127     SetHeader();
   4128     buffer = _buffer;
   4129     result_shm_id = _result_shm_id;
   4130     result_shm_offset = _result_shm_offset;
   4131   }
   4132 
   4133   void* Set(
   4134       void* cmd, GLuint _buffer, uint32 _result_shm_id,
   4135       uint32 _result_shm_offset) {
   4136     static_cast<ValueType*>(
   4137         cmd)->Init(_buffer, _result_shm_id, _result_shm_offset);
   4138     return NextCmdAddress<ValueType>(cmd);
   4139   }
   4140 
   4141   gpu::CommandHeader header;
   4142   uint32 buffer;
   4143   uint32 result_shm_id;
   4144   uint32 result_shm_offset;
   4145 };
   4146 
   4147 COMPILE_ASSERT(sizeof(IsBuffer) == 16,
   4148                Sizeof_IsBuffer_is_not_16);
   4149 COMPILE_ASSERT(offsetof(IsBuffer, header) == 0,
   4150                OffsetOf_IsBuffer_header_not_0);
   4151 COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4,
   4152                OffsetOf_IsBuffer_buffer_not_4);
   4153 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8,
   4154                OffsetOf_IsBuffer_result_shm_id_not_8);
   4155 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12,
   4156                OffsetOf_IsBuffer_result_shm_offset_not_12);
   4157 
   4158 struct IsEnabled {
   4159   typedef IsEnabled ValueType;
   4160   static const CommandId kCmdId = kIsEnabled;
   4161   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4162 
   4163   typedef uint32 Result;
   4164 
   4165   static uint32 ComputeSize() {
   4166     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4167   }
   4168 
   4169   void SetHeader() {
   4170     header.SetCmd<ValueType>();
   4171   }
   4172 
   4173   void Init(GLenum _cap, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4174     SetHeader();
   4175     cap = _cap;
   4176     result_shm_id = _result_shm_id;
   4177     result_shm_offset = _result_shm_offset;
   4178   }
   4179 
   4180   void* Set(
   4181       void* cmd, GLenum _cap, uint32 _result_shm_id,
   4182       uint32 _result_shm_offset) {
   4183     static_cast<ValueType*>(
   4184         cmd)->Init(_cap, _result_shm_id, _result_shm_offset);
   4185     return NextCmdAddress<ValueType>(cmd);
   4186   }
   4187 
   4188   gpu::CommandHeader header;
   4189   uint32 cap;
   4190   uint32 result_shm_id;
   4191   uint32 result_shm_offset;
   4192 };
   4193 
   4194 COMPILE_ASSERT(sizeof(IsEnabled) == 16,
   4195                Sizeof_IsEnabled_is_not_16);
   4196 COMPILE_ASSERT(offsetof(IsEnabled, header) == 0,
   4197                OffsetOf_IsEnabled_header_not_0);
   4198 COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4,
   4199                OffsetOf_IsEnabled_cap_not_4);
   4200 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8,
   4201                OffsetOf_IsEnabled_result_shm_id_not_8);
   4202 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12,
   4203                OffsetOf_IsEnabled_result_shm_offset_not_12);
   4204 
   4205 struct IsFramebuffer {
   4206   typedef IsFramebuffer ValueType;
   4207   static const CommandId kCmdId = kIsFramebuffer;
   4208   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4209 
   4210   typedef uint32 Result;
   4211 
   4212   static uint32 ComputeSize() {
   4213     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4214   }
   4215 
   4216   void SetHeader() {
   4217     header.SetCmd<ValueType>();
   4218   }
   4219 
   4220   void Init(
   4221       GLuint _framebuffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4222     SetHeader();
   4223     framebuffer = _framebuffer;
   4224     result_shm_id = _result_shm_id;
   4225     result_shm_offset = _result_shm_offset;
   4226   }
   4227 
   4228   void* Set(
   4229       void* cmd, GLuint _framebuffer, uint32 _result_shm_id,
   4230       uint32 _result_shm_offset) {
   4231     static_cast<ValueType*>(
   4232         cmd)->Init(_framebuffer, _result_shm_id, _result_shm_offset);
   4233     return NextCmdAddress<ValueType>(cmd);
   4234   }
   4235 
   4236   gpu::CommandHeader header;
   4237   uint32 framebuffer;
   4238   uint32 result_shm_id;
   4239   uint32 result_shm_offset;
   4240 };
   4241 
   4242 COMPILE_ASSERT(sizeof(IsFramebuffer) == 16,
   4243                Sizeof_IsFramebuffer_is_not_16);
   4244 COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0,
   4245                OffsetOf_IsFramebuffer_header_not_0);
   4246 COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4,
   4247                OffsetOf_IsFramebuffer_framebuffer_not_4);
   4248 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_id) == 8,
   4249                OffsetOf_IsFramebuffer_result_shm_id_not_8);
   4250 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_offset) == 12,
   4251                OffsetOf_IsFramebuffer_result_shm_offset_not_12);
   4252 
   4253 struct IsProgram {
   4254   typedef IsProgram ValueType;
   4255   static const CommandId kCmdId = kIsProgram;
   4256   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4257 
   4258   typedef uint32 Result;
   4259 
   4260   static uint32 ComputeSize() {
   4261     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4262   }
   4263 
   4264   void SetHeader() {
   4265     header.SetCmd<ValueType>();
   4266   }
   4267 
   4268   void Init(
   4269       GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4270     SetHeader();
   4271     program = _program;
   4272     result_shm_id = _result_shm_id;
   4273     result_shm_offset = _result_shm_offset;
   4274   }
   4275 
   4276   void* Set(
   4277       void* cmd, GLuint _program, uint32 _result_shm_id,
   4278       uint32 _result_shm_offset) {
   4279     static_cast<ValueType*>(
   4280         cmd)->Init(_program, _result_shm_id, _result_shm_offset);
   4281     return NextCmdAddress<ValueType>(cmd);
   4282   }
   4283 
   4284   gpu::CommandHeader header;
   4285   uint32 program;
   4286   uint32 result_shm_id;
   4287   uint32 result_shm_offset;
   4288 };
   4289 
   4290 COMPILE_ASSERT(sizeof(IsProgram) == 16,
   4291                Sizeof_IsProgram_is_not_16);
   4292 COMPILE_ASSERT(offsetof(IsProgram, header) == 0,
   4293                OffsetOf_IsProgram_header_not_0);
   4294 COMPILE_ASSERT(offsetof(IsProgram, program) == 4,
   4295                OffsetOf_IsProgram_program_not_4);
   4296 COMPILE_ASSERT(offsetof(IsProgram, result_shm_id) == 8,
   4297                OffsetOf_IsProgram_result_shm_id_not_8);
   4298 COMPILE_ASSERT(offsetof(IsProgram, result_shm_offset) == 12,
   4299                OffsetOf_IsProgram_result_shm_offset_not_12);
   4300 
   4301 struct IsRenderbuffer {
   4302   typedef IsRenderbuffer ValueType;
   4303   static const CommandId kCmdId = kIsRenderbuffer;
   4304   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4305 
   4306   typedef uint32 Result;
   4307 
   4308   static uint32 ComputeSize() {
   4309     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4310   }
   4311 
   4312   void SetHeader() {
   4313     header.SetCmd<ValueType>();
   4314   }
   4315 
   4316   void Init(
   4317       GLuint _renderbuffer, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4318     SetHeader();
   4319     renderbuffer = _renderbuffer;
   4320     result_shm_id = _result_shm_id;
   4321     result_shm_offset = _result_shm_offset;
   4322   }
   4323 
   4324   void* Set(
   4325       void* cmd, GLuint _renderbuffer, uint32 _result_shm_id,
   4326       uint32 _result_shm_offset) {
   4327     static_cast<ValueType*>(
   4328         cmd)->Init(_renderbuffer, _result_shm_id, _result_shm_offset);
   4329     return NextCmdAddress<ValueType>(cmd);
   4330   }
   4331 
   4332   gpu::CommandHeader header;
   4333   uint32 renderbuffer;
   4334   uint32 result_shm_id;
   4335   uint32 result_shm_offset;
   4336 };
   4337 
   4338 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16,
   4339                Sizeof_IsRenderbuffer_is_not_16);
   4340 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0,
   4341                OffsetOf_IsRenderbuffer_header_not_0);
   4342 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4,
   4343                OffsetOf_IsRenderbuffer_renderbuffer_not_4);
   4344 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8,
   4345                OffsetOf_IsRenderbuffer_result_shm_id_not_8);
   4346 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12,
   4347                OffsetOf_IsRenderbuffer_result_shm_offset_not_12);
   4348 
   4349 struct IsShader {
   4350   typedef IsShader ValueType;
   4351   static const CommandId kCmdId = kIsShader;
   4352   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4353 
   4354   typedef uint32 Result;
   4355 
   4356   static uint32 ComputeSize() {
   4357     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4358   }
   4359 
   4360   void SetHeader() {
   4361     header.SetCmd<ValueType>();
   4362   }
   4363 
   4364   void Init(GLuint _shader, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4365     SetHeader();
   4366     shader = _shader;
   4367     result_shm_id = _result_shm_id;
   4368     result_shm_offset = _result_shm_offset;
   4369   }
   4370 
   4371   void* Set(
   4372       void* cmd, GLuint _shader, uint32 _result_shm_id,
   4373       uint32 _result_shm_offset) {
   4374     static_cast<ValueType*>(
   4375         cmd)->Init(_shader, _result_shm_id, _result_shm_offset);
   4376     return NextCmdAddress<ValueType>(cmd);
   4377   }
   4378 
   4379   gpu::CommandHeader header;
   4380   uint32 shader;
   4381   uint32 result_shm_id;
   4382   uint32 result_shm_offset;
   4383 };
   4384 
   4385 COMPILE_ASSERT(sizeof(IsShader) == 16,
   4386                Sizeof_IsShader_is_not_16);
   4387 COMPILE_ASSERT(offsetof(IsShader, header) == 0,
   4388                OffsetOf_IsShader_header_not_0);
   4389 COMPILE_ASSERT(offsetof(IsShader, shader) == 4,
   4390                OffsetOf_IsShader_shader_not_4);
   4391 COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8,
   4392                OffsetOf_IsShader_result_shm_id_not_8);
   4393 COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12,
   4394                OffsetOf_IsShader_result_shm_offset_not_12);
   4395 
   4396 struct IsTexture {
   4397   typedef IsTexture ValueType;
   4398   static const CommandId kCmdId = kIsTexture;
   4399   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4400 
   4401   typedef uint32 Result;
   4402 
   4403   static uint32 ComputeSize() {
   4404     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4405   }
   4406 
   4407   void SetHeader() {
   4408     header.SetCmd<ValueType>();
   4409   }
   4410 
   4411   void Init(
   4412       GLuint _texture, uint32 _result_shm_id, uint32 _result_shm_offset) {
   4413     SetHeader();
   4414     texture = _texture;
   4415     result_shm_id = _result_shm_id;
   4416     result_shm_offset = _result_shm_offset;
   4417   }
   4418 
   4419   void* Set(
   4420       void* cmd, GLuint _texture, uint32 _result_shm_id,
   4421       uint32 _result_shm_offset) {
   4422     static_cast<ValueType*>(
   4423         cmd)->Init(_texture, _result_shm_id, _result_shm_offset);
   4424     return NextCmdAddress<ValueType>(cmd);
   4425   }
   4426 
   4427   gpu::CommandHeader header;
   4428   uint32 texture;
   4429   uint32 result_shm_id;
   4430   uint32 result_shm_offset;
   4431 };
   4432 
   4433 COMPILE_ASSERT(sizeof(IsTexture) == 16,
   4434                Sizeof_IsTexture_is_not_16);
   4435 COMPILE_ASSERT(offsetof(IsTexture, header) == 0,
   4436                OffsetOf_IsTexture_header_not_0);
   4437 COMPILE_ASSERT(offsetof(IsTexture, texture) == 4,
   4438                OffsetOf_IsTexture_texture_not_4);
   4439 COMPILE_ASSERT(offsetof(IsTexture, result_shm_id) == 8,
   4440                OffsetOf_IsTexture_result_shm_id_not_8);
   4441 COMPILE_ASSERT(offsetof(IsTexture, result_shm_offset) == 12,
   4442                OffsetOf_IsTexture_result_shm_offset_not_12);
   4443 
   4444 struct LineWidth {
   4445   typedef LineWidth ValueType;
   4446   static const CommandId kCmdId = kLineWidth;
   4447   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4448 
   4449   static uint32 ComputeSize() {
   4450     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4451   }
   4452 
   4453   void SetHeader() {
   4454     header.SetCmd<ValueType>();
   4455   }
   4456 
   4457   void Init(GLfloat _width) {
   4458     SetHeader();
   4459     width = _width;
   4460   }
   4461 
   4462   void* Set(void* cmd, GLfloat _width) {
   4463     static_cast<ValueType*>(cmd)->Init(_width);
   4464     return NextCmdAddress<ValueType>(cmd);
   4465   }
   4466 
   4467   gpu::CommandHeader header;
   4468   float width;
   4469 };
   4470 
   4471 COMPILE_ASSERT(sizeof(LineWidth) == 8,
   4472                Sizeof_LineWidth_is_not_8);
   4473 COMPILE_ASSERT(offsetof(LineWidth, header) == 0,
   4474                OffsetOf_LineWidth_header_not_0);
   4475 COMPILE_ASSERT(offsetof(LineWidth, width) == 4,
   4476                OffsetOf_LineWidth_width_not_4);
   4477 
   4478 struct LinkProgram {
   4479   typedef LinkProgram ValueType;
   4480   static const CommandId kCmdId = kLinkProgram;
   4481   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4482 
   4483   static uint32 ComputeSize() {
   4484     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4485   }
   4486 
   4487   void SetHeader() {
   4488     header.SetCmd<ValueType>();
   4489   }
   4490 
   4491   void Init(GLuint _program) {
   4492     SetHeader();
   4493     program = _program;
   4494   }
   4495 
   4496   void* Set(void* cmd, GLuint _program) {
   4497     static_cast<ValueType*>(cmd)->Init(_program);
   4498     return NextCmdAddress<ValueType>(cmd);
   4499   }
   4500 
   4501   gpu::CommandHeader header;
   4502   uint32 program;
   4503 };
   4504 
   4505 COMPILE_ASSERT(sizeof(LinkProgram) == 8,
   4506                Sizeof_LinkProgram_is_not_8);
   4507 COMPILE_ASSERT(offsetof(LinkProgram, header) == 0,
   4508                OffsetOf_LinkProgram_header_not_0);
   4509 COMPILE_ASSERT(offsetof(LinkProgram, program) == 4,
   4510                OffsetOf_LinkProgram_program_not_4);
   4511 
   4512 struct PixelStorei {
   4513   typedef PixelStorei ValueType;
   4514   static const CommandId kCmdId = kPixelStorei;
   4515   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4516 
   4517   static uint32 ComputeSize() {
   4518     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4519   }
   4520 
   4521   void SetHeader() {
   4522     header.SetCmd<ValueType>();
   4523   }
   4524 
   4525   void Init(GLenum _pname, GLint _param) {
   4526     SetHeader();
   4527     pname = _pname;
   4528     param = _param;
   4529   }
   4530 
   4531   void* Set(void* cmd, GLenum _pname, GLint _param) {
   4532     static_cast<ValueType*>(cmd)->Init(_pname, _param);
   4533     return NextCmdAddress<ValueType>(cmd);
   4534   }
   4535 
   4536   gpu::CommandHeader header;
   4537   uint32 pname;
   4538   int32 param;
   4539 };
   4540 
   4541 COMPILE_ASSERT(sizeof(PixelStorei) == 12,
   4542                Sizeof_PixelStorei_is_not_12);
   4543 COMPILE_ASSERT(offsetof(PixelStorei, header) == 0,
   4544                OffsetOf_PixelStorei_header_not_0);
   4545 COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4,
   4546                OffsetOf_PixelStorei_pname_not_4);
   4547 COMPILE_ASSERT(offsetof(PixelStorei, param) == 8,
   4548                OffsetOf_PixelStorei_param_not_8);
   4549 
   4550 struct PolygonOffset {
   4551   typedef PolygonOffset ValueType;
   4552   static const CommandId kCmdId = kPolygonOffset;
   4553   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4554 
   4555   static uint32 ComputeSize() {
   4556     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4557   }
   4558 
   4559   void SetHeader() {
   4560     header.SetCmd<ValueType>();
   4561   }
   4562 
   4563   void Init(GLfloat _factor, GLfloat _units) {
   4564     SetHeader();
   4565     factor = _factor;
   4566     units = _units;
   4567   }
   4568 
   4569   void* Set(void* cmd, GLfloat _factor, GLfloat _units) {
   4570     static_cast<ValueType*>(cmd)->Init(_factor, _units);
   4571     return NextCmdAddress<ValueType>(cmd);
   4572   }
   4573 
   4574   gpu::CommandHeader header;
   4575   float factor;
   4576   float units;
   4577 };
   4578 
   4579 COMPILE_ASSERT(sizeof(PolygonOffset) == 12,
   4580                Sizeof_PolygonOffset_is_not_12);
   4581 COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0,
   4582                OffsetOf_PolygonOffset_header_not_0);
   4583 COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4,
   4584                OffsetOf_PolygonOffset_factor_not_4);
   4585 COMPILE_ASSERT(offsetof(PolygonOffset, units) == 8,
   4586                OffsetOf_PolygonOffset_units_not_8);
   4587 
   4588 // ReadPixels has the result separated from the pixel buffer so that
   4589 // it is easier to specify the result going to some specific place
   4590 // that exactly fits the rectangle of pixels.
   4591 struct ReadPixels {
   4592   typedef ReadPixels ValueType;
   4593   static const CommandId kCmdId = kReadPixels;
   4594   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4595 
   4596   typedef uint32 Result;
   4597 
   4598   static uint32 ComputeSize() {
   4599     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4600   }
   4601 
   4602   void SetHeader() {
   4603     header.SetCmd<ValueType>();
   4604   }
   4605 
   4606   void Init(
   4607       GLint _x, GLint _y, GLsizei _width, GLsizei _height, GLenum _format,
   4608       GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset,
   4609       uint32 _result_shm_id, uint32 _result_shm_offset, GLboolean _async) {
   4610     SetHeader();
   4611     x = _x;
   4612     y = _y;
   4613     width = _width;
   4614     height = _height;
   4615     format = _format;
   4616     type = _type;
   4617     pixels_shm_id = _pixels_shm_id;
   4618     pixels_shm_offset = _pixels_shm_offset;
   4619     result_shm_id = _result_shm_id;
   4620     result_shm_offset = _result_shm_offset;
   4621     async = _async;
   4622   }
   4623 
   4624   void* Set(
   4625       void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height,
   4626       GLenum _format, GLenum _type, uint32 _pixels_shm_id,
   4627       uint32 _pixels_shm_offset, uint32 _result_shm_id,
   4628       uint32 _result_shm_offset, GLboolean _async) {
   4629     static_cast<ValueType*>(
   4630         cmd)->Init(
   4631             _x, _y, _width, _height, _format, _type, _pixels_shm_id,
   4632             _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async);
   4633     return NextCmdAddress<ValueType>(cmd);
   4634   }
   4635 
   4636   gpu::CommandHeader header;
   4637   int32 x;
   4638   int32 y;
   4639   int32 width;
   4640   int32 height;
   4641   uint32 format;
   4642   uint32 type;
   4643   uint32 pixels_shm_id;
   4644   uint32 pixels_shm_offset;
   4645   uint32 result_shm_id;
   4646   uint32 result_shm_offset;
   4647   uint32 async;
   4648 };
   4649 
   4650 COMPILE_ASSERT(sizeof(ReadPixels) == 48,
   4651                Sizeof_ReadPixels_is_not_48);
   4652 COMPILE_ASSERT(offsetof(ReadPixels, header) == 0,
   4653                OffsetOf_ReadPixels_header_not_0);
   4654 COMPILE_ASSERT(offsetof(ReadPixels, x) == 4,
   4655                OffsetOf_ReadPixels_x_not_4);
   4656 COMPILE_ASSERT(offsetof(ReadPixels, y) == 8,
   4657                OffsetOf_ReadPixels_y_not_8);
   4658 COMPILE_ASSERT(offsetof(ReadPixels, width) == 12,
   4659                OffsetOf_ReadPixels_width_not_12);
   4660 COMPILE_ASSERT(offsetof(ReadPixels, height) == 16,
   4661                OffsetOf_ReadPixels_height_not_16);
   4662 COMPILE_ASSERT(offsetof(ReadPixels, format) == 20,
   4663                OffsetOf_ReadPixels_format_not_20);
   4664 COMPILE_ASSERT(offsetof(ReadPixels, type) == 24,
   4665                OffsetOf_ReadPixels_type_not_24);
   4666 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_id) == 28,
   4667                OffsetOf_ReadPixels_pixels_shm_id_not_28);
   4668 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_offset) == 32,
   4669                OffsetOf_ReadPixels_pixels_shm_offset_not_32);
   4670 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_id) == 36,
   4671                OffsetOf_ReadPixels_result_shm_id_not_36);
   4672 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_offset) == 40,
   4673                OffsetOf_ReadPixels_result_shm_offset_not_40);
   4674 COMPILE_ASSERT(offsetof(ReadPixels, async) == 44,
   4675                OffsetOf_ReadPixels_async_not_44);
   4676 
   4677 struct ReleaseShaderCompiler {
   4678   typedef ReleaseShaderCompiler ValueType;
   4679   static const CommandId kCmdId = kReleaseShaderCompiler;
   4680   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4681 
   4682   static uint32 ComputeSize() {
   4683     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4684   }
   4685 
   4686   void SetHeader() {
   4687     header.SetCmd<ValueType>();
   4688   }
   4689 
   4690   void Init() {
   4691     SetHeader();
   4692   }
   4693 
   4694   void* Set(void* cmd) {
   4695     static_cast<ValueType*>(cmd)->Init();
   4696     return NextCmdAddress<ValueType>(cmd);
   4697   }
   4698 
   4699   gpu::CommandHeader header;
   4700 };
   4701 
   4702 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler) == 4,
   4703                Sizeof_ReleaseShaderCompiler_is_not_4);
   4704 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler, header) == 0,
   4705                OffsetOf_ReleaseShaderCompiler_header_not_0);
   4706 
   4707 struct RenderbufferStorage {
   4708   typedef RenderbufferStorage ValueType;
   4709   static const CommandId kCmdId = kRenderbufferStorage;
   4710   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4711 
   4712   static uint32 ComputeSize() {
   4713     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4714   }
   4715 
   4716   void SetHeader() {
   4717     header.SetCmd<ValueType>();
   4718   }
   4719 
   4720   void Init(
   4721       GLenum _target, GLenum _internalformat, GLsizei _width,
   4722       GLsizei _height) {
   4723     SetHeader();
   4724     target = _target;
   4725     internalformat = _internalformat;
   4726     width = _width;
   4727     height = _height;
   4728   }
   4729 
   4730   void* Set(
   4731       void* cmd, GLenum _target, GLenum _internalformat, GLsizei _width,
   4732       GLsizei _height) {
   4733     static_cast<ValueType*>(
   4734         cmd)->Init(_target, _internalformat, _width, _height);
   4735     return NextCmdAddress<ValueType>(cmd);
   4736   }
   4737 
   4738   gpu::CommandHeader header;
   4739   uint32 target;
   4740   uint32 internalformat;
   4741   int32 width;
   4742   int32 height;
   4743 };
   4744 
   4745 COMPILE_ASSERT(sizeof(RenderbufferStorage) == 20,
   4746                Sizeof_RenderbufferStorage_is_not_20);
   4747 COMPILE_ASSERT(offsetof(RenderbufferStorage, header) == 0,
   4748                OffsetOf_RenderbufferStorage_header_not_0);
   4749 COMPILE_ASSERT(offsetof(RenderbufferStorage, target) == 4,
   4750                OffsetOf_RenderbufferStorage_target_not_4);
   4751 COMPILE_ASSERT(offsetof(RenderbufferStorage, internalformat) == 8,
   4752                OffsetOf_RenderbufferStorage_internalformat_not_8);
   4753 COMPILE_ASSERT(offsetof(RenderbufferStorage, width) == 12,
   4754                OffsetOf_RenderbufferStorage_width_not_12);
   4755 COMPILE_ASSERT(offsetof(RenderbufferStorage, height) == 16,
   4756                OffsetOf_RenderbufferStorage_height_not_16);
   4757 
   4758 struct SampleCoverage {
   4759   typedef SampleCoverage ValueType;
   4760   static const CommandId kCmdId = kSampleCoverage;
   4761   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4762 
   4763   static uint32 ComputeSize() {
   4764     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4765   }
   4766 
   4767   void SetHeader() {
   4768     header.SetCmd<ValueType>();
   4769   }
   4770 
   4771   void Init(GLclampf _value, GLboolean _invert) {
   4772     SetHeader();
   4773     value = _value;
   4774     invert = _invert;
   4775   }
   4776 
   4777   void* Set(void* cmd, GLclampf _value, GLboolean _invert) {
   4778     static_cast<ValueType*>(cmd)->Init(_value, _invert);
   4779     return NextCmdAddress<ValueType>(cmd);
   4780   }
   4781 
   4782   gpu::CommandHeader header;
   4783   float value;
   4784   uint32 invert;
   4785 };
   4786 
   4787 COMPILE_ASSERT(sizeof(SampleCoverage) == 12,
   4788                Sizeof_SampleCoverage_is_not_12);
   4789 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0,
   4790                OffsetOf_SampleCoverage_header_not_0);
   4791 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4,
   4792                OffsetOf_SampleCoverage_value_not_4);
   4793 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8,
   4794                OffsetOf_SampleCoverage_invert_not_8);
   4795 
   4796 struct Scissor {
   4797   typedef Scissor ValueType;
   4798   static const CommandId kCmdId = kScissor;
   4799   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4800 
   4801   static uint32 ComputeSize() {
   4802     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4803   }
   4804 
   4805   void SetHeader() {
   4806     header.SetCmd<ValueType>();
   4807   }
   4808 
   4809   void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
   4810     SetHeader();
   4811     x = _x;
   4812     y = _y;
   4813     width = _width;
   4814     height = _height;
   4815   }
   4816 
   4817   void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
   4818     static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
   4819     return NextCmdAddress<ValueType>(cmd);
   4820   }
   4821 
   4822   gpu::CommandHeader header;
   4823   int32 x;
   4824   int32 y;
   4825   int32 width;
   4826   int32 height;
   4827 };
   4828 
   4829 COMPILE_ASSERT(sizeof(Scissor) == 20,
   4830                Sizeof_Scissor_is_not_20);
   4831 COMPILE_ASSERT(offsetof(Scissor, header) == 0,
   4832                OffsetOf_Scissor_header_not_0);
   4833 COMPILE_ASSERT(offsetof(Scissor, x) == 4,
   4834                OffsetOf_Scissor_x_not_4);
   4835 COMPILE_ASSERT(offsetof(Scissor, y) == 8,
   4836                OffsetOf_Scissor_y_not_8);
   4837 COMPILE_ASSERT(offsetof(Scissor, width) == 12,
   4838                OffsetOf_Scissor_width_not_12);
   4839 COMPILE_ASSERT(offsetof(Scissor, height) == 16,
   4840                OffsetOf_Scissor_height_not_16);
   4841 
   4842 struct ShaderBinary {
   4843   typedef ShaderBinary ValueType;
   4844   static const CommandId kCmdId = kShaderBinary;
   4845   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4846 
   4847   static uint32 ComputeSize() {
   4848     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4849   }
   4850 
   4851   void SetHeader() {
   4852     header.SetCmd<ValueType>();
   4853   }
   4854 
   4855   void Init(
   4856       GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset,
   4857       GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset,
   4858       GLsizei _length) {
   4859     SetHeader();
   4860     n = _n;
   4861     shaders_shm_id = _shaders_shm_id;
   4862     shaders_shm_offset = _shaders_shm_offset;
   4863     binaryformat = _binaryformat;
   4864     binary_shm_id = _binary_shm_id;
   4865     binary_shm_offset = _binary_shm_offset;
   4866     length = _length;
   4867   }
   4868 
   4869   void* Set(
   4870       void* cmd, GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset,
   4871       GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset,
   4872       GLsizei _length) {
   4873     static_cast<ValueType*>(
   4874         cmd)->Init(
   4875             _n, _shaders_shm_id, _shaders_shm_offset, _binaryformat,
   4876             _binary_shm_id, _binary_shm_offset, _length);
   4877     return NextCmdAddress<ValueType>(cmd);
   4878   }
   4879 
   4880   gpu::CommandHeader header;
   4881   int32 n;
   4882   uint32 shaders_shm_id;
   4883   uint32 shaders_shm_offset;
   4884   uint32 binaryformat;
   4885   uint32 binary_shm_id;
   4886   uint32 binary_shm_offset;
   4887   int32 length;
   4888 };
   4889 
   4890 COMPILE_ASSERT(sizeof(ShaderBinary) == 32,
   4891                Sizeof_ShaderBinary_is_not_32);
   4892 COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0,
   4893                OffsetOf_ShaderBinary_header_not_0);
   4894 COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4,
   4895                OffsetOf_ShaderBinary_n_not_4);
   4896 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8,
   4897                OffsetOf_ShaderBinary_shaders_shm_id_not_8);
   4898 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12,
   4899                OffsetOf_ShaderBinary_shaders_shm_offset_not_12);
   4900 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16,
   4901                OffsetOf_ShaderBinary_binaryformat_not_16);
   4902 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20,
   4903                OffsetOf_ShaderBinary_binary_shm_id_not_20);
   4904 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24,
   4905                OffsetOf_ShaderBinary_binary_shm_offset_not_24);
   4906 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28,
   4907                OffsetOf_ShaderBinary_length_not_28);
   4908 
   4909 struct ShaderSource {
   4910   typedef ShaderSource ValueType;
   4911   static const CommandId kCmdId = kShaderSource;
   4912   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4913 
   4914   static uint32 ComputeSize() {
   4915     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4916   }
   4917 
   4918   void SetHeader() {
   4919     header.SetCmd<ValueType>();
   4920   }
   4921 
   4922   void Init(
   4923       GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset,
   4924       uint32 _data_size) {
   4925     SetHeader();
   4926     shader = _shader;
   4927     data_shm_id = _data_shm_id;
   4928     data_shm_offset = _data_shm_offset;
   4929     data_size = _data_size;
   4930   }
   4931 
   4932   void* Set(
   4933       void* cmd, GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset,
   4934       uint32 _data_size) {
   4935     static_cast<ValueType*>(
   4936         cmd)->Init(_shader, _data_shm_id, _data_shm_offset, _data_size);
   4937     return NextCmdAddress<ValueType>(cmd);
   4938   }
   4939 
   4940   gpu::CommandHeader header;
   4941   uint32 shader;
   4942   uint32 data_shm_id;
   4943   uint32 data_shm_offset;
   4944   uint32 data_size;
   4945 };
   4946 
   4947 COMPILE_ASSERT(sizeof(ShaderSource) == 20,
   4948                Sizeof_ShaderSource_is_not_20);
   4949 COMPILE_ASSERT(offsetof(ShaderSource, header) == 0,
   4950                OffsetOf_ShaderSource_header_not_0);
   4951 COMPILE_ASSERT(offsetof(ShaderSource, shader) == 4,
   4952                OffsetOf_ShaderSource_shader_not_4);
   4953 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_id) == 8,
   4954                OffsetOf_ShaderSource_data_shm_id_not_8);
   4955 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_offset) == 12,
   4956                OffsetOf_ShaderSource_data_shm_offset_not_12);
   4957 COMPILE_ASSERT(offsetof(ShaderSource, data_size) == 16,
   4958                OffsetOf_ShaderSource_data_size_not_16);
   4959 
   4960 struct ShaderSourceBucket {
   4961   typedef ShaderSourceBucket ValueType;
   4962   static const CommandId kCmdId = kShaderSourceBucket;
   4963   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   4964 
   4965   static uint32 ComputeSize() {
   4966     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   4967   }
   4968 
   4969   void SetHeader() {
   4970     header.SetCmd<ValueType>();
   4971   }
   4972 
   4973   void Init(GLuint _shader, uint32 _data_bucket_id) {
   4974     SetHeader();
   4975     shader = _shader;
   4976     data_bucket_id = _data_bucket_id;
   4977   }
   4978 
   4979   void* Set(void* cmd, GLuint _shader, uint32 _data_bucket_id) {
   4980     static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id);
   4981     return NextCmdAddress<ValueType>(cmd);
   4982   }
   4983 
   4984   gpu::CommandHeader header;
   4985   uint32 shader;
   4986   uint32 data_bucket_id;
   4987 };
   4988 
   4989 COMPILE_ASSERT(sizeof(ShaderSourceBucket) == 12,
   4990                Sizeof_ShaderSourceBucket_is_not_12);
   4991 COMPILE_ASSERT(offsetof(ShaderSourceBucket, header) == 0,
   4992                OffsetOf_ShaderSourceBucket_header_not_0);
   4993 COMPILE_ASSERT(offsetof(ShaderSourceBucket, shader) == 4,
   4994                OffsetOf_ShaderSourceBucket_shader_not_4);
   4995 COMPILE_ASSERT(offsetof(ShaderSourceBucket, data_bucket_id) == 8,
   4996                OffsetOf_ShaderSourceBucket_data_bucket_id_not_8);
   4997 
   4998 struct StencilFunc {
   4999   typedef StencilFunc ValueType;
   5000   static const CommandId kCmdId = kStencilFunc;
   5001   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5002 
   5003   static uint32 ComputeSize() {
   5004     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5005   }
   5006 
   5007   void SetHeader() {
   5008     header.SetCmd<ValueType>();
   5009   }
   5010 
   5011   void Init(GLenum _func, GLint _ref, GLuint _mask) {
   5012     SetHeader();
   5013     func = _func;
   5014     ref = _ref;
   5015     mask = _mask;
   5016   }
   5017 
   5018   void* Set(void* cmd, GLenum _func, GLint _ref, GLuint _mask) {
   5019     static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask);
   5020     return NextCmdAddress<ValueType>(cmd);
   5021   }
   5022 
   5023   gpu::CommandHeader header;
   5024   uint32 func;
   5025   int32 ref;
   5026   uint32 mask;
   5027 };
   5028 
   5029 COMPILE_ASSERT(sizeof(StencilFunc) == 16,
   5030                Sizeof_StencilFunc_is_not_16);
   5031 COMPILE_ASSERT(offsetof(StencilFunc, header) == 0,
   5032                OffsetOf_StencilFunc_header_not_0);
   5033 COMPILE_ASSERT(offsetof(StencilFunc, func) == 4,
   5034                OffsetOf_StencilFunc_func_not_4);
   5035 COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8,
   5036                OffsetOf_StencilFunc_ref_not_8);
   5037 COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12,
   5038                OffsetOf_StencilFunc_mask_not_12);
   5039 
   5040 struct StencilFuncSeparate {
   5041   typedef StencilFuncSeparate ValueType;
   5042   static const CommandId kCmdId = kStencilFuncSeparate;
   5043   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5044 
   5045   static uint32 ComputeSize() {
   5046     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5047   }
   5048 
   5049   void SetHeader() {
   5050     header.SetCmd<ValueType>();
   5051   }
   5052 
   5053   void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
   5054     SetHeader();
   5055     face = _face;
   5056     func = _func;
   5057     ref = _ref;
   5058     mask = _mask;
   5059   }
   5060 
   5061   void* Set(void* cmd, GLenum _face, GLenum _func, GLint _ref, GLuint _mask) {
   5062     static_cast<ValueType*>(cmd)->Init(_face, _func, _ref, _mask);
   5063     return NextCmdAddress<ValueType>(cmd);
   5064   }
   5065 
   5066   gpu::CommandHeader header;
   5067   uint32 face;
   5068   uint32 func;
   5069   int32 ref;
   5070   uint32 mask;
   5071 };
   5072 
   5073 COMPILE_ASSERT(sizeof(StencilFuncSeparate) == 20,
   5074                Sizeof_StencilFuncSeparate_is_not_20);
   5075 COMPILE_ASSERT(offsetof(StencilFuncSeparate, header) == 0,
   5076                OffsetOf_StencilFuncSeparate_header_not_0);
   5077 COMPILE_ASSERT(offsetof(StencilFuncSeparate, face) == 4,
   5078                OffsetOf_StencilFuncSeparate_face_not_4);
   5079 COMPILE_ASSERT(offsetof(StencilFuncSeparate, func) == 8,
   5080                OffsetOf_StencilFuncSeparate_func_not_8);
   5081 COMPILE_ASSERT(offsetof(StencilFuncSeparate, ref) == 12,
   5082                OffsetOf_StencilFuncSeparate_ref_not_12);
   5083 COMPILE_ASSERT(offsetof(StencilFuncSeparate, mask) == 16,
   5084                OffsetOf_StencilFuncSeparate_mask_not_16);
   5085 
   5086 struct StencilMask {
   5087   typedef StencilMask ValueType;
   5088   static const CommandId kCmdId = kStencilMask;
   5089   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5090 
   5091   static uint32 ComputeSize() {
   5092     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5093   }
   5094 
   5095   void SetHeader() {
   5096     header.SetCmd<ValueType>();
   5097   }
   5098 
   5099   void Init(GLuint _mask) {
   5100     SetHeader();
   5101     mask = _mask;
   5102   }
   5103 
   5104   void* Set(void* cmd, GLuint _mask) {
   5105     static_cast<ValueType*>(cmd)->Init(_mask);
   5106     return NextCmdAddress<ValueType>(cmd);
   5107   }
   5108 
   5109   gpu::CommandHeader header;
   5110   uint32 mask;
   5111 };
   5112 
   5113 COMPILE_ASSERT(sizeof(StencilMask) == 8,
   5114                Sizeof_StencilMask_is_not_8);
   5115 COMPILE_ASSERT(offsetof(StencilMask, header) == 0,
   5116                OffsetOf_StencilMask_header_not_0);
   5117 COMPILE_ASSERT(offsetof(StencilMask, mask) == 4,
   5118                OffsetOf_StencilMask_mask_not_4);
   5119 
   5120 struct StencilMaskSeparate {
   5121   typedef StencilMaskSeparate ValueType;
   5122   static const CommandId kCmdId = kStencilMaskSeparate;
   5123   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5124 
   5125   static uint32 ComputeSize() {
   5126     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5127   }
   5128 
   5129   void SetHeader() {
   5130     header.SetCmd<ValueType>();
   5131   }
   5132 
   5133   void Init(GLenum _face, GLuint _mask) {
   5134     SetHeader();
   5135     face = _face;
   5136     mask = _mask;
   5137   }
   5138 
   5139   void* Set(void* cmd, GLenum _face, GLuint _mask) {
   5140     static_cast<ValueType*>(cmd)->Init(_face, _mask);
   5141     return NextCmdAddress<ValueType>(cmd);
   5142   }
   5143 
   5144   gpu::CommandHeader header;
   5145   uint32 face;
   5146   uint32 mask;
   5147 };
   5148 
   5149 COMPILE_ASSERT(sizeof(StencilMaskSeparate) == 12,
   5150                Sizeof_StencilMaskSeparate_is_not_12);
   5151 COMPILE_ASSERT(offsetof(StencilMaskSeparate, header) == 0,
   5152                OffsetOf_StencilMaskSeparate_header_not_0);
   5153 COMPILE_ASSERT(offsetof(StencilMaskSeparate, face) == 4,
   5154                OffsetOf_StencilMaskSeparate_face_not_4);
   5155 COMPILE_ASSERT(offsetof(StencilMaskSeparate, mask) == 8,
   5156                OffsetOf_StencilMaskSeparate_mask_not_8);
   5157 
   5158 struct StencilOp {
   5159   typedef StencilOp ValueType;
   5160   static const CommandId kCmdId = kStencilOp;
   5161   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5162 
   5163   static uint32 ComputeSize() {
   5164     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5165   }
   5166 
   5167   void SetHeader() {
   5168     header.SetCmd<ValueType>();
   5169   }
   5170 
   5171   void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) {
   5172     SetHeader();
   5173     fail = _fail;
   5174     zfail = _zfail;
   5175     zpass = _zpass;
   5176   }
   5177 
   5178   void* Set(void* cmd, GLenum _fail, GLenum _zfail, GLenum _zpass) {
   5179     static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass);
   5180     return NextCmdAddress<ValueType>(cmd);
   5181   }
   5182 
   5183   gpu::CommandHeader header;
   5184   uint32 fail;
   5185   uint32 zfail;
   5186   uint32 zpass;
   5187 };
   5188 
   5189 COMPILE_ASSERT(sizeof(StencilOp) == 16,
   5190                Sizeof_StencilOp_is_not_16);
   5191 COMPILE_ASSERT(offsetof(StencilOp, header) == 0,
   5192                OffsetOf_StencilOp_header_not_0);
   5193 COMPILE_ASSERT(offsetof(StencilOp, fail) == 4,
   5194                OffsetOf_StencilOp_fail_not_4);
   5195 COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8,
   5196                OffsetOf_StencilOp_zfail_not_8);
   5197 COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12,
   5198                OffsetOf_StencilOp_zpass_not_12);
   5199 
   5200 struct StencilOpSeparate {
   5201   typedef StencilOpSeparate ValueType;
   5202   static const CommandId kCmdId = kStencilOpSeparate;
   5203   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5204 
   5205   static uint32 ComputeSize() {
   5206     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5207   }
   5208 
   5209   void SetHeader() {
   5210     header.SetCmd<ValueType>();
   5211   }
   5212 
   5213   void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
   5214     SetHeader();
   5215     face = _face;
   5216     fail = _fail;
   5217     zfail = _zfail;
   5218     zpass = _zpass;
   5219   }
   5220 
   5221   void* Set(
   5222       void* cmd, GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) {
   5223     static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass);
   5224     return NextCmdAddress<ValueType>(cmd);
   5225   }
   5226 
   5227   gpu::CommandHeader header;
   5228   uint32 face;
   5229   uint32 fail;
   5230   uint32 zfail;
   5231   uint32 zpass;
   5232 };
   5233 
   5234 COMPILE_ASSERT(sizeof(StencilOpSeparate) == 20,
   5235                Sizeof_StencilOpSeparate_is_not_20);
   5236 COMPILE_ASSERT(offsetof(StencilOpSeparate, header) == 0,
   5237                OffsetOf_StencilOpSeparate_header_not_0);
   5238 COMPILE_ASSERT(offsetof(StencilOpSeparate, face) == 4,
   5239                OffsetOf_StencilOpSeparate_face_not_4);
   5240 COMPILE_ASSERT(offsetof(StencilOpSeparate, fail) == 8,
   5241                OffsetOf_StencilOpSeparate_fail_not_8);
   5242 COMPILE_ASSERT(offsetof(StencilOpSeparate, zfail) == 12,
   5243                OffsetOf_StencilOpSeparate_zfail_not_12);
   5244 COMPILE_ASSERT(offsetof(StencilOpSeparate, zpass) == 16,
   5245                OffsetOf_StencilOpSeparate_zpass_not_16);
   5246 
   5247 struct TexImage2D {
   5248   typedef TexImage2D ValueType;
   5249   static const CommandId kCmdId = kTexImage2D;
   5250   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5251 
   5252   static uint32 ComputeSize() {
   5253     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5254   }
   5255 
   5256   void SetHeader() {
   5257     header.SetCmd<ValueType>();
   5258   }
   5259 
   5260   void Init(
   5261       GLenum _target, GLint _level, GLint _internalformat, GLsizei _width,
   5262       GLsizei _height, GLint _border, GLenum _format, GLenum _type,
   5263       uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
   5264     SetHeader();
   5265     target = _target;
   5266     level = _level;
   5267     internalformat = _internalformat;
   5268     width = _width;
   5269     height = _height;
   5270     border = _border;
   5271     format = _format;
   5272     type = _type;
   5273     pixels_shm_id = _pixels_shm_id;
   5274     pixels_shm_offset = _pixels_shm_offset;
   5275   }
   5276 
   5277   void* Set(
   5278       void* cmd, GLenum _target, GLint _level, GLint _internalformat,
   5279       GLsizei _width, GLsizei _height, GLint _border, GLenum _format,
   5280       GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
   5281     static_cast<ValueType*>(
   5282         cmd)->Init(
   5283             _target, _level, _internalformat, _width, _height, _border, _format,
   5284             _type, _pixels_shm_id, _pixels_shm_offset);
   5285     return NextCmdAddress<ValueType>(cmd);
   5286   }
   5287 
   5288   gpu::CommandHeader header;
   5289   uint32 target;
   5290   int32 level;
   5291   int32 internalformat;
   5292   int32 width;
   5293   int32 height;
   5294   int32 border;
   5295   uint32 format;
   5296   uint32 type;
   5297   uint32 pixels_shm_id;
   5298   uint32 pixels_shm_offset;
   5299 };
   5300 
   5301 COMPILE_ASSERT(sizeof(TexImage2D) == 44,
   5302                Sizeof_TexImage2D_is_not_44);
   5303 COMPILE_ASSERT(offsetof(TexImage2D, header) == 0,
   5304                OffsetOf_TexImage2D_header_not_0);
   5305 COMPILE_ASSERT(offsetof(TexImage2D, target) == 4,
   5306                OffsetOf_TexImage2D_target_not_4);
   5307 COMPILE_ASSERT(offsetof(TexImage2D, level) == 8,
   5308                OffsetOf_TexImage2D_level_not_8);
   5309 COMPILE_ASSERT(offsetof(TexImage2D, internalformat) == 12,
   5310                OffsetOf_TexImage2D_internalformat_not_12);
   5311 COMPILE_ASSERT(offsetof(TexImage2D, width) == 16,
   5312                OffsetOf_TexImage2D_width_not_16);
   5313 COMPILE_ASSERT(offsetof(TexImage2D, height) == 20,
   5314                OffsetOf_TexImage2D_height_not_20);
   5315 COMPILE_ASSERT(offsetof(TexImage2D, border) == 24,
   5316                OffsetOf_TexImage2D_border_not_24);
   5317 COMPILE_ASSERT(offsetof(TexImage2D, format) == 28,
   5318                OffsetOf_TexImage2D_format_not_28);
   5319 COMPILE_ASSERT(offsetof(TexImage2D, type) == 32,
   5320                OffsetOf_TexImage2D_type_not_32);
   5321 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 36,
   5322                OffsetOf_TexImage2D_pixels_shm_id_not_36);
   5323 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 40,
   5324                OffsetOf_TexImage2D_pixels_shm_offset_not_40);
   5325 
   5326 struct TexParameterf {
   5327   typedef TexParameterf ValueType;
   5328   static const CommandId kCmdId = kTexParameterf;
   5329   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5330 
   5331   static uint32 ComputeSize() {
   5332     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5333   }
   5334 
   5335   void SetHeader() {
   5336     header.SetCmd<ValueType>();
   5337   }
   5338 
   5339   void Init(GLenum _target, GLenum _pname, GLfloat _param) {
   5340     SetHeader();
   5341     target = _target;
   5342     pname = _pname;
   5343     param = _param;
   5344   }
   5345 
   5346   void* Set(void* cmd, GLenum _target, GLenum _pname, GLfloat _param) {
   5347     static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
   5348     return NextCmdAddress<ValueType>(cmd);
   5349   }
   5350 
   5351   gpu::CommandHeader header;
   5352   uint32 target;
   5353   uint32 pname;
   5354   float param;
   5355 };
   5356 
   5357 COMPILE_ASSERT(sizeof(TexParameterf) == 16,
   5358                Sizeof_TexParameterf_is_not_16);
   5359 COMPILE_ASSERT(offsetof(TexParameterf, header) == 0,
   5360                OffsetOf_TexParameterf_header_not_0);
   5361 COMPILE_ASSERT(offsetof(TexParameterf, target) == 4,
   5362                OffsetOf_TexParameterf_target_not_4);
   5363 COMPILE_ASSERT(offsetof(TexParameterf, pname) == 8,
   5364                OffsetOf_TexParameterf_pname_not_8);
   5365 COMPILE_ASSERT(offsetof(TexParameterf, param) == 12,
   5366                OffsetOf_TexParameterf_param_not_12);
   5367 
   5368 struct TexParameterfv {
   5369   typedef TexParameterfv ValueType;
   5370   static const CommandId kCmdId = kTexParameterfv;
   5371   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5372 
   5373   static uint32 ComputeSize() {
   5374     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5375   }
   5376 
   5377   void SetHeader() {
   5378     header.SetCmd<ValueType>();
   5379   }
   5380 
   5381   void Init(
   5382       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   5383       uint32 _params_shm_offset) {
   5384     SetHeader();
   5385     target = _target;
   5386     pname = _pname;
   5387     params_shm_id = _params_shm_id;
   5388     params_shm_offset = _params_shm_offset;
   5389   }
   5390 
   5391   void* Set(
   5392       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   5393       uint32 _params_shm_offset) {
   5394     static_cast<ValueType*>(
   5395         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   5396     return NextCmdAddress<ValueType>(cmd);
   5397   }
   5398 
   5399   gpu::CommandHeader header;
   5400   uint32 target;
   5401   uint32 pname;
   5402   uint32 params_shm_id;
   5403   uint32 params_shm_offset;
   5404 };
   5405 
   5406 COMPILE_ASSERT(sizeof(TexParameterfv) == 20,
   5407                Sizeof_TexParameterfv_is_not_20);
   5408 COMPILE_ASSERT(offsetof(TexParameterfv, header) == 0,
   5409                OffsetOf_TexParameterfv_header_not_0);
   5410 COMPILE_ASSERT(offsetof(TexParameterfv, target) == 4,
   5411                OffsetOf_TexParameterfv_target_not_4);
   5412 COMPILE_ASSERT(offsetof(TexParameterfv, pname) == 8,
   5413                OffsetOf_TexParameterfv_pname_not_8);
   5414 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_id) == 12,
   5415                OffsetOf_TexParameterfv_params_shm_id_not_12);
   5416 COMPILE_ASSERT(offsetof(TexParameterfv, params_shm_offset) == 16,
   5417                OffsetOf_TexParameterfv_params_shm_offset_not_16);
   5418 
   5419 struct TexParameterfvImmediate {
   5420   typedef TexParameterfvImmediate ValueType;
   5421   static const CommandId kCmdId = kTexParameterfvImmediate;
   5422   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   5423 
   5424   static uint32 ComputeDataSize() {
   5425     return static_cast<uint32>(
   5426         sizeof(GLfloat) * 1);  // NOLINT
   5427   }
   5428 
   5429   static uint32 ComputeSize() {
   5430     return static_cast<uint32>(
   5431         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   5432   }
   5433 
   5434   void SetHeader() {
   5435     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   5436   }
   5437 
   5438   void Init(GLenum _target, GLenum _pname, const GLfloat* _params) {
   5439     SetHeader();
   5440     target = _target;
   5441     pname = _pname;
   5442     memcpy(ImmediateDataAddress(this),
   5443            _params, ComputeDataSize());
   5444   }
   5445 
   5446   void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) {
   5447     static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
   5448     const uint32 size = ComputeSize();
   5449     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   5450   }
   5451 
   5452   gpu::CommandHeader header;
   5453   uint32 target;
   5454   uint32 pname;
   5455 };
   5456 
   5457 COMPILE_ASSERT(sizeof(TexParameterfvImmediate) == 12,
   5458                Sizeof_TexParameterfvImmediate_is_not_12);
   5459 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, header) == 0,
   5460                OffsetOf_TexParameterfvImmediate_header_not_0);
   5461 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, target) == 4,
   5462                OffsetOf_TexParameterfvImmediate_target_not_4);
   5463 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, pname) == 8,
   5464                OffsetOf_TexParameterfvImmediate_pname_not_8);
   5465 
   5466 struct TexParameteri {
   5467   typedef TexParameteri ValueType;
   5468   static const CommandId kCmdId = kTexParameteri;
   5469   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5470 
   5471   static uint32 ComputeSize() {
   5472     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5473   }
   5474 
   5475   void SetHeader() {
   5476     header.SetCmd<ValueType>();
   5477   }
   5478 
   5479   void Init(GLenum _target, GLenum _pname, GLint _param) {
   5480     SetHeader();
   5481     target = _target;
   5482     pname = _pname;
   5483     param = _param;
   5484   }
   5485 
   5486   void* Set(void* cmd, GLenum _target, GLenum _pname, GLint _param) {
   5487     static_cast<ValueType*>(cmd)->Init(_target, _pname, _param);
   5488     return NextCmdAddress<ValueType>(cmd);
   5489   }
   5490 
   5491   gpu::CommandHeader header;
   5492   uint32 target;
   5493   uint32 pname;
   5494   int32 param;
   5495 };
   5496 
   5497 COMPILE_ASSERT(sizeof(TexParameteri) == 16,
   5498                Sizeof_TexParameteri_is_not_16);
   5499 COMPILE_ASSERT(offsetof(TexParameteri, header) == 0,
   5500                OffsetOf_TexParameteri_header_not_0);
   5501 COMPILE_ASSERT(offsetof(TexParameteri, target) == 4,
   5502                OffsetOf_TexParameteri_target_not_4);
   5503 COMPILE_ASSERT(offsetof(TexParameteri, pname) == 8,
   5504                OffsetOf_TexParameteri_pname_not_8);
   5505 COMPILE_ASSERT(offsetof(TexParameteri, param) == 12,
   5506                OffsetOf_TexParameteri_param_not_12);
   5507 
   5508 struct TexParameteriv {
   5509   typedef TexParameteriv ValueType;
   5510   static const CommandId kCmdId = kTexParameteriv;
   5511   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5512 
   5513   static uint32 ComputeSize() {
   5514     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5515   }
   5516 
   5517   void SetHeader() {
   5518     header.SetCmd<ValueType>();
   5519   }
   5520 
   5521   void Init(
   5522       GLenum _target, GLenum _pname, uint32 _params_shm_id,
   5523       uint32 _params_shm_offset) {
   5524     SetHeader();
   5525     target = _target;
   5526     pname = _pname;
   5527     params_shm_id = _params_shm_id;
   5528     params_shm_offset = _params_shm_offset;
   5529   }
   5530 
   5531   void* Set(
   5532       void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id,
   5533       uint32 _params_shm_offset) {
   5534     static_cast<ValueType*>(
   5535         cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset);
   5536     return NextCmdAddress<ValueType>(cmd);
   5537   }
   5538 
   5539   gpu::CommandHeader header;
   5540   uint32 target;
   5541   uint32 pname;
   5542   uint32 params_shm_id;
   5543   uint32 params_shm_offset;
   5544 };
   5545 
   5546 COMPILE_ASSERT(sizeof(TexParameteriv) == 20,
   5547                Sizeof_TexParameteriv_is_not_20);
   5548 COMPILE_ASSERT(offsetof(TexParameteriv, header) == 0,
   5549                OffsetOf_TexParameteriv_header_not_0);
   5550 COMPILE_ASSERT(offsetof(TexParameteriv, target) == 4,
   5551                OffsetOf_TexParameteriv_target_not_4);
   5552 COMPILE_ASSERT(offsetof(TexParameteriv, pname) == 8,
   5553                OffsetOf_TexParameteriv_pname_not_8);
   5554 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_id) == 12,
   5555                OffsetOf_TexParameteriv_params_shm_id_not_12);
   5556 COMPILE_ASSERT(offsetof(TexParameteriv, params_shm_offset) == 16,
   5557                OffsetOf_TexParameteriv_params_shm_offset_not_16);
   5558 
   5559 struct TexParameterivImmediate {
   5560   typedef TexParameterivImmediate ValueType;
   5561   static const CommandId kCmdId = kTexParameterivImmediate;
   5562   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   5563 
   5564   static uint32 ComputeDataSize() {
   5565     return static_cast<uint32>(
   5566         sizeof(GLint) * 1);  // NOLINT
   5567   }
   5568 
   5569   static uint32 ComputeSize() {
   5570     return static_cast<uint32>(
   5571         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   5572   }
   5573 
   5574   void SetHeader() {
   5575     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   5576   }
   5577 
   5578   void Init(GLenum _target, GLenum _pname, const GLint* _params) {
   5579     SetHeader();
   5580     target = _target;
   5581     pname = _pname;
   5582     memcpy(ImmediateDataAddress(this),
   5583            _params, ComputeDataSize());
   5584   }
   5585 
   5586   void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) {
   5587     static_cast<ValueType*>(cmd)->Init(_target, _pname, _params);
   5588     const uint32 size = ComputeSize();
   5589     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   5590   }
   5591 
   5592   gpu::CommandHeader header;
   5593   uint32 target;
   5594   uint32 pname;
   5595 };
   5596 
   5597 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12,
   5598                Sizeof_TexParameterivImmediate_is_not_12);
   5599 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0,
   5600                OffsetOf_TexParameterivImmediate_header_not_0);
   5601 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4,
   5602                OffsetOf_TexParameterivImmediate_target_not_4);
   5603 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8,
   5604                OffsetOf_TexParameterivImmediate_pname_not_8);
   5605 
   5606 struct TexSubImage2D {
   5607   typedef TexSubImage2D ValueType;
   5608   static const CommandId kCmdId = kTexSubImage2D;
   5609   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5610 
   5611   static uint32 ComputeSize() {
   5612     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5613   }
   5614 
   5615   void SetHeader() {
   5616     header.SetCmd<ValueType>();
   5617   }
   5618 
   5619   void Init(
   5620       GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   5621       GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
   5622       uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) {
   5623     SetHeader();
   5624     target = _target;
   5625     level = _level;
   5626     xoffset = _xoffset;
   5627     yoffset = _yoffset;
   5628     width = _width;
   5629     height = _height;
   5630     format = _format;
   5631     type = _type;
   5632     pixels_shm_id = _pixels_shm_id;
   5633     pixels_shm_offset = _pixels_shm_offset;
   5634     internal = _internal;
   5635   }
   5636 
   5637   void* Set(
   5638       void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   5639       GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
   5640       uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) {
   5641     static_cast<ValueType*>(
   5642         cmd)->Init(
   5643             _target, _level, _xoffset, _yoffset, _width, _height, _format,
   5644             _type, _pixels_shm_id, _pixels_shm_offset, _internal);
   5645     return NextCmdAddress<ValueType>(cmd);
   5646   }
   5647 
   5648   gpu::CommandHeader header;
   5649   uint32 target;
   5650   int32 level;
   5651   int32 xoffset;
   5652   int32 yoffset;
   5653   int32 width;
   5654   int32 height;
   5655   uint32 format;
   5656   uint32 type;
   5657   uint32 pixels_shm_id;
   5658   uint32 pixels_shm_offset;
   5659   uint32 internal;
   5660 };
   5661 
   5662 COMPILE_ASSERT(sizeof(TexSubImage2D) == 48,
   5663                Sizeof_TexSubImage2D_is_not_48);
   5664 COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0,
   5665                OffsetOf_TexSubImage2D_header_not_0);
   5666 COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4,
   5667                OffsetOf_TexSubImage2D_target_not_4);
   5668 COMPILE_ASSERT(offsetof(TexSubImage2D, level) == 8,
   5669                OffsetOf_TexSubImage2D_level_not_8);
   5670 COMPILE_ASSERT(offsetof(TexSubImage2D, xoffset) == 12,
   5671                OffsetOf_TexSubImage2D_xoffset_not_12);
   5672 COMPILE_ASSERT(offsetof(TexSubImage2D, yoffset) == 16,
   5673                OffsetOf_TexSubImage2D_yoffset_not_16);
   5674 COMPILE_ASSERT(offsetof(TexSubImage2D, width) == 20,
   5675                OffsetOf_TexSubImage2D_width_not_20);
   5676 COMPILE_ASSERT(offsetof(TexSubImage2D, height) == 24,
   5677                OffsetOf_TexSubImage2D_height_not_24);
   5678 COMPILE_ASSERT(offsetof(TexSubImage2D, format) == 28,
   5679                OffsetOf_TexSubImage2D_format_not_28);
   5680 COMPILE_ASSERT(offsetof(TexSubImage2D, type) == 32,
   5681                OffsetOf_TexSubImage2D_type_not_32);
   5682 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_id) == 36,
   5683                OffsetOf_TexSubImage2D_pixels_shm_id_not_36);
   5684 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
   5685                OffsetOf_TexSubImage2D_pixels_shm_offset_not_40);
   5686 COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44,
   5687                OffsetOf_TexSubImage2D_internal_not_44);
   5688 
   5689 struct Uniform1f {
   5690   typedef Uniform1f ValueType;
   5691   static const CommandId kCmdId = kUniform1f;
   5692   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5693 
   5694   static uint32 ComputeSize() {
   5695     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5696   }
   5697 
   5698   void SetHeader() {
   5699     header.SetCmd<ValueType>();
   5700   }
   5701 
   5702   void Init(GLint _location, GLfloat _x) {
   5703     SetHeader();
   5704     location = _location;
   5705     x = _x;
   5706   }
   5707 
   5708   void* Set(void* cmd, GLint _location, GLfloat _x) {
   5709     static_cast<ValueType*>(cmd)->Init(_location, _x);
   5710     return NextCmdAddress<ValueType>(cmd);
   5711   }
   5712 
   5713   gpu::CommandHeader header;
   5714   int32 location;
   5715   float x;
   5716 };
   5717 
   5718 COMPILE_ASSERT(sizeof(Uniform1f) == 12,
   5719                Sizeof_Uniform1f_is_not_12);
   5720 COMPILE_ASSERT(offsetof(Uniform1f, header) == 0,
   5721                OffsetOf_Uniform1f_header_not_0);
   5722 COMPILE_ASSERT(offsetof(Uniform1f, location) == 4,
   5723                OffsetOf_Uniform1f_location_not_4);
   5724 COMPILE_ASSERT(offsetof(Uniform1f, x) == 8,
   5725                OffsetOf_Uniform1f_x_not_8);
   5726 
   5727 struct Uniform1fv {
   5728   typedef Uniform1fv ValueType;
   5729   static const CommandId kCmdId = kUniform1fv;
   5730   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5731 
   5732   static uint32 ComputeSize() {
   5733     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5734   }
   5735 
   5736   void SetHeader() {
   5737     header.SetCmd<ValueType>();
   5738   }
   5739 
   5740   void Init(
   5741       GLint _location, GLsizei _count, uint32 _v_shm_id,
   5742       uint32 _v_shm_offset) {
   5743     SetHeader();
   5744     location = _location;
   5745     count = _count;
   5746     v_shm_id = _v_shm_id;
   5747     v_shm_offset = _v_shm_offset;
   5748   }
   5749 
   5750   void* Set(
   5751       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   5752       uint32 _v_shm_offset) {
   5753     static_cast<ValueType*>(
   5754         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   5755     return NextCmdAddress<ValueType>(cmd);
   5756   }
   5757 
   5758   gpu::CommandHeader header;
   5759   int32 location;
   5760   int32 count;
   5761   uint32 v_shm_id;
   5762   uint32 v_shm_offset;
   5763 };
   5764 
   5765 COMPILE_ASSERT(sizeof(Uniform1fv) == 20,
   5766                Sizeof_Uniform1fv_is_not_20);
   5767 COMPILE_ASSERT(offsetof(Uniform1fv, header) == 0,
   5768                OffsetOf_Uniform1fv_header_not_0);
   5769 COMPILE_ASSERT(offsetof(Uniform1fv, location) == 4,
   5770                OffsetOf_Uniform1fv_location_not_4);
   5771 COMPILE_ASSERT(offsetof(Uniform1fv, count) == 8,
   5772                OffsetOf_Uniform1fv_count_not_8);
   5773 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_id) == 12,
   5774                OffsetOf_Uniform1fv_v_shm_id_not_12);
   5775 COMPILE_ASSERT(offsetof(Uniform1fv, v_shm_offset) == 16,
   5776                OffsetOf_Uniform1fv_v_shm_offset_not_16);
   5777 
   5778 struct Uniform1fvImmediate {
   5779   typedef Uniform1fvImmediate ValueType;
   5780   static const CommandId kCmdId = kUniform1fvImmediate;
   5781   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   5782 
   5783   static uint32 ComputeDataSize(GLsizei count) {
   5784     return static_cast<uint32>(
   5785         sizeof(GLfloat) * 1 * count);  // NOLINT
   5786   }
   5787 
   5788   static uint32 ComputeSize(GLsizei count) {
   5789     return static_cast<uint32>(
   5790         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   5791   }
   5792 
   5793   void SetHeader(GLsizei count) {
   5794     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   5795   }
   5796 
   5797   void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
   5798     SetHeader(_count);
   5799     location = _location;
   5800     count = _count;
   5801     memcpy(ImmediateDataAddress(this),
   5802            _v, ComputeDataSize(_count));
   5803   }
   5804 
   5805   void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
   5806     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   5807     const uint32 size = ComputeSize(_count);
   5808     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   5809   }
   5810 
   5811   gpu::CommandHeader header;
   5812   int32 location;
   5813   int32 count;
   5814 };
   5815 
   5816 COMPILE_ASSERT(sizeof(Uniform1fvImmediate) == 12,
   5817                Sizeof_Uniform1fvImmediate_is_not_12);
   5818 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, header) == 0,
   5819                OffsetOf_Uniform1fvImmediate_header_not_0);
   5820 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, location) == 4,
   5821                OffsetOf_Uniform1fvImmediate_location_not_4);
   5822 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, count) == 8,
   5823                OffsetOf_Uniform1fvImmediate_count_not_8);
   5824 
   5825 struct Uniform1i {
   5826   typedef Uniform1i ValueType;
   5827   static const CommandId kCmdId = kUniform1i;
   5828   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5829 
   5830   static uint32 ComputeSize() {
   5831     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5832   }
   5833 
   5834   void SetHeader() {
   5835     header.SetCmd<ValueType>();
   5836   }
   5837 
   5838   void Init(GLint _location, GLint _x) {
   5839     SetHeader();
   5840     location = _location;
   5841     x = _x;
   5842   }
   5843 
   5844   void* Set(void* cmd, GLint _location, GLint _x) {
   5845     static_cast<ValueType*>(cmd)->Init(_location, _x);
   5846     return NextCmdAddress<ValueType>(cmd);
   5847   }
   5848 
   5849   gpu::CommandHeader header;
   5850   int32 location;
   5851   int32 x;
   5852 };
   5853 
   5854 COMPILE_ASSERT(sizeof(Uniform1i) == 12,
   5855                Sizeof_Uniform1i_is_not_12);
   5856 COMPILE_ASSERT(offsetof(Uniform1i, header) == 0,
   5857                OffsetOf_Uniform1i_header_not_0);
   5858 COMPILE_ASSERT(offsetof(Uniform1i, location) == 4,
   5859                OffsetOf_Uniform1i_location_not_4);
   5860 COMPILE_ASSERT(offsetof(Uniform1i, x) == 8,
   5861                OffsetOf_Uniform1i_x_not_8);
   5862 
   5863 struct Uniform1iv {
   5864   typedef Uniform1iv ValueType;
   5865   static const CommandId kCmdId = kUniform1iv;
   5866   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5867 
   5868   static uint32 ComputeSize() {
   5869     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5870   }
   5871 
   5872   void SetHeader() {
   5873     header.SetCmd<ValueType>();
   5874   }
   5875 
   5876   void Init(
   5877       GLint _location, GLsizei _count, uint32 _v_shm_id,
   5878       uint32 _v_shm_offset) {
   5879     SetHeader();
   5880     location = _location;
   5881     count = _count;
   5882     v_shm_id = _v_shm_id;
   5883     v_shm_offset = _v_shm_offset;
   5884   }
   5885 
   5886   void* Set(
   5887       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   5888       uint32 _v_shm_offset) {
   5889     static_cast<ValueType*>(
   5890         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   5891     return NextCmdAddress<ValueType>(cmd);
   5892   }
   5893 
   5894   gpu::CommandHeader header;
   5895   int32 location;
   5896   int32 count;
   5897   uint32 v_shm_id;
   5898   uint32 v_shm_offset;
   5899 };
   5900 
   5901 COMPILE_ASSERT(sizeof(Uniform1iv) == 20,
   5902                Sizeof_Uniform1iv_is_not_20);
   5903 COMPILE_ASSERT(offsetof(Uniform1iv, header) == 0,
   5904                OffsetOf_Uniform1iv_header_not_0);
   5905 COMPILE_ASSERT(offsetof(Uniform1iv, location) == 4,
   5906                OffsetOf_Uniform1iv_location_not_4);
   5907 COMPILE_ASSERT(offsetof(Uniform1iv, count) == 8,
   5908                OffsetOf_Uniform1iv_count_not_8);
   5909 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_id) == 12,
   5910                OffsetOf_Uniform1iv_v_shm_id_not_12);
   5911 COMPILE_ASSERT(offsetof(Uniform1iv, v_shm_offset) == 16,
   5912                OffsetOf_Uniform1iv_v_shm_offset_not_16);
   5913 
   5914 struct Uniform1ivImmediate {
   5915   typedef Uniform1ivImmediate ValueType;
   5916   static const CommandId kCmdId = kUniform1ivImmediate;
   5917   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   5918 
   5919   static uint32 ComputeDataSize(GLsizei count) {
   5920     return static_cast<uint32>(
   5921         sizeof(GLint) * 1 * count);  // NOLINT
   5922   }
   5923 
   5924   static uint32 ComputeSize(GLsizei count) {
   5925     return static_cast<uint32>(
   5926         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   5927   }
   5928 
   5929   void SetHeader(GLsizei count) {
   5930     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   5931   }
   5932 
   5933   void Init(GLint _location, GLsizei _count, const GLint* _v) {
   5934     SetHeader(_count);
   5935     location = _location;
   5936     count = _count;
   5937     memcpy(ImmediateDataAddress(this),
   5938            _v, ComputeDataSize(_count));
   5939   }
   5940 
   5941   void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
   5942     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   5943     const uint32 size = ComputeSize(_count);
   5944     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   5945   }
   5946 
   5947   gpu::CommandHeader header;
   5948   int32 location;
   5949   int32 count;
   5950 };
   5951 
   5952 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12,
   5953                Sizeof_Uniform1ivImmediate_is_not_12);
   5954 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0,
   5955                OffsetOf_Uniform1ivImmediate_header_not_0);
   5956 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4,
   5957                OffsetOf_Uniform1ivImmediate_location_not_4);
   5958 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8,
   5959                OffsetOf_Uniform1ivImmediate_count_not_8);
   5960 
   5961 struct Uniform2f {
   5962   typedef Uniform2f ValueType;
   5963   static const CommandId kCmdId = kUniform2f;
   5964   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   5965 
   5966   static uint32 ComputeSize() {
   5967     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   5968   }
   5969 
   5970   void SetHeader() {
   5971     header.SetCmd<ValueType>();
   5972   }
   5973 
   5974   void Init(GLint _location, GLfloat _x, GLfloat _y) {
   5975     SetHeader();
   5976     location = _location;
   5977     x = _x;
   5978     y = _y;
   5979   }
   5980 
   5981   void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y) {
   5982     static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
   5983     return NextCmdAddress<ValueType>(cmd);
   5984   }
   5985 
   5986   gpu::CommandHeader header;
   5987   int32 location;
   5988   float x;
   5989   float y;
   5990 };
   5991 
   5992 COMPILE_ASSERT(sizeof(Uniform2f) == 16,
   5993                Sizeof_Uniform2f_is_not_16);
   5994 COMPILE_ASSERT(offsetof(Uniform2f, header) == 0,
   5995                OffsetOf_Uniform2f_header_not_0);
   5996 COMPILE_ASSERT(offsetof(Uniform2f, location) == 4,
   5997                OffsetOf_Uniform2f_location_not_4);
   5998 COMPILE_ASSERT(offsetof(Uniform2f, x) == 8,
   5999                OffsetOf_Uniform2f_x_not_8);
   6000 COMPILE_ASSERT(offsetof(Uniform2f, y) == 12,
   6001                OffsetOf_Uniform2f_y_not_12);
   6002 
   6003 struct Uniform2fv {
   6004   typedef Uniform2fv ValueType;
   6005   static const CommandId kCmdId = kUniform2fv;
   6006   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6007 
   6008   static uint32 ComputeSize() {
   6009     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6010   }
   6011 
   6012   void SetHeader() {
   6013     header.SetCmd<ValueType>();
   6014   }
   6015 
   6016   void Init(
   6017       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6018       uint32 _v_shm_offset) {
   6019     SetHeader();
   6020     location = _location;
   6021     count = _count;
   6022     v_shm_id = _v_shm_id;
   6023     v_shm_offset = _v_shm_offset;
   6024   }
   6025 
   6026   void* Set(
   6027       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6028       uint32 _v_shm_offset) {
   6029     static_cast<ValueType*>(
   6030         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6031     return NextCmdAddress<ValueType>(cmd);
   6032   }
   6033 
   6034   gpu::CommandHeader header;
   6035   int32 location;
   6036   int32 count;
   6037   uint32 v_shm_id;
   6038   uint32 v_shm_offset;
   6039 };
   6040 
   6041 COMPILE_ASSERT(sizeof(Uniform2fv) == 20,
   6042                Sizeof_Uniform2fv_is_not_20);
   6043 COMPILE_ASSERT(offsetof(Uniform2fv, header) == 0,
   6044                OffsetOf_Uniform2fv_header_not_0);
   6045 COMPILE_ASSERT(offsetof(Uniform2fv, location) == 4,
   6046                OffsetOf_Uniform2fv_location_not_4);
   6047 COMPILE_ASSERT(offsetof(Uniform2fv, count) == 8,
   6048                OffsetOf_Uniform2fv_count_not_8);
   6049 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_id) == 12,
   6050                OffsetOf_Uniform2fv_v_shm_id_not_12);
   6051 COMPILE_ASSERT(offsetof(Uniform2fv, v_shm_offset) == 16,
   6052                OffsetOf_Uniform2fv_v_shm_offset_not_16);
   6053 
   6054 struct Uniform2fvImmediate {
   6055   typedef Uniform2fvImmediate ValueType;
   6056   static const CommandId kCmdId = kUniform2fvImmediate;
   6057   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6058 
   6059   static uint32 ComputeDataSize(GLsizei count) {
   6060     return static_cast<uint32>(
   6061         sizeof(GLfloat) * 2 * count);  // NOLINT
   6062   }
   6063 
   6064   static uint32 ComputeSize(GLsizei count) {
   6065     return static_cast<uint32>(
   6066         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6067   }
   6068 
   6069   void SetHeader(GLsizei count) {
   6070     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6071   }
   6072 
   6073   void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
   6074     SetHeader(_count);
   6075     location = _location;
   6076     count = _count;
   6077     memcpy(ImmediateDataAddress(this),
   6078            _v, ComputeDataSize(_count));
   6079   }
   6080 
   6081   void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
   6082     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6083     const uint32 size = ComputeSize(_count);
   6084     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6085   }
   6086 
   6087   gpu::CommandHeader header;
   6088   int32 location;
   6089   int32 count;
   6090 };
   6091 
   6092 COMPILE_ASSERT(sizeof(Uniform2fvImmediate) == 12,
   6093                Sizeof_Uniform2fvImmediate_is_not_12);
   6094 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, header) == 0,
   6095                OffsetOf_Uniform2fvImmediate_header_not_0);
   6096 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, location) == 4,
   6097                OffsetOf_Uniform2fvImmediate_location_not_4);
   6098 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, count) == 8,
   6099                OffsetOf_Uniform2fvImmediate_count_not_8);
   6100 
   6101 struct Uniform2i {
   6102   typedef Uniform2i ValueType;
   6103   static const CommandId kCmdId = kUniform2i;
   6104   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6105 
   6106   static uint32 ComputeSize() {
   6107     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6108   }
   6109 
   6110   void SetHeader() {
   6111     header.SetCmd<ValueType>();
   6112   }
   6113 
   6114   void Init(GLint _location, GLint _x, GLint _y) {
   6115     SetHeader();
   6116     location = _location;
   6117     x = _x;
   6118     y = _y;
   6119   }
   6120 
   6121   void* Set(void* cmd, GLint _location, GLint _x, GLint _y) {
   6122     static_cast<ValueType*>(cmd)->Init(_location, _x, _y);
   6123     return NextCmdAddress<ValueType>(cmd);
   6124   }
   6125 
   6126   gpu::CommandHeader header;
   6127   int32 location;
   6128   int32 x;
   6129   int32 y;
   6130 };
   6131 
   6132 COMPILE_ASSERT(sizeof(Uniform2i) == 16,
   6133                Sizeof_Uniform2i_is_not_16);
   6134 COMPILE_ASSERT(offsetof(Uniform2i, header) == 0,
   6135                OffsetOf_Uniform2i_header_not_0);
   6136 COMPILE_ASSERT(offsetof(Uniform2i, location) == 4,
   6137                OffsetOf_Uniform2i_location_not_4);
   6138 COMPILE_ASSERT(offsetof(Uniform2i, x) == 8,
   6139                OffsetOf_Uniform2i_x_not_8);
   6140 COMPILE_ASSERT(offsetof(Uniform2i, y) == 12,
   6141                OffsetOf_Uniform2i_y_not_12);
   6142 
   6143 struct Uniform2iv {
   6144   typedef Uniform2iv ValueType;
   6145   static const CommandId kCmdId = kUniform2iv;
   6146   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6147 
   6148   static uint32 ComputeSize() {
   6149     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6150   }
   6151 
   6152   void SetHeader() {
   6153     header.SetCmd<ValueType>();
   6154   }
   6155 
   6156   void Init(
   6157       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6158       uint32 _v_shm_offset) {
   6159     SetHeader();
   6160     location = _location;
   6161     count = _count;
   6162     v_shm_id = _v_shm_id;
   6163     v_shm_offset = _v_shm_offset;
   6164   }
   6165 
   6166   void* Set(
   6167       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6168       uint32 _v_shm_offset) {
   6169     static_cast<ValueType*>(
   6170         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6171     return NextCmdAddress<ValueType>(cmd);
   6172   }
   6173 
   6174   gpu::CommandHeader header;
   6175   int32 location;
   6176   int32 count;
   6177   uint32 v_shm_id;
   6178   uint32 v_shm_offset;
   6179 };
   6180 
   6181 COMPILE_ASSERT(sizeof(Uniform2iv) == 20,
   6182                Sizeof_Uniform2iv_is_not_20);
   6183 COMPILE_ASSERT(offsetof(Uniform2iv, header) == 0,
   6184                OffsetOf_Uniform2iv_header_not_0);
   6185 COMPILE_ASSERT(offsetof(Uniform2iv, location) == 4,
   6186                OffsetOf_Uniform2iv_location_not_4);
   6187 COMPILE_ASSERT(offsetof(Uniform2iv, count) == 8,
   6188                OffsetOf_Uniform2iv_count_not_8);
   6189 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_id) == 12,
   6190                OffsetOf_Uniform2iv_v_shm_id_not_12);
   6191 COMPILE_ASSERT(offsetof(Uniform2iv, v_shm_offset) == 16,
   6192                OffsetOf_Uniform2iv_v_shm_offset_not_16);
   6193 
   6194 struct Uniform2ivImmediate {
   6195   typedef Uniform2ivImmediate ValueType;
   6196   static const CommandId kCmdId = kUniform2ivImmediate;
   6197   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6198 
   6199   static uint32 ComputeDataSize(GLsizei count) {
   6200     return static_cast<uint32>(
   6201         sizeof(GLint) * 2 * count);  // NOLINT
   6202   }
   6203 
   6204   static uint32 ComputeSize(GLsizei count) {
   6205     return static_cast<uint32>(
   6206         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6207   }
   6208 
   6209   void SetHeader(GLsizei count) {
   6210     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6211   }
   6212 
   6213   void Init(GLint _location, GLsizei _count, const GLint* _v) {
   6214     SetHeader(_count);
   6215     location = _location;
   6216     count = _count;
   6217     memcpy(ImmediateDataAddress(this),
   6218            _v, ComputeDataSize(_count));
   6219   }
   6220 
   6221   void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
   6222     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6223     const uint32 size = ComputeSize(_count);
   6224     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6225   }
   6226 
   6227   gpu::CommandHeader header;
   6228   int32 location;
   6229   int32 count;
   6230 };
   6231 
   6232 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12,
   6233                Sizeof_Uniform2ivImmediate_is_not_12);
   6234 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0,
   6235                OffsetOf_Uniform2ivImmediate_header_not_0);
   6236 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4,
   6237                OffsetOf_Uniform2ivImmediate_location_not_4);
   6238 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8,
   6239                OffsetOf_Uniform2ivImmediate_count_not_8);
   6240 
   6241 struct Uniform3f {
   6242   typedef Uniform3f ValueType;
   6243   static const CommandId kCmdId = kUniform3f;
   6244   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6245 
   6246   static uint32 ComputeSize() {
   6247     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6248   }
   6249 
   6250   void SetHeader() {
   6251     header.SetCmd<ValueType>();
   6252   }
   6253 
   6254   void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
   6255     SetHeader();
   6256     location = _location;
   6257     x = _x;
   6258     y = _y;
   6259     z = _z;
   6260   }
   6261 
   6262   void* Set(void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) {
   6263     static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
   6264     return NextCmdAddress<ValueType>(cmd);
   6265   }
   6266 
   6267   gpu::CommandHeader header;
   6268   int32 location;
   6269   float x;
   6270   float y;
   6271   float z;
   6272 };
   6273 
   6274 COMPILE_ASSERT(sizeof(Uniform3f) == 20,
   6275                Sizeof_Uniform3f_is_not_20);
   6276 COMPILE_ASSERT(offsetof(Uniform3f, header) == 0,
   6277                OffsetOf_Uniform3f_header_not_0);
   6278 COMPILE_ASSERT(offsetof(Uniform3f, location) == 4,
   6279                OffsetOf_Uniform3f_location_not_4);
   6280 COMPILE_ASSERT(offsetof(Uniform3f, x) == 8,
   6281                OffsetOf_Uniform3f_x_not_8);
   6282 COMPILE_ASSERT(offsetof(Uniform3f, y) == 12,
   6283                OffsetOf_Uniform3f_y_not_12);
   6284 COMPILE_ASSERT(offsetof(Uniform3f, z) == 16,
   6285                OffsetOf_Uniform3f_z_not_16);
   6286 
   6287 struct Uniform3fv {
   6288   typedef Uniform3fv ValueType;
   6289   static const CommandId kCmdId = kUniform3fv;
   6290   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6291 
   6292   static uint32 ComputeSize() {
   6293     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6294   }
   6295 
   6296   void SetHeader() {
   6297     header.SetCmd<ValueType>();
   6298   }
   6299 
   6300   void Init(
   6301       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6302       uint32 _v_shm_offset) {
   6303     SetHeader();
   6304     location = _location;
   6305     count = _count;
   6306     v_shm_id = _v_shm_id;
   6307     v_shm_offset = _v_shm_offset;
   6308   }
   6309 
   6310   void* Set(
   6311       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6312       uint32 _v_shm_offset) {
   6313     static_cast<ValueType*>(
   6314         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6315     return NextCmdAddress<ValueType>(cmd);
   6316   }
   6317 
   6318   gpu::CommandHeader header;
   6319   int32 location;
   6320   int32 count;
   6321   uint32 v_shm_id;
   6322   uint32 v_shm_offset;
   6323 };
   6324 
   6325 COMPILE_ASSERT(sizeof(Uniform3fv) == 20,
   6326                Sizeof_Uniform3fv_is_not_20);
   6327 COMPILE_ASSERT(offsetof(Uniform3fv, header) == 0,
   6328                OffsetOf_Uniform3fv_header_not_0);
   6329 COMPILE_ASSERT(offsetof(Uniform3fv, location) == 4,
   6330                OffsetOf_Uniform3fv_location_not_4);
   6331 COMPILE_ASSERT(offsetof(Uniform3fv, count) == 8,
   6332                OffsetOf_Uniform3fv_count_not_8);
   6333 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_id) == 12,
   6334                OffsetOf_Uniform3fv_v_shm_id_not_12);
   6335 COMPILE_ASSERT(offsetof(Uniform3fv, v_shm_offset) == 16,
   6336                OffsetOf_Uniform3fv_v_shm_offset_not_16);
   6337 
   6338 struct Uniform3fvImmediate {
   6339   typedef Uniform3fvImmediate ValueType;
   6340   static const CommandId kCmdId = kUniform3fvImmediate;
   6341   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6342 
   6343   static uint32 ComputeDataSize(GLsizei count) {
   6344     return static_cast<uint32>(
   6345         sizeof(GLfloat) * 3 * count);  // NOLINT
   6346   }
   6347 
   6348   static uint32 ComputeSize(GLsizei count) {
   6349     return static_cast<uint32>(
   6350         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6351   }
   6352 
   6353   void SetHeader(GLsizei count) {
   6354     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6355   }
   6356 
   6357   void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
   6358     SetHeader(_count);
   6359     location = _location;
   6360     count = _count;
   6361     memcpy(ImmediateDataAddress(this),
   6362            _v, ComputeDataSize(_count));
   6363   }
   6364 
   6365   void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
   6366     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6367     const uint32 size = ComputeSize(_count);
   6368     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6369   }
   6370 
   6371   gpu::CommandHeader header;
   6372   int32 location;
   6373   int32 count;
   6374 };
   6375 
   6376 COMPILE_ASSERT(sizeof(Uniform3fvImmediate) == 12,
   6377                Sizeof_Uniform3fvImmediate_is_not_12);
   6378 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, header) == 0,
   6379                OffsetOf_Uniform3fvImmediate_header_not_0);
   6380 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, location) == 4,
   6381                OffsetOf_Uniform3fvImmediate_location_not_4);
   6382 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, count) == 8,
   6383                OffsetOf_Uniform3fvImmediate_count_not_8);
   6384 
   6385 struct Uniform3i {
   6386   typedef Uniform3i ValueType;
   6387   static const CommandId kCmdId = kUniform3i;
   6388   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6389 
   6390   static uint32 ComputeSize() {
   6391     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6392   }
   6393 
   6394   void SetHeader() {
   6395     header.SetCmd<ValueType>();
   6396   }
   6397 
   6398   void Init(GLint _location, GLint _x, GLint _y, GLint _z) {
   6399     SetHeader();
   6400     location = _location;
   6401     x = _x;
   6402     y = _y;
   6403     z = _z;
   6404   }
   6405 
   6406   void* Set(void* cmd, GLint _location, GLint _x, GLint _y, GLint _z) {
   6407     static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z);
   6408     return NextCmdAddress<ValueType>(cmd);
   6409   }
   6410 
   6411   gpu::CommandHeader header;
   6412   int32 location;
   6413   int32 x;
   6414   int32 y;
   6415   int32 z;
   6416 };
   6417 
   6418 COMPILE_ASSERT(sizeof(Uniform3i) == 20,
   6419                Sizeof_Uniform3i_is_not_20);
   6420 COMPILE_ASSERT(offsetof(Uniform3i, header) == 0,
   6421                OffsetOf_Uniform3i_header_not_0);
   6422 COMPILE_ASSERT(offsetof(Uniform3i, location) == 4,
   6423                OffsetOf_Uniform3i_location_not_4);
   6424 COMPILE_ASSERT(offsetof(Uniform3i, x) == 8,
   6425                OffsetOf_Uniform3i_x_not_8);
   6426 COMPILE_ASSERT(offsetof(Uniform3i, y) == 12,
   6427                OffsetOf_Uniform3i_y_not_12);
   6428 COMPILE_ASSERT(offsetof(Uniform3i, z) == 16,
   6429                OffsetOf_Uniform3i_z_not_16);
   6430 
   6431 struct Uniform3iv {
   6432   typedef Uniform3iv ValueType;
   6433   static const CommandId kCmdId = kUniform3iv;
   6434   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6435 
   6436   static uint32 ComputeSize() {
   6437     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6438   }
   6439 
   6440   void SetHeader() {
   6441     header.SetCmd<ValueType>();
   6442   }
   6443 
   6444   void Init(
   6445       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6446       uint32 _v_shm_offset) {
   6447     SetHeader();
   6448     location = _location;
   6449     count = _count;
   6450     v_shm_id = _v_shm_id;
   6451     v_shm_offset = _v_shm_offset;
   6452   }
   6453 
   6454   void* Set(
   6455       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6456       uint32 _v_shm_offset) {
   6457     static_cast<ValueType*>(
   6458         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6459     return NextCmdAddress<ValueType>(cmd);
   6460   }
   6461 
   6462   gpu::CommandHeader header;
   6463   int32 location;
   6464   int32 count;
   6465   uint32 v_shm_id;
   6466   uint32 v_shm_offset;
   6467 };
   6468 
   6469 COMPILE_ASSERT(sizeof(Uniform3iv) == 20,
   6470                Sizeof_Uniform3iv_is_not_20);
   6471 COMPILE_ASSERT(offsetof(Uniform3iv, header) == 0,
   6472                OffsetOf_Uniform3iv_header_not_0);
   6473 COMPILE_ASSERT(offsetof(Uniform3iv, location) == 4,
   6474                OffsetOf_Uniform3iv_location_not_4);
   6475 COMPILE_ASSERT(offsetof(Uniform3iv, count) == 8,
   6476                OffsetOf_Uniform3iv_count_not_8);
   6477 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_id) == 12,
   6478                OffsetOf_Uniform3iv_v_shm_id_not_12);
   6479 COMPILE_ASSERT(offsetof(Uniform3iv, v_shm_offset) == 16,
   6480                OffsetOf_Uniform3iv_v_shm_offset_not_16);
   6481 
   6482 struct Uniform3ivImmediate {
   6483   typedef Uniform3ivImmediate ValueType;
   6484   static const CommandId kCmdId = kUniform3ivImmediate;
   6485   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6486 
   6487   static uint32 ComputeDataSize(GLsizei count) {
   6488     return static_cast<uint32>(
   6489         sizeof(GLint) * 3 * count);  // NOLINT
   6490   }
   6491 
   6492   static uint32 ComputeSize(GLsizei count) {
   6493     return static_cast<uint32>(
   6494         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6495   }
   6496 
   6497   void SetHeader(GLsizei count) {
   6498     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6499   }
   6500 
   6501   void Init(GLint _location, GLsizei _count, const GLint* _v) {
   6502     SetHeader(_count);
   6503     location = _location;
   6504     count = _count;
   6505     memcpy(ImmediateDataAddress(this),
   6506            _v, ComputeDataSize(_count));
   6507   }
   6508 
   6509   void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
   6510     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6511     const uint32 size = ComputeSize(_count);
   6512     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6513   }
   6514 
   6515   gpu::CommandHeader header;
   6516   int32 location;
   6517   int32 count;
   6518 };
   6519 
   6520 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12,
   6521                Sizeof_Uniform3ivImmediate_is_not_12);
   6522 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0,
   6523                OffsetOf_Uniform3ivImmediate_header_not_0);
   6524 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4,
   6525                OffsetOf_Uniform3ivImmediate_location_not_4);
   6526 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8,
   6527                OffsetOf_Uniform3ivImmediate_count_not_8);
   6528 
   6529 struct Uniform4f {
   6530   typedef Uniform4f ValueType;
   6531   static const CommandId kCmdId = kUniform4f;
   6532   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6533 
   6534   static uint32 ComputeSize() {
   6535     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6536   }
   6537 
   6538   void SetHeader() {
   6539     header.SetCmd<ValueType>();
   6540   }
   6541 
   6542   void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
   6543     SetHeader();
   6544     location = _location;
   6545     x = _x;
   6546     y = _y;
   6547     z = _z;
   6548     w = _w;
   6549   }
   6550 
   6551   void* Set(
   6552       void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z,
   6553       GLfloat _w) {
   6554     static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
   6555     return NextCmdAddress<ValueType>(cmd);
   6556   }
   6557 
   6558   gpu::CommandHeader header;
   6559   int32 location;
   6560   float x;
   6561   float y;
   6562   float z;
   6563   float w;
   6564 };
   6565 
   6566 COMPILE_ASSERT(sizeof(Uniform4f) == 24,
   6567                Sizeof_Uniform4f_is_not_24);
   6568 COMPILE_ASSERT(offsetof(Uniform4f, header) == 0,
   6569                OffsetOf_Uniform4f_header_not_0);
   6570 COMPILE_ASSERT(offsetof(Uniform4f, location) == 4,
   6571                OffsetOf_Uniform4f_location_not_4);
   6572 COMPILE_ASSERT(offsetof(Uniform4f, x) == 8,
   6573                OffsetOf_Uniform4f_x_not_8);
   6574 COMPILE_ASSERT(offsetof(Uniform4f, y) == 12,
   6575                OffsetOf_Uniform4f_y_not_12);
   6576 COMPILE_ASSERT(offsetof(Uniform4f, z) == 16,
   6577                OffsetOf_Uniform4f_z_not_16);
   6578 COMPILE_ASSERT(offsetof(Uniform4f, w) == 20,
   6579                OffsetOf_Uniform4f_w_not_20);
   6580 
   6581 struct Uniform4fv {
   6582   typedef Uniform4fv ValueType;
   6583   static const CommandId kCmdId = kUniform4fv;
   6584   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6585 
   6586   static uint32 ComputeSize() {
   6587     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6588   }
   6589 
   6590   void SetHeader() {
   6591     header.SetCmd<ValueType>();
   6592   }
   6593 
   6594   void Init(
   6595       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6596       uint32 _v_shm_offset) {
   6597     SetHeader();
   6598     location = _location;
   6599     count = _count;
   6600     v_shm_id = _v_shm_id;
   6601     v_shm_offset = _v_shm_offset;
   6602   }
   6603 
   6604   void* Set(
   6605       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6606       uint32 _v_shm_offset) {
   6607     static_cast<ValueType*>(
   6608         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6609     return NextCmdAddress<ValueType>(cmd);
   6610   }
   6611 
   6612   gpu::CommandHeader header;
   6613   int32 location;
   6614   int32 count;
   6615   uint32 v_shm_id;
   6616   uint32 v_shm_offset;
   6617 };
   6618 
   6619 COMPILE_ASSERT(sizeof(Uniform4fv) == 20,
   6620                Sizeof_Uniform4fv_is_not_20);
   6621 COMPILE_ASSERT(offsetof(Uniform4fv, header) == 0,
   6622                OffsetOf_Uniform4fv_header_not_0);
   6623 COMPILE_ASSERT(offsetof(Uniform4fv, location) == 4,
   6624                OffsetOf_Uniform4fv_location_not_4);
   6625 COMPILE_ASSERT(offsetof(Uniform4fv, count) == 8,
   6626                OffsetOf_Uniform4fv_count_not_8);
   6627 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_id) == 12,
   6628                OffsetOf_Uniform4fv_v_shm_id_not_12);
   6629 COMPILE_ASSERT(offsetof(Uniform4fv, v_shm_offset) == 16,
   6630                OffsetOf_Uniform4fv_v_shm_offset_not_16);
   6631 
   6632 struct Uniform4fvImmediate {
   6633   typedef Uniform4fvImmediate ValueType;
   6634   static const CommandId kCmdId = kUniform4fvImmediate;
   6635   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6636 
   6637   static uint32 ComputeDataSize(GLsizei count) {
   6638     return static_cast<uint32>(
   6639         sizeof(GLfloat) * 4 * count);  // NOLINT
   6640   }
   6641 
   6642   static uint32 ComputeSize(GLsizei count) {
   6643     return static_cast<uint32>(
   6644         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6645   }
   6646 
   6647   void SetHeader(GLsizei count) {
   6648     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6649   }
   6650 
   6651   void Init(GLint _location, GLsizei _count, const GLfloat* _v) {
   6652     SetHeader(_count);
   6653     location = _location;
   6654     count = _count;
   6655     memcpy(ImmediateDataAddress(this),
   6656            _v, ComputeDataSize(_count));
   6657   }
   6658 
   6659   void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) {
   6660     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6661     const uint32 size = ComputeSize(_count);
   6662     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6663   }
   6664 
   6665   gpu::CommandHeader header;
   6666   int32 location;
   6667   int32 count;
   6668 };
   6669 
   6670 COMPILE_ASSERT(sizeof(Uniform4fvImmediate) == 12,
   6671                Sizeof_Uniform4fvImmediate_is_not_12);
   6672 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, header) == 0,
   6673                OffsetOf_Uniform4fvImmediate_header_not_0);
   6674 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, location) == 4,
   6675                OffsetOf_Uniform4fvImmediate_location_not_4);
   6676 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, count) == 8,
   6677                OffsetOf_Uniform4fvImmediate_count_not_8);
   6678 
   6679 struct Uniform4i {
   6680   typedef Uniform4i ValueType;
   6681   static const CommandId kCmdId = kUniform4i;
   6682   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6683 
   6684   static uint32 ComputeSize() {
   6685     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6686   }
   6687 
   6688   void SetHeader() {
   6689     header.SetCmd<ValueType>();
   6690   }
   6691 
   6692   void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
   6693     SetHeader();
   6694     location = _location;
   6695     x = _x;
   6696     y = _y;
   6697     z = _z;
   6698     w = _w;
   6699   }
   6700 
   6701   void* Set(
   6702       void* cmd, GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) {
   6703     static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w);
   6704     return NextCmdAddress<ValueType>(cmd);
   6705   }
   6706 
   6707   gpu::CommandHeader header;
   6708   int32 location;
   6709   int32 x;
   6710   int32 y;
   6711   int32 z;
   6712   int32 w;
   6713 };
   6714 
   6715 COMPILE_ASSERT(sizeof(Uniform4i) == 24,
   6716                Sizeof_Uniform4i_is_not_24);
   6717 COMPILE_ASSERT(offsetof(Uniform4i, header) == 0,
   6718                OffsetOf_Uniform4i_header_not_0);
   6719 COMPILE_ASSERT(offsetof(Uniform4i, location) == 4,
   6720                OffsetOf_Uniform4i_location_not_4);
   6721 COMPILE_ASSERT(offsetof(Uniform4i, x) == 8,
   6722                OffsetOf_Uniform4i_x_not_8);
   6723 COMPILE_ASSERT(offsetof(Uniform4i, y) == 12,
   6724                OffsetOf_Uniform4i_y_not_12);
   6725 COMPILE_ASSERT(offsetof(Uniform4i, z) == 16,
   6726                OffsetOf_Uniform4i_z_not_16);
   6727 COMPILE_ASSERT(offsetof(Uniform4i, w) == 20,
   6728                OffsetOf_Uniform4i_w_not_20);
   6729 
   6730 struct Uniform4iv {
   6731   typedef Uniform4iv ValueType;
   6732   static const CommandId kCmdId = kUniform4iv;
   6733   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6734 
   6735   static uint32 ComputeSize() {
   6736     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6737   }
   6738 
   6739   void SetHeader() {
   6740     header.SetCmd<ValueType>();
   6741   }
   6742 
   6743   void Init(
   6744       GLint _location, GLsizei _count, uint32 _v_shm_id,
   6745       uint32 _v_shm_offset) {
   6746     SetHeader();
   6747     location = _location;
   6748     count = _count;
   6749     v_shm_id = _v_shm_id;
   6750     v_shm_offset = _v_shm_offset;
   6751   }
   6752 
   6753   void* Set(
   6754       void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id,
   6755       uint32 _v_shm_offset) {
   6756     static_cast<ValueType*>(
   6757         cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset);
   6758     return NextCmdAddress<ValueType>(cmd);
   6759   }
   6760 
   6761   gpu::CommandHeader header;
   6762   int32 location;
   6763   int32 count;
   6764   uint32 v_shm_id;
   6765   uint32 v_shm_offset;
   6766 };
   6767 
   6768 COMPILE_ASSERT(sizeof(Uniform4iv) == 20,
   6769                Sizeof_Uniform4iv_is_not_20);
   6770 COMPILE_ASSERT(offsetof(Uniform4iv, header) == 0,
   6771                OffsetOf_Uniform4iv_header_not_0);
   6772 COMPILE_ASSERT(offsetof(Uniform4iv, location) == 4,
   6773                OffsetOf_Uniform4iv_location_not_4);
   6774 COMPILE_ASSERT(offsetof(Uniform4iv, count) == 8,
   6775                OffsetOf_Uniform4iv_count_not_8);
   6776 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_id) == 12,
   6777                OffsetOf_Uniform4iv_v_shm_id_not_12);
   6778 COMPILE_ASSERT(offsetof(Uniform4iv, v_shm_offset) == 16,
   6779                OffsetOf_Uniform4iv_v_shm_offset_not_16);
   6780 
   6781 struct Uniform4ivImmediate {
   6782   typedef Uniform4ivImmediate ValueType;
   6783   static const CommandId kCmdId = kUniform4ivImmediate;
   6784   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6785 
   6786   static uint32 ComputeDataSize(GLsizei count) {
   6787     return static_cast<uint32>(
   6788         sizeof(GLint) * 4 * count);  // NOLINT
   6789   }
   6790 
   6791   static uint32 ComputeSize(GLsizei count) {
   6792     return static_cast<uint32>(
   6793         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6794   }
   6795 
   6796   void SetHeader(GLsizei count) {
   6797     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6798   }
   6799 
   6800   void Init(GLint _location, GLsizei _count, const GLint* _v) {
   6801     SetHeader(_count);
   6802     location = _location;
   6803     count = _count;
   6804     memcpy(ImmediateDataAddress(this),
   6805            _v, ComputeDataSize(_count));
   6806   }
   6807 
   6808   void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) {
   6809     static_cast<ValueType*>(cmd)->Init(_location, _count, _v);
   6810     const uint32 size = ComputeSize(_count);
   6811     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6812   }
   6813 
   6814   gpu::CommandHeader header;
   6815   int32 location;
   6816   int32 count;
   6817 };
   6818 
   6819 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12,
   6820                Sizeof_Uniform4ivImmediate_is_not_12);
   6821 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0,
   6822                OffsetOf_Uniform4ivImmediate_header_not_0);
   6823 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4,
   6824                OffsetOf_Uniform4ivImmediate_location_not_4);
   6825 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8,
   6826                OffsetOf_Uniform4ivImmediate_count_not_8);
   6827 
   6828 struct UniformMatrix2fv {
   6829   typedef UniformMatrix2fv ValueType;
   6830   static const CommandId kCmdId = kUniformMatrix2fv;
   6831   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6832 
   6833   static uint32 ComputeSize() {
   6834     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6835   }
   6836 
   6837   void SetHeader() {
   6838     header.SetCmd<ValueType>();
   6839   }
   6840 
   6841   void Init(
   6842       GLint _location, GLsizei _count, GLboolean _transpose,
   6843       uint32 _value_shm_id, uint32 _value_shm_offset) {
   6844     SetHeader();
   6845     location = _location;
   6846     count = _count;
   6847     transpose = _transpose;
   6848     value_shm_id = _value_shm_id;
   6849     value_shm_offset = _value_shm_offset;
   6850   }
   6851 
   6852   void* Set(
   6853       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   6854       uint32 _value_shm_id, uint32 _value_shm_offset) {
   6855     static_cast<ValueType*>(
   6856         cmd)->Init(
   6857             _location, _count, _transpose, _value_shm_id, _value_shm_offset);
   6858     return NextCmdAddress<ValueType>(cmd);
   6859   }
   6860 
   6861   gpu::CommandHeader header;
   6862   int32 location;
   6863   int32 count;
   6864   uint32 transpose;
   6865   uint32 value_shm_id;
   6866   uint32 value_shm_offset;
   6867 };
   6868 
   6869 COMPILE_ASSERT(sizeof(UniformMatrix2fv) == 24,
   6870                Sizeof_UniformMatrix2fv_is_not_24);
   6871 COMPILE_ASSERT(offsetof(UniformMatrix2fv, header) == 0,
   6872                OffsetOf_UniformMatrix2fv_header_not_0);
   6873 COMPILE_ASSERT(offsetof(UniformMatrix2fv, location) == 4,
   6874                OffsetOf_UniformMatrix2fv_location_not_4);
   6875 COMPILE_ASSERT(offsetof(UniformMatrix2fv, count) == 8,
   6876                OffsetOf_UniformMatrix2fv_count_not_8);
   6877 COMPILE_ASSERT(offsetof(UniformMatrix2fv, transpose) == 12,
   6878                OffsetOf_UniformMatrix2fv_transpose_not_12);
   6879 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_id) == 16,
   6880                OffsetOf_UniformMatrix2fv_value_shm_id_not_16);
   6881 COMPILE_ASSERT(offsetof(UniformMatrix2fv, value_shm_offset) == 20,
   6882                OffsetOf_UniformMatrix2fv_value_shm_offset_not_20);
   6883 
   6884 struct UniformMatrix2fvImmediate {
   6885   typedef UniformMatrix2fvImmediate ValueType;
   6886   static const CommandId kCmdId = kUniformMatrix2fvImmediate;
   6887   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6888 
   6889   static uint32 ComputeDataSize(GLsizei count) {
   6890     return static_cast<uint32>(
   6891         sizeof(GLfloat) * 4 * count);  // NOLINT
   6892   }
   6893 
   6894   static uint32 ComputeSize(GLsizei count) {
   6895     return static_cast<uint32>(
   6896         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   6897   }
   6898 
   6899   void SetHeader(GLsizei count) {
   6900     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   6901   }
   6902 
   6903   void Init(
   6904       GLint _location, GLsizei _count, GLboolean _transpose,
   6905       const GLfloat* _value) {
   6906     SetHeader(_count);
   6907     location = _location;
   6908     count = _count;
   6909     transpose = _transpose;
   6910     memcpy(ImmediateDataAddress(this),
   6911            _value, ComputeDataSize(_count));
   6912   }
   6913 
   6914   void* Set(
   6915       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   6916       const GLfloat* _value) {
   6917     static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
   6918     const uint32 size = ComputeSize(_count);
   6919     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   6920   }
   6921 
   6922   gpu::CommandHeader header;
   6923   int32 location;
   6924   int32 count;
   6925   uint32 transpose;
   6926 };
   6927 
   6928 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 16,
   6929                Sizeof_UniformMatrix2fvImmediate_is_not_16);
   6930 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0,
   6931                OffsetOf_UniformMatrix2fvImmediate_header_not_0);
   6932 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4,
   6933                OffsetOf_UniformMatrix2fvImmediate_location_not_4);
   6934 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8,
   6935                OffsetOf_UniformMatrix2fvImmediate_count_not_8);
   6936 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, transpose) == 12,
   6937                OffsetOf_UniformMatrix2fvImmediate_transpose_not_12);
   6938 
   6939 struct UniformMatrix3fv {
   6940   typedef UniformMatrix3fv ValueType;
   6941   static const CommandId kCmdId = kUniformMatrix3fv;
   6942   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   6943 
   6944   static uint32 ComputeSize() {
   6945     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   6946   }
   6947 
   6948   void SetHeader() {
   6949     header.SetCmd<ValueType>();
   6950   }
   6951 
   6952   void Init(
   6953       GLint _location, GLsizei _count, GLboolean _transpose,
   6954       uint32 _value_shm_id, uint32 _value_shm_offset) {
   6955     SetHeader();
   6956     location = _location;
   6957     count = _count;
   6958     transpose = _transpose;
   6959     value_shm_id = _value_shm_id;
   6960     value_shm_offset = _value_shm_offset;
   6961   }
   6962 
   6963   void* Set(
   6964       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   6965       uint32 _value_shm_id, uint32 _value_shm_offset) {
   6966     static_cast<ValueType*>(
   6967         cmd)->Init(
   6968             _location, _count, _transpose, _value_shm_id, _value_shm_offset);
   6969     return NextCmdAddress<ValueType>(cmd);
   6970   }
   6971 
   6972   gpu::CommandHeader header;
   6973   int32 location;
   6974   int32 count;
   6975   uint32 transpose;
   6976   uint32 value_shm_id;
   6977   uint32 value_shm_offset;
   6978 };
   6979 
   6980 COMPILE_ASSERT(sizeof(UniformMatrix3fv) == 24,
   6981                Sizeof_UniformMatrix3fv_is_not_24);
   6982 COMPILE_ASSERT(offsetof(UniformMatrix3fv, header) == 0,
   6983                OffsetOf_UniformMatrix3fv_header_not_0);
   6984 COMPILE_ASSERT(offsetof(UniformMatrix3fv, location) == 4,
   6985                OffsetOf_UniformMatrix3fv_location_not_4);
   6986 COMPILE_ASSERT(offsetof(UniformMatrix3fv, count) == 8,
   6987                OffsetOf_UniformMatrix3fv_count_not_8);
   6988 COMPILE_ASSERT(offsetof(UniformMatrix3fv, transpose) == 12,
   6989                OffsetOf_UniformMatrix3fv_transpose_not_12);
   6990 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_id) == 16,
   6991                OffsetOf_UniformMatrix3fv_value_shm_id_not_16);
   6992 COMPILE_ASSERT(offsetof(UniformMatrix3fv, value_shm_offset) == 20,
   6993                OffsetOf_UniformMatrix3fv_value_shm_offset_not_20);
   6994 
   6995 struct UniformMatrix3fvImmediate {
   6996   typedef UniformMatrix3fvImmediate ValueType;
   6997   static const CommandId kCmdId = kUniformMatrix3fvImmediate;
   6998   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   6999 
   7000   static uint32 ComputeDataSize(GLsizei count) {
   7001     return static_cast<uint32>(
   7002         sizeof(GLfloat) * 9 * count);  // NOLINT
   7003   }
   7004 
   7005   static uint32 ComputeSize(GLsizei count) {
   7006     return static_cast<uint32>(
   7007         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   7008   }
   7009 
   7010   void SetHeader(GLsizei count) {
   7011     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   7012   }
   7013 
   7014   void Init(
   7015       GLint _location, GLsizei _count, GLboolean _transpose,
   7016       const GLfloat* _value) {
   7017     SetHeader(_count);
   7018     location = _location;
   7019     count = _count;
   7020     transpose = _transpose;
   7021     memcpy(ImmediateDataAddress(this),
   7022            _value, ComputeDataSize(_count));
   7023   }
   7024 
   7025   void* Set(
   7026       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   7027       const GLfloat* _value) {
   7028     static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
   7029     const uint32 size = ComputeSize(_count);
   7030     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7031   }
   7032 
   7033   gpu::CommandHeader header;
   7034   int32 location;
   7035   int32 count;
   7036   uint32 transpose;
   7037 };
   7038 
   7039 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 16,
   7040                Sizeof_UniformMatrix3fvImmediate_is_not_16);
   7041 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0,
   7042                OffsetOf_UniformMatrix3fvImmediate_header_not_0);
   7043 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4,
   7044                OffsetOf_UniformMatrix3fvImmediate_location_not_4);
   7045 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8,
   7046                OffsetOf_UniformMatrix3fvImmediate_count_not_8);
   7047 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, transpose) == 12,
   7048                OffsetOf_UniformMatrix3fvImmediate_transpose_not_12);
   7049 
   7050 struct UniformMatrix4fv {
   7051   typedef UniformMatrix4fv ValueType;
   7052   static const CommandId kCmdId = kUniformMatrix4fv;
   7053   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7054 
   7055   static uint32 ComputeSize() {
   7056     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7057   }
   7058 
   7059   void SetHeader() {
   7060     header.SetCmd<ValueType>();
   7061   }
   7062 
   7063   void Init(
   7064       GLint _location, GLsizei _count, GLboolean _transpose,
   7065       uint32 _value_shm_id, uint32 _value_shm_offset) {
   7066     SetHeader();
   7067     location = _location;
   7068     count = _count;
   7069     transpose = _transpose;
   7070     value_shm_id = _value_shm_id;
   7071     value_shm_offset = _value_shm_offset;
   7072   }
   7073 
   7074   void* Set(
   7075       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   7076       uint32 _value_shm_id, uint32 _value_shm_offset) {
   7077     static_cast<ValueType*>(
   7078         cmd)->Init(
   7079             _location, _count, _transpose, _value_shm_id, _value_shm_offset);
   7080     return NextCmdAddress<ValueType>(cmd);
   7081   }
   7082 
   7083   gpu::CommandHeader header;
   7084   int32 location;
   7085   int32 count;
   7086   uint32 transpose;
   7087   uint32 value_shm_id;
   7088   uint32 value_shm_offset;
   7089 };
   7090 
   7091 COMPILE_ASSERT(sizeof(UniformMatrix4fv) == 24,
   7092                Sizeof_UniformMatrix4fv_is_not_24);
   7093 COMPILE_ASSERT(offsetof(UniformMatrix4fv, header) == 0,
   7094                OffsetOf_UniformMatrix4fv_header_not_0);
   7095 COMPILE_ASSERT(offsetof(UniformMatrix4fv, location) == 4,
   7096                OffsetOf_UniformMatrix4fv_location_not_4);
   7097 COMPILE_ASSERT(offsetof(UniformMatrix4fv, count) == 8,
   7098                OffsetOf_UniformMatrix4fv_count_not_8);
   7099 COMPILE_ASSERT(offsetof(UniformMatrix4fv, transpose) == 12,
   7100                OffsetOf_UniformMatrix4fv_transpose_not_12);
   7101 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_id) == 16,
   7102                OffsetOf_UniformMatrix4fv_value_shm_id_not_16);
   7103 COMPILE_ASSERT(offsetof(UniformMatrix4fv, value_shm_offset) == 20,
   7104                OffsetOf_UniformMatrix4fv_value_shm_offset_not_20);
   7105 
   7106 struct UniformMatrix4fvImmediate {
   7107   typedef UniformMatrix4fvImmediate ValueType;
   7108   static const CommandId kCmdId = kUniformMatrix4fvImmediate;
   7109   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   7110 
   7111   static uint32 ComputeDataSize(GLsizei count) {
   7112     return static_cast<uint32>(
   7113         sizeof(GLfloat) * 16 * count);  // NOLINT
   7114   }
   7115 
   7116   static uint32 ComputeSize(GLsizei count) {
   7117     return static_cast<uint32>(
   7118         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   7119   }
   7120 
   7121   void SetHeader(GLsizei count) {
   7122     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   7123   }
   7124 
   7125   void Init(
   7126       GLint _location, GLsizei _count, GLboolean _transpose,
   7127       const GLfloat* _value) {
   7128     SetHeader(_count);
   7129     location = _location;
   7130     count = _count;
   7131     transpose = _transpose;
   7132     memcpy(ImmediateDataAddress(this),
   7133            _value, ComputeDataSize(_count));
   7134   }
   7135 
   7136   void* Set(
   7137       void* cmd, GLint _location, GLsizei _count, GLboolean _transpose,
   7138       const GLfloat* _value) {
   7139     static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value);
   7140     const uint32 size = ComputeSize(_count);
   7141     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7142   }
   7143 
   7144   gpu::CommandHeader header;
   7145   int32 location;
   7146   int32 count;
   7147   uint32 transpose;
   7148 };
   7149 
   7150 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 16,
   7151                Sizeof_UniformMatrix4fvImmediate_is_not_16);
   7152 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0,
   7153                OffsetOf_UniformMatrix4fvImmediate_header_not_0);
   7154 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4,
   7155                OffsetOf_UniformMatrix4fvImmediate_location_not_4);
   7156 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8,
   7157                OffsetOf_UniformMatrix4fvImmediate_count_not_8);
   7158 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, transpose) == 12,
   7159                OffsetOf_UniformMatrix4fvImmediate_transpose_not_12);
   7160 
   7161 struct UseProgram {
   7162   typedef UseProgram ValueType;
   7163   static const CommandId kCmdId = kUseProgram;
   7164   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7165 
   7166   static uint32 ComputeSize() {
   7167     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7168   }
   7169 
   7170   void SetHeader() {
   7171     header.SetCmd<ValueType>();
   7172   }
   7173 
   7174   void Init(GLuint _program) {
   7175     SetHeader();
   7176     program = _program;
   7177   }
   7178 
   7179   void* Set(void* cmd, GLuint _program) {
   7180     static_cast<ValueType*>(cmd)->Init(_program);
   7181     return NextCmdAddress<ValueType>(cmd);
   7182   }
   7183 
   7184   gpu::CommandHeader header;
   7185   uint32 program;
   7186 };
   7187 
   7188 COMPILE_ASSERT(sizeof(UseProgram) == 8,
   7189                Sizeof_UseProgram_is_not_8);
   7190 COMPILE_ASSERT(offsetof(UseProgram, header) == 0,
   7191                OffsetOf_UseProgram_header_not_0);
   7192 COMPILE_ASSERT(offsetof(UseProgram, program) == 4,
   7193                OffsetOf_UseProgram_program_not_4);
   7194 
   7195 struct ValidateProgram {
   7196   typedef ValidateProgram ValueType;
   7197   static const CommandId kCmdId = kValidateProgram;
   7198   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7199 
   7200   static uint32 ComputeSize() {
   7201     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7202   }
   7203 
   7204   void SetHeader() {
   7205     header.SetCmd<ValueType>();
   7206   }
   7207 
   7208   void Init(GLuint _program) {
   7209     SetHeader();
   7210     program = _program;
   7211   }
   7212 
   7213   void* Set(void* cmd, GLuint _program) {
   7214     static_cast<ValueType*>(cmd)->Init(_program);
   7215     return NextCmdAddress<ValueType>(cmd);
   7216   }
   7217 
   7218   gpu::CommandHeader header;
   7219   uint32 program;
   7220 };
   7221 
   7222 COMPILE_ASSERT(sizeof(ValidateProgram) == 8,
   7223                Sizeof_ValidateProgram_is_not_8);
   7224 COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0,
   7225                OffsetOf_ValidateProgram_header_not_0);
   7226 COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4,
   7227                OffsetOf_ValidateProgram_program_not_4);
   7228 
   7229 struct VertexAttrib1f {
   7230   typedef VertexAttrib1f ValueType;
   7231   static const CommandId kCmdId = kVertexAttrib1f;
   7232   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7233 
   7234   static uint32 ComputeSize() {
   7235     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7236   }
   7237 
   7238   void SetHeader() {
   7239     header.SetCmd<ValueType>();
   7240   }
   7241 
   7242   void Init(GLuint _indx, GLfloat _x) {
   7243     SetHeader();
   7244     indx = _indx;
   7245     x = _x;
   7246   }
   7247 
   7248   void* Set(void* cmd, GLuint _indx, GLfloat _x) {
   7249     static_cast<ValueType*>(cmd)->Init(_indx, _x);
   7250     return NextCmdAddress<ValueType>(cmd);
   7251   }
   7252 
   7253   gpu::CommandHeader header;
   7254   uint32 indx;
   7255   float x;
   7256 };
   7257 
   7258 COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12,
   7259                Sizeof_VertexAttrib1f_is_not_12);
   7260 COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0,
   7261                OffsetOf_VertexAttrib1f_header_not_0);
   7262 COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4,
   7263                OffsetOf_VertexAttrib1f_indx_not_4);
   7264 COMPILE_ASSERT(offsetof(VertexAttrib1f, x) == 8,
   7265                OffsetOf_VertexAttrib1f_x_not_8);
   7266 
   7267 struct VertexAttrib1fv {
   7268   typedef VertexAttrib1fv ValueType;
   7269   static const CommandId kCmdId = kVertexAttrib1fv;
   7270   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7271 
   7272   static uint32 ComputeSize() {
   7273     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7274   }
   7275 
   7276   void SetHeader() {
   7277     header.SetCmd<ValueType>();
   7278   }
   7279 
   7280   void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
   7281     SetHeader();
   7282     indx = _indx;
   7283     values_shm_id = _values_shm_id;
   7284     values_shm_offset = _values_shm_offset;
   7285   }
   7286 
   7287   void* Set(
   7288       void* cmd, GLuint _indx, uint32 _values_shm_id,
   7289       uint32 _values_shm_offset) {
   7290     static_cast<ValueType*>(
   7291         cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
   7292     return NextCmdAddress<ValueType>(cmd);
   7293   }
   7294 
   7295   gpu::CommandHeader header;
   7296   uint32 indx;
   7297   uint32 values_shm_id;
   7298   uint32 values_shm_offset;
   7299 };
   7300 
   7301 COMPILE_ASSERT(sizeof(VertexAttrib1fv) == 16,
   7302                Sizeof_VertexAttrib1fv_is_not_16);
   7303 COMPILE_ASSERT(offsetof(VertexAttrib1fv, header) == 0,
   7304                OffsetOf_VertexAttrib1fv_header_not_0);
   7305 COMPILE_ASSERT(offsetof(VertexAttrib1fv, indx) == 4,
   7306                OffsetOf_VertexAttrib1fv_indx_not_4);
   7307 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_id) == 8,
   7308                OffsetOf_VertexAttrib1fv_values_shm_id_not_8);
   7309 COMPILE_ASSERT(offsetof(VertexAttrib1fv, values_shm_offset) == 12,
   7310                OffsetOf_VertexAttrib1fv_values_shm_offset_not_12);
   7311 
   7312 struct VertexAttrib1fvImmediate {
   7313   typedef VertexAttrib1fvImmediate ValueType;
   7314   static const CommandId kCmdId = kVertexAttrib1fvImmediate;
   7315   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   7316 
   7317   static uint32 ComputeDataSize() {
   7318     return static_cast<uint32>(
   7319         sizeof(GLfloat) * 1);  // NOLINT
   7320   }
   7321 
   7322   static uint32 ComputeSize() {
   7323     return static_cast<uint32>(
   7324         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   7325   }
   7326 
   7327   void SetHeader() {
   7328     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   7329   }
   7330 
   7331   void Init(GLuint _indx, const GLfloat* _values) {
   7332     SetHeader();
   7333     indx = _indx;
   7334     memcpy(ImmediateDataAddress(this),
   7335            _values, ComputeDataSize());
   7336   }
   7337 
   7338   void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
   7339     static_cast<ValueType*>(cmd)->Init(_indx, _values);
   7340     const uint32 size = ComputeSize();
   7341     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7342   }
   7343 
   7344   gpu::CommandHeader header;
   7345   uint32 indx;
   7346 };
   7347 
   7348 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate) == 8,
   7349                Sizeof_VertexAttrib1fvImmediate_is_not_8);
   7350 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, header) == 0,
   7351                OffsetOf_VertexAttrib1fvImmediate_header_not_0);
   7352 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, indx) == 4,
   7353                OffsetOf_VertexAttrib1fvImmediate_indx_not_4);
   7354 
   7355 struct VertexAttrib2f {
   7356   typedef VertexAttrib2f ValueType;
   7357   static const CommandId kCmdId = kVertexAttrib2f;
   7358   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7359 
   7360   static uint32 ComputeSize() {
   7361     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7362   }
   7363 
   7364   void SetHeader() {
   7365     header.SetCmd<ValueType>();
   7366   }
   7367 
   7368   void Init(GLuint _indx, GLfloat _x, GLfloat _y) {
   7369     SetHeader();
   7370     indx = _indx;
   7371     x = _x;
   7372     y = _y;
   7373   }
   7374 
   7375   void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y) {
   7376     static_cast<ValueType*>(cmd)->Init(_indx, _x, _y);
   7377     return NextCmdAddress<ValueType>(cmd);
   7378   }
   7379 
   7380   gpu::CommandHeader header;
   7381   uint32 indx;
   7382   float x;
   7383   float y;
   7384 };
   7385 
   7386 COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16,
   7387                Sizeof_VertexAttrib2f_is_not_16);
   7388 COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0,
   7389                OffsetOf_VertexAttrib2f_header_not_0);
   7390 COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4,
   7391                OffsetOf_VertexAttrib2f_indx_not_4);
   7392 COMPILE_ASSERT(offsetof(VertexAttrib2f, x) == 8,
   7393                OffsetOf_VertexAttrib2f_x_not_8);
   7394 COMPILE_ASSERT(offsetof(VertexAttrib2f, y) == 12,
   7395                OffsetOf_VertexAttrib2f_y_not_12);
   7396 
   7397 struct VertexAttrib2fv {
   7398   typedef VertexAttrib2fv ValueType;
   7399   static const CommandId kCmdId = kVertexAttrib2fv;
   7400   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7401 
   7402   static uint32 ComputeSize() {
   7403     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7404   }
   7405 
   7406   void SetHeader() {
   7407     header.SetCmd<ValueType>();
   7408   }
   7409 
   7410   void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
   7411     SetHeader();
   7412     indx = _indx;
   7413     values_shm_id = _values_shm_id;
   7414     values_shm_offset = _values_shm_offset;
   7415   }
   7416 
   7417   void* Set(
   7418       void* cmd, GLuint _indx, uint32 _values_shm_id,
   7419       uint32 _values_shm_offset) {
   7420     static_cast<ValueType*>(
   7421         cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
   7422     return NextCmdAddress<ValueType>(cmd);
   7423   }
   7424 
   7425   gpu::CommandHeader header;
   7426   uint32 indx;
   7427   uint32 values_shm_id;
   7428   uint32 values_shm_offset;
   7429 };
   7430 
   7431 COMPILE_ASSERT(sizeof(VertexAttrib2fv) == 16,
   7432                Sizeof_VertexAttrib2fv_is_not_16);
   7433 COMPILE_ASSERT(offsetof(VertexAttrib2fv, header) == 0,
   7434                OffsetOf_VertexAttrib2fv_header_not_0);
   7435 COMPILE_ASSERT(offsetof(VertexAttrib2fv, indx) == 4,
   7436                OffsetOf_VertexAttrib2fv_indx_not_4);
   7437 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_id) == 8,
   7438                OffsetOf_VertexAttrib2fv_values_shm_id_not_8);
   7439 COMPILE_ASSERT(offsetof(VertexAttrib2fv, values_shm_offset) == 12,
   7440                OffsetOf_VertexAttrib2fv_values_shm_offset_not_12);
   7441 
   7442 struct VertexAttrib2fvImmediate {
   7443   typedef VertexAttrib2fvImmediate ValueType;
   7444   static const CommandId kCmdId = kVertexAttrib2fvImmediate;
   7445   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   7446 
   7447   static uint32 ComputeDataSize() {
   7448     return static_cast<uint32>(
   7449         sizeof(GLfloat) * 2);  // NOLINT
   7450   }
   7451 
   7452   static uint32 ComputeSize() {
   7453     return static_cast<uint32>(
   7454         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   7455   }
   7456 
   7457   void SetHeader() {
   7458     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   7459   }
   7460 
   7461   void Init(GLuint _indx, const GLfloat* _values) {
   7462     SetHeader();
   7463     indx = _indx;
   7464     memcpy(ImmediateDataAddress(this),
   7465            _values, ComputeDataSize());
   7466   }
   7467 
   7468   void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
   7469     static_cast<ValueType*>(cmd)->Init(_indx, _values);
   7470     const uint32 size = ComputeSize();
   7471     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7472   }
   7473 
   7474   gpu::CommandHeader header;
   7475   uint32 indx;
   7476 };
   7477 
   7478 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate) == 8,
   7479                Sizeof_VertexAttrib2fvImmediate_is_not_8);
   7480 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, header) == 0,
   7481                OffsetOf_VertexAttrib2fvImmediate_header_not_0);
   7482 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, indx) == 4,
   7483                OffsetOf_VertexAttrib2fvImmediate_indx_not_4);
   7484 
   7485 struct VertexAttrib3f {
   7486   typedef VertexAttrib3f ValueType;
   7487   static const CommandId kCmdId = kVertexAttrib3f;
   7488   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7489 
   7490   static uint32 ComputeSize() {
   7491     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7492   }
   7493 
   7494   void SetHeader() {
   7495     header.SetCmd<ValueType>();
   7496   }
   7497 
   7498   void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
   7499     SetHeader();
   7500     indx = _indx;
   7501     x = _x;
   7502     y = _y;
   7503     z = _z;
   7504   }
   7505 
   7506   void* Set(void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) {
   7507     static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z);
   7508     return NextCmdAddress<ValueType>(cmd);
   7509   }
   7510 
   7511   gpu::CommandHeader header;
   7512   uint32 indx;
   7513   float x;
   7514   float y;
   7515   float z;
   7516 };
   7517 
   7518 COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20,
   7519                Sizeof_VertexAttrib3f_is_not_20);
   7520 COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0,
   7521                OffsetOf_VertexAttrib3f_header_not_0);
   7522 COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4,
   7523                OffsetOf_VertexAttrib3f_indx_not_4);
   7524 COMPILE_ASSERT(offsetof(VertexAttrib3f, x) == 8,
   7525                OffsetOf_VertexAttrib3f_x_not_8);
   7526 COMPILE_ASSERT(offsetof(VertexAttrib3f, y) == 12,
   7527                OffsetOf_VertexAttrib3f_y_not_12);
   7528 COMPILE_ASSERT(offsetof(VertexAttrib3f, z) == 16,
   7529                OffsetOf_VertexAttrib3f_z_not_16);
   7530 
   7531 struct VertexAttrib3fv {
   7532   typedef VertexAttrib3fv ValueType;
   7533   static const CommandId kCmdId = kVertexAttrib3fv;
   7534   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7535 
   7536   static uint32 ComputeSize() {
   7537     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7538   }
   7539 
   7540   void SetHeader() {
   7541     header.SetCmd<ValueType>();
   7542   }
   7543 
   7544   void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
   7545     SetHeader();
   7546     indx = _indx;
   7547     values_shm_id = _values_shm_id;
   7548     values_shm_offset = _values_shm_offset;
   7549   }
   7550 
   7551   void* Set(
   7552       void* cmd, GLuint _indx, uint32 _values_shm_id,
   7553       uint32 _values_shm_offset) {
   7554     static_cast<ValueType*>(
   7555         cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
   7556     return NextCmdAddress<ValueType>(cmd);
   7557   }
   7558 
   7559   gpu::CommandHeader header;
   7560   uint32 indx;
   7561   uint32 values_shm_id;
   7562   uint32 values_shm_offset;
   7563 };
   7564 
   7565 COMPILE_ASSERT(sizeof(VertexAttrib3fv) == 16,
   7566                Sizeof_VertexAttrib3fv_is_not_16);
   7567 COMPILE_ASSERT(offsetof(VertexAttrib3fv, header) == 0,
   7568                OffsetOf_VertexAttrib3fv_header_not_0);
   7569 COMPILE_ASSERT(offsetof(VertexAttrib3fv, indx) == 4,
   7570                OffsetOf_VertexAttrib3fv_indx_not_4);
   7571 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_id) == 8,
   7572                OffsetOf_VertexAttrib3fv_values_shm_id_not_8);
   7573 COMPILE_ASSERT(offsetof(VertexAttrib3fv, values_shm_offset) == 12,
   7574                OffsetOf_VertexAttrib3fv_values_shm_offset_not_12);
   7575 
   7576 struct VertexAttrib3fvImmediate {
   7577   typedef VertexAttrib3fvImmediate ValueType;
   7578   static const CommandId kCmdId = kVertexAttrib3fvImmediate;
   7579   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   7580 
   7581   static uint32 ComputeDataSize() {
   7582     return static_cast<uint32>(
   7583         sizeof(GLfloat) * 3);  // NOLINT
   7584   }
   7585 
   7586   static uint32 ComputeSize() {
   7587     return static_cast<uint32>(
   7588         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   7589   }
   7590 
   7591   void SetHeader() {
   7592     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   7593   }
   7594 
   7595   void Init(GLuint _indx, const GLfloat* _values) {
   7596     SetHeader();
   7597     indx = _indx;
   7598     memcpy(ImmediateDataAddress(this),
   7599            _values, ComputeDataSize());
   7600   }
   7601 
   7602   void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
   7603     static_cast<ValueType*>(cmd)->Init(_indx, _values);
   7604     const uint32 size = ComputeSize();
   7605     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7606   }
   7607 
   7608   gpu::CommandHeader header;
   7609   uint32 indx;
   7610 };
   7611 
   7612 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate) == 8,
   7613                Sizeof_VertexAttrib3fvImmediate_is_not_8);
   7614 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, header) == 0,
   7615                OffsetOf_VertexAttrib3fvImmediate_header_not_0);
   7616 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, indx) == 4,
   7617                OffsetOf_VertexAttrib3fvImmediate_indx_not_4);
   7618 
   7619 struct VertexAttrib4f {
   7620   typedef VertexAttrib4f ValueType;
   7621   static const CommandId kCmdId = kVertexAttrib4f;
   7622   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7623 
   7624   static uint32 ComputeSize() {
   7625     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7626   }
   7627 
   7628   void SetHeader() {
   7629     header.SetCmd<ValueType>();
   7630   }
   7631 
   7632   void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) {
   7633     SetHeader();
   7634     indx = _indx;
   7635     x = _x;
   7636     y = _y;
   7637     z = _z;
   7638     w = _w;
   7639   }
   7640 
   7641   void* Set(
   7642       void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z,
   7643       GLfloat _w) {
   7644     static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w);
   7645     return NextCmdAddress<ValueType>(cmd);
   7646   }
   7647 
   7648   gpu::CommandHeader header;
   7649   uint32 indx;
   7650   float x;
   7651   float y;
   7652   float z;
   7653   float w;
   7654 };
   7655 
   7656 COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24,
   7657                Sizeof_VertexAttrib4f_is_not_24);
   7658 COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0,
   7659                OffsetOf_VertexAttrib4f_header_not_0);
   7660 COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4,
   7661                OffsetOf_VertexAttrib4f_indx_not_4);
   7662 COMPILE_ASSERT(offsetof(VertexAttrib4f, x) == 8,
   7663                OffsetOf_VertexAttrib4f_x_not_8);
   7664 COMPILE_ASSERT(offsetof(VertexAttrib4f, y) == 12,
   7665                OffsetOf_VertexAttrib4f_y_not_12);
   7666 COMPILE_ASSERT(offsetof(VertexAttrib4f, z) == 16,
   7667                OffsetOf_VertexAttrib4f_z_not_16);
   7668 COMPILE_ASSERT(offsetof(VertexAttrib4f, w) == 20,
   7669                OffsetOf_VertexAttrib4f_w_not_20);
   7670 
   7671 struct VertexAttrib4fv {
   7672   typedef VertexAttrib4fv ValueType;
   7673   static const CommandId kCmdId = kVertexAttrib4fv;
   7674   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7675 
   7676   static uint32 ComputeSize() {
   7677     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7678   }
   7679 
   7680   void SetHeader() {
   7681     header.SetCmd<ValueType>();
   7682   }
   7683 
   7684   void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) {
   7685     SetHeader();
   7686     indx = _indx;
   7687     values_shm_id = _values_shm_id;
   7688     values_shm_offset = _values_shm_offset;
   7689   }
   7690 
   7691   void* Set(
   7692       void* cmd, GLuint _indx, uint32 _values_shm_id,
   7693       uint32 _values_shm_offset) {
   7694     static_cast<ValueType*>(
   7695         cmd)->Init(_indx, _values_shm_id, _values_shm_offset);
   7696     return NextCmdAddress<ValueType>(cmd);
   7697   }
   7698 
   7699   gpu::CommandHeader header;
   7700   uint32 indx;
   7701   uint32 values_shm_id;
   7702   uint32 values_shm_offset;
   7703 };
   7704 
   7705 COMPILE_ASSERT(sizeof(VertexAttrib4fv) == 16,
   7706                Sizeof_VertexAttrib4fv_is_not_16);
   7707 COMPILE_ASSERT(offsetof(VertexAttrib4fv, header) == 0,
   7708                OffsetOf_VertexAttrib4fv_header_not_0);
   7709 COMPILE_ASSERT(offsetof(VertexAttrib4fv, indx) == 4,
   7710                OffsetOf_VertexAttrib4fv_indx_not_4);
   7711 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_id) == 8,
   7712                OffsetOf_VertexAttrib4fv_values_shm_id_not_8);
   7713 COMPILE_ASSERT(offsetof(VertexAttrib4fv, values_shm_offset) == 12,
   7714                OffsetOf_VertexAttrib4fv_values_shm_offset_not_12);
   7715 
   7716 struct VertexAttrib4fvImmediate {
   7717   typedef VertexAttrib4fvImmediate ValueType;
   7718   static const CommandId kCmdId = kVertexAttrib4fvImmediate;
   7719   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   7720 
   7721   static uint32 ComputeDataSize() {
   7722     return static_cast<uint32>(
   7723         sizeof(GLfloat) * 4);  // NOLINT
   7724   }
   7725 
   7726   static uint32 ComputeSize() {
   7727     return static_cast<uint32>(
   7728         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   7729   }
   7730 
   7731   void SetHeader() {
   7732     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   7733   }
   7734 
   7735   void Init(GLuint _indx, const GLfloat* _values) {
   7736     SetHeader();
   7737     indx = _indx;
   7738     memcpy(ImmediateDataAddress(this),
   7739            _values, ComputeDataSize());
   7740   }
   7741 
   7742   void* Set(void* cmd, GLuint _indx, const GLfloat* _values) {
   7743     static_cast<ValueType*>(cmd)->Init(_indx, _values);
   7744     const uint32 size = ComputeSize();
   7745     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   7746   }
   7747 
   7748   gpu::CommandHeader header;
   7749   uint32 indx;
   7750 };
   7751 
   7752 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8,
   7753                Sizeof_VertexAttrib4fvImmediate_is_not_8);
   7754 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0,
   7755                OffsetOf_VertexAttrib4fvImmediate_header_not_0);
   7756 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4,
   7757                OffsetOf_VertexAttrib4fvImmediate_indx_not_4);
   7758 
   7759 struct VertexAttribPointer {
   7760   typedef VertexAttribPointer ValueType;
   7761   static const CommandId kCmdId = kVertexAttribPointer;
   7762   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7763 
   7764   static uint32 ComputeSize() {
   7765     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7766   }
   7767 
   7768   void SetHeader() {
   7769     header.SetCmd<ValueType>();
   7770   }
   7771 
   7772   void Init(
   7773       GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized,
   7774       GLsizei _stride, GLuint _offset) {
   7775     SetHeader();
   7776     indx = _indx;
   7777     size = _size;
   7778     type = _type;
   7779     normalized = _normalized;
   7780     stride = _stride;
   7781     offset = _offset;
   7782   }
   7783 
   7784   void* Set(
   7785       void* cmd, GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized,
   7786       GLsizei _stride, GLuint _offset) {
   7787     static_cast<ValueType*>(
   7788         cmd)->Init(_indx, _size, _type, _normalized, _stride, _offset);
   7789     return NextCmdAddress<ValueType>(cmd);
   7790   }
   7791 
   7792   gpu::CommandHeader header;
   7793   uint32 indx;
   7794   int32 size;
   7795   uint32 type;
   7796   uint32 normalized;
   7797   int32 stride;
   7798   uint32 offset;
   7799 };
   7800 
   7801 COMPILE_ASSERT(sizeof(VertexAttribPointer) == 28,
   7802                Sizeof_VertexAttribPointer_is_not_28);
   7803 COMPILE_ASSERT(offsetof(VertexAttribPointer, header) == 0,
   7804                OffsetOf_VertexAttribPointer_header_not_0);
   7805 COMPILE_ASSERT(offsetof(VertexAttribPointer, indx) == 4,
   7806                OffsetOf_VertexAttribPointer_indx_not_4);
   7807 COMPILE_ASSERT(offsetof(VertexAttribPointer, size) == 8,
   7808                OffsetOf_VertexAttribPointer_size_not_8);
   7809 COMPILE_ASSERT(offsetof(VertexAttribPointer, type) == 12,
   7810                OffsetOf_VertexAttribPointer_type_not_12);
   7811 COMPILE_ASSERT(offsetof(VertexAttribPointer, normalized) == 16,
   7812                OffsetOf_VertexAttribPointer_normalized_not_16);
   7813 COMPILE_ASSERT(offsetof(VertexAttribPointer, stride) == 20,
   7814                OffsetOf_VertexAttribPointer_stride_not_20);
   7815 COMPILE_ASSERT(offsetof(VertexAttribPointer, offset) == 24,
   7816                OffsetOf_VertexAttribPointer_offset_not_24);
   7817 
   7818 struct Viewport {
   7819   typedef Viewport ValueType;
   7820   static const CommandId kCmdId = kViewport;
   7821   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7822 
   7823   static uint32 ComputeSize() {
   7824     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7825   }
   7826 
   7827   void SetHeader() {
   7828     header.SetCmd<ValueType>();
   7829   }
   7830 
   7831   void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
   7832     SetHeader();
   7833     x = _x;
   7834     y = _y;
   7835     width = _width;
   7836     height = _height;
   7837   }
   7838 
   7839   void* Set(void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height) {
   7840     static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
   7841     return NextCmdAddress<ValueType>(cmd);
   7842   }
   7843 
   7844   gpu::CommandHeader header;
   7845   int32 x;
   7846   int32 y;
   7847   int32 width;
   7848   int32 height;
   7849 };
   7850 
   7851 COMPILE_ASSERT(sizeof(Viewport) == 20,
   7852                Sizeof_Viewport_is_not_20);
   7853 COMPILE_ASSERT(offsetof(Viewport, header) == 0,
   7854                OffsetOf_Viewport_header_not_0);
   7855 COMPILE_ASSERT(offsetof(Viewport, x) == 4,
   7856                OffsetOf_Viewport_x_not_4);
   7857 COMPILE_ASSERT(offsetof(Viewport, y) == 8,
   7858                OffsetOf_Viewport_y_not_8);
   7859 COMPILE_ASSERT(offsetof(Viewport, width) == 12,
   7860                OffsetOf_Viewport_width_not_12);
   7861 COMPILE_ASSERT(offsetof(Viewport, height) == 16,
   7862                OffsetOf_Viewport_height_not_16);
   7863 
   7864 struct BlitFramebufferCHROMIUM {
   7865   typedef BlitFramebufferCHROMIUM ValueType;
   7866   static const CommandId kCmdId = kBlitFramebufferCHROMIUM;
   7867   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7868 
   7869   static uint32 ComputeSize() {
   7870     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7871   }
   7872 
   7873   void SetHeader() {
   7874     header.SetCmd<ValueType>();
   7875   }
   7876 
   7877   void Init(
   7878       GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1, GLint _dstX0,
   7879       GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask,
   7880       GLenum _filter) {
   7881     SetHeader();
   7882     srcX0 = _srcX0;
   7883     srcY0 = _srcY0;
   7884     srcX1 = _srcX1;
   7885     srcY1 = _srcY1;
   7886     dstX0 = _dstX0;
   7887     dstY0 = _dstY0;
   7888     dstX1 = _dstX1;
   7889     dstY1 = _dstY1;
   7890     mask = _mask;
   7891     filter = _filter;
   7892   }
   7893 
   7894   void* Set(
   7895       void* cmd, GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1,
   7896       GLint _dstX0, GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask,
   7897       GLenum _filter) {
   7898     static_cast<ValueType*>(
   7899         cmd)->Init(
   7900             _srcX0, _srcY0, _srcX1, _srcY1, _dstX0, _dstY0, _dstX1, _dstY1,
   7901             _mask, _filter);
   7902     return NextCmdAddress<ValueType>(cmd);
   7903   }
   7904 
   7905   gpu::CommandHeader header;
   7906   int32 srcX0;
   7907   int32 srcY0;
   7908   int32 srcX1;
   7909   int32 srcY1;
   7910   int32 dstX0;
   7911   int32 dstY0;
   7912   int32 dstX1;
   7913   int32 dstY1;
   7914   uint32 mask;
   7915   uint32 filter;
   7916 };
   7917 
   7918 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM) == 44,
   7919                Sizeof_BlitFramebufferCHROMIUM_is_not_44);
   7920 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, header) == 0,
   7921                OffsetOf_BlitFramebufferCHROMIUM_header_not_0);
   7922 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4,
   7923                OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4);
   7924 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8,
   7925                OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8);
   7926 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12,
   7927                OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12);
   7928 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16,
   7929                OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16);
   7930 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20,
   7931                OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20);
   7932 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24,
   7933                OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24);
   7934 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28,
   7935                OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28);
   7936 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32,
   7937                OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32);
   7938 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, mask) == 36,
   7939                OffsetOf_BlitFramebufferCHROMIUM_mask_not_36);
   7940 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, filter) == 40,
   7941                OffsetOf_BlitFramebufferCHROMIUM_filter_not_40);
   7942 
   7943 // GL_CHROMIUM_framebuffer_multisample
   7944 struct RenderbufferStorageMultisampleCHROMIUM {
   7945   typedef RenderbufferStorageMultisampleCHROMIUM ValueType;
   7946   static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM;
   7947   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   7948 
   7949   static uint32 ComputeSize() {
   7950     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   7951   }
   7952 
   7953   void SetHeader() {
   7954     header.SetCmd<ValueType>();
   7955   }
   7956 
   7957   void Init(
   7958       GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width,
   7959       GLsizei _height) {
   7960     SetHeader();
   7961     target = _target;
   7962     samples = _samples;
   7963     internalformat = _internalformat;
   7964     width = _width;
   7965     height = _height;
   7966   }
   7967 
   7968   void* Set(
   7969       void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat,
   7970       GLsizei _width, GLsizei _height) {
   7971     static_cast<ValueType*>(
   7972         cmd)->Init(_target, _samples, _internalformat, _width, _height);
   7973     return NextCmdAddress<ValueType>(cmd);
   7974   }
   7975 
   7976   gpu::CommandHeader header;
   7977   uint32 target;
   7978   int32 samples;
   7979   uint32 internalformat;
   7980   int32 width;
   7981   int32 height;
   7982 };
   7983 
   7984 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24,
   7985                Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24);
   7986 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0,
   7987                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0);
   7988 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4,
   7989                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4);
   7990 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8,
   7991                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8);
   7992 COMPILE_ASSERT(
   7993     offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12,
   7994                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12);  // NOLINT
   7995 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16,
   7996                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16);
   7997 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20,
   7998                OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20);
   7999 
   8000 // GL_EXT_multisampled_render_to_texture
   8001 struct RenderbufferStorageMultisampleEXT {
   8002   typedef RenderbufferStorageMultisampleEXT ValueType;
   8003   static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT;
   8004   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8005 
   8006   static uint32 ComputeSize() {
   8007     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8008   }
   8009 
   8010   void SetHeader() {
   8011     header.SetCmd<ValueType>();
   8012   }
   8013 
   8014   void Init(
   8015       GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width,
   8016       GLsizei _height) {
   8017     SetHeader();
   8018     target = _target;
   8019     samples = _samples;
   8020     internalformat = _internalformat;
   8021     width = _width;
   8022     height = _height;
   8023   }
   8024 
   8025   void* Set(
   8026       void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat,
   8027       GLsizei _width, GLsizei _height) {
   8028     static_cast<ValueType*>(
   8029         cmd)->Init(_target, _samples, _internalformat, _width, _height);
   8030     return NextCmdAddress<ValueType>(cmd);
   8031   }
   8032 
   8033   gpu::CommandHeader header;
   8034   uint32 target;
   8035   int32 samples;
   8036   uint32 internalformat;
   8037   int32 width;
   8038   int32 height;
   8039 };
   8040 
   8041 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT) == 24,
   8042                Sizeof_RenderbufferStorageMultisampleEXT_is_not_24);
   8043 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, header) == 0,
   8044                OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0);
   8045 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, target) == 4,
   8046                OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4);
   8047 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8,
   8048                OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8);
   8049 COMPILE_ASSERT(
   8050     offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12,
   8051                OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12);  // NOLINT
   8052 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16,
   8053                OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16);
   8054 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20,
   8055                OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20);
   8056 
   8057 struct FramebufferTexture2DMultisampleEXT {
   8058   typedef FramebufferTexture2DMultisampleEXT ValueType;
   8059   static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT;
   8060   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8061 
   8062   static uint32 ComputeSize() {
   8063     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8064   }
   8065 
   8066   void SetHeader() {
   8067     header.SetCmd<ValueType>();
   8068   }
   8069 
   8070   void Init(
   8071       GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture,
   8072       GLint _level, GLsizei _samples) {
   8073     SetHeader();
   8074     target = _target;
   8075     attachment = _attachment;
   8076     textarget = _textarget;
   8077     texture = _texture;
   8078     level = _level;
   8079     samples = _samples;
   8080   }
   8081 
   8082   void* Set(
   8083       void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget,
   8084       GLuint _texture, GLint _level, GLsizei _samples) {
   8085     static_cast<ValueType*>(
   8086         cmd)->Init(
   8087             _target, _attachment, _textarget, _texture, _level, _samples);
   8088     return NextCmdAddress<ValueType>(cmd);
   8089   }
   8090 
   8091   gpu::CommandHeader header;
   8092   uint32 target;
   8093   uint32 attachment;
   8094   uint32 textarget;
   8095   uint32 texture;
   8096   int32 level;
   8097   int32 samples;
   8098 };
   8099 
   8100 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT) == 28,
   8101                Sizeof_FramebufferTexture2DMultisampleEXT_is_not_28);
   8102 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, header) == 0,
   8103                OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0);
   8104 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, target) == 4,
   8105                OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4);
   8106 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8,
   8107                OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8);
   8108 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12,
   8109                OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12);
   8110 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16,
   8111                OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16);
   8112 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, level) == 20,
   8113                OffsetOf_FramebufferTexture2DMultisampleEXT_level_not_20);
   8114 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, samples) == 24,
   8115                OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_24);
   8116 
   8117 struct TexStorage2DEXT {
   8118   typedef TexStorage2DEXT ValueType;
   8119   static const CommandId kCmdId = kTexStorage2DEXT;
   8120   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8121 
   8122   static uint32 ComputeSize() {
   8123     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8124   }
   8125 
   8126   void SetHeader() {
   8127     header.SetCmd<ValueType>();
   8128   }
   8129 
   8130   void Init(
   8131       GLenum _target, GLsizei _levels, GLenum _internalFormat, GLsizei _width,
   8132       GLsizei _height) {
   8133     SetHeader();
   8134     target = _target;
   8135     levels = _levels;
   8136     internalFormat = _internalFormat;
   8137     width = _width;
   8138     height = _height;
   8139   }
   8140 
   8141   void* Set(
   8142       void* cmd, GLenum _target, GLsizei _levels, GLenum _internalFormat,
   8143       GLsizei _width, GLsizei _height) {
   8144     static_cast<ValueType*>(
   8145         cmd)->Init(_target, _levels, _internalFormat, _width, _height);
   8146     return NextCmdAddress<ValueType>(cmd);
   8147   }
   8148 
   8149   gpu::CommandHeader header;
   8150   uint32 target;
   8151   int32 levels;
   8152   uint32 internalFormat;
   8153   int32 width;
   8154   int32 height;
   8155 };
   8156 
   8157 COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24,
   8158                Sizeof_TexStorage2DEXT_is_not_24);
   8159 COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0,
   8160                OffsetOf_TexStorage2DEXT_header_not_0);
   8161 COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4,
   8162                OffsetOf_TexStorage2DEXT_target_not_4);
   8163 COMPILE_ASSERT(offsetof(TexStorage2DEXT, levels) == 8,
   8164                OffsetOf_TexStorage2DEXT_levels_not_8);
   8165 COMPILE_ASSERT(offsetof(TexStorage2DEXT, internalFormat) == 12,
   8166                OffsetOf_TexStorage2DEXT_internalFormat_not_12);
   8167 COMPILE_ASSERT(offsetof(TexStorage2DEXT, width) == 16,
   8168                OffsetOf_TexStorage2DEXT_width_not_16);
   8169 COMPILE_ASSERT(offsetof(TexStorage2DEXT, height) == 20,
   8170                OffsetOf_TexStorage2DEXT_height_not_20);
   8171 
   8172 struct GenQueriesEXT {
   8173   typedef GenQueriesEXT ValueType;
   8174   static const CommandId kCmdId = kGenQueriesEXT;
   8175   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8176 
   8177   static uint32 ComputeSize() {
   8178     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8179   }
   8180 
   8181   void SetHeader() {
   8182     header.SetCmd<ValueType>();
   8183   }
   8184 
   8185   void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
   8186     SetHeader();
   8187     n = _n;
   8188     queries_shm_id = _queries_shm_id;
   8189     queries_shm_offset = _queries_shm_offset;
   8190   }
   8191 
   8192   void* Set(
   8193       void* cmd, GLsizei _n, uint32 _queries_shm_id,
   8194       uint32 _queries_shm_offset) {
   8195     static_cast<ValueType*>(
   8196         cmd)->Init(_n, _queries_shm_id, _queries_shm_offset);
   8197     return NextCmdAddress<ValueType>(cmd);
   8198   }
   8199 
   8200   gpu::CommandHeader header;
   8201   int32 n;
   8202   uint32 queries_shm_id;
   8203   uint32 queries_shm_offset;
   8204 };
   8205 
   8206 COMPILE_ASSERT(sizeof(GenQueriesEXT) == 16,
   8207                Sizeof_GenQueriesEXT_is_not_16);
   8208 COMPILE_ASSERT(offsetof(GenQueriesEXT, header) == 0,
   8209                OffsetOf_GenQueriesEXT_header_not_0);
   8210 COMPILE_ASSERT(offsetof(GenQueriesEXT, n) == 4,
   8211                OffsetOf_GenQueriesEXT_n_not_4);
   8212 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_id) == 8,
   8213                OffsetOf_GenQueriesEXT_queries_shm_id_not_8);
   8214 COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_offset) == 12,
   8215                OffsetOf_GenQueriesEXT_queries_shm_offset_not_12);
   8216 
   8217 struct GenQueriesEXTImmediate {
   8218   typedef GenQueriesEXTImmediate ValueType;
   8219   static const CommandId kCmdId = kGenQueriesEXTImmediate;
   8220   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   8221 
   8222   static uint32 ComputeDataSize(GLsizei n) {
   8223     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   8224   }
   8225 
   8226   static uint32 ComputeSize(GLsizei n) {
   8227     return static_cast<uint32>(
   8228         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   8229   }
   8230 
   8231   void SetHeader(GLsizei n) {
   8232     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   8233   }
   8234 
   8235   void Init(GLsizei _n, GLuint* _queries) {
   8236     SetHeader(_n);
   8237     n = _n;
   8238     memcpy(ImmediateDataAddress(this),
   8239            _queries, ComputeDataSize(_n));
   8240   }
   8241 
   8242   void* Set(void* cmd, GLsizei _n, GLuint* _queries) {
   8243     static_cast<ValueType*>(cmd)->Init(_n, _queries);
   8244     const uint32 size = ComputeSize(_n);
   8245     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   8246   }
   8247 
   8248   gpu::CommandHeader header;
   8249   int32 n;
   8250 };
   8251 
   8252 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate) == 8,
   8253                Sizeof_GenQueriesEXTImmediate_is_not_8);
   8254 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, header) == 0,
   8255                OffsetOf_GenQueriesEXTImmediate_header_not_0);
   8256 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, n) == 4,
   8257                OffsetOf_GenQueriesEXTImmediate_n_not_4);
   8258 
   8259 struct DeleteQueriesEXT {
   8260   typedef DeleteQueriesEXT ValueType;
   8261   static const CommandId kCmdId = kDeleteQueriesEXT;
   8262   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8263 
   8264   static uint32 ComputeSize() {
   8265     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8266   }
   8267 
   8268   void SetHeader() {
   8269     header.SetCmd<ValueType>();
   8270   }
   8271 
   8272   void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) {
   8273     SetHeader();
   8274     n = _n;
   8275     queries_shm_id = _queries_shm_id;
   8276     queries_shm_offset = _queries_shm_offset;
   8277   }
   8278 
   8279   void* Set(
   8280       void* cmd, GLsizei _n, uint32 _queries_shm_id,
   8281       uint32 _queries_shm_offset) {
   8282     static_cast<ValueType*>(
   8283         cmd)->Init(_n, _queries_shm_id, _queries_shm_offset);
   8284     return NextCmdAddress<ValueType>(cmd);
   8285   }
   8286 
   8287   gpu::CommandHeader header;
   8288   int32 n;
   8289   uint32 queries_shm_id;
   8290   uint32 queries_shm_offset;
   8291 };
   8292 
   8293 COMPILE_ASSERT(sizeof(DeleteQueriesEXT) == 16,
   8294                Sizeof_DeleteQueriesEXT_is_not_16);
   8295 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, header) == 0,
   8296                OffsetOf_DeleteQueriesEXT_header_not_0);
   8297 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, n) == 4,
   8298                OffsetOf_DeleteQueriesEXT_n_not_4);
   8299 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_id) == 8,
   8300                OffsetOf_DeleteQueriesEXT_queries_shm_id_not_8);
   8301 COMPILE_ASSERT(offsetof(DeleteQueriesEXT, queries_shm_offset) == 12,
   8302                OffsetOf_DeleteQueriesEXT_queries_shm_offset_not_12);
   8303 
   8304 struct DeleteQueriesEXTImmediate {
   8305   typedef DeleteQueriesEXTImmediate ValueType;
   8306   static const CommandId kCmdId = kDeleteQueriesEXTImmediate;
   8307   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   8308 
   8309   static uint32 ComputeDataSize(GLsizei n) {
   8310     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   8311   }
   8312 
   8313   static uint32 ComputeSize(GLsizei n) {
   8314     return static_cast<uint32>(
   8315         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   8316   }
   8317 
   8318   void SetHeader(GLsizei n) {
   8319     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   8320   }
   8321 
   8322   void Init(GLsizei _n, const GLuint* _queries) {
   8323     SetHeader(_n);
   8324     n = _n;
   8325     memcpy(ImmediateDataAddress(this),
   8326            _queries, ComputeDataSize(_n));
   8327   }
   8328 
   8329   void* Set(void* cmd, GLsizei _n, const GLuint* _queries) {
   8330     static_cast<ValueType*>(cmd)->Init(_n, _queries);
   8331     const uint32 size = ComputeSize(_n);
   8332     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   8333   }
   8334 
   8335   gpu::CommandHeader header;
   8336   int32 n;
   8337 };
   8338 
   8339 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate) == 8,
   8340                Sizeof_DeleteQueriesEXTImmediate_is_not_8);
   8341 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, header) == 0,
   8342                OffsetOf_DeleteQueriesEXTImmediate_header_not_0);
   8343 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, n) == 4,
   8344                OffsetOf_DeleteQueriesEXTImmediate_n_not_4);
   8345 
   8346 struct BeginQueryEXT {
   8347   typedef BeginQueryEXT ValueType;
   8348   static const CommandId kCmdId = kBeginQueryEXT;
   8349   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8350 
   8351   static uint32 ComputeSize() {
   8352     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8353   }
   8354 
   8355   void SetHeader() {
   8356     header.SetCmd<ValueType>();
   8357   }
   8358 
   8359   void Init(
   8360       GLenum _target, GLuint _id, uint32 _sync_data_shm_id,
   8361       uint32 _sync_data_shm_offset) {
   8362     SetHeader();
   8363     target = _target;
   8364     id = _id;
   8365     sync_data_shm_id = _sync_data_shm_id;
   8366     sync_data_shm_offset = _sync_data_shm_offset;
   8367   }
   8368 
   8369   void* Set(
   8370       void* cmd, GLenum _target, GLuint _id, uint32 _sync_data_shm_id,
   8371       uint32 _sync_data_shm_offset) {
   8372     static_cast<ValueType*>(
   8373         cmd)->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset);
   8374     return NextCmdAddress<ValueType>(cmd);
   8375   }
   8376 
   8377   gpu::CommandHeader header;
   8378   uint32 target;
   8379   uint32 id;
   8380   uint32 sync_data_shm_id;
   8381   uint32 sync_data_shm_offset;
   8382 };
   8383 
   8384 COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20,
   8385                Sizeof_BeginQueryEXT_is_not_20);
   8386 COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0,
   8387                OffsetOf_BeginQueryEXT_header_not_0);
   8388 COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4,
   8389                OffsetOf_BeginQueryEXT_target_not_4);
   8390 COMPILE_ASSERT(offsetof(BeginQueryEXT, id) == 8,
   8391                OffsetOf_BeginQueryEXT_id_not_8);
   8392 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_id) == 12,
   8393                OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12);
   8394 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16,
   8395                OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16);
   8396 
   8397 struct EndQueryEXT {
   8398   typedef EndQueryEXT ValueType;
   8399   static const CommandId kCmdId = kEndQueryEXT;
   8400   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8401 
   8402   static uint32 ComputeSize() {
   8403     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8404   }
   8405 
   8406   void SetHeader() {
   8407     header.SetCmd<ValueType>();
   8408   }
   8409 
   8410   void Init(GLenum _target, GLuint _submit_count) {
   8411     SetHeader();
   8412     target = _target;
   8413     submit_count = _submit_count;
   8414   }
   8415 
   8416   void* Set(void* cmd, GLenum _target, GLuint _submit_count) {
   8417     static_cast<ValueType*>(cmd)->Init(_target, _submit_count);
   8418     return NextCmdAddress<ValueType>(cmd);
   8419   }
   8420 
   8421   gpu::CommandHeader header;
   8422   uint32 target;
   8423   uint32 submit_count;
   8424 };
   8425 
   8426 COMPILE_ASSERT(sizeof(EndQueryEXT) == 12,
   8427                Sizeof_EndQueryEXT_is_not_12);
   8428 COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0,
   8429                OffsetOf_EndQueryEXT_header_not_0);
   8430 COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4,
   8431                OffsetOf_EndQueryEXT_target_not_4);
   8432 COMPILE_ASSERT(offsetof(EndQueryEXT, submit_count) == 8,
   8433                OffsetOf_EndQueryEXT_submit_count_not_8);
   8434 
   8435 struct InsertEventMarkerEXT {
   8436   typedef InsertEventMarkerEXT ValueType;
   8437   static const CommandId kCmdId = kInsertEventMarkerEXT;
   8438   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8439 
   8440   static uint32 ComputeSize() {
   8441     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8442   }
   8443 
   8444   void SetHeader() {
   8445     header.SetCmd<ValueType>();
   8446   }
   8447 
   8448   void Init(GLuint _bucket_id) {
   8449     SetHeader();
   8450     bucket_id = _bucket_id;
   8451   }
   8452 
   8453   void* Set(void* cmd, GLuint _bucket_id) {
   8454     static_cast<ValueType*>(cmd)->Init(_bucket_id);
   8455     return NextCmdAddress<ValueType>(cmd);
   8456   }
   8457 
   8458   gpu::CommandHeader header;
   8459   uint32 bucket_id;
   8460 };
   8461 
   8462 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT) == 8,
   8463                Sizeof_InsertEventMarkerEXT_is_not_8);
   8464 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, header) == 0,
   8465                OffsetOf_InsertEventMarkerEXT_header_not_0);
   8466 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, bucket_id) == 4,
   8467                OffsetOf_InsertEventMarkerEXT_bucket_id_not_4);
   8468 
   8469 struct PushGroupMarkerEXT {
   8470   typedef PushGroupMarkerEXT ValueType;
   8471   static const CommandId kCmdId = kPushGroupMarkerEXT;
   8472   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8473 
   8474   static uint32 ComputeSize() {
   8475     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8476   }
   8477 
   8478   void SetHeader() {
   8479     header.SetCmd<ValueType>();
   8480   }
   8481 
   8482   void Init(GLuint _bucket_id) {
   8483     SetHeader();
   8484     bucket_id = _bucket_id;
   8485   }
   8486 
   8487   void* Set(void* cmd, GLuint _bucket_id) {
   8488     static_cast<ValueType*>(cmd)->Init(_bucket_id);
   8489     return NextCmdAddress<ValueType>(cmd);
   8490   }
   8491 
   8492   gpu::CommandHeader header;
   8493   uint32 bucket_id;
   8494 };
   8495 
   8496 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT) == 8,
   8497                Sizeof_PushGroupMarkerEXT_is_not_8);
   8498 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, header) == 0,
   8499                OffsetOf_PushGroupMarkerEXT_header_not_0);
   8500 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, bucket_id) == 4,
   8501                OffsetOf_PushGroupMarkerEXT_bucket_id_not_4);
   8502 
   8503 struct PopGroupMarkerEXT {
   8504   typedef PopGroupMarkerEXT ValueType;
   8505   static const CommandId kCmdId = kPopGroupMarkerEXT;
   8506   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8507 
   8508   static uint32 ComputeSize() {
   8509     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8510   }
   8511 
   8512   void SetHeader() {
   8513     header.SetCmd<ValueType>();
   8514   }
   8515 
   8516   void Init() {
   8517     SetHeader();
   8518   }
   8519 
   8520   void* Set(void* cmd) {
   8521     static_cast<ValueType*>(cmd)->Init();
   8522     return NextCmdAddress<ValueType>(cmd);
   8523   }
   8524 
   8525   gpu::CommandHeader header;
   8526 };
   8527 
   8528 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT) == 4,
   8529                Sizeof_PopGroupMarkerEXT_is_not_4);
   8530 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT, header) == 0,
   8531                OffsetOf_PopGroupMarkerEXT_header_not_0);
   8532 
   8533 struct GenVertexArraysOES {
   8534   typedef GenVertexArraysOES ValueType;
   8535   static const CommandId kCmdId = kGenVertexArraysOES;
   8536   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8537 
   8538   static uint32 ComputeSize() {
   8539     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8540   }
   8541 
   8542   void SetHeader() {
   8543     header.SetCmd<ValueType>();
   8544   }
   8545 
   8546   void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
   8547     SetHeader();
   8548     n = _n;
   8549     arrays_shm_id = _arrays_shm_id;
   8550     arrays_shm_offset = _arrays_shm_offset;
   8551   }
   8552 
   8553   void* Set(
   8554       void* cmd, GLsizei _n, uint32 _arrays_shm_id,
   8555       uint32 _arrays_shm_offset) {
   8556     static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
   8557     return NextCmdAddress<ValueType>(cmd);
   8558   }
   8559 
   8560   gpu::CommandHeader header;
   8561   int32 n;
   8562   uint32 arrays_shm_id;
   8563   uint32 arrays_shm_offset;
   8564 };
   8565 
   8566 COMPILE_ASSERT(sizeof(GenVertexArraysOES) == 16,
   8567                Sizeof_GenVertexArraysOES_is_not_16);
   8568 COMPILE_ASSERT(offsetof(GenVertexArraysOES, header) == 0,
   8569                OffsetOf_GenVertexArraysOES_header_not_0);
   8570 COMPILE_ASSERT(offsetof(GenVertexArraysOES, n) == 4,
   8571                OffsetOf_GenVertexArraysOES_n_not_4);
   8572 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_id) == 8,
   8573                OffsetOf_GenVertexArraysOES_arrays_shm_id_not_8);
   8574 COMPILE_ASSERT(offsetof(GenVertexArraysOES, arrays_shm_offset) == 12,
   8575                OffsetOf_GenVertexArraysOES_arrays_shm_offset_not_12);
   8576 
   8577 struct GenVertexArraysOESImmediate {
   8578   typedef GenVertexArraysOESImmediate ValueType;
   8579   static const CommandId kCmdId = kGenVertexArraysOESImmediate;
   8580   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   8581 
   8582   static uint32 ComputeDataSize(GLsizei n) {
   8583     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   8584   }
   8585 
   8586   static uint32 ComputeSize(GLsizei n) {
   8587     return static_cast<uint32>(
   8588         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   8589   }
   8590 
   8591   void SetHeader(GLsizei n) {
   8592     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   8593   }
   8594 
   8595   void Init(GLsizei _n, GLuint* _arrays) {
   8596     SetHeader(_n);
   8597     n = _n;
   8598     memcpy(ImmediateDataAddress(this),
   8599            _arrays, ComputeDataSize(_n));
   8600   }
   8601 
   8602   void* Set(void* cmd, GLsizei _n, GLuint* _arrays) {
   8603     static_cast<ValueType*>(cmd)->Init(_n, _arrays);
   8604     const uint32 size = ComputeSize(_n);
   8605     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   8606   }
   8607 
   8608   gpu::CommandHeader header;
   8609   int32 n;
   8610 };
   8611 
   8612 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate) == 8,
   8613                Sizeof_GenVertexArraysOESImmediate_is_not_8);
   8614 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, header) == 0,
   8615                OffsetOf_GenVertexArraysOESImmediate_header_not_0);
   8616 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, n) == 4,
   8617                OffsetOf_GenVertexArraysOESImmediate_n_not_4);
   8618 
   8619 struct DeleteVertexArraysOES {
   8620   typedef DeleteVertexArraysOES ValueType;
   8621   static const CommandId kCmdId = kDeleteVertexArraysOES;
   8622   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8623 
   8624   static uint32 ComputeSize() {
   8625     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8626   }
   8627 
   8628   void SetHeader() {
   8629     header.SetCmd<ValueType>();
   8630   }
   8631 
   8632   void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) {
   8633     SetHeader();
   8634     n = _n;
   8635     arrays_shm_id = _arrays_shm_id;
   8636     arrays_shm_offset = _arrays_shm_offset;
   8637   }
   8638 
   8639   void* Set(
   8640       void* cmd, GLsizei _n, uint32 _arrays_shm_id,
   8641       uint32 _arrays_shm_offset) {
   8642     static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset);
   8643     return NextCmdAddress<ValueType>(cmd);
   8644   }
   8645 
   8646   gpu::CommandHeader header;
   8647   int32 n;
   8648   uint32 arrays_shm_id;
   8649   uint32 arrays_shm_offset;
   8650 };
   8651 
   8652 COMPILE_ASSERT(sizeof(DeleteVertexArraysOES) == 16,
   8653                Sizeof_DeleteVertexArraysOES_is_not_16);
   8654 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, header) == 0,
   8655                OffsetOf_DeleteVertexArraysOES_header_not_0);
   8656 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, n) == 4,
   8657                OffsetOf_DeleteVertexArraysOES_n_not_4);
   8658 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_id) == 8,
   8659                OffsetOf_DeleteVertexArraysOES_arrays_shm_id_not_8);
   8660 COMPILE_ASSERT(offsetof(DeleteVertexArraysOES, arrays_shm_offset) == 12,
   8661                OffsetOf_DeleteVertexArraysOES_arrays_shm_offset_not_12);
   8662 
   8663 struct DeleteVertexArraysOESImmediate {
   8664   typedef DeleteVertexArraysOESImmediate ValueType;
   8665   static const CommandId kCmdId = kDeleteVertexArraysOESImmediate;
   8666   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   8667 
   8668   static uint32 ComputeDataSize(GLsizei n) {
   8669     return static_cast<uint32>(sizeof(GLuint) * n);  // NOLINT
   8670   }
   8671 
   8672   static uint32 ComputeSize(GLsizei n) {
   8673     return static_cast<uint32>(
   8674         sizeof(ValueType) + ComputeDataSize(n));  // NOLINT
   8675   }
   8676 
   8677   void SetHeader(GLsizei n) {
   8678     header.SetCmdByTotalSize<ValueType>(ComputeSize(n));
   8679   }
   8680 
   8681   void Init(GLsizei _n, const GLuint* _arrays) {
   8682     SetHeader(_n);
   8683     n = _n;
   8684     memcpy(ImmediateDataAddress(this),
   8685            _arrays, ComputeDataSize(_n));
   8686   }
   8687 
   8688   void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) {
   8689     static_cast<ValueType*>(cmd)->Init(_n, _arrays);
   8690     const uint32 size = ComputeSize(_n);
   8691     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   8692   }
   8693 
   8694   gpu::CommandHeader header;
   8695   int32 n;
   8696 };
   8697 
   8698 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate) == 8,
   8699                Sizeof_DeleteVertexArraysOESImmediate_is_not_8);
   8700 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, header) == 0,
   8701                OffsetOf_DeleteVertexArraysOESImmediate_header_not_0);
   8702 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, n) == 4,
   8703                OffsetOf_DeleteVertexArraysOESImmediate_n_not_4);
   8704 
   8705 struct IsVertexArrayOES {
   8706   typedef IsVertexArrayOES ValueType;
   8707   static const CommandId kCmdId = kIsVertexArrayOES;
   8708   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8709 
   8710   typedef uint32 Result;
   8711 
   8712   static uint32 ComputeSize() {
   8713     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8714   }
   8715 
   8716   void SetHeader() {
   8717     header.SetCmd<ValueType>();
   8718   }
   8719 
   8720   void Init(GLuint _array, uint32 _result_shm_id, uint32 _result_shm_offset) {
   8721     SetHeader();
   8722     array = _array;
   8723     result_shm_id = _result_shm_id;
   8724     result_shm_offset = _result_shm_offset;
   8725   }
   8726 
   8727   void* Set(
   8728       void* cmd, GLuint _array, uint32 _result_shm_id,
   8729       uint32 _result_shm_offset) {
   8730     static_cast<ValueType*>(
   8731         cmd)->Init(_array, _result_shm_id, _result_shm_offset);
   8732     return NextCmdAddress<ValueType>(cmd);
   8733   }
   8734 
   8735   gpu::CommandHeader header;
   8736   uint32 array;
   8737   uint32 result_shm_id;
   8738   uint32 result_shm_offset;
   8739 };
   8740 
   8741 COMPILE_ASSERT(sizeof(IsVertexArrayOES) == 16,
   8742                Sizeof_IsVertexArrayOES_is_not_16);
   8743 COMPILE_ASSERT(offsetof(IsVertexArrayOES, header) == 0,
   8744                OffsetOf_IsVertexArrayOES_header_not_0);
   8745 COMPILE_ASSERT(offsetof(IsVertexArrayOES, array) == 4,
   8746                OffsetOf_IsVertexArrayOES_array_not_4);
   8747 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_id) == 8,
   8748                OffsetOf_IsVertexArrayOES_result_shm_id_not_8);
   8749 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_offset) == 12,
   8750                OffsetOf_IsVertexArrayOES_result_shm_offset_not_12);
   8751 
   8752 struct BindVertexArrayOES {
   8753   typedef BindVertexArrayOES ValueType;
   8754   static const CommandId kCmdId = kBindVertexArrayOES;
   8755   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8756 
   8757   static uint32 ComputeSize() {
   8758     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8759   }
   8760 
   8761   void SetHeader() {
   8762     header.SetCmd<ValueType>();
   8763   }
   8764 
   8765   void Init(GLuint _array) {
   8766     SetHeader();
   8767     array = _array;
   8768   }
   8769 
   8770   void* Set(void* cmd, GLuint _array) {
   8771     static_cast<ValueType*>(cmd)->Init(_array);
   8772     return NextCmdAddress<ValueType>(cmd);
   8773   }
   8774 
   8775   gpu::CommandHeader header;
   8776   uint32 array;
   8777 };
   8778 
   8779 COMPILE_ASSERT(sizeof(BindVertexArrayOES) == 8,
   8780                Sizeof_BindVertexArrayOES_is_not_8);
   8781 COMPILE_ASSERT(offsetof(BindVertexArrayOES, header) == 0,
   8782                OffsetOf_BindVertexArrayOES_header_not_0);
   8783 COMPILE_ASSERT(offsetof(BindVertexArrayOES, array) == 4,
   8784                OffsetOf_BindVertexArrayOES_array_not_4);
   8785 
   8786 struct SwapBuffers {
   8787   typedef SwapBuffers ValueType;
   8788   static const CommandId kCmdId = kSwapBuffers;
   8789   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8790 
   8791   static uint32 ComputeSize() {
   8792     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8793   }
   8794 
   8795   void SetHeader() {
   8796     header.SetCmd<ValueType>();
   8797   }
   8798 
   8799   void Init() {
   8800     SetHeader();
   8801   }
   8802 
   8803   void* Set(void* cmd) {
   8804     static_cast<ValueType*>(cmd)->Init();
   8805     return NextCmdAddress<ValueType>(cmd);
   8806   }
   8807 
   8808   gpu::CommandHeader header;
   8809 };
   8810 
   8811 COMPILE_ASSERT(sizeof(SwapBuffers) == 4,
   8812                Sizeof_SwapBuffers_is_not_4);
   8813 COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0,
   8814                OffsetOf_SwapBuffers_header_not_0);
   8815 
   8816 struct GetMaxValueInBufferCHROMIUM {
   8817   typedef GetMaxValueInBufferCHROMIUM ValueType;
   8818   static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM;
   8819   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8820 
   8821   typedef GLuint Result;
   8822 
   8823   static uint32 ComputeSize() {
   8824     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8825   }
   8826 
   8827   void SetHeader() {
   8828     header.SetCmd<ValueType>();
   8829   }
   8830 
   8831   void Init(
   8832       GLuint _buffer_id, GLsizei _count, GLenum _type, GLuint _offset,
   8833       uint32 _result_shm_id, uint32 _result_shm_offset) {
   8834     SetHeader();
   8835     buffer_id = _buffer_id;
   8836     count = _count;
   8837     type = _type;
   8838     offset = _offset;
   8839     result_shm_id = _result_shm_id;
   8840     result_shm_offset = _result_shm_offset;
   8841   }
   8842 
   8843   void* Set(
   8844       void* cmd, GLuint _buffer_id, GLsizei _count, GLenum _type,
   8845       GLuint _offset, uint32 _result_shm_id, uint32 _result_shm_offset) {
   8846     static_cast<ValueType*>(
   8847         cmd)->Init(
   8848             _buffer_id, _count, _type, _offset, _result_shm_id,
   8849             _result_shm_offset);
   8850     return NextCmdAddress<ValueType>(cmd);
   8851   }
   8852 
   8853   gpu::CommandHeader header;
   8854   uint32 buffer_id;
   8855   int32 count;
   8856   uint32 type;
   8857   uint32 offset;
   8858   uint32 result_shm_id;
   8859   uint32 result_shm_offset;
   8860 };
   8861 
   8862 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM) == 28,
   8863                Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28);
   8864 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0,
   8865                OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0);
   8866 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4,
   8867                OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4);
   8868 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8,
   8869                OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8);
   8870 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12,
   8871                OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12);
   8872 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16,
   8873                OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16);
   8874 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
   8875                OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20);
   8876 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
   8877                OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24);
   8878 
   8879 struct GenSharedIdsCHROMIUM {
   8880   typedef GenSharedIdsCHROMIUM ValueType;
   8881   static const CommandId kCmdId = kGenSharedIdsCHROMIUM;
   8882   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8883 
   8884   static uint32 ComputeSize() {
   8885     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8886   }
   8887 
   8888   void SetHeader() {
   8889     header.SetCmd<ValueType>();
   8890   }
   8891 
   8892   void Init(
   8893       GLuint _namespace_id, GLuint _id_offset, GLsizei _n, uint32 _ids_shm_id,
   8894       uint32 _ids_shm_offset) {
   8895     SetHeader();
   8896     namespace_id = _namespace_id;
   8897     id_offset = _id_offset;
   8898     n = _n;
   8899     ids_shm_id = _ids_shm_id;
   8900     ids_shm_offset = _ids_shm_offset;
   8901   }
   8902 
   8903   void* Set(
   8904       void* cmd, GLuint _namespace_id, GLuint _id_offset, GLsizei _n,
   8905       uint32 _ids_shm_id, uint32 _ids_shm_offset) {
   8906     static_cast<ValueType*>(
   8907         cmd)->Init(
   8908             _namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset);
   8909     return NextCmdAddress<ValueType>(cmd);
   8910   }
   8911 
   8912   gpu::CommandHeader header;
   8913   uint32 namespace_id;
   8914   uint32 id_offset;
   8915   int32 n;
   8916   uint32 ids_shm_id;
   8917   uint32 ids_shm_offset;
   8918 };
   8919 
   8920 COMPILE_ASSERT(sizeof(GenSharedIdsCHROMIUM) == 24,
   8921                Sizeof_GenSharedIdsCHROMIUM_is_not_24);
   8922 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, header) == 0,
   8923                OffsetOf_GenSharedIdsCHROMIUM_header_not_0);
   8924 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, namespace_id) == 4,
   8925                OffsetOf_GenSharedIdsCHROMIUM_namespace_id_not_4);
   8926 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, id_offset) == 8,
   8927                OffsetOf_GenSharedIdsCHROMIUM_id_offset_not_8);
   8928 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, n) == 12,
   8929                OffsetOf_GenSharedIdsCHROMIUM_n_not_12);
   8930 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_id) == 16,
   8931                OffsetOf_GenSharedIdsCHROMIUM_ids_shm_id_not_16);
   8932 COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_offset) == 20,
   8933                OffsetOf_GenSharedIdsCHROMIUM_ids_shm_offset_not_20);
   8934 
   8935 struct DeleteSharedIdsCHROMIUM {
   8936   typedef DeleteSharedIdsCHROMIUM ValueType;
   8937   static const CommandId kCmdId = kDeleteSharedIdsCHROMIUM;
   8938   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8939 
   8940   static uint32 ComputeSize() {
   8941     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8942   }
   8943 
   8944   void SetHeader() {
   8945     header.SetCmd<ValueType>();
   8946   }
   8947 
   8948   void Init(
   8949       GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
   8950       uint32 _ids_shm_offset) {
   8951     SetHeader();
   8952     namespace_id = _namespace_id;
   8953     n = _n;
   8954     ids_shm_id = _ids_shm_id;
   8955     ids_shm_offset = _ids_shm_offset;
   8956   }
   8957 
   8958   void* Set(
   8959       void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
   8960       uint32 _ids_shm_offset) {
   8961     static_cast<ValueType*>(
   8962         cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
   8963     return NextCmdAddress<ValueType>(cmd);
   8964   }
   8965 
   8966   gpu::CommandHeader header;
   8967   uint32 namespace_id;
   8968   int32 n;
   8969   uint32 ids_shm_id;
   8970   uint32 ids_shm_offset;
   8971 };
   8972 
   8973 COMPILE_ASSERT(sizeof(DeleteSharedIdsCHROMIUM) == 20,
   8974                Sizeof_DeleteSharedIdsCHROMIUM_is_not_20);
   8975 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, header) == 0,
   8976                OffsetOf_DeleteSharedIdsCHROMIUM_header_not_0);
   8977 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, namespace_id) == 4,
   8978                OffsetOf_DeleteSharedIdsCHROMIUM_namespace_id_not_4);
   8979 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, n) == 8,
   8980                OffsetOf_DeleteSharedIdsCHROMIUM_n_not_8);
   8981 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_id) == 12,
   8982                OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_id_not_12);
   8983 COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_offset) == 16,
   8984                OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_offset_not_16);
   8985 
   8986 struct RegisterSharedIdsCHROMIUM {
   8987   typedef RegisterSharedIdsCHROMIUM ValueType;
   8988   static const CommandId kCmdId = kRegisterSharedIdsCHROMIUM;
   8989   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   8990 
   8991   static uint32 ComputeSize() {
   8992     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   8993   }
   8994 
   8995   void SetHeader() {
   8996     header.SetCmd<ValueType>();
   8997   }
   8998 
   8999   void Init(
   9000       GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
   9001       uint32 _ids_shm_offset) {
   9002     SetHeader();
   9003     namespace_id = _namespace_id;
   9004     n = _n;
   9005     ids_shm_id = _ids_shm_id;
   9006     ids_shm_offset = _ids_shm_offset;
   9007   }
   9008 
   9009   void* Set(
   9010       void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id,
   9011       uint32 _ids_shm_offset) {
   9012     static_cast<ValueType*>(
   9013         cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
   9014     return NextCmdAddress<ValueType>(cmd);
   9015   }
   9016 
   9017   gpu::CommandHeader header;
   9018   uint32 namespace_id;
   9019   int32 n;
   9020   uint32 ids_shm_id;
   9021   uint32 ids_shm_offset;
   9022 };
   9023 
   9024 COMPILE_ASSERT(sizeof(RegisterSharedIdsCHROMIUM) == 20,
   9025                Sizeof_RegisterSharedIdsCHROMIUM_is_not_20);
   9026 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, header) == 0,
   9027                OffsetOf_RegisterSharedIdsCHROMIUM_header_not_0);
   9028 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, namespace_id) == 4,
   9029                OffsetOf_RegisterSharedIdsCHROMIUM_namespace_id_not_4);
   9030 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, n) == 8,
   9031                OffsetOf_RegisterSharedIdsCHROMIUM_n_not_8);
   9032 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_id) == 12,
   9033                OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_id_not_12);
   9034 COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_offset) == 16,
   9035                OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_offset_not_16);
   9036 
   9037 struct EnableFeatureCHROMIUM {
   9038   typedef EnableFeatureCHROMIUM ValueType;
   9039   static const CommandId kCmdId = kEnableFeatureCHROMIUM;
   9040   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9041 
   9042   typedef GLint Result;
   9043 
   9044   static uint32 ComputeSize() {
   9045     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9046   }
   9047 
   9048   void SetHeader() {
   9049     header.SetCmd<ValueType>();
   9050   }
   9051 
   9052   void Init(
   9053       GLuint _bucket_id, uint32 _result_shm_id, uint32 _result_shm_offset) {
   9054     SetHeader();
   9055     bucket_id = _bucket_id;
   9056     result_shm_id = _result_shm_id;
   9057     result_shm_offset = _result_shm_offset;
   9058   }
   9059 
   9060   void* Set(
   9061       void* cmd, GLuint _bucket_id, uint32 _result_shm_id,
   9062       uint32 _result_shm_offset) {
   9063     static_cast<ValueType*>(
   9064         cmd)->Init(_bucket_id, _result_shm_id, _result_shm_offset);
   9065     return NextCmdAddress<ValueType>(cmd);
   9066   }
   9067 
   9068   gpu::CommandHeader header;
   9069   uint32 bucket_id;
   9070   uint32 result_shm_id;
   9071   uint32 result_shm_offset;
   9072 };
   9073 
   9074 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16,
   9075                Sizeof_EnableFeatureCHROMIUM_is_not_16);
   9076 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0,
   9077                OffsetOf_EnableFeatureCHROMIUM_header_not_0);
   9078 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
   9079                OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4);
   9080 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
   9081                OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8);
   9082 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
   9083                OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12);
   9084 
   9085 struct ResizeCHROMIUM {
   9086   typedef ResizeCHROMIUM ValueType;
   9087   static const CommandId kCmdId = kResizeCHROMIUM;
   9088   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9089 
   9090   static uint32 ComputeSize() {
   9091     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9092   }
   9093 
   9094   void SetHeader() {
   9095     header.SetCmd<ValueType>();
   9096   }
   9097 
   9098   void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) {
   9099     SetHeader();
   9100     width = _width;
   9101     height = _height;
   9102     scale_factor = _scale_factor;
   9103   }
   9104 
   9105   void* Set(void* cmd, GLuint _width, GLuint _height, GLfloat _scale_factor) {
   9106     static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor);
   9107     return NextCmdAddress<ValueType>(cmd);
   9108   }
   9109 
   9110   gpu::CommandHeader header;
   9111   uint32 width;
   9112   uint32 height;
   9113   float scale_factor;
   9114 };
   9115 
   9116 COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16,
   9117                Sizeof_ResizeCHROMIUM_is_not_16);
   9118 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0,
   9119                OffsetOf_ResizeCHROMIUM_header_not_0);
   9120 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4,
   9121                OffsetOf_ResizeCHROMIUM_width_not_4);
   9122 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, height) == 8,
   9123                OffsetOf_ResizeCHROMIUM_height_not_8);
   9124 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, scale_factor) == 12,
   9125                OffsetOf_ResizeCHROMIUM_scale_factor_not_12);
   9126 
   9127 struct GetRequestableExtensionsCHROMIUM {
   9128   typedef GetRequestableExtensionsCHROMIUM ValueType;
   9129   static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM;
   9130   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9131 
   9132   static uint32 ComputeSize() {
   9133     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9134   }
   9135 
   9136   void SetHeader() {
   9137     header.SetCmd<ValueType>();
   9138   }
   9139 
   9140   void Init(uint32 _bucket_id) {
   9141     SetHeader();
   9142     bucket_id = _bucket_id;
   9143   }
   9144 
   9145   void* Set(void* cmd, uint32 _bucket_id) {
   9146     static_cast<ValueType*>(cmd)->Init(_bucket_id);
   9147     return NextCmdAddress<ValueType>(cmd);
   9148   }
   9149 
   9150   gpu::CommandHeader header;
   9151   uint32 bucket_id;
   9152 };
   9153 
   9154 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM) == 8,
   9155                Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8);
   9156 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0,
   9157                OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0);
   9158 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4,
   9159                OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4);
   9160 
   9161 struct RequestExtensionCHROMIUM {
   9162   typedef RequestExtensionCHROMIUM ValueType;
   9163   static const CommandId kCmdId = kRequestExtensionCHROMIUM;
   9164   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9165 
   9166   static uint32 ComputeSize() {
   9167     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9168   }
   9169 
   9170   void SetHeader() {
   9171     header.SetCmd<ValueType>();
   9172   }
   9173 
   9174   void Init(uint32 _bucket_id) {
   9175     SetHeader();
   9176     bucket_id = _bucket_id;
   9177   }
   9178 
   9179   void* Set(void* cmd, uint32 _bucket_id) {
   9180     static_cast<ValueType*>(cmd)->Init(_bucket_id);
   9181     return NextCmdAddress<ValueType>(cmd);
   9182   }
   9183 
   9184   gpu::CommandHeader header;
   9185   uint32 bucket_id;
   9186 };
   9187 
   9188 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM) == 8,
   9189                Sizeof_RequestExtensionCHROMIUM_is_not_8);
   9190 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0,
   9191                OffsetOf_RequestExtensionCHROMIUM_header_not_0);
   9192 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4,
   9193                OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4);
   9194 
   9195 struct GetMultipleIntegervCHROMIUM {
   9196   typedef GetMultipleIntegervCHROMIUM ValueType;
   9197   static const CommandId kCmdId = kGetMultipleIntegervCHROMIUM;
   9198   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9199 
   9200   static uint32 ComputeSize() {
   9201     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9202   }
   9203 
   9204   void SetHeader() {
   9205     header.SetCmd<ValueType>();
   9206   }
   9207 
   9208   void Init(
   9209       uint32 _pnames_shm_id, uint32 _pnames_shm_offset, GLuint _count,
   9210       uint32 _results_shm_id, uint32 _results_shm_offset, GLsizeiptr _size) {
   9211     SetHeader();
   9212     pnames_shm_id = _pnames_shm_id;
   9213     pnames_shm_offset = _pnames_shm_offset;
   9214     count = _count;
   9215     results_shm_id = _results_shm_id;
   9216     results_shm_offset = _results_shm_offset;
   9217     size = _size;
   9218   }
   9219 
   9220   void* Set(
   9221       void* cmd, uint32 _pnames_shm_id, uint32 _pnames_shm_offset,
   9222       GLuint _count, uint32 _results_shm_id, uint32 _results_shm_offset,
   9223       GLsizeiptr _size) {
   9224     static_cast<ValueType*>(
   9225         cmd)->Init(
   9226             _pnames_shm_id, _pnames_shm_offset, _count, _results_shm_id,
   9227             _results_shm_offset, _size);
   9228     return NextCmdAddress<ValueType>(cmd);
   9229   }
   9230 
   9231   gpu::CommandHeader header;
   9232   uint32 pnames_shm_id;
   9233   uint32 pnames_shm_offset;
   9234   uint32 count;
   9235   uint32 results_shm_id;
   9236   uint32 results_shm_offset;
   9237   int32 size;
   9238 };
   9239 
   9240 COMPILE_ASSERT(sizeof(GetMultipleIntegervCHROMIUM) == 28,
   9241                Sizeof_GetMultipleIntegervCHROMIUM_is_not_28);
   9242 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, header) == 0,
   9243                OffsetOf_GetMultipleIntegervCHROMIUM_header_not_0);
   9244 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_id) == 4,
   9245                OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_id_not_4);
   9246 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, pnames_shm_offset) == 8,
   9247                OffsetOf_GetMultipleIntegervCHROMIUM_pnames_shm_offset_not_8);
   9248 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, count) == 12,
   9249                OffsetOf_GetMultipleIntegervCHROMIUM_count_not_12);
   9250 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_id) == 16,
   9251                OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_id_not_16);
   9252 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, results_shm_offset) == 20,
   9253                OffsetOf_GetMultipleIntegervCHROMIUM_results_shm_offset_not_20);
   9254 COMPILE_ASSERT(offsetof(GetMultipleIntegervCHROMIUM, size) == 24,
   9255                OffsetOf_GetMultipleIntegervCHROMIUM_size_not_24);
   9256 
   9257 struct GetProgramInfoCHROMIUM {
   9258   typedef GetProgramInfoCHROMIUM ValueType;
   9259   static const CommandId kCmdId = kGetProgramInfoCHROMIUM;
   9260   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9261 
   9262   struct Result {
   9263     uint32 link_status;
   9264     uint32 num_attribs;
   9265     uint32 num_uniforms;
   9266   };
   9267 
   9268   static uint32 ComputeSize() {
   9269     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9270   }
   9271 
   9272   void SetHeader() {
   9273     header.SetCmd<ValueType>();
   9274   }
   9275 
   9276   void Init(GLuint _program, uint32 _bucket_id) {
   9277     SetHeader();
   9278     program = _program;
   9279     bucket_id = _bucket_id;
   9280   }
   9281 
   9282   void* Set(void* cmd, GLuint _program, uint32 _bucket_id) {
   9283     static_cast<ValueType*>(cmd)->Init(_program, _bucket_id);
   9284     return NextCmdAddress<ValueType>(cmd);
   9285   }
   9286 
   9287   gpu::CommandHeader header;
   9288   uint32 program;
   9289   uint32 bucket_id;
   9290 };
   9291 
   9292 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM) == 12,
   9293                Sizeof_GetProgramInfoCHROMIUM_is_not_12);
   9294 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, header) == 0,
   9295                OffsetOf_GetProgramInfoCHROMIUM_header_not_0);
   9296 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, program) == 4,
   9297                OffsetOf_GetProgramInfoCHROMIUM_program_not_4);
   9298 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8,
   9299                OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8);
   9300 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0,
   9301                OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0);
   9302 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4,
   9303                OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4);
   9304 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8,
   9305                OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8);
   9306 
   9307 struct CreateStreamTextureCHROMIUM {
   9308   typedef CreateStreamTextureCHROMIUM ValueType;
   9309   static const CommandId kCmdId = kCreateStreamTextureCHROMIUM;
   9310   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9311 
   9312   typedef GLuint Result;
   9313 
   9314   static uint32 ComputeSize() {
   9315     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9316   }
   9317 
   9318   void SetHeader() {
   9319     header.SetCmd<ValueType>();
   9320   }
   9321 
   9322   void Init(
   9323       GLuint _client_id, uint32 _result_shm_id, uint32 _result_shm_offset) {
   9324     SetHeader();
   9325     client_id = _client_id;
   9326     result_shm_id = _result_shm_id;
   9327     result_shm_offset = _result_shm_offset;
   9328   }
   9329 
   9330   void* Set(
   9331       void* cmd, GLuint _client_id, uint32 _result_shm_id,
   9332       uint32 _result_shm_offset) {
   9333     static_cast<ValueType*>(
   9334         cmd)->Init(_client_id, _result_shm_id, _result_shm_offset);
   9335     return NextCmdAddress<ValueType>(cmd);
   9336   }
   9337 
   9338   gpu::CommandHeader header;
   9339   uint32 client_id;
   9340   uint32 result_shm_id;
   9341   uint32 result_shm_offset;
   9342 };
   9343 
   9344 COMPILE_ASSERT(sizeof(CreateStreamTextureCHROMIUM) == 16,
   9345                Sizeof_CreateStreamTextureCHROMIUM_is_not_16);
   9346 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, header) == 0,
   9347                OffsetOf_CreateStreamTextureCHROMIUM_header_not_0);
   9348 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, client_id) == 4,
   9349                OffsetOf_CreateStreamTextureCHROMIUM_client_id_not_4);
   9350 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, result_shm_id) == 8,
   9351                OffsetOf_CreateStreamTextureCHROMIUM_result_shm_id_not_8);
   9352 COMPILE_ASSERT(offsetof(CreateStreamTextureCHROMIUM, result_shm_offset) == 12,
   9353                OffsetOf_CreateStreamTextureCHROMIUM_result_shm_offset_not_12);
   9354 
   9355 struct DestroyStreamTextureCHROMIUM {
   9356   typedef DestroyStreamTextureCHROMIUM ValueType;
   9357   static const CommandId kCmdId = kDestroyStreamTextureCHROMIUM;
   9358   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9359 
   9360   static uint32 ComputeSize() {
   9361     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9362   }
   9363 
   9364   void SetHeader() {
   9365     header.SetCmd<ValueType>();
   9366   }
   9367 
   9368   void Init(GLuint _texture) {
   9369     SetHeader();
   9370     texture = _texture;
   9371   }
   9372 
   9373   void* Set(void* cmd, GLuint _texture) {
   9374     static_cast<ValueType*>(cmd)->Init(_texture);
   9375     return NextCmdAddress<ValueType>(cmd);
   9376   }
   9377 
   9378   gpu::CommandHeader header;
   9379   uint32 texture;
   9380 };
   9381 
   9382 COMPILE_ASSERT(sizeof(DestroyStreamTextureCHROMIUM) == 8,
   9383                Sizeof_DestroyStreamTextureCHROMIUM_is_not_8);
   9384 COMPILE_ASSERT(offsetof(DestroyStreamTextureCHROMIUM, header) == 0,
   9385                OffsetOf_DestroyStreamTextureCHROMIUM_header_not_0);
   9386 COMPILE_ASSERT(offsetof(DestroyStreamTextureCHROMIUM, texture) == 4,
   9387                OffsetOf_DestroyStreamTextureCHROMIUM_texture_not_4);
   9388 
   9389 struct GetTranslatedShaderSourceANGLE {
   9390   typedef GetTranslatedShaderSourceANGLE ValueType;
   9391   static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE;
   9392   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9393 
   9394   static uint32 ComputeSize() {
   9395     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9396   }
   9397 
   9398   void SetHeader() {
   9399     header.SetCmd<ValueType>();
   9400   }
   9401 
   9402   void Init(GLuint _shader, uint32 _bucket_id) {
   9403     SetHeader();
   9404     shader = _shader;
   9405     bucket_id = _bucket_id;
   9406   }
   9407 
   9408   void* Set(void* cmd, GLuint _shader, uint32 _bucket_id) {
   9409     static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id);
   9410     return NextCmdAddress<ValueType>(cmd);
   9411   }
   9412 
   9413   gpu::CommandHeader header;
   9414   uint32 shader;
   9415   uint32 bucket_id;
   9416 };
   9417 
   9418 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE) == 12,
   9419                Sizeof_GetTranslatedShaderSourceANGLE_is_not_12);
   9420 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, header) == 0,
   9421                OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0);
   9422 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4,
   9423                OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4);
   9424 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8,
   9425                OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8);
   9426 
   9427 struct PostSubBufferCHROMIUM {
   9428   typedef PostSubBufferCHROMIUM ValueType;
   9429   static const CommandId kCmdId = kPostSubBufferCHROMIUM;
   9430   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9431 
   9432   static uint32 ComputeSize() {
   9433     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9434   }
   9435 
   9436   void SetHeader() {
   9437     header.SetCmd<ValueType>();
   9438   }
   9439 
   9440   void Init(GLint _x, GLint _y, GLint _width, GLint _height) {
   9441     SetHeader();
   9442     x = _x;
   9443     y = _y;
   9444     width = _width;
   9445     height = _height;
   9446   }
   9447 
   9448   void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
   9449     static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
   9450     return NextCmdAddress<ValueType>(cmd);
   9451   }
   9452 
   9453   gpu::CommandHeader header;
   9454   int32 x;
   9455   int32 y;
   9456   int32 width;
   9457   int32 height;
   9458 };
   9459 
   9460 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM) == 20,
   9461                Sizeof_PostSubBufferCHROMIUM_is_not_20);
   9462 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, header) == 0,
   9463                OffsetOf_PostSubBufferCHROMIUM_header_not_0);
   9464 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4,
   9465                OffsetOf_PostSubBufferCHROMIUM_x_not_4);
   9466 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8,
   9467                OffsetOf_PostSubBufferCHROMIUM_y_not_8);
   9468 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12,
   9469                OffsetOf_PostSubBufferCHROMIUM_width_not_12);
   9470 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
   9471                OffsetOf_PostSubBufferCHROMIUM_height_not_16);
   9472 
   9473 struct TexImageIOSurface2DCHROMIUM {
   9474   typedef TexImageIOSurface2DCHROMIUM ValueType;
   9475   static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
   9476   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9477 
   9478   static uint32 ComputeSize() {
   9479     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9480   }
   9481 
   9482   void SetHeader() {
   9483     header.SetCmd<ValueType>();
   9484   }
   9485 
   9486   void Init(
   9487       GLenum _target, GLsizei _width, GLsizei _height, GLuint _ioSurfaceId,
   9488       GLuint _plane) {
   9489     SetHeader();
   9490     target = _target;
   9491     width = _width;
   9492     height = _height;
   9493     ioSurfaceId = _ioSurfaceId;
   9494     plane = _plane;
   9495   }
   9496 
   9497   void* Set(
   9498       void* cmd, GLenum _target, GLsizei _width, GLsizei _height,
   9499       GLuint _ioSurfaceId, GLuint _plane) {
   9500     static_cast<ValueType*>(
   9501         cmd)->Init(_target, _width, _height, _ioSurfaceId, _plane);
   9502     return NextCmdAddress<ValueType>(cmd);
   9503   }
   9504 
   9505   gpu::CommandHeader header;
   9506   uint32 target;
   9507   int32 width;
   9508   int32 height;
   9509   uint32 ioSurfaceId;
   9510   uint32 plane;
   9511 };
   9512 
   9513 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
   9514                Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24);
   9515 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
   9516                OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0);
   9517 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
   9518                OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4);
   9519 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
   9520                OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8);
   9521 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
   9522                OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12);
   9523 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
   9524                OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16);
   9525 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
   9526                OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20);
   9527 
   9528 struct CopyTextureCHROMIUM {
   9529   typedef CopyTextureCHROMIUM ValueType;
   9530   static const CommandId kCmdId = kCopyTextureCHROMIUM;
   9531   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9532 
   9533   static uint32 ComputeSize() {
   9534     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9535   }
   9536 
   9537   void SetHeader() {
   9538     header.SetCmd<ValueType>();
   9539   }
   9540 
   9541   void Init(
   9542       GLenum _target, GLenum _source_id, GLenum _dest_id, GLint _level,
   9543       GLint _internalformat, GLenum _dest_type) {
   9544     SetHeader();
   9545     target = _target;
   9546     source_id = _source_id;
   9547     dest_id = _dest_id;
   9548     level = _level;
   9549     internalformat = _internalformat;
   9550     dest_type = _dest_type;
   9551   }
   9552 
   9553   void* Set(
   9554       void* cmd, GLenum _target, GLenum _source_id, GLenum _dest_id,
   9555       GLint _level, GLint _internalformat, GLenum _dest_type) {
   9556     static_cast<ValueType*>(
   9557         cmd)->Init(
   9558             _target, _source_id, _dest_id, _level, _internalformat,
   9559             _dest_type);
   9560     return NextCmdAddress<ValueType>(cmd);
   9561   }
   9562 
   9563   gpu::CommandHeader header;
   9564   uint32 target;
   9565   uint32 source_id;
   9566   uint32 dest_id;
   9567   int32 level;
   9568   int32 internalformat;
   9569   uint32 dest_type;
   9570 };
   9571 
   9572 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM) == 28,
   9573                Sizeof_CopyTextureCHROMIUM_is_not_28);
   9574 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, header) == 0,
   9575                OffsetOf_CopyTextureCHROMIUM_header_not_0);
   9576 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, target) == 4,
   9577                OffsetOf_CopyTextureCHROMIUM_target_not_4);
   9578 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, source_id) == 8,
   9579                OffsetOf_CopyTextureCHROMIUM_source_id_not_8);
   9580 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_id) == 12,
   9581                OffsetOf_CopyTextureCHROMIUM_dest_id_not_12);
   9582 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, level) == 16,
   9583                OffsetOf_CopyTextureCHROMIUM_level_not_16);
   9584 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, internalformat) == 20,
   9585                OffsetOf_CopyTextureCHROMIUM_internalformat_not_20);
   9586 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_type) == 24,
   9587                OffsetOf_CopyTextureCHROMIUM_dest_type_not_24);
   9588 
   9589 struct DrawArraysInstancedANGLE {
   9590   typedef DrawArraysInstancedANGLE ValueType;
   9591   static const CommandId kCmdId = kDrawArraysInstancedANGLE;
   9592   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9593 
   9594   static uint32 ComputeSize() {
   9595     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9596   }
   9597 
   9598   void SetHeader() {
   9599     header.SetCmd<ValueType>();
   9600   }
   9601 
   9602   void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) {
   9603     SetHeader();
   9604     mode = _mode;
   9605     first = _first;
   9606     count = _count;
   9607     primcount = _primcount;
   9608   }
   9609 
   9610   void* Set(
   9611       void* cmd, GLenum _mode, GLint _first, GLsizei _count,
   9612       GLsizei _primcount) {
   9613     static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount);
   9614     return NextCmdAddress<ValueType>(cmd);
   9615   }
   9616 
   9617   gpu::CommandHeader header;
   9618   uint32 mode;
   9619   int32 first;
   9620   int32 count;
   9621   int32 primcount;
   9622 };
   9623 
   9624 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE) == 20,
   9625                Sizeof_DrawArraysInstancedANGLE_is_not_20);
   9626 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, header) == 0,
   9627                OffsetOf_DrawArraysInstancedANGLE_header_not_0);
   9628 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, mode) == 4,
   9629                OffsetOf_DrawArraysInstancedANGLE_mode_not_4);
   9630 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, first) == 8,
   9631                OffsetOf_DrawArraysInstancedANGLE_first_not_8);
   9632 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, count) == 12,
   9633                OffsetOf_DrawArraysInstancedANGLE_count_not_12);
   9634 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, primcount) == 16,
   9635                OffsetOf_DrawArraysInstancedANGLE_primcount_not_16);
   9636 
   9637 struct DrawElementsInstancedANGLE {
   9638   typedef DrawElementsInstancedANGLE ValueType;
   9639   static const CommandId kCmdId = kDrawElementsInstancedANGLE;
   9640   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9641 
   9642   static uint32 ComputeSize() {
   9643     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9644   }
   9645 
   9646   void SetHeader() {
   9647     header.SetCmd<ValueType>();
   9648   }
   9649 
   9650   void Init(
   9651       GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset,
   9652       GLsizei _primcount) {
   9653     SetHeader();
   9654     mode = _mode;
   9655     count = _count;
   9656     type = _type;
   9657     index_offset = _index_offset;
   9658     primcount = _primcount;
   9659   }
   9660 
   9661   void* Set(
   9662       void* cmd, GLenum _mode, GLsizei _count, GLenum _type,
   9663       GLuint _index_offset, GLsizei _primcount) {
   9664     static_cast<ValueType*>(
   9665         cmd)->Init(_mode, _count, _type, _index_offset, _primcount);
   9666     return NextCmdAddress<ValueType>(cmd);
   9667   }
   9668 
   9669   gpu::CommandHeader header;
   9670   uint32 mode;
   9671   int32 count;
   9672   uint32 type;
   9673   uint32 index_offset;
   9674   int32 primcount;
   9675 };
   9676 
   9677 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE) == 24,
   9678                Sizeof_DrawElementsInstancedANGLE_is_not_24);
   9679 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, header) == 0,
   9680                OffsetOf_DrawElementsInstancedANGLE_header_not_0);
   9681 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, mode) == 4,
   9682                OffsetOf_DrawElementsInstancedANGLE_mode_not_4);
   9683 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, count) == 8,
   9684                OffsetOf_DrawElementsInstancedANGLE_count_not_8);
   9685 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, type) == 12,
   9686                OffsetOf_DrawElementsInstancedANGLE_type_not_12);
   9687 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, index_offset) == 16,
   9688                OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16);
   9689 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, primcount) == 20,
   9690                OffsetOf_DrawElementsInstancedANGLE_primcount_not_20);
   9691 
   9692 struct VertexAttribDivisorANGLE {
   9693   typedef VertexAttribDivisorANGLE ValueType;
   9694   static const CommandId kCmdId = kVertexAttribDivisorANGLE;
   9695   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9696 
   9697   static uint32 ComputeSize() {
   9698     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9699   }
   9700 
   9701   void SetHeader() {
   9702     header.SetCmd<ValueType>();
   9703   }
   9704 
   9705   void Init(GLuint _index, GLuint _divisor) {
   9706     SetHeader();
   9707     index = _index;
   9708     divisor = _divisor;
   9709   }
   9710 
   9711   void* Set(void* cmd, GLuint _index, GLuint _divisor) {
   9712     static_cast<ValueType*>(cmd)->Init(_index, _divisor);
   9713     return NextCmdAddress<ValueType>(cmd);
   9714   }
   9715 
   9716   gpu::CommandHeader header;
   9717   uint32 index;
   9718   uint32 divisor;
   9719 };
   9720 
   9721 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12,
   9722                Sizeof_VertexAttribDivisorANGLE_is_not_12);
   9723 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0,
   9724                OffsetOf_VertexAttribDivisorANGLE_header_not_0);
   9725 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4,
   9726                OffsetOf_VertexAttribDivisorANGLE_index_not_4);
   9727 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
   9728                OffsetOf_VertexAttribDivisorANGLE_divisor_not_8);
   9729 
   9730 struct ProduceTextureCHROMIUM {
   9731   typedef ProduceTextureCHROMIUM ValueType;
   9732   static const CommandId kCmdId = kProduceTextureCHROMIUM;
   9733   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9734 
   9735   static uint32 ComputeSize() {
   9736     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9737   }
   9738 
   9739   void SetHeader() {
   9740     header.SetCmd<ValueType>();
   9741   }
   9742 
   9743   void Init(
   9744       GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
   9745     SetHeader();
   9746     target = _target;
   9747     mailbox_shm_id = _mailbox_shm_id;
   9748     mailbox_shm_offset = _mailbox_shm_offset;
   9749   }
   9750 
   9751   void* Set(
   9752       void* cmd, GLenum _target, uint32 _mailbox_shm_id,
   9753       uint32 _mailbox_shm_offset) {
   9754     static_cast<ValueType*>(
   9755         cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
   9756     return NextCmdAddress<ValueType>(cmd);
   9757   }
   9758 
   9759   gpu::CommandHeader header;
   9760   uint32 target;
   9761   uint32 mailbox_shm_id;
   9762   uint32 mailbox_shm_offset;
   9763 };
   9764 
   9765 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUM) == 16,
   9766                Sizeof_ProduceTextureCHROMIUM_is_not_16);
   9767 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, header) == 0,
   9768                OffsetOf_ProduceTextureCHROMIUM_header_not_0);
   9769 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, target) == 4,
   9770                OffsetOf_ProduceTextureCHROMIUM_target_not_4);
   9771 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_id) == 8,
   9772                OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_id_not_8);
   9773 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_offset) == 12,
   9774                OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_offset_not_12);
   9775 
   9776 struct ProduceTextureCHROMIUMImmediate {
   9777   typedef ProduceTextureCHROMIUMImmediate ValueType;
   9778   static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
   9779   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   9780 
   9781   static uint32 ComputeDataSize() {
   9782     return static_cast<uint32>(
   9783         sizeof(GLbyte) * 64);  // NOLINT
   9784   }
   9785 
   9786   static uint32 ComputeSize() {
   9787     return static_cast<uint32>(
   9788         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   9789   }
   9790 
   9791   void SetHeader() {
   9792     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   9793   }
   9794 
   9795   void Init(GLenum _target, const GLbyte* _mailbox) {
   9796     SetHeader();
   9797     target = _target;
   9798     memcpy(ImmediateDataAddress(this),
   9799            _mailbox, ComputeDataSize());
   9800   }
   9801 
   9802   void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
   9803     static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
   9804     const uint32 size = ComputeSize();
   9805     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   9806   }
   9807 
   9808   gpu::CommandHeader header;
   9809   uint32 target;
   9810 };
   9811 
   9812 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
   9813                Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
   9814 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
   9815                OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
   9816 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
   9817                OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
   9818 
   9819 struct ConsumeTextureCHROMIUM {
   9820   typedef ConsumeTextureCHROMIUM ValueType;
   9821   static const CommandId kCmdId = kConsumeTextureCHROMIUM;
   9822   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9823 
   9824   static uint32 ComputeSize() {
   9825     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9826   }
   9827 
   9828   void SetHeader() {
   9829     header.SetCmd<ValueType>();
   9830   }
   9831 
   9832   void Init(
   9833       GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
   9834     SetHeader();
   9835     target = _target;
   9836     mailbox_shm_id = _mailbox_shm_id;
   9837     mailbox_shm_offset = _mailbox_shm_offset;
   9838   }
   9839 
   9840   void* Set(
   9841       void* cmd, GLenum _target, uint32 _mailbox_shm_id,
   9842       uint32 _mailbox_shm_offset) {
   9843     static_cast<ValueType*>(
   9844         cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
   9845     return NextCmdAddress<ValueType>(cmd);
   9846   }
   9847 
   9848   gpu::CommandHeader header;
   9849   uint32 target;
   9850   uint32 mailbox_shm_id;
   9851   uint32 mailbox_shm_offset;
   9852 };
   9853 
   9854 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUM) == 16,
   9855                Sizeof_ConsumeTextureCHROMIUM_is_not_16);
   9856 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, header) == 0,
   9857                OffsetOf_ConsumeTextureCHROMIUM_header_not_0);
   9858 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, target) == 4,
   9859                OffsetOf_ConsumeTextureCHROMIUM_target_not_4);
   9860 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_id) == 8,
   9861                OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_id_not_8);
   9862 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_offset) == 12,
   9863                OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_offset_not_12);
   9864 
   9865 struct ConsumeTextureCHROMIUMImmediate {
   9866   typedef ConsumeTextureCHROMIUMImmediate ValueType;
   9867   static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
   9868   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   9869 
   9870   static uint32 ComputeDataSize() {
   9871     return static_cast<uint32>(
   9872         sizeof(GLbyte) * 64);  // NOLINT
   9873   }
   9874 
   9875   static uint32 ComputeSize() {
   9876     return static_cast<uint32>(
   9877         sizeof(ValueType) + ComputeDataSize());  // NOLINT
   9878   }
   9879 
   9880   void SetHeader() {
   9881     header.SetCmdByTotalSize<ValueType>(ComputeSize());
   9882   }
   9883 
   9884   void Init(GLenum _target, const GLbyte* _mailbox) {
   9885     SetHeader();
   9886     target = _target;
   9887     memcpy(ImmediateDataAddress(this),
   9888            _mailbox, ComputeDataSize());
   9889   }
   9890 
   9891   void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) {
   9892     static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
   9893     const uint32 size = ComputeSize();
   9894     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   9895   }
   9896 
   9897   gpu::CommandHeader header;
   9898   uint32 target;
   9899 };
   9900 
   9901 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
   9902                Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
   9903 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
   9904                OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
   9905 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
   9906                OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
   9907 
   9908 struct BindUniformLocationCHROMIUM {
   9909   typedef BindUniformLocationCHROMIUM ValueType;
   9910   static const CommandId kCmdId = kBindUniformLocationCHROMIUM;
   9911   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9912 
   9913   static uint32 ComputeSize() {
   9914     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9915   }
   9916 
   9917   void SetHeader() {
   9918     header.SetCmd<ValueType>();
   9919   }
   9920 
   9921   void Init(
   9922       GLuint _program, GLint _location, uint32 _name_shm_id,
   9923       uint32 _name_shm_offset, uint32 _data_size) {
   9924     SetHeader();
   9925     program = _program;
   9926     location = _location;
   9927     name_shm_id = _name_shm_id;
   9928     name_shm_offset = _name_shm_offset;
   9929     data_size = _data_size;
   9930   }
   9931 
   9932   void* Set(
   9933       void* cmd, GLuint _program, GLint _location, uint32 _name_shm_id,
   9934       uint32 _name_shm_offset, uint32 _data_size) {
   9935     static_cast<ValueType*>(
   9936         cmd)->Init(
   9937             _program, _location, _name_shm_id, _name_shm_offset, _data_size);
   9938     return NextCmdAddress<ValueType>(cmd);
   9939   }
   9940 
   9941   gpu::CommandHeader header;
   9942   uint32 program;
   9943   int32 location;
   9944   uint32 name_shm_id;
   9945   uint32 name_shm_offset;
   9946   uint32 data_size;
   9947 };
   9948 
   9949 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUM) == 24,
   9950                Sizeof_BindUniformLocationCHROMIUM_is_not_24);
   9951 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, header) == 0,
   9952                OffsetOf_BindUniformLocationCHROMIUM_header_not_0);
   9953 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, program) == 4,
   9954                OffsetOf_BindUniformLocationCHROMIUM_program_not_4);
   9955 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, location) == 8,
   9956                OffsetOf_BindUniformLocationCHROMIUM_location_not_8);
   9957 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_id) == 12,
   9958                OffsetOf_BindUniformLocationCHROMIUM_name_shm_id_not_12);
   9959 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16,
   9960                OffsetOf_BindUniformLocationCHROMIUM_name_shm_offset_not_16);
   9961 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20,
   9962                OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20);
   9963 
   9964 struct BindUniformLocationCHROMIUMBucket {
   9965   typedef BindUniformLocationCHROMIUMBucket ValueType;
   9966   static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
   9967   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   9968 
   9969   static uint32 ComputeSize() {
   9970     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   9971   }
   9972 
   9973   void SetHeader() {
   9974     header.SetCmd<ValueType>();
   9975   }
   9976 
   9977   void Init(GLuint _program, GLint _location, uint32 _name_bucket_id) {
   9978     SetHeader();
   9979     program = _program;
   9980     location = _location;
   9981     name_bucket_id = _name_bucket_id;
   9982   }
   9983 
   9984   void* Set(
   9985       void* cmd, GLuint _program, GLint _location, uint32 _name_bucket_id) {
   9986     static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id);
   9987     return NextCmdAddress<ValueType>(cmd);
   9988   }
   9989 
   9990   gpu::CommandHeader header;
   9991   uint32 program;
   9992   int32 location;
   9993   uint32 name_bucket_id;
   9994 };
   9995 
   9996 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16,
   9997                Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16);
   9998 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0,
   9999                OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0);
   10000 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4,
   10001                OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4);
   10002 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8,
   10003                OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8);
   10004 COMPILE_ASSERT(
   10005     offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12,
   10006                OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12);  // NOLINT
   10007 
   10008 struct BindTexImage2DCHROMIUM {
   10009   typedef BindTexImage2DCHROMIUM ValueType;
   10010   static const CommandId kCmdId = kBindTexImage2DCHROMIUM;
   10011   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10012 
   10013   static uint32 ComputeSize() {
   10014     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10015   }
   10016 
   10017   void SetHeader() {
   10018     header.SetCmd<ValueType>();
   10019   }
   10020 
   10021   void Init(GLenum _target, GLint _imageId) {
   10022     SetHeader();
   10023     target = _target;
   10024     imageId = _imageId;
   10025   }
   10026 
   10027   void* Set(void* cmd, GLenum _target, GLint _imageId) {
   10028     static_cast<ValueType*>(cmd)->Init(_target, _imageId);
   10029     return NextCmdAddress<ValueType>(cmd);
   10030   }
   10031 
   10032   gpu::CommandHeader header;
   10033   uint32 target;
   10034   int32 imageId;
   10035 };
   10036 
   10037 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM) == 12,
   10038                Sizeof_BindTexImage2DCHROMIUM_is_not_12);
   10039 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, header) == 0,
   10040                OffsetOf_BindTexImage2DCHROMIUM_header_not_0);
   10041 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, target) == 4,
   10042                OffsetOf_BindTexImage2DCHROMIUM_target_not_4);
   10043 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, imageId) == 8,
   10044                OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8);
   10045 
   10046 struct ReleaseTexImage2DCHROMIUM {
   10047   typedef ReleaseTexImage2DCHROMIUM ValueType;
   10048   static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM;
   10049   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10050 
   10051   static uint32 ComputeSize() {
   10052     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10053   }
   10054 
   10055   void SetHeader() {
   10056     header.SetCmd<ValueType>();
   10057   }
   10058 
   10059   void Init(GLenum _target, GLint _imageId) {
   10060     SetHeader();
   10061     target = _target;
   10062     imageId = _imageId;
   10063   }
   10064 
   10065   void* Set(void* cmd, GLenum _target, GLint _imageId) {
   10066     static_cast<ValueType*>(cmd)->Init(_target, _imageId);
   10067     return NextCmdAddress<ValueType>(cmd);
   10068   }
   10069 
   10070   gpu::CommandHeader header;
   10071   uint32 target;
   10072   int32 imageId;
   10073 };
   10074 
   10075 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM) == 12,
   10076                Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12);
   10077 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0,
   10078                OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0);
   10079 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
   10080                OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4);
   10081 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
   10082                OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8);
   10083 
   10084 struct TraceBeginCHROMIUM {
   10085   typedef TraceBeginCHROMIUM ValueType;
   10086   static const CommandId kCmdId = kTraceBeginCHROMIUM;
   10087   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10088 
   10089   static uint32 ComputeSize() {
   10090     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10091   }
   10092 
   10093   void SetHeader() {
   10094     header.SetCmd<ValueType>();
   10095   }
   10096 
   10097   void Init(GLuint _bucket_id) {
   10098     SetHeader();
   10099     bucket_id = _bucket_id;
   10100   }
   10101 
   10102   void* Set(void* cmd, GLuint _bucket_id) {
   10103     static_cast<ValueType*>(cmd)->Init(_bucket_id);
   10104     return NextCmdAddress<ValueType>(cmd);
   10105   }
   10106 
   10107   gpu::CommandHeader header;
   10108   uint32 bucket_id;
   10109 };
   10110 
   10111 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM) == 8,
   10112                Sizeof_TraceBeginCHROMIUM_is_not_8);
   10113 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, header) == 0,
   10114                OffsetOf_TraceBeginCHROMIUM_header_not_0);
   10115 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, bucket_id) == 4,
   10116                OffsetOf_TraceBeginCHROMIUM_bucket_id_not_4);
   10117 
   10118 struct TraceEndCHROMIUM {
   10119   typedef TraceEndCHROMIUM ValueType;
   10120   static const CommandId kCmdId = kTraceEndCHROMIUM;
   10121   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10122 
   10123   static uint32 ComputeSize() {
   10124     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10125   }
   10126 
   10127   void SetHeader() {
   10128     header.SetCmd<ValueType>();
   10129   }
   10130 
   10131   void Init() {
   10132     SetHeader();
   10133   }
   10134 
   10135   void* Set(void* cmd) {
   10136     static_cast<ValueType*>(cmd)->Init();
   10137     return NextCmdAddress<ValueType>(cmd);
   10138   }
   10139 
   10140   gpu::CommandHeader header;
   10141 };
   10142 
   10143 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4,
   10144                Sizeof_TraceEndCHROMIUM_is_not_4);
   10145 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0,
   10146                OffsetOf_TraceEndCHROMIUM_header_not_0);
   10147 
   10148 struct AsyncTexSubImage2DCHROMIUM {
   10149   typedef AsyncTexSubImage2DCHROMIUM ValueType;
   10150   static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM;
   10151   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10152 
   10153   static uint32 ComputeSize() {
   10154     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10155   }
   10156 
   10157   void SetHeader() {
   10158     header.SetCmd<ValueType>();
   10159   }
   10160 
   10161   void Init(
   10162       GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   10163       GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
   10164       uint32 _data_shm_id, uint32 _data_shm_offset) {
   10165     SetHeader();
   10166     target = _target;
   10167     level = _level;
   10168     xoffset = _xoffset;
   10169     yoffset = _yoffset;
   10170     width = _width;
   10171     height = _height;
   10172     format = _format;
   10173     type = _type;
   10174     data_shm_id = _data_shm_id;
   10175     data_shm_offset = _data_shm_offset;
   10176   }
   10177 
   10178   void* Set(
   10179       void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset,
   10180       GLsizei _width, GLsizei _height, GLenum _format, GLenum _type,
   10181       uint32 _data_shm_id, uint32 _data_shm_offset) {
   10182     static_cast<ValueType*>(
   10183         cmd)->Init(
   10184             _target, _level, _xoffset, _yoffset, _width, _height, _format,
   10185             _type, _data_shm_id, _data_shm_offset);
   10186     return NextCmdAddress<ValueType>(cmd);
   10187   }
   10188 
   10189   gpu::CommandHeader header;
   10190   uint32 target;
   10191   int32 level;
   10192   int32 xoffset;
   10193   int32 yoffset;
   10194   int32 width;
   10195   int32 height;
   10196   uint32 format;
   10197   uint32 type;
   10198   uint32 data_shm_id;
   10199   uint32 data_shm_offset;
   10200 };
   10201 
   10202 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM) == 44,
   10203                Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_44);
   10204 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0,
   10205                OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0);
   10206 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4,
   10207                OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4);
   10208 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8,
   10209                OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8);
   10210 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12,
   10211                OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12);
   10212 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16,
   10213                OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16);
   10214 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20,
   10215                OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20);
   10216 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24,
   10217                OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24);
   10218 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28,
   10219                OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28);
   10220 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32,
   10221                OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32);
   10222 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36,
   10223                OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36);
   10224 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40,
   10225                OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40);
   10226 
   10227 struct AsyncTexImage2DCHROMIUM {
   10228   typedef AsyncTexImage2DCHROMIUM ValueType;
   10229   static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM;
   10230   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10231 
   10232   static uint32 ComputeSize() {
   10233     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10234   }
   10235 
   10236   void SetHeader() {
   10237     header.SetCmd<ValueType>();
   10238   }
   10239 
   10240   void Init(
   10241       GLenum _target, GLint _level, GLint _internalformat, GLsizei _width,
   10242       GLsizei _height, GLint _border, GLenum _format, GLenum _type,
   10243       uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
   10244     SetHeader();
   10245     target = _target;
   10246     level = _level;
   10247     internalformat = _internalformat;
   10248     width = _width;
   10249     height = _height;
   10250     border = _border;
   10251     format = _format;
   10252     type = _type;
   10253     pixels_shm_id = _pixels_shm_id;
   10254     pixels_shm_offset = _pixels_shm_offset;
   10255   }
   10256 
   10257   void* Set(
   10258       void* cmd, GLenum _target, GLint _level, GLint _internalformat,
   10259       GLsizei _width, GLsizei _height, GLint _border, GLenum _format,
   10260       GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) {
   10261     static_cast<ValueType*>(
   10262         cmd)->Init(
   10263             _target, _level, _internalformat, _width, _height, _border, _format,
   10264             _type, _pixels_shm_id, _pixels_shm_offset);
   10265     return NextCmdAddress<ValueType>(cmd);
   10266   }
   10267 
   10268   gpu::CommandHeader header;
   10269   uint32 target;
   10270   int32 level;
   10271   int32 internalformat;
   10272   int32 width;
   10273   int32 height;
   10274   int32 border;
   10275   uint32 format;
   10276   uint32 type;
   10277   uint32 pixels_shm_id;
   10278   uint32 pixels_shm_offset;
   10279 };
   10280 
   10281 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM) == 44,
   10282                Sizeof_AsyncTexImage2DCHROMIUM_is_not_44);
   10283 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, header) == 0,
   10284                OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0);
   10285 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, target) == 4,
   10286                OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4);
   10287 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, level) == 8,
   10288                OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8);
   10289 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12,
   10290                OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12);
   10291 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, width) == 16,
   10292                OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16);
   10293 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, height) == 20,
   10294                OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20);
   10295 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, border) == 24,
   10296                OffsetOf_AsyncTexImage2DCHROMIUM_border_not_24);
   10297 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, format) == 28,
   10298                OffsetOf_AsyncTexImage2DCHROMIUM_format_not_28);
   10299 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, type) == 32,
   10300                OffsetOf_AsyncTexImage2DCHROMIUM_type_not_32);
   10301 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 36,
   10302                OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_36);
   10303 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 40,
   10304                OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_40);
   10305 
   10306 struct WaitAsyncTexImage2DCHROMIUM {
   10307   typedef WaitAsyncTexImage2DCHROMIUM ValueType;
   10308   static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM;
   10309   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10310 
   10311   static uint32 ComputeSize() {
   10312     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10313   }
   10314 
   10315   void SetHeader() {
   10316     header.SetCmd<ValueType>();
   10317   }
   10318 
   10319   void Init(GLenum _target) {
   10320     SetHeader();
   10321     target = _target;
   10322   }
   10323 
   10324   void* Set(void* cmd, GLenum _target) {
   10325     static_cast<ValueType*>(cmd)->Init(_target);
   10326     return NextCmdAddress<ValueType>(cmd);
   10327   }
   10328 
   10329   gpu::CommandHeader header;
   10330   uint32 target;
   10331 };
   10332 
   10333 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8,
   10334                Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8);
   10335 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0,
   10336                OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0);
   10337 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4,
   10338                OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4);
   10339 
   10340 struct DiscardFramebufferEXT {
   10341   typedef DiscardFramebufferEXT ValueType;
   10342   static const CommandId kCmdId = kDiscardFramebufferEXT;
   10343   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10344 
   10345   static uint32 ComputeSize() {
   10346     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10347   }
   10348 
   10349   void SetHeader() {
   10350     header.SetCmd<ValueType>();
   10351   }
   10352 
   10353   void Init(
   10354       GLenum _target, GLsizei _count, uint32 _attachments_shm_id,
   10355       uint32 _attachments_shm_offset) {
   10356     SetHeader();
   10357     target = _target;
   10358     count = _count;
   10359     attachments_shm_id = _attachments_shm_id;
   10360     attachments_shm_offset = _attachments_shm_offset;
   10361   }
   10362 
   10363   void* Set(
   10364       void* cmd, GLenum _target, GLsizei _count, uint32 _attachments_shm_id,
   10365       uint32 _attachments_shm_offset) {
   10366     static_cast<ValueType*>(
   10367         cmd)->Init(
   10368             _target, _count, _attachments_shm_id, _attachments_shm_offset);
   10369     return NextCmdAddress<ValueType>(cmd);
   10370   }
   10371 
   10372   gpu::CommandHeader header;
   10373   uint32 target;
   10374   int32 count;
   10375   uint32 attachments_shm_id;
   10376   uint32 attachments_shm_offset;
   10377 };
   10378 
   10379 COMPILE_ASSERT(sizeof(DiscardFramebufferEXT) == 20,
   10380                Sizeof_DiscardFramebufferEXT_is_not_20);
   10381 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, header) == 0,
   10382                OffsetOf_DiscardFramebufferEXT_header_not_0);
   10383 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, target) == 4,
   10384                OffsetOf_DiscardFramebufferEXT_target_not_4);
   10385 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, count) == 8,
   10386                OffsetOf_DiscardFramebufferEXT_count_not_8);
   10387 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_id) == 12,
   10388                OffsetOf_DiscardFramebufferEXT_attachments_shm_id_not_12);
   10389 COMPILE_ASSERT(offsetof(DiscardFramebufferEXT, attachments_shm_offset) == 16,
   10390                OffsetOf_DiscardFramebufferEXT_attachments_shm_offset_not_16);
   10391 
   10392 struct DiscardFramebufferEXTImmediate {
   10393   typedef DiscardFramebufferEXTImmediate ValueType;
   10394   static const CommandId kCmdId = kDiscardFramebufferEXTImmediate;
   10395   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   10396 
   10397   static uint32 ComputeDataSize(GLsizei count) {
   10398     return static_cast<uint32>(
   10399         sizeof(GLenum) * 1 * count);  // NOLINT
   10400   }
   10401 
   10402   static uint32 ComputeSize(GLsizei count) {
   10403     return static_cast<uint32>(
   10404         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   10405   }
   10406 
   10407   void SetHeader(GLsizei count) {
   10408     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   10409   }
   10410 
   10411   void Init(GLenum _target, GLsizei _count, const GLenum* _attachments) {
   10412     SetHeader(_count);
   10413     target = _target;
   10414     count = _count;
   10415     memcpy(ImmediateDataAddress(this),
   10416            _attachments, ComputeDataSize(_count));
   10417   }
   10418 
   10419   void* Set(
   10420       void* cmd, GLenum _target, GLsizei _count, const GLenum* _attachments) {
   10421     static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments);
   10422     const uint32 size = ComputeSize(_count);
   10423     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   10424   }
   10425 
   10426   gpu::CommandHeader header;
   10427   uint32 target;
   10428   int32 count;
   10429 };
   10430 
   10431 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate) == 12,
   10432                Sizeof_DiscardFramebufferEXTImmediate_is_not_12);
   10433 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, header) == 0,
   10434                OffsetOf_DiscardFramebufferEXTImmediate_header_not_0);
   10435 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, target) == 4,
   10436                OffsetOf_DiscardFramebufferEXTImmediate_target_not_4);
   10437 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, count) == 8,
   10438                OffsetOf_DiscardFramebufferEXTImmediate_count_not_8);
   10439 
   10440 struct LoseContextCHROMIUM {
   10441   typedef LoseContextCHROMIUM ValueType;
   10442   static const CommandId kCmdId = kLoseContextCHROMIUM;
   10443   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10444 
   10445   static uint32 ComputeSize() {
   10446     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10447   }
   10448 
   10449   void SetHeader() {
   10450     header.SetCmd<ValueType>();
   10451   }
   10452 
   10453   void Init(GLenum _current, GLenum _other) {
   10454     SetHeader();
   10455     current = _current;
   10456     other = _other;
   10457   }
   10458 
   10459   void* Set(void* cmd, GLenum _current, GLenum _other) {
   10460     static_cast<ValueType*>(cmd)->Init(_current, _other);
   10461     return NextCmdAddress<ValueType>(cmd);
   10462   }
   10463 
   10464   gpu::CommandHeader header;
   10465   uint32 current;
   10466   uint32 other;
   10467 };
   10468 
   10469 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM) == 12,
   10470                Sizeof_LoseContextCHROMIUM_is_not_12);
   10471 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, header) == 0,
   10472                OffsetOf_LoseContextCHROMIUM_header_not_0);
   10473 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, current) == 4,
   10474                OffsetOf_LoseContextCHROMIUM_current_not_4);
   10475 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, other) == 8,
   10476                OffsetOf_LoseContextCHROMIUM_other_not_8);
   10477 
   10478 struct WaitSyncPointCHROMIUM {
   10479   typedef WaitSyncPointCHROMIUM ValueType;
   10480   static const CommandId kCmdId = kWaitSyncPointCHROMIUM;
   10481   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10482 
   10483   static uint32 ComputeSize() {
   10484     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10485   }
   10486 
   10487   void SetHeader() {
   10488     header.SetCmd<ValueType>();
   10489   }
   10490 
   10491   void Init(GLuint _sync_point) {
   10492     SetHeader();
   10493     sync_point = _sync_point;
   10494   }
   10495 
   10496   void* Set(void* cmd, GLuint _sync_point) {
   10497     static_cast<ValueType*>(cmd)->Init(_sync_point);
   10498     return NextCmdAddress<ValueType>(cmd);
   10499   }
   10500 
   10501   gpu::CommandHeader header;
   10502   uint32 sync_point;
   10503 };
   10504 
   10505 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM) == 8,
   10506                Sizeof_WaitSyncPointCHROMIUM_is_not_8);
   10507 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0,
   10508                OffsetOf_WaitSyncPointCHROMIUM_header_not_0);
   10509 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4,
   10510                OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4);
   10511 
   10512 struct DrawBuffersEXT {
   10513   typedef DrawBuffersEXT ValueType;
   10514   static const CommandId kCmdId = kDrawBuffersEXT;
   10515   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10516 
   10517   static uint32 ComputeSize() {
   10518     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10519   }
   10520 
   10521   void SetHeader() {
   10522     header.SetCmd<ValueType>();
   10523   }
   10524 
   10525   void Init(GLsizei _count, uint32 _bufs_shm_id, uint32 _bufs_shm_offset) {
   10526     SetHeader();
   10527     count = _count;
   10528     bufs_shm_id = _bufs_shm_id;
   10529     bufs_shm_offset = _bufs_shm_offset;
   10530   }
   10531 
   10532   void* Set(
   10533       void* cmd, GLsizei _count, uint32 _bufs_shm_id,
   10534       uint32 _bufs_shm_offset) {
   10535     static_cast<ValueType*>(cmd)->Init(_count, _bufs_shm_id, _bufs_shm_offset);
   10536     return NextCmdAddress<ValueType>(cmd);
   10537   }
   10538 
   10539   gpu::CommandHeader header;
   10540   int32 count;
   10541   uint32 bufs_shm_id;
   10542   uint32 bufs_shm_offset;
   10543 };
   10544 
   10545 COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16,
   10546                Sizeof_DrawBuffersEXT_is_not_16);
   10547 COMPILE_ASSERT(offsetof(DrawBuffersEXT, header) == 0,
   10548                OffsetOf_DrawBuffersEXT_header_not_0);
   10549 COMPILE_ASSERT(offsetof(DrawBuffersEXT, count) == 4,
   10550                OffsetOf_DrawBuffersEXT_count_not_4);
   10551 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_id) == 8,
   10552                OffsetOf_DrawBuffersEXT_bufs_shm_id_not_8);
   10553 COMPILE_ASSERT(offsetof(DrawBuffersEXT, bufs_shm_offset) == 12,
   10554                OffsetOf_DrawBuffersEXT_bufs_shm_offset_not_12);
   10555 
   10556 struct DrawBuffersEXTImmediate {
   10557   typedef DrawBuffersEXTImmediate ValueType;
   10558   static const CommandId kCmdId = kDrawBuffersEXTImmediate;
   10559   static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
   10560 
   10561   static uint32 ComputeDataSize(GLsizei count) {
   10562     return static_cast<uint32>(
   10563         sizeof(GLenum) * 1 * count);  // NOLINT
   10564   }
   10565 
   10566   static uint32 ComputeSize(GLsizei count) {
   10567     return static_cast<uint32>(
   10568         sizeof(ValueType) + ComputeDataSize(count));  // NOLINT
   10569   }
   10570 
   10571   void SetHeader(GLsizei count) {
   10572     header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
   10573   }
   10574 
   10575   void Init(GLsizei _count, const GLenum* _bufs) {
   10576     SetHeader(_count);
   10577     count = _count;
   10578     memcpy(ImmediateDataAddress(this),
   10579            _bufs, ComputeDataSize(_count));
   10580   }
   10581 
   10582   void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) {
   10583     static_cast<ValueType*>(cmd)->Init(_count, _bufs);
   10584     const uint32 size = ComputeSize(_count);
   10585     return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
   10586   }
   10587 
   10588   gpu::CommandHeader header;
   10589   int32 count;
   10590 };
   10591 
   10592 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8,
   10593                Sizeof_DrawBuffersEXTImmediate_is_not_8);
   10594 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0,
   10595                OffsetOf_DrawBuffersEXTImmediate_header_not_0);
   10596 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4,
   10597                OffsetOf_DrawBuffersEXTImmediate_count_not_4);
   10598 
   10599 struct DiscardBackbufferCHROMIUM {
   10600   typedef DiscardBackbufferCHROMIUM ValueType;
   10601   static const CommandId kCmdId = kDiscardBackbufferCHROMIUM;
   10602   static const cmd::ArgFlags kArgFlags = cmd::kFixed;
   10603 
   10604   static uint32 ComputeSize() {
   10605     return static_cast<uint32>(sizeof(ValueType));  // NOLINT
   10606   }
   10607 
   10608   void SetHeader() {
   10609     header.SetCmd<ValueType>();
   10610   }
   10611 
   10612   void Init() {
   10613     SetHeader();
   10614   }
   10615 
   10616   void* Set(void* cmd) {
   10617     static_cast<ValueType*>(cmd)->Init();
   10618     return NextCmdAddress<ValueType>(cmd);
   10619   }
   10620 
   10621   gpu::CommandHeader header;
   10622 };
   10623 
   10624 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4,
   10625                Sizeof_DiscardBackbufferCHROMIUM_is_not_4);
   10626 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0,
   10627                OffsetOf_DiscardBackbufferCHROMIUM_header_not_0);
   10628 
   10629 
   10630 #endif  // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
   10631 
   10632