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