Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / gpu / command_buffer / client / gles2_cmd_helper_autogen.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 //    clang-format -i -style=chromium filename
9 // DO NOT EDIT!
10
11 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_
12 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_
13
14 void ActiveTexture(GLenum texture) {
15   gles2::cmds::ActiveTexture* c = GetCmdSpace<gles2::cmds::ActiveTexture>();
16   if (c) {
17     c->Init(texture);
18   }
19 }
20
21 void AttachShader(GLuint program, GLuint shader) {
22   gles2::cmds::AttachShader* c = GetCmdSpace<gles2::cmds::AttachShader>();
23   if (c) {
24     c->Init(program, shader);
25   }
26 }
27
28 void BindAttribLocationBucket(GLuint program,
29                               GLuint index,
30                               uint32_t name_bucket_id) {
31   gles2::cmds::BindAttribLocationBucket* c =
32       GetCmdSpace<gles2::cmds::BindAttribLocationBucket>();
33   if (c) {
34     c->Init(program, index, name_bucket_id);
35   }
36 }
37
38 void BindBuffer(GLenum target, GLuint buffer) {
39   gles2::cmds::BindBuffer* c = GetCmdSpace<gles2::cmds::BindBuffer>();
40   if (c) {
41     c->Init(target, buffer);
42   }
43 }
44
45 void BindFramebuffer(GLenum target, GLuint framebuffer) {
46   gles2::cmds::BindFramebuffer* c = GetCmdSpace<gles2::cmds::BindFramebuffer>();
47   if (c) {
48     c->Init(target, framebuffer);
49   }
50 }
51
52 void BindRenderbuffer(GLenum target, GLuint renderbuffer) {
53   gles2::cmds::BindRenderbuffer* c =
54       GetCmdSpace<gles2::cmds::BindRenderbuffer>();
55   if (c) {
56     c->Init(target, renderbuffer);
57   }
58 }
59
60 void BindTexture(GLenum target, GLuint texture) {
61   gles2::cmds::BindTexture* c = GetCmdSpace<gles2::cmds::BindTexture>();
62   if (c) {
63     c->Init(target, texture);
64   }
65 }
66
67 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
68   gles2::cmds::BlendColor* c = GetCmdSpace<gles2::cmds::BlendColor>();
69   if (c) {
70     c->Init(red, green, blue, alpha);
71   }
72 }
73
74 void BlendEquation(GLenum mode) {
75   gles2::cmds::BlendEquation* c = GetCmdSpace<gles2::cmds::BlendEquation>();
76   if (c) {
77     c->Init(mode);
78   }
79 }
80
81 void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
82   gles2::cmds::BlendEquationSeparate* c =
83       GetCmdSpace<gles2::cmds::BlendEquationSeparate>();
84   if (c) {
85     c->Init(modeRGB, modeAlpha);
86   }
87 }
88
89 void BlendFunc(GLenum sfactor, GLenum dfactor) {
90   gles2::cmds::BlendFunc* c = GetCmdSpace<gles2::cmds::BlendFunc>();
91   if (c) {
92     c->Init(sfactor, dfactor);
93   }
94 }
95
96 void BlendFuncSeparate(GLenum srcRGB,
97                        GLenum dstRGB,
98                        GLenum srcAlpha,
99                        GLenum dstAlpha) {
100   gles2::cmds::BlendFuncSeparate* c =
101       GetCmdSpace<gles2::cmds::BlendFuncSeparate>();
102   if (c) {
103     c->Init(srcRGB, dstRGB, srcAlpha, dstAlpha);
104   }
105 }
106
107 void BufferData(GLenum target,
108                 GLsizeiptr size,
109                 uint32_t data_shm_id,
110                 uint32_t data_shm_offset,
111                 GLenum usage) {
112   gles2::cmds::BufferData* c = GetCmdSpace<gles2::cmds::BufferData>();
113   if (c) {
114     c->Init(target, size, data_shm_id, data_shm_offset, usage);
115   }
116 }
117
118 void BufferSubData(GLenum target,
119                    GLintptr offset,
120                    GLsizeiptr size,
121                    uint32_t data_shm_id,
122                    uint32_t data_shm_offset) {
123   gles2::cmds::BufferSubData* c = GetCmdSpace<gles2::cmds::BufferSubData>();
124   if (c) {
125     c->Init(target, offset, size, data_shm_id, data_shm_offset);
126   }
127 }
128
129 void CheckFramebufferStatus(GLenum target,
130                             uint32_t result_shm_id,
131                             uint32_t result_shm_offset) {
132   gles2::cmds::CheckFramebufferStatus* c =
133       GetCmdSpace<gles2::cmds::CheckFramebufferStatus>();
134   if (c) {
135     c->Init(target, result_shm_id, result_shm_offset);
136   }
137 }
138
139 void Clear(GLbitfield mask) {
140   gles2::cmds::Clear* c = GetCmdSpace<gles2::cmds::Clear>();
141   if (c) {
142     c->Init(mask);
143   }
144 }
145
146 void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
147   gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>();
148   if (c) {
149     c->Init(red, green, blue, alpha);
150   }
151 }
152
153 void ClearDepthf(GLclampf depth) {
154   gles2::cmds::ClearDepthf* c = GetCmdSpace<gles2::cmds::ClearDepthf>();
155   if (c) {
156     c->Init(depth);
157   }
158 }
159
160 void ClearStencil(GLint s) {
161   gles2::cmds::ClearStencil* c = GetCmdSpace<gles2::cmds::ClearStencil>();
162   if (c) {
163     c->Init(s);
164   }
165 }
166
167 void ColorMask(GLboolean red,
168                GLboolean green,
169                GLboolean blue,
170                GLboolean alpha) {
171   gles2::cmds::ColorMask* c = GetCmdSpace<gles2::cmds::ColorMask>();
172   if (c) {
173     c->Init(red, green, blue, alpha);
174   }
175 }
176
177 void CompileShader(GLuint shader) {
178   gles2::cmds::CompileShader* c = GetCmdSpace<gles2::cmds::CompileShader>();
179   if (c) {
180     c->Init(shader);
181   }
182 }
183
184 void CompressedTexImage2DBucket(GLenum target,
185                                 GLint level,
186                                 GLenum internalformat,
187                                 GLsizei width,
188                                 GLsizei height,
189                                 GLuint bucket_id) {
190   gles2::cmds::CompressedTexImage2DBucket* c =
191       GetCmdSpace<gles2::cmds::CompressedTexImage2DBucket>();
192   if (c) {
193     c->Init(target, level, internalformat, width, height, bucket_id);
194   }
195 }
196
197 void CompressedTexImage2D(GLenum target,
198                           GLint level,
199                           GLenum internalformat,
200                           GLsizei width,
201                           GLsizei height,
202                           GLsizei imageSize,
203                           uint32_t data_shm_id,
204                           uint32_t data_shm_offset) {
205   gles2::cmds::CompressedTexImage2D* c =
206       GetCmdSpace<gles2::cmds::CompressedTexImage2D>();
207   if (c) {
208     c->Init(target, level, internalformat, width, height, imageSize,
209             data_shm_id, data_shm_offset);
210   }
211 }
212
213 void CompressedTexSubImage2DBucket(GLenum target,
214                                    GLint level,
215                                    GLint xoffset,
216                                    GLint yoffset,
217                                    GLsizei width,
218                                    GLsizei height,
219                                    GLenum format,
220                                    GLuint bucket_id) {
221   gles2::cmds::CompressedTexSubImage2DBucket* c =
222       GetCmdSpace<gles2::cmds::CompressedTexSubImage2DBucket>();
223   if (c) {
224     c->Init(target, level, xoffset, yoffset, width, height, format, bucket_id);
225   }
226 }
227
228 void CompressedTexSubImage2D(GLenum target,
229                              GLint level,
230                              GLint xoffset,
231                              GLint yoffset,
232                              GLsizei width,
233                              GLsizei height,
234                              GLenum format,
235                              GLsizei imageSize,
236                              uint32_t data_shm_id,
237                              uint32_t data_shm_offset) {
238   gles2::cmds::CompressedTexSubImage2D* c =
239       GetCmdSpace<gles2::cmds::CompressedTexSubImage2D>();
240   if (c) {
241     c->Init(target, level, xoffset, yoffset, width, height, format, imageSize,
242             data_shm_id, data_shm_offset);
243   }
244 }
245
246 void CopyTexImage2D(GLenum target,
247                     GLint level,
248                     GLenum internalformat,
249                     GLint x,
250                     GLint y,
251                     GLsizei width,
252                     GLsizei height) {
253   gles2::cmds::CopyTexImage2D* c = GetCmdSpace<gles2::cmds::CopyTexImage2D>();
254   if (c) {
255     c->Init(target, level, internalformat, x, y, width, height);
256   }
257 }
258
259 void CopyTexSubImage2D(GLenum target,
260                        GLint level,
261                        GLint xoffset,
262                        GLint yoffset,
263                        GLint x,
264                        GLint y,
265                        GLsizei width,
266                        GLsizei height) {
267   gles2::cmds::CopyTexSubImage2D* c =
268       GetCmdSpace<gles2::cmds::CopyTexSubImage2D>();
269   if (c) {
270     c->Init(target, level, xoffset, yoffset, x, y, width, height);
271   }
272 }
273
274 void CreateProgram(uint32_t client_id) {
275   gles2::cmds::CreateProgram* c = GetCmdSpace<gles2::cmds::CreateProgram>();
276   if (c) {
277     c->Init(client_id);
278   }
279 }
280
281 void CreateShader(GLenum type, uint32_t client_id) {
282   gles2::cmds::CreateShader* c = GetCmdSpace<gles2::cmds::CreateShader>();
283   if (c) {
284     c->Init(type, client_id);
285   }
286 }
287
288 void CullFace(GLenum mode) {
289   gles2::cmds::CullFace* c = GetCmdSpace<gles2::cmds::CullFace>();
290   if (c) {
291     c->Init(mode);
292   }
293 }
294
295 void DeleteBuffersImmediate(GLsizei n, const GLuint* buffers) {
296   const uint32_t size = gles2::cmds::DeleteBuffersImmediate::ComputeSize(n);
297   gles2::cmds::DeleteBuffersImmediate* c =
298       GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteBuffersImmediate>(size);
299   if (c) {
300     c->Init(n, buffers);
301   }
302 }
303
304 void DeleteFramebuffersImmediate(GLsizei n, const GLuint* framebuffers) {
305   const uint32_t size =
306       gles2::cmds::DeleteFramebuffersImmediate::ComputeSize(n);
307   gles2::cmds::DeleteFramebuffersImmediate* c =
308       GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteFramebuffersImmediate>(
309           size);
310   if (c) {
311     c->Init(n, framebuffers);
312   }
313 }
314
315 void DeleteProgram(GLuint program) {
316   gles2::cmds::DeleteProgram* c = GetCmdSpace<gles2::cmds::DeleteProgram>();
317   if (c) {
318     c->Init(program);
319   }
320 }
321
322 void DeleteRenderbuffersImmediate(GLsizei n, const GLuint* renderbuffers) {
323   const uint32_t size =
324       gles2::cmds::DeleteRenderbuffersImmediate::ComputeSize(n);
325   gles2::cmds::DeleteRenderbuffersImmediate* c =
326       GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteRenderbuffersImmediate>(
327           size);
328   if (c) {
329     c->Init(n, renderbuffers);
330   }
331 }
332
333 void DeleteShader(GLuint shader) {
334   gles2::cmds::DeleteShader* c = GetCmdSpace<gles2::cmds::DeleteShader>();
335   if (c) {
336     c->Init(shader);
337   }
338 }
339
340 void DeleteTexturesImmediate(GLsizei n, const GLuint* textures) {
341   const uint32_t size = gles2::cmds::DeleteTexturesImmediate::ComputeSize(n);
342   gles2::cmds::DeleteTexturesImmediate* c =
343       GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteTexturesImmediate>(size);
344   if (c) {
345     c->Init(n, textures);
346   }
347 }
348
349 void DepthFunc(GLenum func) {
350   gles2::cmds::DepthFunc* c = GetCmdSpace<gles2::cmds::DepthFunc>();
351   if (c) {
352     c->Init(func);
353   }
354 }
355
356 void DepthMask(GLboolean flag) {
357   gles2::cmds::DepthMask* c = GetCmdSpace<gles2::cmds::DepthMask>();
358   if (c) {
359     c->Init(flag);
360   }
361 }
362
363 void DepthRangef(GLclampf zNear, GLclampf zFar) {
364   gles2::cmds::DepthRangef* c = GetCmdSpace<gles2::cmds::DepthRangef>();
365   if (c) {
366     c->Init(zNear, zFar);
367   }
368 }
369
370 void DetachShader(GLuint program, GLuint shader) {
371   gles2::cmds::DetachShader* c = GetCmdSpace<gles2::cmds::DetachShader>();
372   if (c) {
373     c->Init(program, shader);
374   }
375 }
376
377 void Disable(GLenum cap) {
378   gles2::cmds::Disable* c = GetCmdSpace<gles2::cmds::Disable>();
379   if (c) {
380     c->Init(cap);
381   }
382 }
383
384 void DisableVertexAttribArray(GLuint index) {
385   gles2::cmds::DisableVertexAttribArray* c =
386       GetCmdSpace<gles2::cmds::DisableVertexAttribArray>();
387   if (c) {
388     c->Init(index);
389   }
390 }
391
392 void DrawArrays(GLenum mode, GLint first, GLsizei count) {
393   gles2::cmds::DrawArrays* c = GetCmdSpace<gles2::cmds::DrawArrays>();
394   if (c) {
395     c->Init(mode, first, count);
396   }
397 }
398
399 void DrawElements(GLenum mode,
400                   GLsizei count,
401                   GLenum type,
402                   GLuint index_offset) {
403   gles2::cmds::DrawElements* c = GetCmdSpace<gles2::cmds::DrawElements>();
404   if (c) {
405     c->Init(mode, count, type, index_offset);
406   }
407 }
408
409 void Enable(GLenum cap) {
410   gles2::cmds::Enable* c = GetCmdSpace<gles2::cmds::Enable>();
411   if (c) {
412     c->Init(cap);
413   }
414 }
415
416 void EnableVertexAttribArray(GLuint index) {
417   gles2::cmds::EnableVertexAttribArray* c =
418       GetCmdSpace<gles2::cmds::EnableVertexAttribArray>();
419   if (c) {
420     c->Init(index);
421   }
422 }
423
424 void Finish() {
425   gles2::cmds::Finish* c = GetCmdSpace<gles2::cmds::Finish>();
426   if (c) {
427     c->Init();
428   }
429 }
430
431 void Flush() {
432   gles2::cmds::Flush* c = GetCmdSpace<gles2::cmds::Flush>();
433   if (c) {
434     c->Init();
435   }
436 }
437
438 void FramebufferRenderbuffer(GLenum target,
439                              GLenum attachment,
440                              GLenum renderbuffertarget,
441                              GLuint renderbuffer) {
442   gles2::cmds::FramebufferRenderbuffer* c =
443       GetCmdSpace<gles2::cmds::FramebufferRenderbuffer>();
444   if (c) {
445     c->Init(target, attachment, renderbuffertarget, renderbuffer);
446   }
447 }
448
449 void FramebufferTexture2D(GLenum target,
450                           GLenum attachment,
451                           GLenum textarget,
452                           GLuint texture) {
453   gles2::cmds::FramebufferTexture2D* c =
454       GetCmdSpace<gles2::cmds::FramebufferTexture2D>();
455   if (c) {
456     c->Init(target, attachment, textarget, texture);
457   }
458 }
459
460 void FrontFace(GLenum mode) {
461   gles2::cmds::FrontFace* c = GetCmdSpace<gles2::cmds::FrontFace>();
462   if (c) {
463     c->Init(mode);
464   }
465 }
466
467 void GenBuffersImmediate(GLsizei n, GLuint* buffers) {
468   const uint32_t size = gles2::cmds::GenBuffersImmediate::ComputeSize(n);
469   gles2::cmds::GenBuffersImmediate* c =
470       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenBuffersImmediate>(size);
471   if (c) {
472     c->Init(n, buffers);
473   }
474 }
475
476 void GenerateMipmap(GLenum target) {
477   gles2::cmds::GenerateMipmap* c = GetCmdSpace<gles2::cmds::GenerateMipmap>();
478   if (c) {
479     c->Init(target);
480   }
481 }
482
483 void GenFramebuffersImmediate(GLsizei n, GLuint* framebuffers) {
484   const uint32_t size = gles2::cmds::GenFramebuffersImmediate::ComputeSize(n);
485   gles2::cmds::GenFramebuffersImmediate* c =
486       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenFramebuffersImmediate>(
487           size);
488   if (c) {
489     c->Init(n, framebuffers);
490   }
491 }
492
493 void GenRenderbuffersImmediate(GLsizei n, GLuint* renderbuffers) {
494   const uint32_t size = gles2::cmds::GenRenderbuffersImmediate::ComputeSize(n);
495   gles2::cmds::GenRenderbuffersImmediate* c =
496       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenRenderbuffersImmediate>(
497           size);
498   if (c) {
499     c->Init(n, renderbuffers);
500   }
501 }
502
503 void GenTexturesImmediate(GLsizei n, GLuint* textures) {
504   const uint32_t size = gles2::cmds::GenTexturesImmediate::ComputeSize(n);
505   gles2::cmds::GenTexturesImmediate* c =
506       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenTexturesImmediate>(size);
507   if (c) {
508     c->Init(n, textures);
509   }
510 }
511
512 void GetActiveAttrib(GLuint program,
513                      GLuint index,
514                      uint32_t name_bucket_id,
515                      uint32_t result_shm_id,
516                      uint32_t result_shm_offset) {
517   gles2::cmds::GetActiveAttrib* c = GetCmdSpace<gles2::cmds::GetActiveAttrib>();
518   if (c) {
519     c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset);
520   }
521 }
522
523 void GetActiveUniform(GLuint program,
524                       GLuint index,
525                       uint32_t name_bucket_id,
526                       uint32_t result_shm_id,
527                       uint32_t result_shm_offset) {
528   gles2::cmds::GetActiveUniform* c =
529       GetCmdSpace<gles2::cmds::GetActiveUniform>();
530   if (c) {
531     c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset);
532   }
533 }
534
535 void GetAttachedShaders(GLuint program,
536                         uint32_t result_shm_id,
537                         uint32_t result_shm_offset,
538                         uint32_t result_size) {
539   gles2::cmds::GetAttachedShaders* c =
540       GetCmdSpace<gles2::cmds::GetAttachedShaders>();
541   if (c) {
542     c->Init(program, result_shm_id, result_shm_offset, result_size);
543   }
544 }
545
546 void GetAttribLocation(GLuint program,
547                        uint32_t name_bucket_id,
548                        uint32_t location_shm_id,
549                        uint32_t location_shm_offset) {
550   gles2::cmds::GetAttribLocation* c =
551       GetCmdSpace<gles2::cmds::GetAttribLocation>();
552   if (c) {
553     c->Init(program, name_bucket_id, location_shm_id, location_shm_offset);
554   }
555 }
556
557 void GetBooleanv(GLenum pname,
558                  uint32_t params_shm_id,
559                  uint32_t params_shm_offset) {
560   gles2::cmds::GetBooleanv* c = GetCmdSpace<gles2::cmds::GetBooleanv>();
561   if (c) {
562     c->Init(pname, params_shm_id, params_shm_offset);
563   }
564 }
565
566 void GetBufferParameteriv(GLenum target,
567                           GLenum pname,
568                           uint32_t params_shm_id,
569                           uint32_t params_shm_offset) {
570   gles2::cmds::GetBufferParameteriv* c =
571       GetCmdSpace<gles2::cmds::GetBufferParameteriv>();
572   if (c) {
573     c->Init(target, pname, params_shm_id, params_shm_offset);
574   }
575 }
576
577 void GetError(uint32_t result_shm_id, uint32_t result_shm_offset) {
578   gles2::cmds::GetError* c = GetCmdSpace<gles2::cmds::GetError>();
579   if (c) {
580     c->Init(result_shm_id, result_shm_offset);
581   }
582 }
583
584 void GetFloatv(GLenum pname,
585                uint32_t params_shm_id,
586                uint32_t params_shm_offset) {
587   gles2::cmds::GetFloatv* c = GetCmdSpace<gles2::cmds::GetFloatv>();
588   if (c) {
589     c->Init(pname, params_shm_id, params_shm_offset);
590   }
591 }
592
593 void GetFramebufferAttachmentParameteriv(GLenum target,
594                                          GLenum attachment,
595                                          GLenum pname,
596                                          uint32_t params_shm_id,
597                                          uint32_t params_shm_offset) {
598   gles2::cmds::GetFramebufferAttachmentParameteriv* c =
599       GetCmdSpace<gles2::cmds::GetFramebufferAttachmentParameteriv>();
600   if (c) {
601     c->Init(target, attachment, pname, params_shm_id, params_shm_offset);
602   }
603 }
604
605 void GetIntegerv(GLenum pname,
606                  uint32_t params_shm_id,
607                  uint32_t params_shm_offset) {
608   gles2::cmds::GetIntegerv* c = GetCmdSpace<gles2::cmds::GetIntegerv>();
609   if (c) {
610     c->Init(pname, params_shm_id, params_shm_offset);
611   }
612 }
613
614 void GetProgramiv(GLuint program,
615                   GLenum pname,
616                   uint32_t params_shm_id,
617                   uint32_t params_shm_offset) {
618   gles2::cmds::GetProgramiv* c = GetCmdSpace<gles2::cmds::GetProgramiv>();
619   if (c) {
620     c->Init(program, pname, params_shm_id, params_shm_offset);
621   }
622 }
623
624 void GetProgramInfoLog(GLuint program, uint32_t bucket_id) {
625   gles2::cmds::GetProgramInfoLog* c =
626       GetCmdSpace<gles2::cmds::GetProgramInfoLog>();
627   if (c) {
628     c->Init(program, bucket_id);
629   }
630 }
631
632 void GetRenderbufferParameteriv(GLenum target,
633                                 GLenum pname,
634                                 uint32_t params_shm_id,
635                                 uint32_t params_shm_offset) {
636   gles2::cmds::GetRenderbufferParameteriv* c =
637       GetCmdSpace<gles2::cmds::GetRenderbufferParameteriv>();
638   if (c) {
639     c->Init(target, pname, params_shm_id, params_shm_offset);
640   }
641 }
642
643 void GetShaderiv(GLuint shader,
644                  GLenum pname,
645                  uint32_t params_shm_id,
646                  uint32_t params_shm_offset) {
647   gles2::cmds::GetShaderiv* c = GetCmdSpace<gles2::cmds::GetShaderiv>();
648   if (c) {
649     c->Init(shader, pname, params_shm_id, params_shm_offset);
650   }
651 }
652
653 void GetShaderInfoLog(GLuint shader, uint32_t bucket_id) {
654   gles2::cmds::GetShaderInfoLog* c =
655       GetCmdSpace<gles2::cmds::GetShaderInfoLog>();
656   if (c) {
657     c->Init(shader, bucket_id);
658   }
659 }
660
661 void GetShaderPrecisionFormat(GLenum shadertype,
662                               GLenum precisiontype,
663                               uint32_t result_shm_id,
664                               uint32_t result_shm_offset) {
665   gles2::cmds::GetShaderPrecisionFormat* c =
666       GetCmdSpace<gles2::cmds::GetShaderPrecisionFormat>();
667   if (c) {
668     c->Init(shadertype, precisiontype, result_shm_id, result_shm_offset);
669   }
670 }
671
672 void GetShaderSource(GLuint shader, uint32_t bucket_id) {
673   gles2::cmds::GetShaderSource* c = GetCmdSpace<gles2::cmds::GetShaderSource>();
674   if (c) {
675     c->Init(shader, bucket_id);
676   }
677 }
678
679 void GetString(GLenum name, uint32_t bucket_id) {
680   gles2::cmds::GetString* c = GetCmdSpace<gles2::cmds::GetString>();
681   if (c) {
682     c->Init(name, bucket_id);
683   }
684 }
685
686 void GetTexParameterfv(GLenum target,
687                        GLenum pname,
688                        uint32_t params_shm_id,
689                        uint32_t params_shm_offset) {
690   gles2::cmds::GetTexParameterfv* c =
691       GetCmdSpace<gles2::cmds::GetTexParameterfv>();
692   if (c) {
693     c->Init(target, pname, params_shm_id, params_shm_offset);
694   }
695 }
696
697 void GetTexParameteriv(GLenum target,
698                        GLenum pname,
699                        uint32_t params_shm_id,
700                        uint32_t params_shm_offset) {
701   gles2::cmds::GetTexParameteriv* c =
702       GetCmdSpace<gles2::cmds::GetTexParameteriv>();
703   if (c) {
704     c->Init(target, pname, params_shm_id, params_shm_offset);
705   }
706 }
707
708 void GetUniformfv(GLuint program,
709                   GLint location,
710                   uint32_t params_shm_id,
711                   uint32_t params_shm_offset) {
712   gles2::cmds::GetUniformfv* c = GetCmdSpace<gles2::cmds::GetUniformfv>();
713   if (c) {
714     c->Init(program, location, params_shm_id, params_shm_offset);
715   }
716 }
717
718 void GetUniformiv(GLuint program,
719                   GLint location,
720                   uint32_t params_shm_id,
721                   uint32_t params_shm_offset) {
722   gles2::cmds::GetUniformiv* c = GetCmdSpace<gles2::cmds::GetUniformiv>();
723   if (c) {
724     c->Init(program, location, params_shm_id, params_shm_offset);
725   }
726 }
727
728 void GetUniformLocation(GLuint program,
729                         uint32_t name_bucket_id,
730                         uint32_t location_shm_id,
731                         uint32_t location_shm_offset) {
732   gles2::cmds::GetUniformLocation* c =
733       GetCmdSpace<gles2::cmds::GetUniformLocation>();
734   if (c) {
735     c->Init(program, name_bucket_id, location_shm_id, location_shm_offset);
736   }
737 }
738
739 void GetVertexAttribfv(GLuint index,
740                        GLenum pname,
741                        uint32_t params_shm_id,
742                        uint32_t params_shm_offset) {
743   gles2::cmds::GetVertexAttribfv* c =
744       GetCmdSpace<gles2::cmds::GetVertexAttribfv>();
745   if (c) {
746     c->Init(index, pname, params_shm_id, params_shm_offset);
747   }
748 }
749
750 void GetVertexAttribiv(GLuint index,
751                        GLenum pname,
752                        uint32_t params_shm_id,
753                        uint32_t params_shm_offset) {
754   gles2::cmds::GetVertexAttribiv* c =
755       GetCmdSpace<gles2::cmds::GetVertexAttribiv>();
756   if (c) {
757     c->Init(index, pname, params_shm_id, params_shm_offset);
758   }
759 }
760
761 void GetVertexAttribPointerv(GLuint index,
762                              GLenum pname,
763                              uint32_t pointer_shm_id,
764                              uint32_t pointer_shm_offset) {
765   gles2::cmds::GetVertexAttribPointerv* c =
766       GetCmdSpace<gles2::cmds::GetVertexAttribPointerv>();
767   if (c) {
768     c->Init(index, pname, pointer_shm_id, pointer_shm_offset);
769   }
770 }
771
772 void Hint(GLenum target, GLenum mode) {
773   gles2::cmds::Hint* c = GetCmdSpace<gles2::cmds::Hint>();
774   if (c) {
775     c->Init(target, mode);
776   }
777 }
778
779 void IsBuffer(GLuint buffer,
780               uint32_t result_shm_id,
781               uint32_t result_shm_offset) {
782   gles2::cmds::IsBuffer* c = GetCmdSpace<gles2::cmds::IsBuffer>();
783   if (c) {
784     c->Init(buffer, result_shm_id, result_shm_offset);
785   }
786 }
787
788 void IsEnabled(GLenum cap, uint32_t result_shm_id, uint32_t result_shm_offset) {
789   gles2::cmds::IsEnabled* c = GetCmdSpace<gles2::cmds::IsEnabled>();
790   if (c) {
791     c->Init(cap, result_shm_id, result_shm_offset);
792   }
793 }
794
795 void IsFramebuffer(GLuint framebuffer,
796                    uint32_t result_shm_id,
797                    uint32_t result_shm_offset) {
798   gles2::cmds::IsFramebuffer* c = GetCmdSpace<gles2::cmds::IsFramebuffer>();
799   if (c) {
800     c->Init(framebuffer, result_shm_id, result_shm_offset);
801   }
802 }
803
804 void IsProgram(GLuint program,
805                uint32_t result_shm_id,
806                uint32_t result_shm_offset) {
807   gles2::cmds::IsProgram* c = GetCmdSpace<gles2::cmds::IsProgram>();
808   if (c) {
809     c->Init(program, result_shm_id, result_shm_offset);
810   }
811 }
812
813 void IsRenderbuffer(GLuint renderbuffer,
814                     uint32_t result_shm_id,
815                     uint32_t result_shm_offset) {
816   gles2::cmds::IsRenderbuffer* c = GetCmdSpace<gles2::cmds::IsRenderbuffer>();
817   if (c) {
818     c->Init(renderbuffer, result_shm_id, result_shm_offset);
819   }
820 }
821
822 void IsShader(GLuint shader,
823               uint32_t result_shm_id,
824               uint32_t result_shm_offset) {
825   gles2::cmds::IsShader* c = GetCmdSpace<gles2::cmds::IsShader>();
826   if (c) {
827     c->Init(shader, result_shm_id, result_shm_offset);
828   }
829 }
830
831 void IsTexture(GLuint texture,
832                uint32_t result_shm_id,
833                uint32_t result_shm_offset) {
834   gles2::cmds::IsTexture* c = GetCmdSpace<gles2::cmds::IsTexture>();
835   if (c) {
836     c->Init(texture, result_shm_id, result_shm_offset);
837   }
838 }
839
840 void LineWidth(GLfloat width) {
841   gles2::cmds::LineWidth* c = GetCmdSpace<gles2::cmds::LineWidth>();
842   if (c) {
843     c->Init(width);
844   }
845 }
846
847 void LinkProgram(GLuint program) {
848   gles2::cmds::LinkProgram* c = GetCmdSpace<gles2::cmds::LinkProgram>();
849   if (c) {
850     c->Init(program);
851   }
852 }
853
854 void PixelStorei(GLenum pname, GLint param) {
855   gles2::cmds::PixelStorei* c = GetCmdSpace<gles2::cmds::PixelStorei>();
856   if (c) {
857     c->Init(pname, param);
858   }
859 }
860
861 void PolygonOffset(GLfloat factor, GLfloat units) {
862   gles2::cmds::PolygonOffset* c = GetCmdSpace<gles2::cmds::PolygonOffset>();
863   if (c) {
864     c->Init(factor, units);
865   }
866 }
867
868 void ReadPixels(GLint x,
869                 GLint y,
870                 GLsizei width,
871                 GLsizei height,
872                 GLenum format,
873                 GLenum type,
874                 uint32_t pixels_shm_id,
875                 uint32_t pixels_shm_offset,
876                 uint32_t result_shm_id,
877                 uint32_t result_shm_offset,
878                 GLboolean async) {
879   gles2::cmds::ReadPixels* c = GetCmdSpace<gles2::cmds::ReadPixels>();
880   if (c) {
881     c->Init(x, y, width, height, format, type, pixels_shm_id, pixels_shm_offset,
882             result_shm_id, result_shm_offset, async);
883   }
884 }
885
886 void ReleaseShaderCompiler() {
887   gles2::cmds::ReleaseShaderCompiler* c =
888       GetCmdSpace<gles2::cmds::ReleaseShaderCompiler>();
889   if (c) {
890     c->Init();
891   }
892 }
893
894 void RenderbufferStorage(GLenum target,
895                          GLenum internalformat,
896                          GLsizei width,
897                          GLsizei height) {
898   gles2::cmds::RenderbufferStorage* c =
899       GetCmdSpace<gles2::cmds::RenderbufferStorage>();
900   if (c) {
901     c->Init(target, internalformat, width, height);
902   }
903 }
904
905 void SampleCoverage(GLclampf value, GLboolean invert) {
906   gles2::cmds::SampleCoverage* c = GetCmdSpace<gles2::cmds::SampleCoverage>();
907   if (c) {
908     c->Init(value, invert);
909   }
910 }
911
912 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) {
913   gles2::cmds::Scissor* c = GetCmdSpace<gles2::cmds::Scissor>();
914   if (c) {
915     c->Init(x, y, width, height);
916   }
917 }
918
919 void ShaderBinary(GLsizei n,
920                   uint32_t shaders_shm_id,
921                   uint32_t shaders_shm_offset,
922                   GLenum binaryformat,
923                   uint32_t binary_shm_id,
924                   uint32_t binary_shm_offset,
925                   GLsizei length) {
926   gles2::cmds::ShaderBinary* c = GetCmdSpace<gles2::cmds::ShaderBinary>();
927   if (c) {
928     c->Init(n, shaders_shm_id, shaders_shm_offset, binaryformat, binary_shm_id,
929             binary_shm_offset, length);
930   }
931 }
932
933 void ShaderSourceBucket(GLuint shader, uint32_t data_bucket_id) {
934   gles2::cmds::ShaderSourceBucket* c =
935       GetCmdSpace<gles2::cmds::ShaderSourceBucket>();
936   if (c) {
937     c->Init(shader, data_bucket_id);
938   }
939 }
940
941 void StencilFunc(GLenum func, GLint ref, GLuint mask) {
942   gles2::cmds::StencilFunc* c = GetCmdSpace<gles2::cmds::StencilFunc>();
943   if (c) {
944     c->Init(func, ref, mask);
945   }
946 }
947
948 void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
949   gles2::cmds::StencilFuncSeparate* c =
950       GetCmdSpace<gles2::cmds::StencilFuncSeparate>();
951   if (c) {
952     c->Init(face, func, ref, mask);
953   }
954 }
955
956 void StencilMask(GLuint mask) {
957   gles2::cmds::StencilMask* c = GetCmdSpace<gles2::cmds::StencilMask>();
958   if (c) {
959     c->Init(mask);
960   }
961 }
962
963 void StencilMaskSeparate(GLenum face, GLuint mask) {
964   gles2::cmds::StencilMaskSeparate* c =
965       GetCmdSpace<gles2::cmds::StencilMaskSeparate>();
966   if (c) {
967     c->Init(face, mask);
968   }
969 }
970
971 void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
972   gles2::cmds::StencilOp* c = GetCmdSpace<gles2::cmds::StencilOp>();
973   if (c) {
974     c->Init(fail, zfail, zpass);
975   }
976 }
977
978 void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
979   gles2::cmds::StencilOpSeparate* c =
980       GetCmdSpace<gles2::cmds::StencilOpSeparate>();
981   if (c) {
982     c->Init(face, fail, zfail, zpass);
983   }
984 }
985
986 void TexImage2D(GLenum target,
987                 GLint level,
988                 GLint internalformat,
989                 GLsizei width,
990                 GLsizei height,
991                 GLenum format,
992                 GLenum type,
993                 uint32_t pixels_shm_id,
994                 uint32_t pixels_shm_offset) {
995   gles2::cmds::TexImage2D* c = GetCmdSpace<gles2::cmds::TexImage2D>();
996   if (c) {
997     c->Init(target, level, internalformat, width, height, format, type,
998             pixels_shm_id, pixels_shm_offset);
999   }
1000 }
1001
1002 void TexParameterf(GLenum target, GLenum pname, GLfloat param) {
1003   gles2::cmds::TexParameterf* c = GetCmdSpace<gles2::cmds::TexParameterf>();
1004   if (c) {
1005     c->Init(target, pname, param);
1006   }
1007 }
1008
1009 void TexParameterfvImmediate(GLenum target,
1010                              GLenum pname,
1011                              const GLfloat* params) {
1012   const uint32_t size = gles2::cmds::TexParameterfvImmediate::ComputeSize();
1013   gles2::cmds::TexParameterfvImmediate* c =
1014       GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterfvImmediate>(size);
1015   if (c) {
1016     c->Init(target, pname, params);
1017   }
1018 }
1019
1020 void TexParameteri(GLenum target, GLenum pname, GLint param) {
1021   gles2::cmds::TexParameteri* c = GetCmdSpace<gles2::cmds::TexParameteri>();
1022   if (c) {
1023     c->Init(target, pname, param);
1024   }
1025 }
1026
1027 void TexParameterivImmediate(GLenum target, GLenum pname, const GLint* params) {
1028   const uint32_t size = gles2::cmds::TexParameterivImmediate::ComputeSize();
1029   gles2::cmds::TexParameterivImmediate* c =
1030       GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterivImmediate>(size);
1031   if (c) {
1032     c->Init(target, pname, params);
1033   }
1034 }
1035
1036 void TexSubImage2D(GLenum target,
1037                    GLint level,
1038                    GLint xoffset,
1039                    GLint yoffset,
1040                    GLsizei width,
1041                    GLsizei height,
1042                    GLenum format,
1043                    GLenum type,
1044                    uint32_t pixels_shm_id,
1045                    uint32_t pixels_shm_offset,
1046                    GLboolean internal) {
1047   gles2::cmds::TexSubImage2D* c = GetCmdSpace<gles2::cmds::TexSubImage2D>();
1048   if (c) {
1049     c->Init(target, level, xoffset, yoffset, width, height, format, type,
1050             pixels_shm_id, pixels_shm_offset, internal);
1051   }
1052 }
1053
1054 void Uniform1f(GLint location, GLfloat x) {
1055   gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>();
1056   if (c) {
1057     c->Init(location, x);
1058   }
1059 }
1060
1061 void Uniform1fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1062   const uint32_t size = gles2::cmds::Uniform1fvImmediate::ComputeSize(count);
1063   gles2::cmds::Uniform1fvImmediate* c =
1064       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1fvImmediate>(size);
1065   if (c) {
1066     c->Init(location, count, v);
1067   }
1068 }
1069
1070 void Uniform1i(GLint location, GLint x) {
1071   gles2::cmds::Uniform1i* c = GetCmdSpace<gles2::cmds::Uniform1i>();
1072   if (c) {
1073     c->Init(location, x);
1074   }
1075 }
1076
1077 void Uniform1ivImmediate(GLint location, GLsizei count, const GLint* v) {
1078   const uint32_t size = gles2::cmds::Uniform1ivImmediate::ComputeSize(count);
1079   gles2::cmds::Uniform1ivImmediate* c =
1080       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1ivImmediate>(size);
1081   if (c) {
1082     c->Init(location, count, v);
1083   }
1084 }
1085
1086 void Uniform2f(GLint location, GLfloat x, GLfloat y) {
1087   gles2::cmds::Uniform2f* c = GetCmdSpace<gles2::cmds::Uniform2f>();
1088   if (c) {
1089     c->Init(location, x, y);
1090   }
1091 }
1092
1093 void Uniform2fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1094   const uint32_t size = gles2::cmds::Uniform2fvImmediate::ComputeSize(count);
1095   gles2::cmds::Uniform2fvImmediate* c =
1096       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2fvImmediate>(size);
1097   if (c) {
1098     c->Init(location, count, v);
1099   }
1100 }
1101
1102 void Uniform2i(GLint location, GLint x, GLint y) {
1103   gles2::cmds::Uniform2i* c = GetCmdSpace<gles2::cmds::Uniform2i>();
1104   if (c) {
1105     c->Init(location, x, y);
1106   }
1107 }
1108
1109 void Uniform2ivImmediate(GLint location, GLsizei count, const GLint* v) {
1110   const uint32_t size = gles2::cmds::Uniform2ivImmediate::ComputeSize(count);
1111   gles2::cmds::Uniform2ivImmediate* c =
1112       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2ivImmediate>(size);
1113   if (c) {
1114     c->Init(location, count, v);
1115   }
1116 }
1117
1118 void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
1119   gles2::cmds::Uniform3f* c = GetCmdSpace<gles2::cmds::Uniform3f>();
1120   if (c) {
1121     c->Init(location, x, y, z);
1122   }
1123 }
1124
1125 void Uniform3fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1126   const uint32_t size = gles2::cmds::Uniform3fvImmediate::ComputeSize(count);
1127   gles2::cmds::Uniform3fvImmediate* c =
1128       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3fvImmediate>(size);
1129   if (c) {
1130     c->Init(location, count, v);
1131   }
1132 }
1133
1134 void Uniform3i(GLint location, GLint x, GLint y, GLint z) {
1135   gles2::cmds::Uniform3i* c = GetCmdSpace<gles2::cmds::Uniform3i>();
1136   if (c) {
1137     c->Init(location, x, y, z);
1138   }
1139 }
1140
1141 void Uniform3ivImmediate(GLint location, GLsizei count, const GLint* v) {
1142   const uint32_t size = gles2::cmds::Uniform3ivImmediate::ComputeSize(count);
1143   gles2::cmds::Uniform3ivImmediate* c =
1144       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3ivImmediate>(size);
1145   if (c) {
1146     c->Init(location, count, v);
1147   }
1148 }
1149
1150 void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
1151   gles2::cmds::Uniform4f* c = GetCmdSpace<gles2::cmds::Uniform4f>();
1152   if (c) {
1153     c->Init(location, x, y, z, w);
1154   }
1155 }
1156
1157 void Uniform4fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1158   const uint32_t size = gles2::cmds::Uniform4fvImmediate::ComputeSize(count);
1159   gles2::cmds::Uniform4fvImmediate* c =
1160       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4fvImmediate>(size);
1161   if (c) {
1162     c->Init(location, count, v);
1163   }
1164 }
1165
1166 void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
1167   gles2::cmds::Uniform4i* c = GetCmdSpace<gles2::cmds::Uniform4i>();
1168   if (c) {
1169     c->Init(location, x, y, z, w);
1170   }
1171 }
1172
1173 void Uniform4ivImmediate(GLint location, GLsizei count, const GLint* v) {
1174   const uint32_t size = gles2::cmds::Uniform4ivImmediate::ComputeSize(count);
1175   gles2::cmds::Uniform4ivImmediate* c =
1176       GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4ivImmediate>(size);
1177   if (c) {
1178     c->Init(location, count, v);
1179   }
1180 }
1181
1182 void UniformMatrix2fvImmediate(GLint location,
1183                                GLsizei count,
1184                                const GLfloat* value) {
1185   const uint32_t size =
1186       gles2::cmds::UniformMatrix2fvImmediate::ComputeSize(count);
1187   gles2::cmds::UniformMatrix2fvImmediate* c =
1188       GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2fvImmediate>(
1189           size);
1190   if (c) {
1191     c->Init(location, count, value);
1192   }
1193 }
1194
1195 void UniformMatrix3fvImmediate(GLint location,
1196                                GLsizei count,
1197                                const GLfloat* value) {
1198   const uint32_t size =
1199       gles2::cmds::UniformMatrix3fvImmediate::ComputeSize(count);
1200   gles2::cmds::UniformMatrix3fvImmediate* c =
1201       GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3fvImmediate>(
1202           size);
1203   if (c) {
1204     c->Init(location, count, value);
1205   }
1206 }
1207
1208 void UniformMatrix4fvImmediate(GLint location,
1209                                GLsizei count,
1210                                const GLfloat* value) {
1211   const uint32_t size =
1212       gles2::cmds::UniformMatrix4fvImmediate::ComputeSize(count);
1213   gles2::cmds::UniformMatrix4fvImmediate* c =
1214       GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4fvImmediate>(
1215           size);
1216   if (c) {
1217     c->Init(location, count, value);
1218   }
1219 }
1220
1221 void UseProgram(GLuint program) {
1222   gles2::cmds::UseProgram* c = GetCmdSpace<gles2::cmds::UseProgram>();
1223   if (c) {
1224     c->Init(program);
1225   }
1226 }
1227
1228 void ValidateProgram(GLuint program) {
1229   gles2::cmds::ValidateProgram* c = GetCmdSpace<gles2::cmds::ValidateProgram>();
1230   if (c) {
1231     c->Init(program);
1232   }
1233 }
1234
1235 void VertexAttrib1f(GLuint indx, GLfloat x) {
1236   gles2::cmds::VertexAttrib1f* c = GetCmdSpace<gles2::cmds::VertexAttrib1f>();
1237   if (c) {
1238     c->Init(indx, x);
1239   }
1240 }
1241
1242 void VertexAttrib1fvImmediate(GLuint indx, const GLfloat* values) {
1243   const uint32_t size = gles2::cmds::VertexAttrib1fvImmediate::ComputeSize();
1244   gles2::cmds::VertexAttrib1fvImmediate* c =
1245       GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib1fvImmediate>(
1246           size);
1247   if (c) {
1248     c->Init(indx, values);
1249   }
1250 }
1251
1252 void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
1253   gles2::cmds::VertexAttrib2f* c = GetCmdSpace<gles2::cmds::VertexAttrib2f>();
1254   if (c) {
1255     c->Init(indx, x, y);
1256   }
1257 }
1258
1259 void VertexAttrib2fvImmediate(GLuint indx, const GLfloat* values) {
1260   const uint32_t size = gles2::cmds::VertexAttrib2fvImmediate::ComputeSize();
1261   gles2::cmds::VertexAttrib2fvImmediate* c =
1262       GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib2fvImmediate>(
1263           size);
1264   if (c) {
1265     c->Init(indx, values);
1266   }
1267 }
1268
1269 void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
1270   gles2::cmds::VertexAttrib3f* c = GetCmdSpace<gles2::cmds::VertexAttrib3f>();
1271   if (c) {
1272     c->Init(indx, x, y, z);
1273   }
1274 }
1275
1276 void VertexAttrib3fvImmediate(GLuint indx, const GLfloat* values) {
1277   const uint32_t size = gles2::cmds::VertexAttrib3fvImmediate::ComputeSize();
1278   gles2::cmds::VertexAttrib3fvImmediate* c =
1279       GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib3fvImmediate>(
1280           size);
1281   if (c) {
1282     c->Init(indx, values);
1283   }
1284 }
1285
1286 void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
1287   gles2::cmds::VertexAttrib4f* c = GetCmdSpace<gles2::cmds::VertexAttrib4f>();
1288   if (c) {
1289     c->Init(indx, x, y, z, w);
1290   }
1291 }
1292
1293 void VertexAttrib4fvImmediate(GLuint indx, const GLfloat* values) {
1294   const uint32_t size = gles2::cmds::VertexAttrib4fvImmediate::ComputeSize();
1295   gles2::cmds::VertexAttrib4fvImmediate* c =
1296       GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib4fvImmediate>(
1297           size);
1298   if (c) {
1299     c->Init(indx, values);
1300   }
1301 }
1302
1303 void VertexAttribPointer(GLuint indx,
1304                          GLint size,
1305                          GLenum type,
1306                          GLboolean normalized,
1307                          GLsizei stride,
1308                          GLuint offset) {
1309   gles2::cmds::VertexAttribPointer* c =
1310       GetCmdSpace<gles2::cmds::VertexAttribPointer>();
1311   if (c) {
1312     c->Init(indx, size, type, normalized, stride, offset);
1313   }
1314 }
1315
1316 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) {
1317   gles2::cmds::Viewport* c = GetCmdSpace<gles2::cmds::Viewport>();
1318   if (c) {
1319     c->Init(x, y, width, height);
1320   }
1321 }
1322
1323 void BlitFramebufferCHROMIUM(GLint srcX0,
1324                              GLint srcY0,
1325                              GLint srcX1,
1326                              GLint srcY1,
1327                              GLint dstX0,
1328                              GLint dstY0,
1329                              GLint dstX1,
1330                              GLint dstY1,
1331                              GLbitfield mask,
1332                              GLenum filter) {
1333   gles2::cmds::BlitFramebufferCHROMIUM* c =
1334       GetCmdSpace<gles2::cmds::BlitFramebufferCHROMIUM>();
1335   if (c) {
1336     c->Init(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
1337             filter);
1338   }
1339 }
1340
1341 void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
1342                                             GLsizei samples,
1343                                             GLenum internalformat,
1344                                             GLsizei width,
1345                                             GLsizei height) {
1346   gles2::cmds::RenderbufferStorageMultisampleCHROMIUM* c =
1347       GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleCHROMIUM>();
1348   if (c) {
1349     c->Init(target, samples, internalformat, width, height);
1350   }
1351 }
1352
1353 void RenderbufferStorageMultisampleEXT(GLenum target,
1354                                        GLsizei samples,
1355                                        GLenum internalformat,
1356                                        GLsizei width,
1357                                        GLsizei height) {
1358   gles2::cmds::RenderbufferStorageMultisampleEXT* c =
1359       GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleEXT>();
1360   if (c) {
1361     c->Init(target, samples, internalformat, width, height);
1362   }
1363 }
1364
1365 void FramebufferTexture2DMultisampleEXT(GLenum target,
1366                                         GLenum attachment,
1367                                         GLenum textarget,
1368                                         GLuint texture,
1369                                         GLsizei samples) {
1370   gles2::cmds::FramebufferTexture2DMultisampleEXT* c =
1371       GetCmdSpace<gles2::cmds::FramebufferTexture2DMultisampleEXT>();
1372   if (c) {
1373     c->Init(target, attachment, textarget, texture, samples);
1374   }
1375 }
1376
1377 void TexStorage2DEXT(GLenum target,
1378                      GLsizei levels,
1379                      GLenum internalFormat,
1380                      GLsizei width,
1381                      GLsizei height) {
1382   gles2::cmds::TexStorage2DEXT* c = GetCmdSpace<gles2::cmds::TexStorage2DEXT>();
1383   if (c) {
1384     c->Init(target, levels, internalFormat, width, height);
1385   }
1386 }
1387
1388 void GenQueriesEXTImmediate(GLsizei n, GLuint* queries) {
1389   const uint32_t size = gles2::cmds::GenQueriesEXTImmediate::ComputeSize(n);
1390   gles2::cmds::GenQueriesEXTImmediate* c =
1391       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenQueriesEXTImmediate>(size);
1392   if (c) {
1393     c->Init(n, queries);
1394   }
1395 }
1396
1397 void DeleteQueriesEXTImmediate(GLsizei n, const GLuint* queries) {
1398   const uint32_t size = gles2::cmds::DeleteQueriesEXTImmediate::ComputeSize(n);
1399   gles2::cmds::DeleteQueriesEXTImmediate* c =
1400       GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteQueriesEXTImmediate>(
1401           size);
1402   if (c) {
1403     c->Init(n, queries);
1404   }
1405 }
1406
1407 void BeginQueryEXT(GLenum target,
1408                    GLuint id,
1409                    uint32_t sync_data_shm_id,
1410                    uint32_t sync_data_shm_offset) {
1411   gles2::cmds::BeginQueryEXT* c = GetCmdSpace<gles2::cmds::BeginQueryEXT>();
1412   if (c) {
1413     c->Init(target, id, sync_data_shm_id, sync_data_shm_offset);
1414   }
1415 }
1416
1417 void EndQueryEXT(GLenum target, GLuint submit_count) {
1418   gles2::cmds::EndQueryEXT* c = GetCmdSpace<gles2::cmds::EndQueryEXT>();
1419   if (c) {
1420     c->Init(target, submit_count);
1421   }
1422 }
1423
1424 void InsertEventMarkerEXT(GLuint bucket_id) {
1425   gles2::cmds::InsertEventMarkerEXT* c =
1426       GetCmdSpace<gles2::cmds::InsertEventMarkerEXT>();
1427   if (c) {
1428     c->Init(bucket_id);
1429   }
1430 }
1431
1432 void PushGroupMarkerEXT(GLuint bucket_id) {
1433   gles2::cmds::PushGroupMarkerEXT* c =
1434       GetCmdSpace<gles2::cmds::PushGroupMarkerEXT>();
1435   if (c) {
1436     c->Init(bucket_id);
1437   }
1438 }
1439
1440 void PopGroupMarkerEXT() {
1441   gles2::cmds::PopGroupMarkerEXT* c =
1442       GetCmdSpace<gles2::cmds::PopGroupMarkerEXT>();
1443   if (c) {
1444     c->Init();
1445   }
1446 }
1447
1448 void GenVertexArraysOESImmediate(GLsizei n, GLuint* arrays) {
1449   const uint32_t size =
1450       gles2::cmds::GenVertexArraysOESImmediate::ComputeSize(n);
1451   gles2::cmds::GenVertexArraysOESImmediate* c =
1452       GetImmediateCmdSpaceTotalSize<gles2::cmds::GenVertexArraysOESImmediate>(
1453           size);
1454   if (c) {
1455     c->Init(n, arrays);
1456   }
1457 }
1458
1459 void DeleteVertexArraysOESImmediate(GLsizei n, const GLuint* arrays) {
1460   const uint32_t size =
1461       gles2::cmds::DeleteVertexArraysOESImmediate::ComputeSize(n);
1462   gles2::cmds::DeleteVertexArraysOESImmediate* c =
1463       GetImmediateCmdSpaceTotalSize<
1464           gles2::cmds::DeleteVertexArraysOESImmediate>(size);
1465   if (c) {
1466     c->Init(n, arrays);
1467   }
1468 }
1469
1470 void IsVertexArrayOES(GLuint array,
1471                       uint32_t result_shm_id,
1472                       uint32_t result_shm_offset) {
1473   gles2::cmds::IsVertexArrayOES* c =
1474       GetCmdSpace<gles2::cmds::IsVertexArrayOES>();
1475   if (c) {
1476     c->Init(array, result_shm_id, result_shm_offset);
1477   }
1478 }
1479
1480 void BindVertexArrayOES(GLuint array) {
1481   gles2::cmds::BindVertexArrayOES* c =
1482       GetCmdSpace<gles2::cmds::BindVertexArrayOES>();
1483   if (c) {
1484     c->Init(array);
1485   }
1486 }
1487
1488 void SwapBuffers() {
1489   gles2::cmds::SwapBuffers* c = GetCmdSpace<gles2::cmds::SwapBuffers>();
1490   if (c) {
1491     c->Init();
1492   }
1493 }
1494
1495 void GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
1496                                  GLsizei count,
1497                                  GLenum type,
1498                                  GLuint offset,
1499                                  uint32_t result_shm_id,
1500                                  uint32_t result_shm_offset) {
1501   gles2::cmds::GetMaxValueInBufferCHROMIUM* c =
1502       GetCmdSpace<gles2::cmds::GetMaxValueInBufferCHROMIUM>();
1503   if (c) {
1504     c->Init(buffer_id, count, type, offset, result_shm_id, result_shm_offset);
1505   }
1506 }
1507
1508 void EnableFeatureCHROMIUM(GLuint bucket_id,
1509                            uint32_t result_shm_id,
1510                            uint32_t result_shm_offset) {
1511   gles2::cmds::EnableFeatureCHROMIUM* c =
1512       GetCmdSpace<gles2::cmds::EnableFeatureCHROMIUM>();
1513   if (c) {
1514     c->Init(bucket_id, result_shm_id, result_shm_offset);
1515   }
1516 }
1517
1518 void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) {
1519   gles2::cmds::ResizeCHROMIUM* c = GetCmdSpace<gles2::cmds::ResizeCHROMIUM>();
1520   if (c) {
1521     c->Init(width, height, scale_factor);
1522   }
1523 }
1524
1525 void GetRequestableExtensionsCHROMIUM(uint32_t bucket_id) {
1526   gles2::cmds::GetRequestableExtensionsCHROMIUM* c =
1527       GetCmdSpace<gles2::cmds::GetRequestableExtensionsCHROMIUM>();
1528   if (c) {
1529     c->Init(bucket_id);
1530   }
1531 }
1532
1533 void RequestExtensionCHROMIUM(uint32_t bucket_id) {
1534   gles2::cmds::RequestExtensionCHROMIUM* c =
1535       GetCmdSpace<gles2::cmds::RequestExtensionCHROMIUM>();
1536   if (c) {
1537     c->Init(bucket_id);
1538   }
1539 }
1540
1541 void GetMultipleIntegervCHROMIUM(uint32_t pnames_shm_id,
1542                                  uint32_t pnames_shm_offset,
1543                                  GLuint count,
1544                                  uint32_t results_shm_id,
1545                                  uint32_t results_shm_offset,
1546                                  GLsizeiptr size) {
1547   gles2::cmds::GetMultipleIntegervCHROMIUM* c =
1548       GetCmdSpace<gles2::cmds::GetMultipleIntegervCHROMIUM>();
1549   if (c) {
1550     c->Init(pnames_shm_id, pnames_shm_offset, count, results_shm_id,
1551             results_shm_offset, size);
1552   }
1553 }
1554
1555 void GetProgramInfoCHROMIUM(GLuint program, uint32_t bucket_id) {
1556   gles2::cmds::GetProgramInfoCHROMIUM* c =
1557       GetCmdSpace<gles2::cmds::GetProgramInfoCHROMIUM>();
1558   if (c) {
1559     c->Init(program, bucket_id);
1560   }
1561 }
1562
1563 void GetTranslatedShaderSourceANGLE(GLuint shader, uint32_t bucket_id) {
1564   gles2::cmds::GetTranslatedShaderSourceANGLE* c =
1565       GetCmdSpace<gles2::cmds::GetTranslatedShaderSourceANGLE>();
1566   if (c) {
1567     c->Init(shader, bucket_id);
1568   }
1569 }
1570
1571 void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) {
1572   gles2::cmds::PostSubBufferCHROMIUM* c =
1573       GetCmdSpace<gles2::cmds::PostSubBufferCHROMIUM>();
1574   if (c) {
1575     c->Init(x, y, width, height);
1576   }
1577 }
1578
1579 void TexImageIOSurface2DCHROMIUM(GLenum target,
1580                                  GLsizei width,
1581                                  GLsizei height,
1582                                  GLuint ioSurfaceId,
1583                                  GLuint plane) {
1584   gles2::cmds::TexImageIOSurface2DCHROMIUM* c =
1585       GetCmdSpace<gles2::cmds::TexImageIOSurface2DCHROMIUM>();
1586   if (c) {
1587     c->Init(target, width, height, ioSurfaceId, plane);
1588   }
1589 }
1590
1591 void CopyTextureCHROMIUM(GLenum target,
1592                          GLenum source_id,
1593                          GLenum dest_id,
1594                          GLint level,
1595                          GLint internalformat,
1596                          GLenum dest_type) {
1597   gles2::cmds::CopyTextureCHROMIUM* c =
1598       GetCmdSpace<gles2::cmds::CopyTextureCHROMIUM>();
1599   if (c) {
1600     c->Init(target, source_id, dest_id, level, internalformat, dest_type);
1601   }
1602 }
1603
1604 void DrawArraysInstancedANGLE(GLenum mode,
1605                               GLint first,
1606                               GLsizei count,
1607                               GLsizei primcount) {
1608   gles2::cmds::DrawArraysInstancedANGLE* c =
1609       GetCmdSpace<gles2::cmds::DrawArraysInstancedANGLE>();
1610   if (c) {
1611     c->Init(mode, first, count, primcount);
1612   }
1613 }
1614
1615 void DrawElementsInstancedANGLE(GLenum mode,
1616                                 GLsizei count,
1617                                 GLenum type,
1618                                 GLuint index_offset,
1619                                 GLsizei primcount) {
1620   gles2::cmds::DrawElementsInstancedANGLE* c =
1621       GetCmdSpace<gles2::cmds::DrawElementsInstancedANGLE>();
1622   if (c) {
1623     c->Init(mode, count, type, index_offset, primcount);
1624   }
1625 }
1626
1627 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
1628   gles2::cmds::VertexAttribDivisorANGLE* c =
1629       GetCmdSpace<gles2::cmds::VertexAttribDivisorANGLE>();
1630   if (c) {
1631     c->Init(index, divisor);
1632   }
1633 }
1634
1635 void ProduceTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) {
1636   const uint32_t size =
1637       gles2::cmds::ProduceTextureCHROMIUMImmediate::ComputeSize();
1638   gles2::cmds::ProduceTextureCHROMIUMImmediate* c =
1639       GetImmediateCmdSpaceTotalSize<
1640           gles2::cmds::ProduceTextureCHROMIUMImmediate>(size);
1641   if (c) {
1642     c->Init(target, mailbox);
1643   }
1644 }
1645
1646 void ProduceTextureDirectCHROMIUMImmediate(GLuint texture,
1647                                            GLenum target,
1648                                            const GLbyte* mailbox) {
1649   const uint32_t size =
1650       gles2::cmds::ProduceTextureDirectCHROMIUMImmediate::ComputeSize();
1651   gles2::cmds::ProduceTextureDirectCHROMIUMImmediate* c =
1652       GetImmediateCmdSpaceTotalSize<
1653           gles2::cmds::ProduceTextureDirectCHROMIUMImmediate>(size);
1654   if (c) {
1655     c->Init(texture, target, mailbox);
1656   }
1657 }
1658
1659 void ConsumeTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) {
1660   const uint32_t size =
1661       gles2::cmds::ConsumeTextureCHROMIUMImmediate::ComputeSize();
1662   gles2::cmds::ConsumeTextureCHROMIUMImmediate* c =
1663       GetImmediateCmdSpaceTotalSize<
1664           gles2::cmds::ConsumeTextureCHROMIUMImmediate>(size);
1665   if (c) {
1666     c->Init(target, mailbox);
1667   }
1668 }
1669
1670 void BindUniformLocationCHROMIUMBucket(GLuint program,
1671                                        GLint location,
1672                                        uint32_t name_bucket_id) {
1673   gles2::cmds::BindUniformLocationCHROMIUMBucket* c =
1674       GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUMBucket>();
1675   if (c) {
1676     c->Init(program, location, name_bucket_id);
1677   }
1678 }
1679
1680 void GenValuebuffersCHROMIUMImmediate(GLsizei n, GLuint* buffers) {
1681   const uint32_t size =
1682       gles2::cmds::GenValuebuffersCHROMIUMImmediate::ComputeSize(n);
1683   gles2::cmds::GenValuebuffersCHROMIUMImmediate* c =
1684       GetImmediateCmdSpaceTotalSize<
1685           gles2::cmds::GenValuebuffersCHROMIUMImmediate>(size);
1686   if (c) {
1687     c->Init(n, buffers);
1688   }
1689 }
1690
1691 void DeleteValuebuffersCHROMIUMImmediate(GLsizei n,
1692                                          const GLuint* valuebuffers) {
1693   const uint32_t size =
1694       gles2::cmds::DeleteValuebuffersCHROMIUMImmediate::ComputeSize(n);
1695   gles2::cmds::DeleteValuebuffersCHROMIUMImmediate* c =
1696       GetImmediateCmdSpaceTotalSize<
1697           gles2::cmds::DeleteValuebuffersCHROMIUMImmediate>(size);
1698   if (c) {
1699     c->Init(n, valuebuffers);
1700   }
1701 }
1702
1703 void IsValuebufferCHROMIUM(GLuint valuebuffer,
1704                            uint32_t result_shm_id,
1705                            uint32_t result_shm_offset) {
1706   gles2::cmds::IsValuebufferCHROMIUM* c =
1707       GetCmdSpace<gles2::cmds::IsValuebufferCHROMIUM>();
1708   if (c) {
1709     c->Init(valuebuffer, result_shm_id, result_shm_offset);
1710   }
1711 }
1712
1713 void BindValuebufferCHROMIUM(GLenum target, GLuint valuebuffer) {
1714   gles2::cmds::BindValuebufferCHROMIUM* c =
1715       GetCmdSpace<gles2::cmds::BindValuebufferCHROMIUM>();
1716   if (c) {
1717     c->Init(target, valuebuffer);
1718   }
1719 }
1720
1721 void SubscribeValueCHROMIUM(GLenum target, GLenum subscription) {
1722   gles2::cmds::SubscribeValueCHROMIUM* c =
1723       GetCmdSpace<gles2::cmds::SubscribeValueCHROMIUM>();
1724   if (c) {
1725     c->Init(target, subscription);
1726   }
1727 }
1728
1729 void PopulateSubscribedValuesCHROMIUM(GLenum target) {
1730   gles2::cmds::PopulateSubscribedValuesCHROMIUM* c =
1731       GetCmdSpace<gles2::cmds::PopulateSubscribedValuesCHROMIUM>();
1732   if (c) {
1733     c->Init(target);
1734   }
1735 }
1736
1737 void UniformValuebufferCHROMIUM(GLint location,
1738                                 GLenum target,
1739                                 GLenum subscription) {
1740   gles2::cmds::UniformValuebufferCHROMIUM* c =
1741       GetCmdSpace<gles2::cmds::UniformValuebufferCHROMIUM>();
1742   if (c) {
1743     c->Init(location, target, subscription);
1744   }
1745 }
1746
1747 void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) {
1748   gles2::cmds::BindTexImage2DCHROMIUM* c =
1749       GetCmdSpace<gles2::cmds::BindTexImage2DCHROMIUM>();
1750   if (c) {
1751     c->Init(target, imageId);
1752   }
1753 }
1754
1755 void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) {
1756   gles2::cmds::ReleaseTexImage2DCHROMIUM* c =
1757       GetCmdSpace<gles2::cmds::ReleaseTexImage2DCHROMIUM>();
1758   if (c) {
1759     c->Init(target, imageId);
1760   }
1761 }
1762
1763 void TraceBeginCHROMIUM(GLuint bucket_id) {
1764   gles2::cmds::TraceBeginCHROMIUM* c =
1765       GetCmdSpace<gles2::cmds::TraceBeginCHROMIUM>();
1766   if (c) {
1767     c->Init(bucket_id);
1768   }
1769 }
1770
1771 void TraceEndCHROMIUM() {
1772   gles2::cmds::TraceEndCHROMIUM* c =
1773       GetCmdSpace<gles2::cmds::TraceEndCHROMIUM>();
1774   if (c) {
1775     c->Init();
1776   }
1777 }
1778
1779 void AsyncTexSubImage2DCHROMIUM(GLenum target,
1780                                 GLint level,
1781                                 GLint xoffset,
1782                                 GLint yoffset,
1783                                 GLsizei width,
1784                                 GLsizei height,
1785                                 GLenum format,
1786                                 GLenum type,
1787                                 uint32_t data_shm_id,
1788                                 uint32_t data_shm_offset,
1789                                 uint32_t async_upload_token,
1790                                 uint32_t sync_data_shm_id,
1791                                 uint32_t sync_data_shm_offset) {
1792   gles2::cmds::AsyncTexSubImage2DCHROMIUM* c =
1793       GetCmdSpace<gles2::cmds::AsyncTexSubImage2DCHROMIUM>();
1794   if (c) {
1795     c->Init(target, level, xoffset, yoffset, width, height, format, type,
1796             data_shm_id, data_shm_offset, async_upload_token, sync_data_shm_id,
1797             sync_data_shm_offset);
1798   }
1799 }
1800
1801 void AsyncTexImage2DCHROMIUM(GLenum target,
1802                              GLint level,
1803                              GLint internalformat,
1804                              GLsizei width,
1805                              GLsizei height,
1806                              GLenum format,
1807                              GLenum type,
1808                              uint32_t pixels_shm_id,
1809                              uint32_t pixels_shm_offset,
1810                              uint32_t async_upload_token,
1811                              uint32_t sync_data_shm_id,
1812                              uint32_t sync_data_shm_offset) {
1813   gles2::cmds::AsyncTexImage2DCHROMIUM* c =
1814       GetCmdSpace<gles2::cmds::AsyncTexImage2DCHROMIUM>();
1815   if (c) {
1816     c->Init(target, level, internalformat, width, height, format, type,
1817             pixels_shm_id, pixels_shm_offset, async_upload_token,
1818             sync_data_shm_id, sync_data_shm_offset);
1819   }
1820 }
1821
1822 void WaitAsyncTexImage2DCHROMIUM(GLenum target) {
1823   gles2::cmds::WaitAsyncTexImage2DCHROMIUM* c =
1824       GetCmdSpace<gles2::cmds::WaitAsyncTexImage2DCHROMIUM>();
1825   if (c) {
1826     c->Init(target);
1827   }
1828 }
1829
1830 void WaitAllAsyncTexImage2DCHROMIUM() {
1831   gles2::cmds::WaitAllAsyncTexImage2DCHROMIUM* c =
1832       GetCmdSpace<gles2::cmds::WaitAllAsyncTexImage2DCHROMIUM>();
1833   if (c) {
1834     c->Init();
1835   }
1836 }
1837
1838 void DiscardFramebufferEXTImmediate(GLenum target,
1839                                     GLsizei count,
1840                                     const GLenum* attachments) {
1841   const uint32_t size =
1842       gles2::cmds::DiscardFramebufferEXTImmediate::ComputeSize(count);
1843   gles2::cmds::DiscardFramebufferEXTImmediate* c =
1844       GetImmediateCmdSpaceTotalSize<
1845           gles2::cmds::DiscardFramebufferEXTImmediate>(size);
1846   if (c) {
1847     c->Init(target, count, attachments);
1848   }
1849 }
1850
1851 void LoseContextCHROMIUM(GLenum current, GLenum other) {
1852   gles2::cmds::LoseContextCHROMIUM* c =
1853       GetCmdSpace<gles2::cmds::LoseContextCHROMIUM>();
1854   if (c) {
1855     c->Init(current, other);
1856   }
1857 }
1858
1859 void WaitSyncPointCHROMIUM(GLuint sync_point) {
1860   gles2::cmds::WaitSyncPointCHROMIUM* c =
1861       GetCmdSpace<gles2::cmds::WaitSyncPointCHROMIUM>();
1862   if (c) {
1863     c->Init(sync_point);
1864   }
1865 }
1866
1867 void DrawBuffersEXTImmediate(GLsizei count, const GLenum* bufs) {
1868   const uint32_t size =
1869       gles2::cmds::DrawBuffersEXTImmediate::ComputeSize(count);
1870   gles2::cmds::DrawBuffersEXTImmediate* c =
1871       GetImmediateCmdSpaceTotalSize<gles2::cmds::DrawBuffersEXTImmediate>(size);
1872   if (c) {
1873     c->Init(count, bufs);
1874   }
1875 }
1876
1877 void DiscardBackbufferCHROMIUM() {
1878   gles2::cmds::DiscardBackbufferCHROMIUM* c =
1879       GetCmdSpace<gles2::cmds::DiscardBackbufferCHROMIUM>();
1880   if (c) {
1881     c->Init();
1882   }
1883 }
1884
1885 void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
1886                                   GLenum plane_transform,
1887                                   GLuint overlay_texture_id,
1888                                   GLint bounds_x,
1889                                   GLint bounds_y,
1890                                   GLint bounds_width,
1891                                   GLint bounds_height,
1892                                   GLfloat uv_x,
1893                                   GLfloat uv_y,
1894                                   GLfloat uv_width,
1895                                   GLfloat uv_height) {
1896   gles2::cmds::ScheduleOverlayPlaneCHROMIUM* c =
1897       GetCmdSpace<gles2::cmds::ScheduleOverlayPlaneCHROMIUM>();
1898   if (c) {
1899     c->Init(plane_z_order, plane_transform, overlay_texture_id, bounds_x,
1900             bounds_y, bounds_width, bounds_height, uv_x, uv_y, uv_width,
1901             uv_height);
1902   }
1903 }
1904
1905 void MatrixLoadfCHROMIUMImmediate(GLenum matrixMode, const GLfloat* m) {
1906   const uint32_t size =
1907       gles2::cmds::MatrixLoadfCHROMIUMImmediate::ComputeSize();
1908   gles2::cmds::MatrixLoadfCHROMIUMImmediate* c =
1909       GetImmediateCmdSpaceTotalSize<gles2::cmds::MatrixLoadfCHROMIUMImmediate>(
1910           size);
1911   if (c) {
1912     c->Init(matrixMode, m);
1913   }
1914 }
1915
1916 void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) {
1917   gles2::cmds::MatrixLoadIdentityCHROMIUM* c =
1918       GetCmdSpace<gles2::cmds::MatrixLoadIdentityCHROMIUM>();
1919   if (c) {
1920     c->Init(matrixMode);
1921   }
1922 }
1923
1924 void BlendBarrierKHR() {
1925   gles2::cmds::BlendBarrierKHR* c = GetCmdSpace<gles2::cmds::BlendBarrierKHR>();
1926   if (c) {
1927     c->Init();
1928   }
1929 }
1930
1931 #endif  // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_